diff --git a/Makefile b/Makefile index fbd9e57c..fcc7d240 100644 --- a/Makefile +++ b/Makefile @@ -786,11 +786,11 @@ endif mkdir -p $(TARGET_DIR)/etc ( \ - echo "NAME=LoongOS(GD)"; \ + echo "NAME=Buildroot"; \ echo "VERSION=$(BR2_VERSION_FULL)"; \ - echo "ID=LoongOS"; \ + echo "ID=buildroot"; \ echo "VERSION_ID=$(BR2_VERSION)"; \ - echo "PRETTY_NAME=\"LoongOS $(BR2_VERSION)\"" \ + echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \ ) > $(TARGET_DIR)/usr/lib/os-release ln -sf ../usr/lib/os-release $(TARGET_DIR)/etc diff --git a/board/loongson/ls2k300/readme.txt b/board/loongson/ls2k300/readme.txt new file mode 100644 index 00000000..f4bc1c5f --- /dev/null +++ b/board/loongson/ls2k300/readme.txt @@ -0,0 +1,31 @@ +loongson LA64 ls2k300 + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the ls2k300. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make loongson2k300_mini_dp_defconfig (this will use rootfs_overlay) + +Compile everything and build the system: + + $ make + or + $ make -j4 (run in 4 core PC) + +How to install the system +======================== + +you can use +{buildroot_path}/output/images/rootfs.tar.gz +or +{buildroot_path}/output/images/rootfs.ubi +to install to SSD or nand by uboot function +remember rootfs.ext4.gz rename to rootfs.img diff --git a/board/loongson/ls2k300/rootfs_overlay/boot/.gitignore b/board/loongson/ls2k300/rootfs_overlay/boot/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/board/loongson/ls2k300/rootfs_overlay/etc/ssh/sshd_config b/board/loongson/ls2k300/rootfs_overlay/etc/ssh/sshd_config new file mode 100644 index 00000000..83b371e1 --- /dev/null +++ b/board/loongson/ls2k300/rootfs_overlay/etc/ssh/sshd_config @@ -0,0 +1,117 @@ +# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/bin:/sbin:/usr/bin:/usr/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options override the +# default value. + +#Port 22 +#AddressFamily any +#ListenAddress 0.0.0.0 +#ListenAddress :: + +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_ecdsa_key +#HostKey /etc/ssh/ssh_host_ed25519_key + +# Ciphers and keying +#RekeyLimit default none + +# Logging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +#LoginGraceTime 2m +#PermitRootLogin prohibit-password +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +#PubkeyAuthentication yes + +# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 +# but this is overridden so installations will only check .ssh/authorized_keys +AuthorizedKeysFile .ssh/authorized_keys + +#AuthorizedPrincipalsFile none + +#AuthorizedKeysCommand none +#AuthorizedKeysCommandUser nobody + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# To disable tunneled clear text passwords, change to no here! +#PasswordAuthentication yes +#PermitEmptyPasswords no + +# Change to no to disable s/key passwords +#ChallengeResponseAuthentication yes + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes + +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +#UsePAM no + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding no +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PermitTTY yes +#PrintMotd yes +#PrintLastLog yes +#TCPKeepAlive yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#UseDNS no +#PidFile /var/run/sshd.pid +#MaxStartups 10:30:100 +#PermitTunnel no +#ChrootDirectory none +#VersionAddendum none + +# no default banner path +#Banner none + +# override default of no subsystems +Subsystem sftp /usr/libexec/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# PermitTTY no +# ForceCommand cvs server diff --git a/configs/loongson2k300_defconfig b/configs/loongson2k300_defconfig index 4a35c2e1..b7d1b660 100644 --- a/configs/loongson2k300_defconfig +++ b/configs/loongson2k300_defconfig @@ -16,7 +16,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin" BR2_SYSTEM_ENABLE_NLS=y BR2_TARGET_LOCALTIME="Asia/Shanghai" -BR2_ROOTFS_OVERLAY="board/loongson/ls2k1000la/rootfs_overlay" +BR2_ROOTFS_OVERLAY="board/loongson/ls2k300/rootfs_overlay" BR2_PACKAGE_ALSA_UTILS=y BR2_PACKAGE_ALSA_UTILS_AMIXER=y BR2_PACKAGE_ALSA_UTILS_APLAY=y diff --git a/configs/loongson2k300_mini_dp_defconfig b/configs/loongson2k300_mini_dp_defconfig index 39f32553..2f3f1ee2 100644 --- a/configs/loongson2k300_mini_dp_defconfig +++ b/configs/loongson2k300_mini_dp_defconfig @@ -16,7 +16,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin" BR2_SYSTEM_ENABLE_NLS=y BR2_TARGET_LOCALTIME="Asia/Shanghai" -BR2_ROOTFS_OVERLAY="board/loongson/ls2k1000la/rootfs_overlay" +BR2_ROOTFS_OVERLAY="board/loongson/ls2k300/rootfs_overlay" BR2_PACKAGE_ALSA_UTILS=y BR2_PACKAGE_ALSA_UTILS_AMIXER=y BR2_PACKAGE_ALSA_UTILS_APLAY=y diff --git a/fs/ext2/Config.in b/fs/ext2/Config.in index 333ead95..cd5915f8 100644 --- a/fs/ext2/Config.in +++ b/fs/ext2/Config.in @@ -29,6 +29,11 @@ config BR2_TARGET_ROOTFS_EXT2_4 endchoice +config BR2_TARGET_ROOTFS_IMG + bool "img root filesystem" + depends on BR2_TARGET_ROOTFS_EXT2_4 + default y + config BR2_TARGET_ROOTFS_EXT2_GEN int default 2 if BR2_TARGET_ROOTFS_EXT2_2 diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk index 74c99bd7..10be3fb1 100644 --- a/fs/ext2/ext2.mk +++ b/fs/ext2/ext2.mk @@ -40,7 +40,16 @@ ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2) define ROOTFS_EXT2_SYMLINK ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT) endef + ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_EXT2_SYMLINK endif +ifeq ($(BR2_TARGET_ROOTFS_IMG), y) +define ROOTFS_IMG + ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.img +endef + +ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_IMG +endif + $(eval $(rootfs)) diff --git a/package/Config.in b/package/Config.in index 48767d35..ff138265 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1266,6 +1266,8 @@ menu "External python modules" source "package/python-zc-lockfile/Config.in" source "package/python-zeroconf/Config.in" source "package/python-zope-interface/Config.in" + source "package/python-pyftdi/Config.in" + source "package/python-smbus2/Config.in" endmenu endif source "package/quickjs/Config.in" diff --git a/package/loongson_kernel/loongson_kernel.mk b/package/loongson_kernel/loongson_kernel.mk index 65b18a7a..d55b9a21 100644 --- a/package/loongson_kernel/loongson_kernel.mk +++ b/package/loongson_kernel/loongson_kernel.mk @@ -8,8 +8,7 @@ LOONGSON_KERNEL_SITE = $(TOPDIR)/package/loongson_kernel/loongson_kernel.tar.gz LOONGSON_KERNEL_SITE_METHOD = file define LOONGSON_KERNEL_EXTRACT_CMDS - tar -xzf $(LOONGSON_KERNEL_SITE) -C $(@D)/ - cd $(@D) && ./loongson_kernel.sh $(BR2_PACKAGE_LOONGSON_KERNEL_HOSTSITE) $(BR2_PACKAGE_LOONGSON_KERNEL_USER) $(BR2_PACKAGE_LOONGSON_KERNEL_PASSWORD) $(BR2_PACKAGE_LOONGSON_KERNEL_PATH) + tar -xzf $(LOONGSON_KERNEL_SITE) -C $(@D)/ --strip-components 1 --wildcards */uImage endef define LOONGSON_KERNEL_INSTALL_TARGET_CMDS diff --git a/package/loongson_kernel/loongson_kernel.tar.gz b/package/loongson_kernel/loongson_kernel.tar.gz index a6e400bc..ed59cb8a 100644 Binary files a/package/loongson_kernel/loongson_kernel.tar.gz and b/package/loongson_kernel/loongson_kernel.tar.gz differ diff --git a/package/loongson_resize/S01resizerootfs b/package/loongson_resize/S01resizerootfs new file mode 100755 index 00000000..90e2fd3d --- /dev/null +++ b/package/loongson_resize/S01resizerootfs @@ -0,0 +1,15 @@ +#!/bin/sh +# +case "$1" in + start) + /etc/profile.d/resizerootfs.sh + ;; + stop) + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + diff --git a/package/loongson_resize/resizerootfs.sh b/package/loongson_resize/resizerootfs.sh new file mode 100755 index 00000000..ae33e68f --- /dev/null +++ b/package/loongson_resize/resizerootfs.sh @@ -0,0 +1,56 @@ +#!/bin/sh +# + +FLAG=/etc/init.d/resizerootfs + +ROOTDEV_P=`cat /proc/cmdline | sed 's/ /\n/g' | grep root= | cut -d = -f 2` +ROOTDEV="/dev/" +PARTNUM=0 + +# /dev/sdax +choose_ssd_root(){ + ROOTDEV=`echo ${ROOTDEV_P} | sed 's/[1-9]//g'` + if [[ "${ROOTDEV_P}" == "${ROOTDEV}" ]]; then + return + else + PARTNUM=`echo ${ROOTDEV_P#${ROOTDEV}}` + fi +} + +# /dev/mmcblkxpx +choose_mmc_root(){ + ROOTDEV=`echo ${ROOTDEV_P} | cut -d p -f 1` + if [[ "${ROOTDEV_P}" == "${ROOTDEV}" ]]; then + return + else + PARTNUM=`echo ${ROOTDEV_P} | cut -d p -f 2` + fi +} + +do_resize(){ + if [[ ${PARTNUM} == 0 ]]; then + echo "Don't resize partition" + else + echo "Partition resizing..." + parted ${ROOTDEV} --script -- resizepart ${PARTNUM} -0 + fi + + resize2fs ${ROOTDEV_P} + echo 1 > $FLAG +} + +if [ -f ${FLAG} ]; then + echo "Rootfs Resized." +else + echo "Rootfs Resizing..." + if [[ ${ROOTDEV_P} == *"/dev/sd"* ]]; then + choose_ssd_root + do_resize + elif [[ ${ROOTDEV_P} == *"/dev/mmcblk"* ]]; then + choose_mmc_root + do_resize + else + echo "${ROOTDEV_P} cannot resize" + fi +fi + diff --git a/package/ls_default_eth_config/gen-keep-nmcli.sh b/package/ls_default_eth_config/gen-keep-nmcli.sh new file mode 100755 index 00000000..6f7c1abe --- /dev/null +++ b/package/ls_default_eth_config/gen-keep-nmcli.sh @@ -0,0 +1,63 @@ +#! /bin/bash + +file_name="keep-nmcli.sh" +gen_file="./$file_name" + +gen_single_nmcli() +{ + # $1 name $2 ip4/24 + connection_name=$1"-connection" + + echo "exist=\$(nmcli c show | grep $connection_name | wc -l)" >> $gen_file + echo "if [ \$exist -ne 1 ]; then" >> $gen_file + echo " nmcli c add type ethernet con-name $connection_name ifname $1 ip4 $2/24" >> $gen_file + echo "fi" >> $gen_file + echo "" >> $gen_file +} + +gen_all() +{ + single_content=$(echo $1 | grep ' ') + single_param=0 + if [[ -z "$single_content" ]]; then + single_param=1 + fi + + loopp=1 + index=1 + while [ $loopp -eq 1 ]; + do + ethname=$(echo $1 | cut -d ' ' -f$index) + ethip=$(echo $2 | cut -d ' ' -f$index) + if [[ -z $ethname ]]; then + loopp=0 + elif [[ -z $ethip ]]; then + loopp=0 + else + echo "$ethname <======> $ethip" + gen_single_nmcli $ethname $ethip + index=$(($index + 1)) + fi + if [ $single_param -eq 1 ]; then + break; + fi + done +} + +if [ $# -ne 2 ]; then + echo "param not full! exit 0" + exit 0 +fi + +echo "#! /bin/sh" > $gen_file +echo "sleep 2" >> $gen_file +echo "" >> $gen_file + +gen_all "$1" "$2" + +echo "systemctl disable keep-nmcli" >> $gen_file +echo "rm /usr/lib/systemd/system/multi-user.target.wants/keep-nmcli.service" >> $gen_file +echo "rm /usr/lib/systemd/system/keep-nmcli.service" >> $gen_file +echo "rm /root/$file_name" >> $gen_file +chmod a+x $gen_file + diff --git a/package/ls_default_eth_config/gen_interfaces.sh b/package/ls_default_eth_config/gen_interfaces.sh new file mode 100755 index 00000000..8d779a8f --- /dev/null +++ b/package/ls_default_eth_config/gen_interfaces.sh @@ -0,0 +1,59 @@ +#! /bin/bash + +file_name="interfaces" +gen_file="./interfaces" + +gen_single_nmcli() +{ + # $1 name $2 ip4/24 + + echo "auto $1" >> $gen_file + echo "iface $1 inet static" >> $gen_file + echo "address $2" >> $gen_file + echo "netmask 255.255.255.0" >> $gen_file + echo "#gateway " >> $gen_file + echo "" >> $gen_file +} + +gen_all() +{ + single_content=$(echo $1 | grep ' ') + single_param=0 + if [[ -z "$single_content" ]]; then + single_param=1 + fi + + loopp=1 + index=1 + while [ $loopp -eq 1 ]; + do + ethname=$(echo $1 | cut -d ' ' -f$index) + ethip=$(echo $2 | cut -d ' ' -f$index) + if [[ -z $ethname ]]; then + loopp=0 + elif [[ -z $ethip ]]; then + loopp=0 + else + echo "$ethname <======> $ethip" + gen_single_nmcli $ethname $ethip + index=$(($index + 1)) + fi + if [ $single_param -eq 1 ]; then + break; + fi + done +} + +if [ $# -ne 2 ]; then + echo "param not full! exit 0" + exit 0 +fi + +echo "# interface file auto-generated by buildroot" > $gen_file +echo "" >> $gen_file +echo "auto lo" >> $gen_file +echo "iface lo inet loopback" >> $gen_file +echo "" >> $gen_file + +gen_all "$1" "$2" + diff --git a/package/ls_default_eth_config/keep-nmcli.service b/package/ls_default_eth_config/keep-nmcli.service new file mode 100644 index 00000000..eb2946a9 --- /dev/null +++ b/package/ls_default_eth_config/keep-nmcli.service @@ -0,0 +1,12 @@ +[Unit] +Description=config default eth ip by nmcli when system first boot and delete all service and shell script after config +After=NetworkManager@.service + +[Service] +Type=oneshot +ExecStart=/root/keep-nmcli.sh +TimeoutSec=0 +RemainAfterExit=no + +[Install] +WantedBy=multi-user.target diff --git a/package/python-pyftdi/Config.in b/package/python-pyftdi/Config.in new file mode 100644 index 00000000..10142060 --- /dev/null +++ b/package/python-pyftdi/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_PYFTDI + bool "python-pyftdi" + help + FTDI device driver (pure Python) + + https://pypi.org/project/pyftdi diff --git a/package/python-pyftdi/python-pyftdi.mk b/package/python-pyftdi/python-pyftdi.mk new file mode 100644 index 00000000..d5d94dba --- /dev/null +++ b/package/python-pyftdi/python-pyftdi.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# python-pyftdi +# +################################################################################ + +PYTHON_PYFTDI_VERSION = 0.55.4 +PYTHON_PYFTDI_SOURCE = pyftdi-$(PYTHON_PYFTDI_VERSION).tar.gz +PYTHON_PYFTDI_SITE = https://files.pythonhosted.org/packages/8f/b4/8578b8e4c1e69faa8297cb1e1fd0c86de03bb7eeb3e7cb63157e1e72abfb +PYTHON_PYFTDI_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-smbus2/Config.in b/package/python-smbus2/Config.in new file mode 100644 index 00000000..784cc5be --- /dev/null +++ b/package/python-smbus2/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_SMBUS2 + bool "python-smbus2" + help + smbus2 is a drop-in replacement for smbus-cffi/smbus-python in pure Python + + https://pypi.org/project/smbus2 diff --git a/package/python-smbus2/python-smbus2.mk b/package/python-smbus2/python-smbus2.mk new file mode 100644 index 00000000..373b94c2 --- /dev/null +++ b/package/python-smbus2/python-smbus2.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# python-smbus2 +# +################################################################################ + +PYTHON_SMBUS2_VERSION = 0.4.3 +PYTHON_SMBUS2_SOURCE = smbus2-$(PYTHON_SMBUS2_VERSION).tar.gz +PYTHON_SMBUS2_SITE = https://files.pythonhosted.org/packages/98/17/9663936e52a348b3ad1c85e6ca6071d2abf00a5f64f2df50bec8dcca6e16 +PYTHON_SMBUS2_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/sourcehanserif/sourcehanserif.tar.gz b/package/sourcehanserif/sourcehanserif.tar.gz index cef0a62b..62000507 100644 Binary files a/package/sourcehanserif/sourcehanserif.tar.gz and b/package/sourcehanserif/sourcehanserif.tar.gz differ diff --git a/package/sox/0001-uclibc.patch b/package/sox/0001-uclibc.patch new file mode 100644 index 00000000..5c118fa4 --- /dev/null +++ b/package/sox/0001-uclibc.patch @@ -0,0 +1,26 @@ +Make SoX support uclibc-based toolchains, from: +http://sourceforge.net/p/sox/bugs/179/ + +Signed-off-by: Gustavo Zacarias + +Index: sox-14.4.1/src/formats.c +=================================================================== +--- sox-14.4.1.orig/src/formats.c ++++ sox-14.4.1/src/formats.c +@@ -409,7 +409,7 @@ static void UNUSED rewind_pipe(FILE * fp + #if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__ + fp->_p -= PIPE_AUTO_DETECT_SIZE; + fp->_r += PIPE_AUTO_DETECT_SIZE; +-#elif defined __GLIBC__ ++#elif defined __GLIBC__ && ! defined __UCLIBC__ + fp->_IO_read_ptr = fp->_IO_read_base; + #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H + fp->_ptr = fp->_base; +@@ -417,7 +417,6 @@ static void UNUSED rewind_pipe(FILE * fp + /* To fix this #error, either simply remove the #error line and live without + * file-type detection with pipes, or add support for your compiler in the + * lines above. Test with cat monkey.wav | ./sox --info - */ +- #error FIX NEEDED HERE + #define NO_REWIND_PIPE + (void)fp; + #endif diff --git a/package/sox/0002-configure.ac-put-back-disable-stack-protector.patch b/package/sox/0002-configure.ac-put-back-disable-stack-protector.patch new file mode 100644 index 00000000..28e2871f --- /dev/null +++ b/package/sox/0002-configure.ac-put-back-disable-stack-protector.patch @@ -0,0 +1,45 @@ +From 18ace560a15207503805d4df25b90c7a756bcbf6 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 2 Feb 2021 23:53:39 +0100 +Subject: [PATCH] configure.ac: put back --disable-stack-protector + +Put back --disable-stack-protector which has been removed by commit +70c85915eace83142b84e4f65f5db421cf0c09e3. This will allow the user to +disable it or to let a higher buildsystem such as buildroot to finely +configure it. + +Indeed, without this patch, build can fail as some compilers (such as +uclibc) could missed the needed library (-lssp or -lssp_nonshared) at +linking step: + + CCLD libsox.la +/home/fabrice/br-test-pkg/br-arm-full/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/5.5.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp_nonshared +/home/fabrice/br-test-pkg/br-arm-full/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/5.5.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://sourceforge.net/p/sox/patches/122/] +--- + configure.ac | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 39306398..a1665467 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -32,7 +32,12 @@ AC_PROG_LN_S + PKG_PROG_PKG_CONFIG + PKG_INSTALLDIR + +-AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong]) ++AC_ARG_ENABLE([stack-protector], ++ AS_HELP_STRING([--disable-stack-protector], [Disable -fstack-protector-strong]), ++ [enable_stack_protector=$enableval], [enable_stack_protector=yes]) ++AS_IF([test x"$enable_stack_protector" = "xyes"], ++ [AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])]) ++ + AX_APPEND_COMPILE_FLAGS([-Wall -Wmissing-prototypes -Wstrict-prototypes]) + AX_APPEND_LINK_FLAGS([-Wl,--as-needed]) + +-- +2.29.2 + diff --git a/package/sox/0003-configure.ac-fix-static-linking-with-id3tag.patch b/package/sox/0003-configure.ac-fix-static-linking-with-id3tag.patch new file mode 100644 index 00000000..32d6f83b --- /dev/null +++ b/package/sox/0003-configure.ac-fix-static-linking-with-id3tag.patch @@ -0,0 +1,47 @@ +From 8df3a56cfb104c84d4701562ae2e3c9dc4686798 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 6 Feb 2021 11:08:45 +0100 +Subject: [PATCH] configure.ac: fix static linking with id3tag + +Put back -lz (i.e. ZLIB_LIBS) when searching for id3tag which was +wrongly removed by commit 6ff0e9322f9891f5a6ac6c9b3bceffbfca16bec3. This +will fix the following static build failure: + +configure:15290: checking for id3_file_open in -lid3tag +configure:15315: /home/buildroot/autobuild/instance-0/output-1/host/bin/arm-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -static -Wall -Wmissing-prototypes -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--as-needed conftest.c -lid3tag >&5 +conftest.c:60:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 60 | char id3_file_open (); + | ^~~~ +conftest.c:62:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 62 | main () + | ^~~~ +/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libid3tag.a(util.o): in function `id3_util_compress': +util.c:(.text+0x1ac): undefined reference to `compress2' +/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libid3tag.a(util.o): in function `id3_util_decompress': +util.c:(.text+0x240): undefined reference to `uncompress' + +Fixes: + - http://autobuild.buildroot.org/results/73efdacf237e3d567fa66f3b3f68e624f5e35bc7 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://sourceforge.net/p/sox/patches/123] +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 39306398..896714f5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,7 +83,7 @@ dnl Various libraries + SOX_WITH_LIB([magic], [magic.h], [magic], [magic_open]) + SOX_CHECK_LIB([ZLIB], [zlib.h], [z], [uncompress]) + SOX_WITH_LIB([png], [png.h], [png], [png_set_rows], [], [], [], [$ZLIB_LIBS]) +-SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open]) ++SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open], [], [], [], [$ZLIB_LIBS]) + SOX_WITH_LIB([libgsm], [gsm/gsm.h gsm.h], [gsm], [gsm_create]) + + dnl Optional formats +-- +2.29.2 + diff --git a/package/sox/0004-configure.ac-fix-static-linking-with-magic.patch b/package/sox/0004-configure.ac-fix-static-linking-with-magic.patch new file mode 100644 index 00000000..7d2e390d --- /dev/null +++ b/package/sox/0004-configure.ac-fix-static-linking-with-magic.patch @@ -0,0 +1,48 @@ +From 4630e574e6c0269b94fd910e7c72b8ad1ee62ce7 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 3 Mar 2021 16:48:57 +0100 +Subject: [PATCH] configure.ac: fix static linking with magic + +Use SOX_FMT_PKG to retrieve magic dependencies (e.g. bzip2 or zlib) +indeed -lz (i.e. ZLIB_LIBS) was wrongly removed by commit +6ff0e9322f9891f5a6ac6c9b3bceffbfca16bec3. This will fix the following +static build failure: + +configure:11677: checking for magic_open in -lmagic +configure:11702: /srv/storage/autobuild/run/instance-0/output-1/host/bin/arm-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -Wall -Wmissing-prototypes -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--as-needed conftest.c -lmagic >&5 +conftest.c:53:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 53 | char magic_open (); + | ^~~~ +conftest.c:55:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] + 55 | main () + | ^~~~ +/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /srv/storage/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmagic.a(compress.o): in function `uncompresszlib': +compress.c:(.text+0x1d0): undefined reference to `inflateInit_' +/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x1e4): undefined reference to `inflate' +/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x1fc): undefined reference to `inflateEnd' + +Fixes: + - http://autobuild.buildroot.org/results/d96f27cd96926060046e2e1115777f5bceda3741 + +Signed-off-by: Fabrice Fontaine +[Upstream status: not sent yet (waiting for feedback on third patch)] +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 896714f5..8ae3202c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -80,7 +80,7 @@ SOX_REPORT([other], [LADSPA effect plugins], [$HAVE_LADSPA]) + + dnl Various libraries + +-SOX_WITH_LIB([magic], [magic.h], [magic], [magic_open]) ++SOX_FMT_PKG([magic], [libmagic]) + SOX_CHECK_LIB([ZLIB], [zlib.h], [z], [uncompress]) + SOX_WITH_LIB([png], [png.h], [png], [png_set_rows], [], [], [], [$ZLIB_LIBS]) + SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open], [], [], [], [$ZLIB_LIBS]) +-- +2.30.1 + diff --git a/package/sox/Config.in b/package/sox/Config.in new file mode 100644 index 00000000..5325ed68 --- /dev/null +++ b/package/sox/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_SOX + bool "sox" + help + SoX is a cross-platform (Windows, Linux, MacOS X, etc.) + command line utility that can convert various formats of + computer audio files into other formats. + + It can also apply various effects to these sound files, and, + as an added bonus, SoX can play and record audio files on + most platforms. + + http://sox.sourceforge.net/ diff --git a/package/sox/sox.hash b/package/sox/sox.hash new file mode 100644 index 00000000..d2006e02 --- /dev/null +++ b/package/sox/sox.hash @@ -0,0 +1,4 @@ +# Locally computed +sha256 3d06ba8fc39ac92f16da73593be48afe0a704fe4dc4f6eca2e5137ef77cd5115 sox-7524160b29a476f7e87bc14fddf12d349f9a3c5e-br1.tar.gz +sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE.GPL +sha256 5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a LICENSE.LGPL diff --git a/package/sox/sox.mk b/package/sox/sox.mk new file mode 100644 index 00000000..dcc1a670 --- /dev/null +++ b/package/sox/sox.mk @@ -0,0 +1,140 @@ +################################################################################ +# +# sox +# +################################################################################ + +SOX_VERSION = 7524160b29a476f7e87bc14fddf12d349f9a3c5e +SOX_SITE = git://git.code.sf.net/p/sox/code +SOX_SITE_METHOD = git +SOX_DEPENDENCIES = host-autoconf-archive host-pkgconf +SOX_LICENSE = GPL-2.0+ (sox binary), LGPL-2.1+ (libraries) +SOX_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL +SOX_CPE_ID_VENDOR = sound_exchange_project +SOX_CPE_ID_PRODUCT = sound_exchange +# From git and we're patching configure.ac +SOX_AUTORECONF = YES +SOX_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive + +SOX_IGNORE_CVES += CVE-2017-11332 CVE-2017-11358 CVE-2017-11359 \ + CVE-2017-15370 CVE-2017-15371 CVE-2017-15372 CVE-2017-15642 \ + CVE-2017-18189 CVE-2019-8354 CVE-2019-8355 CVE-2019-8356 \ + CVE-2019-8357 CVE-2019-13590 + +SOX_CONF_OPTS = \ + --with-distro="Buildroot" \ + --disable-stack-protector + +ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM),y) +SOX_DEPENDENCIES += alsa-lib +SOX_CONF_OPTS += --enable-alsa +else +SOX_CONF_OPTS += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_FILE),y) +SOX_DEPENDENCIES += file +SOX_CONF_OPTS += --enable-magic +else +SOX_CONF_OPTS += --disable-magic +endif + +ifeq ($(BR2_PACKAGE_FLAC),y) +SOX_DEPENDENCIES += flac +SOX_CONF_OPTS += --enable-flac +else +SOX_CONF_OPTS += --disable-flac +endif + +ifeq ($(BR2_PACKAGE_LAME),y) +SOX_DEPENDENCIES += lame +SOX_CONF_OPTS += --with-lame +else +SOX_CONF_OPTS += --without-lame +endif + +ifeq ($(BR2_PACKAGE_LIBAO),y) +SOX_DEPENDENCIES += libao +SOX_CONF_OPTS += --enable-ao +else +SOX_CONF_OPTS += --disable-ao +endif + +ifeq ($(BR2_PACKAGE_LIBGSM),y) +SOX_DEPENDENCIES += libgsm +SOX_CONF_OPTS += --enable-gsm +else +SOX_CONF_OPTS += --disable-gsm +endif + +ifeq ($(BR2_PACKAGE_LIBID3TAG),y) +SOX_DEPENDENCIES += libid3tag +SOX_CONF_OPTS += --with-id3tag +else +SOX_CONF_OPTS += --without-id3tag +endif + +ifeq ($(BR2_PACKAGE_LIBMAD),y) +SOX_DEPENDENCIES += libmad +SOX_CONF_OPTS += --with-mad +else +SOX_CONF_OPTS += --without-mad +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +SOX_DEPENDENCIES += libpng +SOX_CONF_OPTS += --with-png +else +SOX_CONF_OPTS += --without-png +endif + +ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) +SOX_DEPENDENCIES += libsndfile +SOX_CONF_OPTS += --enable-sndfile +else +SOX_CONF_OPTS += --disable-sndfile +endif + +ifeq ($(BR2_PACKAGE_LIBVORBIS),y) +SOX_DEPENDENCIES += libvorbis +SOX_CONF_OPTS += --enable-oggvorbis +else +SOX_CONF_OPTS += --disable-oggvorbis +endif + +ifeq ($(BR2_PACKAGE_OPENCORE_AMR),y) +SOX_DEPENDENCIES += opencore-amr +SOX_CONF_OPTS += --enable-amrwb --enable-amrnb +else +SOX_CONF_OPTS += --disable-amrwb --disable-amrnb +endif + +ifeq ($(BR2_PACKAGE_OPUSFILE),y) +SOX_DEPENDENCIES += opusfile +SOX_CONF_OPTS += --enable-opus +else +SOX_CONF_OPTS += --disable-opus +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +SOX_DEPENDENCIES += pulseaudio +SOX_CONF_OPTS += --enable-pulseaudio +else +SOX_CONF_OPTS += --disable-pulseaudio +endif + +ifeq ($(BR2_PACKAGE_TWOLAME),y) +SOX_DEPENDENCIES += twolame +SOX_CONF_OPTS += --with-twolame +else +SOX_CONF_OPTS += --without-twolame +endif + +ifeq ($(BR2_PACKAGE_WAVPACK),y) +SOX_DEPENDENCIES += wavpack +SOX_CONF_OPTS += --enable-wavpack +else +SOX_CONF_OPTS += --disable-wavpack +endif + +$(eval $(autotools-package)) diff --git a/package/sp-oops-extract/0001-Make-the-Makefile-more-cross-compiler-friendly.patch b/package/sp-oops-extract/0001-Make-the-Makefile-more-cross-compiler-friendly.patch new file mode 100644 index 00000000..67153c27 --- /dev/null +++ b/package/sp-oops-extract/0001-Make-the-Makefile-more-cross-compiler-friendly.patch @@ -0,0 +1,22 @@ +Fetch from: https://github.com/Schischu/ptxdist_sh/tree/master/patches/sp-oops-extract-0.0.7 + +From: Bernhard Walle +Date: Wed, 21 Mar 2012 15:55:06 +0100 +Subject: [PATCH] Make the Makefile more cross-compiler friendly + +Signed-off-by: Bernhard Walle +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index cf5b550..e05eb1f 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -9,4 +9,4 @@ distclean: clean + $(RM) $(TARGETS) + + sp-oops-extract: oopslog.c +- gcc -Wall -s -o $@ $^ ++ $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -Wall -o $@ $^ + diff --git a/package/sp-oops-extract/0002-stdint-cleanup.patch b/package/sp-oops-extract/0002-stdint-cleanup.patch new file mode 100644 index 00000000..255fe8a8 --- /dev/null +++ b/package/sp-oops-extract/0002-stdint-cleanup.patch @@ -0,0 +1,33 @@ +consolidate use of stdint types + +Change u_int*_t to uint*_t for compatibility with a larger number of C +libraries. + +Signed-off-by: Doug Kehn + +Index: sp-oops-extract-0.0.7-1/src/oopslog.c +=================================================================== +--- sp-oops-extract-0.0.7-1.orig/src/oopslog.c ++++ sp-oops-extract-0.0.7-1/src/oopslog.c +@@ -64,8 +64,8 @@ static int try_to_check_for_bad_blocks(v + + int main(const int argc, const char *argv[]) + { +- u_int32_t *count, maxcount = 0xffffffff; +- u_int32_t *magic_ptr, magic_value = 0x5d005d00; ++ uint32_t *count, maxcount = 0xffffffff; ++ uint32_t *magic_ptr, magic_value = 0x5d005d00; + + unsigned char *charbuf; + unsigned long size; +@@ -137,8 +137,8 @@ int main(const int argc, const char *arg + errx(-1, "%s is something weird", device); + + charbuf = buf; +- count = (u_int32_t *) buf; +- magic_ptr = (u_int32_t *) (buf + sizeof(u_int32_t)); ++ count = (uint32_t *) buf; ++ magic_ptr = (uint32_t *) (buf + sizeof(uint32_t)); + + for (i = 0; i < (size / OOPS_PAGE_SIZE); i++) { + pread(fd, buf, OOPS_PAGE_SIZE, i * OOPS_PAGE_SIZE); diff --git a/package/sp-oops-extract/Config.in b/package/sp-oops-extract/Config.in new file mode 100644 index 00000000..d4e0252c --- /dev/null +++ b/package/sp-oops-extract/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SP_OOPS_EXTRACT + bool "sp-oops-extract" + help + A tool for extracting OOPS/panic logs from MTD. + + http://maemo.org/packages/view/sp-oops-extract/ diff --git a/package/sp-oops-extract/sp-oops-extract.hash b/package/sp-oops-extract/sp-oops-extract.hash new file mode 100644 index 00000000..666cce78 --- /dev/null +++ b/package/sp-oops-extract/sp-oops-extract.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 85601a569af1f4584db75fad21d3a70e377ce12d1bccad7dbe1112abd3b43d93 sp-oops-extract_0.0.7-1.tar.gz +sha256 c38aee9e3c8c4d5d594ff548a1be05453023016d6286931f6512db215ec1fd42 COPYING diff --git a/package/sp-oops-extract/sp-oops-extract.mk b/package/sp-oops-extract/sp-oops-extract.mk new file mode 100644 index 00000000..a3ff46c5 --- /dev/null +++ b/package/sp-oops-extract/sp-oops-extract.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# sp-oops-extract +# +################################################################################ + +SP_OOPS_EXTRACT_VERSION = 0.0.7-1 +SP_OOPS_EXTRACT_SITE = http://repository.maemo.org/pool/maemo5.0/free/s/sp-oops-extract +SP_OOPS_EXTRACT_SOURCE = sp-oops-extract_$(SP_OOPS_EXTRACT_VERSION).tar.gz +SP_OOPS_EXTRACT_LICENSE = GPL-2.0 +SP_OOPS_EXTRACT_LICENSE_FILES = COPYING + +define SP_OOPS_EXTRACT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define SP_OOPS_EXTRACT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install \ + DESTDIR=$(TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/spandsp/0001-configure.ac-fix-AVX-SSE-and-MMX-options.patch b/package/spandsp/0001-configure.ac-fix-AVX-SSE-and-MMX-options.patch new file mode 100644 index 00000000..50eecfbf --- /dev/null +++ b/package/spandsp/0001-configure.ac-fix-AVX-SSE-and-MMX-options.patch @@ -0,0 +1,60 @@ +From e7330bfe63efd0062fa51d50a4aaa0f1abd5ff75 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 22 Nov 2020 17:02:43 +0100 +Subject: [PATCH] configure.ac: fix AVX, SSE and MMX options + +AVX, SSE and MMX options are broken since +https://github.com/freeswitch/spandsp/commit/87a900c70df73e128a5926587047f529105f5f64 + +For example, when the user enables SSE, it will also enable MMX and the +user can't disable MMX + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/freeswitch/spandsp/pull/20] +--- + configure.ac | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 83fb3fd..ac2592e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -486,35 +486,27 @@ armv7[bl] | armv7-*) + x86_64-* | i386-* | i686-*) + if test "$enable_avx2" = "yes" ; then + AC_DEFINE([SPANDSP_USE_AVX2], [1], [Use the AVX2 instruction set (i386 and x86_64 only).]) +- enable_avx="yes" + fi + if test "$enable_avx" = "yes" ; then + AC_DEFINE([SPANDSP_USE_AVX], [1], [Use the AVX instruction set (i386 and x86_64 only).]) +- enable_sse4_2="yes" + fi + if test "$enable_sse4_2" = "yes" ; then + AC_DEFINE([SPANDSP_USE_SSE4_2], [1], [Use the SSE4.2 instruction set (i386 and x86_64 only).]) +- enable_sse4_1="yes" + fi + if test "$enable_sse4_1" = "yes" ; then + AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).]) +- enable_ssse3="yes" + fi + if test "$enable_ssse3" = "yes" ; then + AC_DEFINE([SPANDSP_USE_SSSE3], [1], [Use the SSSE3 instruction set (i386 and x86_64 only).]) +- enable_sse3="yes" + fi + if test "$enable_sse3" = "yes" ; then + AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).]) +- enable_sse2="yes" + fi + if test "$enable_sse2" = "yes" ; then + AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).]) +- enable_sse="yes" + fi + if test "$enable_sse" = "yes" ; then + AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).]) +- enable_mmx="yes" + fi + if test "$enable_mmx" = "yes" ; then + AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).]) +-- +2.29.2 + diff --git a/package/spandsp/Config.in b/package/spandsp/Config.in new file mode 100644 index 00000000..c64eee8a --- /dev/null +++ b/package/spandsp/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_SPANDSP + bool "spandsp" + select BR2_PACKAGE_TIFF + select BR2_PACKAGE_TIFF_JPEG + help + Spandsp is a library of many DSP functions for telephony. + These range from simple modules, such as DTMF detection, to + a complete software FAX machine. + + https://github.com/freeswitch/spandsp diff --git a/package/spandsp/spandsp.hash b/package/spandsp/spandsp.hash new file mode 100644 index 00000000..d38b0691 --- /dev/null +++ b/package/spandsp/spandsp.hash @@ -0,0 +1,3 @@ +# sha256 locally computed +sha256 a11beed46b488a4cac3b0c42042ad28448bcee4c0027a82d5449180bbb178836 spandsp-3.0.0-6ec23e5a7e.tar.gz +sha256 366576cb0b869cd9e95a4882878607314650488ac635e5df0692180382e9666a COPYING diff --git a/package/spandsp/spandsp.mk b/package/spandsp/spandsp.mk new file mode 100644 index 00000000..4735212f --- /dev/null +++ b/package/spandsp/spandsp.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# spandsp +# +################################################################################ + +SPANDSP_VERSION = 3.0.0-6ec23e5a7e +SPANDSP_SITE = https://files.freeswitch.org/downloads/libs +SPANDSP_LICENSE = LGPL-2.1 (library), GPL-2.0 (test suite) +SPANDSP_LICENSE_FILES = COPYING +# We're patching configure.ac +SPANDSP_AUTORECONF = YES + +SPANDSP_DEPENDENCIES = tiff host-pkgconf +SPANDSP_INSTALL_STAGING = YES +SPANDSP_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtiff-4`" + +# MMX on i686 raises a build failure +SPANDSP_CONF_OPTS = \ + --disable-builtin-tiff \ + $(if $(BR2_x86_64),--enable-mmx,--disable-mmx) \ + $(if $(BR2_X86_CPU_HAS_SSE),--enable-sse,--disable-sse) \ + $(if $(BR2_X86_CPU_HAS_SSE2),--enable-sse2,--disable-sse2) \ + $(if $(BR2_X86_CPU_HAS_SSE3),--enable-sse3,--disable-sse3) \ + $(if $(BR2_X86_CPU_HAS_SSSE3),--enable-ssse3,--disable-ssse3) \ + $(if $(BR2_X86_CPU_HAS_SSE4),--enable-sse4-1,--disable-sse4-1) \ + $(if $(BR2_X86_CPU_HAS_SSE42),--enable-sse4-2,--disable-sse4-2) + +$(eval $(autotools-package)) diff --git a/package/spawn-fcgi/Config.in b/package/spawn-fcgi/Config.in new file mode 100644 index 00000000..59791e8d --- /dev/null +++ b/package/spawn-fcgi/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_SPAWN_FCGI + bool "spawn-fcgi" + depends on BR2_USE_MMU # fork() + help + FastCGI process spawner. + Project split from lighttpd. + + http://redmine.lighttpd.net/projects/spawn-fcgi diff --git a/package/spawn-fcgi/spawn-fcgi.hash b/package/spawn-fcgi/spawn-fcgi.hash new file mode 100644 index 00000000..b5c5c742 --- /dev/null +++ b/package/spawn-fcgi/spawn-fcgi.hash @@ -0,0 +1,4 @@ +# From http://redmine.lighttpd.net/news/9 +sha256 a3cfc7c9581b6ddc31084b379c9160323fa345d357ace6cd2d3d3af3593e2873 spawn-fcgi-1.6.4.tar.bz2 +# Locally computed +sha256 5c98cad2fbaf5c5e2562bcbab401a7c557c1bb1bac9914ecc63730925052fb13 COPYING diff --git a/package/spawn-fcgi/spawn-fcgi.mk b/package/spawn-fcgi/spawn-fcgi.mk new file mode 100644 index 00000000..8caa1e2b --- /dev/null +++ b/package/spawn-fcgi/spawn-fcgi.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# spawn-fcgi +# +################################################################################ + +SPAWN_FCGI_VERSION = 1.6.4 +SPAWN_FCGI_SITE = http://www.lighttpd.net/download +SPAWN_FCGI_SOURCE = spawn-fcgi-$(SPAWN_FCGI_VERSION).tar.bz2 +SPAWN_FCGI_LICENSE = BSD-3-Clause +SPAWN_FCGI_LICENSE_FILES = COPYING +SPAWN_FCGI_CPE_ID_VENDOR = lighttpd + +$(eval $(autotools-package)) diff --git a/package/spdlog/Config.in b/package/spdlog/Config.in new file mode 100644 index 00000000..877c1b6a --- /dev/null +++ b/package/spdlog/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_SPDLOG + bool "spdlog" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR # fmt + select BR2_PACKAGE_FMT + help + Very fast, header-only/compiled, C++ logging library. + + https://github.com/gabime/spdlog + +comment "spdlog needs a toolchain w/ C++, threads, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_USE_WCHAR diff --git a/package/spdlog/spdlog.hash b/package/spdlog/spdlog.hash new file mode 100644 index 00000000..da1e0c27 --- /dev/null +++ b/package/spdlog/spdlog.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 e20e6bd8f57e866eaf25a5417f0a38a116e537f1a77ac7b5409ca2b180cec0d5 spdlog-1.8.2.tar.gz +sha256 a7241a379cb98d37788f82c2fc2e484c3ae85dae881fd3406f0637644850926f LICENSE diff --git a/package/spdlog/spdlog.mk b/package/spdlog/spdlog.mk new file mode 100644 index 00000000..caf30be6 --- /dev/null +++ b/package/spdlog/spdlog.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# spdlog +# +################################################################################ + +SPDLOG_VERSION = 1.8.2 +SPDLOG_SITE = $(call github,gabime,spdlog,v$(SPDLOG_VERSION)) +SPDLOG_LICENSE = MIT +SPDLOG_LICENSE_FILES = LICENSE +SPDLOG_INSTALL_STAGING = YES +SPDLOG_DEPENDENCIES = fmt +SPDLOG_CONF_OPTS += \ + -DSPDLOG_BUILD_TESTS=OFF \ + -DSPDLOG_BUILD_EXAMPLE=OFF \ + -DSPDLOG_BUILD_BENCH=OFF \ + -DSPDLOG_FMT_EXTERNAL=ON + +ifeq ($(BR2_STATIC_LIBS),y) +SPDLOG_CONF_OPTS += -DSPDLOG_BUILD_SHARED=OFF +else +SPDLOG_CONF_OPTS += -DSPDLOG_BUILD_SHARED=ON +endif + +$(eval $(cmake-package)) diff --git a/package/speex/0001-thumb2-support.patch b/package/speex/0001-thumb2-support.patch new file mode 100644 index 00000000..092fa132 --- /dev/null +++ b/package/speex/0001-thumb2-support.patch @@ -0,0 +1,222 @@ +Make speex Thumb2 compatible + +Patch written by Michael Hope from Linaro, available at +http://lists.xiph.org/pipermail/speex-dev/2010-November/008041.html. + +Signed-off-by: Thomas Petazzoni +[Bernd: rebased for 1.2.0] +Signed-off-by: Bernd Kuhls + +diff --git a/libspeex/filters_arm4.h b/libspeex/filters_arm4.h +index 7a74042..6ec1f75 100644 +--- a/libspeex/filters_arm4.h ++++ b/libspeex/filters_arm4.h +@@ -47,8 +47,10 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le + + "\tldr %4, [%0], #4 \n" + "\tcmp %4, %1 \n" ++ "\tit gt \n" + "\tmovgt %1, %4 \n" + "\tcmp %4, %3 \n" ++ "\tit lt \n" + "\tmovlt %3, %4 \n" + + "\tsubs %2, %2, #1 \n" +@@ -56,6 +58,7 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le + + "\trsb %3, %3, #0 \n" + "\tcmp %1, %3 \n" ++ "\tit lt \n" + "\tmovlt %1, %3 \n" + : "=r" (dead1), "=r" (max_val), "=r" (dead3), "=r" (dead4), + "=r" (dead5), "=r" (dead6) +diff --git a/libspeex/fixed_arm4.h b/libspeex/fixed_arm4.h +index b6981ca..b6218ca 100644 +--- a/libspeex/fixed_arm4.h ++++ b/libspeex/fixed_arm4.h +@@ -69,72 +69,90 @@ static inline short DIV32_16(int a, int b) + __asm__ __volatile__ ( + "\teor %5, %0, %1\n" + "\tmovs %4, %0\n" ++ "\tit mi \n" + "\trsbmi %0, %0, #0 \n" + "\tmovs %4, %1\n" ++ "\tit mi \n" + "\trsbmi %1, %1, #0 \n" + "\tmov %4, #1\n" + + "\tsubs %3, %0, %1, asl #14 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #14 \n" + + "\tsubs %3, %0, %1, asl #13 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #13 \n" + + "\tsubs %3, %0, %1, asl #12 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #12 \n" + + "\tsubs %3, %0, %1, asl #11 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #11 \n" + + "\tsubs %3, %0, %1, asl #10 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #10 \n" + + "\tsubs %3, %0, %1, asl #9 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #9 \n" + + "\tsubs %3, %0, %1, asl #8 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #8 \n" + + "\tsubs %3, %0, %1, asl #7 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #7 \n" + + "\tsubs %3, %0, %1, asl #6 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #6 \n" + + "\tsubs %3, %0, %1, asl #5 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #5 \n" + + "\tsubs %3, %0, %1, asl #4 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #4 \n" + + "\tsubs %3, %0, %1, asl #3 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #3 \n" + + "\tsubs %3, %0, %1, asl #2 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #2 \n" + + "\tsubs %3, %0, %1, asl #1 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #1 \n" + + "\tsubs %3, %0, %1 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4 \n" + + "\tmovs %5, %5, lsr #31 \n" ++ "\tit ne \n" + "\trsbne %2, %2, #0 \n" + : "=r" (dead1), "=r" (dead2), "=r" (res), + "=r" (dead3), "=r" (dead4), "=r" (dead5) +diff --git a/libspeex/fixed_arm5e.h b/libspeex/fixed_arm5e.h +index 9b4861c..bdadd02 100644 +--- a/libspeex/fixed_arm5e.h ++++ b/libspeex/fixed_arm5e.h +@@ -97,72 +97,90 @@ static inline short DIV32_16(int a, int b) + __asm__ __volatile__ ( + "\teor %5, %0, %1\n" + "\tmovs %4, %0\n" ++ "\tit mi \n" + "\trsbmi %0, %0, #0 \n" + "\tmovs %4, %1\n" ++ "\tit mi \n" + "\trsbmi %1, %1, #0 \n" + "\tmov %4, #1\n" + + "\tsubs %3, %0, %1, asl #14 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #14 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #13 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #13 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #12 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #12 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #11 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #11 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #10 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #10 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #9 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #9 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #8 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #8 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #7 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #7 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #6 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #6 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #5 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #5 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #4 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #4 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #3 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #3 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #2 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #2 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #1 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #1 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4 \n" + "\tmovpl %0, %3 \n" + + "\tmovs %5, %5, lsr #31 \n" ++ "\tit ne \n" + "\trsbne %2, %2, #0 \n" + : "=r" (dead1), "=r" (dead2), "=r" (res), + "=r" (dead3), "=r" (dead4), "=r" (dead5) diff --git a/package/speex/Config.in b/package/speex/Config.in new file mode 100644 index 00000000..c4e3df5d --- /dev/null +++ b/package/speex/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_SPEEX + bool "speex" + select BR2_PACKAGE_LIBOGG + help + Speex is an Open Source/Free Software patent-free + audio compression format designed for speech. + It can be used for Voice over IP + + http://www.speex.org/ + +if BR2_PACKAGE_SPEEX + +config BR2_PACKAGE_SPEEX_ARM4 + bool + default y + depends on BR2_ARM_CPU_ARMV4 + +config BR2_PACKAGE_SPEEX_ARM5E + bool + default y + depends on BR2_arm && !BR2_PACKAGE_SPEEX_ARM4 + +endif diff --git a/package/speex/speex.hash b/package/speex/speex.hash new file mode 100644 index 00000000..f5235d62 --- /dev/null +++ b/package/speex/speex.hash @@ -0,0 +1,6 @@ +# From https://downloads.xiph.org/releases/speex/SHA256SUMS.txt +sha256 eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094 speex-1.2.0.tar.gz +# From https://downloads.xiph.org/releases/speex/MD5SUMS +md5 8ab7bb2589110dfaf0ed7fa7757dc49c speex-1.2.0.tar.gz +# Locally computed +sha256 671bb5d8fd3c6b05a2e831d90f978ac27965c92bd8ea6d16b3df76e3440c0e9f COPYING diff --git a/package/speex/speex.mk b/package/speex/speex.mk new file mode 100644 index 00000000..522f8cc0 --- /dev/null +++ b/package/speex/speex.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# speex +# +################################################################################ + +SPEEX_VERSION = 1.2.0 +SPEEX_SITE = https://downloads.xiph.org/releases/speex +SPEEX_LICENSE = BSD-3-Clause +SPEEX_LICENSE_FILES = COPYING +SPEEX_INSTALL_STAGING = YES +SPEEX_DEPENDENCIES = host-pkgconf libogg +SPEEX_CONF_OPTS = \ + --enable-fixed-point + +ifeq ($(BR2_PACKAGE_SPEEXDSP),y) +SPEEX_DEPENDENCIES += speexdsp +endif + +ifeq ($(BR2_PACKAGE_SPEEX_ARM4),y) +SPEEX_CONF_OPTS += --enable-arm4-asm +endif + +ifeq ($(BR2_PACKAGE_SPEEX_ARM5E),y) +SPEEX_CONF_OPTS += --enable-arm5e-asm +endif + +define SPEEX_LIBTOOL_FIXUP + $(SED) 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $(@D)/libtool + $(SED) 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $(@D)/libtool +endef + +SPEEX_POST_CONFIGURE_HOOKS += SPEEX_LIBTOOL_FIXUP + +$(eval $(autotools-package)) diff --git a/package/speexdsp/Config.in b/package/speexdsp/Config.in new file mode 100644 index 00000000..2ae5b59d --- /dev/null +++ b/package/speexdsp/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SPEEXDSP + bool "speexdsp" + help + DSP library derived from speex. + + https://www.speex.org diff --git a/package/speexdsp/speexdsp.hash b/package/speexdsp/speexdsp.hash new file mode 100644 index 00000000..fd9870dc --- /dev/null +++ b/package/speexdsp/speexdsp.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 c92c7e428cb5ca11b4e6f13118ff288332f330b6fefc93cb39bf7b43b13cb1f7 speexdsp-SpeexDSP-1.2.0-br1.tar.gz +sha256 671bb5d8fd3c6b05a2e831d90f978ac27965c92bd8ea6d16b3df76e3440c0e9f COPYING diff --git a/package/speexdsp/speexdsp.mk b/package/speexdsp/speexdsp.mk new file mode 100644 index 00000000..35c06dd8 --- /dev/null +++ b/package/speexdsp/speexdsp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# speexdsp +# +################################################################################ + +SPEEXDSP_VERSION = SpeexDSP-1.2.0 +SPEEXDSP_SITE = https://gitlab.xiph.org/xiph/speexdsp.git +SPEEXDSP_SITE_METHOD = git +SPEEXDSP_LICENSE = BSD-3-Clause +SPEEXDSP_LICENSE_FILES = COPYING +SPEEXDSP_INSTALL_STAGING = YES +SPEEXDSP_DEPENDENCIES = host-pkgconf +SPEEXDSP_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/sphinxbase/Config.in b/package/sphinxbase/Config.in new file mode 100644 index 00000000..00a19f61 --- /dev/null +++ b/package/sphinxbase/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_SPHINXBASE + bool "sphinxbase" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + CMUSphinx toolkit is a leading speech recognition toolkit + with various tools used to build speech applications. CMU + Sphinx toolkit has a number of packages for different tasks + and applications. + + http://cmusphinx.sourceforge.net/ + +comment "sphinxbase needs a toolchain with threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sphinxbase/sphinxbase.hash b/package/sphinxbase/sphinxbase.hash new file mode 100644 index 00000000..433fba68 --- /dev/null +++ b/package/sphinxbase/sphinxbase.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 06971dbe272d2f73bde0ef7b3538c0c8f8ea885cb171fd6b17a5975bced66e64 sphinxbase-5prealpha.tar.gz +sha256 26f12e0152a5d58c69904e439761a1b2fbb9267b5f04674dbf93667e3e6dd043 src/libsphinxbase/util/bio.c diff --git a/package/sphinxbase/sphinxbase.mk b/package/sphinxbase/sphinxbase.mk new file mode 100644 index 00000000..86f9089b --- /dev/null +++ b/package/sphinxbase/sphinxbase.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# sphinxbase +# +################################################################################ + +SPHINXBASE_VERSION = 5prealpha +SPHINXBASE_SITE = http://downloads.sourceforge.net/project/cmusphinx/sphinxbase/5prealpha +SPHINXBASE_LICENSE = BSD-2-Clause +# Note http://sourceforge.net/p/cmusphinx/bugs/441/ "LICENSE file missing in" +# 5prealpha tarballs". The license is contained in the copyright notice at the +# top of each source file. For example: +SPHINXBASE_LICENSE_FILES = src/libsphinxbase/util/bio.c + +SPHINXBASE_DEPENDENCIES = host-bison + +SPHINXBASE_CONF_OPTS = --without-python --without-lapack + +$(eval $(autotools-package)) diff --git a/package/spi-tools/Config.in b/package/spi-tools/Config.in new file mode 100644 index 00000000..8d263444 --- /dev/null +++ b/package/spi-tools/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SPI_TOOLS + bool "spi-tools" + help + This package contains some simple command line tools to help + using Linux spidev devices. + + https://github.com/cpb-/spi-tools diff --git a/package/spi-tools/spi-tools.hash b/package/spi-tools/spi-tools.hash new file mode 100644 index 00000000..771f86e4 --- /dev/null +++ b/package/spi-tools/spi-tools.hash @@ -0,0 +1,3 @@ +# locally computed hash +sha256 319ad6ab296111109ea4a820e216cef392429295de7e10e76f7146677337cf09 spi-tools-0.8.6.tar.gz +sha256 a01259a1b522cf0de95824f9860613b453153eebac468e96196d5d7dba84786c LICENSE diff --git a/package/spi-tools/spi-tools.mk b/package/spi-tools/spi-tools.mk new file mode 100644 index 00000000..b2dd4db3 --- /dev/null +++ b/package/spi-tools/spi-tools.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# spi-tools +# +################################################################################ + +SPI_TOOLS_VERSION = 0.8.6 +SPI_TOOLS_SITE = $(call github,cpb-,spi-tools,$(SPI_TOOLS_VERSION)) +# autoreconf must be run as specified in package documentation +SPI_TOOLS_AUTORECONF = YES +SPI_TOOLS_LICENSE = GPL-2.0 +SPI_TOOLS_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) diff --git a/package/spice-protocol/Config.in b/package/spice-protocol/Config.in new file mode 100644 index 00000000..63b08aa0 --- /dev/null +++ b/package/spice-protocol/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_SPICE_PROTOCOL + bool "spice protocol" + help + The Spice project aims to provide a complete open source + solution for interaction with virtualized desktop devices. + The Spice project deals with both the virtualized devices + and the front-end. Interaction between front-end and + back-end is done using VD-Interfaces. + + This package implements the protocol-part of Spice. + + http://www.spice-space.org/ diff --git a/package/spice-protocol/spice-protocol.hash b/package/spice-protocol/spice-protocol.hash new file mode 100644 index 00000000..f02cf7f0 --- /dev/null +++ b/package/spice-protocol/spice-protocol.hash @@ -0,0 +1,5 @@ +# From https://www.spice-space.org/download/releases/spice-protocol-0.14.3.tar.xz.sha256sum +sha256 f986e5bc2a1598532c4897f889afb0df9257ac21c160c083703ae7c8de99487a spice-protocol-0.14.3.tar.xz + +# Hash for license file +sha256 eb55ea746be694c449224c7ddce6340648b075fd377281712a19094e7fb7ef92 COPYING diff --git a/package/spice-protocol/spice-protocol.mk b/package/spice-protocol/spice-protocol.mk new file mode 100644 index 00000000..172d4568 --- /dev/null +++ b/package/spice-protocol/spice-protocol.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# spice-protocol +# +################################################################################ + +SPICE_PROTOCOL_VERSION = 0.14.3 +SPICE_PROTOCOL_SOURCE = spice-protocol-$(SPICE_PROTOCOL_VERSION).tar.xz +SPICE_PROTOCOL_SITE = http://www.spice-space.org/download/releases +SPICE_PROTOCOL_LICENSE = BSD-3-Clause +SPICE_PROTOCOL_LICENSE_FILES = COPYING +SPICE_PROTOCOL_INSTALL_STAGING = YES + +$(eval $(meson-package)) diff --git a/package/spice/Config.in b/package/spice/Config.in new file mode 100644 index 00000000..2241b55b --- /dev/null +++ b/package/spice/Config.in @@ -0,0 +1,24 @@ +comment "spice server needs a toolchain w/ wchar, threads" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_SPICE + bool "spice server" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_SPICE_PROTOCOL + help + The Spice project aims to provide a complete open source + solution for interaction with virtualized desktop devices. + The Spice project deals with both the virtualized devices + and the front-end. Interaction between front-end and + back-end is done using VD-Interfaces. + + This package implements the server-part of Spice. + + http://www.spice-space.org/ diff --git a/package/spice/spice.hash b/package/spice/spice.hash new file mode 100644 index 00000000..b228f213 --- /dev/null +++ b/package/spice/spice.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 b320cf8f4bd2852750acb703c15b72856027e5a8554f8217dfbb3cc09deba0f5 spice-0.15.0.tar.bz2 +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING diff --git a/package/spice/spice.mk b/package/spice/spice.mk new file mode 100644 index 00000000..5f7bcd9d --- /dev/null +++ b/package/spice/spice.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# spice +# +################################################################################ + +SPICE_VERSION = 0.15.0 +SPICE_SOURCE = spice-$(SPICE_VERSION).tar.bz2 +SPICE_SITE = http://www.spice-space.org/download/releases/spice-server +SPICE_LICENSE = LGPL-2.1+ +SPICE_LICENSE_FILES = COPYING +SPICE_CPE_ID_VENDOR = spice_project +SPICE_INSTALL_STAGING = YES +SPICE_DEPENDENCIES = \ + host-pkgconf \ + jpeg \ + libglib2 \ + openssl \ + pixman \ + spice-protocol + +# We disable everything for now, because the dependency tree can become +# quite deep if we try to enable some features, and I have not tested that. +SPICE_CONF_OPTS = \ + --disable-gstreamer \ + --disable-opengl \ + --disable-smartcard \ + --without-sasl \ + --disable-manual \ + --disable-tests + +SPICE_DEPENDENCIES += host-pkgconf + +ifeq ($(BR2_PACKAGE_LZ4),y) +SPICE_CONF_OPTS += --enable-lz4 +SPICE_DEPENDENCIES += lz4 +else +SPICE_CONF_OPTS += --disable-lz4 +endif + +ifeq ($(BR2_PACKAGE_OPUS),y) +SPICE_CONF_OPTS += --enable-opus +SPICE_DEPENDENCIES += opus +else +SPICE_CONF_OPTS += --disable-opus +endif + +# We need to tweak spice.pc because it /forgets/ (for static linking) that +# it should link against libz and libjpeg. libz is pkg-config-aware, while +# libjpeg isn't, hence the two-line tweak +define SPICE_POST_INSTALL_STAGING_FIX_PC + $(SED) 's/^\(Requires.private:.*\)$$/\1 zlib/; s/^\(Libs.private:.*\)$$/\1 -ljpeg/;' \ + "$(STAGING_DIR)/usr/lib/pkgconfig/spice-server.pc" +endef +SPICE_POST_INSTALL_STAGING_HOOKS += SPICE_POST_INSTALL_STAGING_FIX_PC + +# It is currently not possible to detect if stack-protection is available +# or not, because it requires support from both the compiler *and* the +# C library, but the C library (eg. uClibc) can be compiled without that +# support, even if gcc accepts the -fstack-protector-all option. +# spice's ./configure only checks for gcc's -fstack-protector-all option, +# so it misses the case where the C library doe not provide the requires +# support. +# A correct fix would be to fix spice's ./configure to also check the C +# library, but it might be much more involved. +# So, we simply disable it for now. After all, as uClibc's help puts it: +# Note that NOEXECSTACK on a kernel with address space randomization +# is generally sufficient to prevent most buffer overflow exploits +# without increasing code size. +SPICE_CONF_OPTS += gl_cv_warn__fstack_protector_all=no + +$(eval $(autotools-package)) diff --git a/package/spidermonkey/0001-allow-newer-autoconf-versions.patch b/package/spidermonkey/0001-allow-newer-autoconf-versions.patch new file mode 100644 index 00000000..61becb68 --- /dev/null +++ b/package/spidermonkey/0001-allow-newer-autoconf-versions.patch @@ -0,0 +1,61 @@ +From 646a78262b18e19721cd41ee515215221dd241b6 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Thu, 12 Jul 2018 18:12:42 +0800 +Subject: [PATCH] allow newer autoconf versions + +Spidermonkey is hardcoded to use Autoconf 2.13, which is from 1999! +The reasoning behind using 2.13 is because newer versions of Autoconf at the +time did not work correctly with the custom m4 macros in the source code. +However: Because we are building just the spidermonkey engine instead of the +entire firefox package, and we are using a tarball with a pre-setup +old-configure file, there is no need for the old version of autoconf. + +See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642 + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Hongxu Jia +Signed-off-by: Adam Duskett +--- + build/moz.configure/old.configure | 4 ++-- + js/src/old-configure | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure +index 17d0c5bf..436fcc5e 100644 +--- a/build/moz.configure/old.configure ++++ b/build/moz.configure/old.configure +@@ -33,7 +33,7 @@ def autoconf(mozconfig, autoconf): + autoconf = autoconf[0] if autoconf else None + + for ac in (mozconfig_autoconf, autoconf, 'autoconf-2.13', 'autoconf2.13', +- 'autoconf213'): ++ 'autoconf213', 'autoconf'): + if ac: + autoconf = find_program(ac) + if autoconf: +@@ -87,7 +87,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell, + old_configure = os.path.join(old_configure_dir, 'js', 'src', + os.path.basename(old_configure)) + +- refresh = True ++ refresh = False + if exists(old_configure): + mtime = getmtime(old_configure) + aclocal = os.path.join(build_env.topsrcdir, 'build', 'autoconf', +diff --git a/js/src/old-configure b/js/src/old-configure +index 58cc646f..ebd2646e 100644 +--- a/js/src/old-configure ++++ b/js/src/old-configure +@@ -587,7 +587,7 @@ if test -z "$srcdir"; then + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. +- srcdir=$ac_confdir ++ srcdir="$ac_confdir/../../" + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +-- +2.23.0 + diff --git a/package/spidermonkey/0002-allow-building-in-tree.patch b/package/spidermonkey/0002-allow-building-in-tree.patch new file mode 100644 index 00000000..533747cb --- /dev/null +++ b/package/spidermonkey/0002-allow-building-in-tree.patch @@ -0,0 +1,47 @@ +From 07d40f72e1ed1d84a5ddd98ae8490d41a2e19c46 Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven +Date: Wed, 5 Sep 2018 11:39:01 +0000 +Subject: [PATCH] allow building in tree + +By default, spidermonkey must be configured and built out-of-tree, +otherwise the following error occurs: + +FATAL ERROR PROCESSING MOZBUILD FILE +============================== + +The error occurred while processing the following file or one of the files it +includes: + js/src/shell/moz.build + +The error occurred when validating the result of the execution. The reported +error is: + Path specified in LOCAL_INCLUDES is not allowed: + .. (resolved to js/src) + +Remove this check, as spidermonkey builds without issue in-tree. + +Signed-off-by: Arjan van de Ven +Signed-off-by: Adam Duskett +--- + python/mozbuild/mozbuild/frontend/emitter.py | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py +index 642b381c..c37fbf5d 100644 +--- a/python/mozbuild/mozbuild/frontend/emitter.py ++++ b/python/mozbuild/mozbuild/frontend/emitter.py +@@ -1127,11 +1127,6 @@ class TreeMetadataEmitter(LoggingMixin): + raise SandboxValidationError('Path specified in LOCAL_INCLUDES ' + 'does not exist: %s (resolved to %s)' % (local_include, + full_path), context) +- if (full_path == context.config.topsrcdir or +- full_path == context.config.topobjdir): +- raise SandboxValidationError('Path specified in LOCAL_INCLUDES ' +- 'is not allowed: %s (resolved to %s)' % (local_include, +- full_path), context) + include_obj = LocalInclude(context, local_include) + local_includes.append(include_obj.path.full_path) + yield include_obj +-- +2.23.0 + diff --git a/package/spidermonkey/0003-allow-unknown-configuration-options.patch b/package/spidermonkey/0003-allow-unknown-configuration-options.patch new file mode 100644 index 00000000..b489075a --- /dev/null +++ b/package/spidermonkey/0003-allow-unknown-configuration-options.patch @@ -0,0 +1,35 @@ +From 4a06a1a6a71293decb83aee7adb74bc709493106 Mon Sep 17 00:00:00 2001 +From: Philip Chimento +Date: Wed, 5 Jul 2017 22:57:09 -0700 +Subject: [PATCH] allow unknown configuration options + +By default, if an unknown parameter is passed to configure, an error is raised. +Replace the raise with a pass and continue. + +Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1379540 + +Signed-off-by: Philip Chimento +Signed-off-by: Adam Duskett +--- + js/src/configure | 9 +++++++++ + python/mozbuild/mozbuild/configure/__init__.py | 2 +- + python/mozbuild/mozbuild/configure/options.py | 6 +++++- + 3 files changed, 15 insertions(+), 2 deletions(-) + create mode 100755 js/src/configure + +diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py +index 0fe640ca..09b460d3 100644 +--- a/python/mozbuild/mozbuild/configure/__init__.py ++++ b/python/mozbuild/mozbuild/configure/__init__.py +@@ -421,7 +421,7 @@ def run(self, path=None): + # All options should have been removed (handled) by now. + for arg in self._helper: + without_value = arg.split('=', 1)[0] +- raise InvalidOptionError('Unknown option: %s' % without_value) ++ pass + + # Run the execution queue + for func, args in self._execution_queue: +-- +2.23.0 + diff --git a/package/spidermonkey/0004-fix-building-with-musl.patch b/package/spidermonkey/0004-fix-building-with-musl.patch new file mode 100644 index 00000000..8d8b10fb --- /dev/null +++ b/package/spidermonkey/0004-fix-building-with-musl.patch @@ -0,0 +1,133 @@ +From 0c9e8f586ba52a9aef5ed298e8315b2598b8fb72 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 25 May 2019 16:54:45 -0700 +Subject: [PATCH] fix building with musl + +The MIPS specific header is not provided by musl +linux kernel headers provide which has same definitions + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +Signed-off-by: Adam Duskett +--- +--- + js/src/jsmath.cpp | 2 +- + memory/build/Mutex.h | 4 ++-- + mozglue/misc/TimeStamp_darwin.cpp | 1 - + mozglue/misc/TimeStamp_posix.cpp | 1 - + nsprpub/pr/src/misc/prsystem.c | 1 - + third_party/python/psutil/psutil/_psutil_bsd.c | 1 - + third_party/python/psutil/psutil/_psutil_osx.c | 1 - + third_party/python/psutil/psutil/arch/osx/process_info.c | 1 - + 8 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/js/src/jsmath.cpp b/js/src/jsmath.cpp +index a28968be..8facaa81 100644 +--- a/js/src/jsmath.cpp ++++ b/js/src/jsmath.cpp +@@ -71,7 +71,7 @@ + #elif defined(__s390__) + #define GETRANDOM_NR 349 + #elif defined(__mips__) +-#include ++#include + #if _MIPS_SIM == _MIPS_SIM_ABI32 + #define GETRANDOM_NR 4353 + #elif _MIPS_SIM == _MIPS_SIM_ABI64 +diff --git a/memory/build/Mutex.h b/memory/build/Mutex.h +index cb8b1e7d..7b9eb1de 100644 +--- a/memory/build/Mutex.h ++++ b/memory/build/Mutex.h +@@ -42,7 +42,7 @@ struct Mutex { + if (pthread_mutexattr_init(&attr) != 0) { + return false; + } +- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); ++ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED); + if (pthread_mutex_init(&mMutex, &attr) != 0) { + pthread_mutexattr_destroy(&attr); + return false; +@@ -102,7 +102,7 @@ typedef Mutex StaticMutex; + + #if defined(XP_DARWIN) + #define STATIC_MUTEX_INIT OS_SPINLOCK_INIT +-#elif defined(XP_LINUX) && !defined(ANDROID) ++#elif defined(XP_LINUX) && !defined(ANDROID) && defined(__GLIBC__) + #define STATIC_MUTEX_INIT PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP + #else + #define STATIC_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER +diff --git a/mozglue/misc/TimeStamp_darwin.cpp b/mozglue/misc/TimeStamp_darwin.cpp +index d2abe9a5..d065649c 100644 +--- a/mozglue/misc/TimeStamp_darwin.cpp ++++ b/mozglue/misc/TimeStamp_darwin.cpp +@@ -19,7 +19,6 @@ + + #include + #include +-#include + #include + #include + +diff --git a/mozglue/misc/TimeStamp_posix.cpp b/mozglue/misc/TimeStamp_posix.cpp +index 86c7609a..a37bd93a 100644 +--- a/mozglue/misc/TimeStamp_posix.cpp ++++ b/mozglue/misc/TimeStamp_posix.cpp +@@ -21,7 +21,6 @@ + #if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \ + defined(__OpenBSD__) + #include +-#include + #endif + + #if defined(__DragonFly__) || defined(__FreeBSD__) +diff --git a/nsprpub/pr/src/misc/prsystem.c b/nsprpub/pr/src/misc/prsystem.c +index eba85fb0..54b57bb9 100644 +--- a/nsprpub/pr/src/misc/prsystem.c ++++ b/nsprpub/pr/src/misc/prsystem.c +@@ -27,7 +27,6 @@ + || defined(OPENBSD) || defined(DRAGONFLY) || defined(DARWIN) + #define _PR_HAVE_SYSCTL + #include +-#include + #endif + + #if defined(DARWIN) +diff --git a/third_party/python/psutil/psutil/_psutil_bsd.c b/third_party/python/psutil/psutil/_psutil_bsd.c +index 9a2ed04b..9e0d34cb 100644 +--- a/third_party/python/psutil/psutil/_psutil_bsd.c ++++ b/third_party/python/psutil/psutil/_psutil_bsd.c +@@ -29,7 +29,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/third_party/python/psutil/psutil/_psutil_osx.c b/third_party/python/psutil/psutil/_psutil_osx.c +index 55dd64ca..ec356339 100644 +--- a/third_party/python/psutil/psutil/_psutil_osx.c ++++ b/third_party/python/psutil/psutil/_psutil_osx.c +@@ -13,7 +13,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/third_party/python/psutil/psutil/arch/osx/process_info.c b/third_party/python/psutil/psutil/arch/osx/process_info.c +index 40c79a2c..8de0dcbd 100644 +--- a/third_party/python/psutil/psutil/arch/osx/process_info.c ++++ b/third_party/python/psutil/psutil/arch/osx/process_info.c +@@ -16,7 +16,6 @@ + #include + #include + #include +-#include + #include + + #include "process_info.h" +-- +2.23.0 diff --git a/package/spidermonkey/0005-add-riscv-support.patch b/package/spidermonkey/0005-add-riscv-support.patch new file mode 100644 index 00000000..6b7ea326 --- /dev/null +++ b/package/spidermonkey/0005-add-riscv-support.patch @@ -0,0 +1,121 @@ +From 64ad80e6d95871f17be4cd01da15581f41ac0b2b Mon Sep 17 00:00:00 2001 +From: Stefan O'Rear +Date: Fri, 11 Nov 2016 21:10:34 -0700 +Subject: [PATCH] Add RISC-V support + +These changes allow spidermonkey to cross-compile for riscv64 and riscv32. + +Upstream-status: Submitted +See: https://bugzilla.mozilla.org/show_bug.cgi?id=1318905 + +Signed-off-by: Stefan O'Rear +Signed-off-by: Ricardo Salveti +Signed-off-by: Adam Duskett +--- + build/autoconf/config.guess | 3 +++ + build/moz.configure/init.configure | 3 +++ + js/src/jit/AtomicOperations.h | 2 ++ + js/src/jit/none/AtomicOperations-feeling-lucky.h | 8 ++++++++ + mfbt/tests/TestPoisonArea.cpp | 3 +++ + python/mozbuild/mozbuild/configure/constants.py | 4 ++++ + 6 files changed, 23 insertions(+) + +diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess +index d5d667d4..1277a862 100755 +--- a/build/autoconf/config.guess ++++ b/build/autoconf/config.guess +@@ -1029,6 +1029,9 @@ EOF + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; ++ riscv32:Linux:*:* | riscv64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; +diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure +index 83b8d705..ef33db50 100644 +--- a/build/moz.configure/init.configure ++++ b/build/moz.configure/init.configure +@@ -676,6 +676,9 @@ def split_triplet(triplet, allow_unknown=False): + elif cpu == 'sh4': + canonical_cpu = 'sh4' + endianness = 'little' ++ elif cpu in ('riscv32', 'riscv64'): ++ canonical_cpu = cpu ++ endianness = 'little' + elif allow_unknown: + canonical_cpu = cpu + endianness = 'unknown' +diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h +index 3501e65b..fda0b148 100644 +--- a/js/src/jit/AtomicOperations.h ++++ b/js/src/jit/AtomicOperations.h +@@ -393,6 +393,8 @@ inline bool AtomicOperations::isLockfreeJS(int32_t size) { + #include "jit/none/AtomicOperations-feeling-lucky.h" + #elif defined(__s390__) || defined(__s390x__) + #include "jit/none/AtomicOperations-feeling-lucky.h" ++#elif defined(__riscv) ++#include "jit/none/AtomicOperations-feeling-lucky.h" + #else + #error "No AtomicOperations support provided for this platform" + #endif +diff --git a/js/src/jit/none/AtomicOperations-feeling-lucky.h b/js/src/jit/none/AtomicOperations-feeling-lucky.h +index c0b43699..42b1f3e0 100644 +--- a/js/src/jit/none/AtomicOperations-feeling-lucky.h ++++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h +@@ -80,6 +80,14 @@ + #define GNUC_COMPATIBLE + #endif + ++#ifdef __riscv ++#define GNUC_COMPATIBLE ++#ifdef __riscv_xlen == 64 ++#define HAS_64BIT_ATOMICS ++#define HAS_64BIT_LOCKFREE ++#endif ++#endif ++ + // The default implementation tactic for gcc/clang is to use the newer + // __atomic intrinsics added for use in C++11 . Where that + // isn't available, we use GCC's older __sync functions instead. +diff --git a/mfbt/tests/TestPoisonArea.cpp b/mfbt/tests/TestPoisonArea.cpp +index 06c24ed0..fba9263c 100644 +--- a/mfbt/tests/TestPoisonArea.cpp ++++ b/mfbt/tests/TestPoisonArea.cpp +@@ -168,6 +168,9 @@ static const ia64_instr _return_instr = + #define RETURN_INSTR _return_instr + #define RETURN_INSTR_TYPE ia64_instr + ++#elif defined __riscv ++#define RETURN_INSTR 0x80828082 /* ret; ret */ ++ + #else + #error "Need return instruction for this architecture" + #endif +diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py +index 33ae5a45..1067b6a4 100644 +--- a/python/mozbuild/mozbuild/configure/constants.py ++++ b/python/mozbuild/mozbuild/configure/constants.py +@@ -50,6 +50,8 @@ CPU_bitness = { + 'mips64': 64, + 'ppc': 32, + 'ppc64': 64, ++ 'riscv32': 32, ++ 'riscv64': 64, + 's390': 32, + 's390x': 64, + 'sh4': 32, +@@ -82,6 +84,8 @@ CPU_preprocessor_checks = OrderedDict(( + ('s390', '__s390__'), + ('ppc64', '__powerpc64__'), + ('ppc', '__powerpc__'), ++ ('riscv32', '__riscv && __SIZEOF_POINTER__ == 4'), ++ ('riscv64', '__riscv && __SIZEOF_POINTER__ == 8'), + ('Alpha', '__alpha__'), + ('hppa', '__hppa__'), + ('sparc64', '__sparc__ && __arch64__'), +-- +2.23.0 + diff --git a/package/spidermonkey/0006-copy-headers-on-install-instead-of-symlinking.patch b/package/spidermonkey/0006-copy-headers-on-install-instead-of-symlinking.patch new file mode 100644 index 00000000..10ca54c7 --- /dev/null +++ b/package/spidermonkey/0006-copy-headers-on-install-instead-of-symlinking.patch @@ -0,0 +1,34 @@ +From 903a79a1efff18fc7cc50db09a3fe5d768adc9a8 Mon 19 Mar 2018 09:58:06 +0100 +From: Rico Tzschichholz +Date: Wed, 5 Jul 2017 22:45:59 -0700 +Subject: build: Copy headers on install instead of symlinking + +Patch ported from mozjs52 by Philip Chimento + +Signed-off-by: Rico Tzschichholz +Signed-off-by: Adam Duskett +--- + python/mozbuild/mozbuild/backend/recursivemake.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py +index dd9020d..6918ef8 100644 +--- a/python/mozbuild/mozbuild/backend/recursivemake.py ++++ b/python/mozbuild/mozbuild/backend/recursivemake.py +@@ -1427,11 +1427,11 @@ class RecursiveMakeBackend(CommonBackend): + raise Exception("Wildcards are only supported in the filename part of " + "srcdir-relative or absolute paths.") + +- install_manifest.add_pattern_link(basepath, wild, path) ++ install_manifest.add_pattern_copy(basepath, wild, path) + else: +- install_manifest.add_pattern_link(f.srcdir, f, path) ++ install_manifest.add_pattern_copy(f.srcdir, f, path) + else: +- install_manifest.add_link(f.full_path, dest) ++ install_manifest.add_copy(f.full_path, dest) + else: + install_manifest.add_optional_exists(dest) + backend_file.write('%s_FILES += %s\n' % ( +-- +2.23.0 diff --git a/package/spidermonkey/0007-ensure-proper-running-on-64-bit-and-32-bit-be-platforms.patch b/package/spidermonkey/0007-ensure-proper-running-on-64-bit-and-32-bit-be-platforms.patch new file mode 100644 index 00000000..9ffd6938 --- /dev/null +++ b/package/spidermonkey/0007-ensure-proper-running-on-64-bit-and-32-bit-be-platforms.patch @@ -0,0 +1,144 @@ +From f66d410f3ba767efb91c6b9545d373267cd975f2 Mon Sep 17 00:00:00 2001 +From: Philip Chimento +Date: Sat, 7 Sep 2019 20:43:40 +0200 +Subject: [PATCH] ensure proper running on 64-bit and 32-bit BE platforms + +See: https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/jsproperty-endian.patch + +Signed-off-by: Philip Chimento +Signed-off-by: Adam Duskett +--- + js/src/gc/Marking-inl.h | 16 ++++++++++++++++ + js/src/gc/RelocationOverlay.h | 13 ++++++++++++- + js/src/jsfriendapi.h | 8 ++++++++ + js/src/vm/StringType.h | 13 +++++++++++++ + 4 files changed, 49 insertions(+), 1 deletion(-) + +diff --git a/js/src/gc/Marking-inl.h b/js/src/gc/Marking-inl.h +index 6d2a4c7..c773c21 100644 +--- a/js/src/gc/Marking-inl.h ++++ b/js/src/gc/Marking-inl.h +@@ -82,12 +82,28 @@ inline void RelocationOverlay::forwardTo(Cell* cell) { + MOZ_ASSERT(!isForwarded()); + // The location of magic_ is important because it must never be valid to see + // the value Relocated there in a GC thing that has not been moved. ++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32 ++ // On 32-bit, the magic_ aliases with whatever comes after the first ++ // pointer; on little-endian 64-bit, the magic_ aliases with the ++ // 32 most significant bits of the pointer, which are the second half. + static_assert(offsetof(RelocationOverlay, magic_) == + offsetof(JSObject, group_) + sizeof(uint32_t), + "RelocationOverlay::magic_ is in the wrong location"); + static_assert(offsetof(RelocationOverlay, magic_) == + offsetof(js::Shape, base_) + sizeof(uint32_t), + "RelocationOverlay::magic_ is in the wrong location"); ++#elif JS_BITS_PER_WORD == 64 ++ // On big-endian 64-bit, the magic_ aliases with the 32 most ++ // significant bits of the pointer, but now that's the first half. ++ static_assert(offsetof(RelocationOverlay, magic_) == ++ offsetof(JSObject, group_), ++ "RelocationOverlay::magic_ is in the wrong location"); ++ static_assert(offsetof(RelocationOverlay, magic_) == ++ offsetof(js::Shape, base_), ++ "RelocationOverlay::magic_ is in the wrong location"); ++#else ++# error "Unknown endianness or word size" ++#endif + static_assert( + offsetof(RelocationOverlay, magic_) == offsetof(JSString, d.u1.length), + "RelocationOverlay::magic_ is in the wrong location"); +diff --git a/js/src/gc/RelocationOverlay.h b/js/src/gc/RelocationOverlay.h +index a568843..399a541 100644 +--- a/js/src/gc/RelocationOverlay.h ++++ b/js/src/gc/RelocationOverlay.h +@@ -33,14 +33,25 @@ class RelocationOverlay { + /* See comment in js/public/HeapAPI.h. */ + static const uint32_t Relocated = js::gc::Relocated; + ++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32 + /* +- * Keep the low 32 bits untouched. Use them to distinguish strings from ++ * Keep the first 32 bits untouched. Use them to distinguish strings from + * objects in the nursery. + */ + uint32_t preserve_; + + /* Set to Relocated when moved. */ + uint32_t magic_; ++#elif JS_BITS_PER_WORD == 64 ++ /* ++ * On big-endian, we need to reorder to keep preserve_ lined up with the ++ * low 32 bits of the aligned group_ pointer in JSObject. ++ */ ++ uint32_t magic_; ++ uint32_t preserve_; ++#else ++# error "Unknown endianness or word size" ++#endif + + /* The location |this| was moved to. */ + Cell* newLocation_; +diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h +index 4b8d18a..70ce0a1 100644 +--- a/js/src/jsfriendapi.h ++++ b/js/src/jsfriendapi.h +@@ -9,6 +9,7 @@ + + #include "mozilla/Atomics.h" + #include "mozilla/Casting.h" ++#include "mozilla/EndianUtils.h" + #include "mozilla/Maybe.h" + #include "mozilla/MemoryReporting.h" + #include "mozilla/UniquePtr.h" +@@ -609,8 +610,15 @@ struct String { + static const uint32_t LATIN1_CHARS_BIT = JS_BIT(6); + static const uint32_t EXTERNAL_FLAGS = LINEAR_BIT | NON_ATOM_BIT | JS_BIT(5); + static const uint32_t TYPE_FLAGS_MASK = JS_BIT(6) - 1; ++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32 + uint32_t flags; + uint32_t length; ++#elif JS_BITS_PER_WORD == 64 ++ uint32_t length; ++ uint32_t flags; ++#else ++# error "Unknown endianness or word size" ++#endif + union { + const JS::Latin1Char* nonInlineCharsLatin1; + const char16_t* nonInlineCharsTwoByte; +diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h +index cde3427..c3400db 100644 +--- a/js/src/vm/StringType.h ++++ b/js/src/vm/StringType.h +@@ -7,6 +7,7 @@ + #ifndef vm_StringType_h + #define vm_StringType_h + ++#include "mozilla/EndianUtils.h" + #include "mozilla/MemoryReporting.h" + #include "mozilla/PodOperations.h" + #include "mozilla/Range.h" +@@ -168,8 +169,20 @@ class JSString : public js::gc::Cell { + struct Data { + union { + struct { ++#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32 + uint32_t flags; /* JSString */ + uint32_t length; /* JSString */ ++#elif JS_BITS_PER_WORD == 64 ++ /* ++ * On big-endian, we need to reorder to keep flags lined up ++ * with the low 32 bits of the aligned group_ pointer in ++ * JSObject. ++ */ ++ uint32_t length; /* JSString */ ++ uint32_t flags; /* JSString */ ++#else ++# error "Unknown endianness or word size" ++#endif + }; + uintptr_t flattenData; /* JSRope (temporary while flattening) */ + } u1; +-- +2.23.0 + diff --git a/package/spidermonkey/0008-save-and-restore-non-volatile-x28-on-ARM64-for-generated-unboxed-obje.patch b/package/spidermonkey/0008-save-and-restore-non-volatile-x28-on-ARM64-for-generated-unboxed-obje.patch new file mode 100644 index 00000000..9fd4340f --- /dev/null +++ b/package/spidermonkey/0008-save-and-restore-non-volatile-x28-on-ARM64-for-generated-unboxed-obje.patch @@ -0,0 +1,66 @@ +From 903a79a1efff18fc7cc50db09a3fe5d768adc9a8 Mon 19 Mar 2018 09:58:06 +0100 +From: Lars T Hansen +Date: Fri, 23 Mar 2018 22:01:33 +0000 +Subject: [PATCH] save and restore non-volatile x28 on ARM64 for generated unboxed object constructor + +Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1375074 + +Upsream-status: Applied +See: https://hg.mozilla.org/mozilla-central/rev/800abe66894d + +Signed-off-by: Lars T Hansen +Signed-off-by: Adam Duskett +--- + js/src/vm/UnboxedObject.cpp | 30 ++++++++++++++++++++++++++---- + 1 file changed, 26 insertions(+), 4 deletions(-) + +diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp +index 35ca20d7405f..1c20a1093d13 100644 +--- a/js/src/vm/UnboxedObject.cpp ++++ b/js/src/vm/UnboxedObject.cpp +@@ -86,9 +86,16 @@ static const uintptr_t CLEAR_CONSTRUCTOR_CODE_TOKEN = 0x1; + #endif + + #ifdef JS_CODEGEN_ARM64 +- // ARM64 communicates stack address via sp, but uses a pseudo-sp for +- // addressing. +- masm.initStackPtr(); ++ // ARM64 communicates stack address via sp, but uses a pseudo-sp (PSP) for ++ // addressing. The register we use for PSP may however also be used by ++ // calling code, and it is nonvolatile, so save it. Do this as a special ++ // case first because the generic save/restore code needs the PSP to be ++ // initialized already. ++ MOZ_ASSERT(PseudoStackPointer64.Is(masm.GetStackPointer64())); ++ masm.Str(PseudoStackPointer64, vixl::MemOperand(sp, -16, vixl::PreIndex)); ++ ++ // Initialize the PSP from the SP. ++ masm.initStackPtr(); + #endif + + MOZ_ASSERT(propertiesReg.volatile_()); +@@ -239,7 +246,22 @@ static const uintptr_t CLEAR_CONSTRUCTOR_CODE_TOKEN = 0x1; + if (ScratchDoubleReg.volatile_()) masm.pop(ScratchDoubleReg); + masm.PopRegsInMask(savedNonVolatileRegisters); + +- masm.abiret(); ++#ifdef JS_CODEGEN_ARM64 ++ // Now restore the value that was in the PSP register on entry, and return. ++ ++ // Obtain the correct SP from the PSP. ++ masm.Mov(sp, PseudoStackPointer64); ++ ++ // Restore the saved value of the PSP register, this value is whatever the ++ // caller had saved in it, not any actual SP value, and it must not be ++ // overwritten subsequently. ++ masm.Ldr(PseudoStackPointer64, vixl::MemOperand(sp, 16, vixl::PostIndex)); ++ ++ // Perform a plain Ret(), as abiret() will move SP <- PSP and that is wrong. ++ masm.Ret(vixl::lr); ++#else ++ masm.abiret(); ++#endif + + masm.bind(&failureStoreOther); + +-- +2.23.0 diff --git a/package/spidermonkey/0009-save-x28-before-clobbering-it-in-the-regex-compiler.patch b/package/spidermonkey/0009-save-x28-before-clobbering-it-in-the-regex-compiler.patch new file mode 100644 index 00000000..b4623c59 --- /dev/null +++ b/package/spidermonkey/0009-save-x28-before-clobbering-it-in-the-regex-compiler.patch @@ -0,0 +1,100 @@ +From 903a79a1efff18fc7cc50db09a3fe5d768adc9a8 Mon 19 Mar 2018 09:58:06 +0100 +From: Lars T Hansen +Date: Fri, 23 Mar 2018 22:01:33 +0000 +Subject: [PATCH] save x28 before clobbering it in the regex compiler + +Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1445907 + +Upsream-status: Applied +See: https://hg.mozilla.org/mozilla-central/rev/903a79a1efff + +Signed-off-by: Lars T Hansen +Signed-off-by: Adam Duskett +--- +diff --git a/js/src/irregexp/NativeRegExpMacroAssembler.cpp b/js/src/irregexp/NativeRegExpMacroAssembler.cpp +--- a/js/src/irregexp/NativeRegExpMacroAssembler.cpp ++++ b/js/src/irregexp/NativeRegExpMacroAssembler.cpp +@@ -118,17 +118,25 @@ NativeRegExpMacroAssembler::GenerateCode + + Label return_temp0; + + // Finalize code - write the entry point code now we know how many + // registers we need. + masm.bind(&entry_label_); + + #ifdef JS_CODEGEN_ARM64 +- // ARM64 communicates stack address via sp, but uses a pseudo-sp for addressing. ++ // ARM64 communicates stack address via SP, but uses a pseudo-sp (PSP) for ++ // addressing. The register we use for PSP may however also be used by ++ // calling code, and it is nonvolatile, so save it. Do this as a special ++ // case first because the generic save/restore code needs the PSP to be ++ // initialized already. ++ MOZ_ASSERT(PseudoStackPointer64.Is(masm.GetStackPointer64())); ++ masm.Str(PseudoStackPointer64, vixl::MemOperand(sp, -16, vixl::PreIndex)); ++ ++ // Initialize the PSP from the SP. + masm.initStackPtr(); + #endif + + // Push non-volatile registers which might be modified by jitcode. + size_t pushedNonVolatileRegisters = 0; + for (GeneralRegisterForwardIterator iter(savedNonVolatileRegisters); iter.more(); ++iter) { + masm.Push(*iter); + pushedNonVolatileRegisters++; +@@ -416,17 +424,32 @@ NativeRegExpMacroAssembler::GenerateCode + masm.pop(temp0); + masm.movePtr(temp0, StackPointer); + #endif + + // Restore non-volatile registers which were saved on entry. + for (GeneralRegisterBackwardIterator iter(savedNonVolatileRegisters); iter.more(); ++iter) + masm.Pop(*iter); + ++#ifdef JS_CODEGEN_ARM64 ++ // Now restore the value that was in the PSP register on entry, and return. ++ ++ // Obtain the correct SP from the PSP. ++ masm.Mov(sp, PseudoStackPointer64); ++ ++ // Restore the saved value of the PSP register, this value is whatever the ++ // caller had saved in it, not any actual SP value, and it must not be ++ // overwritten subsequently. ++ masm.Ldr(PseudoStackPointer64, vixl::MemOperand(sp, 16, vixl::PostIndex)); ++ ++ // Perform a plain Ret(), as abiret() will move SP <- PSP and that is wrong. ++ masm.Ret(vixl::lr); ++#else + masm.abiret(); ++#endif + + // Backtrack code (branch target for conditional backtracks). + if (backtrack_label_.used()) { + masm.bind(&backtrack_label_); + Backtrack(); + } + + // Backtrack stack overflow code. +diff --git a/js/src/jit-test/tests/regexp/bug1445907.js b/js/src/jit-test/tests/regexp/bug1445907.js +new file mode 100644 +--- /dev/null ++++ b/js/src/jit-test/tests/regexp/bug1445907.js +@@ -0,0 +1,15 @@ ++// On ARM64, we failed to save x28 properly when generating code for the regexp ++// matcher. ++// ++// There's wasm and Debugger code here because the combination forces the use of ++// x28 and exposes the bug when running on the simulator. ++ ++if (!wasmIsSupported()) ++ quit(); ++ ++var g = newGlobal(''); ++var dbg = new Debugger(g); ++g.eval(`var m = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func (export "test")))')))`); ++var re = /./; ++dbg.onEnterFrame = function(frame) { re.exec("x") }; ++result = g.eval("m.exports.test()"); + +-- +2.23.0 + diff --git a/package/spidermonkey/0010-always-use-the-equivalent-year-to-determine-the-time-zone.patch b/package/spidermonkey/0010-always-use-the-equivalent-year-to-determine-the-time-zone.patch new file mode 100644 index 00000000..7ebe80a8 --- /dev/null +++ b/package/spidermonkey/0010-always-use-the-equivalent-year-to-determine-the-time-zone.patch @@ -0,0 +1,103 @@ +From 903a79a1efff18fc7cc50db09a3fe5d768adc9a8 Mon 19 Mar 2018 09:58:06 +0100 +From: André Bargull +Date: Wed, 8 Nov 2017 03:23:41 -0800 +Subject: always use the equivalent year to determine the time zone offset and + name + +Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1415202 + +Upsream-status: Applied +See: https://hg.mozilla.org/mozilla-central/rev/ce9f1466ec78 + +Reviewed-by: Jeff Walden +Signed-off-by: André Bargull +Signed-off-by: Adam Duskett +--- + js/src/jsdate.cpp | 11 +++++++---- + js/src/vm/Time.cpp | 14 ++++---------- + js/src/vm/Time.h | 2 +- + 3 files changed, 12 insertions(+), 15 deletions(-) + +diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp +index 07af3d18c865..ff8fd6c3763c 100644 +--- a/js/src/jsdate.cpp ++++ b/js/src/jsdate.cpp +@@ -2353,12 +2353,15 @@ static PRMJTime ToPRMJTime(double localTime, double utcTime) { + static size_t FormatTime(char* buf, int buflen, const char* fmt, double utcTime, + double localTime) { + PRMJTime prtm = ToPRMJTime(localTime, utcTime); +- int eqivalentYear = IsRepresentableAsTime32(utcTime) +- ? prtm.tm_year +- : EquivalentYearForDST(prtm.tm_year); ++ // If an equivalent year was used to compute the date/time components, use ++ // the same equivalent year to determine the time zone name and offset in ++ // PRMJ_FormatTime(...). ++ int timeZoneYear = IsRepresentableAsTime32(utcTime) ++ ? prtm.tm_year ++ : EquivalentYearForDST(prtm.tm_year); + int offsetInSeconds = (int)floor((localTime - utcTime) / msPerSecond); + +- return PRMJ_FormatTime(buf, buflen, fmt, &prtm, eqivalentYear, ++ return PRMJ_FormatTime(buf, buflen, fmt, &prtm, timeZoneYear, + offsetInSeconds); + } + +diff --git a/js/src/vm/Time.cpp b/js/src/vm/Time.cpp +index f59977f0d0e9..5ee4794b3e83 100644 +--- a/js/src/vm/Time.cpp ++++ b/js/src/vm/Time.cpp +@@ -247,7 +247,7 @@ static void PRMJ_InvalidParameterHandler(const wchar_t* expression, + + /* Format a time value into a buffer. Same semantics as strftime() */ + size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt, +- const PRMJTime* prtm, int equivalentYear, ++ const PRMJTime* prtm, int timeZoneYear, + int offsetInSeconds) { + size_t result = 0; + #if defined(XP_UNIX) || defined(XP_WIN) +@@ -280,7 +280,8 @@ size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt, + * Fill out |td| to the time represented by |prtm|, leaving the + * timezone fields zeroed out. localtime_r will then fill in the + * timezone fields for that local time according to the system's +- * timezone parameters. ++ * timezone parameters. Use |timeZoneYear| for the year to ensure the ++ * time zone name matches the time zone offset used by the caller. + */ + struct tm td; + memset(&td, 0, sizeof(td)); +@@ -290,19 +291,12 @@ size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt, + td.tm_mday = prtm->tm_mday; + td.tm_mon = prtm->tm_mon; + td.tm_wday = prtm->tm_wday; +- td.tm_year = prtm->tm_year - 1900; ++ td.tm_year = timeZoneYear - 1900; + td.tm_yday = prtm->tm_yday; + td.tm_isdst = prtm->tm_isdst; + + time_t t = mktime(&td); + +- // If |prtm| cannot be represented in |time_t| the year is probably +- // out of range, try again with the DST equivalent year. +- if (t == static_cast(-1)) { +- td.tm_year = equivalentYear - 1900; +- t = mktime(&td); +- } +- + // If either mktime or localtime_r failed, fill in the fallback time + // zone offset |offsetInSeconds| and set the time zone identifier to + // the empty string. +diff --git a/js/src/vm/Time.h b/js/src/vm/Time.h +index 3a51d869c922..37b7faeec028 100644 +--- a/js/src/vm/Time.h ++++ b/js/src/vm/Time.h +@@ -49,7 +49,7 @@ inline void PRMJ_NowShutdown() {} + + /* Format a time value into a buffer. Same semantics as strftime() */ + extern size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt, +- const PRMJTime* tm, int equivalentYear, ++ const PRMJTime* tm, int timeZoneYear, + int offsetInSeconds); + + /** +-- +2.23.0 diff --git a/package/spidermonkey/0011-js-src-Makefile.in-install-shell-only-if-it-s-built.patch b/package/spidermonkey/0011-js-src-Makefile.in-install-shell-only-if-it-s-built.patch new file mode 100644 index 00000000..f6092af7 --- /dev/null +++ b/package/spidermonkey/0011-js-src-Makefile.in-install-shell-only-if-it-s-built.patch @@ -0,0 +1,28 @@ +From b5e4a9926cf50d12e9c5c05c6d1b161e5b662d62 Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Sat, 7 Mar 2020 23:42:02 -0300 +Subject: [PATCH] js/src/Makefile.in: install shell only if it's built + +Prevents an installation error if we configure with --disable-js-shell. + +Signed-off-by: Carlos Santos +--- + js/src/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/js/src/Makefile.in b/js/src/Makefile.in +index 4ac9f48..9c8fb64 100644 +--- a/js/src/Makefile.in ++++ b/js/src/Makefile.in +@@ -136,7 +136,7 @@ endif + + install:: + $(MAKE) -C build install +- $(MAKE) -C shell install ++ if [ -d shell ]; then $(MAKE) -C shell install; fi + + ifdef HAVE_DTRACE + javascript-trace.h: $(srcdir)/devtools/javascript-trace.d +-- +2.18.2 + diff --git a/package/spidermonkey/Config.in b/package/spidermonkey/Config.in new file mode 100644 index 00000000..e015e84a --- /dev/null +++ b/package/spidermonkey/Config.in @@ -0,0 +1,60 @@ +config BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS + bool + default y if BR2_aarch64 + default y if BR2_arm || BR2_armeb + default y if BR2_i386 || BR2_x86_64 + default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + default y if BR2_riscv + default y if BR2_sh4 || BR2_sh4a + default y if BR2_sparc || BR2_sparc64 + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr + +config BR2_PACKAGE_SPIDERMONKEY_JIT_ARCH_SUPPORTS + bool + default y if BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || BR2_x86_64 + +config BR2_PACKAGE_SPIDERMONKEY + bool "spidermonkey" + depends on BR2_HOST_GCC_AT_LEAST_4_9 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # needs pthread_getattr_np() + depends on BR2_USE_MMU # fork in executable tools. + depends on BR2_USE_WCHAR + depends on !BR2_TOOLCHAIN_USES_UCLIBC # No way to check for fenv support. + depends on !BR2_STATIC_LIBS # dlopen + select BR2_PACKAGE_HOST_PYTHON + select BR2_PACKAGE_HOST_PYTHON_SSL + select BR2_PACKAGE_LIBNSPR + select BR2_PACKAGE_ZLIB + help + SpiderMonkey is the code-name for Mozilla Firefox's C++ + implementation of JavaScript. It is intended to be embedded in + other applications that provide host environments for + JavaScript. + + https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey + +if BR2_PACKAGE_SPIDERMONKEY + +config BR2_PACKAGE_SPIDERMONKEY_JS_SHELL + bool "JS shell" + help + Build the JavaScript shell. + + WARNING: increases target image size by around 24 MiB. + +endif + +comment "spidermonkey needs a glibc or musl toolchain with C++, wchar, dynamic library, NPTL, gcc >= 4.9" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_USES_UCLIBC || \ + !BR2_INSTALL_LIBSTDCPP || \ + BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + !BR2_HOST_GCC_AT_LEAST_4_9 || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ + !BR2_USE_WCHAR diff --git a/package/spidermonkey/spidermonkey.hash b/package/spidermonkey/spidermonkey.hash new file mode 100644 index 00000000..ccb02658 --- /dev/null +++ b/package/spidermonkey/spidermonkey.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 f51039c997415fd0f13f8e01966b4a8ff80cbf90deb8b14c18827104a369cc0d mozjs-60.5.2.tar.bz2 +sha256 aaac93a33bec26d5d1a9c5efc1e7dc6bd215d8a4f1e1a7fc5315a67adfd51338 moz.configure diff --git a/package/spidermonkey/spidermonkey.mk b/package/spidermonkey/spidermonkey.mk new file mode 100644 index 00000000..50afdc17 --- /dev/null +++ b/package/spidermonkey/spidermonkey.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# spidermonkey +# +################################################################################ + +# Use a tarball with only the spidermonkey source code and a pre-setup +# old-configure in src/js.This prevents having to use autoconf 2.13 and +# makes the package much 31M instead of 257M +SPIDERMONKEY_VERSION = 60.5.2 +SPIDERMONKEY_SOURCE = mozjs-$(SPIDERMONKEY_VERSION).tar.bz2 +SPIDERMONKEY_SITE = https://gentoo.osuosl.org/distfiles/9a +SPIDERMONKEY_SUBDIR = js/src +SPIDERMONKEY_LICENSE = MPL-2.0 +SPIDERMONKEY_LICENSE_FILES = moz.configure +SPIDERMONKEY_INSTALL_STAGING = YES + +SPIDERMONKEY_DEPENDENCIES = \ + host-python \ + libnspr \ + zlib + +SPIDERMONKEY_CONF_ENV = \ + PYTHON="$(HOST_DIR)/bin/python2" + +# spidermonkey mixes up target and host. +# spidermonkey does not allow building against a system jemalloc, +# as it causes a conflict with glibc. +SPIDERMONKEY_CONF_OPTS = \ + --host=$(GNU_HOST_NAME) \ + --target=$(GNU_TARGET_NAME) \ + --disable-jemalloc \ + --enable-shared-js \ + --with-system-zlib \ + --with-system-nspr \ + --with-nspr-exec-prefix="$(STAGING_DIR)/usr" + +ifeq ($(BR2_PACKAGE_SPIDERMONKEY_JIT_ARCH_SUPPORTS),y) +SPIDERMONKEY_CONF_OPTS += --enable-ion +else +SPIDERMONKEY_CONF_OPTS += --disable-ion +endif + +ifeq ($(BR2_PACKAGE_SPIDERMONKEY_JS_SHELL),y) +SPIDERMONKEY_CONF_OPTS += --enable-js-shell +else +SPIDERMONKEY_CONF_OPTS += --disable-js-shell +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +SPIDERMONKEY_CONF_OPTS += --enable-readline +SPIDERMONKEY_DEPENDENCIES += readline +else +SPIDERMONKEY_CONF_OPTS += --disable-readline +endif + +# Remove unneeded files +define SPIDERMONKEY_CLEANUP + rm -rf $(TARGET_DIR)/usr/lib/libjs_static.ajs + rm -rf $(TARGET_DIR)/usr/bin/js60-config +endef +SPIDERMONKEY_POST_INSTALL_TARGET_HOOKS += SPIDERMONKEY_CLEANUP + +$(eval $(autotools-package)) diff --git a/package/spidev_test/Config.in b/package/spidev_test/Config.in new file mode 100644 index 00000000..44990c66 --- /dev/null +++ b/package/spidev_test/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_SPIDEV_TEST + bool "spidev_test" + help + SPI testing utility (using spidev driver). + + This package builds and installs the userspace 'spidev_test' + command. It is up to the user to ensure that the kernel + configuration has all suitable options enabled to allow a + proper operation of 'spidev_test'. + + The version used is based on your toolchain headers version, + if it's older than 3.15 then 3.0 is used, otherwise 3.15 + is used. + This means you won't have quad-pumped SPI support if your + toolchain is too old. + + https://www.kernel.org/doc/html/latest/spi/index.html diff --git a/package/spidev_test/spidev_test.hash b/package/spidev_test/spidev_test.hash new file mode 100644 index 00000000..7bc4a27e --- /dev/null +++ b/package/spidev_test/spidev_test.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 80471c330d8c0bf5ba6479c434a54a54bdd2dc59a703b9c76c2541ec04cfb8c3 spidev_test.c?id=v3.0 +sha256 3cf76b15d9a8644f3f5cbc0387cc02a7d4a392ade39788cbc6367cce98552e2f spidev_test.c?id=v4.10 diff --git a/package/spidev_test/spidev_test.mk b/package/spidev_test/spidev_test.mk new file mode 100644 index 00000000..80998f34 --- /dev/null +++ b/package/spidev_test/spidev_test.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# spidev_test +# +################################################################################ + +# Build the latest version that is compatible with the toolchain's kernel headers +# v3.15+ requires SPI_TX_QUAD/SPI_RX_QUAD to build +# Normally kernel headers can't be newer than kernel so switch based on that. +# If you need quad-pumped spi support you need to upgrade your toolchain. +# Note that the location of spidev_test.c changes from v4.5 onwards. + +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15),y) +SPIDEV_TEST_VERSION = 4.10 +SPIDEV_TEST_PATH = tools/spi +else +SPIDEV_TEST_VERSION = 3.0 +SPIDEV_TEST_PATH = Documentation/spi +endif + +SPIDEV_TEST_SITE = http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/$(SPIDEV_TEST_PATH) +SPIDEV_TEST_SOURCE = spidev_test.c?id=v$(SPIDEV_TEST_VERSION) +SPIDEV_TEST_LICENSE = GPL-2.0 + +# musl libc requires linux/ioctl.h for _IOC_SIZEBITS. Do a sed patch to keep +# compatibility with different spidev_test.c versions that we support. +define SPIDEV_ADD_LINUX_IOCTL + $(SED) 's~^#include ~#include \n#include ~' \ + $(@D)/spidev_test.c +endef + +SPIDEV_TEST_POST_PATCH_HOOKS += SPIDEV_ADD_LINUX_IOCTL + +define SPIDEV_TEST_EXTRACT_CMDS + cp $(SPIDEV_TEST_DL_DIR)/$(SPIDEV_TEST_SOURCE) $(@D)/spidev_test.c +endef + +define SPIDEV_TEST_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) \ + -o $(@D)/spidev_test $(@D)/spidev_test.c +endef + +define SPIDEV_TEST_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/spidev_test \ + $(TARGET_DIR)/usr/sbin/spidev_test +endef + +$(eval $(generic-package)) diff --git a/package/sqlcipher/Config.in b/package/sqlcipher/Config.in new file mode 100644 index 00000000..332754b1 --- /dev/null +++ b/package/sqlcipher/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_SQLCIPHER + bool "sqlcipher" + depends on !BR2_PACKAGE_SQLITE + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_OPENSSL + help + SQLCipher is an SQLite extension that provides 256 bits AES + encryption of database files. Note that it is a fork of + SQLite and they cannot be installed side-by-side. + + http://sqlcipher.net + +if BR2_PACKAGE_SQLCIPHER + +config BR2_PACKAGE_SQLCIPHER_READLINE + bool "Command-line editing" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + help + Enable command-line editing. This requires ncurses and + readline. + +config BR2_PACKAGE_SQLCIPHER_STAT3 + bool "Additional query optimizations (stat3)" + help + Adds additional logic to the ANALYZE command and to the + query planner that can help SQLite to choose a better query + plan under certain situations. + +endif + +comment "sqlcipher conflicts with sqlite" + depends on BR2_PACKAGE_SQLITE + +comment "sqlcipher needs a toolchain w/ threads" + depends on !BR2_PACKAGE_SQLITE + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sqlcipher/sqlcipher.hash b/package/sqlcipher/sqlcipher.hash new file mode 100644 index 00000000..ddc78ef7 --- /dev/null +++ b/package/sqlcipher/sqlcipher.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 b8df69b998c042ce7f8a99f07cf11f45dfebe51110ef92de95f1728358853133 sqlcipher-4.4.3.tar.gz +sha256 3eee3c7964a9becc94d747bd36703d31fc86eb994680b06a61bfd4f2661eaac8 LICENSE diff --git a/package/sqlcipher/sqlcipher.mk b/package/sqlcipher/sqlcipher.mk new file mode 100644 index 00000000..776e2d0d --- /dev/null +++ b/package/sqlcipher/sqlcipher.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# sqlcipher +# +################################################################################ + +SQLCIPHER_VERSION = 4.4.3 +SQLCIPHER_SITE = $(call github,sqlcipher,sqlcipher,v$(SQLCIPHER_VERSION)) +SQLCIPHER_LICENSE = BSD-3-Clause +SQLCIPHER_LICENSE_FILES = LICENSE +SQLCIPHER_CPE_ID_VENDOR = zetetic +SQLCIPHER_DEPENDENCIES = host-pkgconf openssl host-tcl +SQLCIPHER_INSTALL_STAGING = YES + +SQLCIPHER_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) $(SQLCIPHER_CFLAGS)" \ + TCLSH_CMD=$(HOST_DIR)/bin/tclsh$(TCL_VERSION_MAJOR) + +SQLCIPHER_CONF_OPTS = \ + --enable-threadsafe \ + --disable-tcl + +SQLCIPHER_CFLAGS += -DSQLITE_HAS_CODEC # Required according to the README +SQLCIPHER_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl` + +ifeq ($(BR2_PACKAGE_SQLCIPHER_STAT3),y) +SQLCIPHER_CFLAGS += -DSQLITE_ENABLE_STAT3 +endif + +ifeq ($(BR2_PACKAGE_SQLCIPHER_READLINE),y) +SQLCIPHER_DEPENDENCIES += ncurses readline +SQLCIPHER_CONF_OPTS += --with-readline-inc="-I$(STAGING_DIR)/usr/include" +else +SQLCIPHER_CONF_OPTS += --disable-readline +endif + +ifeq ($(BR2_STATIC_LIBS),y) +SQLCIPHER_CONF_OPTS += --disable-load-extension +else +SQLCIPHER_CONF_OPTS += --enable-load-extension +endif + +$(eval $(autotools-package)) diff --git a/package/sqlite/Config.in b/package/sqlite/Config.in new file mode 100644 index 00000000..87c0f6c0 --- /dev/null +++ b/package/sqlite/Config.in @@ -0,0 +1,73 @@ +config BR2_PACKAGE_SQLITE + bool "sqlite" + help + SQLite is a small C library that implements a + self-contained, embeddable, zero-configuration SQL database + engine. + + http://www.sqlite.org/ + +if BR2_PACKAGE_SQLITE + +config BR2_PACKAGE_SQLITE_STAT4 + bool "Additional query optimizations (stat4)" + help + Adds additional logic to the ANALYZE command and to the + query planner that can help SQLite to choose a better query + plan under certain situations. + +config BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA + bool "Enable convenient access to meta-data about tables and queries" + help + When this option is defined there are some additional APIs + enabled to acces meta-data about tables and queries (see + https://sqlite.org/compile.html). + +config BR2_PACKAGE_SQLITE_ENABLE_FTS3 + bool "Enable version 3 of the full-text search engine" + help + When this option is defined in the amalgamation (see + http://www.sqlite.org/amalgamation.html), version 3 of the + full-text search engine is added to the build automatically. + +config BR2_PACKAGE_SQLITE_ENABLE_JSON1 + bool "Enable the JSON extensions for SQLite" + help + When this option is defined in the amalgamation, the JSON + extensions are added to the build automatically. + +config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY + bool "Enable sqlite3_unlock_notify() interface" + help + This option enables the sqlite3_unlock_notify() interface + and its accosiated functionality. See the documentation + http://www.sqlite.org/unlock_notify.html for additional + information. + +config BR2_PACKAGE_SQLITE_SECURE_DELETE + bool "Set the secure_delete pragma on by default" + help + This compile-time option changes the default settings of the + secure_delete pragma. When this option is not used, + secure_delete defaults to off. When this option is present, + secure_delete defaults to on. + + The secure_delete setting causes deleted content to be + overwritten with zeros. There is a small performance penalty + for this since additional I/O must occur. On the other hand, + secure_delete can prevent sensitive information from + lingering in unused parts of the database file after it has + allegedly been deleted. See the documentation on the + http://www.sqlite.org/pragma.html#pragma_secure_delete for + additional information. + +config BR2_PACKAGE_SQLITE_NO_SYNC + bool "Disable fsync" + help + By default SQLite forces all database transactions to + storage immediately using fsync() to protect against data + loss in case of power failure. This option turns this + behavior off resulting in higher performance especially when + using slow flash storage. + +endif diff --git a/package/sqlite/sqlite.hash b/package/sqlite/sqlite.hash new file mode 100644 index 00000000..02b0e713 --- /dev/null +++ b/package/sqlite/sqlite.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 2a3bca581117b3b88e5361d0ef3803ba6d8da604b1c1a47d902ef785c1b53e89 sqlite-autoconf-3340100.tar.gz +sha256 66e056b6e8687f32af30d5187611b98b12a8f46f07aaf62f43585f276e8f0ac9 tea/license.terms diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk new file mode 100644 index 00000000..2c2928f2 --- /dev/null +++ b/package/sqlite/sqlite.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# sqlite +# +################################################################################ + +SQLITE_VERSION = 3340100 +SQLITE_CPE_ID_VERSION = 3.34.1 +SQLITE_SOURCE = sqlite-autoconf-$(SQLITE_VERSION).tar.gz +SQLITE_SITE = https://www.sqlite.org/2021 +SQLITE_LICENSE = Public domain +SQLITE_LICENSE_FILES = tea/license.terms +SQLITE_CPE_ID_VENDOR = sqlite +SQLITE_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_SQLITE_STAT4),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_STAT4 +endif + +ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_COLUMN_METADATA +endif + +ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_FTS3 +endif + +ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_JSON1),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_JSON1 +endif + +ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_UNLOCK_NOTIFY +endif + +ifeq ($(BR2_PACKAGE_SQLITE_SECURE_DELETE),y) +SQLITE_CFLAGS += -DSQLITE_SECURE_DELETE +endif + +ifeq ($(BR2_PACKAGE_SQLITE_NO_SYNC),y) +SQLITE_CFLAGS += -DSQLITE_NO_SYNC +endif + +# Building with Microblaze Gcc 4.9 makes compiling to hang. +# Work around using -O0 +ifeq ($(BR2_microblaze):$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y:) +SQLITE_CFLAGS += $(TARGET_CFLAGS) -O0 +else +# fallback to standard -O3 when -Ofast is present to avoid -ffast-math +SQLITE_CFLAGS += $(subst -Ofast,-O3,$(TARGET_CFLAGS)) +endif + +SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)" + +ifeq ($(BR2_STATIC_LIBS),y) +SQLITE_CONF_OPTS += --enable-dynamic-extensions=no +else +SQLITE_CONF_OPTS += --disable-static-shell +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +SQLITE_CONF_OPTS += --enable-threadsafe +else +SQLITE_CONF_OPTS += --disable-threadsafe +SQLITE_CFLAGS += -DSQLITE_THREADSAFE=0 +endif + +ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy) +SQLITE_DEPENDENCIES += ncurses readline +SQLITE_CONF_OPTS += --disable-editline --enable-readline +else ifeq ($(BR2_PACKAGE_LIBEDIT),y) +SQLITE_DEPENDENCIES += libedit +SQLITE_CONF_OPTS += --enable-editline --disable-readline +else +SQLITE_CONF_OPTS += --disable-editline --disable-readline +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/squashfs/0001-squashfs-tools-fix-build-failure-against-gcc-10.patch b/package/squashfs/0001-squashfs-tools-fix-build-failure-against-gcc-10.patch new file mode 100644 index 00000000..a5fc487a --- /dev/null +++ b/package/squashfs/0001-squashfs-tools-fix-build-failure-against-gcc-10.patch @@ -0,0 +1,49 @@ +From e1cdcfd94172a0b1ba4c9df70f4d69a41c687404 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Sun, 26 Jan 2020 18:35:13 +0000 +Subject: [PATCH] squashfs-tools: fix build failure against gcc-10 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On gcc-10 (and gcc-9 -fno-common) build fails as: + +``` +cc ... -o mksquashfs +ld: read_fs.o:(.bss+0x0): + multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here +ld: read_fs.o:(.bss+0x8): + multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here +``` + +gcc-10 will change the default from -fcommon to fno-common: +https://gcc.gnu.org/PR85678. + +The error also happens if CFLAGS=-fno-common passed explicitly. + +Reported-by: Toralf Förster +Bug: https://bugs.gentoo.org/706456 +Signed-off-by: Sergei Trofimovich + +[Upstream: https://github.com/plougher/squashfs-tools/commit/fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5.patch] +Signed-off-by: Peter Seiderer +--- + squashfs-tools/mksquashfs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h +index 1beefef..b650306 100644 +--- a/squashfs-tools/mksquashfs.h ++++ b/squashfs-tools/mksquashfs.h +@@ -143,7 +143,7 @@ struct append_file { + #endif + + extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache; +-struct cache *bwriter_buffer, *fwriter_buffer; ++extern struct cache *bwriter_buffer, *fwriter_buffer; + extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer, + *to_frag, *locked_fragment, *to_process_frag; + extern struct append_file **file_mapping; +-- +2.26.2 + diff --git a/package/squashfs/Config.in b/package/squashfs/Config.in new file mode 100644 index 00000000..60b243d9 --- /dev/null +++ b/package/squashfs/Config.in @@ -0,0 +1,60 @@ +config BR2_PACKAGE_SQUASHFS + bool "squashfs" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + # ensure at least on compression backend (defaults to gzip) + select BR2_PACKAGE_SQUASHFS_GZIP if !( \ + BR2_PACKAGE_SQUASHFS_LZ4 || \ + BR2_PACKAGE_SQUASHFS_LZMA || \ + BR2_PACKAGE_SQUASHFS_LZO || \ + BR2_PACKAGE_SQUASHFS_XZ || \ + BR2_PACKAGE_SQUASHFS_ZSTD) + help + Tools to generate SquashFS filesystems. + + https://github.com/plougher/squashfs-tools + +if BR2_PACKAGE_SQUASHFS + +config BR2_PACKAGE_SQUASHFS_GZIP + bool "gzip support" + default y + select BR2_PACKAGE_ZLIB + help + Support GZIP compression algorithm + +config BR2_PACKAGE_SQUASHFS_LZ4 + bool "lz4 support" + select BR2_PACKAGE_LZ4 + help + Support LZ4 compression algorithm + +config BR2_PACKAGE_SQUASHFS_LZMA + bool "lzma support" + select BR2_PACKAGE_XZ + help + Support LZMA compression algorithm + +config BR2_PACKAGE_SQUASHFS_LZO + bool "lzo support" + select BR2_PACKAGE_LZO + help + Support LZO compression algorithm + +config BR2_PACKAGE_SQUASHFS_XZ + bool "xz support" + select BR2_PACKAGE_XZ + help + Support XZ compression algorithm + +config BR2_PACKAGE_SQUASHFS_ZSTD + bool "zstd support" + select BR2_PACKAGE_ZSTD + help + Support ZSTD compression algorithm + +endif + +comment "squashfs needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/squashfs/Config.in.host b/package/squashfs/Config.in.host new file mode 100644 index 00000000..aa25b376 --- /dev/null +++ b/package/squashfs/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_SQUASHFS + bool "host squashfs" + help + Tools to generate SquashFS filesystems. + + https://github.com/plougher/squashfs-tools diff --git a/package/squashfs/squashfs.hash b/package/squashfs/squashfs.hash new file mode 100644 index 00000000..1f08b530 --- /dev/null +++ b/package/squashfs/squashfs.hash @@ -0,0 +1,5 @@ +# Locally computed +sha256 a7fa4845e9908523c38d4acf92f8a41fdfcd19def41bd5090d7ad767a6dc75c3 squashfs-4.4.tar.gz + +# License files +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk new file mode 100644 index 00000000..cbc3c906 --- /dev/null +++ b/package/squashfs/squashfs.mk @@ -0,0 +1,96 @@ +################################################################################ +# +# squashfs +# +################################################################################ + +SQUASHFS_VERSION = 4.4 +SQUASHFS_SITE = $(call github,plougher,squashfs-tools,$(SQUASHFS_VERSION)) +SQUASHFS_LICENSE = GPL-2.0+ +SQUASHFS_LICENSE_FILES = COPYING +SQUASHFS_CPE_ID_VENDOR = squashfs_project +SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 + +ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y) +SQUASHFS_DEPENDENCIES += lz4 +SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=1 COMP_DEFAULT=lz4 +else +SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_LZMA),y) +SQUASHFS_DEPENDENCIES += xz +SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=1 COMP_DEFAULT=lzma +else +SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_XZ),y) +SQUASHFS_DEPENDENCIES += xz +SQUASHFS_MAKE_ARGS += XZ_SUPPORT=1 COMP_DEFAULT=xz +else +SQUASHFS_MAKE_ARGS += XZ_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_LZO),y) +SQUASHFS_DEPENDENCIES += lzo +SQUASHFS_MAKE_ARGS += LZO_SUPPORT=1 COMP_DEFAULT=lzo +else +SQUASHFS_MAKE_ARGS += LZO_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_ZSTD),y) +SQUASHFS_DEPENDENCIES += zstd +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=1 COMP_DEFAULT=zstd +else +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_GZIP),y) +SQUASHFS_DEPENDENCIES += zlib +SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=1 COMP_DEFAULT=gzip +else +SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0 +endif + +HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd + +HOST_SQUASHFS_MAKE_ARGS = \ + XATTR_SUPPORT=1 \ + XZ_SUPPORT=1 \ + GZIP_SUPPORT=1 \ + LZ4_SUPPORT=1 \ + LZO_SUPPORT=1 \ + LZMA_XZ_SUPPORT=1 \ + ZSTD_SUPPORT=1 + +define SQUASHFS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + CC="$(TARGET_CC)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS) -fgnu89-inline" \ + EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ + $(SQUASHFS_MAKE_ARGS) \ + -C $(@D)/squashfs-tools/ +endef + +define SQUASHFS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(SQUASHFS_MAKE_ARGS) \ + -C $(@D)/squashfs-tools/ INSTALL_DIR=$(TARGET_DIR)/usr/bin install +endef + +define HOST_SQUASHFS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) \ + CC="$(HOSTCC)" \ + EXTRA_CFLAGS="$(HOST_CFLAGS)" \ + EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \ + $(HOST_SQUASHFS_MAKE_ARGS) \ + -C $(@D)/squashfs-tools/ +endef + +define HOST_SQUASHFS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_SQUASHFS_MAKE_ARGS) \ + -C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/bin install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/squeezelite/Config.in b/package/squeezelite/Config.in new file mode 100644 index 00000000..a0347591 --- /dev/null +++ b/package/squeezelite/Config.in @@ -0,0 +1,49 @@ +config BR2_PACKAGE_SQUEEZELITE + bool "squeezelite" + depends on BR2_USE_WCHAR # flac + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_USE_MMU # mpg123 + depends on !BR2_STATIC_LIBS # dlopen + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_MIXER + select BR2_PACKAGE_FLAC + select BR2_PACKAGE_LIBMAD + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_MPG123 + help + Logitech Media Server client + + https://github.com/ralph-irving/squeezelite/ + +if BR2_PACKAGE_SQUEEZELITE + +config BR2_PACKAGE_SQUEEZELITE_FFMPEG + bool "Enable WMA and ALAC decoding" + default y + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + select BR2_PACKAGE_FFMPEG + +config BR2_PACKAGE_SQUEEZELITE_DSD + bool "Enable DSD decoding" + +config BR2_PACKAGE_SQUEEZELITE_LIRC + bool "Enable lirc support" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIRC_TOOLS + +comment "lirc support needs a toolchain with C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_SQUEEZELITE_RESAMPLE + bool "Enable resampling support" + select BR2_PACKAGE_LIBSOXR + +config BR2_PACKAGE_SQUEEZELITE_VISEXPORT + bool "Enable visualiser support" + +endif + +comment "squeezelite needs a toolchain w/ wchar, NPTL, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS_NPTL \ + || BR2_STATIC_LIBS diff --git a/package/squeezelite/squeezelite.hash b/package/squeezelite/squeezelite.hash new file mode 100644 index 00000000..0b21d861 --- /dev/null +++ b/package/squeezelite/squeezelite.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 7f0342f4943d3c3498d930060f5a1e8d63ccb7282b9c21f964926e310449d592 squeezelite-71c012ad9ba102feb95823b7b9dc17e5305689c7.tar.gz +sha256 dc01c3da33fea11ed918f9e437b88baa59c70401aab0dad747e33dd9e8035706 LICENSE.txt diff --git a/package/squeezelite/squeezelite.mk b/package/squeezelite/squeezelite.mk new file mode 100644 index 00000000..b0347c4d --- /dev/null +++ b/package/squeezelite/squeezelite.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# squeezelite +# +################################################################################ + +SQUEEZELITE_VERSION = 71c012ad9ba102feb95823b7b9dc17e5305689c7 +SQUEEZELITE_SITE = $(call github,ralph-irving,squeezelite,$(SQUEEZELITE_VERSION)) +SQUEEZELITE_LICENSE = GPL-3.0 +SQUEEZELITE_LICENSE_FILES = LICENSE.txt +SQUEEZELITE_DEPENDENCIES = alsa-lib flac libmad libvorbis mpg123 +SQUEEZELITE_MAKE_OPTS = -DLINKALL + +ifeq ($(BR2_PACKAGE_FAAD2),y) +SQUEEZELITE_DEPENDENCIES += faad2 +else +SQUEEZELITE_MAKE_OPTS += -DNO_FAAD +endif + +ifeq ($(BR2_PACKAGE_SQUEEZELITE_FFMPEG),y) +SQUEEZELITE_DEPENDENCIES += ffmpeg +SQUEEZELITE_MAKE_OPTS += -DFFMPEG +endif + +ifeq ($(BR2_PACKAGE_SQUEEZELITE_DSD),y) +SQUEEZELITE_MAKE_OPTS += -DDSD +endif + +ifeq ($(BR2_PACKAGE_SQUEEZELITE_LIRC),y) +SQUEEZELITE_DEPENDENCIES += lirc-tools +SQUEEZELITE_MAKE_OPTS += -DIR +endif + +ifeq ($(BR2_PACKAGE_SQUEEZELITE_RESAMPLE),y) +SQUEEZELITE_DEPENDENCIES += libsoxr +SQUEEZELITE_MAKE_OPTS += -DRESAMPLE +endif + +ifeq ($(BR2_PACKAGE_SQUEEZELITE_VISEXPORT),y) +SQUEEZELITE_MAKE_OPTS += -DVISEXPORT +endif + +define SQUEEZELITE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + OPTS="$(SQUEEZELITE_MAKE_OPTS)" -C $(@D) all +endef + +define SQUEEZELITE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/squeezelite \ + $(TARGET_DIR)/usr/bin/squeezelite +endef + +$(eval $(generic-package)) diff --git a/package/squid/Config.in b/package/squid/Config.in new file mode 100644 index 00000000..0df2aede --- /dev/null +++ b/package/squid/Config.in @@ -0,0 +1,22 @@ +comment "squid needs a toolchain w/ C++, gcc >= 4.8 not affected by bug 64735" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || \ + !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +config BR2_PACKAGE_SQUID + bool "squid" + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::current_exception + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + # needs fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_LIBTOOL + select BR2_PACKAGE_LIBXML2 + help + Caching proxy for the Web supporting HTTP, HTTPS, FTP, and + more. + + http://www.squid-cache.org/ diff --git a/package/squid/S97squid b/package/squid/S97squid new file mode 100644 index 00000000..05fb93e3 --- /dev/null +++ b/package/squid/S97squid @@ -0,0 +1,39 @@ +#!/bin/sh + +[ -f /etc/squid.conf ] || exit 0 + +case "$1" in + start) + printf "Starting squid: " + if [ ! -d /var/log/squid ]; then + mkdir -p /var/log/squid + chown squid:squid /var/log/squid + fi + start-stop-daemon -S -x /usr/sbin/squid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + stop) + printf "Stopping squid: " + /usr/sbin/squid -k shutdown + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + reload) + printf "Reloading squid configuration: " + /usr/sbin/squid -k reconfigure + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + restart) + printf "Restarting squid: " + /usr/sbin/squid -k restart + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + *) + echo "Usage: $0 {start|stop|reload|restart}" + exit 1 +esac + +exit 0 diff --git a/package/squid/squid.hash b/package/squid/squid.hash new file mode 100644 index 00000000..12a9e5d2 --- /dev/null +++ b/package/squid/squid.hash @@ -0,0 +1,6 @@ +# From http://www.squid-cache.org/Versions/v4/squid-4.15.tar.xz.asc +md5 a593de9dc888dfeca4f1f7db2cd7d3b9 squid-4.15.tar.xz +sha1 60bda34ba39657e2d870c8c1d2acece8a69c3075 squid-4.15.tar.xz +# Locally calculated +sha256 b693a4e5ab2811a8a854f60de0a62afbbf3a952bb1d047952c9ae01321f84a25 squid-4.15.tar.xz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/squid/squid.mk b/package/squid/squid.mk new file mode 100644 index 00000000..b23a8d26 --- /dev/null +++ b/package/squid/squid.mk @@ -0,0 +1,98 @@ +################################################################################ +# +# squid +# +################################################################################ + +SQUID_VERSION = 4.15 +SQUID_SOURCE = squid-$(SQUID_VERSION).tar.xz +SQUID_SITE = http://www.squid-cache.org/Versions/v4 +SQUID_LICENSE = GPL-2.0+ +SQUID_LICENSE_FILES = COPYING +SQUID_CPE_ID_VENDOR = squid-cache +SQUID_DEPENDENCIES = libcap host-libcap libtool libxml2 host-pkgconf \ + $(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack) +SQUID_CONF_ENV = \ + ac_cv_epoll_works=yes \ + ac_cv_func_setresuid=yes \ + ac_cv_func_va_copy=yes \ + ac_cv_func___va_copy=yes \ + ac_cv_func_strnstr=no \ + ac_cv_have_squid=yes \ + BUILDCXX="$(HOSTCXX)" \ + BUILDCXXFLAGS="$(HOST_CXXFLAGS)" +SQUID_CONF_OPTS = \ + --enable-async-io=8 \ + --enable-linux-netfilter \ + --enable-removal-policies="lru,heap" \ + --with-filedescriptors=1024 \ + --disable-ident-lookups \ + --enable-auth-basic="fake getpwnam" \ + --enable-auth-digest="file" \ + --enable-auth-negotiate="wrapper" \ + --enable-auth-ntlm="fake" \ + --disable-strict-error-checking \ + --enable-external-acl-helpers="file_userip" \ + --disable-ltdl-install \ + --without-included-ltdl \ + --with-logdir=/var/log/squid/ \ + --with-pidfile=/var/run/squid.pid \ + --with-swapdir=/var/cache/squid/ \ + --with-default-user=squid + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +SQUID_CONF_ENV += LIBS=-latomic +endif + +ifeq ($(BR2_PACKAGE_LIBKRB5),y) +SQUID_CONF_OPTS += --with-mit-krb5 +SQUID_DEPENDENCIES += libkrb5 +else +SQUID_CONF_OPTS += --without-mit-krb5 +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SQUID_CONF_OPTS += --with-openssl +SQUID_DEPENDENCIES += openssl +else +SQUID_CONF_OPTS += --without-openssl +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +SQUID_CONF_OPTS += --with-gnutls +SQUID_DEPENDENCIES += gnutls +else +SQUID_CONF_OPTS += --without-gnutls +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +SQUID_CONF_OPTS += --with-systemd +SQUID_DEPENDENCIES += systemd +else +SQUID_CONF_OPTS += --without-systemd +endif + +define SQUID_CLEANUP_TARGET + rm -f $(addprefix $(TARGET_DIR)/usr/bin/, \ + RunCache RunAccel) + rm -f $(addprefix $(TARGET_DIR)/etc/, \ + cachemgr.conf mime.conf.default squid.conf.default) +endef + +SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET + +define SQUID_USERS + squid -1 squid -1 * - - - Squid proxy cache +endef + +define SQUID_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/squid/S97squid \ + $(TARGET_DIR)/etc/init.d/S97squid +endef + +define SQUID_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/tools/systemd/squid.service \ + $(TARGET_DIR)/usr/lib/systemd/system/squid.service +endef + +$(eval $(autotools-package)) diff --git a/package/sredird/0001-termio.patch b/package/sredird/0001-termio.patch new file mode 100644 index 00000000..7c7c67f5 --- /dev/null +++ b/package/sredird/0001-termio.patch @@ -0,0 +1,20 @@ +Fix musl build + +Patch was inspired by +http://svnweb.freebsd.org/ports/head/comms/sredird/files/patch-sredird.c?revision=363168&view=markup +http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/sysutils/sredird/patches/patch-aa +https://github.com/bitrig/bitrig-ports/blob/master/comms/sredird/patches/patch-sredird_c + +Signed-off-by: Bernd Kuhls + +diff -uNr sredird-2.2.2.org/sredird.c sredird-2.2.2/sredird.c +--- sredird-2.2.2.org/sredird.c 2005-08-12 16:10:46.000000000 +0200 ++++ sredird-2.2.2/sredird.c 2016-01-31 18:53:08.000000000 +0100 +@@ -110,7 +110,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/package/sredird/Config.in b/package/sredird/Config.in new file mode 100644 index 00000000..d8c5ef9c --- /dev/null +++ b/package/sredird/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_SREDIRD + bool "sredird" + help + Sredird is a serial port redirector that is compliant with + the RFC 2217 "Telnet Com Port Control Option" protocol. This + protocol lets you share a serial port through the network. + + http://freecode.com/projects/sredird diff --git a/package/sredird/sredird.hash b/package/sredird/sredird.hash new file mode 100644 index 00000000..1181627a --- /dev/null +++ b/package/sredird/sredird.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 640c47dcd84b3b90640165a38eb336a675fdab06c14c09cae2f4a604cae560d3 sredird-2.2.2.tar.gz +sha256 91df39d1816bfb17a4dda2d3d2c83b1f6f2d38d53e53e41e8f97ad5ac46a0cad COPYING diff --git a/package/sredird/sredird.mk b/package/sredird/sredird.mk new file mode 100644 index 00000000..723c10ac --- /dev/null +++ b/package/sredird/sredird.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# sredird +# +################################################################################ + +SREDIRD_VERSION = 2.2.2 +SREDIRD_SITE = http://www.ibiblio.org/pub/Linux/system/serial +SREDIRD_LICENSE = GPL-2.0+ +SREDIRD_LICENSE_FILES = COPYING + +define SREDIRD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define SREDIRD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/sredird $(TARGET_DIR)/usr/sbin/sredird +endef + +$(eval $(generic-package)) diff --git a/package/ssdp-responder/Config.in b/package/ssdp-responder/Config.in new file mode 100644 index 00000000..df57546e --- /dev/null +++ b/package/ssdp-responder/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_SSDP_RESPONDER + bool "ssdp-responder" + depends on BR2_USE_MMU + help + Simple Service Discovery Protocol daemon (SSDP) for networked + Linux and UNIX devices. Useful in any setup, big or small, but + targeted more at embedded systems that need to announce + themselves to Windows systems. + + ssdpd is a stand-alone UNIX, no external dependencies but the + standard C library. It has a built-in web server for serving + the UPnP XML description which Windows use to present the + icon, by default an InternetGatewayDevice is announced. + + Also included is ssdp-scan, a tool similar to mdns-scan, which + continuously scans for SSDP capable hosts on the network. + Take care only to use for debugging since it scans the network + quite aggressively. + + https://github.com/troglobit/ssdp-responder/ diff --git a/package/ssdp-responder/S50ssdpd b/package/ssdp-responder/S50ssdpd new file mode 100755 index 00000000..e33992be --- /dev/null +++ b/package/ssdp-responder/S50ssdpd @@ -0,0 +1,42 @@ +#!/bin/sh + +NAME=ssdpd +PIDFILE=/var/run/$NAME.pid +DAEMON=/usr/sbin/$NAME +CFGFILE=/etc/default/$NAME + +DAEMON_ARGS="" + +# Read configuration variable file if it is present +[ -f $CFGFILE ] && . $CFGFILE + +start() { + printf 'Starting %s: ' "$NAME" + start-stop-daemon -S -q -p $PIDFILE -x $DAEMON -- $DAEMON_ARGS + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf 'Stopping %s: ' "$NAME" + start-stop-daemon -K -q -p $PIDFILE -x $DAEMON + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + start +} + +case "$1" in + start|stop|restart) + "$1" + ;; + reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $? diff --git a/package/ssdp-responder/ssdp-responder.hash b/package/ssdp-responder/ssdp-responder.hash new file mode 100644 index 00000000..e8cbbb4a --- /dev/null +++ b/package/ssdp-responder/ssdp-responder.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 7ae49229e7c7a55fed9e36598b12e2173eecef0fffe0a386b6a10fad30f3c79f ssdp-responder-1.8.tar.gz +sha256 e17dc0bc91bf499d8cca5e016c22c6d2a4770e3cc1a43756a7973375a83ddb90 LICENSE diff --git a/package/ssdp-responder/ssdp-responder.mk b/package/ssdp-responder/ssdp-responder.mk new file mode 100644 index 00000000..3fee4c20 --- /dev/null +++ b/package/ssdp-responder/ssdp-responder.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# ssdp-responder +# +################################################################################ + +SSDP_RESPONDER_VERSION = 1.8 +SSDP_RESPONDER_SITE = https://github.com/troglobit/ssdp-responder/releases/download/v$(SSDP_RESPONDER_VERSION) +SSDP_RESPONDER_LICENSE = ISC +SSDP_RESPONDER_LICENSE_FILES = LICENSE +SSDP_RESPONDER_CPE_ID_VENDOR = \ + simple_service_discovery_protocol_responder_project +SSDP_RESPONDER_CPE_ID_PRODUCT = simple_service_discovery_protocol_responder +SSDP_RESPONDER_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +SSDP_RESPONDER_DEPENDENCIES += systemd +SSDP_RESPONDER_CONF_OPTS += --with-systemd +else +SSDP_RESPONDER_CONF_OPTS += --without-systemd +endif + +define SSDP_RESPONDER_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/ssdp-responder/S50ssdpd \ + $(TARGET_DIR)/etc/init.d/S50ssdpd +endef + +define SSDP-RESPONDER_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 $(@D)/ssdp-responder.service \ + $(TARGET_DIR)/usr/lib/systemd/system/ssdp-responder.service +endef + +$(eval $(autotools-package)) diff --git a/package/sshfs/Config.in b/package/sshfs/Config.in new file mode 100644 index 00000000..bc54b698 --- /dev/null +++ b/package/sshfs/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_SSHFS + bool "sshfs (FUSE)" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse3, glib2 + depends on BR2_USE_MMU # libfuse3, glib2 + depends on !BR2_STATIC_LIBS # libfuse3 + select BR2_PACKAGE_LIBFUSE3 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_OPENSSH + help + FUSE filesystem client based on the SSH File Transfer + Protocol. + + https://github.com/libfuse/sshfs + +comment "sshfs needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/sshfs/sshfs.hash b/package/sshfs/sshfs.hash new file mode 100644 index 00000000..106f06f0 --- /dev/null +++ b/package/sshfs/sshfs.hash @@ -0,0 +1,3 @@ +# Locally calculated after checking pgp signature +sha256 fe5d3436d61b46974889e0c4515899c21a9d67851e3793c209989f72353d7750 sshfs-3.7.1.tar.xz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/sshfs/sshfs.mk b/package/sshfs/sshfs.mk new file mode 100644 index 00000000..6759f6ab --- /dev/null +++ b/package/sshfs/sshfs.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# sshfs +# +################################################################################ + +SSHFS_VERSION = 3.7.1 +SSHFS_SOURCE = sshfs-$(SSHFS_VERSION).tar.xz +SSHFS_SITE = https://github.com/libfuse/sshfs/releases/download/sshfs-$(SSHFS_VERSION) +SSHFS_LICENSE = GPL-2.0 +SSHFS_LICENSE_FILES = COPYING +SSHFS_DEPENDENCIES = \ + libglib2 libfuse3 openssh \ + $(TARGET_NLS_DEPENDENCIES) \ + $(if $(BR2_ENABLE_LOCALE),,libiconv) + +$(eval $(meson-package)) diff --git a/package/sshguard/Config.in b/package/sshguard/Config.in new file mode 100644 index 00000000..7454c0a9 --- /dev/null +++ b/package/sshguard/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_SSHGUARD + bool "sshguard" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_IPTABLES # runtime + help + sshguard protects hosts from brute-force attacks against SSH + and other services. It aggregates system logs and blocks + repeat offenders using one of several firewall backends, + including iptables, ipfw, and pf. + + https://www.sshguard.net + +comment "sshguard needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sshguard/S49sshguard b/package/sshguard/S49sshguard new file mode 100644 index 00000000..94776415 --- /dev/null +++ b/package/sshguard/S49sshguard @@ -0,0 +1,49 @@ +#!/bin/sh + +DAEMON="sshguard" +PIDFILE="/var/run/$DAEMON.pid" + +start() { + printf 'Starting %s: ' "$DAEMON" + iptables -L sshguard > /dev/null 2>&1 || \ + (iptables -N sshguard && iptables -A INPUT -j sshguard) + start-stop-daemon -S -q -b -p /run/sshguard.pid \ + -x /usr/sbin/sshguard -- -i /run/sshguard.pid + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + rm -f "$PIDFILE" + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start|stop|restart) + "$1";; + reload) + # Restart, since there is no true "reload" feature. + restart;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/sshguard/sshguard.hash b/package/sshguard/sshguard.hash new file mode 100644 index 00000000..9bbb4133 --- /dev/null +++ b/package/sshguard/sshguard.hash @@ -0,0 +1,4 @@ +# sha256 from https://sourceforge.net/projects/sshguard/files/sshguard/2.4.1/sshguard-2.4.1.sha256 +sha256 875d02e6e67dced614790ed5e36aef1160edea940f353a79306cbb1852af3c67 sshguard-2.4.1.tar.gz +# Locally calculated +sha256 c3ae64f12153a1bc55bc234d09f40a08ab0e0149fffc972c0b7f02d5a12c1a5c COPYING diff --git a/package/sshguard/sshguard.mk b/package/sshguard/sshguard.mk new file mode 100644 index 00000000..3616fba7 --- /dev/null +++ b/package/sshguard/sshguard.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# sshguard +# +################################################################################ + +SSHGUARD_VERSION = 2.4.1 +SSHGUARD_SITE = https://sourceforge.net/projects/sshguard/files/sshguard/$(SSHGUARD_VERSION) +SSHGUARD_LICENSE = ISC, Public Domain (fnv hash), BSD-3-Clause (SimCList) +SSHGUARD_LICENSE_FILES = COPYING + +define SSHGUARD_INSTALL_CONFIG + $(INSTALL) -D -m 0644 $(@D)/examples/sshguard.conf.sample \ + $(TARGET_DIR)/etc/sshguard.conf + $(SED) '/^#BACKEND/c\BACKEND="/usr/libexec/sshg-fw-iptables"' \ + -e '/^#FILES/c\FILES="/var/log/messages"' $(TARGET_DIR)/etc/sshguard.conf +endef +SSHGUARD_POST_INSTALL_TARGET_HOOKS += SSHGUARD_INSTALL_CONFIG + +define SSHGUARD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/sshguard/S49sshguard \ + $(TARGET_DIR)/etc/init.d/S49sshguard +endef + +define SSHGUARD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/examples/sshguard.service \ + $(TARGET_DIR)/usr/lib/systemd/system/sshguard.service +endef + +$(eval $(autotools-package)) diff --git a/package/sshpass/Config.in b/package/sshpass/Config.in new file mode 100644 index 00000000..24e46295 --- /dev/null +++ b/package/sshpass/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_SSHPASS + bool "sshpass" + depends on BR2_USE_MMU # fork() + help + Sshpass is a tool for non-interactivly performing + password authentication with SSH's so called + "interactive keyboard password authentication". + + http://sshpass.sourceforge.net diff --git a/package/sshpass/sshpass.hash b/package/sshpass/sshpass.hash new file mode 100644 index 00000000..9635a918 --- /dev/null +++ b/package/sshpass/sshpass.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60 sshpass-1.06.tar.gz +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING diff --git a/package/sshpass/sshpass.mk b/package/sshpass/sshpass.mk new file mode 100644 index 00000000..6c14f0fe --- /dev/null +++ b/package/sshpass/sshpass.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# sshpass +# +################################################################################ + +SSHPASS_VERSION = 1.06 +SSHPASS_SITE = http://downloads.sourceforge.net/project/sshpass/sshpass/$(SSHPASS_VERSION) +SSHPASS_LICENSE = GPL-2.0+ +SSHPASS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/sslh/0001-Makefile-fix-static-linking-with-pcre.patch b/package/sslh/0001-Makefile-fix-static-linking-with-pcre.patch new file mode 100644 index 00000000..5fc3296d --- /dev/null +++ b/package/sslh/0001-Makefile-fix-static-linking-with-pcre.patch @@ -0,0 +1,41 @@ +From 0d9e004d324cc030c173de04c40db51a0f22bb5c Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Thu, 15 Oct 2020 07:58:05 +0200 +Subject: [PATCH] Makefile: fix static linking with pcre + +Static build with pcre is broken since version 1.19b and +https://github.com/yrutschle/sslh/commit/cb90cc97ae64a445242e517847c6e44b7003eda4 +because -lpcre has been replaced by -lpcreposix which will result in +the following static build failure: + +/srv/storage/autobuild/run/instance-1/output-1/host/bin/mipsel-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -static -o echosrv echosrv.o probe.o common.o tls.o -lpcreposix -lconfig -lcap +/srv/storage/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/8.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: /srv/storage/autobuild/run/instance-1/output-1/host/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpcreposix.a(libpcreposix_la-pcreposix.o): in function `regfree': +pcreposix.c:(.text+0x120): undefined reference to `pcre_free' + +So append -lpcre after -lpcreposix + +Fixes: + - http://autobuild.buildroot.org/results/a601824fc0c205a6a940e0f9f079ce2c39840605 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/yrutschle/sslh/pull/280] +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 986cf1c..ecadc22 100644 +--- a/Makefile ++++ b/Makefile +@@ -43,7 +43,7 @@ endif + + ifneq ($(strip $(USELIBPCRE)),) + CPPFLAGS+=-DLIBPCRE +- LIBS:=$(LIBS) -lpcreposix ++ LIBS:=$(LIBS) -lpcreposix -lpcre + endif + + ifneq ($(strip $(USELIBCONFIG)),) +-- +2.28.0 + diff --git a/package/sslh/Config.in b/package/sslh/Config.in new file mode 100644 index 00000000..f6b46f32 --- /dev/null +++ b/package/sslh/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_SSLH + bool "sslh" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBCONFIG if BR2_PACKAGE_SYSTEMD + help + Applicative protocol multiplexer + + http://www.rutschle.net/tech/sslh.shtml diff --git a/package/sslh/S35sslh b/package/sslh/S35sslh new file mode 100644 index 00000000..4a613f84 --- /dev/null +++ b/package/sslh/S35sslh @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Starts the SSLH server +# + +# default setup : listen on port 8090 forward ssh traffic to +# localhost:22 and http traffic to localhost:80 +SSLH_ARGS="--listen 0.0.0.0:8090 --ssh 127.0.0.1:22 --http 127.0.0.1:80" + +# Allow a few customizations from a config file (overrides +# default setup) +test -r /etc/default/sslh && . /etc/default/sslh + +start() { + SSLH_ARGS="$SSLH_ARGS --user root" + echo -n "Starting sslh: " + start-stop-daemon -S -q -p /var/run/sslh.pid \ + --exec /usr/sbin/sslh -- $SSLH_ARGS + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping sslh: " + start-stop-daemon -K -q -p /var/run/sslh.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/sslh/sslh.hash b/package/sslh/sslh.hash new file mode 100644 index 00000000..00e5c12d --- /dev/null +++ b/package/sslh/sslh.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 3bfe783726f82c1f5a4be630ddc494ebb08dbb69980662cd7ffdeb7bc9e1e706 sslh-v1.21c.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/sslh/sslh.mk b/package/sslh/sslh.mk new file mode 100644 index 00000000..4bde143c --- /dev/null +++ b/package/sslh/sslh.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# sslh +# +################################################################################ + +SSLH_VERSION = 1.21c +SSLH_SOURCE = sslh-v$(SSLH_VERSION).tar.gz +SSLH_SITE = http://www.rutschle.net/tech/sslh +SSLH_LICENSE = GPL-2.0+ +SSLH_LICENSE_FILES = COPYING + +SSLH_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +SSLH_DEPENDENCIES += libbsd +SSLH_MAKE_OPTS += USELIBBSD=1 +else +SSLH_MAKE_OPTS += USELIBBSD= +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +SSLH_DEPENDENCIES += libcap +SSLH_MAKE_OPTS += USELIBCAP=1 +else +SSLH_MAKE_OPTS += USELIBCAP= +endif + +ifeq ($(BR2_PACKAGE_LIBCONFIG),y) +SSLH_DEPENDENCIES += libconfig +SSLH_MAKE_OPTS += USELIBCONFIG=1 +else +SSLH_MAKE_OPTS += USELIBCONFIG= +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +SSLH_DEPENDENCIES += pcre +SSLH_MAKE_OPTS += USELIBPCRE=1 +else +SSLH_MAKE_OPTS += USELIBPCRE= +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +SSLH_DEPENDENCIES += systemd +SSLH_MAKE_OPTS += USESYSTEMD=1 +else +SSLH_MAKE_OPTS += USESYSTEMD= +endif + +define SSLH_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(SSLH_MAKE_OPTS) -C $(@D) +endef + +define SSLH_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(SSLH_MAKE_OPTS) -C $(@D) \ + DESTDIR=$(TARGET_DIR) install +endef + +define SSLH_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/sslh/S35sslh $(TARGET_DIR)/etc/init.d/S35sslh +endef + +$(eval $(generic-package)) diff --git a/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch b/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch new file mode 100644 index 00000000..64dc00d7 --- /dev/null +++ b/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch @@ -0,0 +1,30 @@ +Make linux-uclibcgnueabi an alias for linux-uclibceabi since it's +what we use in buildroot toolchains. +Slightly tweak musleabi to match the buildroot-used tuple. + +Signed-off-by: Gustavo Zacarias + +diff -Nura dpkg-1.18.3.orig/ostable dpkg-1.18.3/ostable +--- dpkg-1.18.3.orig/ostable 2015-10-15 08:05:04.471762555 -0300 ++++ dpkg-1.18.3/ostable 2015-10-15 08:11:05.206132648 -0300 +@@ -12,10 +12,10 @@ + # system part of the output of the GNU config.guess script. + # + # +-uclibceabi-linux linux-uclibceabi linux[^-]*-uclibceabi ++uclibceabi-linux linux-uclibceabi linux[^-]*-uclibc.*eabi + uclibc-linux linux-uclibc linux[^-]*-uclibc + musleabihf-linux linux-musleabihf linux[^-]*-musleabihf +-musl-linux linux-musl linux[^-]*-musl ++musl-linux linux-musl linux[^-]*-musl[^-]* + gnueabihf-linux linux-gnueabihf linux[^-]*-gnueabihf + gnueabi-linux linux-gnueabi linux[^-]*-gnueabi + gnuabin32-linux linux-gnuabin32 linux[^-]*-gnuabin32 +@@ -34,6 +34,6 @@ + bsd-netbsd netbsd netbsd[^-]* + bsd-openbsd openbsd openbsd[^-]* + sysv-solaris solaris solaris[^-]* +-uclibceabi-uclinux uclinux-uclibceabi uclinux[^-]*-uclibceabi ++uclibceabi-uclinux uclinux-uclibceabi uclinux[^-]*-uclibc.*eabi + uclibc-uclinux uclinux-uclibc uclinux[^-]*(-uclibc.*)? + tos-mint mint mint[^-]* diff --git a/package/start-stop-daemon/0002-just-warn-on-missing-arch.patch b/package/start-stop-daemon/0002-just-warn-on-missing-arch.patch new file mode 100644 index 00000000..2b9cd3db --- /dev/null +++ b/package/start-stop-daemon/0002-just-warn-on-missing-arch.patch @@ -0,0 +1,19 @@ +Just warn on missing arch + +Some architectures are not listed in dpkg list (e.g. mips64el, xtensa, sh4a). +Don't break the build for that. + +Signed-off-by: Baruch Siach +--- +diff -Nuar dpkg-1.16.15-orig/m4/dpkg-arch.m4 dpkg-1.16.15/m4/dpkg-arch.m4 +--- dpkg-1.16.15-orig/m4/dpkg-arch.m4 2014-05-30 02:47:25.000000000 +0300 ++++ dpkg-1.16.15/m4/dpkg-arch.m4 2015-01-16 06:55:19.701596362 +0200 +@@ -57,7 +57,7 @@ + AC_MSG_CHECKING([dpkg architecture name]) + _DPKG_ARCHITECTURE([DEB_HOST_ARCH], [dpkg_arch]) + if test "x$dpkg_arch" = "x"; then +- AC_MSG_ERROR([cannot determine host dpkg architecture]) ++ AC_MSG_WARN([cannot determine host dpkg architecture]) + else + AC_MSG_RESULT([$dpkg_arch]) + fi diff --git a/package/start-stop-daemon/Config.in b/package/start-stop-daemon/Config.in new file mode 100644 index 00000000..8f0dda13 --- /dev/null +++ b/package/start-stop-daemon/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_START_STOP_DAEMON + bool "start-stop-daemon" + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + start-stop-daemon is used to control the creation and + termination of system-level processes. + + https://tracker.debian.org/pkg/dpkg diff --git a/package/start-stop-daemon/start-stop-daemon.hash b/package/start-stop-daemon/start-stop-daemon.hash new file mode 100644 index 00000000..e5d1d911 --- /dev/null +++ b/package/start-stop-daemon/start-stop-daemon.hash @@ -0,0 +1,4 @@ +# From http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.18.10.dsc +sha256 025524da41ba18b183ff11e388eb8686f7cc58ee835ed7d48bd159c46a8b6dc5 dpkg_1.18.10.tar.xz +# Locally computed +sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING diff --git a/package/start-stop-daemon/start-stop-daemon.mk b/package/start-stop-daemon/start-stop-daemon.mk new file mode 100644 index 00000000..01a67197 --- /dev/null +++ b/package/start-stop-daemon/start-stop-daemon.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# start-stop-daemon +# +################################################################################ + +# Debian start-stop-daemon is part of dpkg. Since start-stop-daemon is the only +# interesting tool in it, we call the buildroot package start-stop-daemon. + +START_STOP_DAEMON_VERSION = 1.18.10 +START_STOP_DAEMON_SOURCE = dpkg_$(START_STOP_DAEMON_VERSION).tar.xz +START_STOP_DAEMON_SITE = http://snapshot.debian.org/archive/debian/20160731T221931Z/pool/main/d/dpkg +START_STOP_DAEMON_CONF_OPTS = \ + --disable-dselect \ + --disable-update-alternatives \ + --disable-install-info \ + --exec-prefix=/ +START_STOP_DAEMON_CONF_ENV = \ + dpkg_cv_va_copy=yes \ + dpkg_cv_c99_snprintf=yes \ + DPKG_DEVEL_MODE=1 +START_STOP_DAEMON_DEPENDENCIES = host-pkgconf +# Patching m4/dpkg-arch.m4 +START_STOP_DAEMON_AUTORECONF = YES +START_STOP_DAEMON_LICENSE = GPL-2.0+ +START_STOP_DAEMON_LICENSE_FILES = COPYING + +define START_STOP_DAEMON_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/lib/compat + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/utils +endef + +define START_STOP_DAEMON_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/utils/start-stop-daemon \ + $(TARGET_DIR)/sbin/start-stop-daemon +endef + +$(eval $(autotools-package)) diff --git a/package/startup-notification/Config.in b/package/startup-notification/Config.in new file mode 100644 index 00000000..88d18174 --- /dev/null +++ b/package/startup-notification/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_STARTUP_NOTIFICATION + bool "startup-notification" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + help + Startup-notification is a library used to monitor + application startup. + + http://freedesktop.org/software/startup-notification/releases diff --git a/package/startup-notification/startup-notification.hash b/package/startup-notification/startup-notification.hash new file mode 100644 index 00000000..474c8bd9 --- /dev/null +++ b/package/startup-notification/startup-notification.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 c2fa09f9a49d8b319e79638e49e967c682df8726006e03059b1ffca5ab82099c startup-notification-0.9.tar.gz +sha256 29935974beae046f50da806b5f4e54532401dd7bcfbc696a0b645f4cbcce9dbb COPYING diff --git a/package/startup-notification/startup-notification.mk b/package/startup-notification/startup-notification.mk new file mode 100644 index 00000000..b3314087 --- /dev/null +++ b/package/startup-notification/startup-notification.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# startup-notification +# +################################################################################ + +STARTUP_NOTIFICATION_VERSION = 0.9 +STARTUP_NOTIFICATION_SITE = http://freedesktop.org/software/startup-notification/releases +STARTUP_NOTIFICATION_INSTALL_STAGING = YES +STARTUP_NOTIFICATION_DEPENDENCIES = xlib_libX11 +STARTUP_NOTIFICATION_CONF_ENV = lf_cv_sane_realloc=yes +STARTUP_NOTIFICATION_CONF_OPTS = --with-x \ + --x-includes="$(STAGING_DIR)/usr/include/X11" \ + --x-libraries="$(STAGING_DIR)/usr/lib" +STARTUP_NOTIFICATION_LICENSE = LGPL-2.0 +STARTUP_NOTIFICATION_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/statserial/0001-ncurses-link.patch b/package/statserial/0001-ncurses-link.patch new file mode 100644 index 00000000..b1c41e67 --- /dev/null +++ b/package/statserial/0001-ncurses-link.patch @@ -0,0 +1,16 @@ +Link to libncurses instead of the legacy libcurses. + +Signed-off-by: Gustavo Zacarias + +diff -Nura statserial-1.1.orig/Makefile statserial-1.1/Makefile +--- statserial-1.1.orig/Makefile 2014-07-04 12:47:41.279440415 -0300 ++++ statserial-1.1/Makefile 2014-07-04 12:47:47.948665740 -0300 +@@ -10,7 +10,7 @@ + LDFLAGS = -s -N + + statserial: statserial.o +- $(LD) $(LDFLAGS) -o statserial statserial.o -lcurses ++ $(LD) $(LDFLAGS) -o statserial statserial.o -lncurses + + statserial.o: statserial.c + $(CC) $(CFLAGS) -c statserial.c diff --git a/package/statserial/Config.in b/package/statserial/Config.in new file mode 100644 index 00000000..4db5eb1a --- /dev/null +++ b/package/statserial/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_STATSERIAL + bool "statserial" + select BR2_PACKAGE_NCURSES + help + Displays a table of the signals on a standard + 9-pin or 25-pin serial port, and indicates the + status of the handshaking lines. It can be + useful for debugging problems with serial + ports or modems. + + https://sites.google.com/site/tranter/software diff --git a/package/statserial/statserial.hash b/package/statserial/statserial.hash new file mode 100644 index 00000000..ca96b864 --- /dev/null +++ b/package/statserial/statserial.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 40cf3bd506852942aa98f468c90ed4ea66dbd343b93efacd40d617b55caf3967 statserial-1.1.tar.gz +sha256 91df39d1816bfb17a4dda2d3d2c83b1f6f2d38d53e53e41e8f97ad5ac46a0cad COPYING diff --git a/package/statserial/statserial.mk b/package/statserial/statserial.mk new file mode 100644 index 00000000..f9b131fc --- /dev/null +++ b/package/statserial/statserial.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# statserial +# +################################################################################ + +STATSERIAL_VERSION = 1.1 +STATSERIAL_SITE = http://www.ibiblio.org/pub/Linux/system/serial +STATSERIAL_DEPENDENCIES = ncurses +STATSERIAL_LICENSE = GPL-2.0+ +STATSERIAL_LICENSE_FILES = COPYING + +define STATSERIAL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) +endef + +define STATSERIAL_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/statserial $(TARGET_DIR)/usr/bin/statserial +endef + +$(eval $(generic-package)) diff --git a/package/stella/Config.in b/package/stella/Config.in new file mode 100644 index 00000000..c14f4857 --- /dev/null +++ b/package/stella/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_STELLA + bool "stella" + depends on !BR2_STATIC_LIBS # sdl2 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6 # C++14 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr + select BR2_PACKAGE_SDL2 + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_ZLIB + help + Stella is a multi-platform Atari 2600 VCS emulator. + + https://stella-emu.github.io/ + +comment "stella needs a toolchain w/ dynamic library, C++, threads, gcc >= 6" + depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_6 + +comment "stella needs a toolchain not affected by GCC bug 64735" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 diff --git a/package/stella/stella.hash b/package/stella/stella.hash new file mode 100644 index 00000000..c40d9661 --- /dev/null +++ b/package/stella/stella.hash @@ -0,0 +1,4 @@ +# Locally computed: +sha256 0346900e9ba4b6d532b72d956adc5078502a9bd6bbc1648bb3dd68f5ffd4859b stella-6.4-src.tar.xz +sha256 d207ee9e563fdd062582df8cbb6c8303b9879bd107692c0db2a32477e47dfa35 Copyright.txt +sha256 58530d09b6fcb91ae27071be0081af90e6c2d7fdf991d34a29e234a2a5e75455 License.txt diff --git a/package/stella/stella.mk b/package/stella/stella.mk new file mode 100644 index 00000000..2dcfbeac --- /dev/null +++ b/package/stella/stella.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# stella +# +################################################################################ + +STELLA_VERSION = 6.4 +STELLA_SOURCE = stella-$(STELLA_VERSION)-src.tar.xz +STELLA_SITE = https://github.com/stella-emu/stella/releases/download/$(STELLA_VERSION) +STELLA_LICENSE = GPL-2.0+ +STELLA_LICENSE_FILES = Copyright.txt License.txt + +STELLA_DEPENDENCIES = sdl2 libpng zlib + +STELLA_CONF_OPTS = \ + --host=$(GNU_TARGET_NAME) \ + --prefix=/usr \ + --with-sdl-prefix=$(STAGING_DIR)/usr + +# The configure script is not autoconf based, so we use the +# generic-package infrastructure +define STELLA_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + ./configure $(STELLA_CONF_OPTS) \ + ) +endef + +define STELLA_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define STELLA_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/stellarium/Config.in b/package/stellarium/Config.in new file mode 100644 index 00000000..5922162d --- /dev/null +++ b/package/stellarium/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_STELLARIUM + bool "stellarium" + depends on BR2_PACKAGE_QT5 + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_HAS_LIBGL # does not support OpenGL ES + select BR2_PACKAGE_QT5BASE_CONCURRENT + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_NETWORK + select BR2_PACKAGE_QT5BASE_OPENGL + select BR2_PACKAGE_QT5BASE_PRINTSUPPORT + select BR2_PACKAGE_QT5BASE_WIDGETS + select BR2_PACKAGE_QT5LOCATION + select BR2_PACKAGE_QT5MULTIMEDIA + select BR2_PACKAGE_ZLIB + help + Stellarium is a free open source planetarium for your + computer. It shows a realistic sky in 3D, just like what + you see with the naked eye, binoculars or a telescope. + + https://stellarium.org + +comment "stellarium needs Qt5 and an OpenGL provider" + depends on !BR2_PACKAGE_QT5 || !BR2_PACKAGE_HAS_LIBGL diff --git a/package/stellarium/stellarium.hash b/package/stellarium/stellarium.hash new file mode 100644 index 00000000..fb6d4642 --- /dev/null +++ b/package/stellarium/stellarium.hash @@ -0,0 +1,5 @@ +# From https://github.com/Stellarium/stellarium/releases +sha1 c399f9c785f6a33d04f1a1c4f2db3309ce4781dc stellarium-0.20.4.tar.gz +sha256 63033bb6ad01b5f021689766b2a09a99bcabcfec57a710e46a93c40a32fda388 stellarium-0.20.4.tar.gz +# Locally computed +sha256 3aeeb5bb98bf7041ab82cffe15efa28ac58ee2bdf162b71301f5c192be631259 COPYING diff --git a/package/stellarium/stellarium.mk b/package/stellarium/stellarium.mk new file mode 100644 index 00000000..ac0bd477 --- /dev/null +++ b/package/stellarium/stellarium.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# stellarium +# +################################################################################ + +STELLARIUM_VERSION = 0.20.4 +STELLARIUM_SITE = https://github.com/Stellarium/stellarium/releases/download/v$(STELLARIUM_VERSION) +STELLARIUM_LICENSE = GPL-2.0+ +STELLARIUM_LICENSE_FILES = COPYING +STELLARIUM_DEPENDENCIES = \ + qt5base \ + qt5location \ + qt5multimedia \ + zlib +STELLARIUM_CONF_OPTS = \ + -DENABLE_MEDIA=ON \ + -DENABLE_NLS=OFF \ + -DUSE_SYSTEM_ZLIB=ON + +ifeq ($(BR2_PACKAGE_QT5SCRIPT),y) +STELLARIUM_DEPENDENCIES += qt5script +STELLARIUM_CONF_OPTS += -DENABLE_SCRIPTING=ON +else +STELLARIUM_CONF_OPTS += -DENABLE_SCRIPTING=OFF +endif + +ifeq ($(BR2_PACKAGE_QT5SERIALPORT),y) +STELLARIUM_DEPENDENCIES += qt5serialport +ifeq ($(BR2_PACKAGE_GPSD),y) +STELLARIUM_DEPENDENCIES += gpsd +endif +STELLARIUM_CONF_OPTS += \ + -DENABLE_GPS=ON \ + -DUSE_PLUGIN_TELESCOPECONTROL=ON +else +STELLARIUM_CONF_OPTS += \ + -DENABLE_GPS=OFF \ + -DUSE_PLUGIN_TELESCOPECONTROL=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/stm32flash/Config.in b/package/stm32flash/Config.in new file mode 100644 index 00000000..87afe3b8 --- /dev/null +++ b/package/stm32flash/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_STM32FLASH + bool "stm32flash" + help + Open source cross platform flash program for the STM32 ARM + microcontrollers using the built-in ST serial bootloader + over UART or I2C. + + http://sourceforge.net/projects/stm32flash/ diff --git a/package/stm32flash/stm32flash.hash b/package/stm32flash/stm32flash.hash new file mode 100644 index 00000000..1b06a8f0 --- /dev/null +++ b/package/stm32flash/stm32flash.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 42b7d63f6016bd75911cbb87fe85fbc4f98adf3ceecfe6d91f7956b31d18095f stm32flash-3cebf121f7b32b9edfcb0d49f0fb43ccf33e5650-br1.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 gpl-2.0.txt diff --git a/package/stm32flash/stm32flash.mk b/package/stm32flash/stm32flash.mk new file mode 100644 index 00000000..a8ae9b01 --- /dev/null +++ b/package/stm32flash/stm32flash.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# stm32flash +# +################################################################################ + +STM32FLASH_VERSION = 3cebf121f7b32b9edfcb0d49f0fb43ccf33e5650 +STM32FLASH_SITE = git://git.code.sf.net/p/stm32flash/code +STM32FLASH_LICENSE = GPL-2.0+ +STM32FLASH_LICENSE_FILES = gpl-2.0.txt + +define STM32FLASH_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define STM32FLASH_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" \ + -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/strace/Config.in b/package/strace/Config.in new file mode 100644 index 00000000..c394d4c3 --- /dev/null +++ b/package/strace/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_STRACE + bool "strace" + # needs at least kernel headers 4.0 on nios2 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 || !BR2_nios2 + # needs at least kernel headers 5.0 on xtensa + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 || !BR2_xtensa + depends on !BR2_nds32 && !BR2_RISCV_32 + help + A useful diagnostic, instructional, and debugging tool. + Allows you to track what system calls a program makes + while it is running. + + If you want 'strace -k' to work, make sure to enable the + 'libunwind' package. + + https://strace.io + +comment "strace needs a toolchain w/ headers >= 4.0 on nios2" + depends on BR2_nios2 + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + +comment "strace needs a toolchain w/ headers >= 5.0 on xtensa" + depends on BR2_xtensa + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 diff --git a/package/strace/strace.hash b/package/strace/strace.hash new file mode 100644 index 00000000..e4a0f714 --- /dev/null +++ b/package/strace/strace.hash @@ -0,0 +1,6 @@ +# Locally calculated after checking signature with RSA key 0xA8041FA839E16E36 +# https://strace.io/files/5.10/strace-5.10.tar.xz.asc +sha256 fe3982ea4cd9aeb3b4ba35f6279f0b577a37175d3282be24b9a5537b56b8f01c strace-5.10.tar.xz +sha256 2002ee4a1dd70b004a1d3e3476d313464e13c77594fbef568cb2af58f52ed05e strace-5.14.tar.xz +sha256 6370eb67db918210944a8511a6995ebe9567852f26b4f15a01e5c8cf2aef7c46 COPYING +sha256 7c379436436a562834aa7d2f5dcae1f80a25230fa74201046ca1fba4367d39aa LGPL-2.1-or-later diff --git a/package/strace/strace.mk b/package/strace/strace.mk new file mode 100644 index 00000000..798d7077 --- /dev/null +++ b/package/strace/strace.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# strace +# +################################################################################ + +STRACE_VERSION = 5.14 +STRACE_SOURCE = strace-$(STRACE_VERSION).tar.xz +STRACE_SITE = https://strace.io/files/$(STRACE_VERSION) +STRACE_LICENSE = LGPL-2.1+ +STRACE_LICENSE_FILES = COPYING LGPL-2.1-or-later +STRACE_CPE_ID_VENDOR = strace_project +STRACE_CONF_OPTS = --enable-mpers=no + +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +STRACE_DEPENDENCIES += libunwind +STRACE_CONF_OPTS += --with-libunwind +else +STRACE_CONF_OPTS += --without-libunwind +endif + +# Demangling symbols in stack trace needs libunwind and libiberty. +ifeq ($(BR2_PACKAGE_BINUTILS)$(BR2_PACKAGE_LIBUNWIND),yy) +STRACE_DEPENDENCIES += binutils +STRACE_CONF_OPTS += --with-libiberty=check +else +STRACE_CONF_OPTS += --without-libiberty +endif + +ifeq ($(BR2_PACKAGE_PERL),) +define STRACE_REMOVE_STRACE_GRAPH + rm -f $(TARGET_DIR)/usr/bin/strace-graph +endef + +STRACE_POST_INSTALL_TARGET_HOOKS += STRACE_REMOVE_STRACE_GRAPH +endif + +$(eval $(autotools-package)) diff --git a/package/stress-ng/Config.in b/package/stress-ng/Config.in new file mode 100644 index 00000000..64b473b7 --- /dev/null +++ b/package/stress-ng/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_STRESS_NG + bool "stress-ng" + depends on BR2_USE_MMU # fork() + # perf.c needs PERF_COUNT_HW_REF_CPU_CYCLES + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + # fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2 and ARC + depends on !BR2_nios2 + depends on !BR2_arc + help + stress-ng will stress test a computer system in various + selectable ways. It was designed to exercise various physical + subsystems of a computer as well as the various operating + system kernel interfaces. + + http://kernel.ubuntu.com/~cking/stress-ng/ + +comment "stress-ng needs a toolchain w/ headers >= 3.3" + depends on !BR2_nios2 && !BR2_arc + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 diff --git a/package/stress-ng/stress-ng.hash b/package/stress-ng/stress-ng.hash new file mode 100644 index 00000000..41e28019 --- /dev/null +++ b/package/stress-ng/stress-ng.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 f847be115f60d3ad7d37c806fd1bfb1412aa3c631fca581d6dc233322f50d6a5 stress-ng-0.12.02.tar.xz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/stress-ng/stress-ng.mk b/package/stress-ng/stress-ng.mk new file mode 100644 index 00000000..53d7b7e5 --- /dev/null +++ b/package/stress-ng/stress-ng.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# stress-ng +# +################################################################################ + +STRESS_NG_VERSION = 0.12.02 +STRESS_NG_SOURCE = stress-ng-$(STRESS_NG_VERSION).tar.xz +STRESS_NG_SITE = https://kernel.ubuntu.com/~cking/tarballs/stress-ng +STRESS_NG_LICENSE = GPL-2.0+ +STRESS_NG_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +STRESS_NG_DEPENDENCIES += libbsd +endif + +ifeq ($(BR2_PACKAGE_KEYUTILS),y) +STRESS_NG_DEPENDENCIES += keyutils +endif + +define STRESS_NG_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +# Don't use make install otherwise stress-ng will be rebuild without +# required link libraries if any. Furthermore, using INSTALL allow to +# set the file permission correcly on the target. +define STRESS_NG_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/stress-ng $(TARGET_DIR)/usr/bin/stress-ng +endef + +$(eval $(generic-package)) diff --git a/package/stress/Config.in b/package/stress/Config.in new file mode 100644 index 00000000..b22c3f19 --- /dev/null +++ b/package/stress/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_STRESS + bool "stress" + depends on BR2_USE_MMU # fork() + help + A deliberately simple workload generator for POSIX systems. + It imposes a configurable amount of CPU, memory, I/O, and + disk stress on the system. + + http://people.seas.harvard.edu/~apw/stress/ diff --git a/package/stress/stress.hash b/package/stress/stress.hash new file mode 100644 index 00000000..8d14d053 --- /dev/null +++ b/package/stress/stress.hash @@ -0,0 +1,4 @@ +# Locally calculated after checking pgp signature +sha256 057e4fc2a7706411e1014bf172e4f94b63a12f18412378fca8684ca92408825b stress-1.0.4.tar.gz +# Locally computed +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/stress/stress.mk b/package/stress/stress.mk new file mode 100644 index 00000000..4d2d4cb8 --- /dev/null +++ b/package/stress/stress.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# stress +# +################################################################################ + +STRESS_VERSION = 1.0.4 +STRESS_SITE = http://people.seas.harvard.edu/~apw/stress +STRESS_LICENSE = GPL-2.0+ +STRESS_LICENSE_FILES = COPYING + +# Stress is linked statically if the --enable-static is specified. +# However, this option is always specified in the global +# SHARED_STATIC_LIBS_OPTS to tell packages to build static libraries, +# if supported. +# +# If the BR2_STATIC_LIBS is not defined, we have to specify +# --disable-static explicitly to get stress linked dynamically. +# +# Also, disable documentation by undefining makeinfo +STRESS_CONF_OPTS = \ + $(if $(BR2_STATIC_LIBS),,--disable-static) \ + MAKEINFO=: + +$(eval $(autotools-package)) diff --git a/package/stressapptest/Config.in b/package/stressapptest/Config.in new file mode 100644 index 00000000..71026bda --- /dev/null +++ b/package/stressapptest/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_STRESSAPPTEST + bool "stressapptest" + help + Stressful Application Test (or stressapptest, its unix name) is a memory interface test. + It tries to maximize randomized traffic to memory from processor and I/O, with the intent of creating a realistic high load situation in order to test the existing hardware devices in a computer. It has been used at Google for some time and now it is available under the apache 2.0 license. + + (Exported from code.google.com/p/stressapptest) + + Discussion group: https://groups.google.com/d/forum/stressapptest-discuss diff --git a/package/stressapptest/stressapptest.hash b/package/stressapptest/stressapptest.hash new file mode 100644 index 00000000..b266bd65 --- /dev/null +++ b/package/stressapptest/stressapptest.hash @@ -0,0 +1,2 @@ +sha256 2ba470587ad4f6ae92057d427c3a2a2756e5f10bd25cd91e62eaef55a40b30a1 stressapptest-1.0.9.tar.gz +sha256 3fb27e30590f2b5572ab81b32ebeab52f6474469663217486f4fa544f9cdcd2f COPYING diff --git a/package/stressapptest/stressapptest.mk b/package/stressapptest/stressapptest.mk new file mode 100644 index 00000000..c2257326 --- /dev/null +++ b/package/stressapptest/stressapptest.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# stressapptest +# +################################################################################ + +STRESSAPPTEST_VERSION = 1.0.9 +STRESSAPPTEST_SOURCE = stressapptest-$(STRESSAPPTEST_VERSION).tar.gz +STRESSAPPTEST_SITE = $(CURDIR)/dl/stressapptest +HELLOWORLD_SITE_METHOD = local +#STRESSAPPTEST_SITE = https://github.com/stressapptest/stressapptest +STRESS_LICENSE = GPL-2.0+ +STRESS_LICENSE_FILES = COPYING +STRESSAPPTEST_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/strongswan/Config.in b/package/strongswan/Config.in new file mode 100644 index 00000000..47c7107f --- /dev/null +++ b/package/strongswan/Config.in @@ -0,0 +1,137 @@ +comment "strongswan needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +menuconfig BR2_PACKAGE_STRONGSWAN + bool "strongswan" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on !BR2_STATIC_LIBS + help + strongSwan is an OpenSource IPsec implementation for the + Linux operating system. It is based on the discontinued + FreeS/WAN project and the X.509 patch. + + The focus is on: + - simplicity of configuration + - strong encryption and authentication methods + - powerful IPsec policies supporting large and complex + VPN networks + + strongSwan provide many plugins. Only a few are presented + here. + + http://www.strongswan.org/ + +if BR2_PACKAGE_STRONGSWAN + +choice + prompt "Cryptographic backend" + default BR2_PACKAGE_STRONGSWAN_GMP + +config BR2_PACKAGE_STRONGSWAN_OPENSSL + bool "OpenSSL" + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_STRONGSWAN_GCRYPT + bool "libgcrypt" + depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt + select BR2_PACKAGE_LIBGCRYPT + +config BR2_PACKAGE_STRONGSWAN_GMP + bool "GNU MP (libgmp)" + select BR2_PACKAGE_GMP + +config BR2_PACKAGE_STRONGSWAN_WOLFSSL + bool "wolfssl" + select BR2_PACKAGE_WOLFSSL + +endchoice + +config BR2_PACKAGE_STRONGSWAN_AF_ALG + bool "Enable AF_ALG crypto interface to Linux Crypto API" + +config BR2_PACKAGE_STRONGSWAN_CURL + bool "Enable CURL fetcher plugin to fetch files via libcurl" + select BR2_PACKAGE_LIBCURL + +config BR2_PACKAGE_STRONGSWAN_CHARON + bool "Enable the IKEv1/IKEv2 keying daemon charon" + default y + +if BR2_PACKAGE_STRONGSWAN_CHARON + +config BR2_PACKAGE_STRONGSWAN_TNCCS_11 + bool "Enable TNCCS 1.1 protocol module" + select BR2_PACKAGE_LIBXML2 + +config BR2_PACKAGE_STRONGSWAN_TNCCS_20 + bool "Enable TNCCS 2.0 protocol module" + +config BR2_PACKAGE_STRONGSWAN_TNCCS_DYNAMIC + bool "Enable dynamic TNCCS protocol discovery module" + +config BR2_PACKAGE_STRONGSWAN_EAP + bool "Enable EAP protocols" + help + Enable various EAP protocols: + - mschapv2 + - tls + - ttls + - peap + - sim + - sim-file + - aka + - aka-3gpp2 + - simaka-sql + - simaka-pseudonym + - simaka-reauth + - identity + - md5 + - gtc + - tnc + - dynamic + - radius + +if BR2_PACKAGE_STRONGSWAN_EAP + +config BR2_PACKAGE_STRONGSWAN_EAP_SIM_PCSC + bool "Enable EAP-SIM smart card backend" + depends on !BR2_STATIC_LIBS # pcsc-lite + select BR2_PACKAGE_PCSC_LITE + +endif + +config BR2_PACKAGE_STRONGSWAN_UNITY + bool "Enables Cisco Unity extension plugin" + +config BR2_PACKAGE_STRONGSWAN_STROKE + bool "Enable charons stroke configuration backend" + default y + +config BR2_PACKAGE_STRONGSWAN_SQL + bool "Enable SQL database configuration backend" + depends on BR2_PACKAGE_SQLITE || BR2_PACKAGE_MYSQL + +endif + +config BR2_PACKAGE_STRONGSWAN_PKI + bool "Enable pki certificate utility" + default y + +config BR2_PACKAGE_STRONGSWAN_SCEP + bool "Enable SCEP client tool" + +config BR2_PACKAGE_STRONGSWAN_SCRIPTS + bool "Enable additional utilities (found in scripts directory)" + default y + depends on BR2_PACKAGE_STRONGSWAN_CHARON + +config BR2_PACKAGE_STRONGSWAN_VICI + bool "Enable vici/swanctl" + default y + depends on BR2_PACKAGE_STRONGSWAN_CHARON + +endif diff --git a/package/strongswan/strongswan.hash b/package/strongswan/strongswan.hash new file mode 100644 index 00000000..a19b3114 --- /dev/null +++ b/package/strongswan/strongswan.hash @@ -0,0 +1,7 @@ +# From http://download.strongswan.org/strongswan-5.9.1.tar.bz2.md5 +md5 1f4db969d072e120dc12d1c116a0f658 strongswan-5.9.1.tar.bz2 +# Calculated based on the hash above +sha256 a337c9fb63d973b8440827755c784031648bf423b7114a04918b0b00fd42cafb strongswan-5.9.1.tar.bz2 +# Locally calculated +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 2292e21797754548dccdef9eef6aee7584e552fbd890fa914e1de8d3577d23f0 LICENSE diff --git a/package/strongswan/strongswan.mk b/package/strongswan/strongswan.mk new file mode 100644 index 00000000..322abfbd --- /dev/null +++ b/package/strongswan/strongswan.mk @@ -0,0 +1,92 @@ +################################################################################ +# +# strongswan +# +################################################################################ + +STRONGSWAN_VERSION = 5.9.1 +STRONGSWAN_SOURCE = strongswan-$(STRONGSWAN_VERSION).tar.bz2 +STRONGSWAN_SITE = http://download.strongswan.org +STRONGSWAN_LICENSE = GPL-2.0+ +STRONGSWAN_LICENSE_FILES = COPYING LICENSE +STRONGSWAN_CPE_ID_VENDOR = strongswan +STRONGSWAN_DEPENDENCIES = host-pkgconf +STRONGSWAN_INSTALL_STAGING = YES +STRONGSWAN_CONF_OPTS += \ + --without-lib-prefix \ + --enable-led \ + --enable-pkcs11=yes \ + --enable-kernel-netlink=yes \ + --enable-socket-default=yes \ + --enable-openssl=$(if $(BR2_PACKAGE_STRONGSWAN_OPENSSL),yes,no) \ + --enable-gcrypt=$(if $(BR2_PACKAGE_STRONGSWAN_GCRYPT),yes,no) \ + --enable-gmp=$(if $(BR2_PACKAGE_STRONGSWAN_GMP),yes,no) \ + --enable-af-alg=$(if $(BR2_PACKAGE_STRONGSWAN_AF_ALG),yes,no) \ + --enable-curl=$(if $(BR2_PACKAGE_STRONGSWAN_CURL),yes,no) \ + --enable-charon=$(if $(BR2_PACKAGE_STRONGSWAN_CHARON),yes,no) \ + --enable-tnccs-11=$(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_11),yes,no) \ + --enable-tnccs-20=$(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_20),yes,no) \ + --enable-tnccs-dynamic=$(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_DYNAMIC),yes,no) \ + --enable-eap-sim-pcsc=$(if $(BR2_PACKAGE_STRONGSWAN_EAP_SIM_PCSC),yes,no) \ + --enable-unity=$(if $(BR2_PACKAGE_STRONGSWAN_UNITY),yes,no) \ + --enable-stroke=$(if $(BR2_PACKAGE_STRONGSWAN_STROKE),yes,no) \ + --enable-sql=$(if $(BR2_PACKAGE_STRONGSWAN_SQL),yes,no) \ + --enable-pki=$(if $(BR2_PACKAGE_STRONGSWAN_PKI),yes,no) \ + --enable-scepclient=$(if $(BR2_PACKAGE_STRONGSWAN_SCEP),yes,no) \ + --enable-scripts=$(if $(BR2_PACKAGE_STRONGSWAN_SCRIPTS),yes,no) \ + --enable-vici=$(if $(BR2_PACKAGE_STRONGSWAN_VICI),yes,no) \ + --enable-swanctl=$(if $(BR2_PACKAGE_STRONGSWAN_VICI),yes,no) \ + --enable-wolfssl=$(if $(BR2_PACKAGE_STRONGSWAN_WOLFSSL),yes,no) \ + --with-ipseclibdir=/usr/lib \ + --with-plugindir=/usr/lib/ipsec/plugins \ + --with-imcvdir=/usr/lib/ipsec/imcvs \ + --with-dev-headers=/usr/include + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +STRONGSWAN_CONF_ENV += LIBS='-latomic' +endif + +ifeq ($(BR2_PACKAGE_STRONGSWAN_EAP),y) +STRONGSWAN_CONF_OPTS += \ + --enable-eap-sim \ + --enable-eap-sim-file \ + --enable-eap-aka \ + --enable-eap-aka-3gpp2 \ + --enable-eap-simaka-sql \ + --enable-eap-simaka-pseudonym \ + --enable-eap-simaka-reauth \ + --enable-eap-identity \ + --enable-eap-md5 \ + --enable-eap-gtc \ + --enable-eap-mschapv2 \ + --enable-eap-tls \ + --enable-eap-ttls \ + --enable-eap-peap \ + --enable-eap-tnc \ + --enable-eap-dynamic \ + --enable-eap-radius +STRONGSWAN_DEPENDENCIES += gmp +endif + +STRONGSWAN_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_STRONGSWAN_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_STRONGSWAN_GCRYPT),libgcrypt) \ + $(if $(BR2_PACKAGE_STRONGSWAN_GMP),gmp) \ + $(if $(BR2_PACKAGE_STRONGSWAN_CURL),libcurl) \ + $(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_11),libxml2) \ + $(if $(BR2_PACKAGE_STRONGSWAN_EAP_SIM_PCSC),pcsc-lite) \ + $(if $(BR2_PACKAGE_STRONGSWAN_WOLFSSL),wolfssl) + +ifeq ($(BR2_PACKAGE_STRONGSWAN_SQL),y) +STRONGSWAN_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_SQLITE),sqlite) \ + $(if $(BR2_PACKAGE_MYSQL),mysql) +endif + +# disable connmark/forecast until net/if.h vs. linux/if.h conflict resolved +# problem exist since linux 4.5 header changes +STRONGSWAN_CONF_OPTS += \ + --disable-connmark \ + --disable-forecast + +$(eval $(autotools-package)) diff --git a/package/stunnel/Config.in b/package/stunnel/Config.in new file mode 100644 index 00000000..e4a95677 --- /dev/null +++ b/package/stunnel/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_STUNNEL + bool "stunnel" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + help + Stunnel is a program that wraps any TCP connection with an SSL + connection. + + http://www.stunnel.org/ diff --git a/package/stunnel/S50stunnel b/package/stunnel/S50stunnel new file mode 100644 index 00000000..04637b69 --- /dev/null +++ b/package/stunnel/S50stunnel @@ -0,0 +1,35 @@ +#!/bin/sh + +start() { + printf "Starting stunnel: " + start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping stunnel: " + start-stop-daemon -K -q -p /var/run/stunnel.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/stunnel/stunnel.hash b/package/stunnel/stunnel.hash new file mode 100644 index 00000000..67d06a4d --- /dev/null +++ b/package/stunnel/stunnel.hash @@ -0,0 +1,5 @@ +# From https://www.stunnel.org/downloads/stunnel-5.57.tar.gz.sha256 +sha256 af5ab973dde11807c38735b87bdd87563a47d2fa1c72a07929fcfce80a600fe1 stunnel-5.57.tar.gz +# Locally calculated +sha256 d3055d327fd4daa5895fcf8fc4ebe993d06f40f2841ac995c6a69988d19bac4b COPYING.md +sha256 62f171d4d8b6726df61f18a6bbc0a70f79c4bc2134d837d35c81fc6289a2d84d COPYRIGHT.md diff --git a/package/stunnel/stunnel.mk b/package/stunnel/stunnel.mk new file mode 100644 index 00000000..51cb4a4d --- /dev/null +++ b/package/stunnel/stunnel.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# stunnel +# +################################################################################ + +STUNNEL_VERSION_MAJOR = 5 +STUNNEL_VERSION = $(STUNNEL_VERSION_MAJOR).57 +STUNNEL_SITE = http://www.usenix.org.uk/mirrors/stunnel/archive/$(STUNNEL_VERSION_MAJOR).x +STUNNEL_DEPENDENCIES = host-pkgconf openssl +STUNNEL_CONF_OPTS = --with-ssl=$(STAGING_DIR)/usr --with-threads=fork \ + --disable-libwrap +STUNNEL_CONF_ENV = \ + ax_cv_check_cflags___fstack_protector=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) \ + LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl` +STUNNEL_LICENSE = GPL-2.0+ +STUNNEL_LICENSE_FILES = COPYING.md COPYRIGHT.md +STUNNEL_CPE_ID_VENDOR = stunnel + +ifeq ($(BR2_INIT_SYSTEMD),y) +STUNNEL_DEPENDENCIES += systemd +else +STUNNEL_CONF_OPTS += --disable-systemd +endif + +define STUNNEL_INSTALL_CONF + $(INSTALL) -m 0644 -D $(@D)/tools/stunnel.conf \ + $(TARGET_DIR)/etc/stunnel/stunnel.conf + rm -f $(TARGET_DIR)/etc/stunnel/stunnel.conf-sample +endef + +STUNNEL_POST_INSTALL_TARGET_HOOKS += STUNNEL_INSTALL_CONF + +define STUNNEL_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/stunnel/S50stunnel $(TARGET_DIR)/etc/init.d/S50stunnel +endef + +$(eval $(autotools-package)) diff --git a/package/subversion/0001-workaround-ac-run-ifelse.patch b/package/subversion/0001-workaround-ac-run-ifelse.patch new file mode 100644 index 00000000..4f229dc4 --- /dev/null +++ b/package/subversion/0001-workaround-ac-run-ifelse.patch @@ -0,0 +1,23 @@ +build/ac-macros/macosx.m4: workaround AC_RUN_IFELSE + +The SVN_LIB_MACHO_ITERATE macro contains an AC_RUN_IFELSE test that +doesn't work when cross-compiling. However, this macro is related to +testing Mac OS X APIs, so in the context of Buildroot, we don't care, +and the test program is not even going to build. So we simply +workaround this by turning the test into an AC_COMPILE_IFELSE. + +Signed-off-by: Thomas Petazzoni + +Index: b/build/ac-macros/macosx.m4 +=================================================================== +--- a/build/ac-macros/macosx.m4 ++++ b/build/ac-macros/macosx.m4 +@@ -24,7 +24,7 @@ + AC_DEFUN(SVN_LIB_MACHO_ITERATE, + [ + AC_MSG_CHECKING([for Mach-O dynamic module iteration functions]) +- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + ]],[[ diff --git a/package/subversion/Config.in b/package/subversion/Config.in new file mode 100644 index 00000000..43e7dcca --- /dev/null +++ b/package/subversion/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_SUBVERSION + bool "subversion" + # apr really needs shared library support + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # apr + select BR2_PACKAGE_APR + select BR2_PACKAGE_APR_UTIL + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_LZ4 + select BR2_PACKAGE_UTF8PROC + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_SQLITE + help + Subversion is an open source version control system + + http://subversion.apache.org/ + +comment "subversion needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/subversion/subversion.hash b/package/subversion/subversion.hash new file mode 100644 index 00000000..534d5965 --- /dev/null +++ b/package/subversion/subversion.hash @@ -0,0 +1,5 @@ +# From https://www.apache.org/dist/subversion/subversion-1.14.1.tar.bz2.sha512 +sha512 0a70c7152b77cdbcb810a029263e4b3240b6ef41d1c19714e793594088d3cca758d40dfbc05622a806b06463becb73207df249393924ce591026b749b875fcdd subversion-1.14.1.tar.bz2 + +# Locally calculated +sha256 484aff0cfbb81155a10f903ed756e27e9fc65578c245a295bae295c4bb51eaad LICENSE diff --git a/package/subversion/subversion.mk b/package/subversion/subversion.mk new file mode 100644 index 00000000..d4cc7175 --- /dev/null +++ b/package/subversion/subversion.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# subversion +# +################################################################################ + +SUBVERSION_VERSION = 1.14.1 +SUBVERSION_SOURCE = subversion-$(SUBVERSION_VERSION).tar.bz2 +SUBVERSION_SITE = https://downloads.apache.org/subversion +SUBVERSION_LICENSE = Apache-2.0 +SUBVERSION_LICENSE_FILES = LICENSE +SUBVERSION_CPE_ID_VENDOR = apache +SUBVERSION_DEPENDENCIES = \ + host-pkgconf \ + apr \ + apr-util \ + expat \ + lz4 \ + utf8proc \ + zlib \ + sqlite \ + $(TARGET_NLS_DEPENDENCIES) +SUBVERSION_AUTORECONF = YES +SUBVERSION_CONF_OPTS = \ + --with-expat=$(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/lib: \ + --with-apr=$(STAGING_DIR)/usr \ + --with-apr-util=$(STAGING_DIR)/usr \ + --with-lz4=$(STAGING_DIR)/usr \ + --with-utf8proc=$(STAGING_DIR)/usr \ + --with-zlib=$(STAGING_DIR)/usr \ + --without-serf \ + --without-apxs \ + --without-berkeley-db \ + --without-sasl \ + --without-gnome-keyring \ + --without-libmagic +SUBVERSION_CONF_ENV = LIBS=$(TARGET_NLS_LIBS) + +$(eval $(autotools-package)) diff --git a/package/sudo/Config.in b/package/sudo/Config.in new file mode 100644 index 00000000..cbef15d6 --- /dev/null +++ b/package/sudo/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_SUDO + bool "sudo" + # uses fork() + depends on BR2_USE_MMU + help + Sudo is a program designed to allow a sysadmin to give + limited root privileges to users and log root activity. The + basic philosophy is to give as few privileges as possible + but still allow people to get their work done. + + http://www.sudo.ws/sudo/ diff --git a/package/sudo/sudo.hash b/package/sudo/sudo.hash new file mode 100644 index 00000000..ee30b322 --- /dev/null +++ b/package/sudo/sudo.hash @@ -0,0 +1,4 @@ +# From: http://www.sudo.ws/download.html +sha256 539e2ef43c8a55026697fb0474ab6a925a11206b5aa58710cb42a0e1c81f0978 sudo-1.9.5p2.tar.gz +# Locally calculated +sha256 505c5955c373514e2533a24a8346f44038e29cba874f5ca83beb171a7409089f doc/LICENSE diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk new file mode 100644 index 00000000..57c22925 --- /dev/null +++ b/package/sudo/sudo.mk @@ -0,0 +1,86 @@ +################################################################################ +# +# sudo +# +################################################################################ + +SUDO_VERSION_MAJOR = 1.9.5 +SUDO_VERSION_MINOR = p2 +SUDO_VERSION = $(SUDO_VERSION_MAJOR)$(SUDO_VERSION_MINOR) +SUDO_SITE = https://www.sudo.ws/sudo/dist +SUDO_LICENSE = ISC, BSD-3-Clause +SUDO_LICENSE_FILES = doc/LICENSE +SUDO_CPE_ID_VERSION = $(SUDO_VERSION_MAJOR) +SUDO_CPE_ID_UPDATE = $(SUDO_VERSION_MINOR) +# This is to avoid sudo's make install from chown()ing files which fails +SUDO_INSTALL_TARGET_OPTS = INSTALL_OWNER="" DESTDIR="$(TARGET_DIR)" install +SUDO_CONF_OPTS = \ + --without-lecture \ + --without-sendmail \ + --without-umask \ + --with-logging=syslog \ + --without-interfaces \ + --with-env-editor + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +define SUDO_INSTALL_PAM_CONF + $(INSTALL) -D -m 0644 package/sudo/sudo.pam $(TARGET_DIR)/etc/pam.d/sudo +endef + +SUDO_DEPENDENCIES += linux-pam +SUDO_CONF_OPTS += --with-pam +SUDO_POST_INSTALL_TARGET_HOOKS += SUDO_INSTALL_PAM_CONF +else +SUDO_CONF_OPTS += --without-pam +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +SUDO_CONF_OPTS += --enable-zlib +SUDO_DEPENDENCIES += zlib +else +SUDO_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_OPENLDAP),y) +SUDO_DEPENDENCIES += openldap +SUDO_CONF_OPTS += --with-ldap +# If we are building sudo statically and openldap was linked with openssl, then +# when we link sudo with openldap we need to specify the openssl libs, otherwise +# it will fail with "undefined reference" errors. +ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_OPENSSL),yy) +SUDO_DEPENDENCIES += host-pkgconf +SUDO_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`" +endif +else +SUDO_CONF_OPTS += --without-ldap +endif + +# mksigname/mksiglist needs to run on build host to generate source files +define SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST + $(MAKE) $(HOST_CONFIGURE_OPTS) \ + CPPFLAGS="$(HOST_CPPFLAGS) -I../../include -I../.." \ + -C $(@D)/lib/util mksigname mksiglist +endef + +SUDO_POST_CONFIGURE_HOOKS += SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST + +define SUDO_PERMISSIONS + /usr/bin/sudo f 4755 0 0 - - - - - +endef + +define SUDO_REMOVE_DIST_EXAMPLES + $(RM) $(TARGET_DIR)/etc/sudoers.dist + rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/sudoers.d +endef +SUDO_POST_INSTALL_TARGET_HOOKS += SUDO_REMOVE_DIST_EXAMPLES + +define SUDO_USERS + - - sudo -1 - - - - +endef + +define SUDO_ENABLE_SUDO_GROUP_RULE + $(SED) '/^# \%sudo\tALL=(ALL) ALL/s/^# //' $(TARGET_DIR)/etc/sudoers +endef +SUDO_POST_INSTALL_TARGET_HOOKS += SUDO_ENABLE_SUDO_GROUP_RULE + +$(eval $(autotools-package)) diff --git a/package/sudo/sudo.pam b/package/sudo/sudo.pam new file mode 100644 index 00000000..c6e6f20a --- /dev/null +++ b/package/sudo/sudo.pam @@ -0,0 +1,12 @@ +auth sufficient pam_rootok.so +auth required pam_wheel.so use_uid +auth required pam_env.so +auth required pam_unix.so nullok + +account required pam_unix.so + +password required pam_unix.so nullok + +session required pam_limits.so +session required pam_env.so +session required pam_unix.so diff --git a/package/sunwait/Config.in b/package/sunwait/Config.in new file mode 100644 index 00000000..e141c778 --- /dev/null +++ b/package/sunwait/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_SUNWAIT + bool "sunwait" + depends on BR2_INSTALL_LIBSTDCPP + help + Sunwait calculates sunrise or sunset times with civil, + nautical, astronomical and custom twilights. + + https://github.com/risacher/sunwait + +comment "sunwait needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/sunwait/sunwait.hash b/package/sunwait/sunwait.hash new file mode 100644 index 00000000..8396fa27 --- /dev/null +++ b/package/sunwait/sunwait.hash @@ -0,0 +1,3 @@ +# sha256 locally computed +sha256 ef26ed05882d5286a64a37c4044f99b877cc54f58a46f0e37ca60c93398df910 sunwait-7326b53e5406c7ebd552ae6dc0fc659252a18e7f.tar.gz +sha256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 LICENSE diff --git a/package/sunwait/sunwait.mk b/package/sunwait/sunwait.mk new file mode 100644 index 00000000..4b27e826 --- /dev/null +++ b/package/sunwait/sunwait.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# sunwait +# +################################################################################ + +SUNWAIT_VERSION = 7326b53e5406c7ebd552ae6dc0fc659252a18e7f +SUNWAIT_SITE = $(call github,risacher,sunwait,$(SUNWAIT_VERSION)) +SUNWAIT_LICENSE = GPL-3.0 +SUNWAIT_LICENSE_FILES = LICENSE + +SUNWAIT_MAKE_OPTS = \ + $(TARGET_CONFIGURE_OPTS) \ + C=$(TARGET_CXX) \ + CFLAGS="$(TARGET_CFLAGS) -c" \ + LDFLAGS="$(TARGET_LDFLAGS) -lm" + +define SUNWAIT_BUILD_CMDS + $(MAKE) $(SUNWAIT_MAKE_OPTS) -C $(@D) all +endef + +define SUNWAIT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/sunwait $(TARGET_DIR)/usr/bin/sunwait +endef + +$(eval $(generic-package)) diff --git a/package/sunxi-boards/Config.in b/package/sunxi-boards/Config.in new file mode 100644 index 00000000..eaf492f2 --- /dev/null +++ b/package/sunxi-boards/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_SUNXI_BOARDS + bool "sunxi script.bin board file" + depends on BR2_arm + depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-sunxi-tools + select BR2_PACKAGE_HOST_SUNXI_TOOLS + help + Sunxi-boards requires a compiled .fex files for hardware + description, used by the kernel during boot for hardware + initialization. This package is specific for linux-sunxi + kernel and it is useless for mainline kernel versions. + + https://github.com/linux-sunxi/sunxi-boards + +if BR2_PACKAGE_SUNXI_BOARDS +config BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE + string ".fex file to compile" + help + This field defines the name of the .fex file for which the + .bin file should be generated. + + This should be the path of the .fex file relative to the + sys_config/ directory, and including the .fex extension. + + See inside sys_config/ directory in sunxi-boards source code + to see the list of valid .fex files. +endif + +comment "sunxi script.bin board file needs a toolchain w/ host gcc >= 4.9" + depends on BR2_arm + depends on !BR2_HOST_GCC_AT_LEAST_4_9 diff --git a/package/sunxi-boards/sunxi-boards.hash b/package/sunxi-boards/sunxi-boards.hash new file mode 100644 index 00000000..75568240 --- /dev/null +++ b/package/sunxi-boards/sunxi-boards.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 ff1fa509fd5716d26c23a82e59300876a848122f745713a610f8f3c47d448064 sunxi-boards-a6a4e94066f4ec6b26fc7060dc453a6bcf26a504.tar.gz diff --git a/package/sunxi-boards/sunxi-boards.mk b/package/sunxi-boards/sunxi-boards.mk new file mode 100644 index 00000000..83b3842c --- /dev/null +++ b/package/sunxi-boards/sunxi-boards.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# sunxi-boards +# +################################################################################ + +SUNXI_BOARDS_VERSION = a6a4e94066f4ec6b26fc7060dc453a6bcf26a504 +SUNXI_BOARDS_SITE = $(call github,linux-sunxi,sunxi-boards,$(SUNXI_BOARDS_VERSION)) +SUNXI_BOARDS_DEPENDENCIES = host-sunxi-tools +SUNXI_BOARDS_INSTALL_IMAGES = YES +SUNXI_BOARDS_INSTALL_TARGET = NO +SUNXI_BOARDS_FEX_FILE = $(call qstrip,$(BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE)) + +define SUNXI_BOARDS_INSTALL_IMAGES_CMDS + $(FEX2BIN) $(@D)/sys_config/$(SUNXI_BOARDS_FEX_FILE) \ + $(BINARIES_DIR)/script.bin +endef + +ifeq ($(BR2_PACKAGE_SUNXI_BOARDS)$(BR_BUILDING),yy) +# we NEED a board name +ifeq ($(SUNXI_BOARDS_FEX_FILE),) +$(error No sunxi .fex file specified. Check your BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE settings) +endif +endif + +$(eval $(generic-package)) diff --git a/package/sunxi-cedarx/Config.in b/package/sunxi-cedarx/Config.in new file mode 100644 index 00000000..43fcce58 --- /dev/null +++ b/package/sunxi-cedarx/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_SUNXI_CEDARX + bool "sunxi-cedarx" + depends on BR2_arm + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Sunxi CedarX decoder libraries. CedarX is Allwinner's + multimedia co-processing technology for hardware accelerated + video and image decoding, as used inside their A10 SoC's and + others. + + http://github.com/linux-sunxi/cedarx-libs + http://linux-sunxi.org/CedarX + +comment "sunxi-cedarx needs a glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/sunxi-cedarx/sunxi-cedarx.hash b/package/sunxi-cedarx/sunxi-cedarx.hash new file mode 100644 index 00000000..048b8689 --- /dev/null +++ b/package/sunxi-cedarx/sunxi-cedarx.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 ea7426f83325d247ba0d4734eaf1cb53bab178a81f935e2535ddb3069f70ba84 sunxi-cedarx-b8f52d913f73720e50d8f1b2f8610467b575dc45.tar.gz diff --git a/package/sunxi-cedarx/sunxi-cedarx.mk b/package/sunxi-cedarx/sunxi-cedarx.mk new file mode 100644 index 00000000..5b99f041 --- /dev/null +++ b/package/sunxi-cedarx/sunxi-cedarx.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# sunxi-cedarx +# +################################################################################ + +SUNXI_CEDARX_VERSION = b8f52d913f73720e50d8f1b2f8610467b575dc45 +SUNXI_CEDARX_SITE = $(call github,linux-sunxi,cedarx-libs,$(SUNXI_CEDARX_VERSION)) + +SUNXI_CEDARX_INSTALL_STAGING = YES + +SUNXI_CEDARX_CONFIGURE_OPTS = \ + CROSS_COMPILE=$(TARGET_CROSS) + +ifeq ($(BR2_ARM_EABIHF),y) +SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armhf +else +SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armel2 +endif + +define SUNXI_CEDARX_BUILD_AVHEAP + $(TARGET_CC) $(TARGET_CFLAGS) -fPIC \ + -c $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.c \ + -o $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.o \ + -I $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap \ + -I $(SUNXI_CEDARX_BIN_DIR)/ + $(TARGET_CC) -shared -L./ -Wl,-soname,libavheap.so \ + -o $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \ + $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.o +endef + +define SUNXI_CEDARX_INSTALL_AVHEAP + $(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \ + $(1)/usr/lib/libavheap.so +endef + +define SUNXI_CEDARX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(SUNXI_CEDARX_BIN_DIR) \ + $(SUNXI_CEDARX_CONFIGURE_OPTS) + $(SUNXI_CEDARX_BUILD_AVHEAP) +endef + +define SUNXI_CEDARX_INSTALL_STAGING_CMDS + $(INSTALL) -d -m 755 $(STAGING_DIR)/usr/include/libvecore + $(INSTALL) -m 664 $(SUNXI_CEDARX_BIN_DIR)/libvecore/*.h \ + $(STAGING_DIR)/usr/include/libvecore + $(INSTALL) -m 644 $(SUNXI_CEDARX_BIN_DIR)/*.h \ + $(STAGING_DIR)/usr/include/ + $(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/libvecore/libvecore.so \ + $(STAGING_DIR)/usr/lib/libvecore.so + $(call SUNXI_CEDARX_INSTALL_AVHEAP, $(STAGING_DIR)) +endef + +define SUNXI_CEDARX_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/libvecore/libvecore.so \ + $(TARGET_DIR)/usr/lib/libvecore.so + $(call SUNXI_CEDARX_INSTALL_AVHEAP, $(TARGET_DIR)) +endef + +$(eval $(generic-package)) diff --git a/package/sunxi-mali-mainline-driver/Config.in b/package/sunxi-mali-mainline-driver/Config.in new file mode 100644 index 00000000..5db66c5b --- /dev/null +++ b/package/sunxi-mali-mainline-driver/Config.in @@ -0,0 +1,29 @@ +comment "sunxi-mali-mainline-driver needs a Linux kernel to be built" + depends on BR2_PACKAGE_SUNXI_MALI_MAINLINE + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER + bool "sunxi-mali-mainline-driver" + default y + depends on BR2_PACKAGE_SUNXI_MALI_MAINLINE # runtime + depends on BR2_LINUX_KERNEL + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + This package builds and installs the Linux kernel driver for + the Mali GPU on Allwinner platforms, compatible with recent + Linux kernels (>= 4.4). Note that it should be installed + together with the corresponding userspace OpenGL libraries, + which are provided as binaries only at: + https://github.com/bootlin/mali-blobs + + sunxi-mali-mainline-driver requires a Linux kernel >= 4.4 + with the following options enabled: + + - CONFIG_CMA + - CONFIG_DMA_CMA + + starting from Linux Kernel >= 4.20 following options must be + enabled: + - CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM + + https://github.com/mripard/sunxi-mali/blob/master/README.md diff --git a/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.hash b/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.hash new file mode 100644 index 00000000..f08e80f1 --- /dev/null +++ b/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 0197271dbf503e866dd4873091f61bb3de1f2c3031701aac1ba205d1e2f267ac sunxi-mali-mainline-driver-e4a91c95096bb31450b556fcb13f3c4ba79f60b4.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE diff --git a/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk b/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk new file mode 100644 index 00000000..feffaa7a --- /dev/null +++ b/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# sunxi-mali-mainline-driver +# +################################################################################ + +SUNXI_MALI_MAINLINE_DRIVER_VERSION = e4a91c95096bb31450b556fcb13f3c4ba79f60b4 +SUNXI_MALI_MAINLINE_DRIVER_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_MAINLINE_DRIVER_VERSION)) +SUNXI_MALI_MAINLINE_DRIVER_DEPENDENCIES = linux +SUNXI_MALI_MAINLINE_DRIVER_LICENSE = GPL-2.0 +SUNXI_MALI_MAINLINE_DRIVER_LICENSE_FILES = LICENSE + +SUNXI_MALI_MAINLINE_DRIVER_MAKE_OPTS = \ + $(LINUX_MAKE_FLAGS) \ + KDIR=$(LINUX_DIR) + +define SUNXI_MALI_MAINLINE_DRIVER_USE_APPLY_PATCHES + ln -sf $(SUNXI_MALI_MAINLINE_REV)/series $(@D)/patches + $(SED) 's|quilt push -a|$(TOPDIR)/support/scripts/apply-patches.sh . ../patches|' \ + $(@D)/build.sh +endef + +SUNXI_MALI_MAINLINE_DRIVER_POST_PATCH_HOOKS += SUNXI_MALI_MAINLINE_DRIVER_USE_APPLY_PATCHES + +define SUNXI_MALI_MAINLINE_DRIVER_BUILD_CMDS + cd $(@D) && $(SUNXI_MALI_MAINLINE_DRIVER_MAKE_OPTS) \ + $(SHELL) ./build.sh -r $(SUNXI_MALI_MAINLINE_REV) -j $(PARALLEL_JOBS) -b +endef + +define SUNXI_MALI_MAINLINE_DRIVER_INSTALL_TARGET_CMDS + cd $(@D) && $(SUNXI_MALI_MAINLINE_DRIVER_MAKE_OPTS) \ + $(SHELL) ./build.sh -r $(SUNXI_MALI_MAINLINE_REV) -j $(PARALLEL_JOBS) -i +endef + +define SUNXI_MALI_MAINLINE_DRIVER_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_CMA) + $(call KCONFIG_ENABLE_OPT,CONFIG_DMA_CMA) + $(call KCONFIG_ENABLE_OPT,CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM) +endef + +$(eval $(generic-package)) diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in new file mode 100644 index 00000000..a2fb95bd --- /dev/null +++ b/package/sunxi-mali-mainline/Config.in @@ -0,0 +1,42 @@ +config BR2_PACKAGE_SUNXI_MALI_MAINLINE + bool "sunxi-mali-mainline" + depends on BR2_aarch64 || (BR2_ARM_EABIHF && BR2_arm) + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + help + Install userspace Allwinner OpenGL libraries. + + https://github.com/bootlin/mali-blobs + +if BR2_PACKAGE_SUNXI_MALI_MAINLINE + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "sunxi-mali-mainline" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "sunxi-mali-mainline" + +choice + prompt "Version" + default BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 + help + Select the version of the userspace module. + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 + bool "r6p2" +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 + bool "r8p1" + +endchoice + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_REVISION + string + default "r6p2" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 + default "r8p1" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 + +endif + +comment "sunxi-mali needs an EABIhf glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_ARM_EABIHF diff --git a/package/sunxi-mali-mainline/egl.pc b/package/sunxi-mali-mainline/egl.pc new file mode 100644 index 00000000..3854e5ff --- /dev/null +++ b/package/sunxi-mali-mainline/egl.pc @@ -0,0 +1,12 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: ARM Mali implementation of EGL +Version: 1.4 +Requires: +Libs: -L${libdir} -lEGL -lGLESv2 +Cflags: -I${includedir} + diff --git a/package/sunxi-mali-mainline/glesv2.pc b/package/sunxi-mali-mainline/glesv2.pc new file mode 100644 index 00000000..6910b46a --- /dev/null +++ b/package/sunxi-mali-mainline/glesv2.pc @@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: glesv2 +Description: ARM Mali implementation of OpenGL ESv2 +Version: 2.0 +Requires: +Libs: -L${libdir} -lGLESv2 -lGLESv1_CM +Cflags: -I${includedir} + diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.hash b/package/sunxi-mali-mainline/sunxi-mali-mainline.hash new file mode 100644 index 00000000..e1c18fd4 --- /dev/null +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 72969ecf470b9e5ce787c2f8f36242926e1e892af0891924ee59a2cd206de39f sunxi-mali-mainline-d691cb93884ca8ac67860502117bbec283dc19aa.tar.gz +sha256 8a06bcae44a41a886f339b4338422415a786787f113e9ed6456ae117104a0b6a EULA_for_Mali_400MP_AW.pdf diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk new file mode 100644 index 00000000..701a1fbb --- /dev/null +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# sunxi-mali-mainline +# +################################################################################ + +SUNXI_MALI_MAINLINE_VERSION = d691cb93884ca8ac67860502117bbec283dc19aa +SUNXI_MALI_MAINLINE_SITE = $(call github,bootlin,mali-blobs,$(SUNXI_MALI_MAINLINE_VERSION)) +SUNXI_MALI_MAINLINE_INSTALL_STAGING = YES +SUNXI_MALI_MAINLINE_PROVIDES = libegl libgles +SUNXI_MALI_MAINLINE_LICENSE = Allwinner End User Licence Agreement +SUNXI_MALI_MAINLINE_EULA_ORIGINAL = EULA\ for\ Mali\ 400MP\ _AW.pdf +SUNXI_MALI_MAINLINE_EULA_NO_SPACES = EULA_for_Mali_400MP_AW.pdf +SUNXI_MALI_MAINLINE_LICENSE_FILES = $(SUNXI_MALI_MAINLINE_EULA_NO_SPACES) + +SUNXI_MALI_MAINLINE_REV = $(call qstrip,$(BR2_PACKAGE_SUNXI_MALI_MAINLINE_REVISION)) + +ifeq ($(BR2_arm),y) +SUNXI_MALI_MAINLINE_ARCH=arm +else ifeq ($(BR2_aarch64),y) +SUNXI_MALI_MAINLINE_ARCH=arm64 +endif + +define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include + + cp -rf $(@D)/$(SUNXI_MALI_MAINLINE_REV)/$(SUNXI_MALI_MAINLINE_ARCH)/fbdev/*.so* \ + $(STAGING_DIR)/usr/lib/ + cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + + $(INSTALL) -D -m 0644 package/sunxi-mali-mainline/egl.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + $(INSTALL) -D -m 0644 package/sunxi-mali-mainline/glesv2.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef + +define SUNXI_MALI_MAINLINE_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/lib + cp -rf $(@D)/$(SUNXI_MALI_MAINLINE_REV)/$(SUNXI_MALI_MAINLINE_ARCH)/fbdev/*.so* \ + $(TARGET_DIR)/usr/lib/ +endef + +define SUNXI_MALI_MAINLINE_FIXUP_LICENSE_FILE + mv $(@D)/$(SUNXI_MALI_MAINLINE_EULA_ORIGINAL) $(@D)/$(SUNXI_MALI_MAINLINE_EULA_NO_SPACES) +endef + +SUNXI_MALI_MAINLINE_POST_PATCH_HOOKS += SUNXI_MALI_MAINLINE_FIXUP_LICENSE_FILE + +$(eval $(generic-package)) diff --git a/package/sunxi-tools/0001-meminfo-Access-to-io-memory-via-pointers.patch b/package/sunxi-tools/0001-meminfo-Access-to-io-memory-via-pointers.patch new file mode 100644 index 00000000..997c413f --- /dev/null +++ b/package/sunxi-tools/0001-meminfo-Access-to-io-memory-via-pointers.patch @@ -0,0 +1,59 @@ +From 5c0a443ba336f10a8db6a99c769aa84ad37ed4d2 Mon Sep 17 00:00:00 2001 +From: Vadim Kochan +Date: Wed, 20 Feb 2019 02:48:43 +0200 +Subject: [PATCH] meminfo: Access to io memory via pointers + +The main reason for this is to be able compile with musl library, +because there is no support of inx/outx functions for ARM platform. + +Signed-off-by: Vadim Kochan +--- + meminfo.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/meminfo.c b/meminfo.c +index 0b0ff23..7d9f10f 100644 +--- a/meminfo.c ++++ b/meminfo.c +@@ -22,7 +22,6 @@ + #include + #include + #include +-#include + #include + + #include "common.h" +@@ -74,24 +73,26 @@ static enum sunxi_soc_version soc_version; + unsigned int + sunxi_io_read(void *base, int offset) + { +- return inl((unsigned long) (base + offset)); ++ unsigned long port = (unsigned long) (base + offset); ++ return *((volatile unsigned long *) port); + } + + void + sunxi_io_write(void *base, int offset, unsigned int value) + { +- outl(value, (unsigned long) (base + offset)); ++ unsigned long port = (unsigned long) (base + offset); ++ *((volatile unsigned long *) port) = value; + } + + void + sunxi_io_mask(void *base, int offset, unsigned int value, unsigned int mask) + { +- unsigned int tmp = inl((unsigned long) (base + offset)); ++ unsigned int tmp = sunxi_io_read(base, offset); + + tmp &= ~mask; + tmp |= value & mask; + +- outl(tmp, (unsigned long) (base + offset)); ++ sunxi_io_write(base, offset, tmp); + } + + +-- +2.14.1 + diff --git a/package/sunxi-tools/Config.in b/package/sunxi-tools/Config.in new file mode 100644 index 00000000..5f726672 --- /dev/null +++ b/package/sunxi-tools/Config.in @@ -0,0 +1,71 @@ +config BR2_PACKAGE_SUNXI_TOOLS + bool "sunxi-tools" + depends on BR2_arm + help + Tools for Allwinner A10 (aka sun4i) and A13 (aka sun5i) + based devices. + + http://linux-sunxi.org/Sunxi-tools + +if BR2_PACKAGE_SUNXI_TOOLS + +config BR2_PACKAGE_SUNXI_TOOLS_FEXC + bool "sunxi-fexc (fex2bin & bin2fex)" + help + Convert between .fex board definition files and binary + format. These tools are specific for the linux-sunxi kernel + and do not apply to the mainline Linux kernel version. + +config BR2_PACKAGE_SUNXI_TOOLS_BOOTINFO + bool "sunxi-bootinfo" + help + Displays information about sunxi boot code. + +config BR2_PACKAGE_SUNXI_TOOLS_FEL + bool "sunxi-fel" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + select BR2_PACKAGE_LIBUSB + help + The sunxi-fel command can interact with a sunxi device in + fel mode. This allows do download code to memory and execute + it. + +comment "sunxi-fel needs a toolchain w/ threads, gcc >= 4.9" + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_PACKAGE_SUNXI_TOOLS_NAND_PART + bool "sunxi-nand-part" + default y + help + The sunxi-nand-part command allows to repartition the internal + NAND on sunxi devices. + +config BR2_PACKAGE_SUNXI_TOOLS_PIO + bool "sunxi-pio" + help + GPIO manipulation tool for sunxi boards. + +config BR2_PACKAGE_SUNXI_TOOLS_MEMINFO + bool "sunxi-meminfo" + help + Utility to retrieve DRAM information from registers on + Allwinner SoCs. Specific for the linux-sunxi kernel - does + not apply to the mainline Linux kernel version. + +config BR2_PACKAGE_SUNXI_TOOLS_PHOENIX_INFO + bool "phoenix_info" + help + Display information about self-installing SD card images + (created with Phoenix Card). + + https://linux-sunxi.org/PhoenixCard + +config BR2_PACKAGE_SUNXI_TOOLS_NAND_IMAGE_BUILDER + bool "sunxi-nand-image-builder" + help + Creates a raw NAND image that can be read by the sunxi NAND + controller. + +endif # BR2_PACKAGE_SUNXI_TOOLS diff --git a/package/sunxi-tools/Config.in.host b/package/sunxi-tools/Config.in.host new file mode 100644 index 00000000..51f13cf6 --- /dev/null +++ b/package/sunxi-tools/Config.in.host @@ -0,0 +1,17 @@ +config BR2_PACKAGE_HOST_SUNXI_TOOLS + bool "host sunxi-tools" + depends on BR2_arm + depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-libusb + help + Tools for Allwinner A10 (aka sun4i) and A13 (aka sun5i) + based devices. This includes fex2bin which can be used to + compile .fex board definition files to the binary script.bin + format required by the linux-sunxi kernel. These tools are + specific for linux-sunxi kernel and do not apply to the + mainline Linux kernel version. + + http://linux-sunxi.org/Sunxi-tools + +comment "host sunxi-tools needs a toolchain w/ host gcc >= 4.9" + depends on BR2_arm + depends on !BR2_HOST_GCC_AT_LEAST_4_9 diff --git a/package/sunxi-tools/sunxi-tools.hash b/package/sunxi-tools/sunxi-tools.hash new file mode 100644 index 00000000..84acc2c7 --- /dev/null +++ b/package/sunxi-tools/sunxi-tools.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 81f48014a520cb83cac4e17f5ae627a637c4d6a422b60c693c5a705c92e43822 sunxi-tools-1.4.2.tar.gz +sha256 2b0d4dda4bf8034e1506507a67f80f982131137afe62bf144d248f9faea31da4 LICENSE.md diff --git a/package/sunxi-tools/sunxi-tools.mk b/package/sunxi-tools/sunxi-tools.mk new file mode 100644 index 00000000..c2913ee8 --- /dev/null +++ b/package/sunxi-tools/sunxi-tools.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# sunxi-tools +# +################################################################################ + +SUNXI_TOOLS_VERSION = 1.4.2 +SUNXI_TOOLS_SITE = $(call github,linux-sunxi,sunxi-tools,v$(SUNXI_TOOLS_VERSION)) +SUNXI_TOOLS_LICENSE = GPL-2.0+ +SUNXI_TOOLS_LICENSE_FILES = LICENSE.md +HOST_SUNXI_TOOLS_DEPENDENCIES = host-libusb host-pkgconf +FEX2BIN = $(HOST_DIR)/bin/fex2bin + +SUNXI_TOOLS_TARGETS_$(BR2_PACKAGE_SUNXI_TOOLS_FEXC) += sunxi-fexc +SUNXI_TOOLS_TARGETS_$(BR2_PACKAGE_SUNXI_TOOLS_BOOTINFO) += sunxi-bootinfo +SUNXI_TOOLS_TARGETS_$(BR2_PACKAGE_SUNXI_TOOLS_FEL) += sunxi-fel +SUNXI_TOOLS_TARGETS_$(BR2_PACKAGE_SUNXI_TOOLS_NAND_PART) += sunxi-nand-part +SUNXI_TOOLS_TARGETS_$(BR2_PACKAGE_SUNXI_TOOLS_PIO) += sunxi-pio +SUNXI_TOOLS_TARGETS_$(BR2_PACKAGE_SUNXI_TOOLS_MEMINFO) += sunxi-meminfo +SUNXI_TOOLS_TARGETS_$(BR2_PACKAGE_SUNXI_TOOLS_PHOENIX_INFO) += phoenix_info +SUNXI_TOOLS_TARGETS_$(BR2_PACKAGE_SUNXI_TOOLS_NAND_IMAGE_BUILDER) += \ + sunxi-nand-image-builder + +ifeq ($(BR2_PACKAGE_SUNXI_TOOLS_FEXC),y) +SUNXI_TOOLS_FEXC_LINKS += fex2bin bin2fex +endif + +ifeq ($(BR2_PACKAGE_SUNXI_TOOLS_FEL),y) +SUNXI_TOOLS_DEPENDENCIES += libusb host-pkgconf +endif + +define HOST_SUNXI_TOOLS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) CROSS_COMPILE="" CC="$(HOSTCC)" \ + PREFIX=$(HOST_DIR) EXTRA_CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" -C $(@D) tools misc +endef + +define HOST_SUNXI_TOOLS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) CROSS_COMPILE="" CC="$(HOSTCC)" \ + PREFIX=$(HOST_DIR) EXTRA_CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" -C $(@D) install-tools install-misc +endef + +define SUNXI_TOOLS_BUILD_CMDS + $(foreach t,$(SUNXI_TOOLS_TARGETS_y), \ + $(TARGET_MAKE_ENV) $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" \ + CC="$(TARGET_CC)" PREFIX=/usr \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) $(t) + ) +endef + +define SUNXI_TOOLS_INSTALL_TARGET_CMDS + $(foreach t,$(SUNXI_TOOLS_TARGETS_y), \ + $(INSTALL) -D -m 0755 $(@D)/$(t) $(TARGET_DIR)/usr/bin/$(t) + ) + $(foreach t,$(SUNXI_TOOLS_FEXC_LINKS), \ + ln -nfs sunxi-fexc $(TARGET_DIR)/usr/bin/$(t) + ) +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch b/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch new file mode 100644 index 00000000..9fac20a3 --- /dev/null +++ b/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch @@ -0,0 +1,35 @@ +From 23d0bb0ef0fde52d1cffe235edead09287326fb4 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 4 Oct 2020 01:11:30 +0200 +Subject: [PATCH] CMakeLists.txt: compile squirrel with -fPIC + +Ensure that squirrel is compiled with -fPIC to allow linking the static +libraries with dynamically linked programs. This is not a requirement +for most architectures but is mandatory for ARM. + +Fixes: +x86_64-buildroot-linux-musl/bin/ld: CMakeFiles/sq_static.dir/sq.c.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC +x86_64-buildroot-linux-musl/bin/ld: final link failed: nonrepresentable section on output + +Signed-off-by: Romain Naour +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b1dafa1e..07c603cce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -412,7 +412,8 @@ ExternalProject_Add(squirrel + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} + -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX} +- -DINSTALL_INC_DIR=include) ++ -DINSTALL_INC_DIR=include ++ -DCMAKE_POSITION_INDEPENDENT_CODE=ON) + + if(WIN32) + add_library(squirrel_lib SHARED IMPORTED) +-- +2.25.4 + diff --git a/package/supertux/0001-Fix-build-on-PowerPC.patch b/package/supertux/0001-Fix-build-on-PowerPC.patch new file mode 100644 index 00000000..e40abac6 --- /dev/null +++ b/package/supertux/0001-Fix-build-on-PowerPC.patch @@ -0,0 +1,81 @@ +From cfcd478fe69ca1b3923f388a349a4f67ac2c03aa Mon Sep 17 00:00:00 2001 +From: Shawn Anastasio +Date: Sun, 3 Feb 2019 13:22:57 -0600 +Subject: [PATCH] Fix build on PowerPC + +On PowerPC-based architectures, SDL includes the altivec.h header +for SIMD intrinsics. Unfortunately, altivec.h defines some types which +conflict with C++ types like bool and std::vector. This commit adds +a wrapper for altivec.h which resolves these conflicts and allows +supertux to build and run. + +Tested on a ppc64le workstation. + +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://github.com/SuperTux/supertux/pull/1056/commits/cfcd478fe69ca1b3923f388a349a4f67ac2c03aa] +--- + CMakeLists.txt | 15 ++++++++++++++- + src/ppc/altivec.h | 6 ++++++ + 2 files changed, 20 insertions(+), 1 deletion(-) + create mode 100644 src/ppc/altivec.h + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70b9673b50..b9b6ea3ea6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -376,6 +376,11 @@ endif() + + include(ConfigureChecks) + ++# Include altivec wrapper on ppc ++if(CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc.*") ++ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/ppc) ++endif() ++ + + ## Also build external/squirrel + +@@ -420,6 +425,13 @@ if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinygettext/CMakeLists.txt) + message(FATAL_ERROR "tinygettext submodule is not checked out or ${CMAKE_CURRENT_SOURCE_DIR}/external/tinygettext/CMakeLists.txt is missing") + endif() + ++# Include altivec wrapper on ppc ++if(CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc.*") ++ set(TINYGETTEXT_CXX_FLAGS "-isystem ${CMAKE_CURRENT_SOURCE_DIR}/src/ppc ${CMAKE_CXX_FLAGS}") ++else() ++ set(TINYGETTEXT_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ++endif() ++ + set(TINYGETTEXT_PREFIX ${CMAKE_BINARY_DIR}/tinygettext/) + ExternalProject_Add(tinygettext + SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/tinygettext/" +@@ -428,7 +440,7 @@ ExternalProject_Add(tinygettext + -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} + -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} +- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} ++ -DCMAKE_CXX_FLAGS=${TINYGETTEXT_CXX_FLAGS} + -DBUILD_SHARED_LIBS=OFF + -DHAVE_SDL=ON + -DVCPKG_BUILD=${VCPKG_BUILD} +@@ -443,6 +455,7 @@ set_target_properties(tinygettext_lib PROPERTIES IMPORTED_LOCATION "${TINYGETTEX + + include_directories(SYSTEM ${TINYGETTEXT_PREFIX}/include) + ++ + ## external/SDL_ttf with patches + find_package(Freetype REQUIRED) + find_package(RAQM) +diff --git a/src/ppc/altivec.h b/src/ppc/altivec.h +new file mode 100644 +index 0000000000..7ede8246ed +--- /dev/null ++++ b/src/ppc/altivec.h +@@ -0,0 +1,6 @@ ++#include_next ++ ++// The altivec headers redefine vector and bool which conflict ++// with C++'s bool type and std::vector. Undefine them here. ++#undef vector ++#undef bool diff --git a/package/supertux/0002-Fix-build-with-boost-1-73.patch b/package/supertux/0002-Fix-build-with-boost-1-73.patch new file mode 100644 index 00000000..000e5abc --- /dev/null +++ b/package/supertux/0002-Fix-build-with-boost-1-73.patch @@ -0,0 +1,25 @@ +From 4221d54385b69d6c40eff2c67bc6bad7ed165a44 Mon Sep 17 00:00:00 2001 +From: Lars Wendler +Date: Sat, 9 May 2020 03:04:02 +0200 +Subject: [PATCH] Fix build with boost-1.73 + +[Retrieved from: +https://github.com/SuperTux/supertux/commit/4221d54385b69d6c40eff2c67bc6bad7ed165a44] +Signed-off-by: Fabrice Fontaine +--- + src/editor/object_settings.hpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/editor/object_settings.hpp b/src/editor/object_settings.hpp +index bc9049a94e..15b77b1e46 100644 +--- a/src/editor/object_settings.hpp ++++ b/src/editor/object_settings.hpp +@@ -22,6 +22,8 @@ + + #include "editor/object_option.hpp" + ++#include ++ + class Color; + enum class Direction; + enum class WalkMode; diff --git a/package/supertux/Config.in b/package/supertux/Config.in new file mode 100644 index 00000000..5cacdd65 --- /dev/null +++ b/package/supertux/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_SUPERTUX + bool "supertux" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_HAS_LIBGL # libglew + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + depends on BR2_PACKAGE_XORG7 # libglew, SDL2 OpenGL (GLX) + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6 # C++14 + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal + depends on BR2_USE_MMU # SDL2 OpenGL (GLX) + depends on !BR2_STATIC_LIBS # SDL2 + depends on BR2_USE_WCHAR # Boost + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_DATE_TIME + select BR2_PACKAGE_BOOST_FILESYSTEM + select BR2_PACKAGE_BOOST_LOCALE + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBGLEW + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_OPENAL + select BR2_PACKAGE_PHYSFS + select BR2_PACKAGE_SDL2 + select BR2_PACKAGE_SDL2_IMAGE + select BR2_PACKAGE_SDL2_OPENGL + help + SuperTux is a free classic 2D jump'n run sidescroller game in + a style similar to the original Super Mario games covered + under the GNU GPL. + + http://supertux.github.io/ + +comment "supertux needs OpenGL and a toolchain w/ C++, gcc >= 6, NPTL, dynamic library, wchar" + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_LIBGL || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + BR2_STATIC_LIBS || !BR2_USE_WCHAR diff --git a/package/supertux/supertux.hash b/package/supertux/supertux.hash new file mode 100644 index 00000000..2b3ca799 --- /dev/null +++ b/package/supertux/supertux.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 c4c3e5fa6f90e87b8c5ad6b22a179e9a9839bf997e7f219e22bbcd1c97223ac0 SuperTux-v0.6.0-Source.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSE.txt +sha256 35c61f69239ff2f55fe0fa5dee5bad6bff311a07c47fa049552e0973a47c07bb data/AUTHORS diff --git a/package/supertux/supertux.mk b/package/supertux/supertux.mk new file mode 100644 index 00000000..e4a46309 --- /dev/null +++ b/package/supertux/supertux.mk @@ -0,0 +1,73 @@ +################################################################################ +# +# supertux +# +################################################################################ + +SUPERTUX_VERSION = 0.6.0 +SUPERTUX_SITE = https://github.com/SuperTux/supertux/releases/download/v$(SUPERTUX_VERSION) +SUPERTUX_SOURCE = SuperTux-v$(SUPERTUX_VERSION)-Source.tar.gz + +# Supertux itself is GPL-3.0+, but it bundles a few libraries with different +# licenses (sexp-cpp, squirrel, tinygettext) which are linked statically. +SUPERTUX_LICENSE = GPL-3.0+ (code), CC-BY-SA-2.0, CC-BY-SA-3.0, GPL-2.0+ (images music sounds) +SUPERTUX_LICENSE_FILES = LICENSE.txt data/AUTHORS + +# Use bundled squirrel, tinygettext sexp-cpp packages which are hardcoded in +# the CMake build system. +SUPERTUX_DEPENDENCIES = host-pkgconf boost freetype libcurl libgl libglew \ + libogg libpng libvorbis openal physfs sdl2 sdl2_image + +# CMAKE_BUILD_TYPE=Release: disable profiling code (-pg) +# ENABLE_BOOST_STATIC_LIBS=OFF: use boost shared libraries since supertux +# depends on !BR2_STATIC_LIBS and boost provide only shared libraries with +# BR2_SHARED_LIBS. +# ENABLE_OPENGL=ON: Can be disabled but will make SuperTux unplayable slow. +# GLBINDING_ENABLED=OFF: use GLEW (default) instead of glbinding. +# Install the game directly in /usr/bin and game data in /usr/share/supertux2. +# Force using physfs.so from staging since the check on PHYSFS_getPrefDir symbol +# in physfs.h (CHECK_SYMBOL_EXISTS) doesn't work. +# ENABLE_OPENGLES2=OFF: Disable opengles2 for now. +SUPERTUX_CONF_OPTS += \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -DGLEW_NO_GLU" \ + -DENABLE_BOOST_STATIC_LIBS=OFF \ + -DBUILD_DOCUMENTATION=OFF \ + -DENABLE_OPENGL=ON \ + -DGLBINDING_ENABLED=OFF \ + -DINSTALL_SUBDIR_BIN="bin" \ + -DINSTALL_SUBDIR_SHARE="share/supertux2" \ + -DUSE_SYSTEM_PHYSFS=ON \ + -DENABLE_OPENGLES2=OFF + +# Avoid incompatible posix_memalign declaration on x86 and x86_64 with +# musl. +# https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01425.html +ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_i386)$(BR2_x86_64),y:y) +define SUPERTUX_REMOVE_PEDANTIC + $(SED) 's% -pedantic%%' $(@D)/CMakeLists.txt + $(SED) 's%CHECK_CXX_FLAG(pedantic)%%' $(@D)/external/tinygettext/CMakeLists.txt +endef +SUPERTUX_POST_PATCH_HOOKS += SUPERTUX_REMOVE_PEDANTIC +endif + +# From https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670 +# "The problem lies within SDL_cpuinfo.h. It includes altivec.h, which by +# definition provides an unconditional vector, pixel and bool define in +# standard-c++ mode. In GNU-c++ mode this names are only defined +# context-sensitive by cpp. SDL_cpuinfo.h is included by SDL.h. +# Including altivec.h makes arbitrary code break." +# +# Acording to a bug report in GCC [1]: +# "You need to use -std=g++11 or undefine bool after the include of altivec.h +# as context sensitive keywords is not part of the C++11 standard". +# So use gnu++11 instead of c++11 only for altivec system. +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58241#c3 +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) +define SUPERTUX_FIX_ALTIVEC_ISSUE + $(SED) 's%std=c++0x%std=gnu++0x%' $(@D)/external/tinygettext/CMakeLists.txt +endef +SUPERTUX_POST_PATCH_HOOKS += SUPERTUX_FIX_ALTIVEC_ISSUE +endif + +$(eval $(cmake-package)) diff --git a/package/supertuxkart/Config.in b/package/supertuxkart/Config.in new file mode 100644 index 00000000..99f2310d --- /dev/null +++ b/package/supertuxkart/Config.in @@ -0,0 +1,46 @@ +config BR2_PACKAGE_SUPERTUXKART + bool "supertuxkart" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP # openal + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # openal + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS # openal + depends on BR2_PACKAGE_HAS_LIBGL + depends on BR2_PACKAGE_XORG7 + depends on !BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_ENET + select BR2_PACKAGE_HARFBUZZ + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBFRIBIDI + select BR2_PACKAGE_LIBGLEW + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBSQUISH + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_NETTLE if !BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_OPENAL + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_ZLIB + help + Karts. Nitro. Action! SuperTuxKart is a free 3D arcade kart + racer with multiple karts, tracks and modes you can play. + Beat the evil Nolok by any means necessary, and make the + mascot kingdom safe once again! + + http://supertuxkart.sourceforge.net/Main_Page + +comment "supertuxkart needs an OpenGL backend, a uClibc or glibc toolchain w/ NPTL, C++, gcc >= 4.9" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_USE_MMU + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + depends on BR2_PACKAGE_XORG7 + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL \ + || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \ + || !BR2_PACKAGE_HAS_LIBGL \ + || BR2_TOOLCHAIN_USES_MUSL diff --git a/package/supertuxkart/supertuxkart.hash b/package/supertuxkart/supertuxkart.hash new file mode 100644 index 00000000..9654ad24 --- /dev/null +++ b/package/supertuxkart/supertuxkart.hash @@ -0,0 +1,8 @@ +# Locally computed +sha256 e9b02b0b11ab68aacaec38306903feffe59a501224805cd3645cebf10e880ae8 supertuxkart-1.1-src.tar.xz +# From https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/1.1/ +sha1 68be26f4b15d30dede26563cbcc6de999036c5e0 supertuxkart-1.1-src.tar.xz +md5 731569c58428f32a0e46943fad7ba1e3 supertuxkart-1.1-src.tar.xz + +# Locally computed +sha256 d27207a5213f746aac53893e9ecc18456e9595d3ffa662bd1ec9eb10787c214a COPYING diff --git a/package/supertuxkart/supertuxkart.mk b/package/supertuxkart/supertuxkart.mk new file mode 100644 index 00000000..97cd2a40 --- /dev/null +++ b/package/supertuxkart/supertuxkart.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# supertuxkart +# +################################################################################ + +SUPERTUXKART_VERSION = 1.1 +SUPERTUXKART_SOURCE = supertuxkart-$(SUPERTUXKART_VERSION)-src.tar.xz +SUPERTUXKART_SITE = http://downloads.sourceforge.net/project/supertuxkart/SuperTuxKart/$(SUPERTUXKART_VERSION) + +# Supertuxkart itself is GPL-3.0+, but it bundles a few libraries with different +# licenses. Irrlicht, bullet and angelscript have Zlib license, while glew is +# BSD-3-Clause. Since they are linked statically, the result is GPL-3.0+. +SUPERTUXKART_LICENSE = GPL-3.0+ +SUPERTUXKART_LICENSE_FILES = COPYING + +SUPERTUXKART_DEPENDENCIES = \ + host-pkgconf \ + freetype \ + enet \ + harfbuzz \ + jpeg \ + libcurl \ + libfribidi \ + libgl \ + libglew \ + libogg \ + libpng \ + libsquish \ + libvorbis \ + openal \ + xlib_libXrandr \ + zlib + +# Since supertuxkart is not installing libstkirrlicht.so, and since it is +# the only user of the bundled libraries, turn off shared libraries entirely. +# Disable In-game recorder (there is no libopenglrecorder package) +SUPERTUXKART_CONF_OPTS = -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_RECORDER=OFF \ + -DUSE_SYSTEM_GLEW=ON \ + -DUSE_SYSTEM_ENET=ON \ + -DUSE_SYSTEM_SQUISH=ON + +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS),y) +SUPERTUXKART_DEPENDENCIES += bluez5_utils +SUPERTUXKART_CONF_OPTS += -DUSE_WIIUSE=ON -DUSE_SYSTEM_WIIUSE=ON +else +# Wiimote support relies on bluez5. +SUPERTUXKART_CONF_OPTS += -DUSE_WIIUSE=OFF +endif + +# Prefer openssl (the default) over nettle. +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SUPERTUXKART_DEPENDENCIES += openssl +SUPERTUXKART_CONF_OPTS += -DUSE_CRYPTO_OPENSSL=ON +else +SUPERTUXKART_DEPENDENCIES += nettle +SUPERTUXKART_CONF_OPTS += -DUSE_CRYPTO_OPENSSL=OFF +endif + +ifeq ($(BR2_PACKAGE_SQLITE),y) +SUPERTUXKART_DEPENDENCIES += sqlite +SUPERTUXKART_CONF_OPTS += -DUSE_SQLITE3=ON +else +SUPERTUXKART_CONF_OPTS += -DUSE_SQLITE3=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/supervisor/Config.in b/package/supervisor/Config.in new file mode 100644 index 00000000..623c3a83 --- /dev/null +++ b/package/supervisor/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_SUPERVISOR + bool "supervisor" + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_MELD3 + select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime dependency + help + A client/server system that allows its users to control a + number of processes on UNIX-like operating systems. + + http://supervisord.org/ + +comment "supervisor needs a python interpreter" + depends on !BR2_PACKAGE_PYTHON + depends on !BR2_PACKAGE_PYTHON3 diff --git a/package/supervisor/S99supervisord b/package/supervisor/S99supervisord new file mode 100644 index 00000000..921dcf63 --- /dev/null +++ b/package/supervisor/S99supervisord @@ -0,0 +1,29 @@ +#!/bin/sh + +mkdir -p /var/log/supervisor + +case "$1" in + start) + printf "Starting supervisord: " + start-stop-daemon -S -q -p /var/run/supervisord.pid --exec /usr/bin/supervisord + echo "done" + ;; + stop) + printf "Stopping supervisord: " + start-stop-daemon -K -q -p /var/run/supervisord.pid + echo "done" + ;; + restart) + "$0" stop + sleep 5 + "$0" start + ;; + reload) + start-stop-daemon -K -q -p /var/run/supervisord.pid -s HUP + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $? diff --git a/package/supervisor/supervisor.hash b/package/supervisor/supervisor.hash new file mode 100644 index 00000000..98a03aa1 --- /dev/null +++ b/package/supervisor/supervisor.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 2dc86fe0476e945e61483d614ceb2cf4f93b95282eb243bdf792621994360383 supervisor-4.1.0.tar.gz +sha256 7b8dbd54ab1543b07b2fc5f6f5ab50d89d26c1c4952af93a579d8c52c56b8de4 COPYRIGHT.txt +sha256 4c35fda9f70bb7883fd94e5a4d5addd88ad1a6d5d15e21c9d17c4d96fdc5e369 LICENSES.txt diff --git a/package/supervisor/supervisor.mk b/package/supervisor/supervisor.mk new file mode 100644 index 00000000..92e83230 --- /dev/null +++ b/package/supervisor/supervisor.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# supervisor +# +################################################################################ + +SUPERVISOR_VERSION = 4.1.0 +SUPERVISOR_SITE = https://files.pythonhosted.org/packages/de/87/ee1ad8fa533a4b5f2c7623f4a2b585d3c1947af7bed8e65bc7772274320e +SUPERVISOR_LICENSE = BSD-like, rdflib (http_client.py), PSF (medusa) +SUPERVISOR_LICENSE_FILES = COPYRIGHT.txt LICENSES.txt +SUPERVISOR_CPE_ID_VENDOR = supervisord +SUPERVISOR_SETUP_TYPE = setuptools + +define SUPERVISOR_INSTALL_CONF_FILES + $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/supervisor.d + $(INSTALL) -D -m 644 package/supervisor/supervisord.conf \ + $(TARGET_DIR)/etc/supervisord.conf +endef + +SUPERVISOR_POST_INSTALL_TARGET_HOOKS += SUPERVISOR_INSTALL_CONF_FILES + +define SUPERVISOR_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/supervisor/S99supervisord \ + $(TARGET_DIR)/etc/init.d/S99supervisord +endef + +define SUPERVISOR_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/supervisor/supervisord.service \ + $(TARGET_DIR)/usr/lib/systemd/system/supervisord.service +endef + +$(eval $(python-package)) diff --git a/package/supervisor/supervisord.conf b/package/supervisor/supervisord.conf new file mode 100644 index 00000000..1372a688 --- /dev/null +++ b/package/supervisor/supervisord.conf @@ -0,0 +1,18 @@ +[unix_http_server] +file = /var/run/supervisor.sock + +[supervisord] +logfile = /var/log/supervisor/supervisord.log +logfile_maxbytes = 200KB +logfile_backups = 1 +pidfile = /var/run/supervisord.pid +childlogdir = /var/log/supervisor + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl = unix:///var/run/supervisor.sock + +[include] +files = /etc/supervisor.d/*.conf diff --git a/package/supervisor/supervisord.service b/package/supervisor/supervisord.service new file mode 100644 index 00000000..92c38c7d --- /dev/null +++ b/package/supervisor/supervisord.service @@ -0,0 +1,10 @@ +[Unit] +Description=Process Control System +After=syslog.target + +[Service] +ExecStart=/usr/bin/supervisord -n +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/suricata/0001-python-ensure-proper-shabang-on-python-scripts.patch b/package/suricata/0001-python-ensure-proper-shabang-on-python-scripts.patch new file mode 100644 index 00000000..424b30d3 --- /dev/null +++ b/package/suricata/0001-python-ensure-proper-shabang-on-python-scripts.patch @@ -0,0 +1,47 @@ +From 44fe2328b715db25134ee095526d2fa47e6cd834 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Wed, 1 Jan 2020 15:25:57 +0100 +Subject: [PATCH] python: ensure proper shabang on python scripts + +When instlling python scripts, distutils would use the python used to +run setup.py as shabang for the scripts it installs. + +However, when cross-compiling, this is most often not correct. + +Instead, using '/usr/bin/env python' is guaranteed to find the proper +python in the PATH, so we need to instruct setyup.py to use that as the +executable. + +[yann.morin.1998@free.fr: + - author did not provide their SoB, but it's simple enough to + not require it for once + - provide proper commit log +] +Signed-off-by: Yann E. MORIN +[Fabrice: update for 6.0.0] +Signed-off-by: Fabrice Fontaine +--- + python/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/python/Makefile.am b/python/Makefile.am +index 59d195f29..a41604f72 100644 +--- a/python/Makefile.am ++++ b/python/Makefile.am +@@ -6,11 +6,11 @@ EXTRA_DIST = setup.py \ + if HAVE_PYTHON_DISTUTILS + all-local: + cd $(srcdir) && \ +- $(HAVE_PYTHON) setup.py build --build-base "$(abs_builddir)" ++ $(HAVE_PYTHON) setup.py build -e "/usr/bin/env python" --build-base "$(abs_builddir)" + + install-exec-local: + cd $(srcdir) && \ +- $(HAVE_PYTHON) setup.py build --build-base "$(abs_builddir)" \ ++ $(HAVE_PYTHON) setup.py build -e "/usr/bin/env python" --build-base "$(abs_builddir)" \ + install --prefix $(DESTDIR)$(prefix) + + uninstall-local: +-- +2.20.1 + diff --git a/package/suricata/0002-configure.ac-allow-the-user-to-override-RUST_TARGET.patch b/package/suricata/0002-configure.ac-allow-the-user-to-override-RUST_TARGET.patch new file mode 100644 index 00000000..ec876a68 --- /dev/null +++ b/package/suricata/0002-configure.ac-allow-the-user-to-override-RUST_TARGET.patch @@ -0,0 +1,35 @@ +From 7ab4d5eb55e1d3900390b76e5f46e80e22d4e80e Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 10 Oct 2020 21:34:21 +0200 +Subject: [PATCH] configure.ac: allow the user to override RUST_TARGET + +When cross-compiling, RUST_TARGET is not always equal to host_triplet +(e.g. buildroot) so allow the user to override this default value +through RUST_TARGET environment variable + +Signed-off-by: Fabrice Fontaine +--- + configure.ac | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 32c230209..7d7c9373f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2489,7 +2489,12 @@ fi + have_rust_vendor="no" + + if test "x$cross_compiling" = "xyes"; then +- RUST_SURICATA_LIB_XC_DIR="${host_alias}/" ++ if test "x$RUST_TARGET" != "x"; then ++ RUST_SURICATA_LIB_XC_DIR="$RUST_TARGET/" ++ AC_SUBST([RUST_TARGET],["--target $RUST_TARGET"]) ++ else ++ RUST_SURICATA_LIB_XC_DIR="${host_alias}/" ++ fi + else + if test "x$CARGO_BUILD_TARGET" = "x"; then + RUST_SURICATA_LIB_XC_DIR= +-- +2.28.0 + diff --git a/package/suricata/Config.in b/package/suricata/Config.in new file mode 100644 index 00000000..5f7eb21d --- /dev/null +++ b/package/suricata/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_SURICATA + bool "suricata" + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_HOST_RUSTC + select BR2_PACKAGE_JANSSON + select BR2_PACKAGE_LIBHTP + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBYAML + select BR2_PACKAGE_PCRE + help + Suricata is a free and open source, mature, fast and robust + network threat detection engine. + + The Suricata engine is capable of real time intrusion + detection (IDS), inline intrusion prevention (IPS), network + security monitoring (NSM) and offline pcap processing. + + https://suricata-ids.org + +comment "suricata needs a toolchain w/ wchar, threads" + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/suricata/S99suricata b/package/suricata/S99suricata new file mode 100644 index 00000000..7c2b9665 --- /dev/null +++ b/package/suricata/S99suricata @@ -0,0 +1,64 @@ +#!/bin/sh + +DAEMON=suricata +PIDFILE=/var/run/$DAEMON.pid + +SURICATA_ARGS="-c /etc/suricata/suricata.yaml -i eth0" + +SURICATA_RELOAD=0 + +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + +start() { + printf 'Starting %s: ' "$DAEMON" + mkdir -p /var/log/suricata + start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \ + -- $SURICATA_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + rm -f "$PIDFILE" + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +# SIGUSR2 makes suricata reload rules +reload() { + printf 'Reloading %s: ' "$DAEMON" + start-stop-daemon -K -s "$SURICATA_RELOAD" -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +case "$1" in + start|stop|restart|reload) + "$1";; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/suricata/suricata.hash b/package/suricata/suricata.hash new file mode 100644 index 00000000..74cc7435 --- /dev/null +++ b/package/suricata/suricata.hash @@ -0,0 +1,6 @@ +# Locally computed: +sha256 daf134bb2d7c980035e9ae60f7aaf313323a809340009f26e48110ccde81f602 suricata-6.0.3.tar.gz + +# Hash for license files: +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE diff --git a/package/suricata/suricata.mk b/package/suricata/suricata.mk new file mode 100644 index 00000000..ebeaa68d --- /dev/null +++ b/package/suricata/suricata.mk @@ -0,0 +1,135 @@ +################################################################################ +# +# suricata +# +################################################################################ + +SURICATA_VERSION = 6.0.3 +SURICATA_SITE = https://www.openinfosecfoundation.org/download +SURICATA_LICENSE = GPL-2.0 +SURICATA_LICENSE_FILES = COPYING LICENSE +# 0001-python-ensure-proper-shabang-on-python-scripts.patch +# 0002-configure.ac-allow-the-user-to-override-RUST_TARGET.patch +SURICATA_AUTORECONF = YES + +SURICATA_DEPENDENCIES = \ + host-pkgconf \ + host-rustc \ + jansson \ + $(if $(BR2_PACKAGE_LIBCAP_NG),libcap-ng) \ + $(if $(BR2_PACKAGE_LIBEVENT),libevent) \ + libhtp \ + $(if $(BR2_PACKAGE_LIBNFNETLINK),libnfnetlink) \ + libpcap \ + libyaml \ + $(if $(BR2_PACKAGE_LZ4),lz4) \ + pcre \ + $(if $(BR2_PACKAGE_XZ),xz) + +SURICATA_CONF_ENV = \ + ac_cv_path_HAVE_SPHINXBUILD=no \ + CARGO_HOME=$(HOST_DIR)/share/cargo \ + RUST_TARGET=$(RUSTC_TARGET_NAME) + +SURICATA_CONF_OPTS = \ + --disable-gccprotect \ + --disable-pie \ + --disable-suricata-update \ + --enable-non-bundled-htp + +# install: install binaries +# install-conf: install initial configuration files +# install-full: install binaries, configuration and rules (rules will be +# download through wget/curl) +SURICATA_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install install-conf + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +SURICATA_CONF_ENV += LIBS=-latomic +endif + +ifeq ($(BR2_PACKAGE_FILE),y) +SURICATA_DEPENDENCIES += file +SURICATA_CONF_OPTS += --enable-libmagic +else +SURICATA_CONF_OPTS += --disable-libmagic +endif + +ifeq ($(BR2_PACKAGE_LIBMAXMINDDB),y) +SURICATA_DEPENDENCIES += libmaxminddb +SURICATA_CONF_OPTS += --enable-geoip +else +SURICATA_CONF_OPTS += --disable-geoip +endif + +ifeq ($(BR2_PACKAGE_HIREDIS),y) +SURICATA_DEPENDENCIES += hiredis +SURICATA_CONF_OPTS += --enable-hiredis +else +SURICATA_CONF_OPTS += --disable-hiredis +endif + +ifeq ($(BR2_PACKAGE_LIBNET),y) +SURICATA_DEPENDENCIES += libnet +SURICATA_CONF_OPTS += --with-libnet-includes=$(STAGING_DIR)/usr/include +endif + +ifeq ($(BR2_PACKAGE_LIBNETFILTER_LOG),y) +SURICATA_DEPENDENCIES += libnetfilter_log +SURICATA_CONF_OPTS += --enable-nflog +else +SURICATA_CONF_OPTS += --disable-nflog +endif + +ifeq ($(BR2_PACKAGE_LIBNETFILTER_QUEUE),y) +SURICATA_DEPENDENCIES += libnetfilter_queue +SURICATA_CONF_OPTS += --enable-nfqueue +else +SURICATA_CONF_OPTS += --disable-nfqueue +endif + +ifeq ($(BR2_PACKAGE_LIBNSPR),y) +SURICATA_DEPENDENCIES += libnspr +SURICATA_CONF_OPTS += --enable-nspr +else +SURICATA_CONF_OPTS += --disable-nspr +endif + +ifeq ($(BR2_PACKAGE_LIBNSS),y) +SURICATA_DEPENDENCIES += libnss +SURICATA_CONF_OPTS += --enable-nss +else +SURICATA_CONF_OPTS += --disable-nss +endif + +ifeq ($(BR2_PACKAGE_LUA),y) +SURICATA_CONF_OPTS += --enable-lua +SURICATA_DEPENDENCIES += lua +else +SURICATA_CONF_OPTS += --disable-lua +endif + +ifeq ($(BR2_PACKAGE_LUAJIT),y) +SURICATA_CONF_OPTS += --enable-luajit +SURICATA_DEPENDENCIES += luajit +else +SURICATA_CONF_OPTS += --disable-luajit +endif + +ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) +SURICATA_CONF_OPTS += --enable-python +SURICATA_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3) +else +SURICATA_CONF_OPTS += --disable-python +endif + +define SURICATA_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/suricata/S99suricata \ + $(TARGET_DIR)/etc/init.d/S99suricata +endef + +define SURICATA_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/suricata/suricata.service \ + $(TARGET_DIR)/usr/lib/systemd/system/suricata.service +endef + +$(eval $(autotools-package)) diff --git a/package/suricata/suricata.service b/package/suricata/suricata.service new file mode 100644 index 00000000..f5cd46ac --- /dev/null +++ b/package/suricata/suricata.service @@ -0,0 +1,14 @@ +[Unit] +Description=Suricata Intrusion Detection Service +After=network.target + +[Service] +EnvironmentFile=-/etc/default/suricata +ExecStartPre=/bin/rm -f /var/run/suricata.pid +ExecStartPre=/usr/bin/mkdir -p /var/log/suricata +ExecStart=/usr/bin/suricata -c /etc/suricata/suricata.yaml -i eth0 --pidfile /var/run/suricata.pid +ExecReload=/bin/kill -USR2 $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/swconfig/.swconfig.mk b/package/swconfig/.swconfig.mk new file mode 100644 index 00000000..2219a1b0 --- /dev/null +++ b/package/swconfig/.swconfig.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# swconfig +# +################################################################################ + +SWCONFIG_VERSION = 20150806 +SWCONFIG_SITE = $(call github,rains31,swconfig,$(SWCONFIG_VERSION)) +SWCONFIG_LICENSE = GPL-2.0 +SWCONFIG_DEPENDENCIES = libnl + +# redefine original CFLAGS as it points directly to /usr/include +SWCONFIG_MAKE_ENV = CC="$(TARGET_CC)" \ + CFLAGS="-I. -I$(STAGING_DIR)/usr/include/libnl3" + +define SWCONFIG_BUILD_CMDS + $(SWCONFIG_MAKE_ENV) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define SWCONFIG_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) DESTDIR="$(TARGET_DIR)" $(MAKE) -C $(@D) install +endef + +$(eval $(generic-package)) + diff --git a/package/swconfig/Config.in b/package/swconfig/Config.in new file mode 100644 index 00000000..4e1fea3a --- /dev/null +++ b/package/swconfig/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SWCONFIG + bool "swconfig" + select BR2_PACKAGE_LIBNL + help + The program swconfig allows you to configure configurable + Ethernet network switches. diff --git a/package/swconfig/swconfig b/package/swconfig/swconfig new file mode 100755 index 00000000..c49037ce Binary files /dev/null and b/package/swconfig/swconfig differ diff --git a/package/swconfig/swconfig.hash b/package/swconfig/swconfig.hash new file mode 100644 index 00000000..bd2833a6 --- /dev/null +++ b/package/swconfig/swconfig.hash @@ -0,0 +1 @@ +sha256 d55f2580629fb4a585048efe4fdc6af30b269cad9adc6ae1b236c8c73ee70e8c swconfig-20150806.tar.gz diff --git a/package/swconfig/swconfig.mk b/package/swconfig/swconfig.mk new file mode 100644 index 00000000..4bbd86e8 --- /dev/null +++ b/package/swconfig/swconfig.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# swconfig +# +################################################################################ + +SWCONFIG_SITE = $(TOPDIR)/package/swconfig/swconfig.tar.gz +SWCONFIG_SITE_METHOD = file + +define SWCONFIG_EXTRACT_CMDS + echo $(SWCONFIF_SITE) + tar -zxf $(SWCONFIG_SITE) -C $(@D)/ +endef + +define SWCONFIG_INSTALL_STAGING_CMDS + echo "nothing to do" +endef + +define SWCONFIG_INSTALL_TARGET_CMDS + echo "install swconfig" + mkdir -p $(TARGET_DIR)/usr/bin + cd $(@D) && chmod a+x ./swconfig && cp swconfig $(TARGET_DIR)/usr/bin +endef + +$(eval $(generic-package)) diff --git a/package/swconfig/swconfig.tar.gz b/package/swconfig/swconfig.tar.gz new file mode 100644 index 00000000..0875eb2f Binary files /dev/null and b/package/swconfig/swconfig.tar.gz differ diff --git a/package/swig/Config.in.host b/package/swig/Config.in.host new file mode 100644 index 00000000..fd2049d3 --- /dev/null +++ b/package/swig/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_SWIG + bool "host swig" + help + swig is a software development tool that connects programs + written in C and C++ with a variety of high-level + programming languages. + + http://www.swig.org/ diff --git a/package/swig/swig.hash b/package/swig/swig.hash new file mode 100644 index 00000000..08b2b5a1 --- /dev/null +++ b/package/swig/swig.hash @@ -0,0 +1,5 @@ +# Locally computed: +sha256 d53be9730d8d58a16bf0cbd1f8ac0c0c3e1090573168bfa151b01eb47fa906fc swig-4.0.2.tar.gz +sha256 f53abaeed775018d519a1b9615f0ca17894772bd9ca21c2a156bf340ac41c13e LICENSE +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSE-GPL +sha256 7f50d942373a871211c5efee03f3db2f9efd1cff1002b0ef8e3748baa611a5c2 LICENSE-UNIVERSITIES diff --git a/package/swig/swig.mk b/package/swig/swig.mk new file mode 100644 index 00000000..437cf448 --- /dev/null +++ b/package/swig/swig.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# swig +# +################################################################################ + +SWIG_VERSION_MAJOR = 4.0 +SWIG_VERSION = $(SWIG_VERSION_MAJOR).2 +SWIG_SITE = http://downloads.sourceforge.net/project/swig/swig/swig-$(SWIG_VERSION) +HOST_SWIG_DEPENDENCIES = host-bison host-pcre +HOST_SWIG_CONF_OPTS = \ + --with-pcre \ + --disable-ccache \ + --without-octave +SWIG_LICENSE = GPL-3.0+, BSD-2-Clause, BSD-3-Clause +SWIG_LICENSE_FILES = LICENSE LICENSE-GPL LICENSE-UNIVERSITIES + +# CMake looks first at swig3.0, then swig2.0 and then swig. However, +# when doing the search, it will look into the PATH for swig2.0 first, +# and then for swig. +# While the PATH contains first our $(HOST_DIR)/bin, it also contains +# /usr/bin and other system directories. Therefore, if there is an +# installed swig3.0 on the system, it will get the preference over the +# swig installed in $(HOST_DIR)/bin, which isn't nice. To prevent +# this from happening we create a symbolic link swig3.0 -> swig, so that +# our swig always gets used. + +define HOST_SWIG_INSTALL_SYMLINK + ln -fs swig $(HOST_DIR)/bin/swig$(SWIG_VERSION_MAJOR) + ln -fs swig $(HOST_DIR)/bin/swig3.0 +endef + +HOST_SWIG_POST_INSTALL_HOOKS += HOST_SWIG_INSTALL_SYMLINK + +$(eval $(host-autotools-package)) + +SWIG = $(HOST_DIR)/bin/swig$(SWIG_VERSION_MAJOR) diff --git a/package/swupdate/0001-diskpart-force-kernel-to-reread-partition-table.patch b/package/swupdate/0001-diskpart-force-kernel-to-reread-partition-table.patch new file mode 100644 index 00000000..5964d1b9 --- /dev/null +++ b/package/swupdate/0001-diskpart-force-kernel-to-reread-partition-table.patch @@ -0,0 +1,32 @@ +From 305a7a5a74a612801d9df2b2efc86dd952b8c4e7 Mon Sep 17 00:00:00 2001 +From: Stefano Babic +Date: Tue, 9 Jun 2020 13:58:06 +0000 +Subject: [PATCH] diskpart: force kernel to reread partition table + +After writing a partition table to disk, the kernel should be informed +(like the partconf tool does), else it is not possible to install images +in the new created partitions. + +Signed-off-by: Stefano Babic +Signed-off-by: Joris Offouga +--- + handlers/diskpart_handler.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/handlers/diskpart_handler.c b/handlers/diskpart_handler.c +index 16adc17..372412b 100644 +--- a/handlers/diskpart_handler.c ++++ b/handlers/diskpart_handler.c +@@ -273,7 +273,8 @@ static int diskpart(struct img_type *img, + /* + * Everything done, write into disk + */ +- ret = fdisk_write_disklabel(cxt); ++ ret = fdisk_write_disklabel(cxt) | ++ fdisk_reread_partition_table(cxt); + + handler_exit: + if (fdisk_deassign_device(cxt, 0)) +-- +2.25.1 + diff --git a/package/swupdate/0002-Shellscript-stops-before-completing.patch b/package/swupdate/0002-Shellscript-stops-before-completing.patch new file mode 100644 index 00000000..d9143889 --- /dev/null +++ b/package/swupdate/0002-Shellscript-stops-before-completing.patch @@ -0,0 +1,52 @@ +From bd08e45d7b25f06da2fc6dc824146b471db5f1f4 Mon Sep 17 00:00:00 2001 +From: Stefano Babic +Date: Tue, 16 Jun 2020 10:29:55 +0200 +Subject: [PATCH] Shellscript stops before completing + +Commit 8fb94d7 reworks the way shell script are called, redirecting +stdout and stderr to SWUpdate. A shell script runs then in a child +process. Under some circumstances, SWUpdate closes the forked process +before the child process completes. + +Be sure that the child process has terminated before to go on. + +Signed-off-by: Stefano Babic +Reported-by: Piotr Piwko +Tested-by: Piotr Piwko +Signed-off-by: Joris Offouga +--- + core/pctl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/core/pctl.c b/core/pctl.c +index 8b1c667..01ad540 100644 +--- a/core/pctl.c ++++ b/core/pctl.c +@@ -263,6 +263,7 @@ int run_system_cmd(const char *cmd) + } + } else { + int fds[2]; ++ pid_t w; + + close(stdoutpipe[PIPE_WRITE]); + close(stderrpipe[PIPE_WRITE]); +@@ -276,7 +277,6 @@ int run_system_cmd(const char *cmd) + * and from stderr (of the child process) as ERROR + */ + do { +- pid_t w; + int n1 = 0; + struct timeval tv; + fd_set readfds; +@@ -373,7 +373,7 @@ int run_system_cmd(const char *cmd) + } + } + } while (ret > 0 && n1 > 0); +- } while (!WIFEXITED(wstatus)); ++ } while (w != process_id); + + close(stdoutpipe[PIPE_READ]); + close(stderrpipe[PIPE_READ]); +-- +2.25.1 + diff --git a/package/swupdate/Config.in b/package/swupdate/Config.in new file mode 100644 index 00000000..e87f6958 --- /dev/null +++ b/package/swupdate/Config.in @@ -0,0 +1,75 @@ +config BR2_PACKAGE_SWUPDATE + bool "swupdate" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + # swupdate requires a parser and uses libconfig as default + select BR2_PACKAGE_LIBCONFIG if !BR2_PACKAGE_JSON_C && \ + !BR2_PACKAGE_HAS_LUAINTERPRETER + help + swupdate provides a reliable way to update the software on + an embedded system. + + swupdate is highly configurable to fit the targets + requirements and to minimize the footprint. The provided + default configuration file BR2_PACKAGE_SWUPDATE_CONFIG will + enable swupdate with an embedded webserver, a parser and a + handler for raw NAND or NOR flash. + + The default configuration file builds a reasonable firmware + update system with minimal external dependencies in mind. + If you like to use your own modified configuration, + you have to select the necessary packages manually: + + * Select BR2_PACKAGE_LUA or BR2_PACKAGE_LUAJIT if you want + want to have Lua support. + * Select BR2_PACKAGE_LIBCURL if you want to use the download + feature. + * Select BR2_PACKAGE_OPENSSL or BR2_PACKAGE_MBEDTLS if you + want to add encryption support. + * Select BR2_PACKAGE_MTD if you want to use swupdate with + UBI partitions. + * Select BR2_PACKAGE_ZLIB if you want to deal with gzip + compressed archives. + * Select BR2_PACKAGE_ZSTD if you want to deal with zstd + compressed archives. + * Select BR2_PACKAGE_ZEROMQ to add support for using a + remote handler. + * Select BR2_PACKAGE_LIBRSYNC to add support for using + rdiff handler. + * Select BR2_PACKAGE_LIBUBOOTENV to add support for setting + the U-Boot environment. + * Select BR2_PACKAGE_LIBGPIOD to add support for + microcontroller firmware update. + * Select BR2_PACKAGE_EFIBOOTMGR to add support for EFI Boot + Guard. + * Select BR2_PACKAGE_LIBCURL, BR2_PACKAGE_JSON_C, + BR2_PACKAGE_LIBWEBSOCKETS, and BR2_PACKAGE_LIBURIPARSER + to add support for the SWU forwarder. + + https://sbabic.github.io/swupdate + +if BR2_PACKAGE_SWUPDATE + +config BR2_PACKAGE_SWUPDATE_CONFIG + string "swupdate configuration file" + default "package/swupdate/swupdate.config" + help + Path to the swupdate configuration file. + + I you wish to use your own modified swupdate configuration + file specify the config file location with this option. + +config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE + bool "install default website" + default y + help + Install the provided website to /var/www/swupdate. + + This is necessary if you want to run swupdate with the + embedded webserver and do not provide an own website to be + installed to /var/www/swupdate. +endif + +comment "swupdate needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/swupdate/S80swupdate b/package/swupdate/S80swupdate new file mode 100644 index 00000000..4421084b --- /dev/null +++ b/package/swupdate/S80swupdate @@ -0,0 +1,47 @@ +#!/bin/sh + +DAEMON="swupdate" +DAEMON_WRAPPER="/usr/lib/swupdate/swupdate.sh" +PIDFILE="/var/run/$DAEMON.pid" + +start() { + printf 'Starting %s: ' "$DAEMON" + start-stop-daemon -S -q -b -m -p "$PIDFILE" -x $DAEMON_WRAPPER + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start|stop|restart) + "$1";; + reload) + # Restart, since there is no true "reload" feature (does not + # reconfigure/restart on SIGHUP, just closes all open files). + restart;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/swupdate/swupdate.config b/package/swupdate/swupdate.config new file mode 100644 index 00000000..a6b7a749 --- /dev/null +++ b/package/swupdate/swupdate.config @@ -0,0 +1,135 @@ +# +# Automatically generated file; DO NOT EDIT. +# Swupdate Configuration +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Swupdate Settings +# + +# +# General Configuration +# +# CONFIG_CURL is not set +# CONFIG_CURL_SSL is not set +# CONFIG_SYSTEMD is not set +CONFIG_DEFAULT_CONFIG_FILE="/etc/swupdate.cfg" +CONFIG_SCRIPTS=y +# CONFIG_HW_COMPATIBILITY is not set +CONFIG_SW_VERSIONS_FILE="/etc/sw-versions" + +# +# Socket Paths +# +CONFIG_SOCKET_CTRL_PATH="/tmp/sockinstctrl" +CONFIG_SOCKET_PROGRESS_PATH="/tmp/swupdateprog" +CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/" + +# +# MTD support needs libmtd +# + +# +# Lua support needs a Lua interpreter +# +# CONFIG_FEATURE_SYSLOG is not set + +# +# Build Options +# +CONFIG_CROSS_COMPILE="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_WERROR is not set +# CONFIG_NOCLEANUP is not set + +# +# EFI Boot Guard needs libebgenv and libz +# +CONFIG_BOOTLOADER_NONE=y +# CONFIG_BOOTLOADER_GRUB is not set + +# +# U-Boot support needs libubootenv, libz +# +CONFIG_SSL_IMPL_NONE=y + +# +# Image downloading support needs libcurl +# + +# +# Hash checking needs an SSL implementation +# + +# +# Image signature verification needs an SSL implementation +# + +# +# Image encryption needs an SSL implementation +# +# CONFIG_SURICATTA is not set +CONFIG_WEBSERVER=y +CONFIG_MONGOOSE=y +CONFIG_MONGOOSEIPV6=y + +# +# SSL support needs an SSL implementation +# + +# +# Parser Features +# +CONFIG_LIBCONFIG=y +CONFIG_PARSERROOT="" + +# +# JSON config parser support needs json-c +# +# CONFIG_SETSWDESCRIPTION is not set + +# +# Image Handlers +# + +# +# ubivol support needs libubi +# +# CONFIG_DISKPART is not set +CONFIG_RAW=y +# CONFIG_RDIFFHANDLER is not set +# CONFIG_SHELLSCRIPTHANDLER is not set + +# +# archive support needs libarchive +# + +# +# remote handler needs zeromq +# + +# +# swuforward handler needs json-c and curl +# + +# +# SWU forwarder requires libcurl +# + +# +# swuforward handler needs json-c and curl +# +# CONFIG_BOOTLOADERHANDLER is not set + +# +# Microcontroller handler depends on libgpiod +# diff --git a/package/swupdate/swupdate.hash b/package/swupdate/swupdate.hash new file mode 100644 index 00000000..40f978d2 --- /dev/null +++ b/package/swupdate/swupdate.hash @@ -0,0 +1,6 @@ +# Locally calculated +sha256 132df2ff1ad41c7aabd0fbef6a23d28607cbd5cad52aab050c4822977a107486 swupdate-2020.04.tar.gz +sha256 43492b377cf2fb67942d1dd231146bd4e6578646ad13ef289297c9dd75cbc478 Licenses/Exceptions +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Licenses/gpl-2.0.txt +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 Licenses/lgpl-2.1.txt +sha256 89807acf2309bd285f033404ee78581602f3cd9b819a16ac2f0e5f60ff4a473e Licenses/mit.txt diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk new file mode 100644 index 00000000..d96a0c2e --- /dev/null +++ b/package/swupdate/swupdate.mk @@ -0,0 +1,208 @@ +################################################################################ +# +# swupdate +# +################################################################################ + +SWUPDATE_VERSION = 2020.04 +SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION)) +SWUPDATE_LICENSE = GPL-2.0+ with OpenSSL exception, LGPL-2.1+, MIT +SWUPDATE_LICENSE_FILES = Licenses/Exceptions Licenses/gpl-2.0.txt \ + Licenses/lgpl-2.1.txt Licenses/mit.txt + +# swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not +# available in all external toolchains, and use CC for linking. Ensure +# TARGET_CC is used for both. +SWUPDATE_MAKE_ENV = CC="$(TARGET_CC)" LD="$(TARGET_CC)" + +# swupdate bundles its own version of mongoose (version 6.16) + +ifeq ($(BR2_PACKAGE_EFIBOOTMGR),y) +SWUPDATE_DEPENDENCIES += efibootmgr +SWUPDATE_MAKE_ENV += HAVE_LIBEBGENV=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBEBGENV=n +endif + +ifeq ($(BR2_PACKAGE_JSON_C),y) +SWUPDATE_DEPENDENCIES += json-c +SWUPDATE_MAKE_ENV += HAVE_JSON_C=y +else +SWUPDATE_MAKE_ENV += HAVE_JSON_C=n +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +SWUPDATE_DEPENDENCIES += libarchive +SWUPDATE_MAKE_ENV += HAVE_LIBARCHIVE=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBARCHIVE=n +endif + +ifeq ($(BR2_PACKAGE_LIBCONFIG),y) +SWUPDATE_DEPENDENCIES += libconfig +SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=n +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +SWUPDATE_DEPENDENCIES += libcurl +SWUPDATE_MAKE_ENV += HAVE_LIBCURL=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBCURL=n +endif + +ifeq ($(BR2_PACKAGE_LIBGPIOD),y) +SWUPDATE_DEPENDENCIES += libgpiod +SWUPDATE_MAKE_ENV += HAVE_LIBGPIOD=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBGPIOD=n +endif + +ifeq ($(BR2_PACKAGE_LIBURIPARSER),y) +SWUPDATE_DEPENDENCIES += liburiparser +SWUPDATE_MAKE_ENV += HAVE_URIPARSER=y +else +SWUPDATE_MAKE_ENV += HAVE_URIPARSER=n +endif + +ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS),y) +SWUPDATE_DEPENDENCIES += libwebsockets +SWUPDATE_MAKE_ENV += HAVE_LIBWEBSOCKETS=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBWEBSOCKETS=n +endif + +ifeq ($(BR2_PACKAGE_HAS_LUAINTERPRETER):$(BR2_STATIC_LIBS),y:) +SWUPDATE_DEPENDENCIES += luainterpreter host-pkgconf +# defines the base name for the pkg-config file ("lua" or "luajit") +define SWUPDATE_SET_LUA_VERSION + $(call KCONFIG_SET_OPT,CONFIG_LUAPKG,$(BR2_PACKAGE_PROVIDES_LUAINTERPRETER)) +endef +SWUPDATE_MAKE_ENV += HAVE_LUA=y +else +SWUPDATE_MAKE_ENV += HAVE_LUA=n +endif + +ifeq ($(BR2_PACKAGE_MTD),y) +SWUPDATE_DEPENDENCIES += mtd +SWUPDATE_MAKE_ENV += HAVE_LIBMTD=y +SWUPDATE_MAKE_ENV += HAVE_LIBUBI=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBMTD=n +SWUPDATE_MAKE_ENV += HAVE_LIBUBI=n +endif + +# OpenSSL or mbedTLS +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SWUPDATE_DEPENDENCIES += openssl +SWUPDATE_MAKE_ENV += HAVE_LIBSSL=y +SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=y +SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=n +else +SWUPDATE_MAKE_ENV += HAVE_LIBSSL=n +SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=n +ifeq ($(BR2_PACKAGE_MBEDTLS),y) +SWUPDATE_DEPENDENCIES += mbedtls +SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=y +else +SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=n +endif +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +SWUPDATE_DEPENDENCIES += systemd +endif + +ifeq ($(BR2_PACKAGE_LIBUBOOTENV),y) +SWUPDATE_DEPENDENCIES += libubootenv +SWUPDATE_MAKE_ENV += HAVE_LIBUBOOTENV=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBUBOOTENV=n +endif + +ifeq ($(BR2_PACKAGE_ZEROMQ),y) +SWUPDATE_DEPENDENCIES += zeromq +SWUPDATE_MAKE_ENV += HAVE_LIBZEROMQ=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBZEROMQ=n +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +SWUPDATE_DEPENDENCIES += zlib +SWUPDATE_MAKE_ENV += HAVE_ZLIB=y +else +SWUPDATE_MAKE_ENV += HAVE_ZLIB=n +endif + +ifeq ($(BR2_PACKAGE_ZSTD),y) +SWUPDATE_DEPENDENCIES += zstd +SWUPDATE_MAKE_ENV += HAVE_ZSTD=y +else +SWUPDATE_MAKE_ENV += HAVE_ZSTD=n +endif + +ifeq ($(BR2_PACKAGE_LIBRSYNC),y) +SWUPDATE_DEPENDENCIES += librsync +endif + +SWUPDATE_BUILD_CONFIG = $(@D)/.config + +SWUPDATE_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG)) +SWUPDATE_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig + +ifeq ($(BR2_STATIC_LIBS),y) +define SWUPDATE_PREFER_STATIC + $(call KCONFIG_ENABLE_OPT,CONFIG_STATIC) +endef +endif + +SWUPDATE_MAKE_OPTS = \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CONFIG_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + CONFIG_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" + +define SWUPDATE_KCONFIG_FIXUP_CMDS + $(SWUPDATE_PREFER_STATIC) + $(SWUPDATE_SET_LUA_VERSION) +endef + +define SWUPDATE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) $(SWUPDATE_MAKE_OPTS) -C $(@D) +endef + +define SWUPDATE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/swupdate $(TARGET_DIR)/usr/bin/swupdate + $(if $(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE), \ + mkdir -p $(TARGET_DIR)/var/www/swupdate; \ + cp -dpfr $(@D)/examples/www/v2/* $(TARGET_DIR)/var/www/swupdate) +endef + +# Checks to give errors that the user can understand +# Must be before we call to kconfig-package +ifeq ($(BR2_PACKAGE_SWUPDATE)$(BR_BUILDING),yy) +ifeq ($(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG)),) +$(error No Swupdate configuration file specified, check your BR2_PACKAGE_SWUPDATE_CONFIG setting) +endif +endif + +ifeq ($(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE),y) +define SWUPDATE_INSTALL_COMMON + mkdir -p $(TARGET_DIR)/etc/swupdate/conf.d \ + $(TARGET_DIR)/usr/lib/swupdate/conf.d + $(INSTALL) -D -m 755 package/swupdate/swupdate.sh \ + $(TARGET_DIR)/usr/lib/swupdate/swupdate.sh +endef +define SWUPDATE_INSTALL_INIT_SYSTEMD + $(SWUPDATE_INSTALL_COMMON) + $(INSTALL) -D -m 644 package/swupdate/swupdate.service \ + $(TARGET_DIR)/usr/lib/systemd/system/swupdate.service +endef +define SWUPDATE_INSTALL_INIT_SYSV + $(SWUPDATE_INSTALL_COMMON) + $(INSTALL) -D -m 755 package/swupdate/S80swupdate \ + $(TARGET_DIR)/etc/init.d/S80swupdate +endef +endif + +$(eval $(kconfig-package)) diff --git a/package/swupdate/swupdate.service b/package/swupdate/swupdate.service new file mode 100644 index 00000000..a3d8d193 --- /dev/null +++ b/package/swupdate/swupdate.service @@ -0,0 +1,11 @@ +[Unit] +Description=SWUpdate daemon +Documentation=https://github.com/sbabic/swupdate +Documentation=https://sbabic.github.io/swupdate + +[Service] +ExecStart=/usr/lib/swupdate/swupdate.sh +KillMode=mixed + +[Install] +WantedBy=multi-user.target diff --git a/package/swupdate/swupdate.sh b/package/swupdate/swupdate.sh new file mode 100644 index 00000000..31ec5363 --- /dev/null +++ b/package/swupdate/swupdate.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +# Based on example script created by Adrian Freihofer +# https://github.com/sbabic/meta-swupdate/blob/master/recipes-support/swupdate/swupdate/swupdate.sh + +# Override these variables in sourced script(s) located +# in /usr/lib/swupdate/conf.d or /etc/swupdate/conf.d +# NOTE: There are substrings used in some swupdate commands which will +# need to be wrapped in a script to prevent tokenizing +# ( -p/-P post/pre cmds are good examples) +SWUPDATE_ARGS="-v ${SWUPDATE_EXTRA_ARGS}" +SWUPDATE_WEBSERVER_ARGS="" +SWUPDATE_SURICATTA_ARGS="" + +# source all files from /etc/swupdate/conf.d and /usr/lib/swupdate/conf.d/ +# A file found in /etc replaces the same file in /usr +for f in `(test -d /usr/lib/swupdate/conf.d/ && ls -1 /usr/lib/swupdate/conf.d/; test -d /etc/swupdate/conf.d && ls -1 /etc/swupdate/conf.d) | sort -u`; do + if [ -f /etc/swupdate/conf.d/$f ]; then + . /etc/swupdate/conf.d/$f + else + . /usr/lib/swupdate/conf.d/$f + fi +done + +if [ "$SWUPDATE_WEBSERVER_ARGS" != "" -a "$SWUPDATE_SURICATTA_ARGS" != "" ]; then + exec /usr/bin/swupdate $SWUPDATE_ARGS -w "$SWUPDATE_WEBSERVER_ARGS" -u "$SWUPDATE_SURICATTA_ARGS" +elif [ "$SWUPDATE_WEBSERVER_ARGS" != "" ]; then + exec /usr/bin/swupdate $SWUPDATE_ARGS -w "$SWUPDATE_WEBSERVER_ARGS" +elif [ "$SWUPDATE_SURICATTA_ARGS" != "" ]; then + exec /usr/bin/swupdate $SWUPDATE_ARGS -u "$SWUPDATE_SURICATTA_ARGS" +else + exec /usr/bin/swupdate $SWUPDATE_ARGS +fi diff --git a/package/sylpheed/Config.in b/package/sylpheed/Config.in new file mode 100644 index 00000000..f03ae877 --- /dev/null +++ b/package/sylpheed/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SYLPHEED + bool "sylpheed" + depends on BR2_PACKAGE_LIBGTK2 + help + lightweight and user-friendly e-mail client. + + http://sylpheed.sraoss.jp/en/ diff --git a/package/sylpheed/sylpheed.hash b/package/sylpheed/sylpheed.hash new file mode 100644 index 00000000..08a5d0a2 --- /dev/null +++ b/package/sylpheed/sylpheed.hash @@ -0,0 +1,4 @@ +# Locally calculated after checking pgp signature +sha256 0d6bc5eb46f5d0a463757c62bc80b00d219b294b3c3662840e4540f6db2e3e49 sylpheed-3.7.0.tar.xz +sha256 c38aee9e3c8c4d5d594ff548a1be05453023016d6286931f6512db215ec1fd42 COPYING +sha256 a9bdde5616ecdd1e980b44f360600ee8783b1f99b8cc83a2beb163a0a390e861 COPYING.LIB diff --git a/package/sylpheed/sylpheed.mk b/package/sylpheed/sylpheed.mk new file mode 100644 index 00000000..0453fba5 --- /dev/null +++ b/package/sylpheed/sylpheed.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# sylpheed +# +################################################################################ + +SYLPHEED_VERSION_MAJOR = 3.7 +SYLPHEED_VERSION = $(SYLPHEED_VERSION_MAJOR).0 +SYLPHEED_SOURCE = sylpheed-$(SYLPHEED_VERSION).tar.xz +SYLPHEED_SITE = http://sylpheed.sraoss.jp/sylpheed/v$(SYLPHEED_VERSION_MAJOR) +SYLPHEED_LICENSE = GPL-2.0+ (executables), LGPL-2.1+ (library, attachment plugin) +SYLPHEED_LICENSE_FILES = COPYING COPYING.LIB +SYLPHEED_CONF_OPTS = --disable-gtkspell --disable-gpgme +SYLPHEED_DEPENDENCIES = host-pkgconf libgtk2 + +# Remove the -I$(includedir) from the Makefiles +# because it refers to the host /usr/include. +define SYLPHEED_PRECONFIGURE + for i in $$(find $(@D) -name "Makefile*"); do \ + sed -i 's:-I$$(includedir)::g' $$i; \ + done +endef + +SYLPHEED_PRE_CONFIGURE_HOOKS += SYLPHEED_PRECONFIGURE + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SYLPHEED_DEPENDENCIES += openssl +SYLPHEED_CONF_OPTS += --enable-ssl +else +SYLPHEED_CONF_OPTS += --disable-ssl +endif + +$(eval $(autotools-package)) diff --git a/package/synergy/Config.in b/package/synergy/Config.in new file mode 100644 index 00000000..c1216c4b --- /dev/null +++ b/package/synergy/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_SYNERGY + bool "synergy" + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXTST + help + Synergy lets you easily share a single mouse and + keyboard between multiple computers with different + operating systems, each with its own display, + without special hardware. + + https://github.com/symless/synergy-core/ + +comment "synergy needs a toolchain w/ C++, wchar, gcc >= 4.9" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \ + BR2_TOOLCHAIN_GCC_AT_LEAST_4_9) diff --git a/package/synergy/synergy.hash b/package/synergy/synergy.hash new file mode 100644 index 00000000..8a053cf9 --- /dev/null +++ b/package/synergy/synergy.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 06d1cb1d43251b0b624212652e9c0ab2657d124ac4f7e7d0c7f3e448c953c2a8 synergy-2.0.12-beta.tar.gz +sha256 4921009cd76e7d38a8e873c362b25dbaf032c320bbb36a40dec775ddbdcbe1d8 LICENSE diff --git a/package/synergy/synergy.mk b/package/synergy/synergy.mk new file mode 100644 index 00000000..bc7ebea0 --- /dev/null +++ b/package/synergy/synergy.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# synergy +# +################################################################################ + +SYNERGY_VERSION = 2.0.12-beta +SYNERGY_SITE = $(call github,symless,synergy-core,v$(SYNERGY_VERSION)) +SYNERGY_LICENSE = GPL-2.0 +SYNERGY_LICENSE_FILES = LICENSE +SYNERGY_CPE_ID_VENDOR = symless +SYNERGY_DEPENDENCIES = xlib_libX11 xlib_libXtst + +# Avoid using buildroot commit hash inside cmake/Version.cmake +# by setting SYNERGY_VERSION_STAGE != snapshot +SYNERGY_CONF_ENV += SYNERGY_VERSION_STAGE="beta" + +ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y) +SYNERGY_DEPENDENCIES += xlib_libXext +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) +SYNERGY_DEPENDENCIES += xlib_libXi +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +SYNERGY_DEPENDENCIES += xlib_libXinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +SYNERGY_DEPENDENCIES += xlib_libXrandr +endif + +define SYNERGY_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/synergyc $(TARGET_DIR)/usr/bin/synergyc + $(INSTALL) -D -m 0755 $(@D)/bin/synergys $(TARGET_DIR)/usr/bin/synergys +endef + +$(eval $(cmake-package)) diff --git a/package/sysdig/Config.in b/package/sysdig/Config.in new file mode 100644 index 00000000..06d20c7f --- /dev/null +++ b/package/sysdig/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_SYSDIG + bool "sysdig" + depends on BR2_LINUX_KERNEL + depends on BR2_INSTALL_LIBSTDCPP # jsoncpp + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils, jq + depends on !BR2_STATIC_LIBS # elfutils + depends on BR2_USE_WCHAR # elfutils + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 + select BR2_PACKAGE_ELFUTILS + select BR2_PACKAGE_JQ + select BR2_PACKAGE_JSONCPP + select BR2_PACKAGE_LIBB64 + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + Sysdig is open source, system-level exploration: + capture system state and activity from a running Linux + instance, then save, filter and analyze. + Think of it as strace + tcpdump + lsof + awesome sauce. + With a little Lua cherry on top. + + https://github.com/draios/sysdig/wiki + +comment "sysdig needs a glibc or uclibc toolchain w/ C++, threads, gcc >= 4.8, dynamic library, a Linux kernel, and luajit or lua 5.1 to be built" + depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || BR2_STATIC_LIBS \ + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) \ + || !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 diff --git a/package/sysdig/sysdig.hash b/package/sysdig/sysdig.hash new file mode 100644 index 00000000..565b1e98 --- /dev/null +++ b/package/sysdig/sysdig.hash @@ -0,0 +1,3 @@ +# sha256 locally computed +sha256 57d5b713b875eba35546a1408bf3f20c2703904a17d956be115ee55272db4cfa sysdig-0.23.1.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/sysdig/sysdig.mk b/package/sysdig/sysdig.mk new file mode 100644 index 00000000..08d93750 --- /dev/null +++ b/package/sysdig/sysdig.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# sysdig +# +################################################################################ + +SYSDIG_VERSION = 0.23.1 +SYSDIG_SITE = $(call github,draios,sysdig,$(SYSDIG_VERSION)) +SYSDIG_LICENSE = GPL-2.0 +SYSDIG_LICENSE_FILES = COPYING +SYSDIG_CPE_ID_VENDOR = sysdig +SYSDIG_CONF_OPTS = -DENABLE_DKMS=OFF -DUSE_BUNDLED_DEPS=OFF +SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO + +SYSDIG_DEPENDENCIES = \ + elfutils \ + jq \ + jsoncpp \ + libb64 \ + libcurl \ + luainterpreter \ + ncurses \ + openssl \ + zlib + +# sysdig creates the module Makefile from a template, which contains a +# single place-holder, KBUILD_FLAGS, wich is only replaced with two +# things: +# - debug flags, which we don't care about here, +# - 'sysdig-feature' flags, which are never set, so always empty +# So, just replace the place-holder with the only meaningful value: nothing. +define SYSDIG_MODULE_GEN_MAKEFILE + $(INSTALL) -m 0644 $(@D)/driver/Makefile.in $(@D)/driver/Makefile + $(SED) 's/@KBUILD_FLAGS@//;' $(@D)/driver/Makefile + $(SED) 's/@PROBE_NAME@/sysdig-probe/;' $(@D)/driver/Makefile +endef +SYSDIG_POST_PATCH_HOOKS += SYSDIG_MODULE_GEN_MAKEFILE + +# Don't build the driver as part of the 'standard' procedure, we'll +# build it on our own with the kernel-module infra. +SYSDIG_CONF_OPTS += -DBUILD_DRIVER=OFF + +SYSDIG_MODULE_SUBDIRS = driver +SYSDIG_MODULE_MAKE_OPTS = KERNELDIR=$(LINUX_DIR) + +$(eval $(kernel-module)) +$(eval $(cmake-package)) diff --git a/package/sysklogd/Config.in b/package/sysklogd/Config.in new file mode 100644 index 00000000..3315a6dd --- /dev/null +++ b/package/sysklogd/Config.in @@ -0,0 +1,48 @@ +config BR2_PACKAGE_SYSKLOGD + bool "sysklogd" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + The continuation of the original sysklogd package, based on + the original Berkeley syslog daemon. Now with kernel + logging, and log rotation built-in. It can both receive from + and send to remote syslog servers. The v2.x series include + extended support for RFC5424 with an alt. syslogp() API for + clients. + + https://github.com/troglobit/sysklogd/ + +if BR2_PACKAGE_SYSKLOGD + +config BR2_PACKAGE_SYSKLOGD_REMOTE_DELAY + int "Retry delay (sec)" + default "180" + help + Retry delay (seconds) for sending to remote syslog servers. + + When set up to forward logs to a remote syslog server, the + network may not always be available. E.g., default interface + down, or no route to the remote server. This setting controls + the back-off time before retrying. + + Default: 180 seconds + +config BR2_PACKAGE_SYSKLOGD_LOGGER + bool "logger tool" + help + Generate log messages from scripts or from the command line. + + This version of logger is receommended for use with sysklogd. + It makes use of the new syslogp() API for RFC5424 style logs, + e.g. MSGID, strucutred data (SD), etc. + + The BusyBox, or util-linux, logger tools can also be used, but + are limited to RFC3164 style messages. + +endif + +comment "sysklogd needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS diff --git a/package/sysklogd/S01syslogd b/package/sysklogd/S01syslogd new file mode 100644 index 00000000..26036328 --- /dev/null +++ b/package/sysklogd/S01syslogd @@ -0,0 +1,62 @@ +#!/bin/sh + +DAEMON="syslogd" +PIDFILE="/var/run/$DAEMON.pid" + +SYSLOGD_ARGS="-m 0" + +# shellcheck source=/dev/null +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + +start() { + printf 'Starting %s: ' "$DAEMON" + # shellcheck disable=SC2086 # we need the word splitting + start-stop-daemon -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \ + -- $SYSLOGD_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +# SIGHUP makes syslogd reload its configuration +reload() { + printf 'Reloading %s: ' "$DAEMON" + start-stop-daemon -K -s HUP -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +case "$1" in + start|stop|restart|reload) + "$1";; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/sysklogd/sysklogd.hash b/package/sysklogd/sysklogd.hash new file mode 100644 index 00000000..6d3ba8f9 --- /dev/null +++ b/package/sysklogd/sysklogd.hash @@ -0,0 +1,6 @@ +# Upstream .md5 and .sha256 from GitHub +md5 2c6749c49f52b8c5dad18e9a9315e7dd sysklogd-2.2.3.tar.gz +sha256 e7ea09c15511a63c430e84f65ce3bf55a0386ee419ab52e9341c4a9fabae59ad sysklogd-2.2.3.tar.gz + +# Locally calculated +sha256 7a71d7603a7c4456df441463e54da35acf151c1be0879246de63544f1f34f477 LICENSE diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk new file mode 100644 index 00000000..7c5de957 --- /dev/null +++ b/package/sysklogd/sysklogd.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# sysklogd +# +################################################################################ + +SYSKLOGD_VERSION = 2.2.3 +SYSKLOGD_SITE = https://github.com/troglobit/sysklogd/releases/download/v$(SYSKLOGD_VERSION) +SYSKLOGD_LICENSE = BSD-3-Clause +SYSKLOGD_LICENSE_FILES = LICENSE +SYSKLOGD_CPE_ID_VENDOR = sysklogd_project + +# Busybox install logger in /usr/bin, and syslogd in /sbin, so install in +# the same locations so that busybox does not install its applets in there. +SYSKLOGD_CONF_OPTS = \ + --bindir=/usr/bin \ + --sbindir=/sbin \ + --with-suspend-time=$(BR2_PACKAGE_SYSKLOGD_REMOTE_DELAY) + +# Disable/Enable utilities +ifeq ($(BR2_PACKAGE_SYSKLOGD_LOGGER),y) +SYSKLOGD_CONF_OPTS += --with-logger +else +SYSKLOGD_CONF_OPTS += --without-logger +endif + +define SYSKLOGD_INSTALL_SAMPLE_CONFIG + $(INSTALL) -D -m 0644 $(@D)/syslog.conf \ + $(TARGET_DIR)/etc/syslog.conf +endef + +SYSKLOGD_POST_INSTALL_TARGET_HOOKS += SYSKLOGD_INSTALL_SAMPLE_CONFIG + +define SYSKLOGD_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/sysklogd/S01syslogd \ + $(TARGET_DIR)/etc/init.d/S01syslogd +endef + +define SYSKLOGD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/syslogd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/syslogd.service +endef + +$(eval $(autotools-package)) diff --git a/package/sysklogd/syslogd.service b/package/sysklogd/syslogd.service new file mode 100644 index 00000000..c7e724e1 --- /dev/null +++ b/package/sysklogd/syslogd.service @@ -0,0 +1,13 @@ +[Unit] +Description=System Logging Service +Requires=syslog.socket + +[Service] +EnvironmentFile=-/etc/default/syslogd +ExecStart=/sbin/syslogd -m 0 -F $SYSLOGD_ARGS +StandardOutput=null +Restart=on-failure + +[Install] +WantedBy=multi-user.target +Alias=syslog.service diff --git a/package/syslog-ng/0001-fix-build-on-uclibc.patch b/package/syslog-ng/0001-fix-build-on-uclibc.patch new file mode 100644 index 00000000..dbb9b66b --- /dev/null +++ b/package/syslog-ng/0001-fix-build-on-uclibc.patch @@ -0,0 +1,51 @@ +From 98bd6106f8c48bc8f0a27bd712ed4ba6249e9a5f Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 13 Jan 2019 11:03:51 +0100 +Subject: [PATCH] fix build on m68k with uclibc + +uclibc on m68k defines pthread_spinlock_t but does not define +pthread_spin_trylock so check for this function before using it + +Fixes: + - http://autobuild.buildroot.org/results/0a6de11c030a4f39e402917809fc6d33fb463d1b + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/buytenh/ivykis/pull/17] +--- + configure.ac | 3 +++ + src/spinlock.h | 4 ++++ + 2 files changed, 7 insertions(+) + +diff --git a/lib/ivykis/configure.ac b/lib/ivykis/configure.ac +index e9b10c0..24152a9 100644 +--- a/lib/ivykis/configure.ac ++++ b/lib/ivykis/configure.ac +@@ -110,6 +110,9 @@ AC_CACHE_CHECK(for linux/netfilter_ipv4.h, ac_cv_header_linux_netfilter_ipv4_h, + # Check for pthread_spinlock_t. + AC_CHECK_TYPES([pthread_spinlock_t], [], [], [[#include ]]) + ++# Check for pthread_spin_trylock ++AC_CHECK_FUNCS([pthread_spin_trylock]) ++ + # Check which header file defines 'struct timespec'. + for hdr in sys/time.h sys/timers.h time.h pthread.h + do +diff --git a/lib/ivykis/src/spinlock.h b/lib/ivykis/src/spinlock.h +index ebcdbec..d837df8 100644 +--- a/lib/ivykis/src/spinlock.h ++++ b/lib/ivykis/src/spinlock.h +@@ -76,7 +76,11 @@ static inline void fallback_spin_unlock(fallback_spinlock_t *lock) + + static inline int pthread_spinlocks_available(void) + { ++#ifdef HAVE_PTHREAD_SPIN_TRYLOCK + return !!(pthread_spin_trylock != NULL); ++#else ++ return 0; ++#endif + } + + +-- +2.14.1 + diff --git a/package/syslog-ng/Config.in b/package/syslog-ng/Config.in new file mode 100644 index 00000000..30ad54a4 --- /dev/null +++ b/package/syslog-ng/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_SYSLOG_NG + bool "syslog-ng" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_OPENSSL + help + syslog-ng is an enhanced log daemon, supporting a wide range + of input and output methods: syslog, unstructured text, + queueing, SQL & NoSQL + + https://www.syslog-ng.com/products/open-source-log-management/ + +comment "syslog-ng needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS diff --git a/package/syslog-ng/S01syslog-ng b/package/syslog-ng/S01syslog-ng new file mode 100644 index 00000000..2ced6f8b --- /dev/null +++ b/package/syslog-ng/S01syslog-ng @@ -0,0 +1,62 @@ +#!/bin/sh + +DAEMON="syslog-ng" +PIDFILE="/var/run/$DAEMON.pid" + +SYSLOG_NG_ARGS="" + +# shellcheck source=/dev/null +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + +start() { + printf 'Starting %s: ' "$DAEMON" + # shellcheck disable=SC2086 # we need the word splitting + start-stop-daemon -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \ + -- $SYSLOG_NG_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +# SIGHUP makes syslog-ng reload its configuration +reload() { + printf 'Reloading %s: ' "$DAEMON" + start-stop-daemon -K -s HUP -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +case "$1" in + start|stop|restart|reload) + "$1";; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/syslog-ng/syslog-ng.conf b/package/syslog-ng/syslog-ng.conf new file mode 100644 index 00000000..1cb2ecc3 --- /dev/null +++ b/package/syslog-ng/syslog-ng.conf @@ -0,0 +1,16 @@ +@version: 3.30 + +source s_sys { + file("/proc/kmsg" program_override("kernel")); + unix-stream ("/dev/log"); + internal(); +}; + +destination d_all { + file("/var/log/messages"); +}; + +log { + source(s_sys); + destination(d_all); +}; diff --git a/package/syslog-ng/syslog-ng.hash b/package/syslog-ng/syslog-ng.hash new file mode 100644 index 00000000..60ea6b3c --- /dev/null +++ b/package/syslog-ng/syslog-ng.hash @@ -0,0 +1,5 @@ +# Locally computed +sha256 44e54a6186af14d01affa06bf7391cfe8fc2460bd4ba211aab5469d8b1ca5b4b syslog-ng-3.30.1.tar.gz +sha256 e912cf1e1c09b81d61c0154eb6c179588622c31ad07bfb4a90c612d07ff09d9b COPYING +sha256 ce3324c9f22299cfc7c281e5a6ab40fbe9c2ea1a67cee87226cb8cd39db1e1d2 GPL.txt +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LGPL.txt diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk new file mode 100644 index 00000000..14888d2a --- /dev/null +++ b/package/syslog-ng/syslog-ng.mk @@ -0,0 +1,135 @@ +################################################################################ +# +# syslog-ng +# +################################################################################ + +# When updating the version, please check at runtime if the version in +# syslog-ng.conf header needs to be updated +SYSLOG_NG_VERSION = 3.30.1 +SYSLOG_NG_SITE = https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$(SYSLOG_NG_VERSION) +SYSLOG_NG_LICENSE = LGPL-2.1+ (syslog-ng core), GPL-2.0+ (modules) +SYSLOG_NG_LICENSE_FILES = COPYING GPL.txt LGPL.txt +SYSLOG_NG_CPE_ID_VENDOR = oneidentity +SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \ + libglib2 openssl pcre +# We're patching configure.ac +SYSLOG_NG_AUTORECONF = YES +SYSLOG_NG_CONF_OPTS = --disable-manpages --localstatedir=/var/run \ + --disable-java --disable-java-modules --disable-mongodb + +ifeq ($(BR2_PACKAGE_GEOIP),y) +SYSLOG_NG_DEPENDENCIES += geoip +SYSLOG_NG_CONF_OPTS += --enable-geoip +else +SYSLOG_NG_CONF_OPTS += --disable-geoip +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +SYSLOG_NG_DEPENDENCIES += libcap +SYSLOG_NG_CONF_OPTS += --enable-linux-caps +else +SYSLOG_NG_CONF_OPTS += --disable-linux-caps +endif + +ifeq ($(BR2_PACKAGE_PYTHON),y) +SYSLOG_NG_DEPENDENCIES += python +SYSLOG_NG_CONF_OPTS += \ + --enable-python \ + --with-python=$(PYTHON_VERSION_MAJOR) +else ifeq ($(BR2_PACKAGE_PYTHON3),y) +SYSLOG_NG_DEPENDENCIES += python3 +SYSLOG_NG_CONF_OPTS += \ + --enable-python \ + --with-python=$(PYTHON3_VERSION_MAJOR) +else +SYSLOG_NG_CONF_OPTS += --disable-python +endif + +ifeq ($(BR2_PACKAGE_LIBESMTP),y) +SYSLOG_NG_DEPENDENCIES += libesmtp +SYSLOG_NG_CONF_OPTS += --enable-smtp +SYSLOG_NG_CONF_OPTS += --with-libesmtp="$(STAGING_DIR)/usr" +else +SYSLOG_NG_CONF_OPTS += --disable-smtp +endif + +ifeq ($(BR2_PACKAGE_JSON_C),y) +SYSLOG_NG_DEPENDENCIES += json-c +SYSLOG_NG_CONF_OPTS += --enable-json +else +SYSLOG_NG_CONF_OPTS += --disable-json +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +SYSLOG_NG_DEPENDENCIES += util-linux +endif + +ifeq ($(BR2_PACKAGE_LIBNET),y) +SYSLOG_NG_DEPENDENCIES += libnet +SYSLOG_NG_CONF_OPTS += \ + --with-libnet=$(STAGING_DIR)/usr/bin \ + --enable-spoof-source +else +SYSLOG_NG_CONF_OPTS += --disable-spoof-source +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +SYSLOG_NG_DEPENDENCIES += libcurl +SYSLOG_NG_CONF_OPTS += --enable-http +SYSLOG_NG_CONF_OPTS += --with-libcurl="$(STAGING_DIR)/usr" +else +SYSLOG_NG_CONF_OPTS += --disable-http +endif + +ifeq ($(BR2_PACKAGE_RABBITMQ_C),y) +SYSLOG_NG_DEPENDENCIES += rabbitmq-c +SYSLOG_NG_CONF_OPTS += --enable-amqp +else +SYSLOG_NG_CONF_OPTS += --disable-amqp +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +SYSLOG_NG_DEPENDENCIES += systemd +SYSLOG_NG_CONF_OPTS += \ + --enable-systemd \ + --with-systemdsystemunitdir=/usr/lib/systemd/system +else +SYSLOG_NG_CONF_OPTS += --disable-systemd +endif + +ifeq ($(BR2_PACKAGE_NETSNMP),y) +SYSLOG_NG_DEPENDENCIES += netsnmp +SYSLOG_NG_CONF_OPTS += --enable-afsnmp +SYSLOG_NG_CONF_OPTS += --with-net-snmp="$(STAGING_DIR)/usr/bin" +else +SYSLOG_NG_CONF_OPTS += --disable-afsnmp +endif + +define SYSLOG_NG_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/syslog-ng/S01syslog-ng \ + $(TARGET_DIR)/etc/init.d/S01syslog-ng +endef + +# By default syslog-ng installs a .service that requires a config file at +# /etc/default, so provide one with the default values. +define SYSLOG_NG_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/syslog-ng@.service.d + printf '[Install]\nDefaultInstance=default\n' \ + >$(TARGET_DIR)/usr/lib/systemd/system/syslog-ng@.service.d/buildroot-default-instance.conf +endef + +# By default syslog-ng installs a number of sample configuration +# files. Some of these rely on optional features being +# enabled. Because of this buildroot uninstalls the shipped config +# files and provides a simplified configuration. +define SYSLOG_NG_FIXUP_CONFIG + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) scl-uninstall-local + $(INSTALL) -D -m 0644 package/syslog-ng/syslog-ng.conf \ + $(TARGET_DIR)/etc/syslog-ng.conf +endef + +SYSLOG_NG_POST_INSTALL_TARGET_HOOKS = SYSLOG_NG_FIXUP_CONFIG + +$(eval $(autotools-package)) diff --git a/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch b/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch new file mode 100644 index 00000000..dcc2cbe6 --- /dev/null +++ b/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch @@ -0,0 +1,22 @@ +On uclibc elf.h does not have GNU extentions but we need this define +so we define it locally if its not getting it from elf.h + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +Index: git/elfparser.h +=================================================================== +--- git.orig/elfparser.h 2011-07-16 18:57:41.000000000 -0700 ++++ git/elfparser.h 2011-07-16 20:28:54.733829895 -0700 +@@ -17,6 +17,10 @@ + */ + #include + ++#ifndef NT_GNU_BUILD_ID ++#define NT_GNU_BUILD_ID 3 ++#endif ++ + typedef struct ElfSym ElfSym; + typedef struct ElfParser ElfParser; + diff --git a/package/sysprof/Config.in b/package/sysprof/Config.in new file mode 100644 index 00000000..3913274b --- /dev/null +++ b/package/sysprof/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_SYSPROF + bool "sysprof" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + # In its util.h file, sysprof contains architecture-specific + # code + depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb + select BR2_PACKAGE_LIBGLIB2 + help + Sysprof is a statistical, system-wide profiler that can + profile user and kernel code using the perf API. + + http://sysprof.com + +if BR2_PACKAGE_SYSPROF + +config BR2_PACKAGE_SYSPROF_GUI + bool "sysprof GUI" + depends on BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBGLADE + select BR2_PACKAGE_GDK_PIXBUF + help + GUI for the sysprof system-wide statistical profiler. + +endif + +comment "sysprof needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sysprof/sysprof.hash b/package/sysprof/sysprof.hash new file mode 100644 index 00000000..4ce206be --- /dev/null +++ b/package/sysprof/sysprof.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 baf03c6fc01a845c705873e6fc7927aa89539dcda6963f9ec4c8eb4c086a64f1 sysprof-1.2.0.tar.gz +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING diff --git a/package/sysprof/sysprof.mk b/package/sysprof/sysprof.mk new file mode 100644 index 00000000..9823416e --- /dev/null +++ b/package/sysprof/sysprof.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# sysprof +# +################################################################################ + +SYSPROF_VERSION = 1.2.0 +SYSPROF_SITE = http://sysprof.com +SYSPROF_DEPENDENCIES = libglib2 +SYSPROF_LICENSE = GPL-2.0+ +SYSPROF_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_SYSPROF_GUI),y) +SYSPROF_DEPENDENCIES += libgtk2 libglade gdk-pixbuf +endif + +$(eval $(autotools-package)) diff --git a/package/sysrepo/Config.in b/package/sysrepo/Config.in new file mode 100644 index 00000000..8de141ef --- /dev/null +++ b/package/sysrepo/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_SYSREPO + bool "sysrepo" + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + select BR2_PACKAGE_LIBYANG + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE_UCP + help + Sysrepo is an YANG-based configuration and operational state + data store for Unix/Linux applications. + + https://github.com/sysrepo + +if BR2_PACKAGE_SYSREPO + +config BR2_PACKAGE_SYSREPO_EXAMPLES + bool "enable examples" + help + Enable sysrepo examples. + +endif + +comment "sysrepo needs a toolchain w/ C++, NPTL, dynamic library, gcc >= 4.8" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS_NPTL diff --git a/package/sysrepo/S51sysrepo-plugind b/package/sysrepo/S51sysrepo-plugind new file mode 100644 index 00000000..60ea3ba7 --- /dev/null +++ b/package/sysrepo/S51sysrepo-plugind @@ -0,0 +1,53 @@ +#!/bin/sh + +DAEMON="sysrepo-plugind" +EXECUTABLE="/usr/bin/$DAEMON" + +SYSREPO_PLUGIND_ARGS="" + +# shellcheck source=/dev/null +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + +start() { + printf 'Starting %s: ' "$DAEMON" + start-stop-daemon -S -q -x "$EXECUTABLE" \ + -- $SYSREPO_PLUGIND_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -x "$EXECUTABLE" + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +reload() { + # we do not support real reload .. just restart + restart +} + +case "$1" in + start|stop|restart|reload) + "$1";; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/sysrepo/sysrepo.hash b/package/sysrepo/sysrepo.hash new file mode 100644 index 00000000..d0b3c82a --- /dev/null +++ b/package/sysrepo/sysrepo.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 635f68ad5f8cb5ea3bd7c3081963f1a9a79ee0d6570facb1f3bcbf3b640446a4 sysrepo-1.4.104.tar.gz +sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE diff --git a/package/sysrepo/sysrepo.mk b/package/sysrepo/sysrepo.mk new file mode 100644 index 00000000..e4d553cd --- /dev/null +++ b/package/sysrepo/sysrepo.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# sysrepo +# +################################################################################ + +SYSREPO_VERSION = 1.4.104 +SYSREPO_SITE = $(call github,sysrepo,sysrepo,v$(SYSREPO_VERSION)) +SYSREPO_INSTALL_STAGING = YES +SYSREPO_LICENSE = Apache-2.0 +SYSREPO_LICENSE_FILES = LICENSE +SYSREPO_DEPENDENCIES = libyang pcre host-sysrepo +HOST_SYSREPO_DEPENDENCIES = host-libyang host-pcre + +SYSREPO_CONF_OPTS = \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_EXAMPLES=$(if $(BR2_PACKAGE_SYSREPO_EXAMPLES),ON,OFF) + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +SYSREPO_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic +endif + +define SYSREPO_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/sysrepo/S51sysrepo-plugind \ + $(TARGET_DIR)/etc/init.d/S51sysrepo-plugind +endef + +HOST_SYSREPO_CONF_OPTS = \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_EXAMPLES=OFF \ + -DREPO_PATH=$(TARGET_DIR)/etc/sysrepo + +$(eval $(cmake-package)) +$(eval $(host-cmake-package)) diff --git a/package/sysstat/Config.in b/package/sysstat/Config.in new file mode 100644 index 00000000..442b7876 --- /dev/null +++ b/package/sysstat/Config.in @@ -0,0 +1,39 @@ +config BR2_PACKAGE_SYSSTAT + bool "sysstat" + depends on BR2_USE_MMU # fork() + help + The sysstat utilities are a collection of performance + monitoring tools for Linux. These include sar, sadf, mpstat, + iostat, pidstat and sa tools. + + Some Features : + + * Input / Output and transfer rate statistics (global, per + device, per partition, per network filesystem and per + Linux task / PID) + * CPU statistics (global, per CPU and per Linux task / + PID), including support for virtualization architectures + * Memory and swap space utilization statistics + * Virtual memory, paging and fault statistics + * Per-task (per-PID) memory and page fault statistics + * Global CPU and page fault statistics for tasks and all + their children + * Process creation activity + * Interrupt statistics (global, per CPU and per interrupt, + including potential APIC interrupt sources) + * Extensive network statistics: network interface activity + (number of packets and kB received and transmitted per + second, etc.) including failures from network devices; + network traffic statistics for IP, TCP, ICMP and UDP + protocols based on SNMPv2 standards; support for + IPv6-related protocols. + * NFS server and client activity + * Socket statistics + * Run queue and system load statistics + * Kernel internal tables utilization statistics + * System and per Linux task switching activity + * Swapping statistics + * TTY device activity + * Power management statistics + + http://pagesperso-orange.fr/sebastien.godard/ diff --git a/package/sysstat/sysstat.hash b/package/sysstat/sysstat.hash new file mode 100644 index 00000000..b573f312 --- /dev/null +++ b/package/sysstat/sysstat.hash @@ -0,0 +1,5 @@ +# From: http://sebastien.godard.pagesperso-orange.fr/download.html +sha1 1e38bc029979def730ae1fb1e39f631bd1a3bc73 sysstat-12.4.2.tar.xz +# Locally calculated +sha256 3701b2c1883d50eb384d7b95ce5b6df0a71fdcb3c23f96cb58098d1bcffa018f sysstat-12.4.2.tar.xz +sha256 db296f2f7f35bca3a174efb0eb392b3b17bd94b341851429a3dff411b1c2fc73 COPYING diff --git a/package/sysstat/sysstat.mk b/package/sysstat/sysstat.mk new file mode 100644 index 00000000..8ec49668 --- /dev/null +++ b/package/sysstat/sysstat.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# sysstat +# +################################################################################ + +SYSSTAT_VERSION = 12.4.2 +SYSSTAT_SOURCE = sysstat-$(SYSSTAT_VERSION).tar.xz +SYSSTAT_SITE = http://pagesperso-orange.fr/sebastien.godard +SYSSTAT_CONF_OPTS = --disable-file-attr +SYSSTAT_DEPENDENCIES = host-gettext $(TARGET_NLS_DEPENDENCIES) +SYSSTAT_LICENSE = GPL-2.0+ +SYSSTAT_LICENSE_FILES = COPYING +SYSSTAT_CPE_ID_VENDOR = sysstat_project + +ifeq ($(BR2_PACKAGE_LM_SENSORS),y) +SYSSTAT_DEPENDENCIES += lm-sensors +SYSSTAT_CONF_OPTS += --enable-sensors +else +SYSSTAT_CONF_OPTS += --disable-sensors +endif + +$(eval $(autotools-package)) diff --git a/package/systemd-bootchart/Config.in b/package/systemd-bootchart/Config.in new file mode 100644 index 00000000..9af13db1 --- /dev/null +++ b/package/systemd-bootchart/Config.in @@ -0,0 +1,40 @@ +config BR2_PACKAGE_SYSTEMD_BOOTCHART_ARCH_SUPPORTS + bool + # see src/architecture.h + default y if BR2_aarch64 || BR2_aarch64_be + default y if BR2_arm || BR2_armeb + default y if BR2_i386 || BR2_x86_64 + default y if BR2_m68k + default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + default y if BR2_sh + default y if BR2_sparc || BR2_sparc64 + +config BR2_PACKAGE_SYSTEMD_BOOTCHART + bool "systemd-bootchart" + depends on BR2_PACKAGE_SYSTEMD_BOOTCHART_ARCH_SUPPORTS + depends on BR2_INIT_SYSTEMD + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + help + systemd-bootchart is a tool, usually run at system startup, + that collects the CPU load, disk load, memory usage, as well + as per-process information from a running system. Collected + results are output as an SVG graph. + + systemd-bootchart requires a Linux kernel >= 3.0 with the + following options enabled: + + - CONFIG_SCHEDSTATS + - CONFIG_SCHED_DEBUG + + These options will be automatically enabled by Buildroot if + it is responsible for building the kernel. Otherwise, if you + are building your kernel outside of Buildroot, make sure + these options are enabled. + + http://www.freedesktop.org/software/systemd/man/systemd-bootchart.html + +comment "systemd-bootchart needs a toolchain w/ headers >= 3.17" + depends on BR2_PACKAGE_SYSTEMD_BOOTCHART_ARCH_SUPPORTS + depends on BR2_INIT_SYSTEMD + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 diff --git a/package/systemd-bootchart/systemd-bootchart.hash b/package/systemd-bootchart/systemd-bootchart.hash new file mode 100644 index 00000000..80858832 --- /dev/null +++ b/package/systemd-bootchart/systemd-bootchart.hash @@ -0,0 +1,3 @@ +# sha256 locally computed +sha256 f4cb17b21928e36ec27de5c5294dea6ec1de4acd7ee6c56d6ecc75319cbcaefa systemd-bootchart-233.tar.xz +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSE.LGPL2.1 diff --git a/package/systemd-bootchart/systemd-bootchart.mk b/package/systemd-bootchart/systemd-bootchart.mk new file mode 100644 index 00000000..bcc3dbe2 --- /dev/null +++ b/package/systemd-bootchart/systemd-bootchart.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# systemd-bootchart +# +################################################################################ + +SYSTEMD_BOOTCHART_VERSION = 233 +SYSTEMD_BOOTCHART_SOURCE = systemd-bootchart-$(SYSTEMD_BOOTCHART_VERSION).tar.xz +# Do not use the github helper here: the uploaded release tarball already +# contains the generated autotools scripts. It also slightly differs with +# two missing source files... :-/ +SYSTEMD_BOOTCHART_SITE = https://github.com/systemd/systemd-bootchart/releases/download/v$(SYSTEMD_BOOTCHART_VERSION) +SYSTEMD_BOOTCHART_LICENSE = LGPL-2.1+ +SYSTEMD_BOOTCHART_LICENSE_FILES = LICENSE.LGPL2.1 +SYSTEMD_BOOTCHART_DEPENDENCIES = systemd + +SYSTEMD_BOOTCHART_CONF_OPTS = --disable-man + +$(eval $(autotools-package)) diff --git a/package/systemd/0001-loongarch64-architecture.patch b/package/systemd/0001-loongarch64-architecture.patch new file mode 100644 index 00000000..496cb842 --- /dev/null +++ b/package/systemd/0001-loongarch64-architecture.patch @@ -0,0 +1,43 @@ +Index: systemd-241/src/basic/architecture.h +=================================================================== +--- systemd-241.orig/src/basic/architecture.h 2019-02-14 18:11:58.000000000 +0800 ++++ systemd-241/src/basic/architecture.h 2020-08-25 09:38:44.202289218 +0800 +@@ -44,6 +44,7 @@ + ARCHITECTURE_RISCV64, + ARCHITECTURE_ARC, + ARCHITECTURE_ARC_BE, ++ ARCHITECTURE_LOONGARCH64, + _ARCHITECTURE_MAX, + _ARCHITECTURE_INVALID = -1 + }; +@@ -229,6 +230,9 @@ + # define native_architecture() ARCHITECTURE_ARC + # define LIB_ARCH_TUPLE "arc-linux" + # endif ++#elif defined(__loongarch64) ++# define native_architecture() ARCHITECTURE_LOONGARCH64 ++# define LIB_ARCH_TUPLE "loongarch64-linux-gnu" + #else + # error "Please register your architecture here!" + #endif +Index: systemd-241/src/basic/architecture.c +=================================================================== +--- systemd-241.orig/src/basic/architecture.c 2019-02-14 18:11:58.000000000 +0800 ++++ systemd-241/src/basic/architecture.c 2020-08-25 09:41:46.528802189 +0800 +@@ -118,6 +118,8 @@ + #elif defined(__arc__) + { "arc", ARCHITECTURE_ARC }, + { "arceb", ARCHITECTURE_ARC_BE }, ++#elif defined(__loongarch64) ++ { "loongarch64", ARCHITECTURE_LOONGARCH64 }, + #else + #error "Please register your architecture here!" + #endif +@@ -173,6 +175,7 @@ + [ARCHITECTURE_RISCV64] = "riscv64", + [ARCHITECTURE_ARC] = "arc", + [ARCHITECTURE_ARC_BE] = "arc-be", ++ [ARCHITECTURE_LOONGARCH64] = "loongarch64", + }; + + DEFINE_STRING_TABLE_LOOKUP(architecture, int); diff --git a/package/systemd/80-buildroot.preset b/package/systemd/80-buildroot.preset new file mode 100644 index 00000000..778dab38 --- /dev/null +++ b/package/systemd/80-buildroot.preset @@ -0,0 +1,2 @@ +# Higher priority than systemd presets +# This file is currently empty, but is available for demonstration and future use diff --git a/package/systemd/Config.in b/package/systemd/Config.in new file mode 100644 index 00000000..18e9f95f --- /dev/null +++ b/package/systemd/Config.in @@ -0,0 +1,491 @@ +config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS + bool + # see src/basic/architecture.h + default y if BR2_arc + default y if BR2_aarch64 || BR2_aarch64_be + default y if BR2_arm || BR2_armeb + default y if BR2_i386 || BR2_x86_64 + default y if BR2_m68k + default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + default y if BR2_nios2 + default y if BR2_riscv + default y if BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb + default y if BR2_sparc || BR2_sparc64 + default y if BR2_s390x + default y if BR2_loongarch64 + +menuconfig BR2_PACKAGE_SYSTEMD + bool "systemd" + depends on BR2_INIT_SYSTEMD + depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS # kmod + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_TOOLCHAIN_HAS_SSP + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 + depends on BR2_HOST_GCC_AT_LEAST_5 # host-systemd + select BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_DBUS # runtime dependency only + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_AGETTY + select BR2_PACKAGE_UTIL_LINUX_MOUNT + select BR2_PACKAGE_UTIL_LINUX_FSCK + select BR2_PACKAGE_KMOD + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools + select BR2_PACKAGE_KMOD_TOOLS + select BR2_TARGET_TZ_INFO + select BR2_NEEDS_HOST_UTF8_LOCALE + select BR2_PACKAGE_HOST_SYSTEMD # for systemctl preset-all, during target-finalize + help + systemd is a system and service manager for Linux, + compatible with SysV and LSB init scripts. systemd provides + aggressive parallelization capabilities, uses socket and + D-Bus activation for starting services, offers on-demand + starting of daemons, keeps track of processes using Linux + cgroups, supports snapshotting and restoring of the system + state, maintains mount and automount points and implements + an elaborate transactional dependency-based service control + logic. It can work as a drop-in replacement for sysvinit. + + Systemd requires a Linux kernel >= 3.0 with the following + options enabled: + + - CONFIG_CGROUPS + - CONFIG_INOTIFY_USER + - CONFIG_FHANDLE + - CONFIG_AUTOFS4_FS + - CONFIG_TMPFS_POSIX_ACL + - CONFIG_TMPFS_XATTR + + These options will be automatically enabled by Buildroot if + it is responsible for building the kernel. Otherwise, if you + are building your kernel outside of Buildroot, make sure + these options are enabled. + + Systemd also provides udev, the userspace device daemon. + + The selection of other packages will enable some features: + + - acl package will add support for multi-seat. + - xz and/or l4 packages will add compression support in + journal and coredump. + - libcurl package will add support for systemd-journal-upload. + - libgcrypt package will add support for journal sealing and + DNSSEC verification in resolved. + + Notice that systemd selects the fsck wrapper from util-linux + but no particular fsck. is selected. You must choose + the apropriate ones (e.g. e2fsck, from the e2fsprogs + package) according to the system configuration. + + http://freedesktop.org/wiki/Software/systemd + +if BR2_PACKAGE_SYSTEMD + +config BR2_PACKAGE_PROVIDES_UDEV + default "systemd" + +config BR2_PACKAGE_SYSTEMD_BOOT + bool "systemd-boot" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_GNU_EFI + help + systemd-boot is a simple UEFI boot manager which executes + configured EFI images. The default entry is selected by a + configured pattern (glob) or an on-screen menu. + + systemd-boot operates on the EFI System Partition (ESP) + only. Configuration file fragments, kernels, initrds, other + EFI images need to reside on the ESP. Linux kernels need to + be built with CONFIG_EFI_STUB to be able to be directly + executed as an EFI image. + + See the Grub2 help text for details on preparing an EFI + capable disk image using systemd-boot: the instructions are + exactly the same, except that the systemd-boot configuration + files will be located in /loader/ inside the EFI partition. + + https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/ + +config BR2_PACKAGE_SYSTEMD_INITRD + bool "Services for booting from initrd" + help + Install various services that are only useful if systemd is + run from an initrd. + +config BR2_PACKAGE_SYSTEMD_KERNELINSTALL + bool "install kernel-install and related files" + help + kernel-install is used to install and remove kernel and + initramfs images to and from the boot loader partition. + The boot loader partition will usually be one of + /boot, /efi, or /boot/efi. + +config BR2_PACKAGE_SYSTEMD_ANALYZE + bool "systemd-analyze" + help + systemd-analyze may be used to determine system boot-up + performance statistics and retrieve other state and tracing + information from the system and service manager, and to + verify the correctness of unit files. + It is also used to access special functions useful for + advanced system manager debugging. + +config BR2_PACKAGE_SYSTEMD_BOOT_EFI_ARCH + string + default "ia32" if BR2_i386 + default "x64" if BR2_x86_64 + depends on BR2_PACKAGE_SYSTEMD_BOOT + +config BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE + bool "enable journal remote tools" + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBMICROHTTPD + help + journal remote functionality adds three tools: + + systemd-journal-gatewayd serves journal events over the + network. + + systemd-journal-remote is a command to receive serialized + journal events and store them to journal files. + + systemd-journal-upload will upload journal entries to the + URL specified with --url=. + + https://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html + https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.service.html + https://www.freedesktop.org/software/systemd/man/systemd-journal-upload.html + +config BR2_PACKAGE_SYSTEMD_BACKLIGHT + bool "enable backlight support" + help + systemd-backlight is a service that restores the display + backlight brightness at early boot and saves it at shutdown. + + http://www.freedesktop.org/software/systemd/man/systemd-backlight@.service.html + +config BR2_PACKAGE_SYSTEMD_BINFMT + bool "enable binfmt tool" + help + systemd-binfmt is an early boot service that registers + additional binary formats for executables in the kernel. + + http://www.freedesktop.org/software/systemd/man/systemd-binfmt.service.html + +config BR2_PACKAGE_SYSTEMD_COREDUMP + bool "enable coredump hook" + help + systemd-coredump can be used as a helper binary by the + kernel when a user space program receives a fatal signal and + dumps core. + + http://www.freedesktop.org/software/systemd/man/systemd-coredump.html + +config BR2_PACKAGE_SYSTEMD_PSTORE + bool "enable pstore support" + default y + help + When this features is enabled, additional tools and services + are built to support archiving contents of the persistent + storage filesytem. + + https://www.freedesktop.org/software/systemd/man/systemd-pstore.html + +config BR2_PACKAGE_SYSTEMD_FIRSTBOOT + bool "enable firstboot support" + help + systemd-firstboot initializes the most basic system settings + interactively on the first boot. + + http://www.freedesktop.org/software/systemd/man/systemd-firstboot.html + +config BR2_PACKAGE_SYSTEMD_HIBERNATE + bool "enable hibernation support" + select BR2_PACKAGE_SYSTEMD_INITRD + help + When this features is enabled, additional tools and services + are built to support suspending and resuming the system. + + http://www.freedesktop.org/software/systemd/man/systemd-sleep.html + +config BR2_PACKAGE_SYSTEMD_HOMED + bool "enable home daemon" + depends on BR2_TOOLCHAIN_HAS_THREADS # cryptsetup -> lvm2 + depends on BR2_USE_MMU # cryptsetup -> lvm2 + depends on !BR2_STATIC_LIBS # cryptsetup -> lvm2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # cryptsetup -> json-c + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 # fscrypt_key + select BR2_PACKAGE_CRYPTSETUP + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_UTIL_LINUX_LIBFDISK + help + systemd-homed is a system service that may be used to create, + remove, change or inspect home directories. + + https://www.freedesktop.org/software/systemd/man/systemd-homed.service.html + +comment "homed support needs a toolchain w/ threads, dynamic library, kernel headers >= 4.12" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 + +config BR2_PACKAGE_SYSTEMD_HOSTNAMED + bool "enable hostname daemon" + default y + help + systemd-hostnamed is a system service that may be used as a + mechanism to change the system's hostname. + + http://www.freedesktop.org/software/systemd/man/systemd-hostnamed.service.html + +config BR2_PACKAGE_SYSTEMD_HWDB + bool "enable hwdb installation" + default y + help + Enables hardware database installation to /usr/lib/udev/hwdb.d + + Disabling this option improves first boot time (or every boot + time in case of initramfs images) and saves several MB space. + + https://www.freedesktop.org/software/systemd/man/hwdb.html + +config BR2_PACKAGE_SYSTEMD_IMPORTD + bool "enable import daemon" + depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_XZ + select BR2_PACKAGE_ZLIB + help + systemd-importd is a system service that manages virtual + machine and container images for systemd-machined and + machinectl. + + http://www.freedesktop.org/software/systemd/man/machinectl.html#Image%20Transfer%20Commands + +config BR2_PACKAGE_SYSTEMD_LOCALED + bool "enable locale daemon" + help + systemd-localed is a system service that may be used as + mechanism to change the system locale settings, as well as + the console key mapping and default X11 key mapping. + + http://www.freedesktop.org/software/systemd/man/systemd-localed.service.html + +config BR2_PACKAGE_SYSTEMD_LOGIND + bool "enable login daemon" + help + systemd-logind is a system service that manages user logins. + + http://www.freedesktop.org/software/systemd/man/systemd-logind.service.html + +config BR2_PACKAGE_SYSTEMD_MACHINED + bool "enable machine daemon" + help + systemd-machined is a system service that keeps track of + virtual machines and containers, and processes belonging to + them. + + http://www.freedesktop.org/software/systemd/man/systemd-machined.service.html + +config BR2_PACKAGE_SYSTEMD_MYHOSTNAME + bool "enable myhostname NSS plugin" + default y + help + nss-myhostname is a plug-in module for the GNU Name Service + Switch (NSS) functionality of the GNU C Library (glibc), + primarily providing hostname resolution for the locally + configured system hostname as returned by gethostname(2). + + http://www.freedesktop.org/software/systemd/man/nss-myhostname.html + +config BR2_PACKAGE_SYSTEMD_NETWORKD + bool "enable network manager" + default y + help + systemd-networkd is a system service that manages networks. + It detects and configures network devices as they appear, as + well as creating virtual network devices. + + This simple network configuration solution is an alternative + to dhcpcd or ISC dhcp. + + http://www.freedesktop.org/software/systemd/man/systemd-networkd.html + +config BR2_PACKAGE_SYSTEMD_POLKIT + bool "enable polkit support" + depends on BR2_HOST_GCC_AT_LEAST_4_9 # polkit + depends on BR2_INSTALL_LIBSTDCPP # polkit + depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS # polkit + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # polkit + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # polkit + depends on BR2_USE_WCHAR # libglib2 + select BR2_PACKAGE_POLKIT + help + If enabled, systemd is built with polkit support and policy + files for its services are generated and installed. It is + useful for allowing unprivileged processes to speak to + systemd's many privileged processes. + + http://wiki.freedesktop.org/www/Software/polkit/ + +comment "polkit support needs a toolchain with C++, wchar, NPTL, gcc >= 4.9" + depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + !BR2_HOST_GCC_AT_LEAST_4_9 || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ + !BR2_USE_WCHAR + +config BR2_PACKAGE_SYSTEMD_PORTABLED + bool "enable portable services" + help + Portable services are systemd services that can be dynamically + attached and detached from the system. + + These services must come with their own root directory which + they are bound to through an automatically generated drop-in. + + They also have restrictions applied by the host system in the + form of profiles. + + This functionality is provided by the system service + systemd-portabled along with the corresponding CLI + portablectl. + + https://systemd.io/PORTABLE_SERVICES/ + +config BR2_PACKAGE_SYSTEMD_QUOTACHECK + bool "enable quotacheck tools" + help + systemd-quotacheck is a service responsible for file system + quota checks. It is run once at boot after all necessary + file systems are mounted. It is pulled in only if at least + one file system has quotas enabled. + + http://www.freedesktop.org/software/systemd/man/systemd-quotacheck.service.html + +config BR2_PACKAGE_SYSTEMD_RANDOMSEED + bool "enable random-seed support" + help + systemd-random-seed is a service that restores the random + seed of the system at early boot and saves it at + shutdown. Saving/restoring the random seed across boots + increases the amount of available entropy early at boot. + + http://www.freedesktop.org/software/systemd/man/systemd-random-seed.service.html + +config BR2_PACKAGE_SYSTEMD_REPART + bool "enable repart support" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_UTIL_LINUX_LIBFDISK + help + systemd-repart grows and adds partitions to a partition table, + based on the configuration files described in repart.d. + + https://www.freedesktop.org/software/systemd/man/systemd-repart.html + +config BR2_PACKAGE_SYSTEMD_RESOLVED + bool "enable resolve daemon" + default y + help + systemd-resolved is a system service that provides network + name resolution to local applications. It implements a + caching and validating DNS/DNSSEC stub resolver, as well as + an LLMNR resolver and responder. + + http://www.freedesktop.org/software/systemd/man/systemd-resolved.html + +config BR2_PACKAGE_SYSTEMD_RFKILL + bool "enable rfkill tools" + help + systemd-rfkill is a service that restores the RF kill switch + state at early boot and saves it at shutdown. + + http://www.freedesktop.org/software/systemd/man/systemd-rfkill@.service.html + +config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT + bool "enable SMACK support" + select BR2_PACKAGE_ATTR + select BR2_PACKAGE_SMACK + help + Enable support for SMACK, the Simple Mandatory Access + Control Kernel, a minimal approach to Access Control + implemented as a kernel LSM. + + This feature requires a kernel >= 3.8. + + When this feature is enabled, Systemd mounts smackfs and + manages security labels for sockets. + +config BR2_PACKAGE_SYSTEMD_SYSUSERS + bool "enable sysusers support" + help + systemd-sysusers creates system users and groups, based on + the file format and location specified in sysusers.d(5). + + http://www.freedesktop.org/software/systemd/man/systemd-sysusers.html + +config BR2_PACKAGE_SYSTEMD_TIMEDATED + bool "enable timedate daemon" + default y + help + systemd-timedated is a system service that may be used as a + mechanism to change the system clock and timezone, as well + as to enable/disable NTP time synchronization. + + http://www.freedesktop.org/software/systemd/man/systemd-timedated.service.html + +config BR2_PACKAGE_SYSTEMD_TIMESYNCD + bool "enable timesync daemon" + default y + help + systemd-timesyncd is a service that may be used to + synchronize the local system clock with a Network Time + Protocol server. + + This simple NTP solution is an alternative to sntp/ntpd from + the ntp package. + + http://www.freedesktop.org/software/systemd/man/systemd-timesyncd.html + +config BR2_PACKAGE_SYSTEMD_TMPFILES + bool "enable tmpfiles support" + default y + help + systemd-tmpfiles creates, deletes, and cleans up volatile + and temporary files and directories, based on the + configuration file format and location specified in + tmpfiles.d(5). + + http://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html + +config BR2_PACKAGE_SYSTEMD_USERDB + bool "enable userdb daemon" + help + systemd-userdbd is a system service that multiplexes + user/group lookups to all local services that provide JSON + user/group record definitions to the system. In addition it + synthesizes JSON user/group records from classic UNIX/glibc + NSS user/group records in order to provide full backwards + compatibility. + + https://www.freedesktop.org/software/systemd/man/systemd-userdbd.service.html + +config BR2_PACKAGE_SYSTEMD_VCONSOLE + bool "enable vconsole tool" + default y + help + systemd-vconsole-setup is an early boot service that + configures the virtual console font and console keymap. + + http://www.freedesktop.org/software/systemd/man/systemd-vconsole-setup.service.html + +endif diff --git a/package/systemd/Config.in.host b/package/systemd/Config.in.host new file mode 100644 index 00000000..8e00bcf5 --- /dev/null +++ b/package/systemd/Config.in.host @@ -0,0 +1,4 @@ +# Select this if you need host systemd tools (e.g. systemctl) +config BR2_PACKAGE_HOST_SYSTEMD + bool + depends on BR2_HOST_GCC_AT_LEAST_5 diff --git a/package/systemd/boot-files/buildroot.conf b/package/systemd/boot-files/buildroot.conf new file mode 100644 index 00000000..16d4d85f --- /dev/null +++ b/package/systemd/boot-files/buildroot.conf @@ -0,0 +1,3 @@ +title Buildroot +linux /bzImage +options root=/dev/sda2 rootwait console=tty1 diff --git a/package/systemd/boot-files/loader.conf b/package/systemd/boot-files/loader.conf new file mode 100644 index 00000000..93b77b8f --- /dev/null +++ b/package/systemd/boot-files/loader.conf @@ -0,0 +1,2 @@ +timeout 3 +default buildroot diff --git a/package/systemd/dhcp.network b/package/systemd/dhcp.network new file mode 100644 index 00000000..9b636fa9 --- /dev/null +++ b/package/systemd/dhcp.network @@ -0,0 +1,4 @@ +[Match] +Name=SYSTEMD_NETWORKD_DHCP_IFACE +[Network] +DHCP=ipv4 diff --git a/package/systemd/systemd.hash b/package/systemd/systemd.hash new file mode 100644 index 00000000..20cd9222 --- /dev/null +++ b/package/systemd/systemd.hash @@ -0,0 +1,6 @@ +# sha256 locally computed +sha256 2869986e219a8dfc96cc0dffac66e0c13bb70a89e16b85a3948876c146cfa3e0 systemd-247.3.tar.gz +sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE.GPL2 +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSE.LGPL2.1 +sha256 6f22d19d35b00f35e0444e0bc9139e6d3bdf7277978f89c4e175e37b18c43f3d README +sha256 83bb6bd9ccd2cf5230cb1807ed16258289768dc4d9cb80069a814e04415a1275 tools/chromiumos/LICENSE diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk new file mode 100644 index 00000000..ea1b898a --- /dev/null +++ b/package/systemd/systemd.mk @@ -0,0 +1,755 @@ +################################################################################ +# +# systemd +# +################################################################################ + +SYSTEMD_VERSION = 247.3 +SYSTEMD_SITE = $(call github,systemd,systemd-stable,v$(SYSTEMD_VERSION)) +SYSTEMD_LICENSE = LGPL-2.1+, GPL-2.0+ (udev), Public Domain (few source files, see README), BSD-3-Clause (tools/chromiumos) +SYSTEMD_LICENSE_FILES = LICENSE.GPL2 LICENSE.LGPL2.1 README tools/chromiumos/LICENSE +SYSTEMD_CPE_ID_VENDOR = freedesktop +SYSTEMD_INSTALL_STAGING = YES +SYSTEMD_DEPENDENCIES = \ + $(BR2_COREUTILS_HOST_DEPENDENCY) \ + $(if $(BR2_PACKAGE_BASH_COMPLETION),bash-completion) \ + host-gperf \ + kmod \ + libcap \ + util-linux-libs \ + $(TARGET_NLS_DEPENDENCIES) + +SYSTEMD_SELINUX_MODULES = systemd udev + +SYSTEMD_PROVIDES = udev + +SYSTEMD_CONF_OPTS += \ + -Ddefault-hierarchy=hybrid \ + -Didn=true \ + -Dima=false \ + -Dkexec-path=/usr/sbin/kexec \ + -Dkmod-path=/usr/bin/kmod \ + -Dldconfig=false \ + -Dloadkeys-path=/usr/bin/loadkeys \ + -Dman=false \ + -Dmount-path=/usr/bin/mount \ + -Dmode=release \ + -Dnss-systemd=true \ + -Dquotacheck-path=/usr/sbin/quotacheck \ + -Dquotaon-path=/usr/sbin/quotaon \ + -Drootlibdir='/usr/lib' \ + -Dsetfont-path=/usr/bin/setfont \ + -Dsplit-bin=true \ + -Dsplit-usr=false \ + -Dsulogin-path=/usr/sbin/sulogin \ + -Dsystem-gid-max=999 \ + -Dsystem-uid-max=999 \ + -Dsysvinit-path= \ + -Dsysvrcnd-path= \ + -Dtelinit-path= \ + -Dtests=false \ + -Dumount-path=/usr/bin/umount \ + -Dutmp=false + +ifeq ($(BR2_PACKAGE_ACL),y) +SYSTEMD_DEPENDENCIES += acl +SYSTEMD_CONF_OPTS += -Dacl=true +else +SYSTEMD_CONF_OPTS += -Dacl=false +endif + +ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y) +SYSTEMD_DEPENDENCIES += libapparmor +SYSTEMD_CONF_OPTS += -Dapparmor=true +else +SYSTEMD_CONF_OPTS += -Dapparmor=false +endif + +ifeq ($(BR2_PACKAGE_AUDIT),y) +SYSTEMD_DEPENDENCIES += audit +SYSTEMD_CONF_OPTS += -Daudit=true +else +SYSTEMD_CONF_OPTS += -Daudit=false +endif + +ifeq ($(BR2_PACKAGE_CRYPTSETUP),y) +SYSTEMD_DEPENDENCIES += cryptsetup +SYSTEMD_CONF_OPTS += -Dlibcryptsetup=true +else +SYSTEMD_CONF_OPTS += -Dlibcryptsetup=false +endif + +ifeq ($(BR2_PACKAGE_ELFUTILS),y) +SYSTEMD_DEPENDENCIES += elfutils +SYSTEMD_CONF_OPTS += -Delfutils=true +else +SYSTEMD_CONF_OPTS += -Delfutils=false +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +SYSTEMD_DEPENDENCIES += gnutls +SYSTEMD_CONF_OPTS += -Dgnutls=true +else +SYSTEMD_CONF_OPTS += -Dgnutls=false +endif + +ifeq ($(BR2_PACKAGE_IPTABLES),y) +SYSTEMD_DEPENDENCIES += iptables +SYSTEMD_CONF_OPTS += -Dlibiptc=true +else +SYSTEMD_CONF_OPTS += -Dlibiptc=false +endif + +# Both options can't be selected at the same time so prefer libidn2 +ifeq ($(BR2_PACKAGE_LIBIDN2),y) +SYSTEMD_DEPENDENCIES += libidn2 +SYSTEMD_CONF_OPTS += -Dlibidn2=true -Dlibidn=false +else ifeq ($(BR2_PACKAGE_LIBIDN),y) +SYSTEMD_DEPENDENCIES += libidn +SYSTEMD_CONF_OPTS += -Dlibidn=true -Dlibidn2=false +else +SYSTEMD_CONF_OPTS += -Dlibidn=false -Dlibidn2=false +endif + +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) +SYSTEMD_DEPENDENCIES += libseccomp +SYSTEMD_CONF_OPTS += -Dseccomp=true +else +SYSTEMD_CONF_OPTS += -Dseccomp=false +endif + +ifeq ($(BR2_PACKAGE_LIBXKBCOMMON),y) +SYSTEMD_DEPENDENCIES += libxkbcommon +SYSTEMD_CONF_OPTS += -Dxkbcommon=true +else +SYSTEMD_CONF_OPTS += -Dxkbcommon=false +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +SYSTEMD_DEPENDENCIES += bzip2 +SYSTEMD_CONF_OPTS += -Dbzip2=true +else +SYSTEMD_CONF_OPTS += -Dbzip2=false +endif + +ifeq ($(BR2_PACKAGE_ZSTD),y) +SYSTEMD_DEPENDENCIES += zstd +SYSTEMD_CONF_OPTS += -Dzstd=true +else +SYSTEMD_CONF_OPTS += -Dzstd=false +endif + +ifeq ($(BR2_PACKAGE_LZ4),y) +SYSTEMD_DEPENDENCIES += lz4 +SYSTEMD_CONF_OPTS += -Dlz4=true +else +SYSTEMD_CONF_OPTS += -Dlz4=false +endif + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +SYSTEMD_DEPENDENCIES += linux-pam +SYSTEMD_CONF_OPTS += -Dpam=true +else +SYSTEMD_CONF_OPTS += -Dpam=false +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),y) +SYSTEMD_CONF_OPTS += -Dfdisk=true +else +SYSTEMD_CONF_OPTS += -Dfdisk=false +endif + +ifeq ($(BR2_PACKAGE_VALGRIND),y) +SYSTEMD_DEPENDENCIES += valgrind +SYSTEMD_CONF_OPTS += -Dvalgrind=true +else +SYSTEMD_CONF_OPTS += -Dvalgrind=false +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +SYSTEMD_DEPENDENCIES += xz +SYSTEMD_CONF_OPTS += -Dxz=true +else +SYSTEMD_CONF_OPTS += -Dxz=false +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +SYSTEMD_DEPENDENCIES += zlib +SYSTEMD_CONF_OPTS += -Dzlib=true +else +SYSTEMD_CONF_OPTS += -Dzlib=false +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +SYSTEMD_DEPENDENCIES += libcurl +SYSTEMD_CONF_OPTS += -Dlibcurl=true +else +SYSTEMD_CONF_OPTS += -Dlibcurl=false +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +SYSTEMD_DEPENDENCIES += libgcrypt +SYSTEMD_CONF_OPTS += -Ddefault-dnssec=allow-downgrade -Dgcrypt=true +else +SYSTEMD_CONF_OPTS += -Ddefault-dnssec=no -Dgcrypt=false +endif + +ifeq ($(BR2_PACKAGE_P11_KIT),y) +SYSTEMD_DEPENDENCIES += p11-kit +SYSTEMD_CONF_OPTS += -Dp11kit=true +else +SYSTEMD_CONF_OPTS += -Dp11kit=false +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SYSTEMD_DEPENDENCIES += openssl +SYSTEMD_CONF_OPTS += -Dopenssl=true +else +SYSTEMD_CONF_OPTS += -Dopenssl=false +endif + +ifeq ($(BR2_PACKAGE_PCRE2),y) +SYSTEMD_DEPENDENCIES += pcre2 +SYSTEMD_CONF_OPTS += -Dpcre2=true +else +SYSTEMD_CONF_OPTS += -Dpcre2=false +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y) +SYSTEMD_CONF_OPTS += -Dblkid=true +else +SYSTEMD_CONF_OPTS += -Dblkid=false +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),y) +SYSTEMD_CONF_OPTS += -Dnologin-path=/sbin/nologin +else +SYSTEMD_CONF_OPTS += -Dnologin-path=/bin/false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_INITRD),y) +SYSTEMD_CONF_OPTS += -Dinitrd=true +else +SYSTEMD_CONF_OPTS += -Dinitrd=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_KERNELINSTALL),y) +SYSTEMD_CONF_OPTS += -Dkernel-install=true +else +SYSTEMD_CONF_OPTS += -Dkernel-install=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_ANALYZE),y) +SYSTEMD_CONF_OPTS += -Danalyze=true +else +SYSTEMD_CONF_OPTS += -Danalyze=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE),y) +# remote also depends on libcurl, this is already added above. +SYSTEMD_DEPENDENCIES += libmicrohttpd +SYSTEMD_CONF_OPTS += -Dremote=true -Dmicrohttpd=true +SYSTEMD_REMOTE_USER = systemd-journal-remote -1 systemd-journal-remote -1 * - - - systemd Journal Remote +else +SYSTEMD_CONF_OPTS += -Dremote=false -Dmicrohttpd=false +endif + +ifeq ($(BR2_PACKAGE_LIBQRENCODE),y) +SYSTEMD_DEPENDENCIES += libqrencode +SYSTEMD_CONF_OPTS += -Dqrencode=true +else +SYSTEMD_CONF_OPTS += -Dqrencode=false +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +SYSTEMD_DEPENDENCIES += libselinux +SYSTEMD_CONF_OPTS += -Dselinux=true +else +SYSTEMD_CONF_OPTS += -Dselinux=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB),y) +SYSTEMD_CONF_OPTS += -Dhwdb=true +define SYSTEMD_BUILD_HWDB + $(HOST_DIR)/bin/udevadm hwdb --update --root $(TARGET_DIR) +endef +SYSTEMD_TARGET_FINALIZE_HOOKS += SYSTEMD_BUILD_HWDB +define SYSTEMD_RM_HWDB_SRV + rm -rf $(TARGET_DIR)/$(HOST_EUDEV_SYSCONFDIR)/udev/hwdb.d/ +endef +SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_RM_HWDB_SRV +else +SYSTEMD_CONF_OPTS += -Dhwdb=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT),y) +SYSTEMD_CONF_OPTS += -Dbinfmt=true +else +SYSTEMD_CONF_OPTS += -Dbinfmt=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y) +SYSTEMD_CONF_OPTS += -Dvconsole=true +else +SYSTEMD_CONF_OPTS += -Dvconsole=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK),y) +SYSTEMD_CONF_OPTS += -Dquotacheck=true +else +SYSTEMD_CONF_OPTS += -Dquotacheck=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_TMPFILES),y) +SYSTEMD_CONF_OPTS += -Dtmpfiles=true +else +SYSTEMD_CONF_OPTS += -Dtmpfiles=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y) +SYSTEMD_CONF_OPTS += -Dsysusers=true +else +SYSTEMD_CONF_OPTS += -Dsysusers=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT),y) +SYSTEMD_CONF_OPTS += -Dfirstboot=true +else +SYSTEMD_CONF_OPTS += -Dfirstboot=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED),y) +SYSTEMD_CONF_OPTS += -Drandomseed=true +else +SYSTEMD_CONF_OPTS += -Drandomseed=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT),y) +SYSTEMD_CONF_OPTS += -Dbacklight=true +else +SYSTEMD_CONF_OPTS += -Dbacklight=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL),y) +SYSTEMD_CONF_OPTS += -Drfkill=true +else +SYSTEMD_CONF_OPTS += -Drfkill=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y) +SYSTEMD_CONF_OPTS += -Dlogind=true +else +SYSTEMD_CONF_OPTS += -Dlogind=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED),y) +SYSTEMD_CONF_OPTS += -Dmachined=true -Dnss-mymachines=true +else +SYSTEMD_CONF_OPTS += -Dmachined=false -Dnss-mymachines=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD),y) +SYSTEMD_CONF_OPTS += -Dimportd=true +else +SYSTEMD_CONF_OPTS += -Dimportd=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_HOMED),y) +SYSTEMD_CONF_OPTS += -Dhomed=true +SYSTEMD_DEPENDENCIES += cryptsetup openssl +else +SYSTEMD_CONF_OPTS += -Dhomed=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED),y) +SYSTEMD_CONF_OPTS += -Dhostnamed=true +else +SYSTEMD_CONF_OPTS += -Dhostnamed=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME),y) +SYSTEMD_CONF_OPTS += -Dnss-myhostname=true +else +SYSTEMD_CONF_OPTS += -Dnss-myhostname=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED),y) +SYSTEMD_CONF_OPTS += -Dtimedated=true +else +SYSTEMD_CONF_OPTS += -Dtimedated=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED),y) +SYSTEMD_CONF_OPTS += -Dlocaled=true +else +SYSTEMD_CONF_OPTS += -Dlocaled=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_REPART),y) +SYSTEMD_CONF_OPTS += -Drepart=true +SYSTEMD_DEPENDENCIES += openssl +else +SYSTEMD_CONF_OPTS += -Drepart=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_USERDB),y) +SYSTEMD_CONF_OPTS += -Duserdb=true +else +SYSTEMD_CONF_OPTS += -Duserdb=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP),y) +SYSTEMD_CONF_OPTS += -Dcoredump=true +SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * - - - systemd core dump processing +else +SYSTEMD_CONF_OPTS += -Dcoredump=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_PSTORE),y) +SYSTEMD_CONF_OPTS += -Dpstore=true +else +SYSTEMD_CONF_OPTS += -Dpstore=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT),y) +SYSTEMD_CONF_OPTS += -Dpolkit=true +SYSTEMD_DEPENDENCIES += polkit +else +SYSTEMD_CONF_OPTS += -Dpolkit=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_PORTABLED),y) +SYSTEMD_CONF_OPTS += -Dportabled=true +else +SYSTEMD_CONF_OPTS += -Dportabled=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y) +SYSTEMD_CONF_OPTS += -Dnetworkd=true +SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - systemd Network Management +SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP)) +ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),) +define SYSTEMD_INSTALL_NETWORK_CONFS + sed s/SYSTEMD_NETWORKD_DHCP_IFACE/$(SYSTEMD_NETWORKD_DHCP_IFACE)/ \ + $(SYSTEMD_PKGDIR)/dhcp.network > \ + $(TARGET_DIR)/etc/systemd/network/$(SYSTEMD_NETWORKD_DHCP_IFACE).network +endef +endif +else +SYSTEMD_CONF_OPTS += -Dnetworkd=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y) +define SYSTEMD_INSTALL_RESOLVCONF_HOOK + ln -sf ../run/systemd/resolve/resolv.conf \ + $(TARGET_DIR)/etc/resolv.conf +endef +SYSTEMD_CONF_OPTS += -Dnss-resolve=true -Dresolve=true +SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - systemd Resolver +else +SYSTEMD_CONF_OPTS += -Dnss-resolve=false -Dresolve=false +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +SYSTEMD_CONF_OPTS += -Ddns-over-tls=gnutls -Ddefault-dns-over-tls=opportunistic +SYSTEMD_DEPENDENCIES += gnutls +else ifeq ($(BR2_PACKAGE_OPENSSL),y) +SYSTEMD_CONF_OPTS += -Ddns-over-tls=openssl -Ddefault-dns-over-tls=opportunistic +SYSTEMD_DEPENDENCIES += openssl +else +SYSTEMD_CONF_OPTS += -Ddns-over-tls=false -Ddefault-dns-over-tls=no +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y) +SYSTEMD_CONF_OPTS += -Dtimesyncd=true +SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - systemd Time Synchronization +else +SYSTEMD_CONF_OPTS += -Dtimesyncd=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT),y) +SYSTEMD_CONF_OPTS += -Dsmack=true +else +SYSTEMD_CONF_OPTS += -Dsmack=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE),y) +SYSTEMD_CONF_OPTS += -Dhibernate=true +else +SYSTEMD_CONF_OPTS += -Dhibernate=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_BOOT),y) +SYSTEMD_INSTALL_IMAGES = YES +SYSTEMD_DEPENDENCIES += gnu-efi +SYSTEMD_CONF_OPTS += \ + -Defi=true \ + -Dgnu-efi=true \ + -Defi-cc=$(TARGET_CC) \ + -Defi-ld=$(TARGET_LD) \ + -Defi-libdir=$(STAGING_DIR)/usr/lib \ + -Defi-ldsdir=$(STAGING_DIR)/usr/lib \ + -Defi-includedir=$(STAGING_DIR)/usr/include/efi + +SYSTEMD_BOOT_EFI_ARCH = $(call qstrip,$(BR2_PACKAGE_SYSTEMD_BOOT_EFI_ARCH)) +define SYSTEMD_INSTALL_BOOT_FILES + $(INSTALL) -D -m 0644 $(@D)/build/src/boot/efi/systemd-boot$(SYSTEMD_BOOT_EFI_ARCH).efi \ + $(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(SYSTEMD_BOOT_EFI_ARCH).efi + echo "boot$(SYSTEMD_BOOT_EFI_ARCH).efi" > \ + $(BINARIES_DIR)/efi-part/startup.nsh + $(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/loader.conf \ + $(BINARIES_DIR)/efi-part/loader/loader.conf + $(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/buildroot.conf \ + $(BINARIES_DIR)/efi-part/loader/entries/buildroot.conf +endef + +else +SYSTEMD_CONF_OPTS += -Defi=false -Dgnu-efi=false +endif # BR2_PACKAGE_SYSTEMD_BOOT == y + +SYSTEMD_FALLBACK_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME)) +ifneq ($(SYSTEMD_FALLBACK_HOSTNAME),) +SYSTEMD_CONF_OPTS += -Dfallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME) +endif + +define SYSTEMD_INSTALL_INIT_HOOK + ln -fs multi-user.target \ + $(TARGET_DIR)/usr/lib/systemd/system/default.target +endef + +define SYSTEMD_INSTALL_MACHINEID_HOOK + touch $(TARGET_DIR)/etc/machine-id +endef + +SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ + SYSTEMD_INSTALL_INIT_HOOK \ + SYSTEMD_INSTALL_MACHINEID_HOOK + +define SYSTEMD_INSTALL_IMAGES_CMDS + $(SYSTEMD_INSTALL_BOOT_FILES) +endef + +define SYSTEMD_USERS + # udev user groups + # systemd user groups + - - systemd-journal -1 * - - - Journal + $(SYSTEMD_REMOTE_USER) + $(SYSTEMD_COREDUMP_USER) + $(SYSTEMD_NETWORKD_USER) + $(SYSTEMD_RESOLVED_USER) + $(SYSTEMD_TIMESYNCD_USER) +endef + +define SYSTEMD_INSTALL_NSSCONFIG_HOOK + $(SED) '/^passwd:/ {/systemd/! s/$$/ systemd/}' \ + -e '/^group:/ {/systemd/! s/$$/ [SUCCESS=merge] systemd/}' \ + $(if $(BR2_PACKAGE_SYSTEMD_RESOLVED), \ + -e '/^hosts:/ s/[[:space:]]*mymachines//' \ + -e '/^hosts:/ {/resolve/! s/files/files resolve [!UNAVAIL=return]/}' ) \ + $(if $(BR2_PACKAGE_SYSTEMD_MYHOSTNAME), \ + -e '/^hosts:/ {/myhostname/! s/$$/ myhostname/}' ) \ + $(if $(BR2_PACKAGE_SYSTEMD_MACHINED), \ + -e '/^passwd:/ {/mymachines/! s/files/files mymachines/}' \ + -e '/^group:/ {/mymachines/! s/files/files [SUCCESS=merge] mymachines/}' \ + -e '/^hosts:/ {/mymachines/! s/files/files mymachines/}' ) \ + $(TARGET_DIR)/etc/nsswitch.conf +endef + +SYSTEMD_TARGET_FINALIZE_HOOKS += \ + SYSTEMD_INSTALL_NSSCONFIG_HOOK \ + SYSTEMD_INSTALL_RESOLVCONF_HOOK + +ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),) +# systemd provides multiple units to autospawn getty as neede +# * getty@.service to start a getty on normal TTY +# * sertial-getty@.service to start a getty on serial lines +# * console-getty.service for generic /dev/console +# * container-getty@.service for a getty on /dev/pts/* +# +# the generator systemd-getty-generator will +# * read the console= kernel command line parameter +# * enable one of the above units depending on what it finds +# +# Systemd defaults to enablinb getty@tty1.service +# +# What we want to do +# * Enable a getty on $BR2_TARGET_GENERIC_TTY_PATH +# * Set the baudrate for all units according to BR2_TARGET_GENERIC_GETTY_BAUDRATE +# * Always enable a getty on the console using systemd-getty-generator +# (backward compatibility with previous releases of buildroot) +# +# What we do +# * disable getty@tty1 (enabled by upstream systemd) +# * enable getty@xxx if $BR2_TARGET_GENERIC_TTY_PATH is a tty +# * enable serial-getty@xxx for other $BR2_TARGET_GENERIC_TTY_PATH +# * rewrite baudrates if a baudrate is provided +define SYSTEMD_INSTALL_SERVICE_TTY + mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/getty@.service.d; \ + printf '[Install]\nDefaultInstance=\n' \ + >$(TARGET_DIR)/usr/lib/systemd/system/getty@.service.d/buildroot-console.conf; \ + if [ $(BR2_TARGET_GENERIC_GETTY_PORT) = "console" ]; \ + then \ + : ; \ + elif echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \ + then \ + printf '[Install]\nDefaultInstance=%s\n' \ + $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) \ + >$(TARGET_DIR)/usr/lib/systemd/system/getty@.service.d/buildroot-console.conf; \ + else \ + mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/serial-getty@.service.d;\ + printf '[Install]\nDefaultInstance=%s\n' \ + $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) \ + >$(TARGET_DIR)/usr/lib/systemd/system/serial-getty@.service.d/buildroot-console.conf;\ + fi; \ + if [ $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) -gt 0 ] ; \ + then \ + $(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/getty@.service; \ + $(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/serial-getty@.service; \ + $(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/console-getty@.service; \ + $(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/container-getty@.service; \ + fi; \ + if [ "$(BR2_TARGET_GENERIC_GETTY_AUTOLOGIN)" = "y" ] ; \ + then \ + $(SED) 's/-o[[:space:]]'"'"'-p[[:space:]]--[[:space:]]\\\\u'"'"'/-a root/' $(TARGET_DIR)/lib/systemd/system/getty@.service; \ + $(SED) 's/-o[[:space:]]'"'"'-p[[:space:]]--[[:space:]]\\\\u'"'"'/-a root/' $(TARGET_DIR)/lib/systemd/system/serial-getty@.service; \ + $(SED) 's/-o[[:space:]]'"'"'-p[[:space:]]--[[:space:]]\\\\u'"'"'/-a root/' $(TARGET_DIR)/lib/systemd/system/console-getty@.service; \ + $(SED) 's/-o[[:space:]]'"'"'-p[[:space:]]--[[:space:]]\\\\u'"'"'/-a root/' $(TARGET_DIR)/lib/systemd/system/container-getty@.service; \ + fi; \ + if [ "$(BR2_TARGET_TTY0_GETTY_ENABLE)" = "y" ] ; \ + then \ + cd $(TARGET_DIR)/lib/systemd/system && ln -s getty@.service getty@tty0.service; \ + fi +endef +endif + +define SYSTEMD_INSTALL_PRESET + $(INSTALL) -D -m 644 $(SYSTEMD_PKGDIR)/80-buildroot.preset $(TARGET_DIR)/usr/lib/systemd/system-preset/80-buildroot.preset +endef + +define SYSTEMD_INSTALL_INIT_SYSTEMD + $(SYSTEMD_INSTALL_PRESET) + $(SYSTEMD_INSTALL_SERVICE_TTY) + $(SYSTEMD_INSTALL_NETWORK_CONFS) +endef + +define SYSTEMD_PRESET_ALL + $(HOST_DIR)/bin/systemctl --root=$(TARGET_DIR) preset-all +endef +SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_PRESET_ALL + +SYSTEMD_CONF_ENV = $(HOST_UTF8_LOCALE_ENV) +SYSTEMD_NINJA_ENV = $(HOST_UTF8_LOCALE_ENV) + +define SYSTEMD_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS) + $(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE) + $(call KCONFIG_ENABLE_OPT,CONFIG_EPOLL) + $(call KCONFIG_ENABLE_OPT,CONFIG_SIGNALFD) + $(call KCONFIG_ENABLE_OPT,CONFIG_TIMERFD) + $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER) + $(call KCONFIG_ENABLE_OPT,CONFIG_PROC_FS) + $(call KCONFIG_ENABLE_OPT,CONFIG_SYSFS) + $(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS) + $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL) + $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_XATTR) +endef + +# We need a very minimal host variant, so we disable as much as possible. +HOST_SYSTEMD_CONF_OPTS = \ + -Dsplit-bin=true \ + -Dsplit-usr=false \ + --prefix=/usr \ + --libdir=lib \ + --sysconfdir=/etc \ + --localstatedir=/var \ + -Dmode=release \ + -Dutmp=false \ + -Dhibernate=false \ + -Dldconfig=false \ + -Dresolve=false \ + -Defi=false \ + -Dtpm=false \ + -Denvironment-d=false \ + -Dbinfmt=false \ + -Drepart=false \ + -Dcoredump=false \ + -Dpstore=false \ + -Dlogind=false \ + -Dhostnamed=false \ + -Dlocaled=false \ + -Dmachined=false \ + -Dportabled=false \ + -Duserdb=false \ + -Dhomed=false \ + -Dnetworkd=false \ + -Dtimedated=false \ + -Dtimesyncd=false \ + -Dremote=false \ + -Dcreate-log-dirs=false \ + -Dnss-myhostname=false \ + -Dnss-mymachines=false \ + -Dnss-resolve=false \ + -Dnss-systemd=false \ + -Dfirstboot=false \ + -Drandomseed=false \ + -Dbacklight=false \ + -Dvconsole=false \ + -Dquotacheck=false \ + -Dsysusers=false \ + -Dtmpfiles=false \ + -Dimportd=false \ + -Dhwdb=false \ + -Drfkill=false \ + -Dman=false \ + -Dhtml=false \ + -Dsmack=false \ + -Dpolkit=false \ + -Dblkid=false \ + -Didn=false \ + -Dadm-group=false \ + -Dwheel-group=false \ + -Dzlib=false \ + -Dgshadow=false \ + -Dima=false \ + -Dtests=false \ + -Dglib=false \ + -Dacl=false \ + -Dsysvinit-path='' \ + -Dinitrd=false \ + -Dxdg-autostart=false \ + -Dkernel-install=false \ + -Dsystemd-analyze=false \ + -Dlibcryptsetup=false \ + -Daudit=false \ + -Dzstd=false + +HOST_SYSTEMD_DEPENDENCIES = \ + $(BR2_COREUTILS_HOST_DEPENDENCY) \ + host-util-linux \ + host-patchelf \ + host-libcap \ + host-gperf + +HOST_SYSTEMD_NINJA_ENV = DESTDIR=$(HOST_DIR) + +# Fix RPATH After installation +# * systemd provides a install_rpath instruction to meson because the binaries +# need to link with libsystemd which is not in a standard path +# * meson can only replace the RPATH, not append to it +# * the original rpath is thus lost. +# * the original path had been tweaked by buildroot via LDFLAGS to add +# $(HOST_DIR)/lib +# * thus re-tweak rpath after the installation for all binaries that need it +HOST_SYSTEMD_HOST_TOOLS = busctl journalctl systemctl systemd-* udevadm + +define HOST_SYSTEMD_FIX_RPATH + for f in $(addprefix $(HOST_DIR)/bin/,$(HOST_SYSTEMD_HOST_TOOLS)); do \ + [ -e $$f ] || continue; \ + $(HOST_DIR)/bin/patchelf --set-rpath $(HOST_DIR)/lib:$(HOST_DIR)/lib/systemd $${f} \ + || exit 1; \ + done +endef +HOST_SYSTEMD_POST_INSTALL_HOOKS += HOST_SYSTEMD_FIX_RPATH + +$(eval $(meson-package)) +$(eval $(host-meson-package)) diff --git a/package/sysvinit/0001-Makefile-disable-stack-protector-strong.patch b/package/sysvinit/0001-Makefile-disable-stack-protector-strong.patch new file mode 100644 index 00000000..066bdb36 --- /dev/null +++ b/package/sysvinit/0001-Makefile-disable-stack-protector-strong.patch @@ -0,0 +1,33 @@ +From 0759f3f9bb2850df455599e7c82eda4ec804e3b6 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Wed, 10 Mar 2021 22:57:50 +0100 +Subject: [PATCH] Makefile: disable stack-protector-strong + +Fixes: + + .../aarch64-buildroot-linux-uclibc/bin/ld: runlevel.o: in function `main': + runlevel.c:(.text.startup+0x4): undefined reference to `__stack_chk_guard' + .../aarch64-buildroot-linux-uclibc/bin/ld: cannot find -lssp_nonshared + .../aarch64-buildroot-linux-uclibc/bin/ld: cannot find -lssp + +Signed-off-by: Peter Seiderer +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 1b368dc..1985929 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -10,7 +10,7 @@ + + CPPFLAGS = + CFLAGS ?= -O2 +-override CFLAGS += -ansi -fomit-frame-pointer -fstack-protector-strong -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" ++override CFLAGS += -ansi -fomit-frame-pointer -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" + override CFLAGS += $(shell getconf LFS_CFLAGS) + STATIC = + MANDB := s@^\('\\\\\"\)[^\*-]*-\*- coding: [^[:blank:]]\+ -\*-@\1@ +-- +2.30.1 + diff --git a/package/sysvinit/Config.in b/package/sysvinit/Config.in new file mode 100644 index 00000000..7f27a70f --- /dev/null +++ b/package/sysvinit/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_SYSVINIT + bool "sysvinit" + depends on BR2_USE_MMU # fork() + depends on BR2_INIT_SYSV + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + System V style implementation of /sbin/init, parent of all + processes + + http://savannah.nongnu.org/projects/sysvinit diff --git a/package/sysvinit/inittab b/package/sysvinit/inittab new file mode 100644 index 00000000..a3147103 --- /dev/null +++ b/package/sysvinit/inittab @@ -0,0 +1,31 @@ +# /etc/inittab +# +# This inittab is a basic inittab sample for sysvinit, which mimics +# Buildroot's default inittab for BusyBox. +id:3:initdefault: + +si0::sysinit:/bin/mount -t proc proc /proc +si1::sysinit:/bin/mount -o remount,rw / +si2::sysinit:/bin/mkdir -p /dev/pts /dev/shm +si3::sysinit:/bin/mount -a +si4::sysinit:/sbin/swapon -a +si5::sysinit:/bin/ln -sf /proc/self/fd /dev/fd 2>/dev/null +si6::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin 2>/dev/null +si7::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout 2>/dev/null +si8::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr 2>/dev/null +si9::sysinit:/bin/hostname -F /etc/hostname +rcS:12345:wait:/etc/init.d/rcS + +# S0:1:respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL + +# Stuff to do for the 3-finger salute +#ca::ctrlaltdel:/sbin/reboot + +# Stuff to do before rebooting +shd0:06:wait:/etc/init.d/rcK +shd1:06:wait:/sbin/swapoff -a +shd2:06:wait:/bin/umount -a -r + +# The usual halt or reboot actions +hlt0:0:wait:/sbin/halt -dhp +reb0:6:wait:/sbin/reboot diff --git a/package/sysvinit/sysvinit.hash b/package/sysvinit/sysvinit.hash new file mode 100644 index 00000000..24e5333d --- /dev/null +++ b/package/sysvinit/sysvinit.hash @@ -0,0 +1,5 @@ +# Locally computed: +sha256 7b2c3ffaf19eaf1ca80268762f85f9e4eb8e3c973213d49f9802605b72caa7dc sysvinit-2.98.tar.xz + +# Hash for license files: +sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk new file mode 100644 index 00000000..7deec969 --- /dev/null +++ b/package/sysvinit/sysvinit.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# sysvinit +# +################################################################################ + +SYSVINIT_VERSION = 2.98 +SYSVINIT_SOURCE = sysvinit-$(SYSVINIT_VERSION).tar.xz +SYSVINIT_SITE = http://download.savannah.nongnu.org/releases/sysvinit +SYSVINIT_LICENSE = GPL-2.0+ +SYSVINIT_LICENSE_FILES = COPYING +SYSVINIT_CPE_ID_VENDOR = sysvinit_project + +SYSVINIT_MAKE_OPTS = SYSROOT=$(STAGING_DIR) + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +SYSVINIT_DEPENDENCIES += libselinux +SYSVINIT_MAKE_OPTS += WITH_SELINUX="yes" +endif + +define SYSVINIT_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) $(SYSVINIT_MAKE_OPTS) -C $(@D)/src +endef + +define SYSVINIT_INSTALL_TARGET_CMDS + for x in halt init shutdown killall5; do \ + $(INSTALL) -D -m 0755 $(@D)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \ + done + $(INSTALL) -D -m 0644 package/sysvinit/inittab $(TARGET_DIR)/etc/inittab + ln -sf /sbin/halt $(TARGET_DIR)/sbin/reboot + ln -sf /sbin/halt $(TARGET_DIR)/sbin/poweroff + ln -sf killall5 $(TARGET_DIR)/sbin/pidof +endef + +ifeq ($(BR2_TARGET_GENERIC_GETTY),y) +define SYSVINIT_SET_GETTY + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(SYSTEM_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) #~' \ + $(TARGET_DIR)/etc/inittab +endef +else +define SYSVINIT_SET_GETTY + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~# S0:1:respawn:/sbin/getty -L ttyS0 115200 vt100 #~' \ + $(TARGET_DIR)/etc/inittab +endef +endif # BR2_TARGET_GENERIC_GETTY +SYSVINIT_TARGET_FINALIZE_HOOKS += SYSVINIT_SET_GETTY + +SYSVINIT_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB + +$(eval $(generic-package)) diff --git a/package/szip/Config.in b/package/szip/Config.in new file mode 100644 index 00000000..5a24362f --- /dev/null +++ b/package/szip/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_SZIP + bool "szip" + help + Szip is an implementation of the extended-Rice lossless + compression algorithm. + + The Consultative Committee on Space Data Systems (CCSDS) has + adopted the extended-Rice algorithm for international + standards for space applications[1,6,7]. Szip is reported to + provide fast and effective compression, specifically for the + EOS data generated by the NASA Earth Observatory System + (EOS)[1]. It was originally developed at University of New + Mexico (UNM) and integrated with HDF4 by UNM researchers and + developers. + + http://www.hdfgroup.org/doc_resource/SZIP diff --git a/package/szip/szip.hash b/package/szip/szip.hash new file mode 100644 index 00000000..3b582d90 --- /dev/null +++ b/package/szip/szip.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412 szip-2.1.1.tar.gz +sha256 98cc66747133b26563fefc4630ad4c8c7848c722c7b8a60ecd4afbc4c7d7eb01 COPYING diff --git a/package/szip/szip.mk b/package/szip/szip.mk new file mode 100644 index 00000000..7a8a5a82 --- /dev/null +++ b/package/szip/szip.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# szip +# +################################################################################ + +SZIP_VERSION = 2.1.1 +SZIP_SITE = http://www.hdfgroup.org/ftp/lib-external/szip/2.1.1/src +SZIP_LICENSE = szip license +SZIP_LICENSE_FILES = COPYING +SZIP_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/taglib/0001-fix-taglib-config-file-for-cross-compiling-906.patch b/package/taglib/0001-fix-taglib-config-file-for-cross-compiling-906.patch new file mode 100644 index 00000000..2c6ebd74 --- /dev/null +++ b/package/taglib/0001-fix-taglib-config-file-for-cross-compiling-906.patch @@ -0,0 +1,66 @@ +From 7470f92a67375d00e53b3785a88fa7b26ad6f1da Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Fri, 17 May 2019 13:13:35 +0200 +Subject: [PATCH] fix taglib-config file for cross compiling (#906) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The current taglib-config program does not work for cross-compiling as it only +returns the paths to the host, which breaks building programs which uses +`taglib-config` to link against taglib. + +Fix this by passing sysroot to the `prefix` and `exec_prefix` fields. + +Backported from: 7470f92a67375d00e53b3785a88fa7b26ad6f1da + +Signed-off-by: Jörg Krause +--- + CMakeLists.txt | 2 +- + taglib-config.cmake | 10 +++++----- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2de06324..1a0302c4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -105,7 +105,7 @@ math(EXPR TAGLIB_SOVERSION_PATCH "${TAGLIB_SOVERSION_REVISION}") + include(ConfigureChecks.cmake) + + if(NOT WIN32) +- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/taglib-config") ++ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/taglib-config" @ONLY) + install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/taglib-config" DESTINATION "${BIN_INSTALL_DIR}") + endif() + +diff --git a/taglib-config.cmake b/taglib-config.cmake +index 2bc2811a..96ef6883 100644 +--- a/taglib-config.cmake ++++ b/taglib-config.cmake +@@ -14,10 +14,10 @@ EOH + exit 1; + } + +-prefix=${CMAKE_INSTALL_PREFIX} +-exec_prefix=${CMAKE_INSTALL_PREFIX} +-libdir=${LIB_INSTALL_DIR} +-includedir=${INCLUDE_INSTALL_DIR} ++prefix=@CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@ ++exec_prefix=@CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@ ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include + + flags="" + +@@ -35,7 +35,7 @@ do + flags="$flags -I$includedir/taglib" + ;; + --version) +- echo ${TAGLIB_LIB_VERSION_STRING} ++ echo @TAGLIB_LIB_VERSION_STRING@ + ;; + --prefix) + echo $prefix +-- +2.22.0 + diff --git a/package/taglib/0002-Don-t-assume-TDRC-is-an-instance-of-TextIdentificationFrame.patch b/package/taglib/0002-Don-t-assume-TDRC-is-an-instance-of-TextIdentificationFrame.patch new file mode 100644 index 00000000..c7ca9500 --- /dev/null +++ b/package/taglib/0002-Don-t-assume-TDRC-is-an-instance-of-TextIdentificationFrame.patch @@ -0,0 +1,33 @@ +From eb9ded1206f18f2c319157337edea2533a40bea6 Mon Sep 17 00:00:00 2001 +From: "Stephen F. Booth" +Date: Sun, 23 Jul 2017 10:11:09 -0400 +Subject: [PATCH] Don't assume TDRC is an instance of TextIdentificationFrame + +If TDRC is encrypted, FrameFactory::createFrame() returns UnknownFrame +which causes problems in rebuildAggregateFrames() when it is assumed +that TDRC is a TextIdentificationFrame +[Retrieved from: +https://github.com/taglib/taglib/pull/831/commits/eb9ded1206f18f2c319157337edea2533a40bea6] +Signed-off-by: Fabrice Fontaine +--- + taglib/mpeg/id3v2/id3v2framefactory.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/taglib/mpeg/id3v2/id3v2framefactory.cpp b/taglib/mpeg/id3v2/id3v2framefactory.cpp +index 759a9b7be..9347ab869 100644 +--- a/taglib/mpeg/id3v2/id3v2framefactory.cpp ++++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp +@@ -334,10 +334,11 @@ void FrameFactory::rebuildAggregateFrames(ID3v2::Tag *tag) const + tag->frameList("TDAT").size() == 1) + { + TextIdentificationFrame *tdrc = +- static_cast(tag->frameList("TDRC").front()); ++ dynamic_cast(tag->frameList("TDRC").front()); + UnknownFrame *tdat = static_cast(tag->frameList("TDAT").front()); + +- if(tdrc->fieldList().size() == 1 && ++ if(tdrc && ++ tdrc->fieldList().size() == 1 && + tdrc->fieldList().front().size() == 4 && + tdat->data().size() >= 5) + { diff --git a/package/taglib/0003-Fixed-OOB-read-when-loading-invalid-ogg-flac-file.patch b/package/taglib/0003-Fixed-OOB-read-when-loading-invalid-ogg-flac-file.patch new file mode 100644 index 00000000..b245659c --- /dev/null +++ b/package/taglib/0003-Fixed-OOB-read-when-loading-invalid-ogg-flac-file.patch @@ -0,0 +1,45 @@ +From 2c4ae870ec086f2ddd21a47861a3709c36faac45 Mon Sep 17 00:00:00 2001 +From: Scott Gayou +Date: Tue, 9 Oct 2018 18:46:55 -0500 +Subject: [PATCH] Fixed OOB read when loading invalid ogg flac file. (#868) + (#869) + +CVE-2018-11439 is caused by a failure to check the minimum length +of a ogg flac header. This header is detailed in full at: +https://xiph.org/flac/ogg_mapping.html. Added more strict checking +for entire header. +[Retrieved from: +https://github.com/taglib/taglib/commit/2c4ae870ec086f2ddd21a47861a3709c36faac45] +Signed-off-by: Fabrice Fontaine +--- + taglib/ogg/flac/oggflacfile.cpp | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/taglib/ogg/flac/oggflacfile.cpp b/taglib/ogg/flac/oggflacfile.cpp +index 53d04508a..07ea9dccc 100644 +--- a/taglib/ogg/flac/oggflacfile.cpp ++++ b/taglib/ogg/flac/oggflacfile.cpp +@@ -231,11 +231,21 @@ void Ogg::FLAC::File::scan() + + if(!metadataHeader.startsWith("fLaC")) { + // FLAC 1.1.2+ ++ // See https://xiph.org/flac/ogg_mapping.html for the header specification. ++ if(metadataHeader.size() < 13) ++ return; ++ ++ if(metadataHeader[0] != 0x7f) ++ return; ++ + if(metadataHeader.mid(1, 4) != "FLAC") + return; + +- if(metadataHeader[5] != 1) +- return; // not version 1 ++ if(metadataHeader[5] != 1 && metadataHeader[6] != 0) ++ return; // not version 1.0 ++ ++ if(metadataHeader.mid(9, 4) != "fLaC") ++ return; + + metadataHeader = metadataHeader.mid(13); + } diff --git a/package/taglib/Config.in b/package/taglib/Config.in new file mode 100644 index 00000000..6a87a132 --- /dev/null +++ b/package/taglib/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_TAGLIB + bool "taglib" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + TagLib is a library for reading and editing the meta-data of + several popular audio formats. Currently it supports both + ID3v1 and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 + tags and Vorbis comments in FLAC, MPC, Speex, WavPack and + TrueAudio files. + + http://taglib.org/ + +comment "taglib needs a toolchain w/ C++, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR diff --git a/package/taglib/taglib.hash b/package/taglib/taglib.hash new file mode 100644 index 00000000..4b99e86d --- /dev/null +++ b/package/taglib/taglib.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b taglib-1.11.1.tar.gz +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LGPL +sha256 53692a2ed6c6a2c6ec9b32dd0b820dfae91e0a1fcdf625ca9ed0bdf8705fcc4f COPYING.MPL diff --git a/package/taglib/taglib.mk b/package/taglib/taglib.mk new file mode 100644 index 00000000..f31f1046 --- /dev/null +++ b/package/taglib/taglib.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# taglib +# +################################################################################ + +TAGLIB_VERSION = 1.11.1 +TAGLIB_SITE = http://taglib.github.io/releases +TAGLIB_INSTALL_STAGING = YES +TAGLIB_LICENSE = LGPL-2.1 or MPL-1.1 +TAGLIB_LICENSE_FILES = COPYING.LGPL COPYING.MPL +TAGLIB_CPE_ID_VENDOR = taglib + +# 0002-Don-t-assume-TDRC-is-an-instance-of-TextIdentificationFrame.patch +TAGLIB_IGNORE_CVES += CVE-2017-12678 + +# 0003-Fixed-OOB-read-when-loading-invalid-ogg-flac-file.patch +TAGLIB_IGNORE_CVES += CVE-2018-11439 + +ifeq ($(BR2_PACKAGE_ZLIB),y) +TAGLIB_DEPENDENCIES += zlib +endif + +define TAGLIB_REMOVE_DEVFILE + rm -f $(TARGET_DIR)/usr/bin/taglib-config +endef + +TAGLIB_POST_INSTALL_TARGET_HOOKS += TAGLIB_REMOVE_DEVFILE + +$(eval $(cmake-package)) diff --git a/package/tar/0001-Fix-memory-leak-in-read_header.patch b/package/tar/0001-Fix-memory-leak-in-read_header.patch new file mode 100644 index 00000000..874b27df --- /dev/null +++ b/package/tar/0001-Fix-memory-leak-in-read_header.patch @@ -0,0 +1,129 @@ +From d9d4435692150fa8ff68e1b1a473d187cc3fd777 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Sun, 17 Jan 2021 20:41:11 +0200 +Subject: [PATCH] Fix memory leak in read_header + +Bug reported in https://savannah.gnu.org/bugs/?59897 + +* src/list.c (read_header): Don't return directly from the loop. +Instead set the status and break. Return the status. Free +next_long_name and next_long_link before returning. + +Signed-off-by: Peter Korsgaard +--- + src/list.c | 40 ++++++++++++++++++++++++++++------------ + 1 file changed, 28 insertions(+), 12 deletions(-) + +diff --git a/src/list.c b/src/list.c +index e40a5c8..d7ef441 100644 +--- a/src/list.c ++++ b/src/list.c +@@ -408,26 +408,27 @@ read_header (union block **return_block, struct tar_stat_info *info, + enum read_header_mode mode) + { + union block *header; +- union block *header_copy; + char *bp; + union block *data_block; + size_t size, written; +- union block *next_long_name = 0; +- union block *next_long_link = 0; ++ union block *next_long_name = NULL; ++ union block *next_long_link = NULL; + size_t next_long_name_blocks = 0; + size_t next_long_link_blocks = 0; +- ++ enum read_header status = HEADER_SUCCESS; ++ + while (1) + { +- enum read_header status; +- + header = find_next_block (); + *return_block = header; + if (!header) +- return HEADER_END_OF_FILE; ++ { ++ status = HEADER_END_OF_FILE; ++ break; ++ } + + if ((status = tar_checksum (header, false)) != HEADER_SUCCESS) +- return status; ++ break; + + /* Good block. Decode file size and return. */ + +@@ -437,7 +438,10 @@ read_header (union block **return_block, struct tar_stat_info *info, + { + info->stat.st_size = OFF_FROM_HEADER (header->header.size); + if (info->stat.st_size < 0) +- return HEADER_FAILURE; ++ { ++ status = HEADER_FAILURE; ++ break; ++ } + } + + if (header->header.typeflag == GNUTYPE_LONGNAME +@@ -447,10 +451,14 @@ read_header (union block **return_block, struct tar_stat_info *info, + || header->header.typeflag == SOLARIS_XHDTYPE) + { + if (mode == read_header_x_raw) +- return HEADER_SUCCESS_EXTENDED; ++ { ++ status = HEADER_SUCCESS_EXTENDED; ++ break; ++ } + else if (header->header.typeflag == GNUTYPE_LONGNAME + || header->header.typeflag == GNUTYPE_LONGLINK) + { ++ union block *header_copy; + size_t name_size = info->stat.st_size; + size_t n = name_size % BLOCKSIZE; + size = name_size + BLOCKSIZE; +@@ -517,7 +525,10 @@ read_header (union block **return_block, struct tar_stat_info *info, + xheader_decode_global (&xhdr); + xheader_destroy (&xhdr); + if (mode == read_header_x_global) +- return HEADER_SUCCESS_EXTENDED; ++ { ++ status = HEADER_SUCCESS_EXTENDED; ++ break; ++ } + } + + /* Loop! */ +@@ -536,6 +547,7 @@ read_header (union block **return_block, struct tar_stat_info *info, + name = next_long_name->buffer + BLOCKSIZE; + recent_long_name = next_long_name; + recent_long_name_blocks = next_long_name_blocks; ++ next_long_name = NULL; + } + else + { +@@ -567,6 +579,7 @@ read_header (union block **return_block, struct tar_stat_info *info, + name = next_long_link->buffer + BLOCKSIZE; + recent_long_link = next_long_link; + recent_long_link_blocks = next_long_link_blocks; ++ next_long_link = NULL; + } + else + { +@@ -578,9 +591,12 @@ read_header (union block **return_block, struct tar_stat_info *info, + } + assign_string (&info->link_name, name); + +- return HEADER_SUCCESS; ++ break; + } + } ++ free (next_long_name); ++ free (next_long_link); ++ return status; + } + + #define ISOCTAL(c) ((c)>='0'&&(c)<='7') +-- +2.20.1 + diff --git a/package/tar/Config.in b/package/tar/Config.in new file mode 100644 index 00000000..caf12d6f --- /dev/null +++ b/package/tar/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_TAR + bool "tar" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + A program that saves many files together into a single tape + or disk archive, and can restore individual files from the + archive. + + http://www.gnu.org/software/tar/ + +comment "tar needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + depends on BR2_USE_MMU + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS diff --git a/package/tar/tar.hash b/package/tar/tar.hash new file mode 100644 index 00000000..72f0cd6f --- /dev/null +++ b/package/tar/tar.hash @@ -0,0 +1,4 @@ +# Locally calculated after checking signature +sha256 d0d3ae07f103323be809bc3eac0dcc386d52c5262499fe05511ac4788af1fdd8 tar-1.32.tar.xz +sha256 9fbfba0cba05233421dd619b8825e1ceb7c144e433c15ae48b68f17ede8d404a tar-1.32.cpio.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/tar/tar.mk b/package/tar/tar.mk new file mode 100644 index 00000000..c512d13e --- /dev/null +++ b/package/tar/tar.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# tar +# +################################################################################ + +TAR_VERSION = 1.32 +TAR_SOURCE = tar-$(TAR_VERSION).tar.xz +TAR_SITE = $(BR2_GNU_MIRROR)/tar +# busybox installs in /bin, so we need tar to install as well in /bin +# so that we don't end up with two different tar +TAR_CONF_OPTS = --exec-prefix=/ +TAR_LICENSE = GPL-3.0+ +TAR_LICENSE_FILES = COPYING +TAR_CPE_ID_VENDOR = gnu +# only tar <= 1.16 +TAR_IGNORE_CVES += CVE-2007-4476 + +# 0001-Fix-memory-leak-in-read_header.patch +TAR_IGNORE_CVES += CVE-2021-20193 + +ifeq ($(BR2_PACKAGE_ACL),y) +TAR_DEPENDENCIES += acl +TAR_CONF_OPTS += --with-posix-acls +else +TAR_CONF_OPTS += --without-posix-acls +endif + +ifeq ($(BR2_PACKAGE_ATTR),y) +TAR_DEPENDENCIES += attr +TAR_CONF_OPTS += --with-xattrs +else +TAR_CONF_OPTS += --without-xattrs +endif + +$(eval $(autotools-package)) + +# host-tar: use cpio.gz instead of tar.gz to prevent chicken-egg problem +# of needing tar to build tar. +HOST_TAR_SOURCE = tar-$(TAR_VERSION).cpio.gz + +define HOST_TAR_EXTRACT_CMDS + mkdir -p $(@D) + cd $(@D) && \ + $(call suitable-extractor,$(HOST_TAR_SOURCE)) $(TAR_DL_DIR)/$(HOST_TAR_SOURCE) | cpio -i --preserve-modification-time + mv $(@D)/tar-$(HOST_TAR_VERSION)/* $(@D) + rmdir $(@D)/tar-$(HOST_TAR_VERSION) +endef + +HOST_TAR_CONF_OPTS = --without-selinux + +# we are built before ccache +HOST_TAR_CONF_ENV = \ + CC="$(HOSTCC_NOCCACHE)" \ + CXX="$(HOSTCXX_NOCCACHE)" + +$(eval $(host-autotools-package)) diff --git a/package/targetcli-fb/Config.in b/package/targetcli-fb/Config.in new file mode 100644 index 00000000..24ff3145 --- /dev/null +++ b/package/targetcli-fb/Config.in @@ -0,0 +1,15 @@ +comment "targetcli-fb depends on Python" + depends on !BR2_PACKAGE_PYTHON && !BR2_PACKAGE_PYTHON3 + +config BR2_PACKAGE_TARGETCLI_FB + bool "targetcli-fb" + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_CONFIGSHELL_FB + select BR2_PACKAGE_PYTHON_RTSLIB_FB + select BR2_PACKAGE_PYTHON_SIX + help + targetcli-fb is a command-line interface for configuring the + LIO generic SCSI target, present in 3.x Linux kernel + versions. + + https://github.com/open-iscsi/targetcli-fb diff --git a/package/targetcli-fb/S50target b/package/targetcli-fb/S50target new file mode 100644 index 00000000..3ce55ab4 --- /dev/null +++ b/package/targetcli-fb/S50target @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Restore / clear the Linux "SCSI target" driver configuration with `targetctl` +# + +start() { + local ret + + printf "Restoring target configuration: " + /usr/bin/targetctl restore >/dev/null 2>&1 + ret=$? + echo "done" + + return $ret +} + +stop() { + local ret + + printf "Clearing target configuration: " + /usr/bin/targetctl clear >/dev/null 2>&1 + ret=$? + echo "done" + + return $ret +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/targetcli-fb/target.service b/package/targetcli-fb/target.service new file mode 100644 index 00000000..400284ed --- /dev/null +++ b/package/targetcli-fb/target.service @@ -0,0 +1,14 @@ +[Unit] +Description=Restore LIO kernel target configuration +Requires=sys-kernel-config.mount +After=sys-kernel-config.mount network.target local-fs.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/targetctl restore +ExecStop=/usr/bin/targetctl clear +SyslogIdentifier=target + +[Install] +WantedBy=multi-user.target diff --git a/package/targetcli-fb/targetcli-fb.hash b/package/targetcli-fb/targetcli-fb.hash new file mode 100644 index 00000000..207c38e0 --- /dev/null +++ b/package/targetcli-fb/targetcli-fb.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 0f32ab6f3ecd234280d55be5e89ce2b3a02f9c82c8dccaae66e26464cff8901a targetcli-fb-2.1.fb41.tar.gz +sha256 5df2a0d87d6c562f0ea11c688ac52532aa28d744cabc7994ff0537f64b3b3320 COPYING diff --git a/package/targetcli-fb/targetcli-fb.mk b/package/targetcli-fb/targetcli-fb.mk new file mode 100644 index 00000000..75643446 --- /dev/null +++ b/package/targetcli-fb/targetcli-fb.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# targetcli-fb +# +################################################################################ + +# When upgrading the version, be sure to also upgrade python-rtslib-fb +# and python-configshell-fb at the same time. +TARGETCLI_FB_VERSION = 2.1.fb41 +TARGETCLI_FB_SITE = $(call github,open-iscsi,targetcli-fb,v$(TARGETCLI_FB_VERSION)) +TARGETCLI_FB_LICENSE = Apache-2.0 +TARGETCLI_FB_LICENSE_FILES = COPYING +TARGETCLI_FB_SETUP_TYPE = setuptools +TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six + +define TARGETCLI_FB_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/targetcli-fb/S50target \ + $(TARGET_DIR)/etc/init.d/S50target +endef + +define TARGETCLI_FB_INSTALL_INIT_SYSTEMD + $(INSTALL) -m 0644 -D package/targetcli-fb/target.service \ + $(TARGET_DIR)/usr/lib/systemd/system/target.service +endef + +# Targetcli stores its configuration in /etc/target/saveconfig.json +# and complains if the /etc/target/ directory does not exist. +define TARGETCLI_FB_INSTALL_CONF_DIR + $(INSTALL) -m 0755 -d $(TARGET_DIR)/etc/target +endef + +TARGETCLI_FB_POST_INSTALL_TARGET_HOOKS += TARGETCLI_FB_INSTALL_CONF_DIR + +$(eval $(python-package)) diff --git a/package/taskd/0001-Fix-missing-cmakedefine-HAVE_GET_CURRENT_DIR_NAME.patch b/package/taskd/0001-Fix-missing-cmakedefine-HAVE_GET_CURRENT_DIR_NAME.patch new file mode 100644 index 00000000..960c71b9 --- /dev/null +++ b/package/taskd/0001-Fix-missing-cmakedefine-HAVE_GET_CURRENT_DIR_NAME.patch @@ -0,0 +1,28 @@ +From b067ab9bf667bb9257bb9eeaa6bf25f9a1a17f06 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Fri, 6 May 2016 23:35:42 +0200 +Subject: [PATCH] Fix missing cmakedefine HAVE_GET_CURRENT_DIR_NAME +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jörg Krause +--- + cmake.h.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cmake.h.in b/cmake.h.in +index 4124ce9..0b8f9d0 100644 +--- a/cmake.h.in ++++ b/cmake.h.in +@@ -51,6 +51,7 @@ + #cmakedefine HAVE_ST_BIRTHTIME + + /* Functions */ ++#cmakedefine HAVE_GET_CURRENT_DIR_NAME + #cmakedefine HAVE_TIMEGM + #cmakedefine HAVE_UUID_UNPARSE_LOWER + +-- +2.8.2 + diff --git a/package/taskd/0002-Use-correct-variables-for-GnuTLS-detection.patch b/package/taskd/0002-Use-correct-variables-for-GnuTLS-detection.patch new file mode 100644 index 00000000..f2365ea2 --- /dev/null +++ b/package/taskd/0002-Use-correct-variables-for-GnuTLS-detection.patch @@ -0,0 +1,32 @@ +From 88fee5c6eb2271d3de6b9878cd29a0494999aa18 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Sun, 20 Nov 2016 23:46:45 +0100 +Subject: [PATCH] Use correct variables for GnuTLS detection + +At least with recent CMake, it seems the variables created by +find_package (GnuTLS) are called PC_GNUTLS_INCLUDE_DIRS and +PC_GNUTLS_LIBRARIES. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d8125d9..ccf827b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -110,8 +110,8 @@ message ("-- Looking for GnuTLS") + find_package (GnuTLS REQUIRED) + if (GNUTLS_FOUND) + set (HAVE_LIBGNUTLS true) +- set (TASKD_INCLUDE_DIRS ${TASKD_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIR}) +- set (TASKD_LIBRARIES ${TASKD_LIBRARIES} ${GNUTLS_LIBRARIES}) ++ set (TASKD_INCLUDE_DIRS ${TASKD_INCLUDE_DIRS} ${PC_GNUTLS_INCLUDE_DIRS}) ++ set (TASKD_LIBRARIES ${TASKD_LIBRARIES} ${PC_GNUTLS_LIBRARIES}) + endif (GNUTLS_FOUND) + + message ("-- Looking for libuuid") +-- +2.10.2 + diff --git a/package/taskd/0003-CMakeLists-use-pkg-config-uuid-detection.patch b/package/taskd/0003-CMakeLists-use-pkg-config-uuid-detection.patch new file mode 100644 index 00000000..34139fef --- /dev/null +++ b/package/taskd/0003-CMakeLists-use-pkg-config-uuid-detection.patch @@ -0,0 +1,40 @@ +CMakeLists.txt: use pkg-config to detect uuid when possible + +In order to take into account the libraries used by libuuid when +building statically, using pkg-config is recommended. This patch +therefore improves the CMakeLists.txt to use pkg-config to detect +libuuid when pkg-config is available. + +Signed-off-by: Thomas Petazzoni + +Index: b/CMakeLists.txt +=================================================================== +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,6 +6,7 @@ + + include (CheckFunctionExists) + include (CheckStructHasMember) ++include (FindPkgConfig) + + set (HAVE_CMAKE true) + +@@ -119,8 +120,16 @@ + # Apple and FreeBSD include the uuid functions in their libc, rather than libuuid + check_function_exists (uuid_unparse_lower HAVE_UUID_UNPARSE_LOWER) + else (DARWIN OR FREEBSD) +- find_path (UUID_INCLUDE_DIR uuid/uuid.h) +- find_library (UUID_LIBRARY NAMES uuid) ++ if(PKG_CONFIG_FOUND) ++ pkg_check_modules(PC_UUID uuid) ++ if(PC_UUID_FOUND) ++ set (UUID_INCLUDE_DIR ${PC_UUID_INCLUDE_DIRS}) ++ set (UUID_LIBRARY ${PC_UUID_LIBRARIES}) ++ endif(PC_UUID_FOUND) ++ else(PKG_CONFIG_FOUND) ++ find_path (UUID_INCLUDE_DIR uuid/uuid.h) ++ find_library (UUID_LIBRARY NAMES uuid) ++ endif(PKG_CONFIG_FOUND) + if (UUID_INCLUDE_DIR AND UUID_LIBRARY) + set (TASKD_INCLUDE_DIRS ${TASKD_INCLUDE_DIRS} ${UUID_INCLUDE_DIR}) + set (TASKD_LIBRARIES ${TASKD_LIBRARIES} ${UUID_LIBRARY}) diff --git a/package/taskd/Config.in b/package/taskd/Config.in new file mode 100644 index 00000000..19d123fb --- /dev/null +++ b/package/taskd/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_TASKD + bool "taskd" + depends on !BR2_STATIC_LIBS # gnutls + depends on BR2_USE_WCHAR # gnutls + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Task management synchronization daemon. + + http://taskwarrior.org/ + +comment "taskd needs a toolchain w/ C++, wchar, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \ + BR2_STATIC_LIBS diff --git a/package/taskd/taskd.hash b/package/taskd/taskd.hash new file mode 100644 index 00000000..63bb87c1 --- /dev/null +++ b/package/taskd/taskd.hash @@ -0,0 +1,5 @@ +# From http://taskwarrior.org/download/ +sha1 ded339deeee65277e4712f71a9159502f8b20b52 taskd-1.1.0.tar.gz +# Locally calculated +sha256 7b8488e687971ae56729ff4e2e5209ff8806cf8cd57718bfd7e521be130621b4 taskd-1.1.0.tar.gz +sha256 84d1a8c2e6e306864ff350857a36b6c74756e61e2eae6822cf2fa88212720f68 COPYING diff --git a/package/taskd/taskd.mk b/package/taskd/taskd.mk new file mode 100644 index 00000000..b19be689 --- /dev/null +++ b/package/taskd/taskd.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# taskd +# +################################################################################ + +TASKD_VERSION = 1.1.0 +TASKD_SITE = http://taskwarrior.org/download +TASKD_LICENSE = MIT +TASKD_LICENSE_FILES = COPYING +TASKD_DEPENDENCIES = gnutls util-linux host-pkgconf + +$(eval $(cmake-package)) diff --git a/package/tcf-agent/Config.in b/package/tcf-agent/Config.in new file mode 100644 index 00000000..50e58642 --- /dev/null +++ b/package/tcf-agent/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_TCF_AGENT + bool "tcf-agent" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS + depends on BR2_USE_MMU # util-linux + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Target Communication Framework Agent is an example + application using the Target Communication Framework + Library. + + Target Communication Framework is universal, extensible, + simple, lightweight, vendor agnostic framework for tools and + targets to communicate for purpose of debugging, profiling, + code patching and other device software development needs. + + tcf-agent is a daemon, which provides TCF services that can + be used by local and remote clients. + + https://wiki.eclipse.org/TCF + +config BR2_PACKAGE_TCF_AGENT_ARCH + string + default "arm" if BR2_arm || BR2_armeb + default "a64" if BR2_aarch64 || BR2_aarch64_be + default "i686" if BR2_i386 && BR2_ARCH="i686" + default "i386" if BR2_i386 && !BR2_ARCH="i686" + default "x86_64" if BR2_x86_64 + default "powerpc" if BR2_powerpc || BR2_powerpcle + default "ppc64" if BR2_powerpc64 || BR2_powerpc64le + default "microblaze" if BR2_microblaze || BR2_microblazeel + +config BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS + bool + default y if BR2_PACKAGE_TCF_AGENT_ARCH != "" + +comment "tcf-agent needs a toolchain w/ threads" + depends on BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/tcf-agent/S55tcf-agent b/package/tcf-agent/S55tcf-agent new file mode 100644 index 00000000..4418a543 --- /dev/null +++ b/package/tcf-agent/S55tcf-agent @@ -0,0 +1,40 @@ +#!/bin/sh + +DAEMON_PATH=/usr/sbin/tcf-agent +DAEMON_NAME=tcf-agent +DAEMON_ARGS="-L- -l0" + +PIDFILE=/var/run/$DAEMON_NAME.pid +[ -r /etc/default/$DAEMON_NAME ] && . /etc/default/$DAEMON_NAME + +start() { + printf "Starting $DAEMON_NAME: " + start-stop-daemon -S -o -q -p $PIDFILE -m -b \ + -x $DAEMON_PATH -- $DAEMON_ARGS + + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping $DAEMON_NAME: " + start-stop-daemon -K -o -q -p $PIDFILE \ + -x $DAEMON_PATH + + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/tcf-agent/tcf-agent.hash b/package/tcf-agent/tcf-agent.hash new file mode 100644 index 00000000..3ff4d9a5 --- /dev/null +++ b/package/tcf-agent/tcf-agent.hash @@ -0,0 +1,5 @@ +# Locally computed: +sha256 2f8c7be8a0bf7c86c72fd5680bc19a9e8f98792d40c94a0fee30ceb6428b8f33 org.eclipse.tcf.agent-1.7.0.tar.gz + +# Hash for license files: +sha256 f82d01b74a513bd3504d08136026a5ac2a7e6ff62ebcde391fa74aa222d11ce0 agent/edl-v10.html diff --git a/package/tcf-agent/tcf-agent.mk b/package/tcf-agent/tcf-agent.mk new file mode 100644 index 00000000..2b8a61b6 --- /dev/null +++ b/package/tcf-agent/tcf-agent.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# tcf-agent +# +################################################################################ + +TCF_AGENT_VERSION = 1.7.0 +# the tar.xz link was broken the time this file got authored +TCF_AGENT_SOURCE = org.eclipse.tcf.agent-$(TCF_AGENT_VERSION).tar.gz +TCF_AGENT_SITE = http://git.eclipse.org/c/tcf/org.eclipse.tcf.agent.git/snapshot +# see https://wiki.spdx.org/view/Legal_Team/License_List/Licenses_Under_Consideration +TCF_AGENT_LICENSE = BSD-3-Clause +TCF_AGENT_LICENSE_FILES = agent/edl-v10.html + +TCF_AGENT_DEPENDENCIES = util-linux +TCF_AGENT_SUBDIR = agent + +# there is not much purpose for the shared lib, +# if wont be used (unmodifed) outside the tcf-agent application +TCF_AGENT_CONF_OPTS = \ + -DBUILD_SHARED_LIBS=OFF \ + -DTCF_MACHINE=$(call qstrip,$(BR2_PACKAGE_TCF_AGENT_ARCH)) + +define TCF_AGENT_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/tcf-agent/tcf-agent.service \ + $(TARGET_DIR)/usr/lib/systemd/system/tcf-agent.service +endef + +define TCF_AGENT_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/tcf-agent/S55tcf-agent \ + $(TARGET_DIR)/etc/init.d/S55tcf-agent +endef + +$(eval $(cmake-package)) diff --git a/package/tcf-agent/tcf-agent.service b/package/tcf-agent/tcf-agent.service new file mode 100644 index 00000000..8d2023b1 --- /dev/null +++ b/package/tcf-agent/tcf-agent.service @@ -0,0 +1,9 @@ +[Unit] +Description=Target Communication Framework Agent +After=network.target + +[Service] +ExecStart=/usr/sbin/tcf-agent -L- -l0 + +[Install] +WantedBy=multi-user.target diff --git a/package/tcl/0001-dont-build-compat.patch b/package/tcl/0001-dont-build-compat.patch new file mode 100644 index 00000000..c0d5d85d --- /dev/null +++ b/package/tcl/0001-dont-build-compat.patch @@ -0,0 +1,25 @@ +From: Andrew Ruder +Subject: [PATCH] Disable tcl compatibility layers + +Turn off building compatibility layers for old/broken versions of +standard functions (strstr, strtoul, strtod) with the assumption that +anything buildroot is using as a standard C library will be good enough +to not have broken behavior. + +Signed-off-by: Andrew Ruder +[Fabrice: Update for 8.6.9] +Signed-off-by: Fabrice Fontaine +--- + +diff --git a/unix/tcl.m4 b/unix/tcl.m4 +--- a/unix/tcl.m4 ++++ b/unix/tcl.m4 +@@ -2725,7 +2725,7 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ + if test ["$tcl_ok"] = 1; then + AC_CACHE_CHECK([proper ]$1[ implementation], [tcl_cv_]$1[_unbroken], + AC_TRY_RUN([[int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok, +- [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=unknown)) ++ [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=ok)) + if test ["$tcl_cv_]$1[_unbroken"] = "ok"; then + tcl_ok=1 + else diff --git a/package/tcl/Config.in b/package/tcl/Config.in new file mode 100644 index 00000000..f1fa0541 --- /dev/null +++ b/package/tcl/Config.in @@ -0,0 +1,39 @@ +comment "tcl needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_TCL + bool "tcl" + # fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + # See this mailing list thread: + # http://lists.busybox.net/pipermail/buildroot/2015-March/121198.html + depends on !BR2_STATIC_LIBS + help + TCL (Tool Command Language) is a simple textual language. + + http://www.tcl.tk + +if BR2_PACKAGE_TCL + +config BR2_PACKAGE_TCL_DEL_ENCODINGS + bool "delete encodings (saves 1.6Mb)" + default y + help + Delete encoding files for TCL. If your programs do not use + various tcl character recoding functions, you may safely + choose Y here. + + It saves approx. 1.6 Mb of space. + +config BR2_PACKAGE_TCL_SHLIB_ONLY + bool "install only shared library" + default y + help + Install only TCL shared library and not binary tcl + interpreter (tclsh). + + Saves ~14kb. + +endif diff --git a/package/tcl/tcl.hash b/package/tcl/tcl.hash new file mode 100644 index 00000000..913190b9 --- /dev/null +++ b/package/tcl/tcl.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 ad0cd2de2c87b9ba8086b43957a0de3eb2eb565c7159d5f53ccbba3feb915f4e tcl8.6.9-src.tar.gz +sha256 c0a69a2bfd757361ec7e6143973b103c90409316b49e9c88db26ad6388e79f16 license.terms diff --git a/package/tcl/tcl.mk b/package/tcl/tcl.mk new file mode 100644 index 00000000..7c456e89 --- /dev/null +++ b/package/tcl/tcl.mk @@ -0,0 +1,81 @@ +################################################################################ +# +# tcl +# +################################################################################ + +TCL_VERSION_MAJOR = 8.6 +TCL_VERSION = $(TCL_VERSION_MAJOR).9 +TCL_SOURCE = tcl$(TCL_VERSION)-src.tar.gz +TCL_SITE = http://downloads.sourceforge.net/project/tcl/Tcl/$(TCL_VERSION) +TCL_LICENSE = TCL +TCL_LICENSE_FILES = license.terms +TCL_CPE_ID_VENDOR = tcl +TCL_SUBDIR = unix +TCL_INSTALL_STAGING = YES +TCL_AUTORECONF = YES + +TCL_CONF_OPTS = \ + --disable-symbols \ + --disable-langinfo \ + --disable-framework + +HOST_TCL_CONF_OPTS = \ + --disable-symbols \ + --disable-langinfo \ + --disable-framework + +# I haven't found a good way to force pkgs to not build +# or configure without just removing the entire pkg directory. +define HOST_TCL_REMOVE_PACKAGES + rm -fr $(@D)/pkgs/sqlite3* $(@D)/pkgs/tdbc* +endef +HOST_TCL_PRE_CONFIGURE_HOOKS += HOST_TCL_REMOVE_PACKAGES + +# We remove the bundled sqlite as we prefer to not use bundled stuff at all. +define TCL_REMOVE_PACKAGES + rm -fr $(@D)/pkgs/sqlite3* \ + $(if $(BR2_PACKAGE_MYSQL),,$(@D)/pkgs/tdbcmysql*) \ + $(@D)/pkgs/tdbcodbc* \ + $(if $(BR2_PACKAGE_POSTGRESQL),,$(@D)/pkgs/tdbcpostgres*) \ + $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbcsqlite3*) +endef +TCL_PRE_CONFIGURE_HOOKS += TCL_REMOVE_PACKAGES + +ifeq ($(BR2_PACKAGE_TCL_DEL_ENCODINGS),y) +define TCL_REMOVE_ENCODINGS + rm -rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/* +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_ENCODINGS +endif + +ifeq ($(BR2_PACKAGE_TCL_SHLIB_ONLY),y) +define TCL_REMOVE_TCLSH + rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_TCLSH +else +define TCL_SYMLINK_TCLSH + ln -sf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_SYMLINK_TCLSH +endif + +# Until someone needs it, we don't handle locale installation. tcl has +# a complicated method of translating LANG-style locale names into its internal +# .msg name which makes it difficult to save the correct locales per the +# configured whitelist. +define TCL_REMOVE_EXTRA + rm -fr $(TARGET_DIR)/usr/lib/tclConfig.sh \ + $(TARGET_DIR)/usr/lib/tclooConfig.sh \ + $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/tclAppInit.c \ + $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/msgs +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_EXTRA + +TCL_DEPENDENCIES = $(if $(BR2_PACKAGE_SQLITE),sqlite) \ + $(if $(BR2_PACKAGE_MYSQL),mysql) \ + $(if $(BR2_PACKAGE_POSTGRESQL),postgresql) + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/tclap/Config.in b/package/tclap/Config.in new file mode 100644 index 00000000..560cf331 --- /dev/null +++ b/package/tclap/Config.in @@ -0,0 +1,18 @@ +comment "tclap needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_TCLAP + bool "tclap" + depends on BR2_INSTALL_LIBSTDCPP + help + This is a small, flexible library that provides a simple + interface for defining and accessing command line + arguments. It was initially inspired by the user friendly + CLAP libary. The difference is that this library is + templatized, so the argument class is type independent. Type + independence avoids identical-except-for-type objects, such + as IntArg, FloatArg, and StringArg. While the library is not + strictly compliant with the GNU or POSIX standards, it is + close. + + http://tclap.sourceforge.net/ diff --git a/package/tclap/tclap.hash b/package/tclap/tclap.hash new file mode 100644 index 00000000..2b2097be --- /dev/null +++ b/package/tclap/tclap.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 f5013be7fcaafc69ba0ce2d1710f693f61e9c336b6292ae4f57554f59fde5837 tclap-1.2.2.tar.gz +sha256 cd81a61d47aeb1ed63036ca260baee37719923bbd7ebd988ec4edae128f3b6eb COPYING diff --git a/package/tclap/tclap.mk b/package/tclap/tclap.mk new file mode 100644 index 00000000..e1856420 --- /dev/null +++ b/package/tclap/tclap.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# tclap +# +################################################################################ + +TCLAP_VERSION = 1.2.2 +TCLAP_SITE = http://downloads.sourceforge.net/project/tclap +TCLAP_LICENSE = MIT +TCLAP_LICENSE_FILES = COPYING +TCLAP_INSTALL_STAGING = YES +TCLAP_CPE_ID_VENDOR = tclap_project + +# This package is a pure C++ template library, only made of headers. +TCLAP_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/tcllib/Config.in b/package/tcllib/Config.in new file mode 100644 index 00000000..3a307b9a --- /dev/null +++ b/package/tcllib/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TCLLIB + bool "tcllib" + help + Tcllib is a collection of utility modules for Tcl. These + modules provide a wide variety of functionality, from + implementations of standard data structures to + implementations of common networking protocols. The intent + is to collect commonly used function into a single library, + which users can rely on to be available and stable + + https://www.tcl.tk/software/tcllib/ diff --git a/package/tcllib/tcllib.hash b/package/tcllib/tcllib.hash new file mode 100644 index 00000000..d08b5a17 --- /dev/null +++ b/package/tcllib/tcllib.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 0db9e17d6c0f44d3ca2df2ea5023e35c0f3767e7008c3cb26d201446eb68add1 tcllib-1.13.tar.bz2 +sha256 530ec70eb11a455bd582d86b6d74c2dd7cc367d90b8bbdd59fcb43ae02f95a4b license.terms diff --git a/package/tcllib/tcllib.mk b/package/tcllib/tcllib.mk new file mode 100644 index 00000000..dfa35c89 --- /dev/null +++ b/package/tcllib/tcllib.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# tcllib +# +################################################################################ + +TCLLIB_VERSION = 1.13 +TCLLIB_SOURCE = tcllib-$(TCLLIB_VERSION).tar.bz2 +TCLLIB_SITE = http://downloads.sourceforge.net/project/tcllib/tcllib/$(TCLLIB_VERSION) +TCLLIB_LICENSE = TCL +TCLLIB_LICENSE_FILES = license.terms +TCLLIB_DEPENDENCIES = host-tcl +TCLLIB_CONF_ENV = ac_cv_path_tclsh="$(HOST_DIR)/bin/tclsh$(TCL_VERSION_MAJOR)" + +$(eval $(autotools-package)) diff --git a/package/tcpdump/Config.in b/package/tcpdump/Config.in new file mode 100644 index 00000000..8b54c603 --- /dev/null +++ b/package/tcpdump/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_TCPDUMP + bool "tcpdump" + select BR2_PACKAGE_LIBPCAP + help + A tool for network monitoring and data acquisition. + + http://www.tcpdump.org/ + +if BR2_PACKAGE_TCPDUMP + +config BR2_PACKAGE_TCPDUMP_SMB + bool "smb dump support" + help + enable possibly-buggy SMB printer + +endif diff --git a/package/tcpdump/tcpdump.hash b/package/tcpdump/tcpdump.hash new file mode 100644 index 00000000..1990aa79 --- /dev/null +++ b/package/tcpdump/tcpdump.hash @@ -0,0 +1,5 @@ +# Locally calculated after checking pgp signature at +# https://www.tcpdump.org/release/tcpdump-4.99.1.tar.gz.sig +# using key 1F166A5742ABB9E0249A8D30E089DEF1D9C15D0D +sha256 79b36985fb2703146618d87c4acde3e068b91c553fb93f021a337f175fd10ebe tcpdump-4.99.1.tar.gz +sha256 8a54594d257e14a5260ac770f1633516cb51e3fc28c40136ce2697014eda7afd LICENSE diff --git a/package/tcpdump/tcpdump.mk b/package/tcpdump/tcpdump.mk new file mode 100644 index 00000000..7741c3b5 --- /dev/null +++ b/package/tcpdump/tcpdump.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# tcpdump +# +################################################################################ + +TCPDUMP_VERSION = 4.99.1 +TCPDUMP_SITE = https://www.tcpdump.org/release +TCPDUMP_LICENSE = BSD-3-Clause +TCPDUMP_LICENSE_FILES = LICENSE +TCPDUMP_CPE_ID_VENDOR = tcpdump +TCPDUMP_CONF_ENV = \ + ac_cv_linux_vers=2 \ + td_cv_buggygetaddrinfo=no \ + PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config +TCPDUMP_CONF_OPTS = \ + --without-crypto \ + --disable-local-libpcap \ + $(if $(BR2_PACKAGE_TCPDUMP_SMB),--enable-smb,--disable-smb) +TCPDUMP_DEPENDENCIES = libpcap host-pkgconf +TCPDUMP_SELINUX_MODULES = netutils + +# make install installs an unneeded extra copy of the tcpdump binary +define TCPDUMP_REMOVE_DUPLICATED_BINARY + rm -f $(TARGET_DIR)/usr/bin/tcpdump.$(TCPDUMP_VERSION) +endef + +TCPDUMP_POST_INSTALL_TARGET_HOOKS += TCPDUMP_REMOVE_DUPLICATED_BINARY + +$(eval $(autotools-package)) diff --git a/package/tcping/Config.in b/package/tcping/Config.in new file mode 100644 index 00000000..c963e681 --- /dev/null +++ b/package/tcping/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_TCPING + bool "tcping" + help + tcping does a TCP connect to the given ip/port + combination. The user can specify a timeout in seconds. This + is useful in shell scripts running in firewalled + environments. Often SYNs are just being dropped by + firewalls, thus connection establishment will be retried + several times (for minutes) until a TCP timeout is + reached. With tcping it is possible to check first if the + desired port is reachable and then start connection + establishment. + + https://github.com/mkirchner/tcping diff --git a/package/tcping/tcping.hash b/package/tcping/tcping.hash new file mode 100644 index 00000000..49f6e5ba --- /dev/null +++ b/package/tcping/tcping.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 a731f0e48ff931d7b2a0e896e4db40867043740fe901dd225780f2164fdbdcf3 tcping-1.3.6.tar.gz +sha256 4a35620e27ddb8de27898e4206c8f93633d877c1e128e98e95a035f760d94428 LICENSE diff --git a/package/tcping/tcping.mk b/package/tcping/tcping.mk new file mode 100644 index 00000000..5eaf702e --- /dev/null +++ b/package/tcping/tcping.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tcping +# +################################################################################ + +TCPING_VERSION = 1.3.6 +TCPING_SITE = $(call github,mkirchner,tcping,$(TCPING_VERSION)) +TCPING_LICENSE = MIT +TCPING_LICENSE_FILES = LICENSE + +define TCPING_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + -C $(@D) tcping.linux +endef + +define TCPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tcping $(TARGET_DIR)/usr/bin/tcping +endef + +$(eval $(generic-package)) diff --git a/package/tcpreplay/0001-configure-ac-fix-without-libdnet.patch b/package/tcpreplay/0001-configure-ac-fix-without-libdnet.patch new file mode 100644 index 00000000..75ed4f94 --- /dev/null +++ b/package/tcpreplay/0001-configure-ac-fix-without-libdnet.patch @@ -0,0 +1,76 @@ +From acee9c0c46f71f1f4c33c2dadf69d19e24b90f27 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 13 Aug 2019 20:19:23 +0200 +Subject: [PATCH] configure.ac: fix --without-libdnet + +Allow the user to disable libdnet check through --without-libdnet. +This option is useful to cross-compile tcpreplay to avoid build failures +if libdnet is installed on host but not on target, see +https://bugs.buildroot.org/show_bug.cgi?id=12096 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/appneta/tcpreplay/pull/567] +--- + configure.ac | 48 +++++++++++++++++++++++++----------------------- + 1 file changed, 25 insertions(+), 23 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 39ba58b7..5de3dcb5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1464,30 +1464,32 @@ if test $have_cygwin = no ; then + AC_HELP_STRING([--with-libdnet=DIR], [Use libdnet in DIR]), + [trydnetdir=$withval]) + +- case "$build_os" in +- linux*) +- dnl # Debian/Ubuntu already have a package called libdnet +- dnl # so you the package you want to install libdumbnet-dev +- for testdir in $trydnetdir /usr/local /opt/local /usr ; do +- if test -x ${testdir}/bin/dumbnet-config -a $founddnet = no ; then +- LDNETINC="$($testdir/bin/dumbnet-config --cflags)" +- LDNETLIB="$($testdir/bin/dumbnet-config --libs)" +- libdnet_version="$($testdir/bin/dumbnet-config --version) (libdumbnet)" +- founddnet=$testdir +- fi +- done +- ;; +- esac ++ if test $trydnetdir != no; then ++ case "$build_os" in ++ linux*) ++ dnl # Debian/Ubuntu already have a package called libdnet ++ dnl # so you the package you want to install libdumbnet-dev ++ for testdir in $trydnetdir /usr/local /opt/local /usr ; do ++ if test -x ${testdir}/bin/dumbnet-config -a $founddnet = no ; then ++ LDNETINC="$($testdir/bin/dumbnet-config --cflags)" ++ LDNETLIB="$($testdir/bin/dumbnet-config --libs)" ++ libdnet_version="$($testdir/bin/dumbnet-config --version) (libdumbnet)" ++ founddnet=$testdir ++ fi ++ done ++ ;; ++ esac + +- if test $founddnet = no ; then +- for testdir in $trydnetdir /usr/local /opt/local $MACOSX_SDK_PATH/usr /usr ; do +- if test -x ${testdir}/bin/dnet-config -a $founddnet = no ; then +- LDNETINC="$($testdir/bin/dnet-config --cflags)" +- LDNETLIB="$($testdir/bin/dnet-config --libs)" +- libdnet_version="$($testdir/bin/dnet-config --version)" +- founddnet=$testdir +- fi +- done ++ if test $founddnet = no ; then ++ for testdir in $trydnetdir /usr/local /opt/local $MACOSX_SDK_PATH/usr /usr ; do ++ if test -x ${testdir}/bin/dnet-config -a $founddnet = no ; then ++ LDNETINC="$($testdir/bin/dnet-config --cflags)" ++ LDNETLIB="$($testdir/bin/dnet-config --libs)" ++ libdnet_version="$($testdir/bin/dnet-config --version)" ++ founddnet=$testdir ++ fi ++ done ++ fi + fi + + if test $founddnet = no ; then diff --git a/package/tcpreplay/Config.in b/package/tcpreplay/Config.in new file mode 100644 index 00000000..5e36452c --- /dev/null +++ b/package/tcpreplay/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_TCPREPLAY + bool "tcpreplay" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBPCAP + help + Tcpreplay is a tool for replaying network traffic from files + saved with tcpdump or other tools which write pcap(3) files. + + http://tcpreplay.appneta.com/ diff --git a/package/tcpreplay/tcpreplay.hash b/package/tcpreplay/tcpreplay.hash new file mode 100644 index 00000000..e83efd78 --- /dev/null +++ b/package/tcpreplay/tcpreplay.hash @@ -0,0 +1,5 @@ +# Locally calculated after checking pgp signature +# https://github.com/appneta/tcpreplay/releases/download/v4.3.3/tcpreplay-4.3.3.tar.xz.asc +# using key 84E4FA215C934A7D97DC76D5E9E2149793BDE17E +sha256 5e960e2a4432f583adbd11fa0855d17b73d9e0f2d6453b749f27aacaee53bab5 tcpreplay-4.3.3.tar.xz +sha256 5971b0c544622f4b210a9cc56436a970685d3b0666e373c09e3cf9304db15d05 docs/LICENSE diff --git a/package/tcpreplay/tcpreplay.mk b/package/tcpreplay/tcpreplay.mk new file mode 100644 index 00000000..9208cb81 --- /dev/null +++ b/package/tcpreplay/tcpreplay.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# tcpreplay +# +################################################################################ + +TCPREPLAY_VERSION = 4.3.3 +TCPREPLAY_SITE = https://github.com/appneta/tcpreplay/releases/download/v$(TCPREPLAY_VERSION) +TCPREPLAY_SOURCE = tcpreplay-$(TCPREPLAY_VERSION).tar.xz +TCPREPLAY_LICENSE = GPL-3.0 +TCPREPLAY_LICENSE_FILES = docs/LICENSE +TCPREPLAY_CPE_ID_VENDOR = tcpreplay +TCPREPLAY_CONF_ENV = \ + ac_cv_path_ac_pt_PCAP_CONFIG="$(STAGING_DIR)/usr/bin/pcap-config" +TCPREPLAY_CONF_OPTS = --with-libpcap=$(STAGING_DIR)/usr \ + --enable-pcapconfig +TCPREPLAY_DEPENDENCIES = libpcap +# We're patching configure.ac +TCPREPLAY_AUTORECONF = YES + +ifeq ($(BR2_STATIC_LIBS),y) +TCPREPLAY_CONF_OPTS += --enable-dynamic-link=no +TCPREPLAY_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --libs`" +endif + +ifeq ($(BR2_PACKAGE_LIBDNET),y) +TCPREPLAY_DEPENDENCIES += libdnet +TCPREPLAY_CONF_OPTS += --with-libdnet=$(STAGING_DIR)/usr +else +TCPREPLAY_CONF_OPTS += --without-libdnet +endif + +ifeq ($(BR2_PACKAGE_TCPDUMP),y) +TCPREPLAY_CONF_ENV += ac_cv_path_tcpdump_path=/usr/sbin/tcpdump +else +TCPREPLAY_CONF_ENV += ac_cv_path_tcpdump_path=no +endif + +$(eval $(autotools-package)) diff --git a/package/tegrarcm/Config.in.host b/package/tegrarcm/Config.in.host new file mode 100644 index 00000000..937d81bd --- /dev/null +++ b/package/tegrarcm/Config.in.host @@ -0,0 +1,13 @@ +config BR2_PACKAGE_HOST_TEGRARCM + bool "host tegrarcm" + depends on BR2_arm || BR2_armeb + depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-libusb + help + This program is used to send code to a Tegra device in + recovery mode. + + https://github.com/NVIDIA/tegrarcm + +comment "host tegrarcm needs a toolchain w/ host gcc >= 4.9" + depends on BR2_arm || BR2_armeb + depends on !BR2_HOST_GCC_AT_LEAST_4_9 diff --git a/package/tegrarcm/tegrarcm.hash b/package/tegrarcm/tegrarcm.hash new file mode 100644 index 00000000..38ff2809 --- /dev/null +++ b/package/tegrarcm/tegrarcm.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 08329ee0247499b28ec37b0cc639f35443792dfb9bc4a8a182eea63dae6f64ea tegrarcm-1.8.tar.gz +sha256 5f20d276321cb37346d911712a813cb7ce4c8e3a570bffc919bec820eeef13f6 LICENSE diff --git a/package/tegrarcm/tegrarcm.mk b/package/tegrarcm/tegrarcm.mk new file mode 100644 index 00000000..3ec5ea94 --- /dev/null +++ b/package/tegrarcm/tegrarcm.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# tegrarcm +# +################################################################################ + +TEGRARCM_VERSION = 1.8 +TEGRARCM_SITE = $(call github,NVIDIA,tegrarcm,v$(TEGRARCM_VERSION)) +TEGRARCM_LICENSE = BSD-3-Clause / NVIDIA Software License (src/miniloader) +TEGRARCM_LICENSE_FILES = LICENSE +TEGRARCM_AUTORECONF = YES +HOST_TEGRARCM_DEPENDENCIES = host-libusb host-pkgconf host-cryptopp + +$(eval $(host-autotools-package)) diff --git a/package/tekui/Config.in b/package/tekui/Config.in new file mode 100644 index 00000000..067a6dd7 --- /dev/null +++ b/package/tekui/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_TEKUI + bool "tekui" + depends on !BR2_STATIC_LIBS + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LUAFILESYSTEM # runtime only + select BR2_PACKAGE_LUAEXPAT # runtime only + select BR2_PACKAGE_LUASOCKET # runtime only + select BR2_PACKAGE_LUAPOSIX # runtime only + help + TekUI is a small, freestanding and portable graphical user + interface (GUI) toolkit written in Lua and C. It was + initially developed for the X Window System and has been + ported to DirectFB, Windows, Nano-X and a raw framebuffer + since + + http://tekui.neoscientists.org/ + +comment "tekui needs a Lua interpreter and a toolchain w/ threads, dynamic library" + depends on !BR2_PACKAGE_HAS_LUAINTERPRETER || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/tekui/tekui.hash b/package/tekui/tekui.hash new file mode 100644 index 00000000..f82e7503 --- /dev/null +++ b/package/tekui/tekui.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 28abfaacc0f2ddae962afbbca862a7fb619c33a99a497be9edd746091013dd7f tekui-1.12.tgz +sha256 92cdb348af49efe4c769ccbaeb34a23be084ddda408eace8f1a3a2c5dd4aad14 COPYRIGHT diff --git a/package/tekui/tekui.mk b/package/tekui/tekui.mk new file mode 100644 index 00000000..13000edd --- /dev/null +++ b/package/tekui/tekui.mk @@ -0,0 +1,69 @@ +################################################################################ +# +# tekui +# +################################################################################ + +TEKUI_VERSION = 1.12 +TEKUI_SOURCE = tekui-$(TEKUI_VERSION).tgz +TEKUI_SITE = http://tekui.neoscientists.org/releases +TEKUI_LICENSE = MIT +TEKUI_LICENSE_FILES = COPYRIGHT +TEKUI_DEPENDENCIES = freetype luainterpreter + +# Package does not build in parallel due to improper make rules +TEKUI_MAKE = $(MAKE1) + +TEKUI_MAKE_OPTS = \ + CC="$(TARGET_CC) -fPIC" \ + AR="$(TARGET_AR) rcu" \ + INSTALL_S="install" \ + LUAVER=$(LUAINTERPRETER_ABIVER) \ + LUA_DEFS="" + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +TEKUI_DEPENDENCIES += libpng +TEKUI_MAKE_OPTS += TEKUI_DEFS="-DENABLE_GRADIENT -DENABLE_FILENO -DENABLE_PIXMAP_CACHE -DENABLE_PNG" +TEKUI_MAKE_OPTS += TEKUI_LIBS=-lpng +else +TEKUI_MAKE_OPTS += TEKUI_DEFS="-DENABLE_GRADIENT -DENABLE_FILENO -DENABLE_PIXMAP_CACHE" +endif + +ifeq ($(BR2_PACKAGE_DEJAVU),y) +TEKUI_FONTDIR=/usr/share/fonts/dejavu +else +TEKUI_FONTDIR=/usr/share/lua/$(LUAINTERPRETER_ABIVER)/tek/ui/font +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT)$(BR2_PACKAGE_XLIB_LIBXXF86VM),yy) +TEKUI_DEPENDENCIES += xlib_libXft xlib_libXxf86vm +TEKUI_MAKE_OPTS += \ + X11_LIBS="-lXext -lXxf86vm -lXft -lfreetype -lfontconfig" \ + X11_DEFS="-D_XOPEN_SOURCE -DENABLE_XFT -DENABLE_XVID -I$(STAGING_DIR)/usr/include/freetype2 -I$(STAGING_DIR)/usr/include/fontconfig" \ + DISPLAY_DRIVER=x11 +else +ifeq ($(BR2_PACKAGE_DIRECTFB),y) +TEKUI_DEPENDENCIES += directfb +TEKUI_MAKE_OPTS += \ + DIRECTFB_LIBS="-lfreetype -ldirectfb -lpthread" \ + DIRECTFB_DEFS="-D_REENTRANT -I$(STAGING_DIR)/usr/include/directfb -I$(STAGING_DIR)/usr/include/freetype2" \ + DISPLAY_DRIVER=directfb +else +TEKUI_MAKE_OPTS += \ + FREETYPE_LIBS=-lfreetype \ + FREETYPE_DEFS="-I$(STAGING_DIR)/usr/include/freetype2" \ + RAWFB_SUB_LIBS="" \ + RAWFB_SUB_DEFS="-DDEF_FONTDIR=\\\"$(TEKUI_FONTDIR)\\\"" \ + DISPLAY_DRIVER=rawfb +endif +endif + +define TEKUI_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TEKUI_MAKE_OPTS) PREFIX="/usr" -C $(@D) all +endef + +define TEKUI_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TEKUI_MAKE_OPTS) PREFIX="$(TARGET_DIR)/usr" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/terminology/Config.in b/package/terminology/Config.in new file mode 100644 index 00000000..f367ce51 --- /dev/null +++ b/package/terminology/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_TERMINOLOGY + bool "terminology" + depends on BR2_PACKAGE_EFL + help + Terminology is an EFL terminal emulator with some extra + bells and whistles. + + https://www.enlightenment.org/about-terminology diff --git a/package/terminology/terminology.hash b/package/terminology/terminology.hash new file mode 100644 index 00000000..5dee767d --- /dev/null +++ b/package/terminology/terminology.hash @@ -0,0 +1,3 @@ +# From https://download.enlightenment.org/rel/apps/terminology/terminology-1.8.1.tar.xz.sha256sum +sha256 04a69ac8ade443cba7dae20f82bbaa431fd155cec60c133b263d82f18e93b8bb terminology-1.8.1.tar.xz +sha256 6863ee700fc82b9c3b82a1627136f6935a9eb68e6a64491f20e00b4023c33622 COPYING diff --git a/package/terminology/terminology.mk b/package/terminology/terminology.mk new file mode 100644 index 00000000..6c6ec13c --- /dev/null +++ b/package/terminology/terminology.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# terminology +# +################################################################################ + +TERMINOLOGY_VERSION = 1.8.1 +TERMINOLOGY_SOURCE = terminology-$(TERMINOLOGY_VERSION).tar.xz +TERMINOLOGY_SITE = https://download.enlightenment.org/rel/apps/terminology +TERMINOLOGY_LICENSE = BSD-2-Clause +TERMINOLOGY_LICENSE_FILES = COPYING +TERMINOLOGY_CPE_ID_VENDOR = enlightenment + +TERMINOLOGY_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES) efl host-pkgconf +TERMINOLOGY_CONF_OPTS = -Dedje-cc=$(HOST_DIR)/bin/edje_cc + +ifeq ($(BR2_SYSTEM_ENABLE_NLS),y) +TERMINOLOGY_CONF_OPTS += -Dnls=true +else +TERMINOLOGY_CONF_OPTS += -Dnls=false +endif + +$(eval $(meson-package)) diff --git a/package/tesseract-ocr/0001-Fix-timeval-structure-build-failure.patch b/package/tesseract-ocr/0001-Fix-timeval-structure-build-failure.patch new file mode 100644 index 00000000..0b0bb1a8 --- /dev/null +++ b/package/tesseract-ocr/0001-Fix-timeval-structure-build-failure.patch @@ -0,0 +1,27 @@ +From ea1e1ddfc0af9966a0c613a93087bc3e0a5979a7 Mon Sep 17 00:00:00 2001 +From: Gilles Talis +Date: Fri, 19 Jul 2019 18:52:03 +0200 +Subject: [PATCH] Fix timeval structure build failure + +timeval structure definition requires to be included + +Signed-off-by: Gilles Talis +--- + src/ccutil/ocrclass.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/ccutil/ocrclass.h b/src/ccutil/ocrclass.h +index d39a6dd..2a01118 100644 +--- a/src/ccutil/ocrclass.h ++++ b/src/ccutil/ocrclass.h +@@ -28,6 +28,7 @@ + + #include + #include ++#include + #ifdef _WIN32 + #include // for timeval + #endif +-- +2.7.4 + diff --git a/package/tesseract-ocr/Config.in b/package/tesseract-ocr/Config.in new file mode 100644 index 00000000..3afaca77 --- /dev/null +++ b/package/tesseract-ocr/Config.in @@ -0,0 +1,44 @@ +comment "tesseract-ocr needs a toolchain w/ threads, C++, gcc >= 4.8, dynamic library, wchar" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || BR2_STATIC_LIBS || !BR2_USE_WCHAR + +menuconfig BR2_PACKAGE_TESSERACT_OCR + bool "tesseract-ocr" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + select BR2_PACKAGE_LEPTONICA + help + Tesseract is an OCR (Optical Character Recognition) engine, + It can be used directly, or (for programmers) using an API. + It supports a wide variety of languages. + + https://github.com/tesseract-ocr/tesseract + +if BR2_PACKAGE_TESSERACT_OCR + +comment "tesseract-ocr languages support" + +config BR2_PACKAGE_TESSERACT_OCR_LANG_ENG + bool "English" + +config BR2_PACKAGE_TESSERACT_OCR_LANG_FRA + bool "French" + +config BR2_PACKAGE_TESSERACT_OCR_LANG_GER + bool "German" + +config BR2_PACKAGE_TESSERACT_OCR_LANG_SPA + bool "Spanish" + +config BR2_PACKAGE_TESSERACT_OCR_LANG_CHI_SIM + bool "Simplified Chinese" + +config BR2_PACKAGE_TESSERACT_OCR_LANG_CHI_TRA + bool "Traditional Chinese" + +endif diff --git a/package/tesseract-ocr/tesseract-ocr.hash b/package/tesseract-ocr/tesseract-ocr.hash new file mode 100644 index 00000000..808ea174 --- /dev/null +++ b/package/tesseract-ocr/tesseract-ocr.hash @@ -0,0 +1,9 @@ +# locally computed +sha256 2a66ff0d8595bff8f04032165e6c936389b1e5727c3ce5a27b3e059d218db1cb tesseract-ocr-4.1.1.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE +sha256 daa0c97d651c19fba3b25e81317cd697e9908c8208090c94c3905381c23fc047 eng.traineddata +sha256 eac01c1d72540d6090facb7b2f42dd0a2ee8fc57c5be1b20548ae668e2761913 fra.traineddata +sha256 896b3b4956503ab9daa10285db330881b2d74b70d889b79262cc534b9ec699a4 deu.traineddata +sha256 0b0fcbb4665189e01ab8019e591f014dd7260460de072543edd4b2cb4ede7c96 spa.traineddata +sha256 fc05d89ab31d8b4e226910f16a8bcbf78e43bae3e2580bb5feefd052efdab363 chi_sim.traineddata +sha256 559067dc0f7c94788884742129d66a0117dde7f4ff12b263d92147173497db14 chi_tra.traineddata diff --git a/package/tesseract-ocr/tesseract-ocr.mk b/package/tesseract-ocr/tesseract-ocr.mk new file mode 100644 index 00000000..fc083c27 --- /dev/null +++ b/package/tesseract-ocr/tesseract-ocr.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# tesseract-ocr +# +################################################################################ + +TESSERACT_OCR_VERSION = 4.1.1 +TESSERACT_OCR_DATA_VERSION = 4.0.0 +TESSERACT_OCR_SITE = $(call github,tesseract-ocr,tesseract,$(TESSERACT_OCR_VERSION)) +TESSERACT_OCR_LICENSE = Apache-2.0 +TESSERACT_OCR_LICENSE_FILES = LICENSE + +# Source from github, no configure script provided +TESSERACT_OCR_AUTORECONF = YES + +# cairo, pango and icu are optional dependencies, but only needed for +# building training tools, which are only built explicitly with "make +# training", which is not done by this package. +TESSERACT_OCR_DEPENDENCIES = leptonica host-pkgconf +TESSERACT_OCR_INSTALL_STAGING = YES +TESSERACT_OCR_CONF_ENV = \ + ac_cv_prog_have_asciidoc=false \ + LIBLEPT_HEADERSDIR=$(STAGING_DIR)/usr/include/leptonica +TESSERACT_OCR_CONF_OPTS = \ + --disable-opencl + +# Language data files download +ifeq ($(BR2_PACKAGE_TESSERACT_OCR_LANG_ENG),y) +TESSERACT_OCR_DATA_FILES += eng.traineddata +endif + +ifeq ($(BR2_PACKAGE_TESSERACT_OCR_LANG_FRA),y) +TESSERACT_OCR_DATA_FILES += fra.traineddata +endif + +ifeq ($(BR2_PACKAGE_TESSERACT_OCR_LANG_DEU),y) +TESSERACT_OCR_DATA_FILES += deu.traineddata +endif + +ifeq ($(BR2_PACKAGE_TESSERACT_OCR_LANG_SPA),y) +TESSERACT_OCR_DATA_FILES += spa.traineddata +endif + +ifeq ($(BR2_PACKAGE_TESSERACT_OCR_LANG_CHI_SIM),y) +TESSERACT_OCR_DATA_FILES += chi_sim.traineddata +endif + +ifeq ($(BR2_PACKAGE_TESSERACT_OCR_LANG_CHI_TRA),y) +TESSERACT_OCR_DATA_FILES += chi_tra.traineddata +endif + +TESSERACT_OCR_EXTRA_DOWNLOADS = \ + $(addprefix https://github.com/tesseract-ocr/tessdata/raw/$(TESSERACT_OCR_DATA_VERSION)/,\ + $(TESSERACT_OCR_DATA_FILES)) + +# Language data files installation +define TESSERACT_OCR_INSTALL_LANG_DATA + $(foreach langfile,$(TESSERACT_OCR_DATA_FILES), \ + $(INSTALL) -D -m 0644 $(TESSERACT_OCR_DL_DIR)/$(langfile) \ + $(TARGET_DIR)/usr/share/tessdata/$(langfile) + ) +endef + +TESSERACT_OCR_POST_INSTALL_TARGET_HOOKS += TESSERACT_OCR_INSTALL_LANG_DATA + +$(eval $(autotools-package)) diff --git a/package/tftpd/0001-Use-extern-qualifier-to-fix-gcc-10.x-build.patch b/package/tftpd/0001-Use-extern-qualifier-to-fix-gcc-10.x-build.patch new file mode 100644 index 00000000..c9645553 --- /dev/null +++ b/package/tftpd/0001-Use-extern-qualifier-to-fix-gcc-10.x-build.patch @@ -0,0 +1,29 @@ +From 6f994166d8571961a08479736ae86c5baa2bb47f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 7 Aug 2020 12:07:45 +0200 +Subject: [PATCH] Use "extern" qualifier to fix gcc 10.x build + +Patch from +https://src.fedoraproject.org/rpms/tftp/raw/master/f/tftp-hpa-5.2-gcc10.patch. + +Signed-off-by: Thomas Petazzoni +--- + tftp/tftp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tftp/tftp.c b/tftp/tftp.c +index d15da22..d067f96 100644 +--- a/tftp/tftp.c ++++ b/tftp/tftp.c +@@ -48,7 +48,7 @@ extern int maxtimeout; + #define PKTSIZE SEGSIZE+4 + char ackbuf[PKTSIZE]; + int timeout; +-sigjmp_buf toplevel; ++extern sigjmp_buf toplevel; + sigjmp_buf timeoutbuf; + + static void nak(int, const char *); +-- +2.26.2 + diff --git a/package/tftpd/Config.in b/package/tftpd/Config.in new file mode 100644 index 00000000..d4e81e70 --- /dev/null +++ b/package/tftpd/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_TFTPD + bool "tftpd" + # linker issue with pre-6.x toolchains + depends on !(BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_6) + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + HPA's Trivial File Transfer Protocol (tftp) server. + + https://git.kernel.org/pub/scm/network/tftp/tftp-hpa.git diff --git a/package/tftpd/S80tftpd-hpa b/package/tftpd/S80tftpd-hpa new file mode 100644 index 00000000..4e8361fa --- /dev/null +++ b/package/tftpd/S80tftpd-hpa @@ -0,0 +1,81 @@ +#! /bin/sh + +OPTIONS="-c -l -s /var/lib/tftpboot" + +set -e + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DESC="HPA's tftpd" +NAME=tftpd +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/S80tftpd-hpa + +# +# Function that starts the daemon/service. +# +d_start() { + mkdir -p /var/lib/tftpboot + chmod 1777 /var/lib/tftpboot + $DAEMON $OPTIONS +} + +# +# Function that stops the daemon/service. +# +d_stop() { + killall -q $NAME +} + +# +# Function that sends a SIGHUP to the daemon/service. +# +d_reload() { + d_start + d_stop +} + +case "$1" in + start) + printf "Starting $DESC: " + d_start + echo "done" + ;; + stop) + printf "Stopping $DESC: " + d_stop + echo "done" + ;; + #reload) + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this an "exit 0". + # + # printf "Reloading $DESC configuration..." + # d_reload + # echo "done." + #;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + printf "Restarting $DESC: " + d_stop + sleep 1 + d_start + echo "done" + ;; + *) + # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/package/tftpd/tftpd.hash b/package/tftpd/tftpd.hash new file mode 100644 index 00000000..3cccb0f2 --- /dev/null +++ b/package/tftpd/tftpd.hash @@ -0,0 +1,5 @@ +# Locally calculated +sha256 c86520c30dab0b6bcbae021ab26d2ac63227696596d37a9b02aa3e56ec5c2e77 tftpd-b2b34cecc8cbc18ff6f1fc00bda6ae6e9011e6c7-br1.tar.gz + +# Hash for license file +sha256 67754ebd8f265571d3226ac97e521b1bd6fd8a61363ecd4ab7806a6f90efab92 tftpd/tftpd.c diff --git a/package/tftpd/tftpd.mk b/package/tftpd/tftpd.mk new file mode 100644 index 00000000..ffd52ce0 --- /dev/null +++ b/package/tftpd/tftpd.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# tftpd +# +################################################################################ + +TFTPD_VERSION = b2b34cecc8cbc18ff6f1fc00bda6ae6e9011e6c7 +TFTPD_SITE = git://git.kernel.org/pub/scm/network/tftp/tftp-hpa.git +TFTPD_CONF_OPTS = --without-tcpwrappers +TFTPD_LICENSE = BSD-4-Clause +TFTPD_LICENSE_FILES = tftpd/tftpd.c +TFTPD_CPE_ID_VENDOR = tftpd-hpa_project +TFTPD_CPE_ID_PRODUCT = tftpd-hpa +# From git +TFTPD_AUTORECONF = YES + +define TFTPD_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/tftp/tftp $(TARGET_DIR)/usr/bin/tftp + $(INSTALL) -D $(@D)/tftpd/tftpd $(TARGET_DIR)/usr/sbin/tftpd +endef + +define TFTPD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/tftpd/S80tftpd-hpa $(TARGET_DIR)/etc/init.d/S80tftpd-hpa +endef + +$(eval $(autotools-package)) diff --git a/package/thermald/0001-thd_trip_point-fix-32-bit-build-error-with-musl-v1.2.patch b/package/thermald/0001-thd_trip_point-fix-32-bit-build-error-with-musl-v1.2.patch new file mode 100644 index 00000000..db5bc99a --- /dev/null +++ b/package/thermald/0001-thd_trip_point-fix-32-bit-build-error-with-musl-v1.2.patch @@ -0,0 +1,53 @@ +From 074575bf3640485ab6d43ae1efed3eff9cebae13 Mon Sep 17 00:00:00 2001 +From: Naveen Saini +Date: Thu, 5 Mar 2020 13:45:57 +0800 +Subject: [PATCH] thd_trip_point: fix 32-bit build error with musl v1.2.0 + +Error log: + ../git/src/thd_trip_point.cpp: In member function 'bool cthd_trip_point::thd_trip_point_check(int, unsigned int, int, bool*)': +| ../git/src/thd_trip_point.cpp:250:19: error: format '%ld' expects argument of type 'long int', but argument 6 has type 'time_t' {aka 'long long int'} [-Werror=format=] +| 250 | thd_log_info("Too early to act zone:%d index %d tm %ld\n", + +musl 1.2.0 have new feature: +time_t is now 64-bit on all archs (not just 64-bit archs) + +Commit id: +https://git.musl-libc.org/cgit/musl/commit/?id=38143339646a4ccce8afe298c34467767c899f51 + +Release note link for musl 1.2.0: +https://git.musl-libc.org/cgit/musl/diff/ + +use %jd and typecast with intmax_t which is maximum width integer type + +Signed-off-by: Naveen Saini +[Upstream: https://github.com/intel/thermal_daemon/commit/a7136682b9e6ebdb53c3c8b472bcd5039d62dc78.patch] +Signed-off-by: Peter Seiderer +--- + src/thd_trip_point.cpp | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/src/thd_trip_point.cpp b/src/thd_trip_point.cpp +index 46f692d..6358c27 100644 +--- a/src/thd_trip_point.cpp ++++ b/src/thd_trip_point.cpp +@@ -242,15 +242,9 @@ bool cthd_trip_point::thd_trip_point_check(int id, unsigned int read_temp, + time_t tm; + time(&tm); + if ((tm - cdevs[i].last_op_time) < cdevs[i].sampling_priod) { +-#if defined __x86_64__ && defined __ILP32__ +- thd_log_info("Too early to act zone:%d index %d tm %lld\n", ++ thd_log_info("Too early to act zone:%d index %d tm %jd\n", + zone_id, cdev->thd_cdev_get_index(), +- tm - cdevs[i].last_op_time); +-#else +- thd_log_info("Too early to act zone:%d index %d tm %ld\n", +- zone_id, cdev->thd_cdev_get_index(), +- tm - cdevs[i].last_op_time); +-#endif ++ (intmax_t)tm - cdevs[i].last_op_time); + break; + } + cdevs[i].last_op_time = tm; +-- +2.29.2 + diff --git a/package/thermald/Config.in b/package/thermald/Config.in new file mode 100644 index 00000000..f32a4b27 --- /dev/null +++ b/package/thermald/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_THERMALD + bool "thermald" + depends on BR2_i386 || BR2_x86_64 # needs + depends on BR2_USE_MMU # uses fork() + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus-glib -> glib2, dbus + depends on BR2_USE_WCHAR # dbus-glib -> glib2 + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_GLIB + select BR2_PACKAGE_LIBXML2 + help + Thermal Daemon is a Linux daemon for monitoring and + controlling platform temperatures. Once the system temperature + reaches a certain threshold, the Linux daemon activates + various cooling methods to try to cool the system. + + https://01.org/linux-thermal-daemon + +comment "thermald needs a toolchain w/ C++, wchar, threads" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_INSTALL_LIBSTDCPP diff --git a/package/thermald/thermald.hash b/package/thermald/thermald.hash new file mode 100644 index 00000000..34094ac8 --- /dev/null +++ b/package/thermald/thermald.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 aaf5ffdc12344eef2417b41b433094bb30e4ebf321f0140b090f97bfcf24ea1f thermald-1.9.1.tar.gz +sha256 e98be8bc482e038a14bfbc01caf800bbd0024fff275ef14cd999db6560254a8d COPYING diff --git a/package/thermald/thermald.mk b/package/thermald/thermald.mk new file mode 100644 index 00000000..5619258c --- /dev/null +++ b/package/thermald/thermald.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# thermald +# +################################################################################ + +THERMALD_VERSION = 1.9.1 +THERMALD_SITE = $(call github,intel,thermal_daemon,v$(THERMALD_VERSION)) +# fetched from Github, with no configure script +THERMALD_AUTORECONF = YES +THERMALD_DEPENDENCIES = dbus dbus-glib libxml2 $(TARGET_NLS_DEPENDENCIES) +# tools are GPL-3.0+ but are not added to the target +THERMALD_LICENSE = GPL-2.0+ +THERMALD_LICENSE_FILES = COPYING +THERMALD_CPE_ID_VENDOR = intel +THERMALD_CONF_ENV = LIBS=$(TARGET_NLS_LIBS) + +ifeq ($(BR2_INIT_SYSTEMD),y) +THERMALD_DEPENDENCIES += systemd +THERMALD_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system +endif + +$(eval $(autotools-package)) diff --git a/package/thrift/Config.in b/package/thrift/Config.in new file mode 100644 index 00000000..2fa04705 --- /dev/null +++ b/package/thrift/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_THRIFT + bool "thrift" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + The Apache Thrift software framework, for scalable + cross-language services development, combines a software + stack with a code generation engine to build services that + work efficiently and seamlessly between C++, Java, Python, + PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, + Node.js, Smalltalk, OCaml and Delphi and other languages. + + http://thrift.apache.org/ + +comment "thrift needs a toolchain w/ C++, wchar, threads" + depends on !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/thrift/thrift.hash b/package/thrift/thrift.hash new file mode 100644 index 00000000..20d6baea --- /dev/null +++ b/package/thrift/thrift.hash @@ -0,0 +1,4 @@ +# From https://www.apache.org/dist/thrift/0.14.1/thrift-0.14.1.tar.gz.sha256 +sha256 13da5e1cd9c8a3bb89778c0337cc57eb0c29b08f3090b41cf6ab78594b410ca5 thrift-0.14.1.tar.gz +# License files, locally calculated +sha256 d315e6cdedc07c478de6992027bfb66f220886c6216fd7e9885ced30c3703646 LICENSE diff --git a/package/thrift/thrift.mk b/package/thrift/thrift.mk new file mode 100644 index 00000000..c36efce2 --- /dev/null +++ b/package/thrift/thrift.mk @@ -0,0 +1,71 @@ +################################################################################ +# +# thrift +# +################################################################################ + +THRIFT_VERSION = 0.14.1 +THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(THRIFT_VERSION) +THRIFT_LICENSE = Apache-2.0 +THRIFT_LICENSE_FILES = LICENSE +THRIFT_CPE_ID_VENDOR = apache + +THRIFT_DEPENDENCIES = host-pkgconf host-thrift boost \ + libevent openssl zlib +THRIFT_INSTALL_STAGING = YES +HOST_THRIFT_DEPENDENCIES = host-bison host-boost \ + host-flex host-libevent host-openssl host-pkgconf host-zlib + +THRIFT_COMMON_CONF_OPTS = -DBUILD_TUTORIALS=OFF \ + -DBUILD_TESTING=OFF \ + -DWITH_NODEJS=OFF \ + -DWITH_PYTHON=OFF \ + -DWITH_JAVA=OFF \ + -DWITH_JAVASCRIPT=OFF \ + -DWITH_QT5=OFF + +THRIFT_CONF_OPTS = $(THRIFT_COMMON_CONF_OPTS) -DBUILD_COMPILER=OFF +HOST_THRIFT_CONF_OPTS = $(THRIFT_COMMON_CONF_OPTS) -DBUILD_COMPILER=ON + +# relocation truncated to fit: R_68K_GOT16O +ifeq ($(BR2_m68k_cf),y) +THRIFT_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -mxgot" +endif + +# thrift doesn't use the regular flags BUILD_{STATIC,SHARED}_LIBS +ifeq ($(BR2_STATIC_LIBS),y) +THRIFT_CONF_OPTS += -DWITH_STATIC_LIB=ON -DWITH_BOOST_STATIC=ON -DWITH_SHARED_LIB=OFF +else ifeq ($(BR2_SHARED_LIBS),y) +THRIFT_CONF_OPTS += -DWITH_STATIC_LIB=OFF -DWITH_BOOST_STATIC=OFF -DWITH_SHARED_LIB=ON +else +# BR2_SHARED_STATIC_LIBS +THRIFT_CONF_OPTS += -DWITH_STATIC_LIB=ON -DWITH_BOOST_STATIC=OFF -DWITH_SHARED_LIB=ON +endif + +# Language selection for the compiler +HOST_THRIFT_CONF_OPTS += -DTHRIFT_COMPILER_CSHARP=OFF \ + -DTHRIFT_COMPILER_JAVA=OFF \ + -DTHRIFT_COMPILER_ERL=OFF \ + -DTHRIFT_COMPILER_PY=OFF \ + -DTHRIFT_COMPILER_PERL=OFF \ + -DTHRIFT_COMPILER_PHP=OFF \ + -DTHRIFT_COMPILER_RB=OFF \ + -DTHRIFT_COMPILER_HS=OFF \ + -DTHRIFT_COMPILER_GO=OFF \ + -DTHRIFT_COMPILER_D=OFF \ + -DTHRIFT_COMPILER_LUA=OFF \ + -DBUILD_C_GLIB=OFF + +# C bindings +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +THRIFT_DEPENDENCIES += libglib2 +THRIFT_CONF_OPTS += -DBUILD_C_GLIB=ON +else +THRIFT_CONF_OPTS += -DBUILD_C_GLIB=OFF +endif + +$(eval $(cmake-package)) +$(eval $(host-cmake-package)) + +# to be used by other packages +THRIFT = $(HOST_DIR)/bin/thrift diff --git a/package/thttpd/Config.in b/package/thttpd/Config.in new file mode 100644 index 00000000..66537aa2 --- /dev/null +++ b/package/thttpd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_THTTPD + bool "thttpd" + depends on BR2_USE_MMU # fork() + help + thttpd is a simple, small, portable, fast, and secure HTTP + server + + http://www.acme.com/software/thttpd/ diff --git a/package/thttpd/S90thttpd b/package/thttpd/S90thttpd new file mode 100644 index 00000000..94b079b0 --- /dev/null +++ b/package/thttpd/S90thttpd @@ -0,0 +1,54 @@ +#!/bin/sh + +DAEMON="thttpd" +PIDFILE="/var/run/$DAEMON.pid" + +THTTPD_ARGS="-C /etc/thttpd.conf" + +# shellcheck source=/dev/null +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + +start() { + printf 'Starting %s: ' "$DAEMON" + # shellcheck disable=SC2086 # we need the word splitting + start-stop-daemon -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \ + -- $THTTPD_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + # thttpd does not remove the pid file on exit + rm -f "$PIDFILE" + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start|stop|restart) + "$1";; + reload) + # Restart, since there is no true "reload" feature. + restart;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/thttpd/thttpd.hash b/package/thttpd/thttpd.hash new file mode 100644 index 00000000..4bdd7fe7 --- /dev/null +++ b/package/thttpd/thttpd.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 99c09f47da326b1e7b5295c45549d2b65534dce27c44812cf7eef1441681a397 thttpd-2.29.tar.gz +sha256 be059e6b8219d5bb5480fa6a2864bbb34892f56951d03d08b356bc1fa8c81a01 thttpd.c diff --git a/package/thttpd/thttpd.mk b/package/thttpd/thttpd.mk new file mode 100644 index 00000000..3815705b --- /dev/null +++ b/package/thttpd/thttpd.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# thttpd +# +################################################################################ + +THTTPD_VERSION = 2.29 +THTTPD_SITE = https://acme.com/software/thttpd +THTTPD_LICENSE = BSD-2-Clause +THTTPD_LICENSE_FILES = thttpd.c +THTTPD_CPE_ID_VENDOR = acme + +THTTPD_MAKE = $(MAKE1) + +define THTTPD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/thttpd $(TARGET_DIR)/usr/sbin/thttpd + $(INSTALL) -D -m 0755 $(@D)/extras/htpasswd $(TARGET_DIR)/usr/bin/htpasswd + $(INSTALL) -D -m 0755 $(@D)/extras/makeweb $(TARGET_DIR)/usr/bin/makeweb + $(INSTALL) -D -m 0755 $(@D)/extras/syslogtocern $(TARGET_DIR)/usr/bin/syslogtocern + $(INSTALL) -D -m 0755 $(@D)/scripts/thttpd_wrapper $(TARGET_DIR)/usr/sbin/thttpd_wrapper + $(SED) 's:/usr/local/sbin:/usr/sbin:g' -e \ + 's:/usr/local/www/thttpd_config:/etc/thttpd.conf:g' \ + $(TARGET_DIR)/usr/sbin/thttpd_wrapper + $(INSTALL) -d $(TARGET_DIR)/var/www/data + $(INSTALL) -d $(TARGET_DIR)/var/www/logs + echo "dir=/var/www/data" > $(TARGET_DIR)/etc/thttpd.conf + echo 'cgipat=**.cgi' >> $(TARGET_DIR)/etc/thttpd.conf + echo "logfile=/var/www/logs/thttpd_log" >> $(TARGET_DIR)/etc/thttpd.conf + echo "pidfile=/var/run/thttpd.pid" >> $(TARGET_DIR)/etc/thttpd.conf +endef + +define THTTPD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/thttpd/S90thttpd \ + $(TARGET_DIR)/etc/init.d/S90thttpd +endef + +define THTTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/thttpd/thttpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/thttpd.service +endef + +$(eval $(autotools-package)) diff --git a/package/thttpd/thttpd.service b/package/thttpd/thttpd.service new file mode 100644 index 00000000..e3c93e7b --- /dev/null +++ b/package/thttpd/thttpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Tiny HTTP Daemon + +[Service] +PIDFile=/run/thttpd.pid +ExecStart=/usr/sbin/thttpd -D -C /etc/thttpd.conf +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/ti-cgt-pru/Config.in.host b/package/ti-cgt-pru/Config.in.host new file mode 100644 index 00000000..eab3cd72 --- /dev/null +++ b/package/ti-cgt-pru/Config.in.host @@ -0,0 +1,18 @@ +config BR2_PACKAGE_HOST_TI_CGT_PRU_ARCH_SUPPORTS + bool + default y + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_arm + +config BR2_PACKAGE_HOST_TI_CGT_PRU + bool "host ti-cgt-pru" + depends on BR2_PACKAGE_HOST_TI_CGT_PRU_ARCH_SUPPORTS + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + This package provides the Code Generation Tools for the PRU + unit found on some TI processors e.g. AM3358. + + Note: this is a binary cross toolchain that runs on x86 hosts + targeting PRU cores found alongside some ARM processors. + + http://processors.wiki.ti.com/index.php/Programmable_Realtime_Unit_Software_Development diff --git a/package/ti-cgt-pru/ti-cgt-pru.hash b/package/ti-cgt-pru/ti-cgt-pru.hash new file mode 100644 index 00000000..4dee3218 --- /dev/null +++ b/package/ti-cgt-pru/ti-cgt-pru.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 1f1405167214f2c0ef848591b17a7799fdcd9f55f11bc90db9ace3490d426215 ti_cgt_pru_2.3.3_linux_installer_x86.bin +sha256 913cb4ab564f874b7c9a11726a16c4ccdc7ecc60be2738201281a1e28dc93641 PRU_Code_Generation_Tools_2.3.x_manifest.html +sha256 5e198df9782c63cedc8363f0e298b241a9a8084398a925f6e1003dbcb60801cb pru_rts_2_3_0_82167478-F8C9-49b2-82BD-12F8550770F9.spdx diff --git a/package/ti-cgt-pru/ti-cgt-pru.mk b/package/ti-cgt-pru/ti-cgt-pru.mk new file mode 100644 index 00000000..8bf907cc --- /dev/null +++ b/package/ti-cgt-pru/ti-cgt-pru.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# ti-cgt-pru +# +################################################################################ + +TI_CGT_PRU_VERSION = 2.3.3 +TI_CGT_PRU_SOURCE = ti_cgt_pru_$(TI_CGT_PRU_VERSION)_linux_installer_x86.bin +TI_CGT_PRU_SITE = http://downloads.ti.com/codegen/esd/cgt_public_sw/PRU/$(TI_CGT_PRU_VERSION) +TI_CGT_PRU_LICENSE = TI Technology and Software Publicly Available License (compiler + PRU library), \ + BSL-1.0 (compiler), BSD-2-Clause, BSD-3-Clause, MIT, AFL-3.0, Hewlett-Packard (PRU library) +TI_CGT_PRU_LICENSE_FILES = PRU_Code_Generation_Tools_2.3.x_manifest.html \ + pru_rts_2_3_0_82167478-F8C9-49b2-82BD-12F8550770F9.spdx + +define HOST_TI_CGT_PRU_EXTRACT_CMDS + chmod +x $(HOST_TI_CGT_PRU_DL_DIR)/$(TI_CGT_PRU_SOURCE) + $(HOST_TI_CGT_PRU_DL_DIR)/$(TI_CGT_PRU_SOURCE) --prefix $(@D) --mode unattended + mv $(@D)/ti-cgt-pru_$(TI_CGT_PRU_VERSION)/* $(@D) + rmdir $(@D)/ti-cgt-pru_$(TI_CGT_PRU_VERSION)/ +endef + +# Since this is largely prebuilt toolchain and likes to live in its +# own directory, put it in $(HOST_DIR)/share/ti-cgt-pru/. +# Packages wanting to use this toolchain need to use this path as TI's +# standard PRU_CGT path e.g. make PRU_CGT=$(TI_CGT_PRU_INSTALLDIR)... +TI_CGT_PRU_INSTALLDIR = $(HOST_DIR)/share/ti-cgt-pru + +define HOST_TI_CGT_PRU_INSTALL_CMDS + mkdir -p $(TI_CGT_PRU_INSTALLDIR) + cp -dpfr $(@D)/* $(TI_CGT_PRU_INSTALLDIR) +endef + +$(eval $(host-generic-package)) diff --git a/package/ti-gfx/0001-newclkapi.patch b/package/ti-gfx/0001-newclkapi.patch new file mode 100644 index 00000000..69574c15 --- /dev/null +++ b/package/ti-gfx/0001-newclkapi.patch @@ -0,0 +1,118 @@ +This patch adjusts the omap3630 portion of the powervr driver to use the new +clk kernel api. + +Signed-off-by: Spenser Gilliland +[yann.morin.1998@free.fr: rebased ontop of 5.01.00.01] +Signed-off-by: "Yann E. MORIN" +diff -durN ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c +--- ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2013-12-23 15:44:20.000000000 +0100 ++++ ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2014-02-26 19:17:39.829571846 +0100 +@@ -182,6 +182,49 @@ + @Return PVRSRV_ERROR + + ******************************************************************************/ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) ++int clk_disable_unprepare(struct clk *clk) ++{ ++ return clk_disable(clk); ++} ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) ++int clk_disable_unprepare(struct clk *clk) ++{ ++ res = clk_disable(clk); ++ if (res < 0) ++ return res; ++ ++ res = clk_unprepare(clk); ++ if (ret < 0) ++ return res; ++ ++ return 0; ++} ++#endif ++ ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) ++int clk_prepare_enable(struct clk *clk) ++{ ++ return clk_enable(clk); ++} ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) ++int clk_prepare_enable(struct clk *clk) ++{ ++ res = clk_prepare(clk); ++ if (ret < 0) ++ return res; ++ ++ res = clk_enable(clk); ++ if (res < 0) { ++ clk_unprepare(clk); ++ return res; ++ } ++ ++ return 0; ++} ++#endif ++ + PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData) + { + #if !defined(NO_HARDWARE) +@@ -198,7 +241,7 @@ + + #if !defined(PM_RUNTIME_SUPPORT) + PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: Enabling SGX Clocks")); +- res=clk_enable(psSysSpecData->psSGX_FCK); ++ res=clk_prepare_enable(psSysSpecData->psSGX_FCK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX functional clock (%d)", res)); +@@ -324,7 +367,7 @@ + + PVR_DPF((PVR_DBG_MESSAGE, "DisableSGXClocks: Disabling SGX Clocks")); + #if !defined(PM_RUNTIME_SUPPORT) +- clk_disable(psSysSpecData->psSGX_FCK); ++ clk_disable_unprepare(psSysSpecData->psSGX_FCK); + #endif + SysDisableSGXInterrupts(psSysData); + +@@ -540,14 +583,14 @@ + rate = clk_get_rate(psSysSpecData->psGPT11_FCK); + PVR_TRACE(("GPTIMER11 clock is %dMHz", HZ_TO_MHZ(rate))); + +- res = clk_enable(psSysSpecData->psGPT11_FCK); ++ res = clk_prepare_enable(psSysSpecData->psGPT11_FCK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 functional clock (%d)", res)); + goto ExitError; + } + +- res = clk_enable(psSysSpecData->psGPT11_ICK); ++ res = clk_prepare_enable(psSysSpecData->psGPT11_ICK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 interface clock (%d)", res)); +@@ -610,9 +653,9 @@ + + ExitDisableGPT11ICK: + #if defined(PVR_OMAP4_TIMING_PRCM) +- clk_disable(psSysSpecData->psGPT11_ICK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_ICK); + ExitDisableGPT11FCK: +- clk_disable(psSysSpecData->psGPT11_FCK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_FCK); + ExitError: + #endif /* defined(PVR_OMAP4_TIMING_PRCM) */ + eError = PVRSRV_ERROR_CLOCK_REQUEST_FAILED; +@@ -664,9 +707,9 @@ + psSysSpecData->sTimerRegPhysBase.uiAddr = 0; + #endif + #if defined(PVR_OMAP4_TIMING_PRCM) +- clk_disable(psSysSpecData->psGPT11_ICK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_ICK); + +- clk_disable(psSysSpecData->psGPT11_FCK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_FCK); + #endif /* defined(PVR_OMAP4_TIMING_PRCM) */ + } + #endif /* PVR_OMAP_USE_DM_TIMER_API */ diff --git a/package/ti-gfx/0002-fix-build-omaplfb-linux.patch b/package/ti-gfx/0002-fix-build-omaplfb-linux.patch new file mode 100644 index 00000000..002d01c1 --- /dev/null +++ b/package/ti-gfx/0002-fix-build-omaplfb-linux.patch @@ -0,0 +1,21 @@ +Since commit a73fdc647417699833f22d0f239affe22e062827 in the kernel, +omap_dss_device's 'output' is renamed 'src'. + +Fix build with at least es5.x selected (AM35xx). + +Signed-off-by: Hadrien Boutteville + +--- a/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c ++++ b/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c +@@ -176,8 +176,10 @@ + #define OMAP_DSS_DRIVER(drv, dev) struct omap_dss_driver *drv = (dev) != NULL ? (dev)->driver : NULL + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)) + #define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->manager : NULL +-#else ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)) + #define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->output->manager : NULL ++#else ++#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->src->manager : NULL + #endif + + #define WAIT_FOR_VSYNC(man) ((man)->wait_for_vsync) diff --git a/package/ti-gfx/0003-km_install_modules.patch b/package/ti-gfx/0003-km_install_modules.patch new file mode 100644 index 00000000..2cf6e815 --- /dev/null +++ b/package/ti-gfx/0003-km_install_modules.patch @@ -0,0 +1,19 @@ +Patch to add modules_install target to the modules makefile. This makes +installation a little easier. + +Signed-off-by: Spenser Gilliland +---- +Index: ti-gfx-4_09_00_01/GFX_Linux_KM/Makefile +=================================================================== +--- ti-gfx-4_09_00_01.orig/GFX_Linux_KM/Makefile 2013-03-07 11:00:11.000000000 -0600 ++++ ti-gfx-4_09_00_01/GFX_Linux_KM/Makefile 2013-05-23 01:36:29.356676281 -0500 +@@ -479,6 +479,9 @@ + all: + $(MAKE) -C $(KERNELDIR) M=`pwd` $* + ++install: ++ $(MAKE) -C $(KERNELDIR) M=`pwd` modules_install ++ + clean: + @find . -name "*.o" -exec rm -r {} \; + @find . -name "*.ko" -exec rm -r {} \; diff --git a/package/ti-gfx/Config.in b/package/ti-gfx/Config.in new file mode 100644 index 00000000..76aabcb8 --- /dev/null +++ b/package/ti-gfx/Config.in @@ -0,0 +1,84 @@ +config BR2_PACKAGE_TI_GFX + bool "ti-gfx" + depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_HAS_POWERVR + select BR2_PACKAGE_FBSET if !BR2_PACKAGE_BUSYBOX # Runtime dependency only + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + Graphics libraries for TI boards using SGX acceleration. + + Supports OMAP35xx, DM37xx/AM37xx, DM816x, DM814x, AM335x and + AM43xx. + + For newer CPUs or kernels use the ti-sgx-{km,um} packages. + + http://downloads.ti.com/dsps/dsps_public_sw/gfxsdk/ + +if BR2_PACKAGE_TI_GFX + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "ti-gfx" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "ti-gfx" + +config BR2_PACKAGE_PROVIDES_POWERVR + default "ti-gfx" + +config BR2_PACKAGE_TI_GFX_DEBUG + bool "enable debug support" + help + Turns on debugging in the kernel module, install libraries + built with debugging enabled, installs various tests and + installs esrev script. + +config BR2_PACKAGE_TI_GFX_DEMOS + bool "install demos" + default y + help + Install the OGLES2ChameleonMan and OGLES2MagicLantern demos + +config BR2_PACKAGE_TI_GFX_EGLIMAGE + bool "install eglimage version of libraries" + help + Installs OpenGL libaries which support the eglimage api. + +choice + prompt "Target" + default BR2_PACKAGE_TI_GFX_ES3 + help + Select the SOC for which you would like to install + drivers. Please use the chart at + http://processors.wiki.ti.com/index.php/OMAP35x_Graphics_SDK_Getting_Started_Guide + +config BR2_PACKAGE_TI_GFX_ES3 + bool "es3.x (OMAP35xx, AM35xx Rev 3.1+)" + help + OMAP35xx, AM35xx Rev 3.1+ + +config BR2_PACKAGE_TI_GFX_ES5 + bool "es5.x (AM37xx, DM37xx)" + help + AM37xx, DM37xx + +config BR2_PACKAGE_TI_GFX_ES6 + bool "es6.x (AM387x, DMA814x, AM389x, DM816x)" + help + AM387x, DM814x, AM389x, DM816x + +config BR2_PACKAGE_TI_GFX_ES8 + bool "es8.x (AM335x)" + help + AM335x + +endchoice + +endif + +comment "ti-gfx needs a glibc toolchain and a Linux kernel to be built" + depends on BR2_arm + depends on !(BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC) diff --git a/package/ti-gfx/S80ti-gfx b/package/ti-gfx/S80ti-gfx new file mode 100644 index 00000000..fc5999a8 --- /dev/null +++ b/package/ti-gfx/S80ti-gfx @@ -0,0 +1,53 @@ +#!/bin/sh + +start() { + echo "ti-gfx: starting pvr driver" + + BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')" + YRES="$(fbset | awk '/geom/ {print $3}')" + # Set RGBA ordering to something the drivers like + if [ "$BITSPERPIXEL" = "32" ] ; then + fbset -rgba 8/16,8/8,8/0,8/24 + fi + # Try to enable triple buffering when there's enough VRAM + fbset -vyres $(( YRES*3 )) + + modprobe pvrsrvkm + modprobe omaplfb + modprobe bufferclass_ti + + pvr_maj=$(awk '$2=="pvrsrvkm" { print $1; }' /proc/devices) + rm -f /dev/pvrsrvkm + + mknod /dev/pvrsrvkm c $pvr_maj 0 + chmod 600 /dev/pvrsrvkm + + if ! /usr/bin/pvrsrvctl --start --no-module; then + echo "ti-gfx: unable to start server" + fi +} + +stop() { + echo "ti-gfx: stopping pvr driver" + + rmmod bufferclass_ti + rmmod omaplfb + rmmod pvrsrvkm +} + +case "$1" in +start) + start +;; +stop) + stop +;; +restart) + stop + start +;; +*) + echo "ti-gfx: Please use start, stop, or restart." + exit 1 +;; +esac diff --git a/package/ti-gfx/egl.pc b/package/ti-gfx/egl.pc new file mode 100644 index 00000000..36ea4131 --- /dev/null +++ b/package/ti-gfx/egl.pc @@ -0,0 +1,11 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: TI Graphics SDK implementation of EGL +Version: 1.9.2188537 +Requires: +Libs: -L${libdir} -lEGL -lGLESv2 -lIMGegl +Cflags: -I${includedir} diff --git a/package/ti-gfx/esrev.sh b/package/ti-gfx/esrev.sh new file mode 100644 index 00000000..8109334b --- /dev/null +++ b/package/ti-gfx/esrev.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# Debug script to determine proper ES revision for the current board. The +# pvrsrvkm module must be insmoded before attempting to get the es rev. + +machine_id() { # return the machine ID + awk 'BEGIN { FS=": " } /Hardware/ \ + { gsub(" ", "_", $2); print tolower($2) } ' +Date: Sun, 10 Nov 2019 22:44:44 -0300 +Subject: [PATCH] Makefile: do not install init script + +Use a custom one, made for Buildroot, instead. + +Signed-off-by: Carlos Santos +--- + Makefile | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 649111a..19016f3 100755 +--- a/Makefile ++++ b/Makefile +@@ -3,7 +3,6 @@ TARGET_PRODUCT ?= jacinto6evm + SRCDIR = ./targetfs/${TARGET_PRODUCT} + + prefix = /usr +-etcdir = /etc + bindir = ${prefix}/bin + incdir = ${prefix}/include + libdir = ${prefix}/lib +@@ -11,11 +10,9 @@ libdir = ${prefix}/lib + all: + + install: +- mkdir -p ${DESTDIR}${etcdir} + mkdir -p ${DESTDIR}${bindir} + mkdir -p ${DESTDIR}${incdir} + mkdir -p ${DESTDIR}${libdir} +- cp -ar ${SRCDIR}/etc/* ${DESTDIR}${etcdir} + cp -ar ${SRCDIR}/bin/* ${DESTDIR}${bindir} + cp -ar ${SRCDIR}/include/* ${DESTDIR}${incdir} + cp -ar ${SRCDIR}/lib/* ${DESTDIR}${libdir} +-- +2.18.1 + diff --git a/package/ti-sgx-um/Config.in b/package/ti-sgx-um/Config.in new file mode 100644 index 00000000..b97469a3 --- /dev/null +++ b/package/ti-sgx-um/Config.in @@ -0,0 +1,40 @@ +comment "ti-sgx-um needs the ti-sgx-km driver" + depends on !BR2_PACKAGE_TI_SGX_KM + +comment "ti-sgx-um needs udev and a glibc toolchain w/ threads" + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC \ + || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_TI_SGX_UM + bool "ti-sgx-um" + depends on BR2_PACKAGE_TI_SGX_KM + depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm + depends on BR2_PACKAGE_HAS_UDEV + # pre-built binaries + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_OMAP + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_HAS_POWERVR + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_WAYLAND + help + Graphics libraries for TI CPUs with SGX5xx GPU. + This package supports AM335x, AM437x, AM4430 and AM5430. + For older CPUs or kernels use the ti-gfx package. + + https://git.ti.com/cgit/graphics/omap5-sgx-ddk-um-linux + +if BR2_PACKAGE_TI_SGX_UM + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "ti-sgx-um" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "ti-sgx-um" + +config BR2_PACKAGE_PROVIDES_POWERVR + default "ti-sgx-um" + +endif diff --git a/package/ti-sgx-um/S80ti-sgx b/package/ti-sgx-um/S80ti-sgx new file mode 100644 index 00000000..2630a057 --- /dev/null +++ b/package/ti-sgx-um/S80ti-sgx @@ -0,0 +1,56 @@ +#!/bin/sh + +pvrsrvkm_ko="/lib/modules/$(/bin/uname -r)/extra/pvrsrvkm.ko" + +pvr_loaded() { + /sbin/lsmod | /bin/grep -q '^\' +} + +pvr_load() { + /sbin/insmod "$pvrsrvkm_ko" > /dev/null 2>&1 +} + +start() { + printf 'Loading pvrsrvkm module: ' + pvr_loaded || pvr_load + status=$? + if [ "$status" -eq 0 ]; then + printf 'Starting PowerVR services: ' + /usr/bin/pvrsrvctl --start --no-module > /dev/null 2>&1 + status=$? + fi + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Starting PowerVR services: ' + /usr/bin/pvrsrvctl --stop > /dev/null 2>&1 + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start|stop|restart) + "$1";; + reload) + restart;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/ti-sgx-um/ti-sgx-um.hash b/package/ti-sgx-um/ti-sgx-um.hash new file mode 100644 index 00000000..109b2e9e --- /dev/null +++ b/package/ti-sgx-um/ti-sgx-um.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 e52c743194516fcc92d570bc5a26dfaa26d18c13d92d41640019f544ef25be3a ti-sgx-um-909e237baf47d0bde006ff25552f5403fd7e359d-br1.tar.gz +sha256 368c306246c9130b5c90a6fef2f80085f70b6225b3f552654a288c0f39fc1531 TI-Linux-Graphics-DDK-UM-Manifest.doc diff --git a/package/ti-sgx-um/ti-sgx-um.mk b/package/ti-sgx-um/ti-sgx-um.mk new file mode 100644 index 00000000..83dbc680 --- /dev/null +++ b/package/ti-sgx-um/ti-sgx-um.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# ti-sgx-um +# +################################################################################ + +# This corresponds to SDK 06.01.00.08 +TI_SGX_UM_VERSION = 909e237baf47d0bde006ff25552f5403fd7e359d +TI_SGX_UM_SITE = http://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git +TI_SGX_UM_SITE_METHOD = git +TI_SGX_UM_LICENSE = TI TSPA License +TI_SGX_UM_LICENSE_FILES = TI-Linux-Graphics-DDK-UM-Manifest.doc +TI_SGX_UM_INSTALL_STAGING = YES +TI_SGX_UM_TARGET=ti335x + +# ti-sgx-um is a egl/gles provider only if libdrm is installed +TI_SGX_UM_DEPENDENCIES = libdrm wayland + +define TI_SGX_UM_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(STAGING_DIR) \ + TARGET_PRODUCT=$(TI_SGX_UM_TARGET) install +endef + +define TI_SGX_UM_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DISCIMAGE=$(TARGET_DIR) \ + TARGET_PRODUCT=$(TI_SGX_UM_TARGET) install +endef + +TI_SGX_UM_POST_INSTALL_TARGET_HOOKS += TI_SGX_UM_INSTALL_CONF + +define TI_SGX_UM_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/ti-sgx-um/S80ti-sgx \ + $(TARGET_DIR)/etc/init.d/S80ti-sgx +endef + +$(eval $(generic-package)) diff --git a/package/ti-uim/Config.in b/package/ti-uim/Config.in new file mode 100644 index 00000000..451aad13 --- /dev/null +++ b/package/ti-uim/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_TI_UIM + bool "ti-uim" + help + User Mode Initialization Manager for TI wl12xx connectivity + chip shared transport drivers. This daemon is needed to get + the btwilink driver to work. + + http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution diff --git a/package/ti-uim/ti-uim.hash b/package/ti-uim/ti-uim.hash new file mode 100644 index 00000000..9c29b746 --- /dev/null +++ b/package/ti-uim/ti-uim.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 da8a66968f4bf99366ab2b63baf358d937a6b1a5636ef6179c3aa7c852cbd1b2 ti-uim-a0236bc252e6484835ce266ae4a50b361f6a902d.tar.gz +sha256 4e39276507524f938459b05d061ae77562f3f85926fe73027cfcac259cb03d0e uim.h diff --git a/package/ti-uim/ti-uim.mk b/package/ti-uim/ti-uim.mk new file mode 100644 index 00000000..8b1678f6 --- /dev/null +++ b/package/ti-uim/ti-uim.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# ti-uim +# +################################################################################ + +TI_UIM_VERSION = a0236bc252e6484835ce266ae4a50b361f6a902d +TI_UIM_SITE = $(call github,96boards,uim,$(TI_UIM_VERSION)) +TI_UIM_LICENSE = GPL-2.0+ +TI_UIM_LICENSE_FILES = uim.h + +define TI_UIM_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define TI_UIM_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/uim \ + $(TARGET_DIR)/usr/sbin/uim +endef + +$(eval $(generic-package)) diff --git a/package/ti-utils/0001-plt.h-fix-build-with-gcc-10.patch b/package/ti-utils/0001-plt.h-fix-build-with-gcc-10.patch new file mode 100644 index 00000000..e36b735e --- /dev/null +++ b/package/ti-utils/0001-plt.h-fix-build-with-gcc-10.patch @@ -0,0 +1,35 @@ +From 9ed1946cef876acd5346ae806eecd7fc2e1e5341 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 3 Oct 2020 10:32:48 +0200 +Subject: [PATCH] plt.h: fix build with gcc 10 + +Drop EFUSE_PARAMETER_TYPE_ENM to avoid the following build failure with +gcc 10 (which defaults to -fno-common): + +/home/naourr/work/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: misc_cmds.o:(.bss+0x0): multiple definition of `EFUSE_PARAMETER_TYPE_ENM'; nvs.o:(.bss+0x0): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/e96c70910544085dc5299fa59f80ab9c5922fde2 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/gxk/ti-utils/pull/2] +--- + plt.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plt.h b/plt.h +index 523fded..8ba01c9 100644 +--- a/plt.h ++++ b/plt.h +@@ -363,7 +363,7 @@ enum EFUSE_PARAMETER_TYPE_ENMT { + TX_BIP_PD_BUFFER_VBIAS_ERROR_E, + EFUSE_NUMBER_OF_PARAMETERS_E, + EFUSE_LAST_PARAMETER_E = (EFUSE_NUMBER_OF_PARAMETERS_E - 1) +-} EFUSE_PARAMETER_TYPE_ENM; ++}; + + int get_mac_addr(int ifc_num, unsigned char *mac_addr); + +-- +2.28.0 + diff --git a/package/ti-utils/Config.in b/package/ti-utils/Config.in new file mode 100644 index 00000000..99232348 --- /dev/null +++ b/package/ti-utils/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_TI_UTILS + bool "ti-utils" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + select BR2_PACKAGE_LIBNL + help + The calibrator and other useful utilities for TI wireless + solution, based on wl12xx driver. + + http://linuxwireless.sipsolutions.net/en/users/Drivers/wl12xx/calibrator/ + +comment "ti-utils needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ti-utils/ti-utils.hash b/package/ti-utils/ti-utils.hash new file mode 100644 index 00000000..0548427f --- /dev/null +++ b/package/ti-utils/ti-utils.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 d05d4e3ad3599fca7854109938aebd24bbab72ac7d69dd053260f735a36613f9 ti-utils-06dbdb2727354b5f3ad7c723897f40051fddee49.tar.gz +sha256 363cef40b276a7a91ebcff3f78626d9cfe5e5a51927c725236007259403d5fc4 COPYING diff --git a/package/ti-utils/ti-utils.mk b/package/ti-utils/ti-utils.mk new file mode 100644 index 00000000..73048080 --- /dev/null +++ b/package/ti-utils/ti-utils.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# ti-utils +# +################################################################################ + +TI_UTILS_VERSION = 06dbdb2727354b5f3ad7c723897f40051fddee49 +TI_UTILS_SITE = $(call github,gxk,ti-utils,$(TI_UTILS_VERSION)) +TI_UTILS_DEPENDENCIES = libnl host-pkgconf +TI_UTILS_LICENSE = BSD-3-Clause +TI_UTILS_LICENSE_FILES = COPYING + +TI_UTILS_CFLAGS = `$(PKG_CONFIG_HOST_BINARY) --cflags libnl-genl-3.0` +TI_UTILS_LIBS = `$(PKG_CONFIG_HOST_BINARY) --libs libnl-genl-3.0` + +define TI_UTILS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) NFSROOT="$(STAGING_DIR)" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(TI_UTILS_CFLAGS)" \ + LIBS="$(TI_UTILS_LIBS)" -C $(@D) all +endef + +define TI_UTILS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/calibrator \ + $(TARGET_DIR)/usr/bin/calibrator + $(INSTALL) -m 0755 -D $(@D)/scripts/go.sh \ + $(TARGET_DIR)/usr/share/ti-utils/scripts/go.sh + + cp -r $(@D)/ini_files $(TARGET_DIR)/usr/share/ti-utils +endef + +$(eval $(generic-package)) diff --git a/package/tiff/Config.in b/package/tiff/Config.in new file mode 100644 index 00000000..f842c2ea --- /dev/null +++ b/package/tiff/Config.in @@ -0,0 +1,70 @@ +menuconfig BR2_PACKAGE_TIFF + bool "tiff" + help + Library for handling TIFF (Tag Image File Format) images. + + http://simplesystems.org/libtiff/ + +if BR2_PACKAGE_TIFF + +config BR2_PACKAGE_TIFF_CCITT + bool "CCITT Group 3 & 4 support" + default y + +config BR2_PACKAGE_TIFF_PACKBITS + bool "Macintosh PackBits algorithm" + default y + +config BR2_PACKAGE_TIFF_LZW + bool "LZW algorithm" + default y + +config BR2_PACKAGE_TIFF_THUNDER + bool "ThunderScan 4-bit RLE algorithm" + default y + +config BR2_PACKAGE_TIFF_NEXT + bool "NeXT 2-bit RLE algorithm" + default y + +config BR2_PACKAGE_TIFF_LOGLUV + bool "LogLuv high dynamic range encoding" + default y + +config BR2_PACKAGE_TIFF_MDI + bool "Microsoft Document Imaging" + default y + +config BR2_PACKAGE_TIFF_ZLIB + bool "Zlib usage (required for Deflate compression)" + default y + select BR2_PACKAGE_ZLIB + +config BR2_PACKAGE_TIFF_XZ + bool "XZ compression" + select BR2_PACKAGE_XZ + +config BR2_PACKAGE_TIFF_PIXARLOG + bool "Pixar log-format algorithm (requires Zlib)" + default y + select BR2_PACKAGE_TIFF_ZLIB + +config BR2_PACKAGE_TIFF_JPEG + bool "JPEG compression" + default y + select BR2_PACKAGE_JPEG + +config BR2_PACKAGE_TIFF_OLD_JPEG + bool "Old JPEG decompression" + default y + +config BR2_PACKAGE_TIFF_JBIG + bool "JBIG compression" + default y + +config BR2_PACKAGE_TIFF_UTILITIES + bool "tiff utilities" + help + Install all tiff utilities. + +endif diff --git a/package/tiff/tiff.hash b/package/tiff/tiff.hash new file mode 100644 index 00000000..472ec40e --- /dev/null +++ b/package/tiff/tiff.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 eb0484e568ead8fa23b513e9b0041df7e327f4ee2d22db5a533929dfc19633cb tiff-4.2.0.tar.gz +sha256 fbd6fed7938541d2c809c0826225fc85e551fdbfa8732b10f0c87e0847acafd7 COPYRIGHT diff --git a/package/tiff/tiff.mk b/package/tiff/tiff.mk new file mode 100644 index 00000000..c3d80451 --- /dev/null +++ b/package/tiff/tiff.mk @@ -0,0 +1,94 @@ +################################################################################ +# +# tiff +# +################################################################################ + +TIFF_VERSION = 4.2.0 +TIFF_SITE = http://download.osgeo.org/libtiff +TIFF_LICENSE = tiff license +TIFF_LICENSE_FILES = COPYRIGHT +TIFF_CPE_ID_VENDOR = libtiff +TIFF_CPE_ID_PRODUCT = libtiff +TIFF_INSTALL_STAGING = YES +TIFF_CONF_OPTS = \ + --disable-cxx \ + --without-x + +TIFF_DEPENDENCIES = host-pkgconf + +HOST_TIFF_CONF_OPTS = \ + --disable-cxx \ + --without-x \ + --disable-zlib \ + --disable-lzma \ + --disable-jpeg +HOST_TIFF_DEPENDENCIES = host-pkgconf + +ifneq ($(BR2_PACKAGE_TIFF_CCITT),y) +TIFF_CONF_OPTS += --disable-ccitt +endif + +ifneq ($(BR2_PACKAGE_TIFF_PACKBITS),y) +TIFF_CONF_OPTS += --disable-packbits +endif + +ifneq ($(BR2_PACKAGE_TIFF_LZW),y) +TIFF_CONF_OPTS += --disable-lzw +endif + +ifneq ($(BR2_PACKAGE_TIFF_THUNDER),y) +TIFF_CONF_OPTS += --disable-thunder +endif + +ifneq ($(BR2_PACKAGE_TIFF_NEXT),y) +TIFF_CONF_OPTS += --disable-next +endif + +ifneq ($(BR2_PACKAGE_TIFF_LOGLUV),y) +TIFF_CONF_OPTS += --disable-logluv +endif + +ifneq ($(BR2_PACKAGE_TIFF_MDI),y) +TIFF_CONF_OPTS += --disable-mdi +endif + +ifneq ($(BR2_PACKAGE_TIFF_ZLIB),y) +TIFF_CONF_OPTS += --disable-zlib +else +TIFF_DEPENDENCIES += zlib +endif + +ifneq ($(BR2_PACKAGE_TIFF_XZ),y) +TIFF_CONF_OPTS += --disable-lzma +else +TIFF_DEPENDENCIES += xz +endif + +ifneq ($(BR2_PACKAGE_TIFF_PIXARLOG),y) +TIFF_CONF_OPTS += --disable-pixarlog +endif + +ifneq ($(BR2_PACKAGE_TIFF_JPEG),y) +TIFF_CONF_OPTS += --disable-jpeg +else +TIFF_DEPENDENCIES += jpeg +endif + +ifneq ($(BR2_PACKAGE_TIFF_OLD_JPEG),y) +TIFF_CONF_OPTS += --disable-old-jpeg +endif + +ifneq ($(BR2_PACKAGE_TIFF_JBIG),y) +TIFF_CONF_OPTS += --disable-jbig +endif + +TIFF_SUBDIRS = port libtiff +ifeq ($(BR2_PACKAGE_TIFF_UTILITIES),y) +TIFF_SUBDIRS += tools +endif + +TIFF_MAKE = $(MAKE) SUBDIRS="$(TIFF_SUBDIRS)" + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/time/Config.in b/package/time/Config.in new file mode 100644 index 00000000..40275cf0 --- /dev/null +++ b/package/time/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_TIME + bool "time" + depends on BR2_USE_MMU # fork() + # See https://savannah.gnu.org/bugs/index.php?48000 + depends on !BR2_STATIC_LIBS + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + The GNU time utility. + + http://savannah.gnu.org/projects/time/ + +comment "time needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/time/time.hash b/package/time/time.hash new file mode 100644 index 00000000..cea57dc2 --- /dev/null +++ b/package/time/time.hash @@ -0,0 +1,5 @@ +# From https://lists.gnu.org/archive/html/info-gnu/2018-03/msg00004.html +sha1 75068c26abbed3ad3980685bae21d7202d288317 time-1.9.tar.gz +sha256 fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e time-1.9.tar.gz +# Locally calculated +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/time/time.mk b/package/time/time.mk new file mode 100644 index 00000000..400eca0d --- /dev/null +++ b/package/time/time.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# time +# +################################################################################ + +TIME_VERSION = 1.9 +TIME_SITE = $(BR2_GNU_MIRROR)/time +TIME_CONF_ENV = ac_cv_func_wait3_rusage=yes +TIME_LICENSE = GPL-3.0+ +TIME_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/timescaledb/0001-Allow-building-against-PG13-source.patch b/package/timescaledb/0001-Allow-building-against-PG13-source.patch new file mode 100644 index 00000000..96de9914 --- /dev/null +++ b/package/timescaledb/0001-Allow-building-against-PG13-source.patch @@ -0,0 +1,85 @@ +From 64c17f08c4a78cf6063651632d95906ab3bcb41b Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Sat, 19 Sep 2020 17:43:52 +0200 +Subject: [PATCH] Allow building against PG13 source + +This patch adjusts the version checks to allow building against +postgres 13. It also adjusts the cmake version check to allow +building against RC and devel versions. + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/commit/21dc9b9c1a307e46eda5fa621488ebeb6ee9636c.patch +--- + CMakeLists.txt | 18 ++++++++---------- + src/compat.h | 7 ++++++- + 2 files changed, 14 insertions(+), 11 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8288b444..ce6e9d48 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -221,27 +221,25 @@ execute_process( + OUTPUT_VARIABLE PG_VERSION_STRING + OUTPUT_STRIP_TRAILING_WHITESPACE) + +-if (NOT ${PG_VERSION_STRING} MATCHES "^PostgreSQL[ ]+([0-9]+)\\.([0-9]+)(\\.([0-9]+))*") ++if (NOT ${PG_VERSION_STRING} MATCHES "^PostgreSQL[ ]+([0-9]+)(\\.([0-9]+)|devel|rc[0-9]+)") + message(FATAL_ERROR "Could not parse PostgreSQL version ${PG_VERSION_STRING}") + endif () + + set(PG_VERSION_MAJOR ${CMAKE_MATCH_1}) +-set(PG_VERSION_MINOR ${CMAKE_MATCH_2}) +-set(PG_VERSION_PATCH ${CMAKE_MATCH_4}) +- +-if (NOT ${PG_VERSION_PATCH} OR ${PG_VERSION_PATCH} EQUAL "") +- set(PG_VERSION "${PG_VERSION_MAJOR}.${PG_VERSION_MINOR}") +-else () +- set(PG_VERSION "${PG_VERSION_MAJOR}.${PG_VERSION_MINOR}.${PG_VERSION_PATCH}") ++if (${CMAKE_MATCH_COUNT} GREATER "2" ) ++ set(PG_VERSION_MINOR ${CMAKE_MATCH_3}) ++else() ++ set(PG_VERSION_MINOR 0) + endif () ++set(PG_VERSION "${PG_VERSION_MAJOR}.${PG_VERSION_MINOR}") + + message(STATUS "Compiling against PostgreSQL version ${PG_VERSION}") + + # Ensure that PostgreSQL version is supported and consistent + # with src/compat.h version check + if ((${PG_VERSION_MAJOR} LESS "11") OR +- (${PG_VERSION_MAJOR} GREATER "12")) +- message(FATAL_ERROR "TimescaleDB only supports PostgreSQL 11 and 12") ++ (${PG_VERSION_MAJOR} GREATER "13")) ++ message(FATAL_ERROR "TimescaleDB only supports PostgreSQL 11, 12 and 13") + endif() + + # Get PostgreSQL configuration from pg_config +diff --git a/src/compat.h b/src/compat.h +index 475217c6..267bb09a 100644 +--- a/src/compat.h ++++ b/src/compat.h +@@ -24,15 +24,20 @@ + + #define is_supported_pg_version_11(version) ((version >= 110000) && (version < 120000)) + #define is_supported_pg_version_12(version) ((version >= 120000) && (version < 130000)) ++#define is_supported_pg_version_13(version) ((version >= 130000) && (version < 140000)) + + #define is_supported_pg_version(version) \ +- (is_supported_pg_version_11(version) || is_supported_pg_version_12(version)) ++ (is_supported_pg_version_11(version) || is_supported_pg_version_12(version) || \ ++ is_supported_pg_version_13(version)) + + #define PG11 is_supported_pg_version_11(PG_VERSION_NUM) + #define PG12 is_supported_pg_version_12(PG_VERSION_NUM) ++#define PG13 is_supported_pg_version_13(PG_VERSION_NUM) + + #define PG12_LT PG11 + #define PG12_GE !(PG12_LT) ++#define PG13_LT !(PG13) ++#define PG13_GE PG13 + + #if !(is_supported_pg_version(PG_VERSION_NUM)) + #error "Unsupported PostgreSQL version" +-- +2.29.2 + diff --git a/package/timescaledb/0002-Add-compatibilty-wrapper-functions-for-base64-encodi.patch b/package/timescaledb/0002-Add-compatibilty-wrapper-functions-for-base64-encodi.patch new file mode 100644 index 00000000..d54b49ef --- /dev/null +++ b/package/timescaledb/0002-Add-compatibilty-wrapper-functions-for-base64-encodi.patch @@ -0,0 +1,73 @@ +From b020863a3ea18488448bc09234a4e3b26b68058d Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Sat, 19 Sep 2020 19:17:38 +0200 +Subject: [PATCH] Add compatibilty wrapper functions for base64 + encoding/decoding + +PG13 adds a destination length 4th argument to pg_b64_decode and +pg_b64_encode functions so this patch adds a macro that translates +to the 3 argument and 4 argument calls depending on postgres version. +This patch also adds checking of return values for those functions. + +https://github.com/postgres/postgres/commit/cfc40d384a + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/commit/002510cb01e1d09767a526560f89c1857c1738a2.patch +--- + src/compat.h | 11 +++++++++++ + tsl/src/compression/compression.c | 12 ++++++++++-- + 2 files changed, 21 insertions(+), 2 deletions(-) + +diff --git a/src/compat.h b/src/compat.h +index 267bb09a..d84f8754 100644 +--- a/src/compat.h ++++ b/src/compat.h +@@ -347,4 +347,15 @@ get_vacuum_options(const VacuumStmt *stmt) + #endif + } + ++/* PG13 added a dstlen parameter to pg_b64_decode and pg_b64_encode */ ++#if PG13_LT ++#define pg_b64_encode_compat(src, srclen, dst, dstlen) pg_b64_encode((src), (srclen), (dst)) ++#define pg_b64_decode_compat(src, srclen, dst, dstlen) pg_b64_decode((src), (srclen), (dst)) ++#else ++#define pg_b64_encode_compat(src, srclen, dst, dstlen) \ ++ pg_b64_encode((src), (srclen), (dst), (dstlen)) ++#define pg_b64_decode_compat(src, srclen, dst, dstlen) \ ++ pg_b64_decode((src), (srclen), (dst), (dstlen)) ++#endif ++ + #endif /* TIMESCALEDB_COMPAT_H */ +diff --git a/tsl/src/compression/compression.c b/tsl/src/compression/compression.c +index 470ec4b9..169f74e9 100644 +--- a/tsl/src/compression/compression.c ++++ b/tsl/src/compression/compression.c +@@ -1424,7 +1424,11 @@ tsl_compressed_data_in(PG_FUNCTION_ARGS) + + decoded_len = pg_b64_dec_len(input_len); + decoded = palloc(decoded_len + 1); +- decoded_len = pg_b64_decode(input, input_len, decoded); ++ decoded_len = pg_b64_decode_compat(input, input_len, decoded, decoded_len); ++ ++ if (decoded_len < 0) ++ elog(ERROR, "could not decode base64-encoded compressed data"); ++ + decoded[decoded_len] = '\0'; + data = (StringInfoData){ + .data = decoded, +@@ -1446,7 +1450,11 @@ tsl_compressed_data_out(PG_FUNCTION_ARGS) + const char *raw_data = VARDATA(bytes); + int encoded_len = pg_b64_enc_len(raw_len); + char *encoded = palloc(encoded_len + 1); +- encoded_len = pg_b64_encode(raw_data, raw_len, encoded); ++ encoded_len = pg_b64_encode_compat(raw_data, raw_len, encoded, encoded_len); ++ ++ if (encoded_len < 0) ++ elog(ERROR, "could not base64-encode compressed data"); ++ + encoded[encoded_len] = '\0'; + + PG_RETURN_CSTRING(encoded); +-- +2.29.2 + diff --git a/package/timescaledb/0003-Add-missing-utils-acl.h-includes.patch b/package/timescaledb/0003-Add-missing-utils-acl.h-includes.patch new file mode 100644 index 00000000..382c4e92 --- /dev/null +++ b/package/timescaledb/0003-Add-missing-utils-acl.h-includes.patch @@ -0,0 +1,149 @@ +From e68915d0aad6760c1feebb04219af9bfbccd71d7 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Sat, 26 Sep 2020 13:58:17 +0200 +Subject: [PATCH] Add missing utils/acl.h includes + +PG13 removed acl.h from objectaddress.h so the places that need it +need to now include it explicitly if they got it indirectly this +way previously. + +https://github.com/postgres/postgres/commit/3c173a53a8 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/commit/be8dd086a089f7419824bbc3b77182b95d0bbba7.patch +--- + src/bgw/job.c | 1 + + src/bgw/scheduler.c | 1 + + src/chunk.c | 1 + + src/chunk_adaptive.c | 1 + + src/extension_utils.c | 1 + + src/license_guc.c | 1 + + src/process_utility.c | 1 + + tsl/src/bgw_policy/continuous_aggregate_api.c | 1 + + tsl/src/bgw_policy/job_api.c | 1 + + tsl/src/continuous_aggs/refresh.c | 1 + + 10 files changed, 10 insertions(+) + +diff --git a/src/bgw/job.c b/src/bgw/job.c +index 313caa94..3ae8c9f7 100644 +--- a/src/bgw/job.c ++++ b/src/bgw/job.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/src/bgw/scheduler.c b/src/bgw/scheduler.c +index 2d024317..7a7e360c 100644 +--- a/src/bgw/scheduler.c ++++ b/src/bgw/scheduler.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/chunk.c b/src/chunk.c +index c2671885..e5ffc3fa 100644 +--- a/src/chunk.c ++++ b/src/chunk.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/chunk_adaptive.c b/src/chunk_adaptive.c +index 470248ed..88e2910b 100644 +--- a/src/chunk_adaptive.c ++++ b/src/chunk_adaptive.c +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/extension_utils.c b/src/extension_utils.c +index 3fac177b..3d72c5f0 100644 +--- a/src/extension_utils.c ++++ b/src/extension_utils.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/license_guc.c b/src/license_guc.c +index 32629ca9..baa49be5 100644 +--- a/src/license_guc.c ++++ b/src/license_guc.c +@@ -5,6 +5,7 @@ + */ + #include + #include ++#include + #include + #include + #include +diff --git a/src/process_utility.c b/src/process_utility.c +index 3576cb97..8f915113 100644 +--- a/src/process_utility.c ++++ b/src/process_utility.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/tsl/src/bgw_policy/continuous_aggregate_api.c b/tsl/src/bgw_policy/continuous_aggregate_api.c +index 1c18d2e0..596f3bf7 100644 +--- a/tsl/src/bgw_policy/continuous_aggregate_api.c ++++ b/tsl/src/bgw_policy/continuous_aggregate_api.c +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/tsl/src/bgw_policy/job_api.c b/tsl/src/bgw_policy/job_api.c +index e1c24841..536ce692 100644 +--- a/tsl/src/bgw_policy/job_api.c ++++ b/tsl/src/bgw_policy/job_api.c +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + #include + + #include +diff --git a/tsl/src/continuous_aggs/refresh.c b/tsl/src/continuous_aggs/refresh.c +index 71d5075f..46f83127 100644 +--- a/tsl/src/continuous_aggs/refresh.c ++++ b/tsl/src/continuous_aggs/refresh.c +@@ -4,6 +4,7 @@ + * LICENSE-TIMESCALE for a copy of the license. + */ + #include ++#include + #include + #include + #include +-- +2.29.2 + diff --git a/package/timescaledb/0004-Add-support-for-PG13-List-implementation.patch b/package/timescaledb/0004-Add-support-for-PG13-List-implementation.patch new file mode 100644 index 00000000..2412b07d --- /dev/null +++ b/package/timescaledb/0004-Add-support-for-PG13-List-implementation.patch @@ -0,0 +1,473 @@ +From 259ff80eb29c2c70e6afb77d266ce49cccbef223 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Sat, 19 Sep 2020 22:20:34 +0200 +Subject: [PATCH] Add support for PG13 List implementation + +PG13 changes the List implementation from a linked list to an array +while most of the API functions did not change a few them have slightly +different signature in PG13, additionally the list_make5 functions +got removed. + +https://github.com/postgres/postgres/commit/1cff1b95ab + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/commit/b1a9c3b7b7d44ee78456931292655d52c252930d.patch +--- + .clang-format | 1 + + src/bgw/scheduler.c | 12 ++++++------ + src/cache.c | 10 ++++++++-- + src/chunk_append/chunk_append.c | 2 +- + src/chunk_append/exec.c | 4 ++-- + src/compat.h | 16 ++++++++++++++++ + src/import/planner.c | 2 +- + src/plan_agg_bookend.c | 7 ++++--- + src/plan_expand_hypertable.c | 13 +++++++++---- + test/src/bgw/test_job_refresh.c | 3 ++- + tsl/src/continuous_aggs/create.c | 2 +- + tsl/src/debug.c | 15 ++++++++++----- + tsl/src/fdw/deparse.c | 6 +++--- + .../nodes/decompress_chunk/decompress_chunk.c | 6 +++--- + tsl/src/nodes/decompress_chunk/exec.c | 3 ++- + tsl/src/nodes/gapfill/planner.c | 11 +++++++---- + 16 files changed, 76 insertions(+), 37 deletions(-) + +diff --git a/.clang-format b/.clang-format +index 5bb275cd..9aac7ef4 100644 +--- a/.clang-format ++++ b/.clang-format +@@ -60,6 +60,7 @@ ForEachMacros: + - foreach + - forboth + - for_each_cell ++ - for_each_cell_compat + - for_both_cell + - forthree + IncludeBlocks: Preserve # separate include blocks will not be merged +diff --git a/src/bgw/scheduler.c b/src/bgw/scheduler.c +index 7a7e360c..2630ff9f 100644 +--- a/src/bgw/scheduler.c ++++ b/src/bgw/scheduler.c +@@ -456,7 +456,7 @@ ts_update_scheduled_jobs_list(List *cur_jobs_list, MemoryContext mctx) + */ + terminate_and_cleanup_job(cur_sjob); + +- cur_ptr = lnext(cur_ptr); ++ cur_ptr = lnext_compat(cur_jobs_list, cur_ptr); + continue; + } + if (cur_sjob->job.fd.id == new_sjob->job.fd.id) +@@ -472,15 +472,15 @@ ts_update_scheduled_jobs_list(List *cur_jobs_list, MemoryContext mctx) + if (cur_sjob->state == JOB_STATE_SCHEDULED) + scheduled_bgw_job_transition_state_to(new_sjob, JOB_STATE_SCHEDULED); + +- cur_ptr = lnext(cur_ptr); +- new_ptr = lnext(new_ptr); ++ cur_ptr = lnext_compat(cur_jobs_list, cur_ptr); ++ new_ptr = lnext_compat(new_jobs, new_ptr); + } + else if (cur_sjob->job.fd.id > new_sjob->job.fd.id) + { + scheduled_bgw_job_transition_state_to(new_sjob, JOB_STATE_SCHEDULED); + + /* Advance the new_job list until we catch up to cur_list */ +- new_ptr = lnext(new_ptr); ++ new_ptr = lnext_compat(new_jobs, new_ptr); + } + } + +@@ -489,7 +489,7 @@ ts_update_scheduled_jobs_list(List *cur_jobs_list, MemoryContext mctx) + { + ListCell *ptr; + +- for_each_cell (ptr, cur_ptr) ++ for_each_cell_compat (ptr, cur_jobs_list, cur_ptr) + terminate_and_cleanup_job(lfirst(ptr)); + } + +@@ -498,7 +498,7 @@ ts_update_scheduled_jobs_list(List *cur_jobs_list, MemoryContext mctx) + /* Then there are more new jobs. Initialize all of them. */ + ListCell *ptr; + +- for_each_cell (ptr, new_ptr) ++ for_each_cell_compat (ptr, new_jobs, new_ptr) + scheduled_bgw_job_transition_state_to(lfirst(ptr), JOB_STATE_SCHEDULED); + } + +diff --git a/src/cache.c b/src/cache.c +index cc6b2d07..3b53485a 100644 +--- a/src/cache.c ++++ b/src/cache.c +@@ -7,6 +7,7 @@ + #include + + #include "cache.h" ++#include "compat.h" + + /* List of pinned caches. A cache occurs once in this list for every pin + * taken */ +@@ -105,7 +106,10 @@ ts_cache_pin(Cache *cache) + static void + remove_pin(Cache *cache, SubTransactionId subtxnid) + { +- ListCell *lc, *prev = NULL; ++ ListCell *lc; ++#if PG13_LT ++ ListCell *prev = NULL; ++#endif + + foreach (lc, pinned_caches) + { +@@ -113,12 +117,14 @@ remove_pin(Cache *cache, SubTransactionId subtxnid) + + if (cp->cache == cache && cp->subtxnid == subtxnid) + { +- pinned_caches = list_delete_cell(pinned_caches, lc, prev); ++ pinned_caches = list_delete_cell_compat(pinned_caches, lc, prev); + pfree(cp); + return; + } + ++#if PG13_LT + prev = lc; ++#endif + } + + /* should never reach here: there should always be a pin to remove */ +diff --git a/src/chunk_append/chunk_append.c b/src/chunk_append/chunk_append.c +index fb1c87ff..ed91ff39 100644 +--- a/src/chunk_append/chunk_append.c ++++ b/src/chunk_append/chunk_append.c +@@ -209,7 +209,7 @@ ts_chunk_append_path_create(PlannerInfo *root, RelOptInfo *rel, Hypertable *ht, + if (is_not_pruned) + { + merge_childs = lappend(merge_childs, child); +- flat = lnext(flat); ++ flat = lnext_compat(children, flat); + if (flat == NULL) + break; + } +diff --git a/src/chunk_append/exec.c b/src/chunk_append/exec.c +index 8f4dd5d6..84f79e23 100644 +--- a/src/chunk_append/exec.c ++++ b/src/chunk_append/exec.c +@@ -344,8 +344,8 @@ initialize_runtime_exclusion(ChunkAppendState *state) + state->runtime_number_exclusions++; + } + +- lc_clauses = lnext(lc_clauses); +- lc_constraints = lnext(lc_constraints); ++ lc_clauses = lnext_compat(state->filtered_ri_clauses, lc_clauses); ++ lc_constraints = lnext_compat(state->filtered_constraints, lc_constraints); + } + + state->runtime_initialized = true; +diff --git a/src/compat.h b/src/compat.h +index d84f8754..51c1c181 100644 +--- a/src/compat.h ++++ b/src/compat.h +@@ -358,4 +358,20 @@ get_vacuum_options(const VacuumStmt *stmt) + pg_b64_decode((src), (srclen), (dst), (dstlen)) + #endif + ++/* PG13 changes the List implementation from a linked list to an array ++ * while most of the API functions did not change a few them have slightly ++ * different signature in PG13, additionally the list_make5 functions ++ * got removed. */ ++#if PG13_LT ++#define lnext_compat(l, lc) lnext((lc)) ++#define list_delete_cell_compat(l, lc, prev) list_delete_cell((l), (lc), (prev)) ++#define for_each_cell_compat(cell, list, initcell) for_each_cell ((cell), (initcell)) ++#else ++#define lnext_compat(l, lc) lnext((l), (lc)) ++#define list_delete_cell_compat(l, lc, prev) list_delete_cell((l), (lc)) ++#define list_make5(x1, x2, x3, x4, x5) lappend(list_make4(x1, x2, x3, x4), x5) ++#define list_make5_oid(x1, x2, x3, x4, x5) lappend_oid(list_make4_oid(x1, x2, x3, x4), x5) ++#define for_each_cell_compat(cell, list, initcell) for_each_cell ((cell), (list), (initcell)) ++#endif ++ + #endif /* TIMESCALEDB_COMPAT_H */ +diff --git a/src/import/planner.c b/src/import/planner.c +index 31a4889d..b907390d 100644 +--- a/src/import/planner.c ++++ b/src/import/planner.c +@@ -196,7 +196,7 @@ ts_make_partial_grouping_target(struct PlannerInfo *root, PathTarget *grouping_t + struct List *non_group_cols; + struct List *non_group_exprs; + int i; +- struct ListCell *lc; ++ ListCell *lc; + + partial_target = create_empty_pathtarget(); + non_group_cols = NIL; +diff --git a/src/plan_agg_bookend.c b/src/plan_agg_bookend.c +index d4d06f5b..5394cf5d 100644 +--- a/src/plan_agg_bookend.c ++++ b/src/plan_agg_bookend.c +@@ -696,13 +696,14 @@ build_first_last_path(PlannerInfo *root, FirstLastAggInfo *fl_info, Oid eqop, Oi + if (app->parent_reloid == rte->relid) + { + subroot->append_rel_list = +- list_delete_cell(subroot->append_rel_list, next, prev); +- next = prev != NULL ? prev->next : list_head(subroot->append_rel_list); ++ list_delete_cell_compat(subroot->append_rel_list, next, prev); ++ next = prev != NULL ? lnext_compat(subroot->append_rel_list, next) : ++ list_head(subroot->append_rel_list); + } + else + { + prev = next; +- next = next->next; ++ next = lnext_compat(subroot->append_rel_list, next); + } + } + } +diff --git a/src/plan_expand_hypertable.c b/src/plan_expand_hypertable.c +index 37282ce4..2b99c93b 100644 +--- a/src/plan_expand_hypertable.c ++++ b/src/plan_expand_hypertable.c +@@ -581,7 +581,8 @@ process_quals(Node *quals, CollectQualCtx *ctx, bool is_outer_join) + ListCell *prev pg_attribute_unused() = NULL; + List *additional_quals = NIL; + +- for (lc = list_head((List *) quals); lc != NULL; prev = lc, lc = lnext(lc)) ++ for (lc = list_head((List *) quals); lc != NULL; ++ prev = lc, lc = lnext_compat((List *) quals, lc)) + { + Expr *qual = lfirst(lc); + Relids relids = pull_varnos((Node *) qual); +@@ -611,7 +612,7 @@ process_quals(Node *quals, CollectQualCtx *ctx, bool is_outer_join) + * is called, so we can remove the functions from that directly + */ + #if PG12_LT +- quals = (Node *) list_delete_cell((List *) quals, lc, prev); ++ quals = (Node *) list_delete_cell_compat((List *) quals, lc, prev); + #endif + return quals; + } +@@ -663,7 +664,9 @@ process_quals(Node *quals, CollectQualCtx *ctx, bool is_outer_join) + static List * + remove_exclusion_fns(List *restrictinfo) + { ++#if PG13_LT + ListCell *prev = NULL; ++#endif + ListCell *lc = list_head(restrictinfo); + + while (lc != NULL) +@@ -682,11 +685,13 @@ remove_exclusion_fns(List *restrictinfo) + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("first parameter for chunks_in function needs to be record"))); + +- restrictinfo = list_delete_cell((List *) restrictinfo, lc, prev); ++ restrictinfo = list_delete_cell_compat((List *) restrictinfo, lc, prev); + return restrictinfo; + } ++#if PG13_LT + prev = lc; +- lc = lnext(lc); ++#endif ++ lc = lnext_compat(restrictinfo, lc); + } + return restrictinfo; + } +diff --git a/test/src/bgw/test_job_refresh.c b/test/src/bgw/test_job_refresh.c +index 51a3b0d7..d51415d4 100644 +--- a/test/src/bgw/test_job_refresh.c ++++ b/test/src/bgw/test_job_refresh.c +@@ -13,6 +13,7 @@ + #include + #include + ++#include "compat.h" + #include "export.h" + #include "bgw/scheduler.h" + +@@ -70,7 +71,7 @@ ts_test_job_refresh(PG_FUNCTION_ARGS) + memset(nulls, 0, sizeof(*nulls) * funcctx->tuple_desc->natts); + tuple = heap_form_tuple(funcctx->tuple_desc, values, nulls); + +- funcctx->user_fctx = lnext(lc); ++ funcctx->user_fctx = lnext_compat(cur_scheduled_jobs, lc); + SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum(tuple)); + } + +diff --git a/tsl/src/continuous_aggs/create.c b/tsl/src/continuous_aggs/create.c +index bdf4470a..f767dabb 100644 +--- a/tsl/src/continuous_aggs/create.c ++++ b/tsl/src/continuous_aggs/create.c +@@ -1566,7 +1566,7 @@ fixup_userview_query_tlist(Query *userquery, List *tlist_aliases) + if (tle->resjunk) + continue; + tle->resname = pstrdup(strVal(lfirst(alist_item))); +- alist_item = lnext(alist_item); ++ alist_item = lnext_compat(tlist_aliases, alist_item); + if (alist_item == NULL) + break; /* done assigning aliases */ + } +diff --git a/tsl/src/debug.c b/tsl/src/debug.c +index 697bfc0b..023097ee 100644 +--- a/tsl/src/debug.c ++++ b/tsl/src/debug.c +@@ -168,7 +168,7 @@ append_func_expr(StringInfo buf, const Node *expr, const List *rtable) + foreach (l, e->args) + { + append_expr(buf, lfirst(l), rtable); +- if (lnext(l)) ++ if (lnext_compat(e->args, l)) + appendStringInfoString(buf, ", "); + } + appendStringInfoChar(buf, ')'); +@@ -217,7 +217,7 @@ append_restrict_clauses(StringInfo buf, PlannerInfo *root, List *clauses) + RestrictInfo *c = lfirst(cell); + + append_expr(buf, (Node *) c->clause, root->parse->rtable); +- if (lnext(cell)) ++ if (lnext_compat(clauses, cell)) + appendStringInfoString(buf, ", "); + } + } +@@ -270,7 +270,7 @@ append_pathkeys(StringInfo buf, const List *pathkeys, const List *rtable) + append_expr(buf, (Node *) mem->em_expr, rtable); + } + appendStringInfoChar(buf, ')'); +- if (lnext(i)) ++ if (lnext_compat(pathkeys, i)) + appendStringInfoString(buf, ", "); + } + appendStringInfoChar(buf, ')'); +@@ -601,7 +601,10 @@ tsl_debug_append_pruned_pathlist(StringInfo buf, PlannerInfo *root, RelOptInfo * + foreach (lc1, rel->pathlist) + { + Path *p1 = (Path *) lfirst(lc1); +- ListCell *lc2, *prev = NULL; ++ ListCell *lc2; ++#if PG13_LT ++ ListCell *prev = NULL; ++#endif + + foreach (lc2, fdw_info->considered_paths) + { +@@ -610,11 +613,13 @@ tsl_debug_append_pruned_pathlist(StringInfo buf, PlannerInfo *root, RelOptInfo * + if (path_is_origin(p1, p2)) + { + fdw_info->considered_paths = +- list_delete_cell(fdw_info->considered_paths, lc2, prev); ++ list_delete_cell_compat(fdw_info->considered_paths, lc2, prev); + fdw_utils_free_path(p2); + break; + } ++#if PG13_LT + prev = lc2; ++#endif + } + } + +diff --git a/tsl/src/fdw/deparse.c b/tsl/src/fdw/deparse.c +index d90636b5..efd7debb 100644 +--- a/tsl/src/fdw/deparse.c ++++ b/tsl/src/fdw/deparse.c +@@ -2211,7 +2211,7 @@ deparseSubscriptingRef(SubscriptingRef *node, deparse_expr_cxt *context) + { + deparseExpr(lfirst(lowlist_item), context); + appendStringInfoChar(buf, ':'); +- lowlist_item = lnext(lowlist_item); ++ lowlist_item = lnext_compat(node->reflowerindexpr, lowlist_item); + } + deparseExpr(lfirst(uplist_item), context); + appendStringInfoChar(buf, ']'); +@@ -2273,7 +2273,7 @@ deparseFuncExpr(FuncExpr *node, deparse_expr_cxt *context) + { + if (!first) + appendStringInfoString(buf, ", "); +- if (use_variadic && lnext(arg) == NULL) ++ if (use_variadic && lnext_compat(node->args, arg) == NULL) + appendStringInfoString(buf, "VARIADIC "); + deparseExpr((Expr *) lfirst(arg), context); + first = false; +@@ -2601,7 +2601,7 @@ deparseAggref(Aggref *node, deparse_expr_cxt *context) + first = false; + + /* Add VARIADIC */ +- if (use_variadic && lnext(arg) == NULL) ++ if (use_variadic && lnext_compat(node->args, arg) == NULL) + appendStringInfoString(buf, "VARIADIC "); + + deparseExpr((Expr *) n, context); +diff --git a/tsl/src/nodes/decompress_chunk/decompress_chunk.c b/tsl/src/nodes/decompress_chunk/decompress_chunk.c +index 90b6c7c3..1e36f5dc 100644 +--- a/tsl/src/nodes/decompress_chunk/decompress_chunk.c ++++ b/tsl/src/nodes/decompress_chunk/decompress_chunk.c +@@ -182,7 +182,7 @@ build_compressed_scan_pathkeys(SortInfo *sort_info, PlannerInfo *root, List *chu + + for (lc = list_head(chunk_pathkeys); + lc != NULL && bms_num_members(segmentby_columns) < info->num_segmentby_columns; +- lc = lnext(lc)) ++ lc = lnext_compat(chunk_pathkeys, lc)) + { + PathKey *pk = lfirst(lc); + var = (Var *) ts_find_em_expr_for_rel(pk->pk_eclass, info->chunk_rel); +@@ -1210,7 +1210,7 @@ build_sortinfo(RelOptInfo *chunk_rel, CompressionInfo *info, List *pathkeys) + * we keep looping even if we found all segmentby columns in case a + * columns appears both in baserestrictinfo and in ORDER BY clause + */ +- for (; lc != NULL; lc = lnext(lc)) ++ for (; lc != NULL; lc = lnext_compat(pathkeys, lc)) + { + Assert(bms_num_members(segmentby_columns) <= info->num_segmentby_columns); + pk = lfirst(lc); +@@ -1250,7 +1250,7 @@ build_sortinfo(RelOptInfo *chunk_rel, CompressionInfo *info, List *pathkeys) + * loop over the rest of pathkeys + * this needs to exactly match the configured compress_orderby + */ +- for (pk_index = 1; lc != NULL; lc = lnext(lc), pk_index++) ++ for (pk_index = 1; lc != NULL; lc = lnext_compat(pathkeys, lc), pk_index++) + { + bool reverse = false; + pk = lfirst(lc); +diff --git a/tsl/src/nodes/decompress_chunk/exec.c b/tsl/src/nodes/decompress_chunk/exec.c +index 035f2de4..f58e6f6c 100644 +--- a/tsl/src/nodes/decompress_chunk/exec.c ++++ b/tsl/src/nodes/decompress_chunk/exec.c +@@ -121,7 +121,8 @@ initialize_column_state(DecompressChunkState *state) + + state->columns = palloc0(state->num_columns * sizeof(DecompressChunkColumnState)); + +- for (i = 0, lc = list_head(state->varattno_map); i < state->num_columns; lc = lnext(lc), i++) ++ for (i = 0, lc = list_head(state->varattno_map); i < state->num_columns; ++ lc = lnext_compat(state->varattno_map, lc), i++) + { + DecompressChunkColumnState *column = &state->columns[i]; + column->attno = lfirst_int(lc); +diff --git a/tsl/src/nodes/gapfill/planner.c b/tsl/src/nodes/gapfill/planner.c +index 56bdffd5..765a14ce 100644 +--- a/tsl/src/nodes/gapfill/planner.c ++++ b/tsl/src/nodes/gapfill/planner.c +@@ -295,8 +295,10 @@ gapfill_build_pathtarget(PathTarget *pt_upper, PathTarget *pt_path, PathTarget * + /* + * check arguments past first argument dont have Vars + */ +- for (lc_arg = lnext(list_head(context.call.window->args)); lc_arg != NULL; +- lc_arg = lnext(lc_arg)) ++ for (lc_arg = lnext_compat(context.call.window->args, ++ list_head(context.call.window->args)); ++ lc_arg != NULL; ++ lc_arg = lnext_compat(context.call.window->args, lc_arg)) + { + if (contain_var_clause(lfirst(lc_arg))) + ereport(ERROR, +@@ -553,9 +555,10 @@ gapfill_adjust_window_targetlist(PlannerInfo *root, RelOptInfo *input_rel, RelOp + /* + * check arguments past first argument dont have Vars + */ +- for (lc_arg = lnext(list_head(context.call.window->args)); ++ for (lc_arg = lnext_compat(context.call.window->args, ++ list_head(context.call.window->args)); + lc_arg != NULL; +- lc_arg = lnext(lc_arg)) ++ lc_arg = lnext_compat(context.call.window->args, lc_arg)) + { + if (contain_var_clause(lfirst(lc_arg))) + ereport(ERROR, +-- +2.29.2 + diff --git a/package/timescaledb/0005-Adjust-code-to-PG13-list-sort-changes.patch b/package/timescaledb/0005-Adjust-code-to-PG13-list-sort-changes.patch new file mode 100644 index 00000000..f92cfc40 --- /dev/null +++ b/package/timescaledb/0005-Adjust-code-to-PG13-list-sort-changes.patch @@ -0,0 +1,59 @@ +From 4a149cb833dbb45507cd52e63707311e9642587c Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Sat, 19 Sep 2020 23:20:37 +0200 +Subject: [PATCH] Adjust code to PG13 list sort changes + +PG13 changes the name of the list sorting function from list_qsort +to list_sort. Additionally PG13 does in-place sort. + +https://github.com/postgres/postgres/commit/569ed7f483 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/commit/13d8aac33b6fc5104c8ad1da816dc0d009fc13a7.patch +--- + src/bgw/scheduler.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/src/bgw/scheduler.c b/src/bgw/scheduler.c +index 2630ff9f..b9d1aa38 100644 +--- a/src/bgw/scheduler.c ++++ b/src/bgw/scheduler.c +@@ -530,10 +530,15 @@ ts_populate_scheduled_job_tuple(ScheduledBgwJob *sjob, Datum *values) + #endif + + static int ++#if PG13_LT + cmp_next_start(const void *left, const void *right) + { + const ListCell *left_cell = *((ListCell **) left); + const ListCell *right_cell = *((ListCell **) right); ++#else ++cmp_next_start(const ListCell *left_cell, const ListCell *right_cell) ++{ ++#endif + ScheduledBgwJob *left_sjob = lfirst(left_cell); + ScheduledBgwJob *right_sjob = lfirst(right_cell); + +@@ -549,10 +554,18 @@ cmp_next_start(const void *left, const void *right) + static void + start_scheduled_jobs(register_background_worker_callback_type bgw_register) + { ++ List *ordered_scheduled_jobs; + ListCell *lc; + Assert(CurrentMemoryContext == scratch_mctx); ++ + /* Order jobs by increasing next_start */ +- List *ordered_scheduled_jobs = list_qsort(scheduled_jobs, cmp_next_start); ++#if PG13_LT ++ ordered_scheduled_jobs = list_qsort(scheduled_jobs, cmp_next_start); ++#else ++ /* PG13 does in-place sort */ ++ ordered_scheduled_jobs = scheduled_jobs; ++ list_sort(ordered_scheduled_jobs, cmp_next_start); ++#endif + + foreach (lc, ordered_scheduled_jobs) + { +-- +2.29.2 + diff --git a/package/timescaledb/0006-Adjust-copy-code-to-PG13-addRTEtoQuery-changes.patch b/package/timescaledb/0006-Adjust-copy-code-to-PG13-addRTEtoQuery-changes.patch new file mode 100644 index 00000000..435273e8 --- /dev/null +++ b/package/timescaledb/0006-Adjust-copy-code-to-PG13-addRTEtoQuery-changes.patch @@ -0,0 +1,37 @@ +From 196943ff91a6a21c575fbca1f047544970ec4c98 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Thu, 24 Sep 2020 16:18:43 +0200 +Subject: [PATCH] Adjust copy code to PG13 addRTEtoQuery changes + +PG13 removes addRTEtoQuery and provides a similar function +addNSItemToQuery which has a different signature. + +https://github.com/postgres/postgres/commit/5815696bc6 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/commit/10d1c2d698c1b7cbf5af86082287adda4f0c6e97.patch +--- + src/copy.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/copy.c b/src/copy.c +index 2e63dc76..c8ce93e6 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -535,7 +535,12 @@ copy_constraints_and_check(ParseState *pstate, Relation rel, List *attnums) + { + ListCell *cur; + char *xactReadOnly; +-#if PG12_GE ++#if PG13_GE ++ ParseNamespaceItem *nsitem = ++ addRangeTableEntryForRelation(pstate, rel, RowExclusiveLock, NULL, false, false); ++ RangeTblEntry *rte = nsitem->p_rte; ++ addNSItemToQuery(pstate, nsitem, true, true, true); ++#elif PG12 + RangeTblEntry *rte = + addRangeTableEntryForRelation(pstate, rel, RowExclusiveLock, NULL, false, false); + addRTEtoQuery(pstate, rte, false, true, true); +-- +2.29.2 + diff --git a/package/timescaledb/0007-Adjust-code-to-PG13-convert_tuples_by_name-signature.patch b/package/timescaledb/0007-Adjust-code-to-PG13-convert_tuples_by_name-signature.patch new file mode 100644 index 00000000..b6a0362f --- /dev/null +++ b/package/timescaledb/0007-Adjust-code-to-PG13-convert_tuples_by_name-signature.patch @@ -0,0 +1,65 @@ +From 1c50cdc9a1c06c58f9fa72ab963d595c9a99d3d8 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Thu, 24 Sep 2020 05:33:38 +0200 +Subject: [PATCH] Adjust code to PG13 convert_tuples_by_name signature + change + +PG13 removed the msg parameter from convert_tuples_by_name. + +https://github.com/postgres/postgres/commit/fe66125974 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/commit/968de59f8cd981ba0ca9cca1929d4ba17fbc256f.patch +--- + src/chunk_insert_state.c | 21 +++++++++++++++------ + 1 file changed, 15 insertions(+), 6 deletions(-) + +diff --git a/src/chunk_insert_state.c b/src/chunk_insert_state.c +index 398a8811..5dc294df 100644 +--- a/src/chunk_insert_state.c ++++ b/src/chunk_insert_state.c +@@ -379,8 +379,11 @@ setup_on_conflict_state(ChunkInsertState *state, ChunkDispatch *dispatch, AttrNu + + if (NULL == chunk_attnos) + chunk_attnos = convert_tuples_by_name_map(RelationGetDescr(chunk_rel), +- RelationGetDescr(first_rel), +- gettext_noop("could not convert row type")); ++ RelationGetDescr(first_rel) ++#if PG13_LT ++ , gettext_noop("could not convert row type") ++#endif ++ ); + + onconflset = translate_clause(ts_chunk_dispatch_get_on_conflict_set(dispatch), + chunk_attnos, +@@ -484,8 +487,11 @@ adjust_projections(ChunkInsertState *cis, ChunkDispatch *dispatch, Oid rowtype) + * to work correctly in mapping hypertable attnos->chunk attnos. + */ + chunk_attnos = convert_tuples_by_name_map(RelationGetDescr(chunk_rel), +- RelationGetDescr(hyper_rel), +- gettext_noop("could not convert row type")); ++ RelationGetDescr(hyper_rel) ++#if PG13_LT ++ ,gettext_noop("could not convert row type") ++#endif ++ ); + + chunk_rri->ri_projectReturning = + get_adjusted_projection_info_returning(chunk_rri->ri_projectReturning, +@@ -590,8 +596,11 @@ ts_chunk_insert_state_create(Chunk *chunk, ChunkDispatch *dispatch) + if (chunk->relkind != RELKIND_FOREIGN_TABLE) + state->hyper_to_chunk_map = + convert_tuples_by_name(RelationGetDescr(parent_rel), +- RelationGetDescr(rel), +- gettext_noop("could not convert row type")); ++ RelationGetDescr(rel) ++#if PG13_LT ++ ,gettext_noop("could not convert row type") ++#endif ++ ); + + adjust_projections(state, dispatch, RelationGetForm(rel)->reltype); + +-- +2.29.2 + diff --git a/package/timescaledb/0008-Adjust-code-to-PG13-tuple-conversion-changes.patch b/package/timescaledb/0008-Adjust-code-to-PG13-tuple-conversion-changes.patch new file mode 100644 index 00000000..ce00ac34 --- /dev/null +++ b/package/timescaledb/0008-Adjust-code-to-PG13-tuple-conversion-changes.patch @@ -0,0 +1,259 @@ +From 5c17cb0aa7f06bb3ac15d4ca72a37f59a10fa59e Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Thu, 24 Sep 2020 15:21:04 +0200 +Subject: [PATCH] Adjust code to PG13 tuple conversion changes + +PG13 changes the way attribute mappings are done and uses AttrMap +instead of AttrNumber[] in the new function signatures. This patch +changes ChunkInsertState to use TupleConversionMap which abstracts +this change. + +https://github.com/postgres/postgres/commit/e1551f96e6 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/commit/2cb7c41276c8f8112bd225a020fef709a8e776ff.patch +--- + src/chunk_insert_state.c | 92 +++++++++++++++++++++------------------ + src/compat.h | 15 +++++++ + tsl/src/fdw/modify_exec.c | 4 ++ + 3 files changed, 69 insertions(+), 42 deletions(-) + +diff --git a/src/chunk_insert_state.c b/src/chunk_insert_state.c +index 5dc294df..f8200dd8 100644 +--- a/src/chunk_insert_state.c ++++ b/src/chunk_insert_state.c +@@ -120,7 +120,7 @@ create_chunk_result_relation_info(ChunkDispatch *dispatch, Relation rel) + + static ProjectionInfo * + get_adjusted_projection_info_returning(ProjectionInfo *orig, List *returning_clauses, +- AttrNumber *map, int map_size, Index varno, Oid rowtype, ++ TupleConversionMap *map, Index varno, Oid rowtype, + TupleDesc chunk_desc) + { + bool found_whole_row; +@@ -128,14 +128,15 @@ get_adjusted_projection_info_returning(ProjectionInfo *orig, List *returning_cla + Assert(returning_clauses != NIL); + + /* map hypertable attnos -> chunk attnos */ +- returning_clauses = castNode(List, +- map_variable_attnos((Node *) returning_clauses, +- varno, +- 0, +- map, +- map_size, +- rowtype, +- &found_whole_row)); ++ if (map != NULL) ++ returning_clauses = castNode(List, ++ map_variable_attnos_compat((Node *) returning_clauses, ++ varno, ++ 0, ++ map->attrMap, ++ map->outdesc->natts, ++ rowtype, ++ &found_whole_row)); + + return ExecBuildProjectionInfo(returning_clauses, + orig->pi_exprContext, +@@ -145,7 +146,7 @@ get_adjusted_projection_info_returning(ProjectionInfo *orig, List *returning_cla + } + + static List * +-translate_clause(List *inclause, AttrNumber *chunk_attnos, Index varno, Relation hyper_rel, ++translate_clause(List *inclause, TupleConversionMap *chunk_map, Index varno, Relation hyper_rel, + Relation chunk_rel) + { + List *clause = copyObject(inclause); +@@ -153,23 +154,23 @@ translate_clause(List *inclause, AttrNumber *chunk_attnos, Index varno, Relation + + /* map hypertable attnos -> chunk attnos for the "excluded" table */ + clause = castNode(List, +- map_variable_attnos((Node *) clause, +- INNER_VAR, +- 0, +- chunk_attnos, +- RelationGetDescr(hyper_rel)->natts, +- RelationGetForm(chunk_rel)->reltype, +- &found_whole_row)); ++ map_variable_attnos_compat((Node *) clause, ++ INNER_VAR, ++ 0, ++ chunk_map->attrMap, ++ RelationGetDescr(hyper_rel)->natts, ++ RelationGetForm(chunk_rel)->reltype, ++ &found_whole_row)); + + /* map hypertable attnos -> chunk attnos for the hypertable */ + clause = castNode(List, +- map_variable_attnos((Node *) clause, +- varno, +- 0, +- chunk_attnos, +- RelationGetDescr(hyper_rel)->natts, +- RelationGetForm(chunk_rel)->reltype, +- &found_whole_row)); ++ map_variable_attnos_compat((Node *) clause, ++ varno, ++ 0, ++ chunk_map->attrMap, ++ RelationGetDescr(hyper_rel)->natts, ++ RelationGetForm(chunk_rel)->reltype, ++ &found_whole_row)); + + return clause; + } +@@ -193,7 +194,11 @@ adjust_hypertable_tlist(List *tlist, TupleConversionMap *map) + { + List *new_tlist = NIL; + TupleDesc chunk_tupdesc = map->outdesc; ++#if PG13_GE ++ AttrNumber *attrMap = map->attrMap->attnums; ++#else + AttrNumber *attrMap = map->attrMap; ++#endif + AttrNumber chunk_attrno; + + for (chunk_attrno = 1; chunk_attrno <= chunk_tupdesc->natts; chunk_attrno++) +@@ -351,7 +356,8 @@ get_default_existing_slot(ChunkInsertState *state, ChunkDispatch *dispatch) + * columns, etc. + */ + static void +-setup_on_conflict_state(ChunkInsertState *state, ChunkDispatch *dispatch, AttrNumber *chunk_attnos) ++setup_on_conflict_state(ChunkInsertState *state, ChunkDispatch *dispatch, ++ TupleConversionMap *chunk_map) + { + TupleConversionMap *map = state->hyper_to_chunk_map; + ResultRelInfo *chunk_rri = get_chunk_rri(state); +@@ -377,16 +383,17 @@ setup_on_conflict_state(ChunkInsertState *state, ChunkDispatch *dispatch, AttrNu + + Assert(map->outdesc == RelationGetDescr(chunk_rel)); + +- if (NULL == chunk_attnos) +- chunk_attnos = convert_tuples_by_name_map(RelationGetDescr(chunk_rel), +- RelationGetDescr(first_rel) ++ if (NULL == chunk_map) ++ chunk_map = convert_tuples_by_name(RelationGetDescr(chunk_rel), ++ RelationGetDescr(first_rel) + #if PG13_LT +- , gettext_noop("could not convert row type") ++ , ++ gettext_noop("could not convert row type") + #endif +- ); ++ ); + + onconflset = translate_clause(ts_chunk_dispatch_get_on_conflict_set(dispatch), +- chunk_attnos, ++ chunk_map, + hyper_rri->ri_RangeTableIndex, + hyper_rel, + chunk_rel); +@@ -412,7 +419,7 @@ setup_on_conflict_state(ChunkInsertState *state, ChunkDispatch *dispatch, AttrNu + if (NULL != onconflict_where) + { + List *clause = translate_clause(castNode(List, onconflict_where), +- chunk_attnos, ++ chunk_map, + hyper_rri->ri_RangeTableIndex, + hyper_rel, + chunk_rel); +@@ -476,7 +483,7 @@ adjust_projections(ChunkInsertState *cis, ChunkDispatch *dispatch, Oid rowtype) + ResultRelInfo *chunk_rri = cis->result_relation_info; + Relation hyper_rel = dispatch->hypertable_result_rel_info->ri_RelationDesc; + Relation chunk_rel = cis->rel; +- AttrNumber *chunk_attnos = NULL; ++ TupleConversionMap *chunk_map = NULL; + OnConflictAction onconflict_action = ts_chunk_dispatch_get_on_conflict_action(dispatch); + + if (ts_chunk_dispatch_has_returning(dispatch)) +@@ -486,19 +493,19 @@ adjust_projections(ChunkInsertState *cis, ChunkDispatch *dispatch, Oid rowtype) + * to have the hypertable_desc in the out spot for map_variable_attnos + * to work correctly in mapping hypertable attnos->chunk attnos. + */ +- chunk_attnos = convert_tuples_by_name_map(RelationGetDescr(chunk_rel), +- RelationGetDescr(hyper_rel) ++ chunk_map = convert_tuples_by_name(RelationGetDescr(chunk_rel), ++ RelationGetDescr(hyper_rel) + #if PG13_LT +- ,gettext_noop("could not convert row type") ++ , ++ gettext_noop("could not convert row type") + #endif +- ); ++ ); + + chunk_rri->ri_projectReturning = + get_adjusted_projection_info_returning(chunk_rri->ri_projectReturning, + ts_chunk_dispatch_get_returning_clauses( + dispatch), +- chunk_attnos, +- RelationGetDescr(hyper_rel)->natts, ++ chunk_map, + dispatch->hypertable_result_rel_info + ->ri_RangeTableIndex, + rowtype, +@@ -511,7 +518,7 @@ adjust_projections(ChunkInsertState *cis, ChunkDispatch *dispatch, Oid rowtype) + set_arbiter_indexes(cis, dispatch); + + if (onconflict_action == ONCONFLICT_UPDATE) +- setup_on_conflict_state(cis, dispatch, chunk_attnos); ++ setup_on_conflict_state(cis, dispatch, chunk_map); + } + } + +@@ -598,9 +605,10 @@ ts_chunk_insert_state_create(Chunk *chunk, ChunkDispatch *dispatch) + convert_tuples_by_name(RelationGetDescr(parent_rel), + RelationGetDescr(rel) + #if PG13_LT +- ,gettext_noop("could not convert row type") ++ , ++ gettext_noop("could not convert row type") + #endif +- ); ++ ); + + adjust_projections(state, dispatch, RelationGetForm(rel)->reltype); + +diff --git a/src/compat.h b/src/compat.h +index 51c1c181..1b2ed8e5 100644 +--- a/src/compat.h ++++ b/src/compat.h +@@ -374,4 +374,19 @@ get_vacuum_options(const VacuumStmt *stmt) + #define for_each_cell_compat(cell, list, initcell) for_each_cell ((cell), (list), (initcell)) + #endif + ++/* PG13 removes the natts parameter from map_variable_attnos */ ++#if PG13_LT ++#define map_variable_attnos_compat(node, varno, sublevels_up, map, natts, rowtype, found_wholerow) \ ++ map_variable_attnos((node), \ ++ (varno), \ ++ (sublevels_up), \ ++ (map), \ ++ (natts), \ ++ (rowtype), \ ++ (found_wholerow)) ++#else ++#define map_variable_attnos_compat(node, varno, sublevels_up, map, natts, rowtype, found_wholerow) \ ++ map_variable_attnos((node), (varno), (sublevels_up), (map), (rowtype), (found_wholerow)) ++#endif ++ + #endif /* TIMESCALEDB_COMPAT_H */ +diff --git a/tsl/src/fdw/modify_exec.c b/tsl/src/fdw/modify_exec.c +index 38d0e0c6..5307079d 100644 +--- a/tsl/src/fdw/modify_exec.c ++++ b/tsl/src/fdw/modify_exec.c +@@ -202,7 +202,11 @@ convert_attrs(TupleConversionMap *map, List *attrs) + + for (i = 0; i < map->outdesc->natts; i++) + { ++#if PG13_GE ++ if (map->attrMap->attnums[i] == attnum) ++#else + if (map->attrMap[i] == attnum) ++#endif + { + new_attrs = lappend_int(new_attrs, AttrOffsetGetAttrNumber(i)); + break; +-- +2.29.2 + diff --git a/package/timescaledb/0009-Adjust-hypertable-expansion-to-PG13-changes.patch b/package/timescaledb/0009-Adjust-hypertable-expansion-to-PG13-changes.patch new file mode 100644 index 00000000..9e615134 --- /dev/null +++ b/package/timescaledb/0009-Adjust-hypertable-expansion-to-PG13-changes.patch @@ -0,0 +1,88 @@ +From 8cf647f2995afbd594d67abb1e6556b97096a1c6 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Thu, 24 Sep 2020 04:42:45 +0200 +Subject: [PATCH] Adjust hypertable expansion to PG13 changes + +PG13 merges setup_append_rel_array into setup_simple_rel_arrays +which we use to build the append_rel_array. + +https://github.com/postgres/postgres/commit/1661a40505 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2735/commits/e6e2711d8e00958cb0a35c23f4e81a75f273113a.patch +--- + src/plan_expand_hypertable.c | 30 ++++++++++++++++++++++++++++-- + 1 file changed, 28 insertions(+), 2 deletions(-) + +diff --git a/src/plan_expand_hypertable.c b/src/plan_expand_hypertable.c +index 2b99c93b..4baa1b4c 100644 +--- a/src/plan_expand_hypertable.c ++++ b/src/plan_expand_hypertable.c +@@ -95,6 +95,24 @@ is_time_bucket_function(Expr *node) + return false; + } + ++#if PG13_GE ++/* PG13 merged setup_append_rel_array with setup_simple_rel_arrays */ ++static void ++setup_append_rel_array(PlannerInfo *root) ++{ ++ root->append_rel_array = ++ repalloc(root->append_rel_array, root->simple_rel_array_size * sizeof(AppendRelInfo *)); ++ ListCell *lc; ++ foreach (lc, root->append_rel_list) ++ { ++ AppendRelInfo *appinfo = lfirst_node(AppendRelInfo, lc); ++ int child_relid = appinfo->child_relid; ++ ++ root->append_rel_array[child_relid] = appinfo; ++ } ++} ++#endif ++ + /* + * Pre-check to determine if an expression is eligible for constification. + * A more thorough check is in constify_timestamptz_op_interval. +@@ -1146,7 +1164,6 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo * + .join_conditions = NIL, + .propagate_conditions = NIL, + }; +- Size old_rel_array_len; + Index first_chunk_index = 0; + #if PG12_GE + Index i; +@@ -1178,6 +1195,11 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo * + propagate_join_quals(root, rel, &ctx); + + inh_oids = get_chunk_oids(&ctx, root, rel, ht); ++ ++ /* nothing to do here if we have no chunks and no data nodes */ ++ if (list_length(inh_oids) + list_length(ht->data_nodes) == 0) ++ return; ++ + oldrelation = table_open(parent_oid, NoLock); + + /* +@@ -1185,7 +1207,10 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo * + * children to them. We include potential data node rels we might need to + * create in case of a distributed hypertable. + */ +- old_rel_array_len = root->simple_rel_array_size; ++#if PG12_GE ++ expand_planner_arrays(root, list_length(inh_oids) + list_length(ht->data_nodes)); ++#else ++ Size old_rel_array_len = root->simple_rel_array_size; + root->simple_rel_array_size += (list_length(inh_oids) + list_length(ht->data_nodes)); + root->simple_rel_array = + repalloc(root->simple_rel_array, root->simple_rel_array_size * sizeof(RelOptInfo *)); +@@ -1200,6 +1225,7 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo * + memset(root->simple_rte_array + old_rel_array_len, + 0, + list_length(inh_oids) * sizeof(*root->simple_rte_array)); ++#endif + + /* Adding partition info will make PostgreSQL consider the inheritance + * children as part of a partitioned relation. This will enable +-- +2.29.2 + diff --git a/package/timescaledb/0010-Adjust-decompress-code-to-Var-field-renames.patch b/package/timescaledb/0010-Adjust-decompress-code-to-Var-field-renames.patch new file mode 100644 index 00000000..34ecdb43 --- /dev/null +++ b/package/timescaledb/0010-Adjust-decompress-code-to-Var-field-renames.patch @@ -0,0 +1,41 @@ +From d0f82f514eb1f59d63fcbfe71ec99d5d8f82649d Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Fri, 25 Sep 2020 14:23:01 +0200 +Subject: [PATCH] Adjust decompress code to Var field renames + +PG13 renames the varnoold and varoattno field of Var to varnosyn and +varattnosyn. + +https://github.com/postgres/postgres/commit/9ce77d75c5 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2786/commits/d46b5de84b975d6f394a7f1fa94a34c5062f50ca.patch +--- + tsl/src/nodes/decompress_chunk/decompress_chunk.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/tsl/src/nodes/decompress_chunk/decompress_chunk.c b/tsl/src/nodes/decompress_chunk/decompress_chunk.c +index 1e36f5dc..4a6fa782 100644 +--- a/tsl/src/nodes/decompress_chunk/decompress_chunk.c ++++ b/tsl/src/nodes/decompress_chunk/decompress_chunk.c +@@ -739,11 +739,15 @@ create_var_for_compressed_equivalence_member(Var *var, const EMCreationContext * + if (var->varlevelsup == 0) + { + var->varno = context->compressed_relid_idx; +- var->varnoold = context->compressed_relid_idx; + var->varattno = + get_attnum(context->compressed_relid, NameStr(context->current_col_info->attname)); +- ++#if PG13_GE ++ var->varnosyn = var->varno; ++ var->varattnosyn = var->varattno; ++#else ++ var->varnoold = var->varno; + var->varoattno = var->varattno; ++#endif + + return (Node *) var; + } +-- +2.29.2 + diff --git a/package/timescaledb/0011-Adjust-jsonb_utils-to-PG13-changes.patch b/package/timescaledb/0011-Adjust-jsonb_utils-to-PG13-changes.patch new file mode 100644 index 00000000..f117e150 --- /dev/null +++ b/package/timescaledb/0011-Adjust-jsonb_utils-to-PG13-changes.patch @@ -0,0 +1,39 @@ +From aef77c6cf3bac36f93ba44244ecd8a23de701896 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Sat, 26 Sep 2020 02:14:28 +0200 +Subject: [PATCH] Adjust jsonb_utils to PG13 changes + +PG13 moved jsonapi.h from utils to common. + +https://github.com/postgres/postgres/commit/beb4699091 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2787/commits/aa1e0c8ac78ca109994269c659d52983fe49db7f.patch +--- + src/jsonb_utils.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/jsonb_utils.c b/src/jsonb_utils.c +index 46173871..dd901a38 100644 +--- a/src/jsonb_utils.c ++++ b/src/jsonb_utils.c +@@ -9,9 +9,15 @@ + #include + #include + #include +-#include + + #include "compat.h" ++ ++#if PG13_LT ++#include ++#else ++#include ++#endif ++ + #include "export.h" + + #include "jsonb_utils.h" +-- +2.29.2 + diff --git a/package/timescaledb/0012-Handle-AT_DropExpression-in-process_utility.patch b/package/timescaledb/0012-Handle-AT_DropExpression-in-process_utility.patch new file mode 100644 index 00000000..9a3bb58c --- /dev/null +++ b/package/timescaledb/0012-Handle-AT_DropExpression-in-process_utility.patch @@ -0,0 +1,48 @@ +From 8a2ed03f78601596e1f74fa2e75f9cdf52c4ff83 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Fri, 25 Sep 2020 14:31:55 +0200 +Subject: [PATCH] Handle AT_DropExpression in process_utility + +PG13 adds a new ALTER TABLE subcommand for dropping the generated +property from a column. + +https://github.com/postgres/postgres/commit/f595117e24 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2498/commits/cdb29e2e61ec3f3b52fb8962d12a15727757e35b.patch +--- + src/process_utility.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/process_utility.c b/src/process_utility.c +index 8f915113..0f76f141 100644 +--- a/src/process_utility.c ++++ b/src/process_utility.c +@@ -3266,6 +3266,9 @@ process_altertable_end_subcmd(Hypertable *ht, Node *parsetree, ObjectAddress *ob + case AT_AddColumnRecurse: + case AT_DropColumn: + case AT_DropColumnRecurse: ++#if PG13_GE ++ case AT_DropExpression: ++#endif + + /* + * adding and dropping columns handled in +@@ -3276,9 +3279,11 @@ process_altertable_end_subcmd(Hypertable *ht, Node *parsetree, ObjectAddress *ob + case AT_DropConstraintRecurse: + /* drop constraints handled by process_ddl_sql_drop */ + break; +- case AT_ProcessedConstraint: /* internal command never hit in our +- * test code, so don't know how to +- * handle */ ++#if PG13_LT ++ case AT_ProcessedConstraint: /* internal command never hit in our ++ * test code, so don't know how to ++ * handle */ ++#endif + case AT_ReAddComment: /* internal command never hit in our test + * code, so don't know how to handle */ + case AT_AddColumnToView: /* only used with views */ +-- +2.29.2 + diff --git a/package/timescaledb/0013-Adjust-copy-code-to-PG13-changes.patch b/package/timescaledb/0013-Adjust-copy-code-to-PG13-changes.patch new file mode 100644 index 00000000..46686527 --- /dev/null +++ b/package/timescaledb/0013-Adjust-copy-code-to-PG13-changes.patch @@ -0,0 +1,34 @@ +From 5cea3a687f7227997deb0eacbb061c586c6713f7 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Sat, 26 Sep 2020 02:57:38 +0200 +Subject: [PATCH] Adjust copy code to PG13 changes + +PG13 adds a CmdType argument to ExecComputeStoredGenerated. + +https://github.com/postgres/postgres/commit/c6679e4fca + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2498/commits/a2d15828cbbbe7570afb03bb930df083ddeafd7a.patch +--- + src/copy.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/copy.c b/src/copy.c +index c8ce93e6..e38ae15e 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -379,7 +379,11 @@ copyfrom(CopyChunkState *ccstate, List *range_table, Hypertable *ht, void (*call + /* Compute stored generated columns */ + if (resultRelInfo->ri_RelationDesc->rd_att->constr && + resultRelInfo->ri_RelationDesc->rd_att->constr->has_generated_stored) ++#if PG13_GE ++ ExecComputeStoredGenerated(estate, myslot, CMD_INSERT); ++#else + ExecComputeStoredGenerated(estate, myslot); ++#endif + #endif + /* + * If the target is a plain table, check the constraints of +-- +2.29.2 + diff --git a/package/timescaledb/0014-Adjust-code-to-PG13-command-completion-tag-changes.patch b/package/timescaledb/0014-Adjust-code-to-PG13-command-completion-tag-changes.patch new file mode 100644 index 00000000..d5331fab --- /dev/null +++ b/package/timescaledb/0014-Adjust-code-to-PG13-command-completion-tag-changes.patch @@ -0,0 +1,186 @@ +From 6ef08914041b6166db6f77dd516ae8d66d0ecce6 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Wed, 30 Sep 2020 01:47:01 +0200 +Subject: [PATCH] Adjust code to PG13 command completion tag changes + +PG13 changes the representation of command completion tags to structs. + +https://github.com/postgres/postgres/commit/2f9661311b + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2498/commits/d37ec4e23bc678bc84f126c5b952fb1707ad7fe4.patch +--- + src/loader/loader.c | 13 +++++++- + src/process_utility.c | 59 +++++++++++++++++++++++++++--------- + src/process_utility.h | 4 +++ + tsl/test/src/test_ddl_hook.c | 4 +++ + 4 files changed, 65 insertions(+), 15 deletions(-) + +diff --git a/src/loader/loader.c b/src/loader/loader.c +index f60f9e77..ed35f288 100644 +--- a/src/loader/loader.c ++++ b/src/loader/loader.c +@@ -464,7 +464,14 @@ post_analyze_hook(ParseState *pstate, Query *query) + static void + loader_process_utility_hook(PlannedStmt *pstmt, const char *query_string, + ProcessUtilityContext context, ParamListInfo params, +- QueryEnvironment *queryEnv, DestReceiver *dest, char *completion_tag) ++ QueryEnvironment *queryEnv, DestReceiver *dest, ++#if PG13_GE ++ QueryCompletion *qc ++#else ++ char *completion_tag ++#endif ++ ++) + { + bool is_distributed_database = false; + char *dist_uuid = NULL; +@@ -500,7 +507,11 @@ loader_process_utility_hook(PlannedStmt *pstmt, const char *query_string, + else + process_utility = standard_ProcessUtility; + ++#if PG13_GE ++ process_utility(pstmt, query_string, context, params, queryEnv, dest, qc); ++#else + process_utility(pstmt, query_string, context, params, queryEnv, dest, completion_tag); ++#endif + + /* + * Show a NOTICE warning message in case of dropping a +diff --git a/src/process_utility.c b/src/process_utility.c +index 0f76f141..d9d7514d 100644 +--- a/src/process_utility.c ++++ b/src/process_utility.c +@@ -91,7 +91,12 @@ prev_ProcessUtility(ProcessUtilityArgs *args) + args->params, + args->queryEnv, + args->dest, +- args->completion_tag); ++#if PG13_GE ++ args->qc ++#else ++ args->completion_tag ++#endif ++ ); + } + else + { +@@ -102,7 +107,12 @@ prev_ProcessUtility(ProcessUtilityArgs *args) + args->params, + args->queryEnv, + args->dest, +- args->completion_tag); ++#if PG13_GE ++ args->qc ++#else ++ args->completion_tag ++#endif ++ ); + } + } + +@@ -493,8 +503,13 @@ process_copy(ProcessUtilityArgs *args) + /* Performs acl check in here inside `copy_security_check` */ + timescaledb_DoCopy(stmt, args->query_string, &processed, ht); + ++#if PG13_GE ++ args->qc->commandTag = CMDTAG_COPY; ++ args->qc->nprocessed = processed; ++#else + if (args->completion_tag) + snprintf(args->completion_tag, COMPLETION_TAG_BUFSIZE, "COPY " UINT64_FORMAT, processed); ++#endif + + process_add_hypertable(args, ht); + +@@ -3646,7 +3661,11 @@ process_ddl_command_start(ProcessUtilityArgs *args) + return false; + + if (check_read_only) ++#if PG13_GE ++ PreventCommandIfReadOnly(CreateCommandName(args->parsetree)); ++#else + PreventCommandIfReadOnly(CreateCommandTag(args->parsetree)); ++#endif + + return handler(args); + } +@@ -3845,18 +3864,30 @@ process_ddl_sql_drop(EventTriggerDropObject *obj) + static void + timescaledb_ddl_command_start(PlannedStmt *pstmt, const char *query_string, + ProcessUtilityContext context, ParamListInfo params, +- QueryEnvironment *queryEnv, DestReceiver *dest, char *completion_tag) +-{ +- ProcessUtilityArgs args = { .query_string = query_string, +- .context = context, +- .params = params, +- .dest = dest, +- .completion_tag = completion_tag, +- .pstmt = pstmt, +- .parsetree = pstmt->utilityStmt, +- .queryEnv = queryEnv, +- .parse_state = make_parsestate(NULL), +- .hypertable_list = NIL }; ++ QueryEnvironment *queryEnv, DestReceiver *dest, ++#if PG13_GE ++ QueryCompletion *qc ++#else ++ char *completion_tag ++#endif ++) ++{ ++ ProcessUtilityArgs args = { ++ .query_string = query_string, ++ .context = context, ++ .params = params, ++ .dest = dest, ++#if PG13_GE ++ .qc = qc, ++#else ++ .completion_tag = completion_tag, ++#endif ++ .pstmt = pstmt, ++ .parsetree = pstmt->utilityStmt, ++ .queryEnv = queryEnv, ++ .parse_state = make_parsestate(NULL), ++ .hypertable_list = NIL ++ }; + + bool altering_timescaledb = false; + DDLResult result; +diff --git a/src/process_utility.h b/src/process_utility.h +index ac5519f4..f66448fb 100644 +--- a/src/process_utility.h ++++ b/src/process_utility.h +@@ -24,7 +24,11 @@ typedef struct ProcessUtilityArgs + ParamListInfo params; + DestReceiver *dest; + List *hypertable_list; ++#if PG13_GE ++ QueryCompletion *qc; ++#else + char *completion_tag; ++#endif + } ProcessUtilityArgs; + + typedef enum +diff --git a/tsl/test/src/test_ddl_hook.c b/tsl/test/src/test_ddl_hook.c +index 4fb58f02..d01e6114 100644 +--- a/tsl/test/src/test_ddl_hook.c ++++ b/tsl/test/src/test_ddl_hook.c +@@ -80,7 +80,11 @@ test_ddl_command_end(EventTriggerData *command) + ListCell *cell; + Hypertable *ht; + ++#if PG13_GE ++ elog(NOTICE, "test_ddl_command_end: %s", GetCommandTagName(command->tag)); ++#else + elog(NOTICE, "test_ddl_command_end: %s", command->tag); ++#endif + + if (tsl_delayed_execution_list == NIL) + return; +-- +2.29.2 + diff --git a/package/timescaledb/0015-Adjust-copy-to-PG13-HEAP_INSERT_SKIP_WAL-change.patch b/package/timescaledb/0015-Adjust-copy-to-PG13-HEAP_INSERT_SKIP_WAL-change.patch new file mode 100644 index 00000000..8ce69e17 --- /dev/null +++ b/package/timescaledb/0015-Adjust-copy-to-PG13-HEAP_INSERT_SKIP_WAL-change.patch @@ -0,0 +1,51 @@ +From 399acf6de6d02b3362faa13379b6bd948b91e20c Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Fri, 2 Oct 2020 00:58:57 +0200 +Subject: [PATCH] Adjust copy to PG13 HEAP_INSERT_SKIP_WAL change + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2498/commits/446f977be8ead518579b3c5b2458429f27518b48.patch +--- + src/copy.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/copy.c b/src/copy.c +index e38ae15e..1187a696 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -215,8 +216,10 @@ copyfrom(CopyChunkState *ccstate, List *range_table, Hypertable *ht, void (*call + ccstate->rel->rd_newRelfilenodeSubid != InvalidSubTransactionId) + { + ti_options |= HEAP_INSERT_SKIP_FSM; ++#if PG13_LT + if (!XLogIsNeeded()) + ti_options |= HEAP_INSERT_SKIP_WAL; ++#endif + } + + /* +@@ -449,8 +452,13 @@ copyfrom(CopyChunkState *ccstate, List *range_table, Hypertable *ht, void (*call + * If we skipped writing WAL, then we need to sync the heap (but not + * indexes since those use WAL anyway) + */ ++#if PG13_LT + if (ti_options & HEAP_INSERT_SKIP_WAL) + heap_sync(ccstate->rel); ++#else ++ if (!RelationNeedsWAL(ccstate->rel)) ++ smgrimmedsync(ccstate->rel->rd_smgr, MAIN_FORKNUM); ++#endif + + return processed; + } +-- +2.29.2 + diff --git a/package/timescaledb/0016-Adjust-planner-code-to-PG13-planner_hook-signature-c.patch b/package/timescaledb/0016-Adjust-planner-code-to-PG13-planner_hook-signature-c.patch new file mode 100644 index 00000000..130d66b1 --- /dev/null +++ b/package/timescaledb/0016-Adjust-planner-code-to-PG13-planner_hook-signature-c.patch @@ -0,0 +1,58 @@ +From 280db3fdb6c365dd37d82afaeeebd16efa70e965 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Wed, 30 Sep 2020 01:45:29 +0200 +Subject: [PATCH] Adjust planner code to PG13 planner_hook signature + change + +PG13 adds the query string as argument to the planner_hook. + +https://github.com/postgres/postgres/commit/6aba63ef3e + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2498/commits/90e3eb3df98f3165f08a17bf5548e3a30713de26.patch +--- + src/planner.c | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/src/planner.c b/src/planner.c +index b4d4907a..cd40fa84 100644 +--- a/src/planner.c ++++ b/src/planner.c +@@ -278,7 +278,12 @@ preprocess_query(Node *node, Query *rootquery) + } + + static PlannedStmt * ++#if PG13_GE ++timescaledb_planner(Query *parse, const char *query_string, int cursor_opts, ++ ParamListInfo bound_params) ++#else + timescaledb_planner(Query *parse, int cursor_opts, ParamListInfo bound_params) ++#endif + { + PlannedStmt *stmt; + ListCell *lc; +@@ -302,11 +307,19 @@ timescaledb_planner(Query *parse, int cursor_opts, ParamListInfo bound_params) + preprocess_query((Node *) parse, parse); + + if (prev_planner_hook != NULL) +- /* Call any earlier hooks */ ++ /* Call any earlier hooks */ ++#if PG13_GE ++ stmt = (prev_planner_hook)(parse, query_string, cursor_opts, bound_params); ++#else + stmt = (prev_planner_hook)(parse, cursor_opts, bound_params); ++#endif + else +- /* Call the standard planner */ ++ /* Call the standard planner */ ++#if PG13_GE ++ stmt = standard_planner(parse, query_string, cursor_opts, bound_params); ++#else + stmt = standard_planner(parse, cursor_opts, bound_params); ++#endif + + if (ts_extension_is_loaded()) + { +-- +2.29.2 + diff --git a/package/timescaledb/0017-Adjust-code-to-deparse_context-changes.patch b/package/timescaledb/0017-Adjust-code-to-deparse_context-changes.patch new file mode 100644 index 00000000..87a12b2d --- /dev/null +++ b/package/timescaledb/0017-Adjust-code-to-deparse_context-changes.patch @@ -0,0 +1,34 @@ +From d7960c761542d7e90e91a32e91b82459e5fcc84f Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Sat, 3 Oct 2020 15:53:19 +0200 +Subject: [PATCH] Adjust code to deparse_context changes + +PG13 changes EXPLAIN to use Plan instead PlanState as context. + +https://github.com/postgres/postgres/commit/6ef77cf46e + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2498/commits/20c5ef33fc9c6d47cd6a95ca79b0b260ee3cfd25.patch +--- + src/chunk_append/explain.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/chunk_append/explain.c b/src/chunk_append/explain.c +index 0111cf72..7ee089c1 100644 +--- a/src/chunk_append/explain.c ++++ b/src/chunk_append/explain.c +@@ -84,7 +84,11 @@ show_sort_group_keys(ChunkAppendState *state, List *ancestors, ExplainState *es) + initStringInfo(&sortkeybuf); + + /* Set up deparsing context */ ++#if PG13_GE ++ context = set_deparse_context_plan(es->deparse_cxt, plan, ancestors); ++#else + context = set_deparse_context_planstate(es->deparse_cxt, (Node *) state, ancestors); ++#endif + useprefix = (list_length(es->rtable) > 1 || es->verbose); + + for (keyno = 0; keyno < nkeys; keyno++) +-- +2.29.2 + diff --git a/package/timescaledb/0018-Update-compat.h.patch b/package/timescaledb/0018-Update-compat.h.patch new file mode 100644 index 00000000..6e6dd9db --- /dev/null +++ b/package/timescaledb/0018-Update-compat.h.patch @@ -0,0 +1,27 @@ +From 67744f30f481a05e3cb6a2e73c0cb17117a2eb38 Mon Sep 17 00:00:00 2001 +From: fidomax +Date: Mon, 11 Jan 2021 14:16:06 +0300 +Subject: [PATCH] Update compat.h + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/pull/2801/commits/6a927ee84c91797025fc48ac4aab74c3344ebdad.patch +--- + src/compat.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/compat.h b/src/compat.h +index 1b2ed8e5..6b461e38 100644 +--- a/src/compat.h ++++ b/src/compat.h +@@ -371,7 +371,7 @@ get_vacuum_options(const VacuumStmt *stmt) + #define list_delete_cell_compat(l, lc, prev) list_delete_cell((l), (lc)) + #define list_make5(x1, x2, x3, x4, x5) lappend(list_make4(x1, x2, x3, x4), x5) + #define list_make5_oid(x1, x2, x3, x4, x5) lappend_oid(list_make4_oid(x1, x2, x3, x4), x5) +-#define for_each_cell_compat(cell, list, initcell) for_each_cell ((cell), (list), (initcell)) ++#define for_each_cell_compat(cell, list, initcell) for_each_cell (cell, list, initcell) + #endif + + /* PG13 removes the natts parameter from map_variable_attnos */ +-- +2.29.2 + diff --git a/package/timescaledb/0019-Adjust-code-to-PG13-tuptoaster-changes.patch b/package/timescaledb/0019-Adjust-code-to-PG13-tuptoaster-changes.patch new file mode 100644 index 00000000..0793bf1d --- /dev/null +++ b/package/timescaledb/0019-Adjust-code-to-PG13-tuptoaster-changes.patch @@ -0,0 +1,70 @@ +From 42ac10738119c7d31892d8c3f45d525ad5bda756 Mon Sep 17 00:00:00 2001 +From: Sven Klemm +Date: Sat, 26 Sep 2020 02:19:56 +0200 +Subject: [PATCH] Adjust code to PG13 tuptoaster changes + +PG13 split tuptoaster.c into three separate files. This patch also +removes unnecesary tuptoaster.h includes. + +https://github.com/postgres/postgres/commit/8b94dab066 + +Signed-off-by: Maxim Kochetkov +Fetch from: https://github.com/timescale/timescaledb/commit/2bef612c04435cdb5257d40373c4955a0d617c39.patch +--- + tsl/src/remote/async.c | 1 - + tsl/src/remote/stmt_params.c | 1 - + tsl/src/reorder.c | 7 ++++++- + 3 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/tsl/src/remote/async.c b/tsl/src/remote/async.c +index f3462809..0d55deb7 100644 +--- a/tsl/src/remote/async.c ++++ b/tsl/src/remote/async.c +@@ -13,7 +13,6 @@ + #include + #include + #include +-#include + + #include "compat.h" + #if PG12_GE +diff --git a/tsl/src/remote/stmt_params.c b/tsl/src/remote/stmt_params.c +index 0f315f37..1682d476 100644 +--- a/tsl/src/remote/stmt_params.c ++++ b/tsl/src/remote/stmt_params.c +@@ -6,7 +6,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/tsl/src/reorder.c b/tsl/src/reorder.c +index c4b42c12..7f301b2b 100644 +--- a/tsl/src/reorder.c ++++ b/tsl/src/reorder.c +@@ -19,7 +19,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -58,6 +57,12 @@ + #include + #endif + ++#if PG13_LT ++#include ++#else ++#include ++#endif ++ + #include "chunk.h" + #include "chunk_index.h" + #include "hypertable_cache.h" +-- +2.29.2 + diff --git a/package/timescaledb/Config.in b/package/timescaledb/Config.in new file mode 100644 index 00000000..af4a8685 --- /dev/null +++ b/package/timescaledb/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_TIMESCALEDB + bool "timescaledb" + depends on BR2_PACKAGE_POSTGRESQL + help + TimescaleDB is an open-source database designed + to make SQL scalable for time-series data. + It is engineered up from PostgreSQL and packaged + as a PostgreSQL extension, providing automatic + partitioning across time and space (partitioning key), + as well as full SQL support. + + https://www.timescale.com/ diff --git a/package/timescaledb/timescaledb.hash b/package/timescaledb/timescaledb.hash new file mode 100644 index 00000000..dfde3b51 --- /dev/null +++ b/package/timescaledb/timescaledb.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 afb11b632455cfa593f60946125c8ed6ac0db4713c203d6582e662266f9e1045 timescaledb-2.0.2.tar.gz +sha256 0378e0948feefd85f579319c74d6e2b671194037f550c7176ef26649d94c895b LICENSE diff --git a/package/timescaledb/timescaledb.mk b/package/timescaledb/timescaledb.mk new file mode 100644 index 00000000..08680f89 --- /dev/null +++ b/package/timescaledb/timescaledb.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# timescaledb +# +################################################################################ + +TIMESCALEDB_VERSION = 2.0.2 +TIMESCALEDB_SITE = $(call github,timescale,timescaledb,$(TIMESCALEDB_VERSION)) +TIMESCALEDB_LICENSE = Apache-2.0 +TIMESCALEDB_LICENSE_FILES = LICENSE + +TIMESCALEDB_DEPENDENCIES = postgresql + +# The PG_CPPFLAGS, PG_CFLAGS, PG_LDFLAGS and PG_LIBS variables must be +# non-empty, otherwise CMake will call the pg_config script, and our +# pg_config replacement doesn't implement --cppflags --cflags +# --ldflags and --libs. +TIMESCALEDB_CONF_OPTS = \ + -DREGRESS_CHECKS=OFF \ + -DWARNINGS_AS_ERRORS=OFF \ + -DPG_PKGLIBDIR=lib/postgresql \ + -DPG_SHAREDIR=share/postgresql \ + -DPG_BINDIR=bin \ + -DPG_CPPFLAGS="$(TARGET_CPPFLAGS) " \ + -DPG_CFLAGS="$(TARGET_CFLAGS) " \ + -DPG_LDFLAGS="$(TARGET_LDFLAGS) " \ + -DPG_LIBS=" " + +# There's no dependency on the OpenSSL package, because USE_OPENSSL +# only tells if postgresql was built with OpenSSL support or not. +ifeq ($(BR2_PACKAGE_OPENSSL),y) +TIMESCALEDB_CONF_OPTS += -DUSE_OPENSSL=1 +else +TIMESCALEDB_CONF_OPTS += -DUSE_OPENSSL=0 +endif + +$(eval $(cmake-package)) diff --git a/package/tinc/Config.in b/package/tinc/Config.in new file mode 100644 index 00000000..837f556b --- /dev/null +++ b/package/tinc/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_TINC + bool "tinc" + depends on !BR2_STATIC_LIBS # tinc requires libdl for OpenSSL + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LZO + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + tinc is a Virtual Private Network (VPN) daemon that uses + tunnelling and encryption to create a secure private network + between hosts on the Internet. + + http://www.tinc-vpn.org/ + +comment "tinc needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/tinc/tinc.hash b/package/tinc/tinc.hash new file mode 100644 index 00000000..5bd7aa2b --- /dev/null +++ b/package/tinc/tinc.hash @@ -0,0 +1,4 @@ +# Locally calculated after checking pgp signature +sha256 40f73bb3facc480effe0e771442a706ff0488edea7a5f2505d4ccb2aa8163108 tinc-1.0.36.tar.gz +sha256 3b37ffbf3459f2aceeef169aa65ee8b111ac1f8ba24a2a1b90b079678a9c7faa COPYING +sha256 9bf76a8aa304d807df20bf3d221c21d259764be63e39b58f299b80ba3ac14b5b COPYING.README diff --git a/package/tinc/tinc.mk b/package/tinc/tinc.mk new file mode 100644 index 00000000..0726e81d --- /dev/null +++ b/package/tinc/tinc.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# tinc +# +################################################################################ + +TINC_VERSION = 1.0.36 +TINC_SITE = http://www.tinc-vpn.org/packages +TINC_DEPENDENCIES = lzo openssl zlib +TINC_LICENSE = GPL-2.0+ with OpenSSL exception +TINC_LICENSE_FILES = COPYING COPYING.README +TINC_CPE_ID_VENDOR = tinc-vpn +TINC_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=c99" + +ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),) +TINC_CONF_ENV += \ + ax_cv_check_cflags___fPIE=no \ + ax_cv_check_ldflags___pie=no +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +TINC_DEPENDENCIES += systemd +TINC_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system +endif + +$(eval $(autotools-package)) diff --git a/package/tini/Config.in b/package/tini/Config.in new file mode 100644 index 00000000..719e1e1f --- /dev/null +++ b/package/tini/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_TINI + bool "tini" + depends on BR2_USE_MMU # fork() + help + tini is a simple but valid init binary to + act as PID 1 for containers. + + https://github.com/krallin/tini + +if BR2_PACKAGE_TINI + +config BR2_PACKAGE_TINI_MINIMAL + bool "build minimal variant" + help + Disables argument parsing and verbose output. + +endif diff --git a/package/tini/tini.hash b/package/tini/tini.hash new file mode 100644 index 00000000..83a97a40 --- /dev/null +++ b/package/tini/tini.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 e5f46bca81266bdd511cf08018d66866870531794569c04f9b45f50dd23c28b0 LICENSE +sha256 0fd35a7030052acd9f58948d1d900fe1e432ee37103c5561554408bdac6bbf0d tini-0.19.0.tar.gz diff --git a/package/tini/tini.mk b/package/tini/tini.mk new file mode 100644 index 00000000..9da54f8a --- /dev/null +++ b/package/tini/tini.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# tini +# +################################################################################ + +TINI_VERSION = 0.19.0 +TINI_SITE = $(call github,krallin,tini,v$(TINI_VERSION)) +TINI_LICENSE = MIT +TINI_LICENSE_FILES = LICENSE +TINI_CPE_ID_VENDOR = tini_project + +TINI_CFLAGS = $(TARGET_CFLAGS) \ + -static \ + -DTINI_VERSION=\"$(TINI_VERSION)\" \ + -DTINI_GIT=\"\" + +ifeq ($(BR2_PACKAGE_TINI_MINIMAL),y) +TINI_CFLAGS += -DTINI_MINIMAL +endif + +define TINI_CONFIGURE_CMDS + printf "#pragma once\n" > $(@D)/src/tiniConfig.h +endef + +define TINI_BUILD_CMDS + mkdir -p $(@D)/bin + $(TARGET_CC) $(TINI_CFLAGS) \ + -o $(@D)/bin/tini $(@D)/src/tini.c +endef + +define TINI_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/tini $(TARGET_DIR)/usr/bin/tini + ln -sf tini $(TARGET_DIR)/usr/bin/docker-init +endef + +# Tini's CMakeLists.txt is not suitable for Buildroot. +$(eval $(generic-package)) diff --git a/package/tinyalsa/0001-disable-doxygen-usage.patch b/package/tinyalsa/0001-disable-doxygen-usage.patch new file mode 100644 index 00000000..ed939fb9 --- /dev/null +++ b/package/tinyalsa/0001-disable-doxygen-usage.patch @@ -0,0 +1,35 @@ +Disable doxygen usage + +In order to avoid a dependency on doxygen on the build machine, this +patch adjusts the main Makefile to not build and install the +documentation. + +[Vincent: tweak patch for 1.1.1 version] + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Vicente Olivert Riera + +diff -rup a/Makefile b/Makefile +--- a/Makefile 2017-05-24 05:23:57.000000000 +0100 ++++ b/Makefile 2017-05-25 10:35:20.781747053 +0100 +@@ -11,14 +11,12 @@ export MANDIR ?= $(PREFIX)/share/man + all: + $(MAKE) -C src + $(MAKE) -C utils +- $(MAKE) -C doxygen + $(MAKE) -C examples + + .PHONY: clean + clean: + $(MAKE) -C src clean + $(MAKE) -C utils clean +- $(MAKE) -C doxygen clean + $(MAKE) -C examples clean + + .PHONY: install +@@ -30,5 +28,4 @@ install: + install include/tinyalsa/version.h $(DESTDIR)$(INCDIR)/ + $(MAKE) -C src install + $(MAKE) -C utils install +- $(MAKE) -C doxygen install + diff --git a/package/tinyalsa/0002-interval.h-add-missing-header.patch b/package/tinyalsa/0002-interval.h-add-missing-header.patch new file mode 100644 index 00000000..c043145b --- /dev/null +++ b/package/tinyalsa/0002-interval.h-add-missing-header.patch @@ -0,0 +1,36 @@ +From 685e530d8a0063134642371eaacd01fee2f62d85 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Fri, 2 Jun 2017 12:19:03 +0300 +Subject: [PATCH] interval.h: add missing header + +The ssize_t type requires the unistd.h header. This fixes build with musl +libc: + +In file included from ../include/tinyalsa/limits.h:32:0, + from limits.c:1: +../include/tinyalsa/interval.h:38:2: error: unknown type name 'ssize_t' + ssize_t max; + ^ + +Signed-off-by: Baruch Siach +--- +Upstream status: https://github.com/tinyalsa/tinyalsa/pull/98 + + include/tinyalsa/interval.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/tinyalsa/interval.h b/include/tinyalsa/interval.h +index 3f6f3dce5d90..068571df5a63 100644 +--- a/include/tinyalsa/interval.h ++++ b/include/tinyalsa/interval.h +@@ -30,6 +30,7 @@ + #define TINYALSA_INTERVAL_H + + #include ++#include + + /** A closed range signed interval. */ + +-- +2.11.0 + diff --git a/package/tinyalsa/Config.in b/package/tinyalsa/Config.in new file mode 100644 index 00000000..d9ce22c8 --- /dev/null +++ b/package/tinyalsa/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_TINYALSA + bool "tinyalsa" + depends on !BR2_STATIC_LIBS + help + a small library to interface with ALSA in the Linux kernel + + The aims are: + + - Provide a basic pcm and mixer API + - If it's not absolutely needed, don't add it to the API + - Avoid supporting complex and unnecessary operations that + could be dealt with at a higher level + + https://github.com/tinyalsa/tinyalsa + +comment "tinyalsa needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/tinyalsa/tinyalsa.hash b/package/tinyalsa/tinyalsa.hash new file mode 100644 index 00000000..d078bab5 --- /dev/null +++ b/package/tinyalsa/tinyalsa.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 d92b438cea348ae316c4b2cbf367b4f01ed821a947e6a34d813624e9e3c936c1 tinyalsa-1.1.1.tar.gz +sha256 ca2b89a68c33fba3c8bcaec96f32907e2ede0eb33688ae61d29ec49732158f6d NOTICE diff --git a/package/tinyalsa/tinyalsa.mk b/package/tinyalsa/tinyalsa.mk new file mode 100644 index 00000000..bd9d9a00 --- /dev/null +++ b/package/tinyalsa/tinyalsa.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# tinyalsa +# +################################################################################ + +TINYALSA_VERSION = 1.1.1 +TINYALSA_SITE = $(call github,tinyalsa,tinyalsa,$(TINYALSA_VERSION)) +TINYALSA_LICENSE = BSD-3-Clause +TINYALSA_LICENSE_FILES = NOTICE +TINYALSA_INSTALL_STAGING = YES + +define TINYALSA_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) +endef + +define TINYALSA_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + -C $(@D) \ + PREFIX="/usr" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + DESTDIR="$(STAGING_DIR)" install +endef + +define TINYALSA_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + -C $(@D) \ + PREFIX="/usr" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package)) diff --git a/package/tinycbor/0001-Enable-build-for-different-c-libraries.patch b/package/tinycbor/0001-Enable-build-for-different-c-libraries.patch new file mode 100644 index 00000000..40f92886 --- /dev/null +++ b/package/tinycbor/0001-Enable-build-for-different-c-libraries.patch @@ -0,0 +1,39 @@ +From 085ca40781f7c39febe6d14fb7e5cba342e1804b Mon Sep 17 00:00:00 2001 +From: Ricardo Crudo +Date: Sat, 30 May 2020 22:03:01 +0200 +Subject: [PATCH] Enable build for different c libraries + +The open_memstream.c was using GLIBC macro definition to test if the +library is building on a Linux box. This makes impossible to build +tinycbor against other C libraries, as musl for example. + +Signed-off-by: Ricardo Crudo +[Retrieved from: +https://github.com/intel/tinycbor/commit/085ca40781f7c39febe6d14fb7e5cba342e1804b] +Signed-off-by: Fabrice Fontaine +--- + src/open_memstream.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/open_memstream.c b/src/open_memstream.c +index 18f3de8..3365378 100644 +--- a/src/open_memstream.c ++++ b/src/open_memstream.c +@@ -38,7 +38,7 @@ + #ifdef __APPLE__ + typedef int RetType; + typedef int LenType; +-#elif __GLIBC__ ++#elif __linux__ + typedef ssize_t RetType; + typedef size_t LenType; + #else +@@ -101,7 +101,7 @@ FILE *open_memstream(char **bufptr, size_t *lenptr) + + #ifdef __APPLE__ + return funopen(b, NULL, write_to_buffer, NULL, close_buffer); +-#elif __GLIBC__ ++#elif __linux__ + static const cookie_io_functions_t vtable = { + NULL, + write_to_buffer, diff --git a/package/tinycbor/Config.in b/package/tinycbor/Config.in new file mode 100644 index 00000000..41f0b5fa --- /dev/null +++ b/package/tinycbor/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TINYCBOR + bool "tinycbor" + help + Concise Binary Object Representation (CBOR) Library + + https://github.com/01org/tinycbor diff --git a/package/tinycbor/tinycbor.hash b/package/tinycbor/tinycbor.hash new file mode 100644 index 00000000..8ff706bb --- /dev/null +++ b/package/tinycbor/tinycbor.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 956eb4b670ea4969eaee67395b5bb6437b153960385b77357d6692e979d1b12d tinycbor-0.5.3.tar.gz +sha256 3c6ba0b5bfa7830505301ffb336a17b0748e0d61c4d34216e9dc98f10e40395e LICENSE diff --git a/package/tinycbor/tinycbor.mk b/package/tinycbor/tinycbor.mk new file mode 100644 index 00000000..ef095ea6 --- /dev/null +++ b/package/tinycbor/tinycbor.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# tinycbor +# +################################################################################ + +TINYCBOR_VERSION = 0.5.3 +TINYCBOR_SITE = $(call github,intel,tinycbor,v$(TINYCBOR_VERSION)) +TINYCBOR_LICENSE = MIT +TINYCBOR_LICENSE_FILES = LICENSE + +TINYCBOR_DEPENDENCIES = host-pkgconf +TINYCBOR_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_CJSON),y) +TINYCBOR_DEPENDENCIES += cjson +endif + +TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) V=1 + +ifeq ($(BR2_STATIC_LIBS),y) +TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=0 +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=1 +else ifeq ($(BR2_SHARED_LIBS),y) +TINYCBOR_MAKE_OPTS += BUILD_STATIC=0 BUILD_SHARED=1 +endif + +# disabled parallel build because of build failures while +# producing the .config file +define TINYCBOR_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) $(TINYCBOR_MAKE_OPTS) -C $(@D) +endef + +define TINYCBOR_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \ + DESTDIR=$(STAGING_DIR) prefix=/usr install +endef + +define TINYCBOR_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \ + DESTDIR=$(TARGET_DIR) prefix=/usr install +endef + +$(eval $(generic-package)) diff --git a/package/tinydtls/0001-sha2-sha2.c-fix-build-on-big-endian.patch b/package/tinydtls/0001-sha2-sha2.c-fix-build-on-big-endian.patch new file mode 100644 index 00000000..09d74d8a --- /dev/null +++ b/package/tinydtls/0001-sha2-sha2.c-fix-build-on-big-endian.patch @@ -0,0 +1,119 @@ +From 608738ccad9ac3743ccd535bde1e84f401e6176f Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 20 Jun 2020 12:50:40 +0200 +Subject: [PATCH] sha2/sha2.c: fix build on big endian + +Build is broken since 865ec9ba1d44e629c1107c299aebd20e901a19ff because +tmp is undefined in put32be and put64be: + +sha2.c: In function 'put32be': +sha2.c:177:34: error: 'tmp' undeclared (first use in this function) + MEMCPY_BCOPY(data, &val, sizeof(tmp)); + ^~~ + +Fix this error by replacing tmp by val + +Moreover, move MEMCPY_BCOPY before its usage or linking step will fail + +Fixes: + - http://autobuild.buildroot.org/results/e8704e02fdede7b63e22da552292977b23380b32 + +Signed-off-by: Fabrice Fontaine +[Upstream: https://github.com/eclipse/tinydtls/commit/78a2d32f47165eda10cbf8f5cf79f86fa1c4872b] +--- + sha2/sha2.c | 58 ++++++++++++++++++++++++++--------------------------- + 1 file changed, 29 insertions(+), 29 deletions(-) + +diff --git a/sha2/sha2.c b/sha2/sha2.c +index cb6d90f..5c794c6 100644 +--- a/sha2/sha2.c ++++ b/sha2/sha2.c +@@ -114,6 +114,33 @@ + #error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN + #endif + ++/* ++ * Macros for copying blocks of memory and for zeroing out ranges ++ * of memory. Using these macros makes it easy to switch from ++ * using memset()/memcpy() and using bzero()/bcopy(). ++ * ++ * Please define either SHA2_USE_MEMSET_MEMCPY or define ++ * SHA2_USE_BZERO_BCOPY depending on which function set you ++ * choose to use: ++ */ ++#if !defined(SHA2_USE_MEMSET_MEMCPY) && !defined(SHA2_USE_BZERO_BCOPY) ++/* Default to memset()/memcpy() if no option is specified */ ++#define SHA2_USE_MEMSET_MEMCPY 1 ++#endif ++#if defined(SHA2_USE_MEMSET_MEMCPY) && defined(SHA2_USE_BZERO_BCOPY) ++/* Abort with an error if BOTH options are defined */ ++#error Define either SHA2_USE_MEMSET_MEMCPY or SHA2_USE_BZERO_BCOPY, not both! ++#endif ++ ++#ifdef SHA2_USE_MEMSET_MEMCPY ++#define MEMSET_BZERO(p,l) memset((p), 0, (l)) ++#define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l)) ++#endif ++#ifdef SHA2_USE_BZERO_BCOPY ++#define MEMSET_BZERO(p,l) bzero((p), (l)) ++#define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l)) ++#endif ++ + /* + * Define the followingsha2_* types to types of the correct length on + * the native archtecture. Most BSD systems and Linux define u_intXX_t +@@ -174,7 +201,7 @@ static inline void put32be(sha2_byte* data, sha2_word32 val) + data[1] = val; val >>= 8; + data[0] = val; + #else /* BYTE_ORDER != LITTLE_ENDIAN */ +- MEMCPY_BCOPY(data, &val, sizeof(tmp)); ++ MEMCPY_BCOPY(data, &val, sizeof(val)); + #endif /* BYTE_ORDER != LITTLE_ENDIAN */ + } + +@@ -209,7 +236,7 @@ static inline void put64be(sha2_byte* data, sha2_word64 val) + data[1] = val; val >>= 8; + data[0] = val; + #else /* BYTE_ORDER != LITTLE_ENDIAN */ +- MEMCPY_BCOPY(data, &val, sizeof(tmp)); ++ MEMCPY_BCOPY(data, &val, sizeof(val)); + #endif /* BYTE_ORDER != LITTLE_ENDIAN */ + } + +@@ -225,33 +252,6 @@ static inline void put64be(sha2_byte* data, sha2_word64 val) + } \ + } + +-/* +- * Macros for copying blocks of memory and for zeroing out ranges +- * of memory. Using these macros makes it easy to switch from +- * using memset()/memcpy() and using bzero()/bcopy(). +- * +- * Please define either SHA2_USE_MEMSET_MEMCPY or define +- * SHA2_USE_BZERO_BCOPY depending on which function set you +- * choose to use: +- */ +-#if !defined(SHA2_USE_MEMSET_MEMCPY) && !defined(SHA2_USE_BZERO_BCOPY) +-/* Default to memset()/memcpy() if no option is specified */ +-#define SHA2_USE_MEMSET_MEMCPY 1 +-#endif +-#if defined(SHA2_USE_MEMSET_MEMCPY) && defined(SHA2_USE_BZERO_BCOPY) +-/* Abort with an error if BOTH options are defined */ +-#error Define either SHA2_USE_MEMSET_MEMCPY or SHA2_USE_BZERO_BCOPY, not both! +-#endif +- +-#ifdef SHA2_USE_MEMSET_MEMCPY +-#define MEMSET_BZERO(p,l) memset((p), 0, (l)) +-#define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l)) +-#endif +-#ifdef SHA2_USE_BZERO_BCOPY +-#define MEMSET_BZERO(p,l) bzero((p), (l)) +-#define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l)) +-#endif +- + + /*** THE SIX LOGICAL FUNCTIONS ****************************************/ + /* +-- +2.26.2 + diff --git a/package/tinydtls/Config.in b/package/tinydtls/Config.in new file mode 100644 index 00000000..98cbbb58 --- /dev/null +++ b/package/tinydtls/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_TINYDTLS + bool "tinydtls" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + tinydtls is a library for Datagram Transport Layer Security + (DTLS) covering both the client and the server state + machine. It is implemented in C and provides support for + the mandatory cipher suites specified in CoAP. + + https://projects.eclipse.org/projects/iot.tinydtls + +comment "tinydtls needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/tinydtls/tinydtls.hash b/package/tinydtls/tinydtls.hash new file mode 100644 index 00000000..be6bf182 --- /dev/null +++ b/package/tinydtls/tinydtls.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 af73742835b5a66dc0b4a9c126ca8243b5db2986b4969d76e2b4531aa7e13f67 tinydtls-0.9-rc1.tar.gz +sha256 7e906fb56da52bb6bba38e77eec00e7d37fe65b0b7b28c4bf68ff036573d0de5 LICENSE diff --git a/package/tinydtls/tinydtls.mk b/package/tinydtls/tinydtls.mk new file mode 100644 index 00000000..6d839bc0 --- /dev/null +++ b/package/tinydtls/tinydtls.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# tinydtls +# +################################################################################ + +TINYDTLS_VERSION = 0.9-rc1 +TINYDTLS_SITE = $(call github,eclipse,tinydtls,v$(TINYDTLS_VERSION)) +TINYDTLS_LICENSE = EPL-1.0 or EDL-1.0 +TINYDTLS_LICENSE_FILES = LICENSE +TINYDTLS_CPE_ID_VENDOR = eclipse +TINYDTLS_INSTALL_STAGING = YES +TINYDTLS_DEPENDENCIES = host-pkgconf +# From git +TINYDTLS_AUTORECONF = YES +# use inttypes.h data types instead of u_intXX_t for musl compatibility +TINYDTLS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -DSHA2_USE_INTTYPES_H" + +$(eval $(autotools-package)) diff --git a/package/tinymembench/0001-arm-fix-build-on-Thumb-only-architectures.patch b/package/tinymembench/0001-arm-fix-build-on-Thumb-only-architectures.patch new file mode 100644 index 00000000..88559ec0 --- /dev/null +++ b/package/tinymembench/0001-arm-fix-build-on-Thumb-only-architectures.patch @@ -0,0 +1,47 @@ +From 034a3552e9700c6d424bd706db106f5bce1f5a5e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 11 Nov 2016 21:49:39 +0100 +Subject: [PATCH] arm: fix build on Thumb-only architectures + +Building tinymembench for ARM Cortex-M currently fails, because the +arm-neon.S file contains ARM code that doesn't build on Thumb-only +architectures. To account for this and fix the build for Cortex-M, +this patch adjusts the compile time condition to also verify that the +architecture supports the ARM instruction set, by testing the +__ARM_ARCH_ISA_ARM compiler define. + +Signed-off-by: Thomas Petazzoni +--- + arm-neon.S | 2 +- + asm-opt.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arm-neon.S b/arm-neon.S +index 4db78ce..19c30ad 100644 +--- a/arm-neon.S ++++ b/arm-neon.S +@@ -21,7 +21,7 @@ + * DEALINGS IN THE SOFTWARE. + */ + +-#ifdef __arm__ ++#if defined(__arm__) && defined(__ARM_ARCH_ISA_ARM) + + .text + .fpu neon +diff --git a/asm-opt.c b/asm-opt.c +index 9da4596..eba1183 100644 +--- a/asm-opt.c ++++ b/asm-opt.c +@@ -202,7 +202,7 @@ bench_info *get_asm_framebuffer_benchmarks(void) + return empty; + } + +-#elif defined(__arm__) ++#elif defined(__arm__) && defined(__ARM_ARCH_ISA_ARM) + + #include "arm-neon.h" + +-- +2.7.4 + diff --git a/package/tinymembench/Config.in b/package/tinymembench/Config.in new file mode 100644 index 00000000..8f6e1a2b --- /dev/null +++ b/package/tinymembench/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_TINYMEMBENCH + bool "tinymembench" + depends on !BR2_MIPS_NABI32 && !BR2_MIPS_NABI64 + help + Tinymembench is a simple memory benchmark program, which + tries to measure the peak bandwidth of sequential memory + accesses and the latency of random memory accesses. + Bandwidth is measured by running different assembly code for + the aligned memory blocks and attempting different prefetch + strategies. + + https://github.com/ssvb/tinymembench diff --git a/package/tinymembench/tinymembench.hash b/package/tinymembench/tinymembench.hash new file mode 100644 index 00000000..c0b767e9 --- /dev/null +++ b/package/tinymembench/tinymembench.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 e37a2682065b2778f2fa7f22bd59472f5ca2191be48503952ae020b8f023f23d tinymembench-0.4.tar.gz +sha256 8ba473aced4630aee2808efe17b53e904a9d68a9b3361de491717f9a4e75da39 LICENSE diff --git a/package/tinymembench/tinymembench.mk b/package/tinymembench/tinymembench.mk new file mode 100644 index 00000000..016d680c --- /dev/null +++ b/package/tinymembench/tinymembench.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tinymembench +# +################################################################################ + +TINYMEMBENCH_VERSION = 0.4 +TINYMEMBENCH_SITE = $(call github,ssvb,tinymembench,v$(TINYMEMBENCH_VERSION)) +TINYMEMBENCH_LICENSE = MIT +TINYMEMBENCH_LICENSE_FILES = LICENSE + +define TINYMEMBENCH_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define TINYMEMBENCH_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/tinymembench \ + $(TARGET_DIR)/usr/bin/tinymembench +endef + +$(eval $(generic-package)) diff --git a/package/tinyproxy/Config.in b/package/tinyproxy/Config.in new file mode 100644 index 00000000..aec2ab81 --- /dev/null +++ b/package/tinyproxy/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_TINYPROXY + bool "tinyproxy" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Tinyproxy is a small, efficient HTTP/SSL proxy daemon released + under the GNU General Public License. Tinyproxy is very + useful in a small network setting, where a larger proxy would + be too resource intensive. + + https://tinyproxy.github.io + +comment "tinyproxy needs a toolchain w/ threads, wchar" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + depends on BR2_USE_MMU diff --git a/package/tinyproxy/tinyproxy.hash b/package/tinyproxy/tinyproxy.hash new file mode 100644 index 00000000..80967415 --- /dev/null +++ b/package/tinyproxy/tinyproxy.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 a23a8f647f622f01e51b93fa882ea5a15c20e026d45c3aafa81ec579e464daf7 tinyproxy-1.10.0.tar.bz2 +sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING diff --git a/package/tinyproxy/tinyproxy.mk b/package/tinyproxy/tinyproxy.mk new file mode 100644 index 00000000..326bfa8b --- /dev/null +++ b/package/tinyproxy/tinyproxy.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# tinyproxy +# +################################################################################ + +TINYPROXY_VERSION = 1.10.0 +TINYPROXY_SITE = https://github.com/tinyproxy/tinyproxy/releases/download/$(TINYPROXY_VERSION) +TINYPROXY_SOURCE = tinyproxy-$(TINYPROXY_VERSION).tar.bz2 +TINYPROXY_LICENSE = GPL-2.0+ +TINYPROXY_LICENSE_FILES = COPYING +TINYPROXY_CPE_ID_VENDOR = tinyproxy_project +TINYPROXY_CONF_ENV = ac_cv_path_A2X=no + +$(eval $(autotools-package)) diff --git a/package/tinyssh/Config.in b/package/tinyssh/Config.in new file mode 100644 index 00000000..da19d2d4 --- /dev/null +++ b/package/tinyssh/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_TINYSSH + bool "tinyssh" + depends on BR2_USE_MMU # fork() + help + TinySSH is a minimalistic SSH server which implements only + a subset of SSHv2 features. + + https://tinyssh.org diff --git a/package/tinyssh/tinyssh.hash b/package/tinyssh/tinyssh.hash new file mode 100644 index 00000000..99ee4afa --- /dev/null +++ b/package/tinyssh/tinyssh.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 65a7dc785861a09399419a1e7c42cddf66f32dc233a33277327b11f1bd8a772c tinyssh-7e2b4025bf3a2dae4c6617e3eb39df4bcde37454.tar.gz +sha256 b5dc19477e29f4111e1c16cd89ec0782f5a07b1a30e3bdb7c155425b81b12c46 LICENCE diff --git a/package/tinyssh/tinyssh.mk b/package/tinyssh/tinyssh.mk new file mode 100644 index 00000000..6f22be6c --- /dev/null +++ b/package/tinyssh/tinyssh.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# tinyssh +# +################################################################################ + +TINYSSH_VERSION = 7e2b4025bf3a2dae4c6617e3eb39df4bcde37454 +TINYSSH_SITE = $(call github,janmojzis,tinyssh,$(TINYSSH_VERSION)) +TINYSSH_LICENSE = Public Domain, CC0-1.0 +TINYSSH_LICENSE_FILES = LICENCE + +define TINYSSH_BUILD_CMDS + $(TARGET_MAKE_ENV) CC="$(TARGET_CC)" $(MAKE) -C $(@D) cross-compile +endef + +define TINYSSH_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/tinyxml/Config.in b/package/tinyxml/Config.in new file mode 100644 index 00000000..061ff671 --- /dev/null +++ b/package/tinyxml/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TINYXML + bool "tinyxml" + depends on BR2_INSTALL_LIBSTDCPP + help + TinyXML is a simple, small, C++ XML parser that can be + easily integrating into other programs. + + https://github.com/leethomason/tinyxml2 + +comment "tinyxml needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/tinyxml/tinyxml.hash b/package/tinyxml/tinyxml.hash new file mode 100644 index 00000000..650a3b22 --- /dev/null +++ b/package/tinyxml/tinyxml.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 8164c9ad48b9028667768a584d62f7760cfbfb90d0dd6214ad174403058da10c tinyxml-2.6.2_2.tar.gz +sha256 a65b8363834ccbe31ab7b49dcba723ed204622df30326793e0121435624c1a8d README diff --git a/package/tinyxml/tinyxml.mk b/package/tinyxml/tinyxml.mk new file mode 100644 index 00000000..15280517 --- /dev/null +++ b/package/tinyxml/tinyxml.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# tinyxml +# +################################################################################ + +TINYXML_VERSION = 2.6.2_2 +TINYXML_SITE = http://mirrors.xbmc.org/build-deps/sources +# AUTORECONF is needed because the XBMC's version of TinyXML contains a +# configure.ac which is not present in mainline. +TINYXML_AUTORECONF = YES +TINYXML_INSTALL_STAGING = YES +TINYXML_LICENSE = Zlib +TINYXML_LICENSE_FILES = README + +$(eval $(autotools-package)) diff --git a/package/tinyxml2/Config.in b/package/tinyxml2/Config.in new file mode 100644 index 00000000..2f575012 --- /dev/null +++ b/package/tinyxml2/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TINYXML2 + bool "tinyxml2" + depends on BR2_INSTALL_LIBSTDCPP + help + TinyXML-2 is a simple, small, efficient, C++ XML parser that + can be easily integrating into other programs. + + http://www.grinninglizard.com/tinyxml2/index.html + +comment "tinyxml2 needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/tinyxml2/tinyxml2.hash b/package/tinyxml2/tinyxml2.hash new file mode 100644 index 00000000..3c59d159 --- /dev/null +++ b/package/tinyxml2/tinyxml2.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 6ce574fbb46751842d23089485ae73d3db12c1b6639cda7721bf3a7ee862012c tinyxml2-8.0.0.tar.gz +sha256 9332252e9b9e46db8285d4a3f0bf25f139bf1dca6781b956d57f2302efca6432 LICENSE.txt diff --git a/package/tinyxml2/tinyxml2.mk b/package/tinyxml2/tinyxml2.mk new file mode 100644 index 00000000..d760d54a --- /dev/null +++ b/package/tinyxml2/tinyxml2.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# tinyxml2 +# +################################################################################ + +TINYXML2_VERSION = 8.0.0 +TINYXML2_SITE = $(call github,leethomason,tinyxml2,$(TINYXML2_VERSION)) +TINYXML2_LICENSE = Zlib +TINYXML2_LICENSE_FILES = LICENSE.txt +TINYXML2_INSTALL_STAGING = YES +TINYXML2_CPE_ID_VENDOR = tinyxml2_project + +ifeq ($(BR2_STATIC_LIBS),y) +TINYXML2_CONF_OPTS += -DBUILD_STATIC_LIBS=ON +endif + +$(eval $(cmake-package)) diff --git a/package/tio/Config.in b/package/tio/Config.in new file mode 100644 index 00000000..d5d61910 --- /dev/null +++ b/package/tio/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_TIO + bool "tio" + depends on !BR2_sparc64 && !BR2_sparc + help + "tio" is a simple TTY terminal application which features a + straightforward commandline interface to easily connect to + TTY devices for basic input/output. + + https://tio.github.io/ + +# tio is disabled for sparc and sparc64 architectures because it fails +# to build with a redefinition of 'struct termio' error, with no proper +# fix or workaround for now +comment "tio is disabled for sparc and sparc64 architectures" + depends on BR2_sparc64 || BR2_sparc diff --git a/package/tio/tio.hash b/package/tio/tio.hash new file mode 100644 index 00000000..3053bd1b --- /dev/null +++ b/package/tio/tio.hash @@ -0,0 +1,5 @@ +# Locally computed: +sha256 a8f5ed6994cacb96780baa416b19e5a6d7d67e8c162a8ea4fd9eccd64984ae44 tio-1.32.tar.xz + +# Hash for license files: +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/tio/tio.mk b/package/tio/tio.mk new file mode 100644 index 00000000..31f1dfb5 --- /dev/null +++ b/package/tio/tio.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# tio +# +################################################################################ + +TIO_VERSION = 1.32 +TIO_SOURCE = tio-$(TIO_VERSION).tar.xz +TIO_SITE = https://github.com/tio/tio/releases/download/v$(TIO_VERSION) +TIO_LICENSE = GPL-2.0+ +TIO_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/tk/Config.in b/package/tk/Config.in new file mode 100644 index 00000000..507b0bf9 --- /dev/null +++ b/package/tk/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_TK + bool "tk" + depends on BR2_USE_MMU # tcl + depends on BR2_TOOLCHAIN_HAS_THREADS # tcl + depends on !BR2_STATIC_LIBS # tcl + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_TCL + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXFT + help + A windowing toolkit for use with tcl + + http://www.tcl.tk + +comment "tk needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/tk/tk.hash b/package/tk/tk.hash new file mode 100644 index 00000000..5fc0b6fc --- /dev/null +++ b/package/tk/tk.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 d62c371a71b4744ed830e3c21d27968c31dba74dd2c45f36b9b071e6d88eb19d tk8.6.6-src.tar.gz +sha256 2cde822b93ca16ae535c954b7dfe658b4ad10df2a193628d1b358f1765e8b198 license.terms diff --git a/package/tk/tk.mk b/package/tk/tk.mk new file mode 100644 index 00000000..102d3685 --- /dev/null +++ b/package/tk/tk.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# tk +# +################################################################################ + +TK_VERSION_MAJOR = 8.6 +TK_VERSION = $(TK_VERSION_MAJOR).6 +TK_SOURCE = tk$(TK_VERSION)-src.tar.gz +TK_SITE = http://downloads.sourceforge.net/project/tcl/Tcl/$(TK_VERSION) +TK_LICENSE = TCL +TK_LICENSE_FILES = license.terms +TK_SUBDIR = unix +TK_INSTALL_STAGING = YES + +TK_DEPENDENCIES = tcl xlib_libX11 xlib_libXft + +# hopefully our strtod is not buggy +TK_CONF_ENV = tcl_cv_strtod_buggy=no + +TK_CONF_OPTS = --disable-rpath \ + --with-tcl=$(BUILD_DIR)/tcl-$(TCL_VERSION)/unix \ + --x-includes=$(STAGING_DIR)/usr/include \ + --x-libraries=$(STAGING_DIR)/usr/lib + +define TK_WISH_SYMLINK + ln -sf /usr/bin/wish$(TK_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/wish +endef +TK_POST_INSTALL_TARGET_HOOKS += TK_WISH_SYMLINK + +$(eval $(autotools-package)) diff --git a/package/tmux/Config.in b/package/tmux/Config.in new file mode 100644 index 00000000..756f38a0 --- /dev/null +++ b/package/tmux/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_TMUX + bool "tmux" + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR # mbtowc() + depends on BR2_ENABLE_LOCALE # runtime + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_NCURSES + help + tmux is a terminal multiplexer, it enables a number of + terminals (or windows) to be accessed and controlled from a + single terminal. + + NOTE: tmux needs a working UTF-8 locale (BR2_GENERATE_LOCALE) + + https://tmux.github.io/ + +comment "tmux needs a toolchain w/ wchar, locale" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_ENABLE_LOCALE diff --git a/package/tmux/tmux.hash b/package/tmux/tmux.hash new file mode 100644 index 00000000..75538e09 --- /dev/null +++ b/package/tmux/tmux.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 918f7220447bef33a1902d4faff05317afd9db4ae1c9971bef5c787ac6c88386 tmux-3.1c.tar.gz +sha256 c031bd37f464c534277814f6aa38686fa023d094261d57fd2545ad592bb53ccd COPYING diff --git a/package/tmux/tmux.mk b/package/tmux/tmux.mk new file mode 100644 index 00000000..281b7d8e --- /dev/null +++ b/package/tmux/tmux.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# tmux +# +################################################################################ + +TMUX_VERSION = 3.1c +TMUX_SITE = https://github.com/tmux/tmux/releases/download/$(TMUX_VERSION) +TMUX_LICENSE = ISC +TMUX_LICENSE_FILES = COPYING +TMUX_CPE_ID_VENDOR = tmux_project +TMUX_DEPENDENCIES = libevent ncurses host-pkgconf + +# Add /usr/bin/tmux to /etc/shells otherwise some login tools like dropbear +# can reject the user connection. See man shells. +define TMUX_ADD_TMUX_TO_SHELLS + grep -qsE '^/usr/bin/tmux$$' $(TARGET_DIR)/etc/shells \ + || echo "/usr/bin/tmux" >> $(TARGET_DIR)/etc/shells +endef +TMUX_TARGET_FINALIZE_HOOKS += TMUX_ADD_TMUX_TO_SHELLS + +$(eval $(autotools-package)) diff --git a/package/tor/0001-Fix-static-linking-with-OpenSSL.patch b/package/tor/0001-Fix-static-linking-with-OpenSSL.patch new file mode 100644 index 00000000..8385c289 --- /dev/null +++ b/package/tor/0001-Fix-static-linking-with-OpenSSL.patch @@ -0,0 +1,94 @@ +From ba6b8ee5b6dee19493a150c3715b0e202440d206 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Thu, 24 Jan 2019 18:19:51 +0100 +Subject: [PATCH] Fix static linking with OpenSSL + +Adjust link order of libz to solve bug with static linking +and remove host paths when looking for openssl. + +[Vincent: + - Adapt the patch to make it apply on the new version.] +[Bernd: rebased for tor-0.2.7.6, 0.2.8.10, 0.2.9.9, 0.3.1.7, 0.3.2.10, + 0.3.4.8, 0.3.5.7, 0.4.4.5 & 0.4.5.6] +[Fabrice: fix detection of openssl functions in 0.3.5.8] +Signed-off-by: Vicente Olivert Riera +Signed-off-by: Bernd Kuhls +Signed-off-by: Fabrice Fontaine +--- + configure.ac | 4 ++-- + src/test/include.am | 8 ++++---- + src/tools/include.am | 4 ++-- + 4 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 05e1392cf..580befa6b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1056,7 +1056,7 @@ AC_ARG_WITH(ssl-dir, + ]) + + AC_MSG_NOTICE([Now, we'll look for OpenSSL >= 1.0.1]) +-TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $TOR_LIB_GDI $TOR_LIB_WS32 $TOR_LIB_CRYPT32], ++TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto -lz $TOR_LIB_GDI $TOR_LIB_WS32 $TOR_LIB_CRYPT32], + [#include + char *getenv(const char *);], + [struct ssl_cipher_st; +@@ -1086,7 +1086,7 @@ dnl Now check for particular openssl functions. + save_LIBS="$LIBS" + save_LDFLAGS="$LDFLAGS" + save_CPPFLAGS="$CPPFLAGS" +-LIBS="$TOR_OPENSSL_LIBS $LIBS" ++LIBS="$TOR_OPENSSL_LIBS -lz $LIBS" + LDFLAGS="$TOR_LDFLAGS_openssl $LDFLAGS" + CPPFLAGS="$TOR_CPPFLAGS_openssl $CPPFLAGS" + +diff --git a/src/test/include.am b/src/test/include.am +index ecb768957..39a622e88 100644 +--- a/src/test/include.am ++++ b/src/test/include.am +@@ -404,8 +404,8 @@ src_test_test_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ $(TOR_LDFLAGS_CRYPTLIB) + src_test_test_ntor_cl_LDADD = \ + libtor.a \ + $(rust_ldadd) \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \ +- $(TOR_LIBS_CRYPTLIB) @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_SHLWAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \ ++ @TOR_LIB_MATH@ \ ++ $(TOR_LIBS_CRYPTLIB) @TOR_ZLIB_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_SHLWAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \ + @CURVE25519_LIBS@ @TOR_LZMA_LIBS@ @TOR_TRACE_LIBS@ + src_test_test_ntor_cl_AM_CPPFLAGS = \ + $(AM_CPPFLAGS) +@@ -414,8 +414,8 @@ + src_test_test_hs_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ $(TOR_LDFLAGS_CRYPTLIB) + src_test_test_hs_ntor_cl_LDADD = \ + libtor.a \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \ +- $(TOR_LIBS_CRYPTLIB) @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_SHLWAPI@ @TOR_LIB_GDI@ \ ++ @TOR_LIB_MATH@ \ ++ $(TOR_LIBS_CRYPTLIB) @TOR_ZLIB_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_SHLWAPI@ @TOR_LIB_GDI@ \ + @CURVE25519_LIBS@ @TOR_TRACE_LIBS@ + src_test_test_hs_ntor_cl_AM_CPPFLAGS = \ + $(AM_CPPFLAGS) +diff --git a/src/tools/include.am b/src/tools/include.am +index f7aa7e0d1..4c4e8aa7a 100644 +--- a/src/tools/include.am ++++ b/src/tools/include.am +@@ -35,7 +35,7 @@ src_tools_tor_gencert_LDADD = \ + $(TOR_CRYPTO_LIBS) \ + $(TOR_UTIL_LIBS) \ + $(rust_ldadd) \ +- @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ $(TOR_LIBS_CRYPTLIB) \ ++ @TOR_LIB_MATH@ $(TOR_LIBS_CRYPTLIB) @TOR_ZLIB_LIBS@ \ + @TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_SHLWAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ @CURVE25519_LIBS@ + endif + +@@ -45,7 +45,7 @@ src_tools_tor_print_ed_signing_cert_LDADD = \ + src/trunnel/libor-trunnel.a \ + $(TOR_CRYPTO_LIBS) \ + $(TOR_UTIL_LIBS) \ +- @TOR_LIB_MATH@ $(TOR_LIBS_CRYPTLIB) \ ++ @TOR_LIB_MATH@ $(TOR_LIBS_CRYPTLIB) @TOR_ZLIB_LIBS@ \ + @TOR_LIB_WS32@ @TOR_LIB_USERENV@ @TOR_LIB_SHLWAPI@ @TOR_LIB_GDI@ + + if USE_NSS +-- +2.20.1 diff --git a/package/tor/Config.in b/package/tor/Config.in new file mode 100644 index 00000000..52009267 --- /dev/null +++ b/package/tor/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_TOR + bool "tor" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + Tor is free software and an open network that helps you + defend against traffic analysis, a form of network + surveillance that threatens personal freedom and privacy, + confidential business activities and relationships, and + state security. + + https://www.torproject.org + +comment "tor needs a toolchain w/ NPTL" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL diff --git a/package/tor/tor.hash b/package/tor/tor.hash new file mode 100644 index 00000000..8622281c --- /dev/null +++ b/package/tor/tor.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 f304e456102ed26c39e5f16ece2115585398cdb4e67455139c86ea43cdf70856 tor-0.4.5.9.tar.gz +sha256 47b54ed17e8fdcab3c44729a1789a09b208f9a63a845a7e50def9df729eebad0 LICENSE diff --git a/package/tor/tor.mk b/package/tor/tor.mk new file mode 100644 index 00000000..f6aeba2d --- /dev/null +++ b/package/tor/tor.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# tor +# +################################################################################ + +TOR_VERSION = 0.4.5.9 +TOR_SITE = https://dist.torproject.org +TOR_LICENSE = BSD-3-Clause +TOR_LICENSE_FILES = LICENSE +TOR_CPE_ID_VENDOR = torproject +TOR_SELINUX_MODULES = tor +TOR_DEPENDENCIES = libevent openssl zlib +TOR_AUTORECONF = YES + +TOR_CONF_OPTS = \ + --disable-gcc-hardening \ + --disable-unittests \ + --with-libevent-dir=$(STAGING_DIR)/usr \ + --with-openssl-dir=$(STAGING_DIR)/usr \ + --with-zlib-dir=$(STAGING_DIR)/usr + +ifeq ($(BR2_STATIC_LIBS),y) +TOR_CONF_OPTS += \ + --enable-static-libevent \ + --enable-static-openssl \ + --enable-static-tor \ + --enable-static-zlib +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +TOR_DEPENDENCIES += libcap +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +TOR_CONF_OPTS += --enable-systemd +TOR_DEPENDENCIES += host-pkgconf systemd +else +TOR_CONF_OPTS += --disable-systemd +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +TOR_CONF_OPTS += --enable-lzma +TOR_DEPENDENCIES += host-pkgconf xz +else +TOR_CONF_OPTS += --disable-lzma +endif + +ifeq ($(BR2_PACKAGE_ZSTD),y) +TOR_CONF_OPTS += --enable-zstd +TOR_DEPENDENCIES += host-pkgconf zstd +else +TOR_CONF_OPTS += --disable-zstd +endif + +ifeq ($(BR2_arm)$(BR2_armeb)$(BR2_i386)$(BR2_x86_64)$(BR2_PACKAGE_LIBSECCOMP),yy) +TOR_CONF_OPTS += --enable-seccomp +TOR_DEPENDENCIES += libseccomp +else +TOR_CONF_OPTS += --disable-seccomp +endif + +# uses gnu extensions +TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +TOR_CONF_ENV += LIBS=-latomic +endif + +define TOR_INSTALL_CONF + $(INSTALL) -D -m 644 $(@D)/src/config/torrc.minimal \ + $(TARGET_DIR)/etc/tor/torrc +endef + +TOR_POST_INSTALL_TARGET_HOOKS += TOR_INSTALL_CONF + +$(eval $(autotools-package)) diff --git a/package/tovid/0001-manpage.patch b/package/tovid/0001-manpage.patch new file mode 100644 index 00000000..21669c9d --- /dev/null +++ b/package/tovid/0001-manpage.patch @@ -0,0 +1,25 @@ +setup.py: disable man page to kill txt2tags SVN checkout dependency + +Signed-off-by: Steve Kenton + ++diff -pruN tovid-3534.ori/setup.py tovid-3534/setup.py +--- tovid-3534.ori/setup.py 2013-04-14 09:52:08.000000000 -0500 ++++ tovid-3534/setup.py 2015-03-21 09:39:14.880173176 -0500 +@@ -186,7 +186,7 @@ class BuildTovidInit (Command): + + # Build tovid-init with regular 'build' command + build.sub_commands.append(('build_tovid_init', None)) +-build.sub_commands.append(('build_docs', None)) ++#build.sub_commands.append(('build_docs', None)) + + # The actual setup + setup( +@@ -244,8 +244,6 @@ setup( + 'src/tovid.ini', + ]), + # Manual page +- ('share/man/man1', +- ['docs/man/tovid.1']), + # Desktop shortcut + ('share/applications', + ['tovidgui.desktop', diff --git a/package/tovid/Config.in b/package/tovid/Config.in new file mode 100644 index 00000000..f972e188 --- /dev/null +++ b/package/tovid/Config.in @@ -0,0 +1,50 @@ +config BR2_PACKAGE_TOVID + bool "tovid" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # mpv + depends on BR2_TOOLCHAIN_HAS_ATOMIC # mpv + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # mpv + depends on !BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC # mpv + # The below dependencies are runtime dependencies only + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # procps_ng + select BR2_PACKAGE_DVDAUTHOR + select BR2_PACKAGE_DVDRW_TOOLS + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_IMAGEMAGICK + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_MJPEGTOOLS + select BR2_PACKAGE_MPV + select BR2_PACKAGE_PROCPS_NG # pgrep and pkill + select BR2_PACKAGE_SOX + help + The tovid suite, also known simply as tovid, is a collection + of shell and Python scripts for creating DVDs and + (S)VCDs. It is pronounced "to vid" (because it converts to + video disc formats). + + http://tovid.wikia.com/wiki/Installing_tovid + +comment "tovid needs a toolchain w/ threads, C++, wchar, gcc >= 4.9" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \ + || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_USE_WCHAR + depends on !BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC + +comment "tovid depends on python or python3" + depends on !BR2_PACKAGE_PYTHON && !BR2_PACKAGE_PYTHON3 + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + depends on !BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC diff --git a/package/tovid/tovid.hash b/package/tovid/tovid.hash new file mode 100644 index 00000000..89d0461a --- /dev/null +++ b/package/tovid/tovid.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 c03a746a3592a656bab0be4045da114a4231eb0f858d6c18503dac64049fbe48 tovid-87c676f4aadb7303d2cd921380b054bafa4b85bb.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/tovid/tovid.mk b/package/tovid/tovid.mk new file mode 100644 index 00000000..4c5c60aa --- /dev/null +++ b/package/tovid/tovid.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# tovid +# +################################################################################ + +TOVID_VERSION = 87c676f4aadb7303d2cd921380b054bafa4b85bb +TOVID_SITE = $(call github,tovid-suite,tovid,$(TOVID_VERSION)) +TOVID_LICENSE = GPL-2.0+ +TOVID_LICENSE_FILES = COPYING +TOVID_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/tpm-tools/Config.in b/package/tpm-tools/Config.in new file mode 100644 index 00000000..ca70adc8 --- /dev/null +++ b/package/tpm-tools/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_TPM_TOOLS + bool "tpm-tools" + depends on BR2_TOOLCHAIN_HAS_THREADS # trousers + depends on !BR2_STATIC_LIBS # trousers + select BR2_PACKAGE_TROUSERS + select BR2_PACKAGE_OPENSSL + help + Tools to manage and diagnose a TPM + + http://trousers.sourceforge.net/ + +comment "tpm-tools needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/tpm-tools/tpm-tools.hash b/package/tpm-tools/tpm-tools.hash new file mode 100644 index 00000000..a2da230a --- /dev/null +++ b/package/tpm-tools/tpm-tools.hash @@ -0,0 +1,7 @@ +# http://sourceforge.net/projects/trousers/files/tpm-tools/1.3.9.1/ +sha1 c35cb031c6b5220dd1c8a03995654fdd12aa3031 tpm-tools-1.3.9.1.tar.gz +md5 1532293aa632a0eaa7e60df87c779855 tpm-tools-1.3.9.1.tar.gz + +# Locally calculated +sha256 9cb714e2650826e2e932f65bc0ba9d61b927dc5fea47f2c2a2b64f0fdfcbfa68 tpm-tools-1.3.9.1.tar.gz +sha256 7b47225a5b77cb7825efc6a4d7e0ac57864c790542cf92f5080ec2bf310c00e5 LICENSE diff --git a/package/tpm-tools/tpm-tools.mk b/package/tpm-tools/tpm-tools.mk new file mode 100644 index 00000000..623e06fb --- /dev/null +++ b/package/tpm-tools/tpm-tools.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# tpm-tools +# +################################################################################ + +TPM_TOOLS_VERSION = 1.3.9.1 +TPM_TOOLS_SITE = http://downloads.sourceforge.net/project/trousers/tpm-tools/$(TPM_TOOLS_VERSION) +TPM_TOOLS_LICENSE = Common Public License Version 1.0 +TPM_TOOLS_LICENSE_FILES = LICENSE +TPM_TOOLS_DEPENDENCIES = trousers openssl $(TARGET_NLS_DEPENDENCIES) + +TPM_TOOLS_CONF_OPTS = --disable-pkcs11-support + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +TPM_TOOLS_CONF_ENV += LIBS='-liconv' +endif + +ifeq ($(BR2_arc770d)$(BR2_arc750d),y) +TPM_TOOLS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mno-compact-casesi" +endif + +$(eval $(autotools-package)) diff --git a/package/tpm2-abrmd/Config.in b/package/tpm2-abrmd/Config.in new file mode 100644 index 00000000..0c60db80 --- /dev/null +++ b/package/tpm2-abrmd/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_TPM2_ABRMD + bool "tpm2-abrmd" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS # tpm2-tss + depends on !BR2_STATIC_LIBS # tpm2-tss + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_TPM2_TSS + help + A system daemon implementing the TPM2 access broker (TAB) & + Resource Manager (RM) spec from the TCG. It should be started + during the OS boot process. Communication between the daemon + and clients using the TPM is done with a combination of DBus + and Unix pipes. + + The package also provides a client library for interacting + with the daemon via TPM Command Transmission Interface (TCTI). + It is intended for use with the SAPI library (libtss2-sys) + like any other TCTI. + + https://github.com/tpm2-software/tpm2-abrmd + +comment "tpm2-abrmd needs a toolchain w/ dynamic library, wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/tpm2-abrmd/S80tpm2-abrmd b/package/tpm2-abrmd/S80tpm2-abrmd new file mode 100644 index 00000000..6a0bef0a --- /dev/null +++ b/package/tpm2-abrmd/S80tpm2-abrmd @@ -0,0 +1,74 @@ +#!/bin/sh + +my_name="$0" + +check_required_files() { + [ -f "$1" ] || { + echo "$my_name: $1 is missing" + exit 1 + } +} + +check_device() { + ls -1 /dev/tpm[0-9]* > /dev/null 2>&1 || { + echo "device driver not loaded, skipping." + exit 0 + } + chown tss:tss /dev/tpm[0-9]* && chmod 600 /dev/tpm* +} + +rm_stale_pidfile() { + if [ -e "$1" ]; then + exe="/proc/$(cat "$1")/exe" + { [ -s "$exe" ] && [ "$(readlink -f "$exe")" = "$2" ]; } || rm -f "$1" + fi +} + +start() { + printf "Starting tpm2-abrmd: " + check_device + rm_stale_pidfile /var/run/tpm2-abrmd.pid /usr/sbin/tpm2-abrmd + start-stop-daemon -S -q -o -b -m -p /var/run/tpm2-abrmd.pid -c tss:tss -x /usr/sbin/tpm2-abrmd -- ${DAEMON_OPTS} || { + echo "FAIL" + exit 1 + } + pidof /usr/sbin/tpm2-abrmd > /var/run/tpm2-abrmd.pid + echo "OK" +} + +stop() { + printf "Stopping tpm2-abrmd: " + start-stop-daemon -K -q -o -p /var/run/tpm2-abrmd.pid -u tss -x /usr/sbin/tpm2-abrmd || { + echo "FAIL" + exit 1 + } + rm_stale_pidfile /var/run/tpm2-abrmd.pid /usr/sbin/tpm2-abrmd + echo "OK" +} + +check_required_files /etc/dbus-1/system.d/tpm2-abrmd.conf + +# defaults +DAEMON_OPTS="--tcti=device --logger=syslog --max-connections=20" + +# Read configuration variable file if it is present +[ -r /etc/default/tpm2-abrmd ] && . /etc/default/tpm2-abrmd + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + sleep 1 + start + ;; + *) + echo "Usage: tpm2-abrmd {start|stop|restart|reload}" >&2 + exit 1 +esac + +exit 0 diff --git a/package/tpm2-abrmd/tpm2-abrmd.hash b/package/tpm2-abrmd/tpm2-abrmd.hash new file mode 100644 index 00000000..1c6e7390 --- /dev/null +++ b/package/tpm2-abrmd/tpm2-abrmd.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 1e587808c6739079d59f124d9c1a0058f8d34dd84f1f656c946667fa0a181c48 tpm2-abrmd-2.3.3.tar.gz +sha256 18c1bf4b1ba1fb2c4ffa7398c234d83c0d55475298e470ae1e5e3a8a8bd2e448 LICENSE diff --git a/package/tpm2-abrmd/tpm2-abrmd.mk b/package/tpm2-abrmd/tpm2-abrmd.mk new file mode 100644 index 00000000..0584ba92 --- /dev/null +++ b/package/tpm2-abrmd/tpm2-abrmd.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# tpm2-abrmd +# +################################################################################ + +TPM2_ABRMD_VERSION = 2.3.3 +TPM2_ABRMD_SITE = https://github.com/tpm2-software/tpm2-abrmd/releases/download/$(TPM2_ABRMD_VERSION) +TPM2_ABRMD_LICENSE = BSD-2-Clause +TPM2_ABRMD_LICENSE_FILES = LICENSE +TPM2_ABRMD_INSTALL_STAGING = YES +TPM2_ABRMD_DEPENDENCIES = libglib2 tpm2-tss host-pkgconf +TPM2_ABRMD_CONF_OPTS = \ + --disable-defaultflags \ + --with-systemdsystemunitdir=$(if $(BR2_INIT_SYSTEMD),/usr/lib/systemd/system,no) \ + --with-udevrulesdir=$(if $(BR2_PACKAGE_HAS_UDEV),/usr/lib/udev/rules.d,no) + +# uses C99 code but forgets to pass -std=c99 when --disable-defaultflags is used +TPM2_ABRMD_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=c99" + +define TPM2_ABRMD_INSTALL_INIT_SYSTEMD + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) \ + install-systemdpresetDATA install-systemdsystemunitDATA +endef + +define TPM2_ABRMD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 $(TPM2_ABRMD_PKGDIR)/S80tpm2-abrmd \ + $(TARGET_DIR)/etc/init.d/S80tpm2-abrmd +endef + +define TPM2_ABRMD_USERS + tss -1 tss -1 * - - - TPM2 Access Broker & Resource Management daemon +endef + +$(eval $(autotools-package)) diff --git a/package/tpm2-pkcs11/Config.in b/package/tpm2-pkcs11/Config.in new file mode 100644 index 00000000..ec82d72a --- /dev/null +++ b/package/tpm2-pkcs11/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_TPM2_PKCS11 + bool "tpm2-pkcs11" + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS # tpm2-tss + depends on !BR2_STATIC_LIBS # tpm2-tss + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBYAML + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_TPM2_TSS + help + A PKCS#11 interface for TPM2 hardware + + https://github.com/tpm2-software/tpm2-pkcs11 + +comment "tpm2-pkcs11 needs a toolchain w/ dynamic library, threads" + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/tpm2-pkcs11/tpm2-pkcs11.hash b/package/tpm2-pkcs11/tpm2-pkcs11.hash new file mode 100644 index 00000000..16dd9166 --- /dev/null +++ b/package/tpm2-pkcs11/tpm2-pkcs11.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 13425c34358ec798d333743099b9aec5e42f6a4653c4c0e40eb075681f369687 tpm2-pkcs11-1.5.0.tar.gz +sha256 793aa007f793458434d7cc60b1c827053a399308658b32fcaa6023802adc22e1 LICENSE diff --git a/package/tpm2-pkcs11/tpm2-pkcs11.mk b/package/tpm2-pkcs11/tpm2-pkcs11.mk new file mode 100644 index 00000000..3acce077 --- /dev/null +++ b/package/tpm2-pkcs11/tpm2-pkcs11.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# tpm2-pkcs11 +# +################################################################################ + +TPM2_PKCS11_VERSION = 1.5.0 +TPM2_PKCS11_SITE = https://github.com/tpm2-software/tpm2-pkcs11/releases/download/$(TPM2_PKCS11_VERSION) +TPM2_PKCS11_LICENSE = BSD-2-Clause +TPM2_PKCS11_LICENSE_FILES = LICENSE +TPM2_PKCS11_DEPENDENCIES = host-pkgconf libyaml openssl sqlite tpm2-tss + +TPM2_PKCS11_CONF_OPTS += \ + --disable-hardening + +# Fix tpm.c:746:5: error: 'for' loop initial declarations are only allowed in C99 mode +# Fix implicit declaration of function 'strnlen' +TPM2_PKCS11_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu99" + +# do not build man pages +TPM2_PKCS11_CONF_ENV += ac_cv_prog_PANDOC='' + +# tpm2-pkcs11 checks for tpm2-tools programs and errors out if not +# found, even though they are only used by the (unused in Buildroot) +# python-based tools +TPM2_PKCS11_CONF_ENV += \ + ac_cv_prog_tpm2_createprimary=yes \ + ac_cv_prog_tpm2_create=yes \ + ac_cv_prog_tpm2_evictcontrol=yes \ + ac_cv_prog_tpm2_readpublic=yes \ + ac_cv_prog_tpm2_load=yes \ + ac_cv_prog_tpm2_loadexternal=yes \ + ac_cv_prog_tpm2_unseal=yes \ + ac_cv_prog_tpm2_encryptdecrypt=yes \ + ac_cv_prog_tpm2_sign=yes \ + ac_cv_prog_tpm2_getcap=yes \ + ac_cv_prog_tpm2_import=yes \ + ac_cv_prog_tpm2_changeauth=yes + +ifeq ($(BR2_PACKAGE_P11_KIT),y) +TPM2_PKCS11_DEPENDENCIES += p11-kit +TPM2_PKCS11_CONF_OPTS += \ + --with-p11kitconfigdir=/usr/share/p11-kit/modules +endif + +$(eval $(autotools-package)) diff --git a/package/tpm2-tools/0001-tpm2_import-fix-fixed-AES-key-CVE-2021-3565.patch b/package/tpm2-tools/0001-tpm2_import-fix-fixed-AES-key-CVE-2021-3565.patch new file mode 100644 index 00000000..c0a43325 --- /dev/null +++ b/package/tpm2-tools/0001-tpm2_import-fix-fixed-AES-key-CVE-2021-3565.patch @@ -0,0 +1,47 @@ +From c069e4f179d5e6653a84fb236816c375dca82515 Mon Sep 17 00:00:00 2001 +From: William Roberts +Date: Fri, 21 May 2021 12:22:31 -0500 +Subject: [PATCH] tpm2_import: fix fixed AES key CVE-2021-3565 + +tpm2_import used a fixed AES key for the inner wrapper, which means that +a MITM attack would be able to unwrap the imported key. Even the +use of an encrypted session will not prevent this. The TPM only +encrypts the first parameter which is the fixed symmetric key. + +To fix this, ensure the key size is 16 bytes or bigger and use +OpenSSL to generate a secure random AES key. + +Fixes: #2738 + +Signed-off-by: William Roberts +Signed-off-by: Peter Korsgaard +--- + tools/tpm2_import.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/tools/tpm2_import.c b/tools/tpm2_import.c +index cfb6f207..f44326c8 100644 +--- a/tools/tpm2_import.c ++++ b/tools/tpm2_import.c +@@ -118,7 +118,17 @@ static tool_rc key_import(ESYS_CONTEXT *ectx, TPM2B_PUBLIC *parent_pub, + TPM2B_DATA enc_sensitive_key = { + .size = parent_pub->publicArea.parameters.rsaDetail.symmetric.keyBits.sym / 8 + }; +- memset(enc_sensitive_key.buffer, 0xFF, enc_sensitive_key.size); ++ ++ if(enc_sensitive_key.size < 16) { ++ LOG_ERR("Calculated wrapping keysize is less than 16 bytes, got: %u", enc_sensitive_key.size); ++ return tool_rc_general_error; ++ } ++ ++ int ossl_rc = RAND_bytes(enc_sensitive_key.buffer, enc_sensitive_key.size); ++ if (ossl_rc != 1) { ++ LOG_ERR("RAND_bytes failed: %s", ERR_error_string(ERR_get_error(), NULL)); ++ return tool_rc_general_error; ++ } + + /* + * Calculate the object name. +-- +2.20.1 + diff --git a/package/tpm2-tools/Config.in b/package/tpm2-tools/Config.in new file mode 100644 index 00000000..642bd9e4 --- /dev/null +++ b/package/tpm2-tools/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_TPM2_TOOLS + bool "tpm2-tools" + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS # tpm2-tss + depends on !BR2_STATIC_LIBS # tpm2-tss + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_TPM2_TSS + help + TPM (Trusted Platform Module) 2.0 CLI tools based on system + API of TPM2-TSS. These tools can be used to manage keys, + perform encryption/decryption/signing/etc crypto operations, + and manage non-volatile storage through a TPM2.0 HW + implementation. + + Notice: An in-kernel resource manager is provided by the + Linux kernel since 4.12. Depending on use cases and kernel + version, the user space resource manager provided by + tpm2-abrmd may be needed. + + https://github.com/tpm2-software/tpm2-tools + +comment "tpm2-tools needs a toolchain w/ dynamic library" + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS diff --git a/package/tpm2-tools/tpm2-tools.hash b/package/tpm2-tools/tpm2-tools.hash new file mode 100644 index 00000000..dd558348 --- /dev/null +++ b/package/tpm2-tools/tpm2-tools.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 175472b63d1e047c2ad38314d06c36bd734ae37e0c6abfa2a804c0d6eb3f2936 tpm2-tools-4.1.2.tar.gz +sha256 e10dce74279166bf7bc463eb6e462c2025bceb3e50cadfe865d92c1c3dc0bb21 LICENSE diff --git a/package/tpm2-tools/tpm2-tools.mk b/package/tpm2-tools/tpm2-tools.mk new file mode 100644 index 00000000..8fd912a1 --- /dev/null +++ b/package/tpm2-tools/tpm2-tools.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# tpm2-tools +# +################################################################################ + +TPM2_TOOLS_VERSION = 4.1.2 +TPM2_TOOLS_SITE = https://github.com/tpm2-software/tpm2-tools/releases/download/$(TPM2_TOOLS_VERSION) +TPM2_TOOLS_LICENSE = BSD-3-Clause +TPM2_TOOLS_LICENSE_FILES = LICENSE +TPM2_TOOLS_CPE_ID_VENDOR = tpm2-tools_project +TPM2_TOOLS_DEPENDENCIES = libcurl openssl tpm2-tss host-pkgconf + +# -fstack-protector-all and FORTIFY_SOURCE=2 is used by +# default. Disable that so the BR2_SSP_* / BR2_FORTIFY_SOURCE_* options +# in the toolchain wrapper and CFLAGS are used instead +TPM2_TOOLS_CONF_OPTS = --disable-hardening + +# do not build man pages +TPM2_TOOLS_CONF_ENV += ac_cv_prog_PANDOC='' + +$(eval $(autotools-package)) diff --git a/package/tpm2-totp/Config.in b/package/tpm2-totp/Config.in new file mode 100644 index 00000000..7f274fa1 --- /dev/null +++ b/package/tpm2-totp/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_TPM2_TOTP + bool "tpm2-totp" + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS # tpm2-tss + depends on !BR2_STATIC_LIBS # tpm2-tss + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM # glibc < 2.20 + select BR2_PACKAGE_LIBQRENCODE + select BR2_PACKAGE_TPM2_TSS + help + This is a reimplementation of Matthew Garrett's tpmtotp + software for TPM 2.0 using the tpm2-tss software stack. Its + purpose is to attest the trustworthiness of a device against + a human using time-based one-time passwords (TOTP), + facilitating the Trusted Platform Module (TPM) to bind the + TOTP secret to the known trustworthy system state. In + addition to the original tpmtotp, given the new capabilities + of in-TPM hmac calculation, the tpm2-totp's secret HMAC keys + do not have to be exported from the TPM to the CPU's RAM on + boot anymore. + + https://github.com/tpm2-software/tpm2-totp + +comment "tpm2-totp needs a toolchain w/ dynamic library" + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM diff --git a/package/tpm2-totp/tpm2-totp.hash b/package/tpm2-totp/tpm2-totp.hash new file mode 100644 index 00000000..a3fcb394 --- /dev/null +++ b/package/tpm2-totp/tpm2-totp.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 0b2b63cc7ea74f5a6952f2cd689896c08f6b94ee6865f48af609f9a8ac247dc1 tpm2-totp-0.2.1.tar.gz +sha256 67bc21a0bff2b0890307cfaa883bd3f5337f461eb6d8a612a015cea6d704e9ed LICENSE diff --git a/package/tpm2-totp/tpm2-totp.mk b/package/tpm2-totp/tpm2-totp.mk new file mode 100644 index 00000000..250a016a --- /dev/null +++ b/package/tpm2-totp/tpm2-totp.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# tpm2-totp +# +################################################################################ + +TPM2_TOTP_VERSION = 0.2.1 +TPM2_TOTP_SITE = https://github.com/tpm2-software/tpm2-totp/releases/download/v$(TPM2_TOTP_VERSION) +TPM2_TOTP_LICENSE = BSD-3-Clause +TPM2_TOTP_LICENSE_FILES = LICENSE +TPM2_TOTP_DEPENDENCIES = libqrencode tpm2-tss host-pkgconf +TPM2_TOTP_CONF_OPTS = \ + --disable-defaultflags \ + --disable-doxygen-doc \ + --disable-plymouth \ + --without-initramfstoolsdir \ + --without-mkinitcpiodir + +# uses C99 code but forgets to pass -std=c99 when --disable-defaultflags is used +TPM2_TOTP_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=c99" + +# do not build man pages +TPM2_TOTP_CONF_ENV += ac_cv_path_PANDOC='' + +$(eval $(autotools-package)) diff --git a/package/tpm2-tss/0001-Temporary-fix-for-build-without-C.patch b/package/tpm2-tss/0001-Temporary-fix-for-build-without-C.patch new file mode 100644 index 00000000..812c753f --- /dev/null +++ b/package/tpm2-tss/0001-Temporary-fix-for-build-without-C.patch @@ -0,0 +1,44 @@ +From 7dc753ad27a8cd14c9b00be94ca89b847cf05ce9 Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Mon, 23 Dec 2019 08:02:19 -0300 +Subject: [PATCH] Temporary fix for build without C++ + +C++ is required only for the fuzzing tests but AC_PROG_CXX is included +by configure.ac even when fuzzing is not enabled (which we don't do on +Buildroot). + +The patch applied upstream had issues and was reverted[1]. Use a local +patch to solve the problem temporaryly. + +Fixes: + http://autobuild.buildroot.net/results/13f5e37b47b255da4158bec34e5459136f7e60d4 + http://autobuild.buildroot.net/results/1c26db2509c79e00c0de1165945277eaa57b149f + http://autobuild.buildroot.net/results/b7b6b7b7aca79e847b442cbd2305427d91fe5d70 + http://autobuild.buildroot.net/results/1cd5a82a0e799aa5027e2e2c03b246332cc3a15d + http://autobuild.buildroot.net/results/d7ec878907f714377c83e9a496e97cbf9382d787 + http://autobuild.buildroot.net/results/1c7f0c1b3ce4871cd87bd6059b1f0a6dc4e74a9c + http://autobuild.buildroot.net/results/196b81d580325607c8da90beeb79e1f6b8ab8b47 + http://autobuild.buildroot.net/results/f90f7b4ac710b56686635f8ae27059c11b963e47 + +1. https://github.com/tpm2-software/tpm2-tss/commit/60c26e4c4faba6ba12469485653e17092b510840 + +Signed-off-by: Carlos Santos +--- + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index ff59dd7c..3e4028fb 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -26,7 +26,6 @@ AX_IS_RELEASE(dash-version) + AX_CHECK_ENABLE_DEBUG([info]) + + AC_PROG_CC +-AC_PROG_CXX + AC_PROG_LN_S + AC_USE_SYSTEM_EXTENSIONS + LT_INIT() +-- +2.26.2 + diff --git a/package/tpm2-tss/Config.in b/package/tpm2-tss/Config.in new file mode 100644 index 00000000..b1ab00dd --- /dev/null +++ b/package/tpm2-tss/Config.in @@ -0,0 +1,60 @@ +config BR2_PACKAGE_TPM2_TSS + bool "tpm2-tss" + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS + select BR2_PACKAGE_LIBURIPARSER + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL + help + OSS implementation of the Trusted Computing Group's (TCG) TPM2 + Software Stack (TSS). This stack consists of the following + layers from top to bottom: + + * System API (SAPI) as described in the system level API and + TPM command transmission interface specification. This API + is a 1-to-1 mapping of the TPM2 commands documented in Part + 3 of the TPM2 specification. Additionally there are + asynchronous versions of each command. These asynchronous + variants may be useful for integration into event-driven + programming environments. Both the synchronous and + asynchronous API are exposed through a single library: + libtss2-sys. + + * TPM Command Transmission Interface (TCTI) that is described + in the same specification. This API provides a standard + interface to transmit / receive TPM command / response + buffers. It is expected that any number of libraries + implementing the TCTI API will be implemented as a way to + abstract various platform specific IPC mechanisms. Currently + this repository provides two TCTI implementations: + libtss2-tcti-device and libtss2-tcti-mssim. The prior should + be used for direct access to the TPM through the Linux + kernel driver. The later implements the protocol exposed by + the Microsoft software TPM2 simulator. + + https://github.com/tpm2-software/tpm2-tss + +if BR2_PACKAGE_TPM2_TSS + +config BR2_PACKAGE_TPM2_TSS_FAPI + bool "fapi support" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c + select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBCURL + help + This option allows to enable Feature API (FAPI). Feature + API (FAPI) as described in the "TSS 2.0 Feature API + Specification" along with "TSS 2.0 JSON Data Types and + Policy Language Specification" This API is designed to be + very high-level API, intended to make programming with the + TPM as simple as possible. The API functions are exposed + through a single library: libtss2-fapi. + + https://trustedcomputinggroup.org/wp-content/uploads/TSS_FAPI_v0.94_r04_pubrev.pdf + https://trustedcomputinggroup.org/wp-content/uploads/TSS_JSON_Policy_v0.7_r04_pubrev.pdf + +endif + +comment "tpm2-tss needs a toolchain w/ dynamic library" + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS diff --git a/package/tpm2-tss/tpm2-tss.hash b/package/tpm2-tss/tpm2-tss.hash new file mode 100644 index 00000000..6856fd4f --- /dev/null +++ b/package/tpm2-tss/tpm2-tss.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 78392be7309baf47f51b122f566ac915fd4d1760ea78571cba2e1484f9b5be17 tpm2-tss-3.0.3.tar.gz +sha256 18c1bf4b1ba1fb2c4ffa7398c234d83c0d55475298e470ae1e5e3a8a8bd2e448 LICENSE diff --git a/package/tpm2-tss/tpm2-tss.mk b/package/tpm2-tss/tpm2-tss.mk new file mode 100644 index 00000000..9ffbef2f --- /dev/null +++ b/package/tpm2-tss/tpm2-tss.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# tpm2-tss +# +################################################################################ + +TPM2_TSS_VERSION = 3.0.3 +TPM2_TSS_SITE = https://github.com/tpm2-software/tpm2-tss/releases/download/$(TPM2_TSS_VERSION) +TPM2_TSS_LICENSE = BSD-2-Clause +TPM2_TSS_LICENSE_FILES = LICENSE +TPM2_TSS_CPE_ID_VENDOR = tpm2_software_stack_project +TPM2_TSS_CPE_ID_PRODUCT = tpm2_software_stack +TPM2_TSS_INSTALL_STAGING = YES +TPM2_TSS_DEPENDENCIES = liburiparser openssl host-pkgconf +TPM2_TSS_CONF_OPTS = --with-crypto=ossl --disable-doxygen-doc --disable-defaultflags +# 0001-configure-Only-use-CXX-when-fuzzing.patch +TPM2_TSS_AUTORECONF = YES + +# uses C99 code but forgets to pass -std=c99 when --disable-defaultflags is used +TPM2_TSS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=c99" + +ifeq ($(BR2_PACKAGE_TPM2_TSS_FAPI),y) +TPM2_TSS_DEPENDENCIES += json-c libcurl +TPM2_TSS_CONF_OPTS += --enable-fapi +else +TPM2_TSS_CONF_OPTS += --disable-fapi +endif + +$(eval $(autotools-package)) diff --git a/package/trace-cmd/0001-trace-cmd-libtracecmd-API-cleanup.patch b/package/trace-cmd/0001-trace-cmd-libtracecmd-API-cleanup.patch new file mode 100644 index 00000000..a0dee210 --- /dev/null +++ b/package/trace-cmd/0001-trace-cmd-libtracecmd-API-cleanup.patch @@ -0,0 +1,1486 @@ +From 4b6e124d8b5a0dfd21aedf21d2c347fc5f0705a2 Mon Sep 17 00:00:00 2001 +From: "Tzvetomir Stoyanov (VMware)" +Date: Thu, 12 Nov 2020 13:52:08 +0200 +Subject: [PATCH] trace-cmd: libtracecmd API cleanup + +The tracecmd library is used by trace-cmd and KernelShark applications. +All APIs, that are not used by KernelShark are removed from trace-cmd.h. +This is the first step to cleanup the library APIs and dependencies. + +Link: https://lore.kernel.org/linux-trace-devel/20201112115208.1250789-3-tz.stoyanov@gmail.com + +Signed-off-by: Tzvetomir Stoyanov (VMware) +Signed-off-by: Steven Rostedt (VMware) +[Retrieved from: +https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?id=4b6e124d8b5a0dfd21aedf21d2c347fc5f0705a2] +Signed-off-by: Fabrice Fontaine +--- + Makefile | 2 +- + include/trace-cmd/trace-cmd.h | 488 +----------------- + include/trace-cmd/trace-filter-hash.h | 64 --- + include/trace-cmd/trace-hash.h | 55 -- + include/trace-cmd/trace-msg.h | 15 - + .../include/private/trace-cmd-private.h | 480 +++++++++++++++++ + .../include/private/trace-filter-hash.h | 64 +++ + lib/trace-cmd/include/private/trace-hash.h | 55 ++ + lib/trace-cmd/include/private/trace-msg.h | 15 + + lib/trace-cmd/include/trace-cmd-local.h | 2 + + lib/trace-cmd/trace-ftrace.c | 2 +- + lib/trace-cmd/trace-hooks.c | 2 +- + lib/trace-cmd/trace-recorder.c | 2 +- + lib/trace-cmd/trace-timesync.c | 2 +- + lib/trace-cmd/trace-util.c | 2 +- + lib/traceevent/plugins/plugin_python_loader.c | 3 +- + python/ctracecmd.i | 1 + + tracecmd/include/trace-local.h | 2 +- + 18 files changed, 637 insertions(+), 619 deletions(-) + delete mode 100644 include/trace-cmd/trace-filter-hash.h + delete mode 100644 include/trace-cmd/trace-hash.h + delete mode 100644 include/trace-cmd/trace-msg.h + create mode 100644 lib/trace-cmd/include/private/trace-cmd-private.h + create mode 100644 lib/trace-cmd/include/private/trace-filter-hash.h + create mode 100644 lib/trace-cmd/include/private/trace-hash.h + create mode 100644 lib/trace-cmd/include/private/trace-msg.h + +diff --git a/Makefile b/Makefile +index b034042..6ef6936 100644 +--- a/Makefile ++++ b/Makefile +@@ -224,6 +224,7 @@ INCLUDES += -I$(src)/include/trace-cmd + INCLUDES += -I$(src)/include/tracefs + INCLUDES += -I$(src)/lib/traceevent/include + INCLUDES += -I$(src)/lib/trace-cmd/include ++INCLUDES += -I$(src)/lib/trace-cmd/include/private + INCLUDES += -I$(src)/lib/tracefs/include + INCLUDES += -I$(src)/tracecmd/include + INCLUDES += -I$(obj)/tracecmd/include +@@ -417,7 +418,6 @@ install_libs: libs + $(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ)/traceevent) + $(Q)$(call do_install,$(src)/include/traceevent/trace-seq.h,$(includedir_SQ)/traceevent) + $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd) +- $(Q)$(call do_install,$(src)/include/trace-cmd/trace-filter-hash.h,$(includedir_SQ)/trace-cmd) + $(Q)$(call do_install,$(src)/include/tracefs/tracefs.h,$(includedir_SQ)/tracefs) + $(Q)$(call do_install_ld,$(TRACE_LD_FILE),$(LD_SO_CONF_DIR),$(libdir_SQ)/trace-cmd) + $(Q)$(call do_install_ld,$(TRACE_LD_FILE),$(LD_SO_CONF_DIR),$(libdir_SQ)/traceevent) +diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h +index 3c2b474..9751ac3 100644 +--- a/include/trace-cmd/trace-cmd.h ++++ b/include/trace-cmd/trace-cmd.h +@@ -9,497 +9,31 @@ + #include "traceevent/event-parse.h" + #include "tracefs/tracefs.h" + +-#define TRACECMD_MAGIC { 23, 8, 68 } +- +-#define ARRAY_SIZE(_a) (sizeof(_a) / sizeof((_a)[0])) +-#define __weak __attribute__((weak)) +-#define __noreturn __attribute__((noreturn)) +- +-#define TRACECMD_ERR_MSK ((unsigned long)(-1) & ~((1UL << 14) - 1)) +-#define TRACECMD_ISERR(ptr) ((unsigned long)(ptr) > TRACECMD_ERR_MSK) +-#define TRACECMD_ERROR(ret) ((void *)((unsigned long)(ret) | TRACECMD_ERR_MSK)) +-#define TRACECMD_PTR2ERR(ptr) ((unisgned long)(ptr) & ~TRACECMD_ERR_MSK) +- +-void tracecmd_parse_cmdlines(struct tep_handle *pevent, char *file, int size); +-void tracecmd_parse_proc_kallsyms(struct tep_handle *pevent, char *file, unsigned int size); +-void tracecmd_parse_ftrace_printk(struct tep_handle *pevent, char *file, unsigned int size); +-struct tep_plugin_list *trace_load_plugins(struct tep_handle *tep); +- +-int *tracecmd_add_id(int *list, int id, int len); +- +-enum { +- RINGBUF_TYPE_PADDING = 29, +- RINGBUF_TYPE_TIME_EXTEND = 30, +- RINGBUF_TYPE_TIME_STAMP = 31, +-}; +- +-void tracecmd_record_ref(struct tep_record *record); +-void free_record(struct tep_record *record); +- +-void tracecmd_set_debug(bool set_debug); +-bool tracecmd_get_debug(void); +- + struct tracecmd_input; +-struct tracecmd_output; +-struct tracecmd_recorder; +-struct hook_list; +- +-/* --- tracecmd plugins --- */ +- +-extern int tracecmd_disable_sys_plugins; +-extern int tracecmd_disable_plugins; +- +-enum tracecmd_context { +- TRACECMD_INPUT, +- TRACECMD_OUTPUT, +-}; +- +-enum tracecmd_plugin_flag { +- TRACECMD_DISABLE_SYS_PLUGINS = 1, +- TRACECMD_DISABLE_PLUGINS = 1 << 1, +-}; +- +-struct trace_plugin_context; +- +-struct trace_plugin_context * +-tracecmd_plugin_context_create(enum tracecmd_context context, void *data); +- +-void tracecmd_plugin_set_flag(struct trace_plugin_context *context, +- enum tracecmd_plugin_flag flag); +- +-#define TRACECMD_PLUGIN_LOADER tracecmd_plugin_loader +-#define TRACECMD_PLUGIN_UNLOADER tracecmd_plugin_unloader +-#define TRACECMD_PLUGIN_ALIAS tracecmd_plugin_alias +-#define _MAKE_STR(x) #x +-#define MAKE_STR(x) _MAKE_STR(x) +-#define TRACECMD_PLUGIN_LOADER_NAME MAKE_STR(TRACECMD_PLUGIN_LOADER) +-#define TRACECMD_PLUGIN_UNLOADER_NAME MAKE_STR(TRACECMD_PLUGIN_UNLOADER) +-#define TRACECMD_PLUGIN_ALIAS_NAME MAKE_STR(TRACECMD_PLUGIN_ALIAS) +- +-typedef int (*tracecmd_plugin_load_func)(struct trace_plugin_context *trace); +-typedef int (*tracecmd_plugin_unload_func)(struct trace_plugin_context *trace); +- +-struct tracecmd_input * +-tracecmd_plugin_context_input(struct trace_plugin_context *trace_context); +-struct tracecmd_output * +-tracecmd_plugin_context_output(struct trace_plugin_context *trace_context); +- +-void tracecmd_set_quiet(struct tracecmd_output *handle, bool set_quiet); +-bool tracecmd_get_quiet(struct tracecmd_output *handle); +- +-static inline int tracecmd_host_bigendian(void) +-{ +- unsigned char str[] = { 0x1, 0x2, 0x3, 0x4 }; +- unsigned int *ptr; +- +- ptr = (unsigned int *)str; +- return *ptr == 0x01020304; +-} +- +-/* --- Opening and Reading the trace.dat file --- */ +- +-enum { +- TRACECMD_OPTION_DONE, +- TRACECMD_OPTION_DATE, +- TRACECMD_OPTION_CPUSTAT, +- TRACECMD_OPTION_BUFFER, +- TRACECMD_OPTION_TRACECLOCK, +- TRACECMD_OPTION_UNAME, +- TRACECMD_OPTION_HOOK, +- TRACECMD_OPTION_OFFSET, +- TRACECMD_OPTION_CPUCOUNT, +- TRACECMD_OPTION_VERSION, +- TRACECMD_OPTION_PROCMAPS, +- TRACECMD_OPTION_TRACEID, +- TRACECMD_OPTION_TIME_SHIFT, +- TRACECMD_OPTION_GUEST, +-}; +- +-enum { +- TRACECMD_FL_IGNORE_DATE = (1 << 0), +- TRACECMD_FL_BUFFER_INSTANCE = (1 << 1), +- TRACECMD_FL_LATENCY = (1 << 2), +- TRACECMD_FL_IN_USECS = (1 << 3), +- TRACECMD_FL_FLYRECORD = (1 << 4), +-}; +- +-struct tracecmd_ftrace { +- struct tracecmd_input *handle; +- struct tep_event *fgraph_ret_event; +- int fgraph_ret_id; +- int long_size; +-}; +- +-struct tracecmd_proc_addr_map { +- unsigned long long start; +- unsigned long long end; +- char *lib_name; +-}; +- +-typedef void (*tracecmd_show_data_func)(struct tracecmd_input *handle, +- struct tep_record *record); +-typedef void (*tracecmd_handle_init_func)(struct tracecmd_input *handle, +- struct hook_list *hook, int global); + +-struct tracecmd_input *tracecmd_alloc(const char *file); +-struct tracecmd_input *tracecmd_alloc_fd(int fd); +-struct tracecmd_input *tracecmd_open(const char *file); + struct tracecmd_input *tracecmd_open_head(const char *file); +-struct tracecmd_input *tracecmd_open_fd(int fd); ++void tracecmd_close(struct tracecmd_input *handle); + int tracecmd_pair_peer(struct tracecmd_input *handle, + struct tracecmd_input *peer); +-void tracecmd_unpair_peer(struct tracecmd_input *handle); +-void tracecmd_ref(struct tracecmd_input *handle); +-void tracecmd_close(struct tracecmd_input *handle); +-int tracecmd_read_headers(struct tracecmd_input *handle); +-int tracecmd_get_parsing_failures(struct tracecmd_input *handle); +-int tracecmd_long_size(struct tracecmd_input *handle); +-int tracecmd_page_size(struct tracecmd_input *handle); +-int tracecmd_cpus(struct tracecmd_input *handle); +-int tracecmd_copy_headers(struct tracecmd_input *handle, int fd); +-void tracecmd_set_flag(struct tracecmd_input *handle, int flag); +-void tracecmd_clear_flag(struct tracecmd_input *handle, int flag); +-unsigned long tracecmd_get_flags(struct tracecmd_input *handle); +-unsigned long long tracecmd_get_traceid(struct tracecmd_input *handle); +-int tracecmd_get_guest_cpumap(struct tracecmd_input *handle, +- unsigned long long trace_id, +- const char **name, +- int *vcpu_count, const int **cpu_pid); +-unsigned long long tracecmd_get_tsync_peer(struct tracecmd_input *handle); +-int tracecmd_enable_tsync(struct tracecmd_input *handle, bool enable); +- +-void tracecmd_parse_trace_clock(struct tracecmd_input *handle, char *file, int size); +- +-int tracecmd_make_pipe(struct tracecmd_input *handle, int cpu, int fd, int cpus); +- +-int tracecmd_buffer_instances(struct tracecmd_input *handle); +-const char *tracecmd_buffer_instance_name(struct tracecmd_input *handle, int indx); +-struct tracecmd_input *tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx); +-int tracecmd_is_buffer_instance(struct tracecmd_input *handle); +- +-void tracecmd_set_ts_offset(struct tracecmd_input *handle, long long offset); +-void tracecmd_set_ts2secs(struct tracecmd_input *handle, unsigned long long hz); +- +-void tracecmd_print_events(struct tracecmd_input *handle, const char *regex); +- +-struct hook_list *tracecmd_hooks(struct tracecmd_input *handle); + + int tracecmd_init_data(struct tracecmd_input *handle); +- +-void tracecmd_print_stats(struct tracecmd_input *handle); +-void tracecmd_print_uname(struct tracecmd_input *handle); +-void tracecmd_print_version(struct tracecmd_input *handle); +- + struct tep_record * +-tracecmd_peek_data(struct tracecmd_input *handle, int cpu); +- +-static inline struct tep_record * +-tracecmd_peek_data_ref(struct tracecmd_input *handle, int cpu) +-{ +- struct tep_record *rec = tracecmd_peek_data(handle, cpu); +- if (rec) +- rec->ref_count++; +- return rec; +-} +- ++tracecmd_read_cpu_first(struct tracecmd_input *handle, int cpu); + struct tep_record * + tracecmd_read_data(struct tracecmd_input *handle, int cpu); +- +-struct tep_record * +-tracecmd_read_prev(struct tracecmd_input *handle, struct tep_record *record); +- +-struct tep_record * +-tracecmd_read_next_data(struct tracecmd_input *handle, int *rec_cpu); +- +-struct tep_record * +-tracecmd_peek_next_data(struct tracecmd_input *handle, int *rec_cpu); +- + struct tep_record * + tracecmd_read_at(struct tracecmd_input *handle, unsigned long long offset, + int *cpu); +-struct tep_record * +-tracecmd_translate_data(struct tracecmd_input *handle, +- void *ptr, int size); +-struct tep_record * +-tracecmd_read_cpu_first(struct tracecmd_input *handle, int cpu); +-struct tep_record * +-tracecmd_read_cpu_last(struct tracecmd_input *handle, int cpu); +-int tracecmd_refresh_record(struct tracecmd_input *handle, +- struct tep_record *record); +- +-int tracecmd_set_cpu_to_timestamp(struct tracecmd_input *handle, +- int cpu, unsigned long long ts); +-void +-tracecmd_set_all_cpus_to_timestamp(struct tracecmd_input *handle, +- unsigned long long time); +- +-int tracecmd_set_cursor(struct tracecmd_input *handle, +- int cpu, unsigned long long offset); +-unsigned long long +-tracecmd_get_cursor(struct tracecmd_input *handle, int cpu); ++void free_record(struct tep_record *record); + +-int tracecmd_ftrace_overrides(struct tracecmd_input *handle, struct tracecmd_ftrace *finfo); + struct tep_handle *tracecmd_get_pevent(struct tracecmd_input *handle); +-bool tracecmd_get_use_trace_clock(struct tracecmd_input *handle); +-tracecmd_show_data_func +-tracecmd_get_show_data_func(struct tracecmd_input *handle); +-void tracecmd_set_show_data_func(struct tracecmd_input *handle, +- tracecmd_show_data_func func); +- +-int tracecmd_record_at_buffer_start(struct tracecmd_input *handle, struct tep_record *record); +-unsigned long long tracecmd_page_ts(struct tracecmd_input *handle, +- struct tep_record *record); +-unsigned int tracecmd_record_ts_delta(struct tracecmd_input *handle, +- struct tep_record *record); +- +-struct tracecmd_proc_addr_map * +-tracecmd_search_task_map(struct tracecmd_input *handle, +- int pid, unsigned long long addr); +-#ifndef SWIG +-/* hack for function graph work around */ +-extern __thread struct tracecmd_input *tracecmd_curr_thread_handle; +-#endif +- +- +-/* --- Creating and Writing the trace.dat file --- */ +- +-struct tracecmd_event_list { +- struct tracecmd_event_list *next; +- const char *glob; +-}; +- +-struct tracecmd_option; +-struct tracecmd_msg_handle; +- +-struct tracecmd_output *tracecmd_create_file_latency(const char *output_file, int cpus); +-struct tracecmd_output *tracecmd_create_file(const char *output_file, +- int cpus, char * const *cpu_data_files); +-struct tracecmd_output * +-tracecmd_create_file_glob(const char *output_file, +- int cpus, char * const *cpu_data_files, +- struct tracecmd_event_list *event_globs); +-struct tracecmd_output * +-tracecmd_create_init_file_glob(const char *output_file, +- struct tracecmd_event_list *list); +-struct tracecmd_output *tracecmd_create_init_fd(int fd); +-struct tracecmd_output * +-tracecmd_create_init_fd_glob(int fd, struct tracecmd_event_list *list); +-struct tracecmd_output * +-tracecmd_create_init_fd_msg(struct tracecmd_msg_handle *msg_handle, +- struct tracecmd_event_list *list); +-struct tracecmd_output *tracecmd_create_init_file(const char *output_file); +-struct tracecmd_output *tracecmd_create_init_file_override(const char *output_file, +- const char *tracing_dir, +- const char *kallsyms); +-struct tracecmd_option *tracecmd_add_option(struct tracecmd_output *handle, +- unsigned short id, int size, +- const void *data); +-struct tracecmd_option * +-tracecmd_add_option_v(struct tracecmd_output *handle, +- unsigned short id, const struct iovec *vector, int count); +- +-struct tracecmd_option *tracecmd_add_buffer_option(struct tracecmd_output *handle, +- const char *name, int cpus); +- +-int tracecmd_write_cpus(struct tracecmd_output *handle, int cpus); +-int tracecmd_write_options(struct tracecmd_output *handle); +-int tracecmd_append_options(struct tracecmd_output *handle); +-int tracecmd_update_option(struct tracecmd_output *handle, +- struct tracecmd_option *option, int size, +- const void *data); +-void tracecmd_output_close(struct tracecmd_output *handle); +-void tracecmd_output_free(struct tracecmd_output *handle); +-struct tracecmd_output *tracecmd_copy(struct tracecmd_input *ihandle, +- const char *file); +- +-int tracecmd_write_cpu_data(struct tracecmd_output *handle, +- int cpus, char * const *cpu_data_files); +-int tracecmd_append_cpu_data(struct tracecmd_output *handle, +- int cpus, char * const *cpu_data_files); +-int tracecmd_append_buffer_cpu_data(struct tracecmd_output *handle, +- struct tracecmd_option *option, +- int cpus, char * const *cpu_data_files); +- +-struct tracecmd_output *tracecmd_get_output_handle_fd(int fd); +- +-/* --- Reading the Fly Recorder Trace --- */ +- +-enum { +- TRACECMD_RECORD_NOSPLICE = (1 << 0), /* Use read instead of splice */ +- TRACECMD_RECORD_SNAPSHOT = (1 << 1), /* Extract from snapshot */ +- TRACECMD_RECORD_BLOCK = (1 << 2), /* Block on splice write */ +- TRACECMD_RECORD_NOBRASS = (1 << 3), /* Splice directly without a brass pipe */ +-}; +- +-void tracecmd_free_recorder(struct tracecmd_recorder *recorder); +-struct tracecmd_recorder *tracecmd_create_recorder(const char *file, int cpu, unsigned flags); +-struct tracecmd_recorder *tracecmd_create_recorder_fd(int fd, int cpu, unsigned flags); +-struct tracecmd_recorder *tracecmd_create_recorder_virt(const char *file, int cpu, unsigned flags, int trace_fd); +-struct tracecmd_recorder *tracecmd_create_recorder_maxkb(const char *file, int cpu, unsigned flags, int maxkb); +-struct tracecmd_recorder *tracecmd_create_buffer_recorder_fd(int fd, int cpu, unsigned flags, const char *buffer); +-struct tracecmd_recorder *tracecmd_create_buffer_recorder(const char *file, int cpu, unsigned flags, const char *buffer); +-struct tracecmd_recorder *tracecmd_create_buffer_recorder_maxkb(const char *file, int cpu, unsigned flags, const char *buffer, int maxkb); +- +-int tracecmd_start_recording(struct tracecmd_recorder *recorder, unsigned long sleep); +-void tracecmd_stop_recording(struct tracecmd_recorder *recorder); +-long tracecmd_flush_recording(struct tracecmd_recorder *recorder); +- +-enum tracecmd_msg_flags { +- TRACECMD_MSG_FL_USE_TCP = 1 << 0, +-}; +- +-/* for both client and server */ +-struct tracecmd_msg_handle { +- int fd; +- short cpu_count; +- short version; /* Current protocol version */ +- unsigned long flags; +- bool done; +-}; +- +-struct tracecmd_msg_handle * +- tracecmd_msg_handle_alloc(int fd, unsigned long flags); +- +-/* Closes the socket and frees the handle */ +-void tracecmd_msg_handle_close(struct tracecmd_msg_handle *msg_handle); +- +-/* for clients */ +-int tracecmd_msg_send_init_data(struct tracecmd_msg_handle *msg_handle, +- unsigned int **client_ports); +-int tracecmd_msg_data_send(struct tracecmd_msg_handle *msg_handle, +- const char *buf, int size); +-int tracecmd_msg_finish_sending_data(struct tracecmd_msg_handle *msg_handle); +-int tracecmd_msg_send_close_msg(struct tracecmd_msg_handle *msg_handle); +-int tracecmd_msg_send_close_resp_msg(struct tracecmd_msg_handle *msg_handle); +-int tracecmd_msg_wait_close(struct tracecmd_msg_handle *msg_handle); +-int tracecmd_msg_wait_close_resp(struct tracecmd_msg_handle *msg_handle); +- +-/* for server */ +-int tracecmd_msg_initial_setting(struct tracecmd_msg_handle *msg_handle); +-int tracecmd_msg_send_port_array(struct tracecmd_msg_handle *msg_handle, +- unsigned *ports); +-int tracecmd_msg_read_data(struct tracecmd_msg_handle *msg_handle, int ofd); +-int tracecmd_msg_collect_data(struct tracecmd_msg_handle *msg_handle, int ofd); +-bool tracecmd_msg_done(struct tracecmd_msg_handle *msg_handle); +-void tracecmd_msg_set_done(struct tracecmd_msg_handle *msg_handle); +- +-int tracecmd_msg_send_trace_req(struct tracecmd_msg_handle *msg_handle, +- int argc, char **argv, bool use_fifos, +- unsigned long long trace_id, +- char *tsync_protos, +- int tsync_protos_size); +-int tracecmd_msg_recv_trace_req(struct tracecmd_msg_handle *msg_handle, +- int *argc, char ***argv, bool *use_fifos, +- unsigned long long *trace_id, +- char **tsync_protos, +- unsigned int *tsync_protos_size); +- +-int tracecmd_msg_send_trace_resp(struct tracecmd_msg_handle *msg_handle, +- int nr_cpus, int page_size, +- unsigned int *ports, bool use_fifos, +- unsigned long long trace_id, +- unsigned int tsync_proto, +- unsigned int tsync_port); +-int tracecmd_msg_recv_trace_resp(struct tracecmd_msg_handle *msg_handle, +- int *nr_cpus, int *page_size, +- unsigned int **ports, bool *use_fifos, +- unsigned long long *trace_id, +- unsigned int *tsync_proto, +- unsigned int *tsync_port); +- +-int tracecmd_msg_send_time_sync(struct tracecmd_msg_handle *msg_handle, +- unsigned int sync_protocol, +- unsigned int sync_msg_id, +- unsigned int payload_size, char *payload); +-int tracecmd_msg_recv_time_sync(struct tracecmd_msg_handle *msg_handle, +- unsigned int *sync_protocol, +- unsigned int *sync_msg_id, +- unsigned int *payload_size, char **payload); +- +-/* --- Timestamp synchronization --- */ +- +-enum{ +- TRACECMD_TIME_SYNC_PROTO_NONE = 0, +-}; +-enum{ +- TRACECMD_TIME_SYNC_CMD_PROBE = 1, +- TRACECMD_TIME_SYNC_CMD_STOP = 2, +-}; +- +-#define TRACECMD_TIME_SYNC_PROTO_PTP_WEIGHT 10 +- +-struct tracecmd_time_sync { +- unsigned int sync_proto; +- int loop_interval; +- pthread_mutex_t lock; +- pthread_cond_t cond; +- char *clock_str; +- struct tracecmd_msg_handle *msg_handle; +- void *context; +-}; +- +-void tracecmd_tsync_init(void); +-int tracecmd_tsync_proto_getall(char **proto_mask, int *words); +-unsigned int tracecmd_tsync_proto_select(char *proto_mask, int words); +-bool tsync_proto_is_supported(unsigned int proto_id); +-void tracecmd_tsync_with_host(struct tracecmd_time_sync *tsync); +-void tracecmd_tsync_with_guest(struct tracecmd_time_sync *tsync); +-int tracecmd_tsync_get_offsets(struct tracecmd_time_sync *tsync, +- int *count, +- long long **ts, long long **offsets); +-void tracecmd_tsync_free(struct tracecmd_time_sync *tsync); +- +-/* --- Plugin handling --- */ +-extern struct tep_plugin_option trace_ftrace_options[]; +- +-char **trace_util_find_plugin_files(const char *suffix); +-void trace_util_free_plugin_files(char **files); +- +-/* Used for trace-cmd list */ +-void tracecmd_ftrace_load_options(void); +- +-/* event hooks */ +- +-struct hook_list { +- struct hook_list *next; +- struct buffer_instance *instance; +- const char *hook; +- char *str; +- char *start_system; +- char *start_event; +- char *start_match; +- char *end_system; +- char *end_event; +- char *end_match; +- char *pid; +- int migrate; +- int global; +- int stack; +-}; +- +-struct hook_list *tracecmd_create_event_hook(const char *arg); +-void tracecmd_free_hooks(struct hook_list *hooks); +- +-void tracecmd_plog(const char *fmt, ...); +-void tracecmd_plog_error(const char *fmt, ...); +-int tracecmd_set_logfile(char *logfile); +- +-/* --- System --- */ +-unsigned long long tracecmd_generate_traceid(void); +-int tracecmd_count_cpus(void); +- +-/* --- Hack! --- */ +-int tracecmd_blk_hack(struct tracecmd_input *handle); +- +-/* --- Stack tracer functions --- */ +-int tracecmd_stack_tracer_status(int *status); +- +-/* --- Debugging --- */ +-struct kbuffer *tracecmd_record_kbuf(struct tracecmd_input *handle, +- struct tep_record *record); +-void *tracecmd_record_page(struct tracecmd_input *handle, +- struct tep_record *record); +-void *tracecmd_record_offset(struct tracecmd_input *handle, +- struct tep_record *record); ++unsigned long long tracecmd_get_traceid(struct tracecmd_input *handle); ++int tracecmd_get_guest_cpumap(struct tracecmd_input *handle, ++ unsigned long long trace_id, ++ const char **name, ++ int *vcpu_count, const int **cpu_pid); ++int tracecmd_buffer_instances(struct tracecmd_input *handle); ++const char *tracecmd_buffer_instance_name(struct tracecmd_input *handle, int indx); ++struct tracecmd_input *tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx); + + #endif /* _TRACE_CMD_H */ +diff --git a/include/trace-cmd/trace-filter-hash.h b/include/trace-cmd/trace-filter-hash.h +deleted file mode 100644 +index 4111c41..0000000 +--- a/include/trace-cmd/trace-filter-hash.h ++++ /dev/null +@@ -1,64 +0,0 @@ +-/* SPDX-License-Identifier: LGPL-2.1 */ +-/* +- * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt +- * Copyright (C) 2018 VMware Inc, Steven Rostedt +- * +- */ +-#ifndef _TRACE_FILTER_HASH_H +-#define _TRACE_FILTER_HASH_H +- +-#include +- +-struct tracecmd_filter_id_item { +- struct tracecmd_filter_id_item *next; +- int id; +-}; +- +-struct tracecmd_filter_id { +- struct tracecmd_filter_id_item **hash; +- int count; +-}; +- +-/** +- * tracecmd_quick_hash - A quick (non secured) hash alogirthm +- * @val: The value to perform the hash on +- * @bits: The size in bits you need to return +- * +- * This is a quick hashing function adapted from Donald E. Knuth's 32 +- * bit multiplicative hash. See The Art of Computer Programming (TAOCP). +- * Multiplication by the Prime number, closest to the golden ratio of +- * 2^32. +- * +- * @bits is used to max the result for use cases that require +- * a power of 2 return value that is less than 32 bits. Any value +- * of @bits greater than 31 (or zero), will simply return the full hash on @val. +- */ +-static inline uint32_t tracecmd_quick_hash(uint32_t val, unsigned int bits) +-{ +- val *= UINT32_C(2654435761); +- +- if (!bits || bits > 31) +- return val; +- +- return val & ((1 << bits) - 1); +-} +- +-struct tracecmd_filter_id_item * +- tracecmd_filter_id_find(struct tracecmd_filter_id *hash, int id); +-void tracecmd_filter_id_add(struct tracecmd_filter_id *hash, int id); +-void tracecmd_filter_id_remove(struct tracecmd_filter_id *hash, int id); +-void tracecmd_filter_id_clear(struct tracecmd_filter_id *hash); +-struct tracecmd_filter_id *tracecmd_filter_id_hash_alloc(void); +-void tracecmd_filter_id_hash_free(struct tracecmd_filter_id *hash); +-struct tracecmd_filter_id * +- tracecmd_filter_id_hash_copy(struct tracecmd_filter_id *hash); +-int *tracecmd_filter_ids(struct tracecmd_filter_id *hash); +-int tracecmd_filter_id_compare(struct tracecmd_filter_id *hash1, +- struct tracecmd_filter_id *hash2); +- +-static inline int tracecmd_filter_task_count(struct tracecmd_filter_id *hash) +-{ +- return hash->count; +-} +- +-#endif /* _TRACE_FILTER_HASH_H */ +diff --git a/include/trace-cmd/trace-hash.h b/include/trace-cmd/trace-hash.h +deleted file mode 100644 +index aa92cdf..0000000 +--- a/include/trace-cmd/trace-hash.h ++++ /dev/null +@@ -1,55 +0,0 @@ +-/* SPDX-License-Identifier: GPL-2.0 */ +-/* +- * Copyright (C) 2014 Red Hat Inc, Steven Rostedt +- * +- */ +-#ifndef _TRACE_HASH_H +-#define _TRACE_HASH_H +- +-struct trace_hash_item { +- struct trace_hash_item *next; +- struct trace_hash_item *prev; +- unsigned long long key; +-}; +- +-struct trace_hash { +- struct trace_hash_item **buckets; +- int nr_buckets; +- int power; +-}; +- +-int trace_hash_init(struct trace_hash *hash, int buckets); +-void trace_hash_free(struct trace_hash *hash); +-int trace_hash_add(struct trace_hash *hash, struct trace_hash_item *item); +-int trace_hash_empty(struct trace_hash *hash); +- +-static inline void trace_hash_del(struct trace_hash_item *item) +-{ +- struct trace_hash_item *prev = item->prev; +- +- prev->next = item->next; +- if (item->next) +- item->next->prev = prev; +-} +- +-#define trace_hash_for_each_bucket(bucket, hash) \ +- for (bucket = (hash)->buckets; \ +- (bucket) < (hash)->buckets + (hash)->nr_buckets; (bucket)++) +- +-#define trace_hash_for_each_item(item, bucket) \ +- for ((item = *(bucket)); item; item = (item)->next) +- +-#define trace_hash_for_each_item_safe(item, n, bucket) \ +- for ((item = *(bucket)), n = item ? item->next : NULL; item; \ +- item = n, n = item ? (item)->next : NULL) +- +-#define trace_hash_while_item(item, bucket) \ +- while ((item = *(bucket))) +- +-typedef int (*trace_hash_func)(struct trace_hash_item *item, void *data); +- +-struct trace_hash_item * +-trace_hash_find(struct trace_hash *hash, unsigned long long key, +- trace_hash_func match, void *data); +- +-#endif /* _TRACE_HASH_H */ +diff --git a/include/trace-cmd/trace-msg.h b/include/trace-cmd/trace-msg.h +deleted file mode 100644 +index aab8a69..0000000 +--- a/include/trace-cmd/trace-msg.h ++++ /dev/null +@@ -1,15 +0,0 @@ +-#ifndef _TRACE_MSG_H_ +-#define _TRACE_MSG_H_ +- +-#include +- +-#define UDP_MAX_PACKET (65536 - 20) +-#define V3_MAGIC "766679\0" +-#define V3_CPU "-1V3" +- +-#define V1_PROTOCOL 1 +-#define V3_PROTOCOL 3 +- +-extern unsigned int page_size; +- +-#endif /* _TRACE_MSG_H_ */ +diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h +new file mode 100644 +index 0000000..458760e +--- /dev/null ++++ b/lib/trace-cmd/include/private/trace-cmd-private.h +@@ -0,0 +1,480 @@ ++/* SPDX-License-Identifier: LGPL-2.1 */ ++/* ++ * Copyright (C) 2008, 2009, 2010 Red Hat Inc, Steven Rostedt ++ * ++ */ ++#ifndef _TRACE_CMD_PRIVATE_H ++#define _TRACE_CMD_PRIVATE_H ++ ++#include "traceevent/event-parse.h" ++#include "trace-cmd/trace-cmd.h" ++ ++#define TRACECMD_MAGIC { 23, 8, 68 } ++ ++#define ARRAY_SIZE(_a) (sizeof(_a) / sizeof((_a)[0])) ++#define __weak __attribute__((weak)) ++#define __noreturn __attribute__((noreturn)) ++ ++#define TRACECMD_ERR_MSK ((unsigned long)(-1) & ~((1UL << 14) - 1)) ++#define TRACECMD_ISERR(ptr) ((unsigned long)(ptr) > TRACECMD_ERR_MSK) ++#define TRACECMD_ERROR(ret) ((void *)((unsigned long)(ret) | TRACECMD_ERR_MSK)) ++#define TRACECMD_PTR2ERR(ptr) ((unisgned long)(ptr) & ~TRACECMD_ERR_MSK) ++ ++void tracecmd_parse_cmdlines(struct tep_handle *pevent, char *file, int size); ++void tracecmd_parse_proc_kallsyms(struct tep_handle *pevent, char *file, unsigned int size); ++void tracecmd_parse_ftrace_printk(struct tep_handle *pevent, char *file, unsigned int size); ++struct tep_plugin_list *trace_load_plugins(struct tep_handle *tep); ++ ++int *tracecmd_add_id(int *list, int id, int len); ++ ++enum { ++ RINGBUF_TYPE_PADDING = 29, ++ RINGBUF_TYPE_TIME_EXTEND = 30, ++ RINGBUF_TYPE_TIME_STAMP = 31, ++}; ++ ++void tracecmd_record_ref(struct tep_record *record); ++ ++void tracecmd_set_debug(bool set_debug); ++bool tracecmd_get_debug(void); ++ ++struct tracecmd_output; ++struct tracecmd_recorder; ++struct hook_list; ++ ++/* --- tracecmd plugins --- */ ++ ++extern int tracecmd_disable_sys_plugins; ++extern int tracecmd_disable_plugins; ++ ++enum tracecmd_context { ++ TRACECMD_INPUT, ++ TRACECMD_OUTPUT, ++}; ++ ++enum tracecmd_plugin_flag { ++ TRACECMD_DISABLE_SYS_PLUGINS = 1, ++ TRACECMD_DISABLE_PLUGINS = 1 << 1, ++}; ++ ++struct trace_plugin_context; ++ ++struct trace_plugin_context * ++tracecmd_plugin_context_create(enum tracecmd_context context, void *data); ++ ++void tracecmd_plugin_set_flag(struct trace_plugin_context *context, ++ enum tracecmd_plugin_flag flag); ++ ++#define TRACECMD_PLUGIN_LOADER tracecmd_plugin_loader ++#define TRACECMD_PLUGIN_UNLOADER tracecmd_plugin_unloader ++#define TRACECMD_PLUGIN_ALIAS tracecmd_plugin_alias ++#define _MAKE_STR(x) #x ++#define MAKE_STR(x) _MAKE_STR(x) ++#define TRACECMD_PLUGIN_LOADER_NAME MAKE_STR(TRACECMD_PLUGIN_LOADER) ++#define TRACECMD_PLUGIN_UNLOADER_NAME MAKE_STR(TRACECMD_PLUGIN_UNLOADER) ++#define TRACECMD_PLUGIN_ALIAS_NAME MAKE_STR(TRACECMD_PLUGIN_ALIAS) ++ ++typedef int (*tracecmd_plugin_load_func)(struct trace_plugin_context *trace); ++typedef int (*tracecmd_plugin_unload_func)(struct trace_plugin_context *trace); ++ ++struct tracecmd_input * ++tracecmd_plugin_context_input(struct trace_plugin_context *trace_context); ++struct tracecmd_output * ++tracecmd_plugin_context_output(struct trace_plugin_context *trace_context); ++ ++void tracecmd_set_quiet(struct tracecmd_output *handle, bool set_quiet); ++bool tracecmd_get_quiet(struct tracecmd_output *handle); ++ ++static inline int tracecmd_host_bigendian(void) ++{ ++ unsigned char str[] = { 0x1, 0x2, 0x3, 0x4 }; ++ unsigned int *ptr; ++ ++ ptr = (unsigned int *)str; ++ return *ptr == 0x01020304; ++} ++ ++/* --- Opening and Reading the trace.dat file --- */ ++ ++enum { ++ TRACECMD_OPTION_DONE, ++ TRACECMD_OPTION_DATE, ++ TRACECMD_OPTION_CPUSTAT, ++ TRACECMD_OPTION_BUFFER, ++ TRACECMD_OPTION_TRACECLOCK, ++ TRACECMD_OPTION_UNAME, ++ TRACECMD_OPTION_HOOK, ++ TRACECMD_OPTION_OFFSET, ++ TRACECMD_OPTION_CPUCOUNT, ++ TRACECMD_OPTION_VERSION, ++ TRACECMD_OPTION_PROCMAPS, ++ TRACECMD_OPTION_TRACEID, ++ TRACECMD_OPTION_TIME_SHIFT, ++ TRACECMD_OPTION_GUEST, ++}; ++ ++enum { ++ TRACECMD_FL_IGNORE_DATE = (1 << 0), ++ TRACECMD_FL_BUFFER_INSTANCE = (1 << 1), ++ TRACECMD_FL_LATENCY = (1 << 2), ++ TRACECMD_FL_IN_USECS = (1 << 3), ++ TRACECMD_FL_FLYRECORD = (1 << 4), ++}; ++ ++struct tracecmd_ftrace { ++ struct tracecmd_input *handle; ++ struct tep_event *fgraph_ret_event; ++ int fgraph_ret_id; ++ int long_size; ++}; ++ ++struct tracecmd_proc_addr_map { ++ unsigned long long start; ++ unsigned long long end; ++ char *lib_name; ++}; ++ ++typedef void (*tracecmd_show_data_func)(struct tracecmd_input *handle, ++ struct tep_record *record); ++typedef void (*tracecmd_handle_init_func)(struct tracecmd_input *handle, ++ struct hook_list *hook, int global); ++ ++struct tracecmd_input *tracecmd_alloc(const char *file); ++struct tracecmd_input *tracecmd_alloc_fd(int fd); ++struct tracecmd_input *tracecmd_open(const char *file); ++struct tracecmd_input *tracecmd_open_fd(int fd); ++void tracecmd_unpair_peer(struct tracecmd_input *handle); ++void tracecmd_ref(struct tracecmd_input *handle); ++int tracecmd_read_headers(struct tracecmd_input *handle); ++int tracecmd_get_parsing_failures(struct tracecmd_input *handle); ++int tracecmd_long_size(struct tracecmd_input *handle); ++int tracecmd_page_size(struct tracecmd_input *handle); ++int tracecmd_cpus(struct tracecmd_input *handle); ++int tracecmd_copy_headers(struct tracecmd_input *handle, int fd); ++void tracecmd_set_flag(struct tracecmd_input *handle, int flag); ++void tracecmd_clear_flag(struct tracecmd_input *handle, int flag); ++unsigned long tracecmd_get_flags(struct tracecmd_input *handle); ++unsigned long long tracecmd_get_tsync_peer(struct tracecmd_input *handle); ++int tracecmd_enable_tsync(struct tracecmd_input *handle, bool enable); ++ ++void tracecmd_parse_trace_clock(struct tracecmd_input *handle, char *file, int size); ++ ++int tracecmd_make_pipe(struct tracecmd_input *handle, int cpu, int fd, int cpus); ++ ++int tracecmd_is_buffer_instance(struct tracecmd_input *handle); ++ ++void tracecmd_set_ts_offset(struct tracecmd_input *handle, long long offset); ++void tracecmd_set_ts2secs(struct tracecmd_input *handle, unsigned long long hz); ++ ++void tracecmd_print_events(struct tracecmd_input *handle, const char *regex); ++ ++struct hook_list *tracecmd_hooks(struct tracecmd_input *handle); ++ ++void tracecmd_print_stats(struct tracecmd_input *handle); ++void tracecmd_print_uname(struct tracecmd_input *handle); ++void tracecmd_print_version(struct tracecmd_input *handle); ++ ++struct tep_record * ++tracecmd_peek_data(struct tracecmd_input *handle, int cpu); ++ ++static inline struct tep_record * ++tracecmd_peek_data_ref(struct tracecmd_input *handle, int cpu) ++{ ++ struct tep_record *rec = tracecmd_peek_data(handle, cpu); ++ if (rec) ++ rec->ref_count++; ++ return rec; ++} ++ ++struct tep_record * ++tracecmd_read_prev(struct tracecmd_input *handle, struct tep_record *record); ++ ++struct tep_record * ++tracecmd_read_next_data(struct tracecmd_input *handle, int *rec_cpu); ++ ++struct tep_record * ++tracecmd_peek_next_data(struct tracecmd_input *handle, int *rec_cpu); ++ ++struct tep_record * ++tracecmd_translate_data(struct tracecmd_input *handle, ++ void *ptr, int size); ++struct tep_record * ++tracecmd_read_cpu_last(struct tracecmd_input *handle, int cpu); ++int tracecmd_refresh_record(struct tracecmd_input *handle, ++ struct tep_record *record); ++ ++int tracecmd_set_cpu_to_timestamp(struct tracecmd_input *handle, ++ int cpu, unsigned long long ts); ++void ++tracecmd_set_all_cpus_to_timestamp(struct tracecmd_input *handle, ++ unsigned long long time); ++ ++int tracecmd_set_cursor(struct tracecmd_input *handle, ++ int cpu, unsigned long long offset); ++unsigned long long ++tracecmd_get_cursor(struct tracecmd_input *handle, int cpu); ++ ++int tracecmd_ftrace_overrides(struct tracecmd_input *handle, struct tracecmd_ftrace *finfo); ++bool tracecmd_get_use_trace_clock(struct tracecmd_input *handle); ++tracecmd_show_data_func ++tracecmd_get_show_data_func(struct tracecmd_input *handle); ++void tracecmd_set_show_data_func(struct tracecmd_input *handle, ++ tracecmd_show_data_func func); ++ ++int tracecmd_record_at_buffer_start(struct tracecmd_input *handle, struct tep_record *record); ++unsigned long long tracecmd_page_ts(struct tracecmd_input *handle, ++ struct tep_record *record); ++unsigned int tracecmd_record_ts_delta(struct tracecmd_input *handle, ++ struct tep_record *record); ++ ++struct tracecmd_proc_addr_map * ++tracecmd_search_task_map(struct tracecmd_input *handle, ++ int pid, unsigned long long addr); ++#ifndef SWIG ++/* hack for function graph work around */ ++extern __thread struct tracecmd_input *tracecmd_curr_thread_handle; ++#endif ++ ++ ++/* --- Creating and Writing the trace.dat file --- */ ++ ++struct tracecmd_event_list { ++ struct tracecmd_event_list *next; ++ const char *glob; ++}; ++ ++struct tracecmd_option; ++struct tracecmd_msg_handle; ++ ++struct tracecmd_output *tracecmd_create_file_latency(const char *output_file, int cpus); ++struct tracecmd_output *tracecmd_create_file(const char *output_file, ++ int cpus, char * const *cpu_data_files); ++struct tracecmd_output * ++tracecmd_create_file_glob(const char *output_file, ++ int cpus, char * const *cpu_data_files, ++ struct tracecmd_event_list *event_globs); ++struct tracecmd_output * ++tracecmd_create_init_file_glob(const char *output_file, ++ struct tracecmd_event_list *list); ++struct tracecmd_output *tracecmd_create_init_fd(int fd); ++struct tracecmd_output * ++tracecmd_create_init_fd_glob(int fd, struct tracecmd_event_list *list); ++struct tracecmd_output * ++tracecmd_create_init_fd_msg(struct tracecmd_msg_handle *msg_handle, ++ struct tracecmd_event_list *list); ++struct tracecmd_output *tracecmd_create_init_file(const char *output_file); ++struct tracecmd_output *tracecmd_create_init_file_override(const char *output_file, ++ const char *tracing_dir, ++ const char *kallsyms); ++struct tracecmd_option *tracecmd_add_option(struct tracecmd_output *handle, ++ unsigned short id, int size, ++ const void *data); ++struct tracecmd_option * ++tracecmd_add_option_v(struct tracecmd_output *handle, ++ unsigned short id, const struct iovec *vector, int count); ++ ++struct tracecmd_option *tracecmd_add_buffer_option(struct tracecmd_output *handle, ++ const char *name, int cpus); ++ ++int tracecmd_write_cpus(struct tracecmd_output *handle, int cpus); ++int tracecmd_write_options(struct tracecmd_output *handle); ++int tracecmd_append_options(struct tracecmd_output *handle); ++int tracecmd_update_option(struct tracecmd_output *handle, ++ struct tracecmd_option *option, int size, ++ const void *data); ++void tracecmd_output_close(struct tracecmd_output *handle); ++void tracecmd_output_free(struct tracecmd_output *handle); ++struct tracecmd_output *tracecmd_copy(struct tracecmd_input *ihandle, ++ const char *file); ++ ++int tracecmd_write_cpu_data(struct tracecmd_output *handle, ++ int cpus, char * const *cpu_data_files); ++int tracecmd_append_cpu_data(struct tracecmd_output *handle, ++ int cpus, char * const *cpu_data_files); ++int tracecmd_append_buffer_cpu_data(struct tracecmd_output *handle, ++ struct tracecmd_option *option, ++ int cpus, char * const *cpu_data_files); ++ ++struct tracecmd_output *tracecmd_get_output_handle_fd(int fd); ++ ++/* --- Reading the Fly Recorder Trace --- */ ++ ++enum { ++ TRACECMD_RECORD_NOSPLICE = (1 << 0), /* Use read instead of splice */ ++ TRACECMD_RECORD_SNAPSHOT = (1 << 1), /* Extract from snapshot */ ++ TRACECMD_RECORD_BLOCK = (1 << 2), /* Block on splice write */ ++ TRACECMD_RECORD_NOBRASS = (1 << 3), /* Splice directly without a brass pipe */ ++}; ++ ++void tracecmd_free_recorder(struct tracecmd_recorder *recorder); ++struct tracecmd_recorder *tracecmd_create_recorder(const char *file, int cpu, unsigned flags); ++struct tracecmd_recorder *tracecmd_create_recorder_fd(int fd, int cpu, unsigned flags); ++struct tracecmd_recorder *tracecmd_create_recorder_virt(const char *file, int cpu, unsigned flags, int trace_fd); ++struct tracecmd_recorder *tracecmd_create_recorder_maxkb(const char *file, int cpu, unsigned flags, int maxkb); ++struct tracecmd_recorder *tracecmd_create_buffer_recorder_fd(int fd, int cpu, unsigned flags, const char *buffer); ++struct tracecmd_recorder *tracecmd_create_buffer_recorder(const char *file, int cpu, unsigned flags, const char *buffer); ++struct tracecmd_recorder *tracecmd_create_buffer_recorder_maxkb(const char *file, int cpu, unsigned flags, const char *buffer, int maxkb); ++ ++int tracecmd_start_recording(struct tracecmd_recorder *recorder, unsigned long sleep); ++void tracecmd_stop_recording(struct tracecmd_recorder *recorder); ++long tracecmd_flush_recording(struct tracecmd_recorder *recorder); ++ ++enum tracecmd_msg_flags { ++ TRACECMD_MSG_FL_USE_TCP = 1 << 0, ++}; ++ ++/* for both client and server */ ++struct tracecmd_msg_handle { ++ int fd; ++ short cpu_count; ++ short version; /* Current protocol version */ ++ unsigned long flags; ++ bool done; ++}; ++ ++struct tracecmd_msg_handle * ++tracecmd_msg_handle_alloc(int fd, unsigned long flags); ++ ++/* Closes the socket and frees the handle */ ++void tracecmd_msg_handle_close(struct tracecmd_msg_handle *msg_handle); ++ ++/* for clients */ ++int tracecmd_msg_send_init_data(struct tracecmd_msg_handle *msg_handle, ++ unsigned int **client_ports); ++int tracecmd_msg_data_send(struct tracecmd_msg_handle *msg_handle, ++ const char *buf, int size); ++int tracecmd_msg_finish_sending_data(struct tracecmd_msg_handle *msg_handle); ++int tracecmd_msg_send_close_msg(struct tracecmd_msg_handle *msg_handle); ++int tracecmd_msg_send_close_resp_msg(struct tracecmd_msg_handle *msg_handle); ++int tracecmd_msg_wait_close(struct tracecmd_msg_handle *msg_handle); ++int tracecmd_msg_wait_close_resp(struct tracecmd_msg_handle *msg_handle); ++ ++/* for server */ ++int tracecmd_msg_initial_setting(struct tracecmd_msg_handle *msg_handle); ++int tracecmd_msg_send_port_array(struct tracecmd_msg_handle *msg_handle, ++ unsigned *ports); ++int tracecmd_msg_read_data(struct tracecmd_msg_handle *msg_handle, int ofd); ++int tracecmd_msg_collect_data(struct tracecmd_msg_handle *msg_handle, int ofd); ++bool tracecmd_msg_done(struct tracecmd_msg_handle *msg_handle); ++void tracecmd_msg_set_done(struct tracecmd_msg_handle *msg_handle); ++ ++int tracecmd_msg_send_trace_req(struct tracecmd_msg_handle *msg_handle, ++ int argc, char **argv, bool use_fifos, ++ unsigned long long trace_id, ++ char *tsync_protos, ++ int tsync_protos_size); ++int tracecmd_msg_recv_trace_req(struct tracecmd_msg_handle *msg_handle, ++ int *argc, char ***argv, bool *use_fifos, ++ unsigned long long *trace_id, ++ char **tsync_protos, ++ unsigned int *tsync_protos_size); ++ ++int tracecmd_msg_send_trace_resp(struct tracecmd_msg_handle *msg_handle, ++ int nr_cpus, int page_size, ++ unsigned int *ports, bool use_fifos, ++ unsigned long long trace_id, ++ unsigned int tsync_proto, ++ unsigned int tsync_port); ++int tracecmd_msg_recv_trace_resp(struct tracecmd_msg_handle *msg_handle, ++ int *nr_cpus, int *page_size, ++ unsigned int **ports, bool *use_fifos, ++ unsigned long long *trace_id, ++ unsigned int *tsync_proto, ++ unsigned int *tsync_port); ++ ++int tracecmd_msg_send_time_sync(struct tracecmd_msg_handle *msg_handle, ++ unsigned int sync_protocol, ++ unsigned int sync_msg_id, ++ unsigned int payload_size, char *payload); ++int tracecmd_msg_recv_time_sync(struct tracecmd_msg_handle *msg_handle, ++ unsigned int *sync_protocol, ++ unsigned int *sync_msg_id, ++ unsigned int *payload_size, char **payload); ++ ++/* --- Timestamp synchronization --- */ ++ ++enum{ ++ TRACECMD_TIME_SYNC_PROTO_NONE = 0, ++}; ++enum{ ++ TRACECMD_TIME_SYNC_CMD_PROBE = 1, ++ TRACECMD_TIME_SYNC_CMD_STOP = 2, ++}; ++ ++#define TRACECMD_TIME_SYNC_PROTO_PTP_WEIGHT 10 ++ ++struct tracecmd_time_sync { ++ unsigned int sync_proto; ++ int loop_interval; ++ pthread_mutex_t lock; ++ pthread_cond_t cond; ++ char *clock_str; ++ struct tracecmd_msg_handle *msg_handle; ++ void *context; ++}; ++ ++void tracecmd_tsync_init(void); ++int tracecmd_tsync_proto_getall(char **proto_mask, int *words); ++unsigned int tracecmd_tsync_proto_select(char *proto_mask, int words); ++bool tsync_proto_is_supported(unsigned int proto_id); ++void tracecmd_tsync_with_host(struct tracecmd_time_sync *tsync); ++void tracecmd_tsync_with_guest(struct tracecmd_time_sync *tsync); ++int tracecmd_tsync_get_offsets(struct tracecmd_time_sync *tsync, ++ int *count, ++ long long **ts, long long **offsets); ++void tracecmd_tsync_free(struct tracecmd_time_sync *tsync); ++ ++/* --- Plugin handling --- */ ++extern struct tep_plugin_option trace_ftrace_options[]; ++ ++char **trace_util_find_plugin_files(const char *suffix); ++void trace_util_free_plugin_files(char **files); ++ ++/* Used for trace-cmd list */ ++void tracecmd_ftrace_load_options(void); ++ ++/* event hooks */ ++ ++struct hook_list { ++ struct hook_list *next; ++ struct buffer_instance *instance; ++ const char *hook; ++ char *str; ++ char *start_system; ++ char *start_event; ++ char *start_match; ++ char *end_system; ++ char *end_event; ++ char *end_match; ++ char *pid; ++ int migrate; ++ int global; ++ int stack; ++}; ++ ++struct hook_list *tracecmd_create_event_hook(const char *arg); ++void tracecmd_free_hooks(struct hook_list *hooks); ++ ++void tracecmd_plog(const char *fmt, ...); ++void tracecmd_plog_error(const char *fmt, ...); ++int tracecmd_set_logfile(char *logfile); ++ ++/* --- System --- */ ++unsigned long long tracecmd_generate_traceid(void); ++int tracecmd_count_cpus(void); ++ ++/* --- Hack! --- */ ++int tracecmd_blk_hack(struct tracecmd_input *handle); ++ ++/* --- Stack tracer functions --- */ ++int tracecmd_stack_tracer_status(int *status); ++ ++/* --- Debugging --- */ ++struct kbuffer *tracecmd_record_kbuf(struct tracecmd_input *handle, ++ struct tep_record *record); ++void *tracecmd_record_page(struct tracecmd_input *handle, ++ struct tep_record *record); ++void *tracecmd_record_offset(struct tracecmd_input *handle, ++ struct tep_record *record); ++ ++#endif /* _TRACE_CMD_PRIVATE_H */ +diff --git a/lib/trace-cmd/include/private/trace-filter-hash.h b/lib/trace-cmd/include/private/trace-filter-hash.h +new file mode 100644 +index 0000000..4111c41 +--- /dev/null ++++ b/lib/trace-cmd/include/private/trace-filter-hash.h +@@ -0,0 +1,64 @@ ++/* SPDX-License-Identifier: LGPL-2.1 */ ++/* ++ * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt ++ * Copyright (C) 2018 VMware Inc, Steven Rostedt ++ * ++ */ ++#ifndef _TRACE_FILTER_HASH_H ++#define _TRACE_FILTER_HASH_H ++ ++#include ++ ++struct tracecmd_filter_id_item { ++ struct tracecmd_filter_id_item *next; ++ int id; ++}; ++ ++struct tracecmd_filter_id { ++ struct tracecmd_filter_id_item **hash; ++ int count; ++}; ++ ++/** ++ * tracecmd_quick_hash - A quick (non secured) hash alogirthm ++ * @val: The value to perform the hash on ++ * @bits: The size in bits you need to return ++ * ++ * This is a quick hashing function adapted from Donald E. Knuth's 32 ++ * bit multiplicative hash. See The Art of Computer Programming (TAOCP). ++ * Multiplication by the Prime number, closest to the golden ratio of ++ * 2^32. ++ * ++ * @bits is used to max the result for use cases that require ++ * a power of 2 return value that is less than 32 bits. Any value ++ * of @bits greater than 31 (or zero), will simply return the full hash on @val. ++ */ ++static inline uint32_t tracecmd_quick_hash(uint32_t val, unsigned int bits) ++{ ++ val *= UINT32_C(2654435761); ++ ++ if (!bits || bits > 31) ++ return val; ++ ++ return val & ((1 << bits) - 1); ++} ++ ++struct tracecmd_filter_id_item * ++ tracecmd_filter_id_find(struct tracecmd_filter_id *hash, int id); ++void tracecmd_filter_id_add(struct tracecmd_filter_id *hash, int id); ++void tracecmd_filter_id_remove(struct tracecmd_filter_id *hash, int id); ++void tracecmd_filter_id_clear(struct tracecmd_filter_id *hash); ++struct tracecmd_filter_id *tracecmd_filter_id_hash_alloc(void); ++void tracecmd_filter_id_hash_free(struct tracecmd_filter_id *hash); ++struct tracecmd_filter_id * ++ tracecmd_filter_id_hash_copy(struct tracecmd_filter_id *hash); ++int *tracecmd_filter_ids(struct tracecmd_filter_id *hash); ++int tracecmd_filter_id_compare(struct tracecmd_filter_id *hash1, ++ struct tracecmd_filter_id *hash2); ++ ++static inline int tracecmd_filter_task_count(struct tracecmd_filter_id *hash) ++{ ++ return hash->count; ++} ++ ++#endif /* _TRACE_FILTER_HASH_H */ +diff --git a/lib/trace-cmd/include/private/trace-hash.h b/lib/trace-cmd/include/private/trace-hash.h +new file mode 100644 +index 0000000..aa92cdf +--- /dev/null ++++ b/lib/trace-cmd/include/private/trace-hash.h +@@ -0,0 +1,55 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* ++ * Copyright (C) 2014 Red Hat Inc, Steven Rostedt ++ * ++ */ ++#ifndef _TRACE_HASH_H ++#define _TRACE_HASH_H ++ ++struct trace_hash_item { ++ struct trace_hash_item *next; ++ struct trace_hash_item *prev; ++ unsigned long long key; ++}; ++ ++struct trace_hash { ++ struct trace_hash_item **buckets; ++ int nr_buckets; ++ int power; ++}; ++ ++int trace_hash_init(struct trace_hash *hash, int buckets); ++void trace_hash_free(struct trace_hash *hash); ++int trace_hash_add(struct trace_hash *hash, struct trace_hash_item *item); ++int trace_hash_empty(struct trace_hash *hash); ++ ++static inline void trace_hash_del(struct trace_hash_item *item) ++{ ++ struct trace_hash_item *prev = item->prev; ++ ++ prev->next = item->next; ++ if (item->next) ++ item->next->prev = prev; ++} ++ ++#define trace_hash_for_each_bucket(bucket, hash) \ ++ for (bucket = (hash)->buckets; \ ++ (bucket) < (hash)->buckets + (hash)->nr_buckets; (bucket)++) ++ ++#define trace_hash_for_each_item(item, bucket) \ ++ for ((item = *(bucket)); item; item = (item)->next) ++ ++#define trace_hash_for_each_item_safe(item, n, bucket) \ ++ for ((item = *(bucket)), n = item ? item->next : NULL; item; \ ++ item = n, n = item ? (item)->next : NULL) ++ ++#define trace_hash_while_item(item, bucket) \ ++ while ((item = *(bucket))) ++ ++typedef int (*trace_hash_func)(struct trace_hash_item *item, void *data); ++ ++struct trace_hash_item * ++trace_hash_find(struct trace_hash *hash, unsigned long long key, ++ trace_hash_func match, void *data); ++ ++#endif /* _TRACE_HASH_H */ +diff --git a/lib/trace-cmd/include/private/trace-msg.h b/lib/trace-cmd/include/private/trace-msg.h +new file mode 100644 +index 0000000..aab8a69 +--- /dev/null ++++ b/lib/trace-cmd/include/private/trace-msg.h +@@ -0,0 +1,15 @@ ++#ifndef _TRACE_MSG_H_ ++#define _TRACE_MSG_H_ ++ ++#include ++ ++#define UDP_MAX_PACKET (65536 - 20) ++#define V3_MAGIC "766679\0" ++#define V3_CPU "-1V3" ++ ++#define V1_PROTOCOL 1 ++#define V3_PROTOCOL 3 ++ ++extern unsigned int page_size; ++ ++#endif /* _TRACE_MSG_H_ */ +diff --git a/lib/trace-cmd/include/trace-cmd-local.h b/lib/trace-cmd/include/trace-cmd-local.h +index 95dce66..d0a7365 100644 +--- a/lib/trace-cmd/include/trace-cmd-local.h ++++ b/lib/trace-cmd/include/trace-cmd-local.h +@@ -6,6 +6,8 @@ + #ifndef _TRACE_CMD_LOCAL_H + #define _TRACE_CMD_LOCAL_H + ++#include "trace-cmd-private.h" ++ + /* Can be overridden */ + void warning(const char *fmt, ...); + +diff --git a/lib/trace-cmd/trace-ftrace.c b/lib/trace-cmd/trace-ftrace.c +index 20bf71f..df7335f 100644 +--- a/lib/trace-cmd/trace-ftrace.c ++++ b/lib/trace-cmd/trace-ftrace.c +@@ -8,7 +8,7 @@ + #include + #include + +-#include "trace-cmd.h" ++#include "trace-cmd-private.h" + + struct tep_plugin_option trace_ftrace_options[] = { + { +diff --git a/lib/trace-cmd/trace-hooks.c b/lib/trace-cmd/trace-hooks.c +index 8c969a6..2dadf61 100644 +--- a/lib/trace-cmd/trace-hooks.c ++++ b/lib/trace-cmd/trace-hooks.c +@@ -8,7 +8,7 @@ + #include + #include + +-#include "trace-cmd.h" ++#include "trace-cmd-private.h" + #include "event-utils.h" + + struct hook_list *tracecmd_create_event_hook(const char *arg) +diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c +index 2a6e2b6..6b647d6 100644 +--- a/lib/trace-cmd/trace-recorder.c ++++ b/lib/trace-cmd/trace-recorder.c +@@ -13,7 +13,7 @@ + #include + + #include "tracefs.h" +-#include "trace-cmd.h" ++#include "trace-cmd-private.h" + #include "event-utils.h" + + /* F_GETPIPE_SZ was introduced in 2.6.35, older systems don't have it */ +diff --git a/lib/trace-cmd/trace-timesync.c b/lib/trace-cmd/trace-timesync.c +index 7a6a7eb..390e9d9 100644 +--- a/lib/trace-cmd/trace-timesync.c ++++ b/lib/trace-cmd/trace-timesync.c +@@ -17,7 +17,7 @@ + #include + #include + +-#include "trace-cmd.h" ++#include "trace-cmd-private.h" + #include "tracefs.h" + #include "event-utils.h" + #include "trace-tsync-local.h" +diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c +index 0ead96e..6b5d872 100644 +--- a/lib/trace-cmd/trace-util.c ++++ b/lib/trace-cmd/trace-util.c +@@ -21,7 +21,7 @@ + #include + #include + +-#include "trace-cmd.h" ++#include "trace-cmd-private.h" + #include "event-utils.h" + + #define LOCAL_PLUGIN_DIR ".trace-cmd/plugins" +diff --git a/lib/traceevent/plugins/plugin_python_loader.c b/lib/traceevent/plugins/plugin_python_loader.c +index 776bf12..01bdfad 100644 +--- a/lib/traceevent/plugins/plugin_python_loader.c ++++ b/lib/traceevent/plugins/plugin_python_loader.c +@@ -1,6 +1,7 @@ + #include + #include +-#include "trace-cmd.h" ++#include "event-parse.h" ++#include "trace-cmd-private.h" + + #ifndef PYTHON_DIR + #define PYTHON_DIR "." +diff --git a/python/ctracecmd.i b/python/ctracecmd.i +index 01cd0d5..5f7181c 100644 +--- a/python/ctracecmd.i ++++ b/python/ctracecmd.i +@@ -15,6 +15,7 @@ + + %{ + #include "trace-cmd.h" ++#include "event-parse.h" + #include "event-utils.h" + #include + %} +diff --git a/tracecmd/include/trace-local.h b/tracecmd/include/trace-local.h +index 207aa68..28d1b4e 100644 +--- a/tracecmd/include/trace-local.h ++++ b/tracecmd/include/trace-local.h +@@ -9,7 +9,7 @@ + #include + #include /* for DIR */ + +-#include "trace-cmd.h" ++#include "trace-cmd-private.h" + #include "event-utils.h" + + #define TRACE_AGENT_DEFAULT_PORT 823 +-- +2.29.2 + diff --git a/package/trace-cmd/0002-trace-cmd-make-it-build-against-musl-C-library.patch b/package/trace-cmd/0002-trace-cmd-make-it-build-against-musl-C-library.patch new file mode 100644 index 00000000..64021245 --- /dev/null +++ b/package/trace-cmd/0002-trace-cmd-make-it-build-against-musl-C-library.patch @@ -0,0 +1,140 @@ +From 1a000636c1828eecdcec5360a51623ef4ffbff04 Mon Sep 17 00:00:00 2001 +From: Beniamin Sandu +Date: Mon, 30 Nov 2020 14:27:55 +0200 +Subject: [PATCH] trace-cmd: make it build against musl C library + +* add some missing headers and macros +* set pthread affinity using pthread_setaffinity_np after creating the thread +instead of pthread_attr_setaffinity_np (which seems to not be implemented +in musl) + +Tested using https://musl.cc/x86_64-linux-musl-native.tgz + +Link: https://lore.kernel.org/linux-trace-devel/20201130122755.31000-1-beniaminsandu@gmail.com + +Reviewed-by: Tzvetomir Stoyanov (VMware) +Signed-off-by: Beniamin Sandu +[ Fixed a whitespace issue ] +Signed-off-by: Steven Rostedt (VMware) +[Retrieved from: +https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?id=1a000636c1828eecdcec5360a51623ef4ffbff04] +Signed-off-by: Fabrice Fontaine +--- + .../include/private/trace-cmd-private.h | 1 + + lib/trace-cmd/include/trace-cmd-local.h | 1 + + lib/tracefs/include/tracefs-local.h | 12 ++++++++++++ + lib/tracefs/tracefs-events.c | 1 + + tracecmd/include/trace-local.h | 1 + + tracecmd/trace-tsync.c | 16 +++++++++++----- + 6 files changed, 27 insertions(+), 5 deletions(-) + +diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h +index 458760e5..a0dac5da 100644 +--- a/lib/trace-cmd/include/private/trace-cmd-private.h ++++ b/lib/trace-cmd/include/private/trace-cmd-private.h +@@ -6,6 +6,7 @@ + #ifndef _TRACE_CMD_PRIVATE_H + #define _TRACE_CMD_PRIVATE_H + ++#include + #include "traceevent/event-parse.h" + #include "trace-cmd/trace-cmd.h" + +diff --git a/lib/trace-cmd/include/trace-cmd-local.h b/lib/trace-cmd/include/trace-cmd-local.h +index d0a7365a..0cd27441 100644 +--- a/lib/trace-cmd/include/trace-cmd-local.h ++++ b/lib/trace-cmd/include/trace-cmd-local.h +@@ -6,6 +6,7 @@ + #ifndef _TRACE_CMD_LOCAL_H + #define _TRACE_CMD_LOCAL_H + ++#include + #include "trace-cmd-private.h" + + /* Can be overridden */ +diff --git a/lib/tracefs/include/tracefs-local.h b/lib/tracefs/include/tracefs-local.h +index 9cc371b4..bdbf89e8 100644 +--- a/lib/tracefs/include/tracefs-local.h ++++ b/lib/tracefs/include/tracefs-local.h +@@ -13,4 +13,16 @@ void warning(const char *fmt, ...); + int str_read_file(const char *file, char **buffer); + char *trace_append_file(const char *dir, const char *name); + ++#ifndef ACCESSPERMS ++#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ ++#endif ++ ++#ifndef ALLPERMS ++#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ ++#endif ++ ++#ifndef DEFFILEMODE ++#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /* 0666*/ ++#endif ++ + #endif /* _TRACE_FS_LOCAL_H */ +diff --git a/lib/tracefs/tracefs-events.c b/lib/tracefs/tracefs-events.c +index 80a25ee5..a4e5215f 100644 +--- a/lib/tracefs/tracefs-events.c ++++ b/lib/tracefs/tracefs-events.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "kbuffer.h" + #include "tracefs.h" +diff --git a/tracecmd/include/trace-local.h b/tracecmd/include/trace-local.h +index 28d1b4e0..85c7e03e 100644 +--- a/tracecmd/include/trace-local.h ++++ b/tracecmd/include/trace-local.h +@@ -8,6 +8,7 @@ + + #include + #include /* for DIR */ ++#include + + #include "trace-cmd-private.h" + #include "event-utils.h" +diff --git a/tracecmd/trace-tsync.c b/tracecmd/trace-tsync.c +index e639788d..8b9083ae 100644 +--- a/tracecmd/trace-tsync.c ++++ b/tracecmd/trace-tsync.c +@@ -104,13 +104,16 @@ int tracecmd_host_tsync(struct buffer_instance *instance, + + pthread_attr_init(&attrib); + pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); +- if (!get_first_cpu(&pin_mask, &mask_size)) +- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); + + ret = pthread_create(&instance->tsync_thread, &attrib, + tsync_host_thread, &instance->tsync); +- if (!ret) ++ ++ if (!ret) { ++ if (!get_first_cpu(&pin_mask, &mask_size)) ++ pthread_setaffinity_np(instance->tsync_thread, mask_size, pin_mask); + instance->tsync_thread_running = true; ++ } ++ + if (pin_mask) + CPU_FREE(pin_mask); + pthread_attr_destroy(&attrib); +@@ -243,11 +246,14 @@ unsigned int tracecmd_guest_tsync(char *tsync_protos, + pthread_attr_init(&attrib); + tsync->sync_proto = proto; + pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); +- if (!get_first_cpu(&pin_mask, &mask_size)) +- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); + + ret = pthread_create(thr_id, &attrib, tsync_agent_thread, tsync); + ++ if (!ret) { ++ if (!get_first_cpu(&pin_mask, &mask_size)) ++ pthread_setaffinity_np(*thr_id, mask_size, pin_mask); ++ } ++ + if (pin_mask) + CPU_FREE(pin_mask); + pthread_attr_destroy(&attrib); diff --git a/package/trace-cmd/0003-trace-cmd-Move-add_event_pid-out-of-ifndef-NO_PTRACE.patch b/package/trace-cmd/0003-trace-cmd-Move-add_event_pid-out-of-ifndef-NO_PTRACE.patch new file mode 100644 index 00000000..ca32e69a --- /dev/null +++ b/package/trace-cmd/0003-trace-cmd-Move-add_event_pid-out-of-ifndef-NO_PTRACE.patch @@ -0,0 +1,51 @@ +From 2f55ded528cfd8ef468bdd1f8bb82dcf1cfae04a Mon Sep 17 00:00:00 2001 +From: "Steven Rostedt (VMware)" +Date: Wed, 16 Dec 2020 18:19:43 -0500 +Subject: [PATCH] trace-cmd: Move add_event_pid() out of #ifndef NO_PTRACE + +When NO_PTRACE is defined, add_event_pid() is also not defined, but it is +used outside of NO_PTRACE pre processor block. And this causes a +"add_event_pid" not defined build failure. + +Link: https://lore.kernel.org/linux-trace-devel/20201216232145.010165486@goodmis.org + +Fixes: 0844cff1c ("trace-cmd: Fix "trace-cmd reset" command to restore the default value of set_event_pid") +Signed-off-by: Steven Rostedt (VMware) +[Retrieved from: +https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?id=2f55ded528cfd8ef468bdd1f8bb82dcf1cfae04a] +Signed-off-by: Fabrice Fontaine +--- + tracecmd/trace-record.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c +index f8baed7d..e2d1cedf 100644 +--- a/tracecmd/trace-record.c ++++ b/tracecmd/trace-record.c +@@ -1312,8 +1312,13 @@ static int trace_wait_for_processes(struct buffer_instance *instance) { + free(pidfds); + return ret; + } +-#ifndef NO_PTRACE + ++static void add_event_pid(struct buffer_instance *instance, const char *buf) ++{ ++ tracefs_instance_file_write(instance->tracefs, "set_event_pid", buf); ++} ++ ++#ifndef NO_PTRACE + /** + * append_pid_filter - add a new pid to an existing filter + * @curr_filter: the filter to append to. If NULL, then allocate one +@@ -1369,11 +1374,6 @@ static void update_sched_events(struct buffer_instance *instance, int pid) + static int open_instance_fd(struct buffer_instance *instance, + const char *file, int flags); + +-static void add_event_pid(struct buffer_instance *instance, const char *buf) +-{ +- tracefs_instance_file_write(instance->tracefs, "set_event_pid", buf); +-} +- + static void add_new_filter_child_pid(int pid, int child) + { + struct buffer_instance *instance; diff --git a/package/trace-cmd/Config.in b/package/trace-cmd/Config.in new file mode 100644 index 00000000..574541c5 --- /dev/null +++ b/package/trace-cmd/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_TRACE_CMD + bool "trace-cmd" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # dlopen() + help + Command line reader for ftrace. + + To use this profiling tool, you should enable ftrace in your + kernel configuration. This command collect traces on your + target. You can analyse these traces on the target or on + the host via the gui "kernel shark" + + http://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git + +comment "trace-cmd needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/trace-cmd/trace-cmd.hash b/package/trace-cmd/trace-cmd.hash new file mode 100644 index 00000000..0afde670 --- /dev/null +++ b/package/trace-cmd/trace-cmd.hash @@ -0,0 +1,6 @@ +# Locally computed +sha256 8bab29530cd05272dccab48c9780644758e71ed990ce65c701b9095f7beae417 trace-cmd-trace-cmd-v2.9.1-br1.tar.gz +sha256 b1d04b850c1c7471b0f0896f6c6f0fcfc9f07e2dd183a5f5826af269fe9e88fb COPYING +sha256 70f297763149e72306919c924e164f83041d5e512868d4c8c1826c171b3e49f9 COPYING.LIB +sha256 f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79 LICENSES/GPL-2.0 +sha256 0b9a4febcdee6de55872501d5c1a8f5d8b0d1650cd4d5351995ceb22e889f8ca LICENSES/LGPL-2.1 diff --git a/package/trace-cmd/trace-cmd.mk b/package/trace-cmd/trace-cmd.mk new file mode 100644 index 00000000..cd3fcb97 --- /dev/null +++ b/package/trace-cmd/trace-cmd.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# trace-cmd +# +################################################################################ + +TRACE_CMD_VERSION = trace-cmd-v2.9.1 +TRACE_CMD_SITE = https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git +TRACE_CMD_SITE_METHOD = git +TRACE_CMD_LICENSE = GPL-2.0, LGPL-2.1 +TRACE_CMD_LICENSE_FILES = COPYING COPYING.LIB LICENSES/GPL-2.0 LICENSES/LGPL-2.1 + +TRACE_CMD_DEPENDENCIES = host-pkgconf +TRACE_CMD_MAKE_OPTS = prefix=/usr etcdir=/etc + +ifeq ($(BR2_PACKAGE_AUDIT),y) +TRACE_CMD_DEPENDENCIES += audit +endif + +ifeq ($(BR2_PACKAGE_PYTHON),y) +TRACE_CMD_DEPENDENCIES += python host-swig +TRACE_CMD_MAKE_OPTS += PYTHON_VERS=python +else ifeq ($(BR2_PACKAGE_PYTHON3),y) +TRACE_CMD_DEPENDENCIES += python3 host-swig +TRACE_CMD_MAKE_OPTS += PYTHON_VERS=python3 +else +TRACE_CMD_MAKE_OPTS += NO_PYTHON=1 +endif + +# trace-cmd already defines _LARGEFILE64_SOURCE when necessary, +# redefining it on the command line causes build problems. +TRACE_CMD_CFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS)) + +# trace-cmd use CPPFLAGS to add some extra flags. +# But like for CFLAGS, $(TARGET_CPPFLAGS) contains _LARGEFILE64_SOURCE +# that causes build problems. +TRACE_CMD_CPPFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CPPFLAGS)) + +define TRACE_CMD_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TRACE_CMD_CFLAGS)" \ + CPPFLAGS="$(TRACE_CMD_CPPFLAGS)" \ + $(MAKE) $(TRACE_CMD_MAKE_OPTS) -C $(@D) +endef + +define TRACE_CMD_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TRACE_CMD_CFLAGS)" \ + CPPFLAGS="$(TRACE_CMD_CPPFLAGS)" \ + DESTDIR=$(TARGET_DIR) \ + $(MAKE) $(TRACE_CMD_MAKE_OPTS) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/traceroute/Config.in b/package/traceroute/Config.in new file mode 100644 index 00000000..42ae5a30 --- /dev/null +++ b/package/traceroute/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_TRACEROUTE + bool "traceroute" + help + A new modern implementation of the traceroute(8) utility for + Linux systems. It tracks the route packets taken from an IP + network on their way to a given host. + + http://traceroute.sourceforge.net/ diff --git a/package/traceroute/traceroute.hash b/package/traceroute/traceroute.hash new file mode 100644 index 00000000..b9525487 --- /dev/null +++ b/package/traceroute/traceroute.hash @@ -0,0 +1,6 @@ +# Locally computed: +sha256 3669d22a34d3f38ed50caba18cd525ba55c5c00d5465f2d20d7472e5d81603b6 traceroute-2.1.0.tar.gz + +# Hash for license files: +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB diff --git a/package/traceroute/traceroute.mk b/package/traceroute/traceroute.mk new file mode 100644 index 00000000..a02982a6 --- /dev/null +++ b/package/traceroute/traceroute.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# traceroute +# +################################################################################ + +TRACEROUTE_VERSION = 2.1.0 +TRACEROUTE_SITE = http://downloads.sourceforge.net/traceroute/traceroute/traceroute-$(TRACEROUTE_VERSION) + +TRACEROUTE_LICENSE = GPL-2.0+, LGPL-2.1+ +TRACEROUTE_LICENSE_FILES = COPYING COPYING.LIB + +define TRACEROUTE_BUILD_CMDS + $(TARGET_MAKE_ENV) VPATH=$(STAGING_DIR)/usr/lib $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" -C $(@D) +endef + +define TRACEROUTE_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(TARGET_DIR) prefix=/usr install \ + INSTALL=$(INSTALL) -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/transmission/0001-fix-utypes.patch b/package/transmission/0001-fix-utypes.patch new file mode 100644 index 00000000..81efa884 --- /dev/null +++ b/package/transmission/0001-fix-utypes.patch @@ -0,0 +1,30 @@ +Fix build error "conflicting types for 'UTP_Write'" + +Fetch from: http://www.adminsehow.com/2012/10/how-to-install-transmission-2-71-on-debian-6-0-squeeze/ + +The corresponding upstream bug report (unfixed) can be found here: +https://trac.transmissionbt.com/ticket/5232 + +Signed-off-by: Bernd Kuhls +[Fabrice: adapt to 3.00, which always uses stdbool.h] +Signed-off-by: Fabrice Fontaine +[yann.morin.1998@free.fr: + - don't comment-out dropped code, just drop it + - use CR-LF in replacement code, as used by upstream +] +Signed-off-by: Yann E. MORIN + +--- transmission-2.82.org/third-party/libutp/utypes.h 2013-08-09 04:47:43.000000000 +0200 ++++ transmission-2.82/third-party/libutp/utypes.h 2014-01-02 20:17:18.000000000 +0100 +@@ -35,8 +35,8 @@ + typedef const char * cstr; + typedef char * str; + +-#ifndef __cplusplus +-typedef uint8 bool; +-#endif ++#ifndef __cplusplus ++#include ++#endif + + #endif //__UTYPES_H__ diff --git a/package/transmission/0002-fix-utp-include.patch b/package/transmission/0002-fix-utp-include.patch new file mode 100644 index 00000000..db8b5ab3 --- /dev/null +++ b/package/transmission/0002-fix-utp-include.patch @@ -0,0 +1,46 @@ +Fix compilation when using system libminiupnpc with libutp disabled + +If transmission uses its own copy of libminiupnpc in third-party/ then +the configure script adds that path to CFLAGS: +https://trac.transmissionbt.com/browser/trunk/configure.ac#L455 + +This path is also added if transmission uses its own copy of libutp: +https://trac.transmissionbt.com/browser/trunk/configure.ac#L349 + +But if a system-provided libminiupnpc is used and utp-support is +disabled using --disable-utp the result is a build error, detected by +buildroot autobuilders: +http://autobuild.buildroot.net/results/b79/b79e51140cb0320554a58ce59dcb33f53cd9211a/build-end.log + +net.c:40:24: fatal error: libutp/utp.h: No such file or directory + +Patch proposed by Yann E. MORIN: +http://lists.busybox.net/pipermail/buildroot/2016-July/167896.html + +Patch sent upstream: https://trac.transmissionbt.com/ticket/6163 + +Signed-off-by: Bernd Kuhls + +diff -uNr transmission-2.92.org/configure.ac transmission-2.92/configure.ac +--- transmission-2.92.org/configure.ac 2016-03-06 21:23:45.336198393 +0100 ++++ transmission-2.92/configure.ac 2016-07-31 12:13:40.921660078 +0200 +@@ -358,6 +358,10 @@ + else + AC_MSG_ERROR("Unable to build uTP support -- C++ compiler not found") + fi ++else ++ # For the system libminiupnpc with UTC disabled, ++ # point to our bundled UTP headers ++ LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/" + fi + AC_SUBST(LIBUTP_CFLAGS) + AC_SUBST(LIBUTP_LIBS) +@@ -457,7 +461,7 @@ + LIBUPNP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a" + else + AC_DEFINE([SYSTEM_MINIUPNP]) +- LIBUPNP_CFLAGS="" ++ LIBUPNP_CFLAGS="${LIBUTP_CFLAGS}" + LIBUPNP_LIBS="-lminiupnpc" + LIBUPNP_LIBS_QT="-lminiupnpc" + fi diff --git a/package/transmission/Config.in b/package/transmission/Config.in new file mode 100644 index 00000000..dac4d1b3 --- /dev/null +++ b/package/transmission/Config.in @@ -0,0 +1,47 @@ +config BR2_PACKAGE_TRANSMISSION + bool "transmission" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBEVENT + help + Transmission is a cross-platform BitTorrent client. + + http://www.transmissionbt.com/ + +if BR2_PACKAGE_TRANSMISSION + +config BR2_PACKAGE_TRANSMISSION_UTP + bool "Transmission uTP support" + depends on BR2_INSTALL_LIBSTDCPP + help + Install support for uTorrent Transport Protocol + +comment "uTP needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_TRANSMISSION_CLI + bool "transmission-cli" + help + Install transmission command line interface. + +config BR2_PACKAGE_TRANSMISSION_DAEMON + bool "transmission-daemon" + help + Install transmission daemon. + +config BR2_PACKAGE_TRANSMISSION_GTK + bool "transmission-gtk" + depends on BR2_PACKAGE_LIBGTK3 && BR2_SYSTEM_ENABLE_NLS + help + Install transmission GTK-based GUI interface. + +comment "transmission-gtk needs NLS enabled" + depends on BR2_PACKAGE_LIBGTK3 && !BR2_SYSTEM_ENABLE_NLS +endif + +comment "transmission needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/transmission/S92transmission b/package/transmission/S92transmission new file mode 100644 index 00000000..85ff40ec --- /dev/null +++ b/package/transmission/S92transmission @@ -0,0 +1,156 @@ +#!/bin/sh + +# Original Author: Lennart A. Jtte, based on Rob Howell's script +# Modified by Maarten Van Coile & others (on IRC) + +# Changes for buildroot: +# USERNAME points to 'default' in standard installation +# TODO: set logfile with --logfile option + +# Do NOT "set -e" + +# +# ----- CONFIGURATION ----- +# +# For the default location Transmission uses, visit: +# http://trac.transmissionbt.com/wiki/ConfigFiles +# For a guide on how set the preferences, visit: +# http://trac.transmissionbt.com/wiki/EditConfigFiles +# For the available environement variables, visit: +# http://trac.transmissionbt.com/wiki/EnvironmentVariables +# +# The name of the user that should run Transmission. +# It's RECOMENDED to run Transmission in it's own user, +# by default, this is set to 'transmission'. +# For the sake of security you shouldn't set a password +# on this user +USERNAME=transmission + + +# ----- *ADVANCED* CONFIGURATION ----- +# Only change these options if you know what you are doing! +# +# The folder where Transmission stores the config & web files. +# ONLY change this you have it at a non-default location +#TRANSMISSION_HOME="/var/config/transmission-daemon" +#TRANSMISSION_WEB_HOME="/usr/share/transmission/web" +# +# The arguments passed on to transmission-daemon. +# ONLY change this you need to, otherwise use the +# settings file as per above. +#TRANSMISSION_ARGS="" + + +# ----- END OF CONFIGURATION ----- +# +# PATH should only include /usr/* if it runs after the mountnfs.sh script. +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +DESC="bittorrent client" +NAME=transmission-daemon +DAEMON=$(which $NAME) +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# +# Function that starts the daemon/service +# + +start() +{ + # Export the configuration/web directory, if set + if [ -n "$TRANSMISSION_HOME" ]; then + export TRANSMISSION_HOME + fi + if [ -n "$TRANSMISSION_WEB_HOME" ]; then + export TRANSMISSION_WEB_HOME + fi + + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \ + --exec $DAEMON --background --test -- -f $TRANSMISSION_ARGS > /dev/null \ + || return 1 + start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \ + --exec $DAEMON --background -- -f $TRANSMISSION_ARGS \ + || return 2 +} + +# +# Function that stops the daemon/service +# +stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 --pidfile $PIDFILE --exec $DAEMON + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + + return "$RETVAL" +} + +case "$1" in + start) + echo "Starting $DESC" "$NAME..." + start + case "$?" in + 0|1) echo " Starting $DESC $NAME succeeded" ;; + *) echo " Starting $DESC $NAME failed" ;; + esac + ;; + stop) + echo "Stopping $DESC $NAME..." + stop + case "$?" in + 0|1) echo " Stopping $DESC $NAME succeeded" ;; + *) echo " Stopping $DESC $NAME failed" ;; + esac + ;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + echo "Restarting $DESC $NAME..." + stop + case "$?" in + 0|1) + start + case "$?" in + 0|1) echo " Restarting $DESC $NAME succeeded" ;; + *) echo " Restarting $DESC $NAME failed: couldn't start $NAME" ;; + esac + ;; + *) + echo " Restarting $DESC $NAME failed: couldn't stop $NAME" ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/package/transmission/transmission.hash b/package/transmission/transmission.hash new file mode 100644 index 00000000..13cbc969 --- /dev/null +++ b/package/transmission/transmission.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2 transmission-3.00.tar.xz +sha256 2b16da5bd02790d1e4d332cfd42b9dfd7d1b0ed3a16a75dc7e76b6ed239fdba9 COPYING diff --git a/package/transmission/transmission.mk b/package/transmission/transmission.mk new file mode 100644 index 00000000..1660d2c2 --- /dev/null +++ b/package/transmission/transmission.mk @@ -0,0 +1,83 @@ +################################################################################ +# +# transmission +# +################################################################################ + +TRANSMISSION_VERSION = 3.00 +TRANSMISSION_SITE = https://github.com/transmission/transmission-releases/raw/master +TRANSMISSION_SOURCE = transmission-$(TRANSMISSION_VERSION).tar.xz +TRANSMISSION_DEPENDENCIES = \ + host-pkgconf \ + host-intltool \ + libcurl \ + libevent \ + openssl \ + zlib +TRANSMISSION_AUTORECONF = YES +TRANSMISSION_CONF_OPTS = \ + --without-inotify \ + --enable-lightweight +TRANSMISSION_LICENSE = GPL-2.0 or GPL-3.0 with OpenSSL exception +TRANSMISSION_LICENSE_FILES = COPYING +TRANSMISSION_CPE_ID_VENDOR = transmissionbt + +ifeq ($(BR2_PACKAGE_LIBMINIUPNPC),y) +TRANSMISSION_DEPENDENCIES += libminiupnpc +endif + +ifeq ($(BR2_PACKAGE_LIBNATPMP),y) +TRANSMISSION_DEPENDENCIES += libnatpmp +TRANSMISSION_CONF_OPTS += --enable-external-natpmp +else +TRANSMISSION_CONF_OPTS += --disable-external-natpmp +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_UTP),y) +TRANSMISSION_CONF_OPTS += --enable-utp +else +TRANSMISSION_CONF_OPTS += --disable-utp +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_CLI),y) +TRANSMISSION_CONF_OPTS += --enable-cli +else +TRANSMISSION_CONF_OPTS += --disable-cli +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_DAEMON),y) +TRANSMISSION_CONF_OPTS += --enable-daemon + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +TRANSMISSION_DEPENDENCIES += systemd +TRANSMISSION_CONF_OPTS += --with-systemd +else +TRANSMISSION_CONF_OPTS += --without-systemd +endif + +define TRANSMISSION_USERS + transmission -1 transmission -1 * /var/lib/transmission - transmission Transmission Daemon +endef + +define TRANSMISSION_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/transmission/S92transmission \ + $(TARGET_DIR)/etc/init.d/S92transmission +endef + +define TRANSMISSION_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/daemon/transmission-daemon.service \ + $(TARGET_DIR)/usr/lib/systemd/system/transmission-daemon.service +endef + +else +TRANSMISSION_CONF_OPTS += --disable-daemon +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_GTK),y) +TRANSMISSION_CONF_OPTS += --with-gtk +TRANSMISSION_DEPENDENCIES += libgtk3 +else +TRANSMISSION_CONF_OPTS += --without-gtk +endif + +$(eval $(autotools-package)) diff --git a/package/tree/Config.in b/package/tree/Config.in new file mode 100644 index 00000000..234995f1 --- /dev/null +++ b/package/tree/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_TREE + bool "tree" + depends on BR2_USE_WCHAR + help + Tree is a recursive directory listing command that produces + a depth indented listing of files, which is colorized ala + dircolors if the LS_COLORS environment variable is set and + output is to tty. + + http://mama.indstate.edu/users/ice/tree/ + +comment "tree needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/tree/tree.hash b/package/tree/tree.hash new file mode 100644 index 00000000..6bffaa5e --- /dev/null +++ b/package/tree/tree.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 715d5d4b434321ce74706d0dd067505bb60c5ea83b5f0b3655dae40aa6f9b7c2 tree-1.8.0.tgz +sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 LICENSE diff --git a/package/tree/tree.mk b/package/tree/tree.mk new file mode 100644 index 00000000..b6c63c02 --- /dev/null +++ b/package/tree/tree.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tree +# +################################################################################ + +TREE_VERSION = 1.8.0 +TREE_SOURCE = tree-$(TREE_VERSION).tgz +TREE_SITE = http://mama.indstate.edu/users/ice/tree/src +TREE_LICENSE = GPL-2.0+ +TREE_LICENSE_FILES = LICENSE + +define TREE_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define TREE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tree $(TARGET_DIR)/usr/bin/tree +endef + +$(eval $(generic-package)) diff --git a/package/tremor/Config.in b/package/tremor/Config.in new file mode 100644 index 00000000..ec7b8f8c --- /dev/null +++ b/package/tremor/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_TREMOR + bool "tremor (fixed point vorbis decoder)" + select BR2_PACKAGE_LIBOGG + help + Tremor is a fixed point implementation of an Ogg Vorbis + decoder. It provides a decoding API similar to libvorbis, + but gives much better performance on systems without a + floating-point unit. + + https://wiki.xiph.org/Tremor diff --git a/package/tremor/tremor.hash b/package/tremor/tremor.hash new file mode 100644 index 00000000..89d8bde8 --- /dev/null +++ b/package/tremor/tremor.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 a387ebb4536ca98034eb91855616b971b0a85575943699b2a6d0be79b4a9f6a9 tremor-7c30a66346199f3f09017a09567c6c8a3a0eedc8-br1.tar.gz +sha256 d2ab5758336489da61c12cc5bb757da5339c4ae9001f9bb0562b4370249af814 COPYING diff --git a/package/tremor/tremor.mk b/package/tremor/tremor.mk new file mode 100644 index 00000000..a865e681 --- /dev/null +++ b/package/tremor/tremor.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# tremor +# +################################################################################ + +TREMOR_VERSION = 7c30a66346199f3f09017a09567c6c8a3a0eedc8 +TREMOR_SITE = https://gitlab.xiph.org/xiph/tremor.git +TREMOR_SITE_METHOD = git +TREMOR_LICENSE = BSD-3-Clause +TREMOR_LICENSE_FILES = COPYING + +TREMOR_AUTORECONF = YES +TREMOR_INSTALL_STAGING = YES +TREMOR_DEPENDENCIES = libogg + +# tremor has ARM assembly code that cannot be compiled in Thumb2 mode, +# so we must force the traditional ARM mode. +# However, some ARM architectures like ARNv7-M only supports Thumb +# instructions, but the tremor build configuration enables ARM assembly +# code unconditionally for all arm triplets by defining _ARM_ASSEM_. +# We are overriding this by undefining this macro for the ARM +# architectures not supporting ARM instructions. +ifeq ($(BR2_arm),y) +ifeq ($(BR2_ARM_CPU_HAS_ARM),y) +TREMOR_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -marm" +else +TREMOR_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -U_ARM_ASSEM_" +endif +endif + +$(eval $(autotools-package)) diff --git a/package/triggerhappy/Config.in b/package/triggerhappy/Config.in new file mode 100644 index 00000000..a7864b37 --- /dev/null +++ b/package/triggerhappy/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TRIGGERHAPPY + bool "triggerhappy" + depends on BR2_USE_MMU # fork() + help + Triggerhappy is a hotkey daemon developed with small and + embedded systems in mind, e.g. linux based routers. It + attaches to the input device files and interprets the event + data received and executes scripts configured in its + configuration. + + https://github.com/wertarbyte/triggerhappy diff --git a/package/triggerhappy/S10triggerhappy b/package/triggerhappy/S10triggerhappy new file mode 100644 index 00000000..48538730 --- /dev/null +++ b/package/triggerhappy/S10triggerhappy @@ -0,0 +1,36 @@ +#!/bin/sh + +NAME=thd +PIDFILE=/var/run/$NAME.pid +DAEMON_ARGS="--daemon --triggers /etc/triggerhappy/triggers.d --socket /var/run/thd.socket --pidfile $PIDFILE --user nobody /dev/input/event*" + +[ -r /etc/default/triggerhappy ] && . /etc/default/triggerhappy + +start() { + printf "Starting $NAME: " + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec /usr/sbin/thd -- $DAEMON_ARGS \ + && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping $NAME: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + && echo "OK" || echo "FAIL" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + sleep 1 + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/triggerhappy/triggerhappy.hash b/package/triggerhappy/triggerhappy.hash new file mode 100644 index 00000000..ab736cad --- /dev/null +++ b/package/triggerhappy/triggerhappy.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 1b3221963b9adca26eacc5442d8c2422cf2072f8adde1dbd691a69b37a583fb1 triggerhappy-b822888066129350e51ad79f1cf307fa38dae4f7.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/triggerhappy/triggerhappy.mk b/package/triggerhappy/triggerhappy.mk new file mode 100644 index 00000000..f83a5578 --- /dev/null +++ b/package/triggerhappy/triggerhappy.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# triggerhappy +# +################################################################################ + +TRIGGERHAPPY_VERSION = b822888066129350e51ad79f1cf307fa38dae4f7 +TRIGGERHAPPY_SITE = $(call github,wertarbyte,triggerhappy,$(TRIGGERHAPPY_VERSION)) +TRIGGERHAPPY_LICENSE = GPL-3.0+ +TRIGGERHAPPY_LICENSE_FILES = COPYING +TRIGGERHAPPY_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +TRIGGERHAPPY_DEPENDENCIES += systemd +endif + +define TRIGGERHAPPY_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) PKGCONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + -C $(@D) thd th-cmd +endef + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +define TRIGGERHAPPY_INSTALL_UDEV_RULE + $(INSTALL) -D -m 0644 $(@D)/udev/triggerhappy-udev.rules \ + $(TARGET_DIR)/lib/udev/rules.d/triggerhappy.rules +endef +endif + +define TRIGGERHAPPY_INSTALL_TARGET_CMDS + $(INSTALL) -d $(TARGET_DIR)/etc/triggerhappy/triggers.d + $(INSTALL) -D -m 0755 $(@D)/thd $(TARGET_DIR)/usr/sbin/thd + $(INSTALL) -D -m 0755 $(@D)/th-cmd $(TARGET_DIR)/usr/sbin/th-cmd + $(TRIGGERHAPPY_INSTALL_UDEV_RULE) +endef + +define TRIGGERHAPPY_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/triggerhappy/S10triggerhappy \ + $(TARGET_DIR)/etc/init.d/S10triggerhappy +endef + +define TRIGGERHAPPY_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/triggerhappy/triggerhappy.service \ + $(TARGET_DIR)/usr/lib/systemd/system/triggerhappy.service +endef + +$(eval $(generic-package)) diff --git a/package/triggerhappy/triggerhappy.service b/package/triggerhappy/triggerhappy.service new file mode 100644 index 00000000..8431afe9 --- /dev/null +++ b/package/triggerhappy/triggerhappy.service @@ -0,0 +1,9 @@ +[Unit] +Description=Triggerhappy daemon + +[Service] +ExecStart=/usr/sbin/thd --triggers /etc/triggerhappy/triggers.d --socket /var/run/thd.socket --user nobody --deviceglob /dev/input/event* +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/trinity/0001-Fix-build-with-GCC-10.patch b/package/trinity/0001-Fix-build-with-GCC-10.patch new file mode 100644 index 00000000..5ae3735d --- /dev/null +++ b/package/trinity/0001-Fix-build-with-GCC-10.patch @@ -0,0 +1,38 @@ +From e53e25cc8dd5bdb5f7d9b4247de9e9921eec81d8 Mon Sep 17 00:00:00 2001 +From: Vinson Lee +Date: Thu, 30 Jan 2020 22:09:45 -0800 +Subject: [PATCH] Fix build with GCC 10. + + CC trinity +/usr/bin/ld: debug.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: log-files.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: log.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: main.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: output.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: params.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: shm.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here +/usr/bin/ld: trinity.o:include/logfile.h:8: multiple definition of `mainlogfile'; child.o:include/logfile.h:8: first defined here + +Fixes: 13856316c259 ("reinstate the log-to-file code for now.") +Signed-off-by: Vinson Lee + +[Retrieved from: +https://github.com/kernelslacker/trinity/commit/e53e25cc8dd5bdb5f7d9b4247de9e9921eec81d8] +Signed-off-by: Fabrice Fontaine +--- + include/logfile.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/logfile.h b/include/logfile.h +index 90ea8b23..2305ac15 100644 +--- a/include/logfile.h ++++ b/include/logfile.h +@@ -5,7 +5,7 @@ + FILE *find_logfile_handle(void); + void synclogs(void); + +-FILE *mainlogfile; ++extern FILE *mainlogfile; + void open_main_logfile(void); + void close_logfile(FILE **handle); + diff --git a/package/trinity/Config.in b/package/trinity/Config.in new file mode 100644 index 00000000..31a93057 --- /dev/null +++ b/package/trinity/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_TRINITY_ARCH_SUPPORTS + bool + default y + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # __sync_val_compare_and_swap_4 + depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \ + BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 || \ + BR2_powerpc64le || BR2_sparc || BR2_x86_64 + +config BR2_PACKAGE_TRINITY + bool "trinity" + depends on BR2_PACKAGE_TRINITY_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 # IPV6_UNICAST_IF + help + A Linux System call fuzz tester + + http://codemonkey.org.uk/projects/trinity/ + +comment "trinity needs a toolchain w/ headers >= 3.4" + depends on BR2_PACKAGE_TRINITY_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 diff --git a/package/trinity/trinity.hash b/package/trinity/trinity.hash new file mode 100644 index 00000000..f7522514 --- /dev/null +++ b/package/trinity/trinity.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 7e0da953c2cc6fb3907d1f37d35f61836433fb50e97117a72eef113abb783dc6 trinity-1.9.tar.xz +sha256 35e3fc68c89fd7b8f72fd910b521cb3292f859e9181f3c26bd0df84d144bc1d4 COPYING diff --git a/package/trinity/trinity.mk b/package/trinity/trinity.mk new file mode 100644 index 00000000..befb8de8 --- /dev/null +++ b/package/trinity/trinity.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# trinity +# +################################################################################ + +TRINITY_VERSION = 1.9 +TRINITY_SITE = http://codemonkey.org.uk/projects/trinity +TRINITY_SOURCE = trinity-$(TRINITY_VERSION).tar.xz +TRINITY_LICENSE = GPL-2.0 +TRINITY_LICENSE_FILES = COPYING +TRINITY_CPE_ID_VENDOR = trinity_project + +define TRINITY_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure) +endef + +define TRINITY_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define TRINITY_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR)/usr install +endef + +# Install helper scripts +define TRINITY_INSTALL_HELPER_SCRIPTS + mkdir -p $(TARGET_DIR)/usr/libexec/trinity + cp -p $(@D)/scripts/* $(TARGET_DIR)/usr/libexec/trinity/ +endef +TRINITY_POST_INSTALL_TARGET_HOOKS += TRINITY_INSTALL_HELPER_SCRIPTS + +$(eval $(generic-package)) diff --git a/package/trousers/0001-Check-if-the-compiler-understands-pie-and-relro-options.patch b/package/trousers/0001-Check-if-the-compiler-understands-pie-and-relro-options.patch new file mode 100644 index 00000000..b1179eb4 --- /dev/null +++ b/package/trousers/0001-Check-if-the-compiler-understands-pie-and-relro-options.patch @@ -0,0 +1,214 @@ +From 9abda1bb380bdbef1affaec381742ced394ca118 Mon Sep 17 00:00:00 2001 +From: Lada Trimasova +Date: Mon, 18 Jan 2016 15:58:19 +0300 +Subject: [PATCH] Check if the compiler understands pie and relro options + +-pie and -fpie enable the building of position-independent +executables, and -Wl,-z,relro turns on read-only relocation support in gcc. +Add checks to ensure that the compiler and linker understand these options. + +Signed-off-by: Lada Trimasova +[Bernd: Rebased for version 0.3.14] +Signed-off-by: Bernd Kuhls +--- + configure.ac | 5 +++ + m4/ax_check_compile_flag.m4 | 72 ++++++++++++++++++++++++++++++++++++ + m4/ax_check_link_flag.m4 | 71 +++++++++++++++++++++++++++++++++++ + src/tcsd/Makefile.am | 4 +- + 4 files changed, 150 insertions(+), 2 deletions(-) + create mode 100644 m4/ax_check_compile_flag.m4 + create mode 100644 m4/ax_check_link_flag.m4 + +diff --git a/configure.in b/configure.in +index add23dc..9603353 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -12,6 +12,7 @@ TSS_VER_MINOR=3 + # compute $target + AC_CANONICAL_TARGET + AM_INIT_AUTOMAKE([foreign subdir-objects 1.6]) ++AC_CONFIG_MACRO_DIR([m4]) + + # Debugging support + AC_ARG_ENABLE([debug], +@@ -383,6 +384,10 @@ elif test x"${prefix}" = x"NONE"; then + localstatedir="/usr/local/var" + fi + ++AX_CHECK_COMPILE_FLAG([-fPIE -DPIE], [PIE_CFLAGS="-fPIE -DPIE"]) ++AX_CHECK_LINK_FLAG([-pie], [PIE_LDFLAGS="$PIE_LDFLAGS -pie"]) ++AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"]) ++ + AC_OUTPUT(dist/tcsd.conf \ + dist/fedora/trousers.spec \ + dist/trousers.spec \ +diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 +new file mode 100644 +index 0000000..c3a8d69 +--- /dev/null ++++ b/m4/ax_check_compile_flag.m4 +@@ -0,0 +1,72 @@ ++# =========================================================================== ++# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) ++# ++# DESCRIPTION ++# ++# Check whether the given FLAG works with the current language's compiler ++# or gives an error. (Warnings, however, are ignored) ++# ++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on ++# success/failure. ++# ++# If EXTRA-FLAGS is defined, it is added to the current language's default ++# flags (e.g. CFLAGS) when the check is done. The check is thus made with ++# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to ++# force the compiler to issue an error when a bad flag is given. ++# ++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this ++# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Guido U. Draheim ++# Copyright (c) 2011 Maarten Bosmans ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see . ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 2 ++ ++AC_DEFUN([AX_CHECK_COMPILE_FLAG], ++[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX ++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl ++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ++ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS ++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], ++ [AS_VAR_SET(CACHEVAR,[yes])], ++ [AS_VAR_SET(CACHEVAR,[no])]) ++ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) ++AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], ++ [m4_default([$2], :)], ++ [m4_default([$3], :)]) ++AS_VAR_POPDEF([CACHEVAR])dnl ++])dnl AX_CHECK_COMPILE_FLAGS +diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4 +new file mode 100644 +index 0000000..e2d0d36 +--- /dev/null ++++ b/m4/ax_check_link_flag.m4 +@@ -0,0 +1,71 @@ ++# =========================================================================== ++# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) ++# ++# DESCRIPTION ++# ++# Check whether the given FLAG works with the linker or gives an error. ++# (Warnings, however, are ignored) ++# ++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on ++# success/failure. ++# ++# If EXTRA-FLAGS is defined, it is added to the linker's default flags ++# when the check is done. The check is thus made with the flags: "LDFLAGS ++# EXTRA-FLAGS FLAG". This can for example be used to force the linker to ++# issue an error when a bad flag is given. ++# ++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this ++# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Guido U. Draheim ++# Copyright (c) 2011 Maarten Bosmans ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see . ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 2 ++ ++AC_DEFUN([AX_CHECK_LINK_FLAG], ++[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl ++AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ ++ ax_check_save_flags=$LDFLAGS ++ LDFLAGS="$LDFLAGS $4 $1" ++ AC_LINK_IFELSE([AC_LANG_PROGRAM()], ++ [AS_VAR_SET(CACHEVAR,[yes])], ++ [AS_VAR_SET(CACHEVAR,[no])]) ++ LDFLAGS=$ax_check_save_flags]) ++AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], ++ [m4_default([$2], :)], ++ [m4_default([$3], :)]) ++AS_VAR_POPDEF([CACHEVAR])dnl ++])dnl AX_CHECK_LINK_FLAGS +diff --git a/src/tcsd/Makefile.am b/src/tcsd/Makefile.am +index 2210734..6640ab2 100644 +--- a/src/tcsd/Makefile.am ++++ b/src/tcsd/Makefile.am +@@ -1,8 +1,8 @@ + sbin_PROGRAMS=tcsd + +-tcsd_CFLAGS=-DAPPID=\"TCSD\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -I${top_srcdir}/src/include -fPIE -DPIE ++tcsd_CFLAGS=-DAPPID=\"TCSD\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -I${top_srcdir}/src/include $(PIE_CFLAGS) + tcsd_LDADD=${top_builddir}/src/tcs/libtcs.a ${top_builddir}/src/tddl/libtddl.a -lpthread @CRYPTOLIB@ +-tcsd_LDFLAGS=@TCSD_LDFLAGS@ ++tcsd_LDFLAGS=$(PIE_LDFLAGS) $(RELRO_LDFLAGS) + tcsd_SOURCES=svrside.c tcsd_conf.c tcsd_threads.c platform.c + + if TSS_BUILD_PS diff --git a/package/trousers/0002-Check-that-getpwent_r-is-available-before-using-it.patch b/package/trousers/0002-Check-that-getpwent_r-is-available-before-using-it.patch new file mode 100644 index 00000000..ab2418c7 --- /dev/null +++ b/package/trousers/0002-Check-that-getpwent_r-is-available-before-using-it.patch @@ -0,0 +1,82 @@ +From 9e42c405f30d2b52d019598436ea346ef8586f43 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?No=C3=A9=20Rubinstein?= +Date: Wed, 24 Aug 2016 18:55:25 +0200 +Subject: [PATCH] Check that getpwent_r is available before using it + +This fixes building trousers with musl + +Signed-off-by: Noé Rubinstein +[Bernd: Rebased for version 0.3.14] +Signed-off-by: Bernd Kuhls +--- + configure.ac | 4 ++++ + src/tspi/ps/tspps.c | 10 +++++----- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/configure.in b/configure.in +index fd3f5f1..e3d7acf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -145,6 +145,10 @@ else + AC_MSG_ERROR(["gtk", "openssl" and "none" are the only supported gui options for trousers]) + fi + ++# Look for getpwent_r. If it is not found, getpwent will be used instead, with ++# an additional mutex. ++AC_CHECK_FUNC(getpwent_r, [AC_DEFINE(HAVE_GETPWENT_R)]) ++ + # + # The default port that the TCS daemon listens on + # +diff --git a/src/tspi/ps/tspps.c b/src/tspi/ps/tspps.c +index c6f9c3d..9d00d2a 100644 +--- a/src/tspi/ps/tspps.c ++++ b/src/tspi/ps/tspps.c +@@ -45,7 +45,7 @@ + + static int user_ps_fd = -1; + static MUTEX_DECLARE_INIT(user_ps_lock); +-#if (defined (__FreeBSD__) || defined (__OpenBSD__)) ++#ifndef HAVE_GETPWENT_R + static MUTEX_DECLARE_INIT(user_ps_path); + #endif + static struct flock fl; +@@ -60,7 +60,7 @@ get_user_ps_path(char **file) + TSS_RESULT result; + char *file_name = NULL, *home_dir = NULL; + struct passwd *pwp; +-#if (defined (__linux) || defined (linux) || defined(__GLIBC__)) ++#ifdef HAVE_GETPWENT_R + struct passwd pw; + #endif + struct stat stat_buf; +@@ -72,7 +72,7 @@ get_user_ps_path(char **file) + *file = strdup(file_name); + return (*file) ? TSS_SUCCESS : TSPERR(TSS_E_OUTOFMEMORY); + } +-#if (defined (__FreeBSD__) || defined (__OpenBSD__)) ++#ifndef HAVE_GETPWENT_R + MUTEX_LOCK(user_ps_path); + #endif + +@@ -90,7 +90,7 @@ get_user_ps_path(char **file) + #else + setpwent(); + while (1) { +-#if (defined (__linux) || defined (linux) || defined(__GLIBC__)) ++#ifdef HAVE_GETPWENT_R + rc = getpwent_r(&pw, buf, PASSWD_BUFSIZE, &pwp); + if (rc) { + LogDebugFn("USER PS: Error getting path to home directory: getpwent_r: %s", +@@ -99,7 +99,7 @@ get_user_ps_path(char **file) + return TSPERR(TSS_E_INTERNAL_ERROR); + } + +-#elif (defined (__FreeBSD__) || defined (__OpenBSD__)) ++#else + if ((pwp = getpwent()) == NULL) { + LogDebugFn("USER PS: Error getting path to home directory: getpwent: %s", + strerror(rc)); +-- +2.1.4 + diff --git a/package/trousers/Config.in b/package/trousers/Config.in new file mode 100644 index 00000000..998df983 --- /dev/null +++ b/package/trousers/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_TROUSERS + bool "trousers" + depends on BR2_TOOLCHAIN_HAS_THREADS + # doesn't build properly in static only configurations + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + The open-source TCG Software Stack (TSS). + + This library enables the use of a Trusted Platform Module + that complies with the TPM specification, version 1.2. It + implements the TSS specification, version 1.2. + + http://trousers.sourceforge.net/ + +comment "trousers needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/trousers/trousers.hash b/package/trousers/trousers.hash new file mode 100644 index 00000000..f6c34274 --- /dev/null +++ b/package/trousers/trousers.hash @@ -0,0 +1,6 @@ +# http://sourceforge.net/projects/trousers/files/trousers/0.3.15/ +sha1 75cd40e17c9385299e50ff2099905865442b59f1 trousers-0.3.15.tar.gz +md5 eb1b02e98c7d360749b9076196db3f0f trousers-0.3.15.tar.gz +# Locally computed +sha256 1e5be93e518372acf1d92d2f567d01a46fdb0b730487e544e6fb896c59cac77f trousers-0.3.15.tar.gz +sha256 1ad596d12e7471549663c03e280b5b5d084a2e853fb86e4d766109818f9d7dae LICENSE diff --git a/package/trousers/trousers.mk b/package/trousers/trousers.mk new file mode 100644 index 00000000..b84425de --- /dev/null +++ b/package/trousers/trousers.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# trousers +# +################################################################################ + +TROUSERS_VERSION = 0.3.15 +TROUSERS_SITE = http://downloads.sourceforge.net/project/trousers/trousers/$(TROUSERS_VERSION) +TROUSERS_LICENSE = BSD-3-Clause +TROUSERS_LICENSE_FILES = LICENSE +TROUSERS_CPE_ID_VENDOR = trustedcomputinggroup +TROUSERS_INSTALL_STAGING = YES +# Need autoreconf because of a patch touching configure.in and Makefile.am +TROUSERS_AUTORECONF = YES +TROUSERS_DEPENDENCIES = host-pkgconf openssl + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +TROUSERS_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_arc770d)$(BR2_arc750d),y) +TROUSERS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mno-compact-casesi" +endif + +# The TrouSerS build system attempts to create the tss user and group +# on the host system. Disable the user checking feature as a +# workaround. +TROUSERS_CONF_OPTS += --disable-usercheck + +ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),) +TROUSERS_CONF_ENV += \ + ax_cv_check_cflags___fPIE__DPIE=no \ + ax_cv_check_ldflags___pie=no +endif + +$(eval $(autotools-package)) diff --git a/package/ts4900-fpga/Config.in b/package/ts4900-fpga/Config.in new file mode 100644 index 00000000..7aa94e26 --- /dev/null +++ b/package/ts4900-fpga/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TS4900_FPGA + bool "ts4900-fpga" + depends on BR2_arm + help + TS-4900's FPGA implements clocks, UART MUX, and GPIOs. One + of these GPIOs is used to enable the wifi module. + + It is loaded by U-Boot during the boot sequence, the default + U-boot script expects to find it in the /boot folder. + + http://wiki.embeddedarm.com/wiki/TS-4900#FPGA_Changelog diff --git a/package/ts4900-fpga/ts4900-fpga.hash b/package/ts4900-fpga/ts4900-fpga.hash new file mode 100644 index 00000000..2147aeb3 --- /dev/null +++ b/package/ts4900-fpga/ts4900-fpga.hash @@ -0,0 +1,5 @@ +# From ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/fpga/ts4900-fpga-20150930.bin.md5 +md5 bf93c03ef914cf008287c8cd60781cc8 ts4900-fpga-20150930.bin + +# Locally calculated +sha256 242ac6a90bea9a95c937ea8952cdc9b02f543cea24a0359bed66a408a6dd8bf9 ts4900-fpga-20150930.bin diff --git a/package/ts4900-fpga/ts4900-fpga.mk b/package/ts4900-fpga/ts4900-fpga.mk new file mode 100644 index 00000000..7bb62a39 --- /dev/null +++ b/package/ts4900-fpga/ts4900-fpga.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# ts4900-fpga +# +################################################################################ + +TS4900_FPGA_VERSION = 20150930 +TS4900_FPGA_SOURCE = ts4900-fpga-$(TS4900_FPGA_VERSION).bin +TS4900_FPGA_SITE = ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/fpga +# No license file provided, Yocto recipe from the vendor claims MIT. +# https://github.com/embeddedarm/meta-ts/blob/f31860f1204b64f765a5380d3b93a2cf18234f90/recipes-extras/ts4900-fpga/ts4900-fpga.bb#L6 + +define TS4900_FPGA_EXTRACT_CMDS + cp $(TS4900_FPGA_DL_DIR)/$(TS4900_FPGA_SOURCE) $(@D) +endef + +define TS4900_FPGA_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/$(TS4900_FPGA_SOURCE) $(TARGET_DIR)/boot/ts4900-fpga.bin +endef + +$(eval $(generic-package)) diff --git a/package/tslib/Config.in b/package/tslib/Config.in new file mode 100644 index 00000000..a2e1e7ff --- /dev/null +++ b/package/tslib/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TSLIB + bool "tslib" + help + Tslib is a filtering layer for touchscreen panel events. + + http://tslib.org diff --git a/package/tslib/tslib.hash b/package/tslib/tslib.hash new file mode 100644 index 00000000..762fbebb --- /dev/null +++ b/package/tslib/tslib.hash @@ -0,0 +1,5 @@ +# https://github.com/libts/tslib/releases/download/1.22/tslib-1.22.tar.xz.sha256 +sha256 aaf0aed410a268d7b51385d07fe4d9d64312038e87c447ec8a24c8db0a15617a tslib-1.22.tar.xz + +# Locally computed +sha256 9b872a8a070b8ad329c4bd380fb1bf0000f564c75023ec8e1e6803f15364b9e9 COPYING diff --git a/package/tslib/tslib.mk b/package/tslib/tslib.mk new file mode 100644 index 00000000..45e29808 --- /dev/null +++ b/package/tslib/tslib.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# tslib +# +################################################################################ + +TSLIB_VERSION = 1.22 +TSLIB_SITE = https://github.com/libts/tslib/releases/download/$(TSLIB_VERSION) +TSLIB_SOURCE = tslib-$(TSLIB_VERSION).tar.xz +TSLIB_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (libraries) +TSLIB_LICENSE_FILES = COPYING + +TSLIB_INSTALL_STAGING = YES +TSLIB_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install + +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6),) +TSLIB_CONF_OPTS += --disable-tools +endif + +ifeq ($(BR2_STATIC_LIBS),y) +TSLIB_CONF_OPTS += \ + --enable-input=static \ + --enable-linear=static \ + --enable-median=static \ + --enable-pthres=static \ + --enable-iir=static \ + --enable-dejitter=static \ + --enable-debounce=static \ + --enable-skip=static \ + --enable-lowpass=static \ + --enable-invert=static \ + --enable-evthres=static +endif + +$(eval $(autotools-package)) diff --git a/package/tstools/0001-build-get-along-with-buildroot.patch b/package/tstools/0001-build-get-along-with-buildroot.patch new file mode 100644 index 00000000..1e7a7482 --- /dev/null +++ b/package/tstools/0001-build-get-along-with-buildroot.patch @@ -0,0 +1,40 @@ +From 44f80bce0914d4d9c5e7486c7cdb521ba637b324 Mon Sep 17 00:00:00 2001 +From: Tzu-Jung Lee +Date: Fri, 19 Jul 2013 22:45:18 +0800 +Subject: [PATCH] build: get along with buildroot + +Signed-off-by: Tzu-Jung Lee +--- + Makefile | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 2c3568e..98bb994 100644 +--- a/Makefile ++++ b/Makefile +@@ -34,12 +34,6 @@ SHELL = /bin/sh + .SUFFIXES: + .SUFFIXES: .c .o + +-ifdef CROSS_COMPILE +-CC = $(CROSS_COMPILE)gcc +-else +-CC = gcc +-endif +- + # Use WARN=1 periodically to get too many warnings... + ifdef WARN + WARNING_FLAGS = -Wall -W -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wconversion -Wmissing-prototypes -Wmissing-declarations -Wunreachable-code -Winline +@@ -452,3 +446,9 @@ test_lists: $(BINDIR)/test_nal_unit_list $(BINDIR)/test_es_unit_list + @echo +++ Testing ES unit lists + $(BINDIR)/test_es_unit_list + @echo +++ Test succeeded ++ ++.PHONY: install ++install: ++ @for i in $(PROGS); do \ ++ cp -f $$i $(DESTDIR)/usr/bin/; \ ++ done +-- +1.8.3.2 + diff --git a/package/tstools/Config.in b/package/tstools/Config.in new file mode 100644 index 00000000..0c55bde9 --- /dev/null +++ b/package/tstools/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_TSTOOLS + bool "tstools" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + help + This is a set of cross-platform command line tools for + working with MPEG data. + + The emphasis is on relatively simple tools which concentrate + on MPEG (H.264 and H.262) data packaged according to H.222 + (i.e., TS or PS), with a particular interest in checking for + conformance. + + Transport Stream (TS) is typically used for distribution of + cable and satellite data. Program Stream (PS) is typically + used to store data on DVDs. + + https://github.com/kynesim/tstools/ + +comment "tstools needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/tstools/tstools.hash b/package/tstools/tstools.hash new file mode 100644 index 00000000..9b0f1c7c --- /dev/null +++ b/package/tstools/tstools.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3d2b2375e2874933f9aa59d4f25bb6b334747219eb0d7a076974e61222d59bf6 tstools-08f6be304040e7b84760ac3920bcff4a563b6cd2.tar.gz diff --git a/package/tstools/tstools.mk b/package/tstools/tstools.mk new file mode 100644 index 00000000..99f7ca9b --- /dev/null +++ b/package/tstools/tstools.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# tstools +# +################################################################################ + +# No releases or tags yet. Use the latest commit ID from master branch. +TSTOOLS_VERSION = 08f6be304040e7b84760ac3920bcff4a563b6cd2 +TSTOOLS_SITE = $(call github,kynesim,tstools,$(TSTOOLS_VERSION)) +# tstools upstream doesn't contain any license file so far. See: +# https://github.com/kynesim/tstools/issues/32 +TSTOOLS_LICENSE = MPL-1.1 +TSTOOLS_LICENSE_FILES = + +define TSTOOLS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) LD="$(TARGET_CC)" $(TARGET_MAKE_ENV) \ + $(MAKE1) -C $(@D) +endef + +define TSTOOLS_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/ttyd/Config.in b/package/ttyd/Config.in new file mode 100644 index 00000000..ecc705b1 --- /dev/null +++ b/package/ttyd/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_TTYD + bool "ttyd" + depends on !BR2_STATIC_LIBS # libuv, libwebsockets + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv, json-c + depends on BR2_USE_MMU # libuv + select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBUV + select BR2_PACKAGE_LIBWEBSOCKETS + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + ttyd is a simple command-line tool for sharing terminal + over the web. + + https://github.com/tsl0922/ttyd + +comment "ttyd needs a toolchain w/ NPTL, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 diff --git a/package/ttyd/ttyd.hash b/package/ttyd/ttyd.hash new file mode 100644 index 00000000..c4263d6e --- /dev/null +++ b/package/ttyd/ttyd.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 1116419527edfe73717b71407fb6e06f46098fc8a8e6b0bb778c4c75dc9f64b9 ttyd-1.6.3.tar.gz +sha256 711762f081c180ade3d09d7b0b7537eaf35eca8d1671e47bc66eaa39376edb12 LICENSE diff --git a/package/ttyd/ttyd.mk b/package/ttyd/ttyd.mk new file mode 100644 index 00000000..856270a8 --- /dev/null +++ b/package/ttyd/ttyd.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# ttyd +# +################################################################################ + +TTYD_VERSION = 1.6.3 +TTYD_SITE = $(call github,tsl0922,ttyd,$(TTYD_VERSION)) +TTYD_LICENSE = MIT +TTYD_LICENSE_FILES = LICENSE +TTYD_DEPENDENCIES = json-c libuv libwebsockets openssl zlib + +$(eval $(cmake-package)) diff --git a/package/tunctl/Config.in b/package/tunctl/Config.in new file mode 100644 index 00000000..26eed4c3 --- /dev/null +++ b/package/tunctl/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TUNCTL + bool "tunctl" + help + Tunctl is a tool for controlling the TUN/TAP driver in Linux. + + https://sourceforge.net/projects/tunctl/ diff --git a/package/tunctl/tunctl.hash b/package/tunctl/tunctl.hash new file mode 100644 index 00000000..59a58cdb --- /dev/null +++ b/package/tunctl/tunctl.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 aa2a6c4cc6bfacb11e0d9f62334a6638a0d435475c61230116f00b6af8b14fff tunctl-1.5.tar.gz +sha256 bcd12b6749dbd86c051cc2ef9e838096741602d4db213cc866b1da6cfeda5f16 tunctl.c diff --git a/package/tunctl/tunctl.mk b/package/tunctl/tunctl.mk new file mode 100644 index 00000000..0d7b88df --- /dev/null +++ b/package/tunctl/tunctl.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tunctl +# +################################################################################ + +TUNCTL_VERSION = 1.5 +TUNCTL_SITE = http://downloads.sourceforge.net/project/tunctl/tunctl/$(TUNCTL_VERSION) + +TUNCTL_LICENSE = GPL-2.0 +TUNCTL_LICENSE_FILES = tunctl.c + +define TUNCTL_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) tunctl +endef + +define TUNCTL_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/tunctl $(TARGET_DIR)/usr/sbin/tunctl +endef + +$(eval $(generic-package)) diff --git a/package/turbolua/Config.in b/package/turbolua/Config.in new file mode 100644 index 00000000..6e792ebb --- /dev/null +++ b/package/turbolua/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_TURBOLUA + bool "turbolua" + depends on BR2_PACKAGE_LUAJIT + help + Turbo.lua is a framework built for LuaJIT 2 to simplify the + task of building fast and scalable network applications. It + uses a event-driven, non-blocking, no thread design to deliver + excellent performance and minimal footprint to high-load + applications while also providing excellent support for + embedded uses. The toolkit can be used for HTTP REST API's, + traditional dynamic web pages through templating, open + connections like WebSockets, or just as high level building + blocks for native speed network applications. + + http://www.turbolua.org + +comment "turbolua needs LuaJIT" + depends on !BR2_PACKAGE_LUAJIT diff --git a/package/turbolua/turbolua.hash b/package/turbolua/turbolua.hash new file mode 100644 index 00000000..b095f5aa --- /dev/null +++ b/package/turbolua/turbolua.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 4dbfbe4919118977c2ca40a4da81054ffe407d09f38bf5420eec5ae1449299d3 turbolua-2.1.3.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/package/turbolua/turbolua.mk b/package/turbolua/turbolua.mk new file mode 100644 index 00000000..a85256a3 --- /dev/null +++ b/package/turbolua/turbolua.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# turbolua +# +################################################################################ + +TURBOLUA_VERSION = 2.1.3 +TURBOLUA_SITE = $(call github,kernelsauce,turbo,v$(TURBOLUA_VERSION)) +TURBOLUA_DEPENDENCIES = luajit +TURBOLUA_LICENSE = Apache-2.0 +TURBOLUA_LICENSE_FILES = LICENSE + +TURBOLUA_MAKE_OPTS = \ + $(TARGET_CONFIGURE_OPTS) \ + LUAJIT_VERSION="$(LUAJIT_VERSION)" + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +TURBOLUA_MAKE_OPTS += SSL=openssl +TURBOLUA_DEPENDENCIES += openssl +else +TURBOLUA_MAKE_OPTS += SSL=none +endif + +define TURBOLUA_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TURBOLUA_MAKE_OPTS) -C $(@D) all +endef + +define TURBOLUA_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TURBOLUA_MAKE_OPTS) LDCONFIG=true \ + PREFIX="$(TARGET_DIR)/usr" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/tvheadend/0001-no-check_config.patch b/package/tvheadend/0001-no-check_config.patch new file mode 100644 index 00000000..9261e5ff --- /dev/null +++ b/package/tvheadend/0001-no-check_config.patch @@ -0,0 +1,23 @@ +Makefile: do not use check_config + +test(1) only uses the second to compare two files dates. +test(1) also does a strict comparison wrt. dates. + +But, on very fast systems, the configure and .config.mk +files may be created in the same second, and so would lead +to a false comparison of the files' dates. + +Signed-off-by: "Yann E. MORIN" + +diff -durN tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3.orig/Makefile tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3/Makefile +--- tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3.orig/Makefile 2014-03-09 14:47:43.780025330 +0100 ++++ tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3/Makefile 2014-03-09 14:48:40.836539093 +0100 +@@ -708,7 +708,7 @@ + $(ROOTDIR)/configure $(CONFIGURE_ARGS) + + # Binary +-${PROG}: .config.mk make_webui $(OBJS) ++${PROG}: make_webui $(OBJS) + $(pCC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS) + + # Object diff --git a/package/tvheadend/Config.in b/package/tvheadend/Config.in new file mode 100644 index 00000000..909d955c --- /dev/null +++ b/package/tvheadend/Config.in @@ -0,0 +1,43 @@ +comment "tvheadend needs a toolchain w/ NPTL, headers >= 3.2, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 || BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + +config BR2_PACKAGE_TVHEADEND + bool "tvheadend" + depends on !BR2_STATIC_LIBS # dladdr() + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_DTV_SCAN_TABLES + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_OPENSSL + help + + Tvheadend is a TV streaming server for Linux supporting + DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video + (V4L) as input sources. + + https://www.lonelycoder.com/redmine/projects/tvheadend/ + + Note: + - on first run, tvheadend will start in wizard mode; the + webUI is available on port 9981. + - if you want Avahi support, you'll need to enable: + Avahi, D-Bus, libdaemon + +if BR2_PACKAGE_TVHEADEND + +config BR2_PACKAGE_TVHEADEND_TRANSCODING + bool "transcoding support" + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_AVRESAMPLE + select BR2_PACKAGE_FFMPEG_GPL # needed for x264 support + select BR2_PACKAGE_FFMPEG_SWSCALE + select BR2_PACKAGE_LIBVPX + select BR2_PACKAGE_X264 + help + Enable transcoding support. + +endif diff --git a/package/tvheadend/S99tvheadend b/package/tvheadend/S99tvheadend new file mode 100644 index 00000000..fc125a23 --- /dev/null +++ b/package/tvheadend/S99tvheadend @@ -0,0 +1,56 @@ +#! /bin/sh +# tvheadend startup script inspired by the Debian one in the package + +# Author: Yann E. MORIN + +PATH=/usr/sbin:/usr/bin:/sbin:/bin +NAME=tvheadend +PIDFILE=/var/run/$NAME.pid + +# Read configuration variable file if it is present +[ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}" + +ARGS="-f" +[ -z "${TVH_USER}" ] || ARGS="${ARGS} -u ${TVH_USER}" +[ -z "${TVH_GROUP}" ] || ARGS="${ARGS} -g ${TVH_GROUP}" +[ -z "${TVH_ADAPTERS}" ] || ARGS="${ARGS} -a ${TVH_ADAPTERS}" +[ -z "${TVH_HTTP_PORT}" ] || ARGS="${ARGS} -w ${TVH_HTTP_PORT}" +[ -z "${TVH_HTSP_PORT}" ] || ARGS="${ARGS} -e ${TVH_HTSP_PORT}" +[ "${TVH_DEBUG}" = "1" ] && ARGS="${ARGS} -s" + +# If first run, start in wizard mode +if [ -z "$(ls -1 /home/tvheadend/.hts/tvheadend/accesscontrol/ 2>/dev/null)" ]; then + ARGS="${ARGS} -C" +fi + +case "$1" in + start) + printf "Starting TVHeadend daemon: " + if start-stop-daemon -S -q -p ${PIDFILE} -m --exec /usr/bin/tvheadend -- ${ARGS}; then + printf "OK\n" + else + printf "failed\n" + fi + ;; + stop) + printf "Stopping TVHeadend daemon: " + start-stop-daemon -K -q -p ${PIDFILE} -s TERM + sleep 2 + if start-stop-daemon -K -q -p ${PIDFILE} -t; then + printf "failed, killing: " + start-stop-daemon -K -q -p ${PIDFILE} -s KILL -o + fi + printf "OK\n" + ;; + restart|force-reload) + "${0}" stop + sleep 2 + "${0}" start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +: diff --git a/package/tvheadend/etc.default.tvheadend b/package/tvheadend/etc.default.tvheadend new file mode 100644 index 00000000..253f8320 --- /dev/null +++ b/package/tvheadend/etc.default.tvheadend @@ -0,0 +1,6 @@ +TVH_USER=tvheadend +TVH_GROUP=tvheadend +#TVH_ADAPTERS= +#TVH_HTTP_PORT=9981 +#TVH_HTSP_PORT=9982 +#TVH_DEBUG=1 diff --git a/package/tvheadend/tvheadend.hash b/package/tvheadend/tvheadend.hash new file mode 100644 index 00000000..b987a735 --- /dev/null +++ b/package/tvheadend/tvheadend.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 b5e58601da7af383c2c7f27016417a478be0d302a4a8a00ec87fc8bdacc56ef1 tvheadend-febcf9818d7c37fec8a98d424934edcb3243d5e4.tar.gz +sha256 54dc3cbc00bf126bcba43e2af7f3ad1dc00f335985da1409fa943c7b7256d942 LICENSE.md diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk new file mode 100644 index 00000000..e19763e1 --- /dev/null +++ b/package/tvheadend/tvheadend.mk @@ -0,0 +1,174 @@ +################################################################################ +# +# tvheadend +# +################################################################################ + +TVHEADEND_VERSION = febcf9818d7c37fec8a98d424934edcb3243d5e4 +TVHEADEND_SITE = $(call github,tvheadend,tvheadend,$(TVHEADEND_VERSION)) +TVHEADEND_LICENSE = GPL-3.0+ +TVHEADEND_LICENSE_FILES = LICENSE.md +TVHEADEND_DEPENDENCIES = \ + host-gettext \ + host-pkgconf \ + host-pngquant \ + $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) \ + openssl + +ifeq ($(BR2_PACKAGE_AVAHI),y) +TVHEADEND_DEPENDENCIES += avahi +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +TVHEADEND_DEPENDENCIES += dbus +TVHEADEND_CONF_OPTS += --enable-dbus-1 +else +TVHEADEND_CONF_OPTS += --disable-dbus-1 +endif + +ifeq ($(BR2_PACKAGE_TVHEADEND_TRANSCODING),y) +TVHEADEND_CONF_OPTS += --enable-libav --enable-libx264 +TVHEADEND_DEPENDENCIES += ffmpeg x264 +ifeq ($(BR2_PACKAGE_LIBVA)$(BR2_PACKAGE_XORG7),yy) +TVHEADEND_CONF_OPTS += --enable-vaapi +TVHEADEND_DEPENDENCIES += libva +else +TVHEADEND_CONF_OPTS += --disable-vaapi +endif +ifeq ($(BR2_PACKAGE_OPUS),y) +TVHEADEND_CONF_OPTS += --enable-libopus +TVHEADEND_DEPENDENCIES += opus +else +TVHEADEND_CONF_OPTS += --disable-libopus +endif +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +TVHEADEND_CONF_OPTS += --enable-omx +TVHEADEND_DEPENDENCIES += rpi-userland +else +TVHEADEND_CONF_OPTS += --disable-omx +endif +ifeq ($(BR2_PACKAGE_X265),y) +TVHEADEND_CONF_OPTS += --enable-libx265 +TVHEADEND_DEPENDENCIES += x265 +else +TVHEADEND_CONF_OPTS += --disable-libx265 +endif +else +TVHEADEND_CONF_OPTS += \ + --disable-libav \ + --disable-libopus \ + --disable-omx \ + --disable-vaapi \ + --disable-libx264 \ + --disable-libx265 +endif + +ifeq ($(BR2_PACKAGE_LIBDVBCSA),y) +TVHEADEND_DEPENDENCIES += libdvbcsa +TVHEADEND_CONF_OPTS += --enable-tvhcsa +else +TVHEADEND_CONF_OPTS += --disable-tvhcsa +endif + +ifeq ($(BR2_PACKAGE_LIBHDHOMERUN),y) +TVHEADEND_DEPENDENCIES += libhdhomerun +TVHEADEND_CONF_OPTS += --enable-hdhomerun_client +else +TVHEADEND_CONF_OPTS += --disable-hdhomerun_client +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +TVHEADEND_DEPENDENCIES += libiconv +endif + +TVHEADEND_CFLAGS = $(TARGET_CFLAGS) +ifeq ($(BR2_PACKAGE_LIBURIPARSER),y) +TVHEADEND_DEPENDENCIES += liburiparser +TVHEADEND_CFLAGS += $(if $(BR2_USE_WCHAR),,-DURI_NO_UNICODE) +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +TVHEADEND_DEPENDENCIES += pcre +TVHEADEND_CONF_OPTS += --enable-pcre +else +TVHEADEND_CONF_OPTS += --disable-pcre +endif + +ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),) +TVHEADEND_CONF_OPTS += --disable-pie +endif + +TVHEADEND_DEPENDENCIES += dtv-scan-tables + +# The tvheadend build system expects the transponder data to be present inside +# its source tree. To prevent a download initiated by the build system just +# copy the data files in the right place and add the corresponding stamp file. +define TVHEADEND_INSTALL_DTV_SCAN_TABLES + $(INSTALL) -d $(@D)/data/dvb-scan + cp -r $(TARGET_DIR)/usr/share/dvb/* $(@D)/data/dvb-scan/ + touch $(@D)/data/dvb-scan/.stamp +endef +TVHEADEND_PRE_CONFIGURE_HOOKS += TVHEADEND_INSTALL_DTV_SCAN_TABLES + +define TVHEADEND_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + CFLAGS="$(TVHEADEND_CFLAGS)" \ + ./configure \ + --prefix=/usr \ + --arch="$(ARCH)" \ + --cpu="$(GCC_TARGET_CPU)" \ + --nowerror \ + --python="$(HOST_DIR)/bin/python" \ + --enable-dvbscan \ + --enable-bundle \ + --enable-pngquant \ + --disable-ffmpeg_static \ + --disable-hdhomerun_static \ + $(TVHEADEND_CONF_OPTS) \ + ) +endef + +define TVHEADEND_FIX_PNGQUANT_PATH + $(SED) "s%^pngquant_bin =.*%pngquant_bin = '$(HOST_DIR)/bin/pngquant'%" \ + $(@D)/support/mkbundle +endef +TVHEADEND_POST_CONFIGURE_HOOKS += TVHEADEND_FIX_PNGQUANT_PATH + +define TVHEADEND_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define TVHEADEND_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install +endef + +# Remove documentation and source files that are not needed because we +# use the bundled web interface version. +define TVHEADEND_CLEAN_SHARE + rm -rf $(TARGET_DIR)/usr/share/tvheadend/docs + rm -rf $(TARGET_DIR)/usr/share/tvheadend/src +endef + +TVHEADEND_POST_INSTALL_TARGET_HOOKS += TVHEADEND_CLEAN_SHARE + +#---------------------------------------------------------------------------- +# To run tvheadend, we need: +# - a startup script, and its config file +# - a non-root user to run as, and a home for it that is not accessible +# to the other users (because there will be crendentials in there) + +define TVHEADEND_INSTALL_INIT_SYSV + $(INSTALL) -D package/tvheadend/etc.default.tvheadend $(TARGET_DIR)/etc/default/tvheadend + $(INSTALL) -D package/tvheadend/S99tvheadend $(TARGET_DIR)/etc/init.d/S99tvheadend +endef + +define TVHEADEND_USERS + tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon +endef +define TVHEADEND_PERMISSIONS + /home/tvheadend r 0700 tvheadend tvheadend - - - - - +endef + +$(eval $(generic-package)) diff --git a/package/twolame/Config.in b/package/twolame/Config.in new file mode 100644 index 00000000..588afa48 --- /dev/null +++ b/package/twolame/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_TWOLAME + bool "twolame" + help + TwoLAME is an optimised MPEG Audio Layer 2 (MP2) encoder + based on tooLAME by Mike Cheng, which in turn is based upon + the ISO dist10 code and portions of LAME. + + http://www.twolame.org/ diff --git a/package/twolame/twolame.hash b/package/twolame/twolame.hash new file mode 100644 index 00000000..74941ae3 --- /dev/null +++ b/package/twolame/twolame.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 cc35424f6019a88c6f52570b63e1baf50f62963a3eac52a03a800bb070d7c87d twolame-0.4.0.tar.gz +sha256 257a842724705950b07da76ce0e22ffa80ec77b3e9dfc6702522ac342409da0f COPYING diff --git a/package/twolame/twolame.mk b/package/twolame/twolame.mk new file mode 100644 index 00000000..b1abf077 --- /dev/null +++ b/package/twolame/twolame.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# twolame +# +################################################################################ + +TWOLAME_VERSION = 0.4.0 +TWOLAME_SITE = http://downloads.sourceforge.net/project/twolame/twolame/$(TWOLAME_VERSION) +TWOLAME_INSTALL_STAGING = YES +TWOLAME_LICENSE = LGPL-2.1+ +TWOLAME_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) +TWOLAME_DEPENDENCIES += host-pkgconf libsndfile +TWOLAME_CONF_OPTS += --enable-sndfile +else +TWOLAME_CONF_OPTS += --disable-sndfile +endif + +$(eval $(autotools-package)) diff --git a/package/tz/Config.in b/package/tz/Config.in new file mode 100644 index 00000000..943dc5cc --- /dev/null +++ b/package/tz/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_TZ + bool + help + Timezone info for uClibc. diff --git a/package/tz/tz.mk b/package/tz/tz.mk new file mode 100644 index 00000000..135726c2 --- /dev/null +++ b/package/tz/tz.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# tz +# +################################################################################ + +TZ_DEPENDENCIES = host-tzdata host-tzdump +TZ_LICENSE = Public domain + +TZ_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME)) +ifneq ($(TZ_LOCALTIME),) +define TZ_SET_LOCALTIME + if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/uclibc/$(TZ_LOCALTIME) ]; then \ + printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \ + "$(TZ_LOCALTIME)"; \ + exit 1; \ + fi + ln -sf ../usr/share/zoneinfo/uclibc/$(TZ_LOCALTIME) $(TARGET_DIR)/etc/TZ +endef +endif + +define TZ_BUILD_CMDS + (cd $(HOST_DIR)/share/zoneinfo/posix/; \ + for i in $$(find . -type f); do \ + mkdir -p $(@D)/output/$$(dirname $$i); \ + $(TZDUMP) -p . -q $${i#./} | sed '1d' > $(@D)/output/$$i; \ + done \ + ) +endef + +define TZ_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(HOST_DIR)/share/zoneinfo/zone.tab \ + $(TARGET_DIR)/usr/share/zoneinfo/zone.tab + $(INSTALL) -D -m 0644 $(HOST_DIR)/share/zoneinfo/iso3166.tab \ + $(TARGET_DIR)/usr/share/zoneinfo/iso3166.tab + mkdir -p $(TARGET_DIR)/usr/share/zoneinfo/uclibc + cp -a $(@D)/output/* $(TARGET_DIR)/usr/share/zoneinfo/uclibc + $(TZ_SET_LOCALTIME) +endef + +$(eval $(generic-package)) diff --git a/package/tzdata/Config.in b/package/tzdata/Config.in new file mode 100644 index 00000000..1e6cc0fc --- /dev/null +++ b/package/tzdata/Config.in @@ -0,0 +1,9 @@ +# This package is not meant to be user-visible. +# It gets selected by BR2_TARGET_TZ in system/Config.in + +config BR2_PACKAGE_TZDATA + bool + help + Time zone database + + http://www.iana.org/time-zones/repository/tz-link.html diff --git a/package/tzdata/tzdata.hash b/package/tzdata/tzdata.hash new file mode 100644 index 00000000..f7062748 --- /dev/null +++ b/package/tzdata/tzdata.hash @@ -0,0 +1,4 @@ +# From https://mm.icann.org/pipermail/tz-announce/2021-January/000065.html +sha512 7cdd762ec90ce12a30fa36b1d66d1ea82d9fa21e514e2b9c7fcbe2541514ee0fadf30843ff352c65512fb270857b51d1517b45e1232b89c6f954ba9ff1833bb3 tzdata2021a.tar.gz +# Locally computed: +sha256 0613408568889f5739e5ae252b722a2659c02002839ad970a63dc5e9174b27cf LICENSE diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk new file mode 100644 index 00000000..922e7420 --- /dev/null +++ b/package/tzdata/tzdata.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# tzdata +# +################################################################################ + +TZDATA_VERSION = 2021a +TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz +TZDATA_SITE = https://www.iana.org/time-zones/repository/releases +TZDATA_STRIP_COMPONENTS = 0 +TZDATA_DEPENDENCIES = host-tzdata +HOST_TZDATA_DEPENDENCIES = host-zic +TZDATA_LICENSE = Public domain +TZDATA_LICENSE_FILES = LICENSE + +# Take care when re-ordering this list since this might break zone +# dependencies +TZDATA_DEFAULT_ZONELIST = \ + africa antarctica asia australasia europe northamerica \ + southamerica etcetera backward factory + +ifeq ($(call qstrip,$(BR2_TARGET_TZ_ZONELIST)),default) +TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST) +else +TZDATA_ZONELIST = $(call qstrip,$(BR2_TARGET_TZ_ZONELIST)) +endif + +TZDATA_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME)) +ifneq ($(TZDATA_LOCALTIME),) +define TZDATA_SET_LOCALTIME + if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/$(TZDATA_LOCALTIME) ]; then \ + printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \ + "$(TZDATA_LOCALTIME)"; \ + exit 1; \ + fi + ln -sf ../usr/share/zoneinfo/$(TZDATA_LOCALTIME) $(TARGET_DIR)/etc/localtime + echo "$(TZDATA_LOCALTIME)" >$(TARGET_DIR)/etc/timezone +endef +endif + +define TZDATA_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/zoneinfo + cp -a $(HOST_DIR)/share/zoneinfo/* $(TARGET_DIR)/usr/share/zoneinfo + cd $(TARGET_DIR)/usr/share/zoneinfo; \ + for zone in posix/*; do \ + ln -sfn "$${zone}" "$${zone##*/}"; \ + done + $(TZDATA_SET_LOCALTIME) +endef + +define HOST_TZDATA_BUILD_CMDS + (cd $(@D); \ + for zone in $(TZDATA_ZONELIST); do \ + $(ZIC) -b fat -d _output/posix $$zone || exit 1; \ + $(ZIC) -b fat -d _output/right -L leapseconds $$zone || exit 1; \ + done; \ + ) +endef + +define HOST_TZDATA_INSTALL_CMDS + $(INSTALL) -d -m 0755 $(HOST_DIR)/share/zoneinfo + cp -a $(@D)/_output/* $(@D)/*.tab $(HOST_DIR)/share/zoneinfo +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/tzdump/tzdump.hash b/package/tzdump/tzdump.hash new file mode 100644 index 00000000..b0d58c62 --- /dev/null +++ b/package/tzdump/tzdump.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 e078ba9bd90cb46368beb3cfef2288194e5edefd53ad9565961a97d1c7d6c59f tzdump-e1a52ce12a701b8ea4163d6719713e38c0e53d35.tar.gz diff --git a/package/tzdump/tzdump.mk b/package/tzdump/tzdump.mk new file mode 100644 index 00000000..f6b6a1a7 --- /dev/null +++ b/package/tzdump/tzdump.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tzdump +# +################################################################################ + +TZDUMP_VERSION = e1a52ce12a701b8ea4163d6719713e38c0e53d35 +TZDUMP_SITE = $(call github,alexandrebelloni,tzdump,$(TZDUMP_VERSION)) +HOST_TZDUMP_DEPENDENCIES = host-zic + +define HOST_TZDUMP_BUILD_CMDS + cd $(@D) && $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o tzdump tzdump.c +endef + +define HOST_TZDUMP_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/tzdump $(HOST_DIR)/sbin/tzdump +endef + +$(eval $(host-generic-package)) + +TZDUMP = $(HOST_DIR)/sbin/tzdump diff --git a/package/uacme/Config.in b/package/uacme/Config.in new file mode 100644 index 00000000..d6934361 --- /dev/null +++ b/package/uacme/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_UACME + bool "uacme" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_GNUTLS || BR2_PACKAGE_MBEDTLS) + select BR2_PACKAGE_LIBCURL + help + uacme is a client for the ACMEv2 protocol described in + RFC8555, written in plain C with minimal dependencies + (libcurl and either of GnuTLS, OpenSSL or mbedTLS). The + ACMEv2 protocol allows a Certificate Authority + (https://letsencrypt.org is a popular one) and an applicant + to automate the process of verification and certificate + issuance. + + https://github.com/ndilieto/uacme + +if BR2_PACKAGE_UACME + +config BR2_PACKAGE_UACME_UALPN + bool "enable ualpn" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_OPENSSL || BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBEV + help + Build and install ualpn, the transparent proxying tls-alpn-01 + challenge responder. + +comment "ualpn needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +comment "ualpn needs either OpenSSL or GnuTLS" + depends on !(BR2_PACKAGE_OPENSSL || BR2_PACKAGE_GNUTLS) + +endif diff --git a/package/uacme/uacme.hash b/package/uacme/uacme.hash new file mode 100644 index 00000000..d0277c73 --- /dev/null +++ b/package/uacme/uacme.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 3f3de5f456907558c4aa0db5654c618becb1b3e057ad217e180c8f72360e7841 uacme-1.4.1.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/uacme/uacme.mk b/package/uacme/uacme.mk new file mode 100644 index 00000000..975a965d --- /dev/null +++ b/package/uacme/uacme.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# uacme +# +################################################################################ + +UACME_VERSION = 1.4.1 +# Released versions are on branch upstream/latest, tagged as +# upstream/X.Y.Z Do not use vX.Y.Z tags from master, as they do not +# include .tarball-version +UACME_SITE = $(call github,ndilieto,uacme,upstream/$(UACME_VERSION)) +UACME_LICENSE = GPL-3.0+ +UACME_LICENSE_FILES = COPYING +UACME_DEPENDENCIES = libcurl + +UACME_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +UACME_CONF_OPTS += --with-gnutls +UACME_DEPENDENCIES += gnutls +else ifeq ($(BR2_PACKAGE_OPENSSL),y) +UACME_CONF_OPTS += --with-openssl +UACME_DEPENDENCIES += openssl +else ifeq ($(BR2_PACKAGE_MBEDTLS),y) +UACME_CONF_OPTS += --with-mbedtls +UACME_DEPENDENCIES += mbedtls +endif + +ifeq ($(BR2_PACKAGE_UACME_UALPN),y) +UACME_DEPENDENCIES += libev +UACME_CONF_OPTS += --with-ualpn +else +UACME_CONF_OPTS += --without-ualpn +endif + +$(eval $(autotools-package)) diff --git a/package/uboot-tools/0001-drop-configh-from-tools.patch b/package/uboot-tools/0001-drop-configh-from-tools.patch new file mode 100644 index 00000000..59e5686e --- /dev/null +++ b/package/uboot-tools/0001-drop-configh-from-tools.patch @@ -0,0 +1,49 @@ +From ab8b54cfc9d3fddba297c343a2d8dea9dbe20017 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Tue, 4 Aug 2015 22:13:20 +0200 +Subject: [PATCH] drop configh from tools +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We need to build u-boot tools without a board configuration for the target. +fw_env just uses config.h to define the default environment of the created +image, so it really isn't mandatory. + +Signed-off-by: Gustavo Zacarias +[Jörg Krause: update for version 2015.07] +Signed-off-by: Jörg Krause +[Romain: update for version 2017.05 + after commit 9d80b49a671c9922931adcd823aab0ed319a42d1] +Signed-off-by: Romain Naour +[Pierre-Jean: update for version 2019.04] +Signed-off-by: Pierre-Jean Texier +--- + tools/env/fw_env_private.h | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/tools/env/fw_env_private.h b/tools/env/fw_env_private.h +index 86be16d..3c62ac4 100644 +--- a/tools/env/fw_env_private.h ++++ b/tools/env/fw_env_private.h +@@ -4,17 +4,6 @@ + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +-/* Pull in the current config to define the default environment */ +-#include +- +-#ifndef __ASSEMBLY__ +-#define __ASSEMBLY__ /* get only #defines from config.h */ +-#include +-#undef __ASSEMBLY__ +-#else +-#include +-#endif +- + /* + * To build the utility with the static configuration + * comment out the next line. +-- +2.9.4 + diff --git a/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch b/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch new file mode 100644 index 00000000..a376afbc --- /dev/null +++ b/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch @@ -0,0 +1,42 @@ +From 460646b3c4c1718860915c38586ee8d2fbda38e4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sun, 1 Feb 2015 21:53:47 +0100 +Subject: [PATCH] tools only in no dot config targets +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Revert upstream commit c7ad5cbb1ef2c33883f0fa7d0455095004fd306d: + + Makefile: drop "tools-only" from no-dot-config-targets + +This indirectly pulls in a build-dependency on libssl-dev used for FIT +image support, and possibly GPL/OpenSSL licensing incompatibility +issues. + +Based on Debian patch from u-boot-tools: +http://ftp.de.debian.org/debian/pool/main/u/u-boot/u-boot_2014.10+dfsg1-2.1.debian.tar.xz + +Signed-off-by: Jörg Krause +[fabio: adapt it to 2016.09] +Signed-off-by: Fabio Estevam +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 6aa08964ff..fcec83d183 100644 +--- a/Makefile ++++ b/Makefile +@@ -486,7 +486,7 @@ defaultenv_h := include/generated/defaultenv_autogenerated.h + + no-dot-config-targets := clean clobber mrproper distclean \ + help %docs check% coccicheck \ +- ubootversion backup tests check qcheck ++ ubootversion backup tests tools-only check qcheck + + config-targets := 0 + mixed-targets := 0 +-- +2.20.1 + diff --git a/package/uboot-tools/0003-drop-autoconf.h-from-tools.patch b/package/uboot-tools/0003-drop-autoconf.h-from-tools.patch new file mode 100644 index 00000000..09ee40be --- /dev/null +++ b/package/uboot-tools/0003-drop-autoconf.h-from-tools.patch @@ -0,0 +1,36 @@ +From 0552a8ffdfbb9807fcef4498011907caa5de2ace Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Thu, 9 Jan 2020 15:11:32 +0100 +Subject: [PATCH] drop autoconf.h from tools +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We need to build u-boot tools without a board configuration for the target. + +imximage uses the DCD address from Kconfig to display this information +to the user. The default value for all i.MX platforms is 0x00910000, +except for i.MX7ULP, which has a DCD address of 0x2f010000. + +The default value printed before version 2020.01 was 0x00910000. + +Signed-off-by: Jörg Krause +--- + tools/imximage.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tools/imximage.c b/tools/imximage.c +index d7edd3c52f..f8d21fa06a 100644 +--- a/tools/imximage.c ++++ b/tools/imximage.c +@@ -11,7 +11,6 @@ + #include "imagetool.h" + #include + #include "imximage.h" +-#include + + #define UNDEFINED 0xFFFFFFFF + +-- +2.25.0 + diff --git a/package/uboot-tools/0004-tools-env-fw_env.h-remove-env.h.patch b/package/uboot-tools/0004-tools-env-fw_env.h-remove-env.h.patch new file mode 100644 index 00000000..f5d9c2b2 --- /dev/null +++ b/package/uboot-tools/0004-tools-env-fw_env.h-remove-env.h.patch @@ -0,0 +1,52 @@ +From 664ef61e19d6261d8984493b5f22127ec2ad44fc Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 10 May 2020 23:15:32 +0200 +Subject: [PATCH] tools/env/fw_env.h: remove env.h + +As reported by Nicolas Carrier on the Buildroot mailing list [1], +there is a new build issue while building a program which interacts with +the u-boot environment. This program uses the headers of the ubootenv +library provided by uboot-tools. + +This is an upstream change from uboot [2] adding "#include " to +fw_env.h. Adding env.h require a board configuration to build. + +But only fw_env.h header is installed in the staging directory by +uboot-tools package, but since it now include env.h the build is broken +because env.h is missing from the staging directory. + +It's seems an upstream bug since env_set() is not used in fw_env tool. + +Adding env.h is an error since it also include compiler.h (and others +uboot internal includes). + +Nicolas removed env.h from fw_env tool and fixed it's build issue. + +This problem is present since uboot v2019.10, so the uboot version +present in Buildroot 2020.02 is affected. + +[1] http://lists.busybox.net/pipermail/buildroot/2020-April/280307.html +[2] https://gitlab.denx.de/u-boot/u-boot/-/commit/9fb625ce05539fe6876a59ce1dcadb76b33c6f6e + +Reported-by: Nicolas Carrier +Signed-off-by: Romain Naour +Upstream: https://gitlab.denx.de/u-boot/u-boot/-/commit/2aca8804d8d5f84d2d661e76e8d232c5c12445b5 +--- + tools/env/fw_env.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h +index b60fbfc8f8..78c803c944 100644 +--- a/tools/env/fw_env.h ++++ b/tools/env/fw_env.h +@@ -4,7 +4,6 @@ + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +-#include + #include + + /* +-- +2.25.4 + diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in new file mode 100644 index 00000000..681f87b4 --- /dev/null +++ b/package/uboot-tools/Config.in @@ -0,0 +1,96 @@ +config BR2_PACKAGE_UBOOT_TOOLS + bool "u-boot tools" + help + Companion tools for Das U-Boot bootloader. + + http://www.denx.de/wiki/U-Boot/WebHome + +if BR2_PACKAGE_UBOOT_TOOLS + +config BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT + bool "Flattened Image Tree (FIT) support" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_DTC + select BR2_PACKAGE_DTC_PROGRAMS + help + Enables support for Flattened Image Tree (FIT). + + This option allows to boot the new uImage structure, + Flattened Image Tree. FIT is formally a FDT, which can include + images of various types (kernel, FDT blob, ramdisk, etc.) + in a single blob. To boot this new uImage structure, + pass the address of the blob to the "bootm" command. + +comment "u-boot tools FIT support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +if BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT + +config BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT + bool "FIT signature verification support" + select BR2_PACKAGE_OPENSSL + help + Enables support for FIT Signature Verification. + + Flat Image Trees (FIT) supports hashing of images so that + these hashes can be checked on loading. This protects + against corruption of the image. However it does not prevent + the substitution of one image for another. + + The signature feature allows the hash to be signed with a + private key such that it can be verified using a public key + later. Provided that the private key is kept secret and the + public key is stored in a non-volatile place, any image can + be verified in this way. + + Enabling this option pulls in a dependency on libssl and + libcrypto, and possibly GPL/OpenSSL licensing + incompatibility issues. + +config BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN + bool "fit_check_sign" + depends on BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT + help + Install the fit_check_sign tool on the target system + + The fit_check_sign tool from Das U-Boot bootloader, which + allows FIT image signature validation on target system. + +endif + +config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE + bool "mkimage" + help + Install the mkimage tool on the target system + + The mkimage tool from Das U-Boot bootloader, which allows + generation of U-Boot images in various formats. + +config BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE + bool "mkenvimage" + help + Install the mkenvimage tool on the target system + + The mkenvimage tool from Das U-Boot bootloader, which allows + generation of a valid binary environment image from a text + file describing the key=value pairs of the environment. + +config BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV + bool "fw_printenv" + default y + help + Install the fw_printenv / fw_setenv tools on the target system + + The fw_printenv and fw_setenv tools from Das U-Boot + bootloader, which allows access to the U-Boot environment + from Linux. + +config BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE + bool "dumpimage" + help + Install the dumpimage tool on the target system + + The dumpimage tool from Das U-Boot bootloader, which allows + extraction of data from U-Boot images. + +endif diff --git a/package/uboot-tools/Config.in.host b/package/uboot-tools/Config.in.host new file mode 100644 index 00000000..431cc863 --- /dev/null +++ b/package/uboot-tools/Config.in.host @@ -0,0 +1,111 @@ +config BR2_PACKAGE_HOST_UBOOT_TOOLS + bool "host u-boot tools" + help + Companion tools for Das U-Boot bootloader. + + http://www.denx.de/wiki/U-Boot/WebHome + +if BR2_PACKAGE_HOST_UBOOT_TOOLS + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT + bool "Flattened Image Tree (FIT) support" + select BR2_PACKAGE_HOST_DTC + help + Enables support for Flattened Image Tree (FIT). + + This option allows to boot the new uImage structure, + Flattened Image Tree. FIT is formally a FDT, which can include + images of various types (kernel, FDT blob, ramdisk, etc.) + in a single blob. To boot this new uImage structure, + pass the address of the blob to the "bootm" command. + +if BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT + bool "FIT signature verification support" + help + Enables support for FIT Signature Verification. + + Flat Image Trees (FIT) supports hashing of images so that + these hashes can be checked on loading. This protects + against corruption of the image. However it does not prevent + the substitution of one image for another. + + The signature feature allows the hash to be signed with a + private key such that it can be verified using a public key + later. Provided that the private key is kept secret and the + public key is stored in a non-volatile place, any image can + be verified in this way. + +endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE + bool "Environment image" + help + Generate a valid binary environment image from a text file + describing the key=value pairs of the environment. + + This option can be useful to build enviornment configurations + as part of a Linux / rootfs only defconfig instead of using + post scripts. This supports a hardware use case of a single + bootloader only defconfig but multiple Linux / rootfs + defconfigs with different boot environments. + + The environment image will be called uboot-env.bin. + +if BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE + string "Source files for environment" + default BR2_TARGET_UBOOT_ENVIMAGE_SOURCE if BR2_TARGET_UBOOT_ENVIMAGE_SOURCE != "" # legacy + help + Text files describing the environment. Files should have + lines of the form var=value, one per line. Blank lines and + lines starting with a # are ignored. + + Multiple source files are concatenated in the order listed. + + Leave empty to generate image from compiled-in env if a U-boot + target build is configured (BR2_TARGET_UBOOT) + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE + string "Size of environment" + default BR2_TARGET_UBOOT_ENVIMAGE_SIZE if BR2_TARGET_UBOOT_ENVIMAGE_SIZE != "" # legacy + help + Size of envronment, can be prefixed with 0x for hexadecimal + values. + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_REDUNDANT + bool "Environment has two copies" + help + Some platforms define in their U-Boot configuration that the + U-Boot environment should be duplicated in two locations (for + extra safety). Check your U-Boot configuration for the + CONFIG_ENV_ADDR_REDUND and CONFIG_ENV_SIZE_REDUND settings to + see if this is the case for your platform. + + If it is the case, then you should enable this option to + ensure that the U-Boot environment image generated by + Buildroot is compatible with the "redundant environment" + mechanism of U-Boot. + +endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT + bool "Generate a U-Boot boot script" + help + Generate a U-Boot boot script, given a file listing U-Boot + commands to be executed at boot time. The generated boot + script will be called 'boot.scr'. + +if BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE + string "U-Boot boot script source" + default BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE if BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE != "" # legacy + help + Source file to generate the U-Boot boot script. + +endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT + +endif # BR2_PACKAGE_HOST_UBOOT_TOOLS diff --git a/package/uboot-tools/uboot-tools.hash b/package/uboot-tools/uboot-tools.hash new file mode 100644 index 00000000..8274246c --- /dev/null +++ b/package/uboot-tools/uboot-tools.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 u-boot-2020.04.tar.bz2 +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Licenses/gpl-2.0.txt diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk new file mode 100644 index 00000000..b0fc9276 --- /dev/null +++ b/package/uboot-tools/uboot-tools.mk @@ -0,0 +1,216 @@ +################################################################################ +# +# uboot-tools +# +################################################################################ + +UBOOT_TOOLS_VERSION = 2020.04 +UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2 +UBOOT_TOOLS_SITE = ftp://ftp.denx.de/pub/u-boot +UBOOT_TOOLS_LICENSE = GPL-2.0+ +UBOOT_TOOLS_LICENSE_FILES = Licenses/gpl-2.0.txt +UBOOT_TOOLS_CPE_ID_VENDOR = denx +UBOOT_TOOLS_CPE_ID_PRODUCT = u-boot +UBOOT_TOOLS_INSTALL_STAGING = YES + +# u-boot 2020.01+ needs make 4.0+ +UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY) +HOST_UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY) + +define UBOOT_TOOLS_CONFIGURE_CMDS + mkdir -p $(@D)/include/config + touch $(@D)/include/config/auto.conf +endef + +UBOOT_TOOLS_MAKE_OPTS = CROSS_COMPILE="$(TARGET_CROSS)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + HOSTCFLAGS="$(HOST_CFLAGS)" \ + STRIP=$(TARGET_STRIP) + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT),y) +UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc +UBOOT_TOOLS_DEPENDENCIES += dtc +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),y) +UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT_SIGNATURE=y CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 +UBOOT_TOOLS_DEPENDENCIES += openssl host-pkgconf +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y) +define UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN + $(INSTALL) -m 0755 -D $(@D)/tools/fit_check_sign $(TARGET_DIR)/usr/bin/fit_check_sign +endef +endif + +define UBOOT_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(BR2_MAKE) -C $(@D) $(UBOOT_TOOLS_MAKE_OPTS) \ + CROSS_BUILD_TOOLS=y tools-only + $(TARGET_MAKE_ENV) $(BR2_MAKE) -C $(@D) $(UBOOT_TOOLS_MAKE_OPTS) \ + envtools no-dot-config-targets=envtools +endef + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE),y) +define UBOOT_TOOLS_INSTALL_MKIMAGE + $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(TARGET_DIR)/usr/bin/mkimage +endef +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE),y) +define UBOOT_TOOLS_INSTALL_MKENVIMAGE + $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(TARGET_DIR)/usr/bin/mkenvimage +endef +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV),y) +define UBOOT_TOOLS_INSTALL_FWPRINTENV + $(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(TARGET_DIR)/usr/sbin/fw_printenv + ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv +endef +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE),y) +define UBOOT_TOOLS_INSTALL_DUMPIMAGE + $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(TARGET_DIR)/usr/sbin/dumpimage +endef +endif + +define UBOOT_TOOLS_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/tools/env/lib.a $(STAGING_DIR)/usr/lib/libubootenv.a + $(INSTALL) -D -m 0644 $(@D)/tools/env/fw_env.h $(STAGING_DIR)/usr/include/fw_env.h +endef + +define UBOOT_TOOLS_INSTALL_TARGET_CMDS + $(UBOOT_TOOLS_INSTALL_MKIMAGE) + $(UBOOT_TOOLS_INSTALL_MKENVIMAGE) + $(UBOOT_TOOLS_INSTALL_FWPRINTENV) + $(UBOOT_TOOLS_INSTALL_DUMPIMAGE) + $(UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN) +endef + +# host-uboot-tools + +define HOST_UBOOT_TOOLS_CONFIGURE_CMDS + mkdir -p $(@D)/include/config + touch $(@D)/include/config/auto.conf +endef + +HOST_UBOOT_TOOLS_MAKE_OPTS = HOSTCC="$(HOSTCC)" \ + HOSTCFLAGS="$(HOST_CFLAGS)" \ + HOSTLDFLAGS="$(HOST_LDFLAGS)" + +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),y) +HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc +HOST_UBOOT_TOOLS_DEPENDENCIES += host-dtc +endif + +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),y) +HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT_SIGNATURE=y CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 +HOST_UBOOT_TOOLS_DEPENDENCIES += host-openssl +endif + +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE),y) + +UBOOT_TOOLS_GENERATE_ENV_FILE = $(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE)) + +# If BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE is left empty, we +# will use the default environment provided in the U-Boot build +# directory as boot-env-defaults.txt, which requires having uboot as a +# dependency. +# If BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE is not empty, is +# might be referring to a file within the U-Boot source tree, so we +# also need to have uboot as a dependency. +ifeq ($(BR2_TARGET_UBOOT),y) +HOST_UBOOT_TOOLS_DEPENDENCIES += uboot + +# Handle the case where BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE +# is left empty, use the default U-Boot environment. +ifeq ($(UBOOT_TOOLS_GENERATE_ENV_FILE),) +UBOOT_TOOLS_GENERATE_ENV_FILE = $(@D)/boot-env-defaults.txt +define HOST_UBOOT_TOOLS_GENERATE_ENV_DEFAULTS + CROSS_COMPILE="$(TARGET_CROSS)" \ + $(UBOOT_SRCDIR)/scripts/get_default_envs.sh \ + $(UBOOT_SRCDIR) \ + > $(UBOOT_TOOLS_GENERATE_ENV_FILE) +endef +endif # UBOOT_TOOLS_GENERATE_ENV_FILE +endif # BR2_TARGET_UBOOT + +ifeq ($(BR_BUILDING),y) +ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE)),) +$(error Please provide U-Boot environment size (BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE setting)) +endif +# If U-Boot is not available, ENVIMAGE_SOURCE must be provided by user, +# otherwise it is optional because the default can be taken from U-Boot +ifeq ($(BR2_TARGET_UBOOT),) +ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE)),) +$(error Please provide U-Boot environment file (BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE setting)) +endif +endif #BR2_TARGET_UBOOT +endif #BR_BUILDING + +define HOST_UBOOT_TOOLS_GENERATE_ENVIMAGE + $(HOST_UBOOT_TOOLS_GENERATE_ENV_DEFAULTS) + cat $(UBOOT_TOOLS_GENERATE_ENV_FILE) | \ + $(@D)/tools/mkenvimage -s $(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE) \ + $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_REDUNDANT),-r) \ + $(if $(filter "BIG",$(BR2_ENDIAN)),-b) \ + -o $(@D)/tools/uboot-env.bin \ + - +endef +define HOST_UBOOT_TOOLS_INSTALL_ENVIMAGE + $(INSTALL) -m 0755 -D $(@D)/tools/uboot-env.bin $(BINARIES_DIR)/uboot-env.bin +endef +endif #BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE + +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT),y) +ifeq ($(BR_BUILDING),y) +ifeq ($(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE)),) +$(error Please define a source file for U-Boot boot script (BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE setting)) +endif +endif #BR_BUILDING + +define HOST_UBOOT_TOOLS_GENERATE_BOOT_SCRIPT + $(@D)/tools/mkimage -C none -A $(MKIMAGE_ARCH) -T script \ + -d $(call qstrip,$(BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE)) \ + $(@D)/tools/boot.scr +endef +define HOST_UBOOT_TOOLS_INSTALL_BOOT_SCRIPT + $(INSTALL) -m 0755 -D $(@D)/tools/boot.scr $(BINARIES_DIR)/boot.scr +endef +endif #BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT + +define HOST_UBOOT_TOOLS_BUILD_CMDS + $(BR2_MAKE1) -C $(@D) $(HOST_UBOOT_TOOLS_MAKE_OPTS) tools-only + $(HOST_UBOOT_TOOLS_GENERATE_ENVIMAGE) + $(HOST_UBOOT_TOOLS_GENERATE_BOOT_SCRIPT) +endef + +define HOST_UBOOT_TOOLS_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/bin/mkimage + $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/bin/mkenvimage + $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/bin/dumpimage + $(HOST_UBOOT_TOOLS_INSTALL_ENVIMAGE) + $(HOST_UBOOT_TOOLS_INSTALL_BOOT_SCRIPT) +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) + +# Convenience variables for other mk files that make use of mkimage + +MKIMAGE = $(HOST_DIR)/bin/mkimage + +# mkimage supports arm blackfin m68k microblaze mips mips64 nios2 powerpc ppc sh sparc sparc64 x86 +# KERNEL_ARCH can be arm64 arc arm blackfin m68k microblaze mips nios2 powerpc sh sparc i386 x86_64 xtensa +# For arm64, arc, xtensa we'll just keep KERNEL_ARCH +# For mips64, we'll just keep mips +# For i386 and x86_64, we need to convert +ifeq ($(KERNEL_ARCH),x86_64) +MKIMAGE_ARCH = x86 +else ifeq ($(KERNEL_ARCH),i386) +MKIMAGE_ARCH = x86 +else +MKIMAGE_ARCH = $(KERNEL_ARCH) +endif diff --git a/package/ubus/0001-Install-server-and-client-examples.patch b/package/ubus/0001-Install-server-and-client-examples.patch new file mode 100644 index 00000000..5c985d8c --- /dev/null +++ b/package/ubus/0001-Install-server-and-client-examples.patch @@ -0,0 +1,28 @@ +From aa4aea68a9d2a38fabb5ae8e5a0d05dfd7bcf907 Mon Sep 17 00:00:00 2001 +From: Rahul Jain +Date: Fri, 24 Mar 2017 18:03:24 +0530 +Subject: [PATCH] Install server and client examples + +Signed-off-by: Sergio Prado +Signed-off-by: Rahul Jain +[Rahul Jain: rebase the patch on latest version] +--- + examples/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 81f9997..38f153f 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -9,4 +9,8 @@ IF (BUILD_EXAMPLES) + + ADD_EXECUTABLE(client client.c count.c) + TARGET_LINK_LIBRARIES(client ubus ${ubox_library}) ++ ++ INSTALL(TARGETS server client ++ RUNTIME DESTINATION sbin ++ ) + ENDIF() +-- +2.6.2 + diff --git a/package/ubus/Config.in b/package/ubus/Config.in new file mode 100644 index 00000000..28bf8e9a --- /dev/null +++ b/package/ubus/Config.in @@ -0,0 +1,31 @@ +comment "ubus needs a toolchain w/ dynamic library" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_UBUS + bool "ubus" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c + depends on !BR2_STATIC_LIBS # libubox + select BR2_PACKAGE_LIBUBOX + select BR2_PACKAGE_JSON_C + help + IPC/RPC bus that allows communication between processes. + + It consists of few parts including a daemon (ubusd), a + library (libubus) and a command line interface + (ubus). Although created for the OpenWRT project, it can be + used as a general IPC/RPC mechanism in other projects. + + * Select BR2_PACKAGE_LUA_5_1 if you want to have Lua + support. + + https://wiki.openwrt.org/doc/techref/ubus + +if BR2_PACKAGE_UBUS + +config BR2_PACKAGE_UBUS_EXAMPLES + bool "build and install ubus examples" + help + Build and install client and server ubus examples. + +endif diff --git a/package/ubus/ubus.hash b/package/ubus/ubus.hash new file mode 100644 index 00000000..1fcea368 --- /dev/null +++ b/package/ubus/ubus.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 011566b2be426f572d397b44a7c12baa50a9b949232e5a6075eba613e1c3f7ae ubus-34c6e818e431cc53478a0f7c7c1eca07d194d692-br1.tar.gz +sha256 f53187f011575f6ec6c529136fd4658d67e674227c80b7b72c99b3654454ae7f ubusd_acl.h diff --git a/package/ubus/ubus.mk b/package/ubus/ubus.mk new file mode 100644 index 00000000..5fb57ead --- /dev/null +++ b/package/ubus/ubus.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# ubus +# +################################################################################ + +UBUS_VERSION = 34c6e818e431cc53478a0f7c7c1eca07d194d692 +UBUS_SITE = git://git.openwrt.org/project/ubus.git + +UBUS_LICENSE = LGPL-2.1 +UBUS_LICENSE_FILES = ubusd_acl.h + +UBUS_INSTALL_STAGING = YES + +UBUS_DEPENDENCIES = json-c libubox + +# package only compiles with Lua 5.1 +ifeq ($(BR2_PACKAGE_LUA_5_1),y) +UBUS_DEPENDENCIES += lua +UBUS_CONF_OPTS += -DBUILD_LUA=ON \ + -DLUA_CFLAGS=-I$(STAGING_DIR)/usr/include \ + -DLUAPATH=/usr/lib/lua/$(LUAINTERPRETER_ABIVER) +else +UBUS_CONF_OPTS += -DBUILD_LUA=OFF +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +UBUS_DEPENDENCIES += systemd +UBUS_CONF_OPTS += -DENABLE_SYSTEMD=ON +else +UBUS_CONF_OPTS += -DENABLE_SYSTEMD=OFF +endif + +ifeq ($(BR2_PACKAGE_UBUS_EXAMPLES),y) +UBUS_CONF_OPTS += -DBUILD_EXAMPLES=ON +else +UBUS_CONF_OPTS += -DBUILD_EXAMPLES=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/uccp420wlan/Config.in b/package/uccp420wlan/Config.in new file mode 100644 index 00000000..ef6a9db8 --- /dev/null +++ b/package/uccp420wlan/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_UCCP420WLAN + bool "uccp420wlan" + depends on BR2_LINUX_KERNEL + help + SoftMAC (mac80211) based WiFi driver for Imagination's + Explorer RPU uccp420. This supports Dual Band WiFi with + 2.4GHz - 2x2 b/g/n 40MHz, 5GHz - 2x2 a/n/11ac 80MHz modes + + Used in creator ci40 board. + + This module needs a Linux kernel >= v4.2. + + https://github.com/CreatorDev/uccp420wlan + +comment "uccp420wlan needs a Linux kernel >= 4.2 to be built" + depends on !BR2_LINUX_KERNEL diff --git a/package/uccp420wlan/uccp420wlan.hash b/package/uccp420wlan/uccp420wlan.hash new file mode 100644 index 00000000..905fa429 --- /dev/null +++ b/package/uccp420wlan/uccp420wlan.hash @@ -0,0 +1,4 @@ +# locally computed hash +sha256 1d4de62fc842dbab739708cf0d9ebce270fcdf63c1c13ac676cbc253acdaa3bb uccp420wlan-6.9.1.tar.gz +sha256 af8067302947c01fd9eee72befa54c7e3ef8a48fecde7fd71277f2290b2bf0f7 COPYING +sha256 9ac431585fddfe624b08cf7464876a5e96061047ff26a9e926da3d89d21a2a73 firmware/LICENSE.imagination diff --git a/package/uccp420wlan/uccp420wlan.mk b/package/uccp420wlan/uccp420wlan.mk new file mode 100644 index 00000000..7256b927 --- /dev/null +++ b/package/uccp420wlan/uccp420wlan.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# uccp420wlan +# +################################################################################ + +UCCP420WLAN_VERSION = 6.9.1 +UCCP420WLAN_SITE = $(call github,CreatorDev,uccp420wlan,v$(UCCP420WLAN_VERSION)) +UCCP420WLAN_LICENSE = GPL-2.0 (kernel module), proprietary (firmware blob) +UCCP420WLAN_LICENSE_FILES = COPYING firmware/LICENSE.imagination + +define UCCP420WLAN_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/firmware/img/uccp420wlan + cp $(@D)/firmware/*.ldr $(TARGET_DIR)/lib/firmware/img/uccp420wlan +endef + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/ucl/ucl.hash b/package/ucl/ucl.hash new file mode 100644 index 00000000..0252f692 --- /dev/null +++ b/package/ucl/ucl.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348 ucl-1.03.tar.gz +sha256 70439f6e2b47057a408d2390ed6663b9875f5a08066a06a060a357ef1df89a8c COPYING diff --git a/package/ucl/ucl.mk b/package/ucl/ucl.mk new file mode 100644 index 00000000..aac068ef --- /dev/null +++ b/package/ucl/ucl.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# ucl +# +################################################################################ + +UCL_VERSION = 1.03 +UCL_SITE = http://www.oberhumer.com/opensource/ucl/download +UCL_LICENSE = GPL-2.0+ +UCL_LICENSE_FILES = COPYING + +# Fix ACC conformance test failure for host gcc 6.x +HOST_UCL_CONF_ENV += CPPFLAGS="$(HOST_CPPFLAGS) -std=iso9899:1990" + +$(eval $(host-autotools-package)) diff --git a/package/uclibc-ng-test/Config.in b/package/uclibc-ng-test/Config.in new file mode 100644 index 00000000..0f093d1d --- /dev/null +++ b/package/uclibc-ng-test/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_UCLIBC_NG_TEST + bool "uclibc-ng-test" + help + Enabling this option will compile and install the uClibc-ng + test suite. This is useful if you want to check if the + uClibc-ng library is working for your architecture and/or + help developing uClibc-ng. + + The test suite will be installed into + /usr/lib/uclibc-ng-test directory. To run the test suite + enter the /usr/lib/uclibc-ng-test/test directory and type + "sh uclibcng-testrunner.sh". + + See the /usr/lib/uclibc-ng-test/test/README for additional + information. + + This is not needed at all for normal builds, so you can + safely say no if you do not plan to dig into your C library. + + The tests can also be used for GNU libc or musl. + + http://www.uclibc-ng.org diff --git a/package/uclibc-ng-test/uclibc-ng-test.hash b/package/uclibc-ng-test/uclibc-ng-test.hash new file mode 100644 index 00000000..37660b04 --- /dev/null +++ b/package/uclibc-ng-test/uclibc-ng-test.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 f731307c0547ce4bbd3f5025972f64e9b22208a147e34e5745000b54d4d3aa98 uclibc-ng-test-0844445e7358eb10e716155b55b0fb23e88d644a-br1.tar.gz +sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 COPYING.LIB diff --git a/package/uclibc-ng-test/uclibc-ng-test.mk b/package/uclibc-ng-test/uclibc-ng-test.mk new file mode 100644 index 00000000..ea5f2242 --- /dev/null +++ b/package/uclibc-ng-test/uclibc-ng-test.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# uclibc-ng-test +# +################################################################################ + +UCLIBC_NG_TEST_VERSION = 0844445e7358eb10e716155b55b0fb23e88d644a +UCLIBC_NG_TEST_SITE = git://uclibc-ng.org/git/uclibc-ng-test +UCLIBC_NG_TEST_LICENSE = LGPL-2.1+ +UCLIBC_NG_TEST_LICENSE_FILES = COPYING.LIB + +# the math tests are recently synced from glibc and need more adaption before +# regular testing is possible +UCLIBC_NG_TEST_MAKE_ENV += NO_MATH=1 + +# obsolete encrypt and setkey functions are not available since glibc 2.28 +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) +UCLIBC_NG_TEST_MAKE_ENV += NO_CRYPT=1 +endif + +# locale tests are not compatible with musl, yet +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +UCLIBC_NG_TEST_MAKE_ENV += NO_LOCALE=1 +endif +ifeq ($(BR2_USE_WCHAR),) +UCLIBC_NG_TEST_MAKE_ENV += NO_WCHAR=1 +endif +ifeq ($(BR2_ENABLE_LOCALE),) +UCLIBC_NG_TEST_MAKE_ENV += NO_LOCALE=1 +endif +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +UCLIBC_NG_TEST_MAKE_ENV += NO_TLS=1 NO_THREADS=1 +endif +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),) +UCLIBC_NG_TEST_MAKE_ENV += NO_TLS=1 NO_NPTL=1 +endif +# most NPTL/TLS tests use dlopen +ifeq ($(BR2_STATIC_LIBS),y) +UCLIBC_NG_TEST_MAKE_ENV += NO_TLS=1 NO_NPTL=1 NO_DL=1 +endif +# no TLS macros available +ifeq ($(BR2_nds32)$(BR2_s390x),y) +UCLIBC_NG_TEST_MAKE_ENV += NO_TLS=1 +endif + +# to execute tests in a deterministic order, call test_gen separately +define UCLIBC_NG_TEST_BUILD_CMDS + $(TARGET_MAKE_ENV) $(UCLIBC_NG_TEST_MAKE_ENV) $(MAKE) -C $(@D) \ + CC="$(TARGET_CC)" \ + UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ + test_compile + $(TARGET_MAKE_ENV) $(UCLIBC_NG_TEST_MAKE_ENV) $(MAKE1) -C $(@D) \ + CC="$(TARGET_CC)" \ + UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + test_gen +endef + +define UCLIBC_NG_TEST_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package)) diff --git a/package/uclibc/0001-powerpc-fix-PIE-PIC-builds-with-newer-gcc-binutils-w.patch b/package/uclibc/0001-powerpc-fix-PIE-PIC-builds-with-newer-gcc-binutils-w.patch new file mode 100644 index 00000000..040699df --- /dev/null +++ b/package/uclibc/0001-powerpc-fix-PIE-PIC-builds-with-newer-gcc-binutils-w.patch @@ -0,0 +1,91 @@ +From 6c95eccff5eb43c8c3ad865d3b1316b7952cc58e Mon Sep 17 00:00:00 2001 +From: Yann Sionneau +Date: Fri, 28 May 2021 08:59:58 +0200 +Subject: [PATCH] powerpc: fix PIE/PIC builds with newer gcc/binutils which use + secureplt by default + +This patch fixes segfault of all user space processes (including init, which caused a panic) on recent buildroot powerpc32 builds. + +The issue has been reported by Romain Naour in this thread: https://mailman.uclibc-ng.org/pipermail/devel/2021-May/002068.html + +Recent buildroot toolchain enables secure PLT in powerpc gcc. +The latter will then supply -msecure-plt to gas invocations by default. +Recent buildroot also enables PIE by default. + +For the secure PLT to work in PIC, the r30 register needs to point to the GOT. +Old "bss plt" was just a one-instruction-wide PLT slot, pointed-to by a R_PPC_JMP_SLOT relocation, which was written on-the-fly to contain a branch instruction to the correct address. It therefore had to stay writable+executable, which you generally want to avoid for security reasons. +New secure PLT only contains read-only code which loads the branch address from the writable GOT. + +Note: secure PLT without PIC does not need r30 to be set. Because offset between plt stub code and got is known at link-time. In this case the PLT entry looks like: +1009b3e0 <__uClibc_main@plt>: +1009b3e0: 3d 60 10 0e lis r11,4110 +1009b3e4: 81 6b 03 74 lwz r11,884(r11) +1009b3e8: 7d 69 03 a6 mtctr r11 +1009b3ec: 4e 80 04 20 bctr + +Whereas secure PLT with PIC - offset between plt and got is unknown at link-time - looks like this: +000af800 <00000000.plt_pic32.__uClibc_main>: + af800: 81 7e 03 80 lwz r11,896(r30) + af804: 7d 69 03 a6 mtctr r11 + af808: 4e 80 04 20 bctr + af80c: 60 00 00 00 nop + +Upstream status: Pending: +https://mailman.uclibc-ng.org/pipermail/devel/2021-May/002091.html + +Signed-off-by: Yann Sionneau +Signed-off-by: Romain Naour +--- + Rules.mak | 3 ++- + ldso/ldso/powerpc/dl-startup.h | 3 +++ + libc/sysdeps/linux/powerpc/crt1.S | 4 ++++ + 3 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/Rules.mak b/Rules.mak +index 10f88b3de..60ac59b85 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -477,9 +477,10 @@ ifeq ($(TARGET_ARCH),powerpc) + PICFLAG:=-fpic + PIEFLAG_NAME:=-fpie + PPC_HAS_REL16:=$(shell printf "\t.text\n\taddis 11,30,_GLOBAL_OFFSET_TABLE_-.@ha\n" | $(CC) -c -x assembler -o /dev/null - 2> /dev/null && echo -n y || echo -n n) ++ PPC_HAS_SECUREPLT:=$(shell $(CC) --verbose 2>&1 | grep -- --enable-secureplt > /dev/null && echo -n y || echo -n n) ++ CPU_CFLAGS-$(PPC_HAS_SECUREPLT) += -DPPC_HAS_SECUREPLT + CPU_CFLAGS-$(PPC_HAS_REL16)+= -DHAVE_ASM_PPC_REL16 + CPU_CFLAGS-$(CONFIG_E500) += "-D__NO_MATH_INLINES" +- + endif + + ifeq ($(TARGET_ARCH),bfin) +diff --git a/ldso/ldso/powerpc/dl-startup.h b/ldso/ldso/powerpc/dl-startup.h +index 8b2a517e2..7749395eb 100644 +--- a/ldso/ldso/powerpc/dl-startup.h ++++ b/ldso/ldso/powerpc/dl-startup.h +@@ -25,6 +25,9 @@ __asm__( + #else + " bl _GLOBAL_OFFSET_TABLE_-4@local\n" /* Put our GOT pointer in r31, */ + " mflr 31\n" ++#endif ++#ifdef PPC_HAS_SECUREPLT ++ " mr 30,31\n" + #endif + " addi 1,1,16\n" /* Restore SP */ + " lwz 7,_dl_skip_args@got(31)\n" /* load EA of _dl_skip_args */ +diff --git a/libc/sysdeps/linux/powerpc/crt1.S b/libc/sysdeps/linux/powerpc/crt1.S +index 27bfc5a5a..3f5d056c0 100644 +--- a/libc/sysdeps/linux/powerpc/crt1.S ++++ b/libc/sysdeps/linux/powerpc/crt1.S +@@ -56,6 +56,10 @@ _start: + # else + bl _GLOBAL_OFFSET_TABLE_-4@local + mflr r31 ++# endif ++ /* in PIC/PIE, plt stubs need r30 to point to the GOT if using secure-plt */ ++# ifdef PPC_HAS_SECUREPLT ++ mr 30,31 + # endif + #endif + /* Set up the small data pointer in r13. */ +-- +2.31.1 + diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in new file mode 100644 index 00000000..e59fef3c --- /dev/null +++ b/package/uclibc/Config.in @@ -0,0 +1,154 @@ +if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + +comment "uClibc Options" + +config BR2_PACKAGE_UCLIBC + bool + default y + select BR2_PACKAGE_LINUX_HEADERS + +config BR2_UCLIBC_CONFIG + string "uClibc configuration file to use?" + default "package/uclibc/uClibc-ng.config" + help + Some people may wish to use their own modified uClibc + configuration file and will specify their config file + location with this option. See also docs/README in this + package. If unsure, use the default. + +config BR2_UCLIBC_CONFIG_FRAGMENT_FILES + string "Additional uClibc configuration fragment files" + help + A space-separated list of configuration fragment files, that + will be merged to the main uClibc configuration file. + +config BR2_TOOLCHAIN_BUILDROOT_WCHAR + bool "Enable WCHAR support" + select BR2_USE_WCHAR + help + Enable this option if you want your toolchain to support + wide characters (i.e characters longer than 8 bits, needed + for locale support). + +config BR2_TOOLCHAIN_BUILDROOT_LOCALE + bool "Enable toolchain locale/i18n support" + select BR2_TOOLCHAIN_BUILDROOT_WCHAR + select BR2_ENABLE_LOCALE + select BR2_NEEDS_HOST_UTF8_LOCALE + help + Enable this option if you want your toolchain to support + localization and internationalization. + +choice + prompt "Thread library implementation" + help + Use this option to select the thread library implementation + that should be used in your toolchain. + +config BR2_PTHREADS_NATIVE + bool "Native POSIX Threading (NPTL)" + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + +config BR2_PTHREADS + bool "linuxthreads" + depends on BR2_m68k || BR2_microblaze || BR2_or1k || BR2_arm || BR2_armeb || BR2_xtensa + select BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PTHREADS_NONE + bool "none" + +endchoice + +config BR2_PTHREAD_DEBUG + bool "Thread library debugging" + depends on BR2_PTHREADS || BR2_PTHREADS_NATIVE + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + help + Build the thread library with debugging enabled. + +config BR2_TOOLCHAIN_BUILDROOT_USE_SSP + bool "Enable stack protection support" + depends on BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI + select BR2_TOOLCHAIN_HAS_SSP + help + Enable stack smashing protection support using GCCs + -fstack-protector-all option in uClibc. + + See + http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt + for details. + +config BR2_UCLIBC_INSTALL_UTILS + bool "Compile and install uClibc utilities" + default y + help + Enabling this option will compile and install the getconf, + ldconfig and ldd uClibc utilities for the target. + + You can save ~32 KiB in target space by disabling them since + they're normally not needed. + +# Mapping from the Buildroot architecture configuration options to the +# uClibc architecture names. +config BR2_UCLIBC_TARGET_ARCH + string + default "arc" if BR2_arcle || BR2_arceb + default "arm" if BR2_arm || BR2_armeb + default "m68k" if BR2_m68k + default "microblaze" if BR2_microblaze + default "mips" if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default "or1k" if BR2_or1k + default "powerpc" if BR2_powerpc + default "sh" if BR2_sh + default "sparc" if BR2_sparc + default "xtensa" if BR2_xtensa + default "i386" if BR2_i386 + default "x86_64" if BR2_x86_64 + default "riscv64" if BR2_RISCV_64 + +config BR2_UCLIBC_MIPS_ABI + string + default "O32" if BR2_MIPS_OABI32 + default "N32" if BR2_MIPS_NABI32 + default "N64" if BR2_MIPS_NABI64 + depends on BR2_UCLIBC_TARGET_ARCH = "mips" + +config BR2_UCLIBC_MIPS_NAN + string + default "LEGACY" if BR2_MIPS_NAN_LEGACY + default "2008" if BR2_MIPS_NAN_2008 + depends on BR2_UCLIBC_TARGET_ARCH = "mips" + +config BR2_UCLIBC_SH_TYPE + string + default "SH2A" if BR2_sh2a + default "SH4" if BR2_sh4 || BR2_sh4eb + depends on BR2_UCLIBC_TARGET_ARCH = "sh" + +config BR2_UCLIBC_SPARC_TYPE + string + default "V7" if BR2_sparc_v7 || BR2_sparc_sparchfleon || BR2_sparc_sparcsfleon + default "V8" if BR2_sparc_v8 || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleonv8 + depends on BR2_UCLIBC_TARGET_ARCH = "sparc" + +config BR2_UCLIBC_POWERPC_TYPE + string + default "CLASSIC" if !BR2_powerpc_8540 && !BR2_powerpc_8548 + default "E500" if BR2_powerpc_8540 || BR2_powerpc_8548 + depends on BR2_UCLIBC_TARGET_ARCH = "powerpc" + +config BR2_UCLIBC_X86_TYPE + string + default "486" if BR2_x86_i486 + default "586" if BR2_x86_i586 + default "586MMX" if BR2_x86_pentium_mmx + default "686" if BR2_x86_i686 || BR2_x86_pentiumpro + default "PENTIUMII" if BR2_x86_pentium2 + default "PENTIUMIII" if BR2_x86_pentium3 + default "PENTIUM4" if BR2_x86_pentium4 || BR2_x86_pentium_m || \ + BR2_x86_nocona || BR2_x86_core2 || BR2_x86_corei7 + depends on BR2_UCLIBC_TARGET_ARCH = "i386" + +endif # BR2_TOOLCHAIN_BUILDROOT_UCLIBC diff --git a/package/uclibc/uClibc-ng.config b/package/uclibc/uClibc-ng.config new file mode 100644 index 00000000..5beb2bd9 --- /dev/null +++ b/package/uclibc/uClibc-ng.config @@ -0,0 +1,42 @@ +DO_C99_MATH=y +DO_XSI_MATH=y +KERNEL_HEADERS="/usr/src/linux/include" +# LDSO_CACHE_SUPPORT is not set +# UCLIBC_STATIC_LDCONFIG is not set +LDSO_RUNPATH=y +LDSO_RUNPATH_OF_EXECUTABLE=y +UCLIBC_HAS_UTMPX=y +UCLIBC_HAS_UTMP=y +UCLIBC_SUSV2_LEGACY=y +UCLIBC_SUSV3_LEGACY=y +UCLIBC_HAS_CONTEXT_FUNCS=y +UCLIBC_SUSV4_LEGACY=y +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS_GETPT=y +UCLIBC_HAS_LIBUTIL=y +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y +UCLIBC_HAS_SHA256_CRYPT_IMPL=y +UCLIBC_HAS_SHA512_CRYPT_IMPL=y +UCLIBC_USE_NETLINK=y +UCLIBC_SUPPORT_AI_ADDRCONFIG=y +UCLIBC_HAS_RESOLVER_SUPPORT=y +UCLIBC_HAS_LIBRESOLV_STUB=y +UCLIBC_HAS_LIBNSL_STUB=y +UCLIBC_HAS_CTYPE_CHECKED=y +UCLIBC_HAS_LIBINTL=y +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +UCLIBC_HAS_STDIO_GETC_MACRO=y +UCLIBC_HAS_STDIO_PUTC_MACRO=y +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +UCLIBC_HAS_WORDEXP=y +UCLIBC_HAS_NFTW=y +UCLIBC_HAS_FTW=y +UCLIBC_HAS_GNU_GLOB=y +RUNTIME_PREFIX="/" +DEVEL_PREFIX="/usr/" +UCLIBC_HAS_SSP=y +UCLIBC_BUILD_NOW=y +# DOSTRIP is not set diff --git a/package/uclibc/uclibc.hash b/package/uclibc/uclibc.hash new file mode 100644 index 00000000..2935785f --- /dev/null +++ b/package/uclibc/uclibc.hash @@ -0,0 +1,4 @@ +# From https://downloads.uclibc-ng.org/releases/1.0.38/uClibc-ng-1.0.38.tar.xz.sha256 +sha256 b1a3328330d2c94a2bec8c1436a8f15673f3a9b5895e155efc2e91d4e1882570 uClibc-ng-1.0.38.tar.xz +# Locally calculated +sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 COPYING.LIB diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk new file mode 100644 index 00000000..d2216410 --- /dev/null +++ b/package/uclibc/uclibc.mk @@ -0,0 +1,465 @@ +################################################################################ +# +# uclibc +# +################################################################################ + +UCLIBC_VERSION = 1.0.38 +UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz +UCLIBC_SITE = https://downloads.uclibc-ng.org/releases/$(UCLIBC_VERSION) +UCLIBC_LICENSE = LGPL-2.1+ +UCLIBC_LICENSE_FILES = COPYING.LIB +UCLIBC_INSTALL_STAGING = YES +UCLIBC_CPE_ID_VENDOR = uclibc-ng_project +UCLIBC_CPE_ID_PRODUCT = uclibc-ng + +define UCLIBC_HELP_CMDS + @echo ' uclibc-menuconfig - Run uClibc menuconfig' +endef + +# uclibc is part of the toolchain so disable the toolchain dependency +UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO + +# Before uClibc is configured, we must have the first stage +# cross-compiler and the kernel headers +UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers + +# specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config +# setting. +ifndef UCLIBC_CONFIG_FILE +UCLIBC_CONFIG_FILE = $(call qstrip,$(BR2_UCLIBC_CONFIG)) +endif + +UCLIBC_KCONFIG_EDITORS = menuconfig nconfig +UCLIBC_KCONFIG_FILE = $(UCLIBC_CONFIG_FILE) +UCLIBC_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_UCLIBC_CONFIG_FRAGMENT_FILES)) + +# UCLIBC_MAKE_FLAGS set HOSTCC to the default HOSTCC, which may be +# wrapped with ccache. However, host-ccache may not already be built +# and installed when we apply the configuration, so we override that +# to use the non-ccached host compiler. +UCLIBC_KCONFIG_OPTS = \ + $(UCLIBC_MAKE_FLAGS) \ + HOSTCC="$(HOSTCC_NOCCACHE)" \ + PREFIX=$(STAGING_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=$(STAGING_DIR)/ + +UCLIBC_TARGET_ARCH = $(call qstrip,$(BR2_UCLIBC_TARGET_ARCH)) + +UCLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE)) + +ifeq ($(UCLIBC_GENERATE_LOCALES),) +# We need at least one locale +UCLIBC_LOCALES = en_US +else +# Strip out the encoding part of locale names, if any +UCLIBC_LOCALES = \ + $(foreach locale,$(UCLIBC_GENERATE_LOCALES),\ + $(firstword $(subst .,$(space),$(locale)))) +endif + +# noMMU binary formats +ifeq ($(BR2_BINFMT_FLAT_ONE),y) +define UCLIBC_BINFMT_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FLAT) + $(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA) + $(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT) + $(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF) +endef +endif +ifeq ($(BR2_BINFMT_FLAT_SHARED),y) +define UCLIBC_BINFMT_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT) + $(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA) + $(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT) + $(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF) +endef +endif + +# +# ARC definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),arc) +UCLIBC_ARC_PAGE_SIZE = CONFIG_ARC_PAGE_SIZE_$(call qstrip,$(BR2_ARC_PAGE_SIZE)) +define UCLIBC_ARC_PAGE_SIZE_CONFIG + $(SED) '/CONFIG_ARC_PAGE_SIZE_*/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_PAGE_SIZE)) +endef + +ifeq ($(BR2_ARC_ATOMIC_EXT),) +define UCLIBC_ARC_ATOMICS_CONFIG + $(call KCONFIG_DISABLE_OPT,CONFIG_ARC_HAS_ATOMICS) +endef +endif + +endif # arc + +# +# ARM definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),arm) +define UCLIBC_ARM_ABI_CONFIG + $(SED) '/CONFIG_ARM_.ABI/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_EABI) +endef + +ifeq ($(BR2_BINFMT_FLAT),y) +define UCLIBC_ARM_BINFMT_FLAT + $(call KCONFIG_DISABLE_OPT,DOPIC) +endef +endif + +# context functions are written with ARM instructions. Therefore, if +# we are using a Thumb2-only platform (i.e, Cortex-M), they must be +# disabled. Thumb1 platforms are not a problem, since they all also +# support the ARM instructions. +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB2):$(BR2_ARM_CPU_HAS_ARM),y:) +define UCLIBC_ARM_NO_CONTEXT_FUNCS + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_CONTEXT_FUNCS) +endef +endif + +endif # arm + +# +# m68k/coldfire definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),m68k) + +# disable DOPIC for flat without separate data +ifeq ($(BR2_BINFMT_FLAT_ONE),y) +define UCLIBC_M68K_BINFMT_FLAT + $(call KCONFIG_DISABLE_OPT,DOPIC) +endef +endif + +endif # m68k/coldfire + +# +# MIPS definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),mips) +UCLIBC_MIPS_ABI = CONFIG_MIPS_$(call qstrip,$(BR2_UCLIBC_MIPS_ABI))_ABI +define UCLIBC_MIPS_ABI_CONFIG + $(SED) '/CONFIG_MIPS_[NO].._ABI/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ABI)) +endef + +UCLIBC_MIPS_NAN = CONFIG_MIPS_NAN_$(call qstrip,$(BR2_UCLIBC_MIPS_NAN)) +define UCLIBC_MIPS_NAN_CONFIG + $(SED) '/CONFIG_MIPS_NAN_.*/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_NAN)) +endef +endif # mips + +# +# SH definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),sh) +UCLIBC_SH_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_SH_TYPE)) +define UCLIBC_SH_TYPE_CONFIG + $(SED) '/CONFIG_SH[234A]*/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_SH_TYPE)) +endef +endif # sh + +# +# SPARC definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),sparc) +UCLIBC_SPARC_TYPE = CONFIG_SPARC_$(call qstrip,$(BR2_UCLIBC_SPARC_TYPE)) +define UCLIBC_SPARC_TYPE_CONFIG + $(SED) 's/^\(CONFIG_[^_]*[_]*SPARC[^=]*\)=.*/# \1 is not set/g' \ + $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_SPARC_TYPE)) +endef +endif # sparc + +# +# PowerPC definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),powerpc) +UCLIBC_POWERPC_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_POWERPC_TYPE)) +define UCLIBC_POWERPC_TYPE_CONFIG + $(call KCONFIG_DISABLE_OPT,CONFIG_GENERIC) + $(call KCONFIG_DISABLE_OPT,CONFIG_E500) + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_POWERPC_TYPE)) +endef +endif # powerpc + +# +# x86 definitions +# +ifeq ($(UCLIBC_TARGET_ARCH),i386) +UCLIBC_X86_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_X86_TYPE)) +define UCLIBC_X86_TYPE_CONFIG + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_X86_TYPE)) +endef +endif + +# +# Debug +# +ifeq ($(BR2_ENABLE_DEBUG),y) +define UCLIBC_DEBUG_CONFIG + $(call KCONFIG_ENABLE_OPT,DODEBUG) +endef +endif + +# +# Endianness +# + +ifeq ($(call qstrip,$(BR2_ENDIAN)),BIG) +define UCLIBC_ENDIAN_CONFIG + $(call KCONFIG_ENABLE_OPT,ARCH_BIG_ENDIAN) + $(call KCONFIG_ENABLE_OPT,ARCH_WANTS_BIG_ENDIAN) + $(call KCONFIG_DISABLE_OPT,ARCH_LITTLE_ENDIAN) + $(call KCONFIG_DISABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN) +endef +else +define UCLIBC_ENDIAN_CONFIG + $(call KCONFIG_ENABLE_OPT,ARCH_LITTLE_ENDIAN) + $(call KCONFIG_ENABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN) + $(call KCONFIG_DISABLE_OPT,ARCH_BIG_ENDIAN) + $(call KCONFIG_DISABLE_OPT,ARCH_WANTS_BIG_ENDIAN) +endef +endif + +# +# MMU +# + +ifeq ($(BR2_USE_MMU),y) +define UCLIBC_MMU_CONFIG + $(call KCONFIG_ENABLE_OPT,ARCH_HAS_MMU) + $(call KCONFIG_ENABLE_OPT,ARCH_USE_MMU) +endef +else +define UCLIBC_MMU_CONFIG + $(call KCONFIG_DISABLE_OPT,ARCH_HAS_MMU) + $(call KCONFIG_DISABLE_OPT,ARCH_USE_MMU) +endef +endif + +# +# IPv6 +# + +UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6) + +# +# soft-float +# + +ifeq ($(BR2_SOFT_FLOAT),y) +define UCLIBC_FLOAT_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_FPU) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS) + $(call KCONFIG_ENABLE_OPT,DO_C99_MATH) +endef +else +define UCLIBC_FLOAT_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FPU) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS) +endef +endif + +# +# SSP +# +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y) +define UCLIBC_SSP_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_SSP) + $(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_SSP) +endef +else +define UCLIBC_SSP_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_SSP) + $(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_SSP) +endef +endif + +# +# Threads +# +ifeq ($(BR2_PTHREADS_NONE),y) +define UCLIBC_THREAD_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE) +endef +else ifeq ($(BR2_PTHREADS),y) +define UCLIBC_THREAD_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LINUXTHREADS) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE) +endef +else ifeq ($(BR2_PTHREADS_NATIVE),y) +define UCLIBC_THREAD_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS_NATIVE) +endef +endif + +# +# Thread debug +# + +ifeq ($(BR2_PTHREAD_DEBUG),y) +UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_ENABLE_OPT,PTHREADS_DEBUG_SUPPORT) +else +UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_DISABLE_OPT,PTHREADS_DEBUG_SUPPORT) +endif + +# +# Locale +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LOCALE),y) +define UCLIBC_LOCALE_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LOCALE) + $(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_ALL_LOCALE) + $(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_MINIMAL_LOCALE) + $(call KCONFIG_SET_OPT,UCLIBC_BUILD_MINIMAL_LOCALES,"$(UCLIBC_LOCALES)") + $(call KCONFIG_DISABLE_OPT,UCLIBC_PREGENERATED_LOCALE_DATA) + $(call KCONFIG_DISABLE_OPT,DOWNLOAD_PREGENERATED_LOCALE_DATA) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_XLOCALE) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_GLIBC_DIGIT_GROUPING) +endef +else +define UCLIBC_LOCALE_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LOCALE) +endef +endif + +# +# wchar +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y) +UCLIBC_WCHAR_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_WCHAR) +else +UCLIBC_WCHAR_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_WCHAR) +endif + +# +# static/shared libs +# + +ifeq ($(BR2_STATIC_LIBS),y) +UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_DISABLE_OPT,HAVE_SHARED) +else +UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_ENABLE_OPT,HAVE_SHARED) +endif + +# +# Commands +# + +UCLIBC_MAKE_FLAGS = \ + ARCH="$(UCLIBC_TARGET_ARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + UCLIBC_EXTRA_CFLAGS="$(TARGET_ABI)" \ + HOSTCC="$(HOSTCC)" + +define UCLIBC_KCONFIG_FIXUP_CMDS + $(call KCONFIG_SET_OPT,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)") + $(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH)) + $(call KCONFIG_SET_OPT,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)") + $(call KCONFIG_SET_OPT,KERNEL_HEADERS,"$(LINUX_HEADERS_DIR)/usr/include") + $(call KCONFIG_SET_OPT,RUNTIME_PREFIX,"/") + $(call KCONFIG_SET_OPT,DEVEL_PREFIX,"/usr") + $(call KCONFIG_SET_OPT,SHARED_LIB_LOADER_PREFIX,"/lib") + $(UCLIBC_MMU_CONFIG) + $(UCLIBC_BINFMT_CONFIG) + $(UCLIBC_ARC_PAGE_SIZE_CONFIG) + $(UCLIBC_ARC_ATOMICS_CONFIG) + $(UCLIBC_ARM_ABI_CONFIG) + $(UCLIBC_ARM_BINFMT_FLAT) + $(UCLIBC_ARM_NO_CONTEXT_FUNCS) + $(UCLIBC_M68K_BINFMT_FLAT) + $(UCLIBC_MIPS_ABI_CONFIG) + $(UCLIBC_MIPS_NAN_CONFIG) + $(UCLIBC_SH_TYPE_CONFIG) + $(UCLIBC_SPARC_TYPE_CONFIG) + $(UCLIBC_POWERPC_TYPE_CONFIG) + $(UCLIBC_X86_TYPE_CONFIG) + $(UCLIBC_DEBUG_CONFIG) + $(UCLIBC_ENDIAN_CONFIG) + $(UCLIBC_IPV6_CONFIG) + $(UCLIBC_FLOAT_CONFIG) + $(UCLIBC_SSP_CONFIG) + $(UCLIBC_THREAD_CONFIG) + $(UCLIBC_THREAD_DEBUG_CONFIG) + $(UCLIBC_LOCALE_CONFIG) + $(UCLIBC_WCHAR_CONFIG) + $(UCLIBC_SHARED_LIBS_CONFIG) +endef + +define UCLIBC_BUILD_CMDS + $(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS) headers + $(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS) + $(MAKE) -C $(@D)/utils \ + PREFIX=$(HOST_DIR) \ + HOSTCC="$(HOSTCC)" hostutils +endef + +ifeq ($(BR2_UCLIBC_INSTALL_UTILS),y) +define UCLIBC_INSTALL_UTILS_TARGET + $(MAKE1) -C $(@D) \ + CC="$(TARGET_CC)" CPP="$(TARGET_CPP)" LD="$(TARGET_LD)" \ + ARCH="$(UCLIBC_TARGET_ARCH)" \ + PREFIX=$(TARGET_DIR) \ + utils install_utils +endef +endif + +define UCLIBC_INSTALL_TARGET_CMDS + $(MAKE1) -C $(@D) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(TARGET_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=/ \ + install_runtime + $(UCLIBC_INSTALL_UTILS_TARGET) +endef + +# STATIC has no ld* tools, only getconf +ifeq ($(BR2_STATIC_LIBS),) +define UCLIBC_INSTALL_UTILS_STAGING + $(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/bin/ldd + ln -sf ldd $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-ldd + $(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/bin/ldconfig + ln -sf ldconfig $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-ldconfig +endef +endif + +define UCLIBC_INSTALL_STAGING_CMDS + $(MAKE1) -C $(@D) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(STAGING_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=/ \ + install_runtime install_dev + $(UCLIBC_INSTALL_UTILS_STAGING) +endef + +# Checks to give errors that the user can understand +# Must be before we call to kconfig-package +ifeq ($(BR2_PACKAGE_UCLIBC)$(BR_BUILDING),yy) +ifeq ($(call qstrip,$(BR2_UCLIBC_CONFIG)),) +$(error No uClibc configuration file specified, check your BR2_UCLIBC_CONFIG setting) +endif +endif + +$(eval $(kconfig-package)) diff --git a/package/udev-gentoo-scripts/Config.in b/package/udev-gentoo-scripts/Config.in new file mode 100644 index 00000000..9d694435 --- /dev/null +++ b/package/udev-gentoo-scripts/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_UDEV_GENTOO_SCRIPTS + bool + depends on BR2_PACKAGE_EUDEV + depends on BR2_INIT_OPENRC + help + Init scripts for eudev. diff --git a/package/udev-gentoo-scripts/udev-gentoo-scripts.hash b/package/udev-gentoo-scripts/udev-gentoo-scripts.hash new file mode 100644 index 00000000..60563baa --- /dev/null +++ b/package/udev-gentoo-scripts/udev-gentoo-scripts.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 b206f72c93cd2e51ed59061931918a9c23c3c1f7e6caffacc9d4f8915a42c30a udev-gentoo-scripts-33.tar.bz2 +sha256 329f95829088b95650b9012ae688f09baa1637985425a7964d33683363f48702 init.d/udev-settle diff --git a/package/udev-gentoo-scripts/udev-gentoo-scripts.mk b/package/udev-gentoo-scripts/udev-gentoo-scripts.mk new file mode 100644 index 00000000..a0598bca --- /dev/null +++ b/package/udev-gentoo-scripts/udev-gentoo-scripts.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# udev-gentoo-scripts +# +################################################################################ + +UDEV_GENTOO_SCRIPTS_VERSION = 33 +UDEV_GENTOO_SCRIPTS_SOURCE = udev-gentoo-scripts-$(UDEV_GENTOO_SCRIPTS_VERSION).tar.bz2 +UDEV_GENTOO_SCRIPTS_SITE = https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/snapshot +UDEV_GENTOO_SCRIPTS_LICENSE = GPL-2.0 +UDEV_GENTOO_SCRIPTS_LICENSE_FILES = init.d/udev-settle + +# We don't need to symlink /etc/init.d/udev to /etc/runlevels/sysinit, since +# it's in the udev-settle and udev-trigger "need" lists. +define UDEV_GENTOO_SCRIPTS_INSTALL_INIT_OPENRC + $(MAKE1) -C $(@D) install DESTDIR=$(TARGET_DIR) + $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/runlevels/sysinit + ln -s -f /etc/init.d/udev-settle /etc/init.d/udev-trigger \ + $(TARGET_DIR)/etc/runlevels/sysinit +endef + +$(eval $(generic-package)) diff --git a/package/udev/Config.in b/package/udev/Config.in new file mode 100644 index 00000000..814a6251 --- /dev/null +++ b/package/udev/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HAS_UDEV + bool + +config BR2_PACKAGE_PROVIDES_UDEV + string + depends on BR2_PACKAGE_HAS_UDEV diff --git a/package/udev/udev.mk b/package/udev/udev.mk new file mode 100644 index 00000000..05b35b21 --- /dev/null +++ b/package/udev/udev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# udev +# +################################################################################ + +# Required by default rules for input devices +define UDEV_USERS + - - input -1 * - - - Input device group + - - render -1 * - - - DRI rendering nodes + - - kvm -1 * - - - kvm nodes +endef + +$(eval $(virtual-package)) diff --git a/package/udftools/Config.in b/package/udftools/Config.in new file mode 100644 index 00000000..bbccd601 --- /dev/null +++ b/package/udftools/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_UDFTOOLS + bool "udftools" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_READLINE + help + Tools for creating UDF filesystems + Maintained fork of the 2004 Sourcforge package + + https://github.com/pali/udftools + +comment "udftools needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/udftools/udftools.hash b/package/udftools/udftools.hash new file mode 100644 index 00000000..630a3427 --- /dev/null +++ b/package/udftools/udftools.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 d67ce203d71d828619d6d3791ab33eefab4bc506e0ee73355ab6c2f91d52448e udftools-2.2.tar.gz +sha256 dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa COPYING diff --git a/package/udftools/udftools.mk b/package/udftools/udftools.mk new file mode 100644 index 00000000..db7c13cc --- /dev/null +++ b/package/udftools/udftools.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# udftools +# +################################################################################ + +UDFTOOLS_VERSION = 2.2 +UDFTOOLS_SITE = https://github.com/pali/udftools/releases/download/$(UDFTOOLS_VERSION) +UDFTOOLS_LICENSE = GPL-2.0+ +UDFTOOLS_LICENSE_FILES = COPYING +UDFTOOLS_DEPENDENCIES = readline host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/udisks/0001-fix-build-with-newer-glibc-versions.patch b/package/udisks/0001-fix-build-with-newer-glibc-versions.patch new file mode 100644 index 00000000..336fc440 --- /dev/null +++ b/package/udisks/0001-fix-build-with-newer-glibc-versions.patch @@ -0,0 +1,29 @@ +Fix build with newer glibc versions + +This patch has been backported from upstream: + +http://cgit.freedesktop.org/udisks/commit/?h=udisks1&id=9829152b12a8924d2e091a00133ed1a3a7ba75c0 + +Signed-off-by: Vicente Olivert Riera + +From 9829152b12a8924d2e091a00133ed1a3a7ba75c0 Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev +Date: Fri, 29 May 2015 21:09:39 -0400 +Subject: fix build with newer glibc versions + +https://bugs.freedesktop.org/show_bug.cgi?id=90778 + +diff --git a/src/helpers/job-drive-detach.c b/src/helpers/job-drive-detach.c +index eeafcab..d122a1f 100644 +--- a/src/helpers/job-drive-detach.c ++++ b/src/helpers/job-drive-detach.c +@@ -18,6 +18,7 @@ + * + */ + ++#include + #include + #include + #include +-- +cgit v0.10.2 diff --git a/package/udisks/0002-Fix-systemd-service-file.patch b/package/udisks/0002-Fix-systemd-service-file.patch new file mode 100644 index 00000000..ea347aef --- /dev/null +++ b/package/udisks/0002-Fix-systemd-service-file.patch @@ -0,0 +1,33 @@ +From bf8b4362cef24a6f747e4329305a4939c8f585d1 Mon Sep 17 00:00:00 2001 +From: David King +Date: Thu, 2 Jul 2015 13:49:22 +0100 +Subject: [PATCH] Fix systemd service file + +udisks-daemon is installed to $(libexecdir), not $(prefix)/lib/udisks. + +https://bugzilla.redhat.com/show_bug.cgi?id=1238664 +https://bugs.freedesktop.org/show_bug.cgi?id=91191 + +[This patch has been backported from upstream: +https://cgit.freedesktop.org/udisks/commit/?h=udisks1&id=bf8b4362cef24a6f747e4329305a4939c8f585d1] +Signed-off-by: Pieterjan Camerlynck +--- + data/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/Makefile.am b/data/Makefile.am +index 411ea0f..08af5f4 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -31,7 +31,7 @@ systemdservicedir = $(systemdsystemunitdir) + systemdservice_DATA = $(systemdservice_in_files:.service.in=.service) + + $(systemdservice_DATA): $(systemdservice_in_files) Makefile +- @sed -e "s|\@libexecdir\@|$(prefix)/lib/udisks|" $< > $@ ++ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ + endif + + udevrulesdir = $(slashlibdir)/udev/rules.d +-- +2.7.4 + diff --git a/package/udisks/0003-Fix-compilation-issue-with-missing-sys-sysmacros.h-i.patch b/package/udisks/0003-Fix-compilation-issue-with-missing-sys-sysmacros.h-i.patch new file mode 100644 index 00000000..71152e5d --- /dev/null +++ b/package/udisks/0003-Fix-compilation-issue-with-missing-sys-sysmacros.h-i.patch @@ -0,0 +1,81 @@ +From d934b0fa5ce24a8fd1987b916e435ba991c2ef64 Mon Sep 17 00:00:00 2001 +From: Vadim Kochan +Date: Mon, 31 Dec 2018 11:00:46 +0200 +Subject: [PATCH] Fix compilation issue due to missing sys/sysmacros.h include + +glibc 2.28+ no longer include from , so + must now be explicitly included to use the major, +minor and makedev macros. + +Signed-off-by: Vadim Kochan +--- + src/daemon.c | 1 + + src/device.c | 1 + + src/mount-monitor.c | 1 + + tools/udisks.c | 1 + + tools/umount-udisks.c | 1 + + 5 files changed, 5 insertions(+) + +diff --git a/src/daemon.c b/src/daemon.c +index fafcf9a..4303a6d 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -45,6 +45,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/device.c b/src/device.c +index 2ae7f38..20920df 100644 +--- a/src/device.c ++++ b/src/device.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/mount-monitor.c b/src/mount-monitor.c +index 573a69c..0cfa167 100644 +--- a/src/mount-monitor.c ++++ b/src/mount-monitor.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + + #include +diff --git a/tools/udisks.c b/tools/udisks.c +index 97e80d7..22a7d87 100644 +--- a/tools/udisks.c ++++ b/tools/udisks.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/tools/umount-udisks.c b/tools/umount-udisks.c +index 2813fe0..d915660 100644 +--- a/tools/umount-udisks.c ++++ b/tools/umount-udisks.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.14.1 + diff --git a/package/udisks/Config.in b/package/udisks/Config.in new file mode 100644 index 00000000..efd3b619 --- /dev/null +++ b/package/udisks/Config.in @@ -0,0 +1,62 @@ +config BR2_PACKAGE_UDISKS + bool "udisks" + depends on BR2_ENABLE_LOCALE # parted + depends on BR2_HOST_GCC_AT_LEAST_4_9 # spidermonkey + depends on BR2_INSTALL_LIBSTDCPP # spidermonkey + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS # spidermonkey + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # spidermonkey + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # polkit + depends on BR2_USE_MMU # lvm2 + depends on BR2_USE_WCHAR # dbus-glib -> glib2 + depends on !BR2_TOOLCHAIN_USES_UCLIBC # polkit, lvm2 + depends on !BR2_STATIC_LIBS # lvm2, spidermonkey + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_GLIB + select BR2_PACKAGE_LIBATASMART + select BR2_PACKAGE_LIBGUDEV + select BR2_PACKAGE_LVM2 + select BR2_PACKAGE_PARTED + select BR2_PACKAGE_POLKIT + select BR2_PACKAGE_SG3_UTILS + help + The udisks project provides + + o A storage daemon that implements well-defined D-Bus + interfaces that can be used to query and manipulate + storage devices. + + o a command-line tool, udisks(1), that can be used to query + and use the daemon + + http://www.freedesktop.org/wiki/Software/udisks + +if BR2_PACKAGE_UDISKS + +config BR2_PACKAGE_UDISKS_LVM2 + bool "lvm2 support" + # The lvm app library can't compile against musl + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LVM2_APP_LIBRARY + help + Enable LVM2 support + +comment "lvm2 support needs a glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC + +endif + +comment "udisks needs udev /dev management" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_HAS_UDEV + +comment "udisks needs a glibc or musl toolchain with locale, C++, wchar, dynamic library, NPTL, gcc >= 4.9" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS + depends on !BR2_ENABLE_LOCALE || BR2_TOOLCHAIN_USES_UCLIBC || \ + !BR2_INSTALL_LIBSTDCPP || \ + BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + !BR2_HOST_GCC_AT_LEAST_4_9 || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ + !BR2_USE_WCHAR diff --git a/package/udisks/udisks.hash b/package/udisks/udisks.hash new file mode 100644 index 00000000..b40161e3 --- /dev/null +++ b/package/udisks/udisks.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 f2ec82eb0ea7e01dc299b5b29b3c18cdf861236ec43dcff66b3552b4b31c6f71 udisks-1.0.5.tar.gz +sha256 7d30f41a79a9b453b4972a6d7e3425ff104b39232891bde8ba659f1adb21f771 COPYING diff --git a/package/udisks/udisks.mk b/package/udisks/udisks.mk new file mode 100644 index 00000000..af25c2b8 --- /dev/null +++ b/package/udisks/udisks.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# udisks +# +################################################################################ + +UDISKS_VERSION = 1.0.5 +UDISKS_SITE = http://hal.freedesktop.org/releases +UDISKS_LICENSE = GPL-2.0+ +UDISKS_LICENSE_FILES = COPYING +UDISKS_CPE_ID_VENDOR = freedesktop +# For 0002-Fix-systemd-service-file.patch +UDISKS_AUTORECONF = YES + +UDISKS_DEPENDENCIES = \ + host-pkgconf \ + dbus \ + dbus-glib \ + libatasmart \ + libgudev \ + lvm2 \ + parted \ + polkit \ + sg3_utils \ + udev + +UDISKS_CONF_OPTS = --disable-remote-access --disable-man-pages + +ifeq ($(BR2_PACKAGE_UDISKS_LVM2),y) +UDISKS_CONF_OPTS += --enable-lvm2 +endif + +$(eval $(autotools-package)) diff --git a/package/udpcast/Config.in b/package/udpcast/Config.in new file mode 100644 index 00000000..ef94b30a --- /dev/null +++ b/package/udpcast/Config.in @@ -0,0 +1,27 @@ +comment "udpcast needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_UDPCAST + bool "udpcast" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + A multicast protocol implementation which happens to + be very handy for imaging drives over the network. + + http://www.udpcast.linux.lu/ + +if BR2_PACKAGE_UDPCAST + +config BR2_PACKAGE_UDPCAST_SENDER + bool "sender" + help + The udpcast transmitter. + +config BR2_PACKAGE_UDPCAST_RECEIVER + bool "receiver" + help + The udpcast receiver. + +endif diff --git a/package/udpcast/udpcast.hash b/package/udpcast/udpcast.hash new file mode 100644 index 00000000..9cdce0a2 --- /dev/null +++ b/package/udpcast/udpcast.hash @@ -0,0 +1,3 @@ +# locally computed hash +sha256 9c19eebaa6e2f78127f0d59e95d0ce003b687d61e283b5963a1da6b8ac41f21a udpcast-20200328.tar.gz +sha256 422befd3503b1f39a6027017f639874c1f274e37ec60ba3174894646b584ccbc COPYING diff --git a/package/udpcast/udpcast.mk b/package/udpcast/udpcast.mk new file mode 100644 index 00000000..34ebddd2 --- /dev/null +++ b/package/udpcast/udpcast.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# udpcast +# +################################################################################ + +UDPCAST_VERSION = 20200328 +UDPCAST_SITE = http://www.udpcast.linux.lu/download +UDPCAST_DEPENDENCIES = host-m4 +UDPCAST_LICENSE = BSD-2-Clause, GPL-2.0+ +UDPCAST_LICENSE_FILES = COPYING + +define UDPCAST_REMOVE_UDP_SENDER + rm -f $(TARGET_DIR)/usr/sbin/udp-sender + rm -f $(TARGET_DIR)/usr/sbin/udp-sender.1 +endef + +ifneq ($(BR2_PACKAGE_UDPCAST_SENDER),y) +UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_SENDER +endif + +define UDPCAST_REMOVE_UDP_RECEIVER + rm -f $(TARGET_DIR)/usr/sbin/udp-receiver + rm -f $(TARGET_DIR)/usr/sbin/udp-receiver.1 +endef + +ifneq ($(BR2_PACKAGE_UDPCAST_RECEIVER),y) +UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_RECEIVER +endif + +$(eval $(autotools-package)) diff --git a/package/udpxy/Config.in b/package/udpxy/Config.in new file mode 100644 index 00000000..f442a2f2 --- /dev/null +++ b/package/udpxy/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_UDPXY + bool "udpxy" + depends on BR2_USE_MMU + help + udpxy is a UDP-to-HTTP multicast traffic relay daemon: it + forwards UDP traffic from a given multicast subscription to + the requesting HTTP client. + + http://www.udpxy.com/ diff --git a/package/udpxy/udpxy.hash b/package/udpxy/udpxy.hash new file mode 100644 index 00000000..8455fcdb --- /dev/null +++ b/package/udpxy/udpxy.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 6ce33b1d14a1aeab4bd2566aca112e41943df4d002a7678d9a715108e6b714bd udpxy.1.0.23-9-prod.tar.gz +sha256 60ead3913246c7cd930fe653c0053aba1af2cd9f82b266befdbbd6e0b8ecb750 README diff --git a/package/udpxy/udpxy.mk b/package/udpxy/udpxy.mk new file mode 100644 index 00000000..22467948 --- /dev/null +++ b/package/udpxy/udpxy.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# udpxy +# +################################################################################ + +UDPXY_VERSION = 1.0.23-9-prod +UDPXY_SOURCE = udpxy.$(UDPXY_VERSION).tar.gz +UDPXY_SITE = http://www.udpxy.com/download/1_23 +UDPXY_LICENSE = GPL-3.0+ +UDPXY_LICENSE_FILES = README + +define UDPXY_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define UDPXY_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr \ + -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/uemacs/01-clear-ixon-termios-flag.patch b/package/uemacs/01-clear-ixon-termios-flag.patch new file mode 100644 index 00000000..dde76420 --- /dev/null +++ b/package/uemacs/01-clear-ixon-termios-flag.patch @@ -0,0 +1,29 @@ +[PATCH] clear ixon termios flag on initialization + +Otherwise ctrl-S/Q gets intercepted by the tty layer instead of +handled by uemacs. + +Signed-off-by: Peter Korsgaard +diff --git a/posix.c b/posix.c +index 97edd9f052b1..352c4712b689 100644 +--- a/posix.c ++++ b/posix.c +@@ -53,17 +53,17 @@ void ttopen(void) + /* + * base new settings on old ones - don't change things + * we don't know about + */ + ntermios = otermios; + + /* raw CR/NL etc input handling, but keep ISTRIP if we're on a 7-bit line */ + ntermios.c_iflag &= ~(IGNBRK | BRKINT | IGNPAR | PARMRK +- | INPCK | INLCR | IGNCR | ICRNL); ++ | INPCK | INLCR | IGNCR | ICRNL | IXON); + + /* raw CR/NR etc output handling */ + ntermios.c_oflag &= + ~(OPOST | ONLCR | OLCUC | OCRNL | ONOCR | ONLRET); + + /* No signal handling, no echo etc */ + ntermios.c_lflag &= ~(ISIG | ICANON | XCASE | ECHO | ECHOE | ECHOK + | ECHONL | NOFLSH | TOSTOP | ECHOCTL | diff --git a/package/uemacs/Config.in b/package/uemacs/Config.in new file mode 100644 index 00000000..cfe98059 --- /dev/null +++ b/package/uemacs/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_UEMACS + bool "uemacs" + select BR2_PACKAGE_NCURSES + help + A small emacs. + + https://git.kernel.org/cgit/editors/uemacs/uemacs.git/ diff --git a/package/uemacs/uemacs.hash b/package/uemacs/uemacs.hash new file mode 100644 index 00000000..c8dd620b --- /dev/null +++ b/package/uemacs/uemacs.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 96e30247365bb27bd74c550b637f5b2ffd2978379872a32a840f6667cec5fa2a uemacs-1cdcf9df88144049750116e36fe20c8c39fa2517-br1.tar.gz +sha256 6e2a4cf41ec8d4379c154923349733bc0d3935c6fa72c4337cf1bc137b98b90a README diff --git a/package/uemacs/uemacs.mk b/package/uemacs/uemacs.mk new file mode 100644 index 00000000..96868832 --- /dev/null +++ b/package/uemacs/uemacs.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# uemacs +# +################################################################################ + +UEMACS_VERSION = 1cdcf9df88144049750116e36fe20c8c39fa2517 +UEMACS_SITE = https://git.kernel.org/pub/scm/editors/uemacs/uemacs.git +UEMACS_SITE_METHOD = git +UEMACS_DEPENDENCIES = ncurses +UEMACS_LICENSE = MicroEMACS copyright notice +UEMACS_LICENSE_FILES = README + +define UEMACS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + CC="$(TARGET_CC)" DEFINES="-DAUTOCONF -DPOSIX -DUSG" \ + CFLAGS+="$(TARGET_CFLAGS) " LIBS="$(TARGET_CFLAGS) -lncurses" +endef + +define UEMACS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/em $(TARGET_DIR)/usr/bin/em +endef + +$(eval $(generic-package)) diff --git a/package/uftp/Config.in b/package/uftp/Config.in new file mode 100644 index 00000000..b88fb03a --- /dev/null +++ b/package/uftp/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_UFTP + bool "uftp" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + help + Encrypted UDP based FTP with multicast. + + http://uftp-multicast.sourceforge.net/ + +comment "uftp needs a toolchain w/ threads, wchar" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/uftp/uftp.hash b/package/uftp/uftp.hash new file mode 100644 index 00000000..aaebcad0 --- /dev/null +++ b/package/uftp/uftp.hash @@ -0,0 +1,3 @@ +# Locally computed sha256 +sha256 562f71ea5a24b615eb491f5744bad01e9c2e58244c1d6252d5ae98d320d308e0 uftp-5.0.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSE.txt diff --git a/package/uftp/uftp.mk b/package/uftp/uftp.mk new file mode 100644 index 00000000..1c36cb0c --- /dev/null +++ b/package/uftp/uftp.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# uftp +# +################################################################################ + +UFTP_VERSION = 5.0 +UFTP_SITE = http://sourceforge.net/projects/uftp-multicast/files/source-tar +UFTP_LICENSE = GPL-3.0+ +UFTP_LICENSE_FILES = LICENSE.txt + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +UFTP_DEPENDENCIES += host-pkgconf openssl +UFTP_MAKE_OPTS += CRYPT_LIB="`$(PKG_CONFIG_HOST_BINARY) --libs libcrypto`" +else +UFTP_MAKE_OPTS += NO_ENCRYPTION=1 +endif + +define UFTP_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(UFTP_MAKE_OPTS) +endef + +define UFTP_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(UFTP_MAKE_OPTS) \ + DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/uhd/0001-host-CMakeLists-add-boost-unit_test_framework-requir.patch b/package/uhd/0001-host-CMakeLists-add-boost-unit_test_framework-requir.patch new file mode 100644 index 00000000..a79b650b --- /dev/null +++ b/package/uhd/0001-host-CMakeLists-add-boost-unit_test_framework-requir.patch @@ -0,0 +1,40 @@ +From 881705ec581ab7cd61c8e4fe134db8854a83ec4e Mon Sep 17 00:00:00 2001 +From: Gwenhael Goavec-Merou +Date: Tue, 28 Apr 2020 16:56:29 +0200 +Subject: [PATCH] host: CMakeLists: add boost unit_test_framework required only + when ENABLE_TESTS=ON + +By default, boost unit_test_framework is always required, but only use +when ENABLE_TESTS=ON. +This PR suppress unit_test_framework to the default list and append +UHD_BOOST_REQUIRED_COMPONENTS when this library is needed + +[backported from https://github.com/EttusResearch/uhd/pull/341] +Signed-off-by: Gwenhael Goavec-Merou +--- + host/CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt +index 8f72ece76..a7731ffbd 100644 +--- a/host/CMakeLists.txt ++++ b/host/CMakeLists.txt +@@ -291,10 +291,14 @@ set(UHD_BOOST_REQUIRED_COMPONENTS + filesystem + program_options + system +- unit_test_framework + serialization + thread + ) ++ ++if(ENABLE_TESTS) ++ list(APPEND UHD_BOOST_REQUIRED_COMPONENTS unit_test_framework) ++endif(ENABLE_TESTS) ++ + include(UHDBoost) + + include_directories(${Boost_INCLUDE_DIRS}) +-- +2.26.2 + diff --git a/package/uhd/0002-host-fix-build-boost-173.patch b/package/uhd/0002-host-fix-build-boost-173.patch new file mode 100644 index 00000000..b685b5f8 --- /dev/null +++ b/package/uhd/0002-host-fix-build-boost-173.patch @@ -0,0 +1,577 @@ +From 13caaf001061db3c01082c4574a5e326c4969ab6 Mon Sep 17 00:00:00 2001 +From: Martin Braun +Date: Thu, 16 Jul 2020 13:07:34 +0200 +Subject: [PATCH] boost: Include bind.hpp where used, add + BOOST_BIND_GLOBAL_PLACEHOLDERS + +Consists of two changes: +- Grepped for files that use boost::bind, but don't include + boost/bind.hpp. Changed all of those to include bind.hpp +- Add BOOST_BIND_GLOBAL_PLACEHOLDERS so that Boost doesn't complain + about using bind placeholders in the global namespace. + +Background: boost/bind.hpp is a convenience header that pulls the Boost +bind placeholders into the global namespace, but that's deprecated +behaviour. For UHD 3.15, we'll keep the deprecated behaviour (modern UHD +no longer uses Boost.Bind), so this fixes build failures with modern +Boost, and related warnings. + +Patch retrieved from +https://github.com/EttusResearch/uhd/commit/13caaf001061db3c01082c4574a5e326c4969ab6 + +Signed-off-by: Martin Braun +Signed-off-by: Gwenhael Goavec-Merou +--- + host/cmake/Modules/UHDBoost.cmake | 3 +++ + host/examples/network_relay.cpp | 1 + + host/examples/rfnoc_rx_to_file.cpp | 1 + + host/examples/test_clock_synch.cpp | 1 + + host/examples/txrx_loopback_to_file.cpp | 1 + + host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp | 1 + + host/lib/rfnoc/legacy_compat.cpp | 1 + + host/lib/transport/xport_benchmarker.cpp | 1 + + host/lib/usrp/b100/b100_impl.cpp | 1 + + host/lib/usrp/b200/b200_iface.cpp | 1 + + host/lib/usrp/b200/b200_impl.cpp | 1 + + host/lib/usrp/cores/rx_dsp_core_3000.cpp | 1 + + host/lib/usrp/cores/tx_dsp_core_3000.cpp | 1 + + host/lib/usrp/dboard/db_cbx.cpp | 1 + + host/lib/usrp/dboard/db_dbsrx.cpp | 1 + + host/lib/usrp/dboard/db_dbsrx2.cpp | 1 + + host/lib/usrp/dboard/db_sbx_common.cpp | 1 + + host/lib/usrp/dboard/db_sbx_version3.cpp | 1 + + host/lib/usrp/dboard/db_sbx_version4.cpp | 1 + + host/lib/usrp/dboard/db_tvrx.cpp | 1 + + host/lib/usrp/dboard/db_tvrx2.cpp | 1 + + host/lib/usrp/dboard/db_twinrx.cpp | 1 + + host/lib/usrp/dboard/db_ubx.cpp | 1 + + host/lib/usrp/dboard/db_wbx_common.cpp | 1 + + host/lib/usrp/dboard/db_wbx_simple.cpp | 1 + + host/lib/usrp/dboard/db_wbx_version2.cpp | 1 + + host/lib/usrp/dboard/db_wbx_version3.cpp | 1 + + host/lib/usrp/dboard/db_wbx_version4.cpp | 1 + + host/lib/usrp/dboard/db_xcvr2450.cpp | 1 + + host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp | 1 + + host/lib/usrp/multi_usrp.cpp | 1 + + host/lib/usrp/n230/n230_resource_manager.cpp | 1 + + host/lib/usrp/n230/n230_uart.cpp | 1 + + host/lib/usrp/usrp1/soft_time_ctrl.cpp | 1 + + host/lib/usrp/usrp1/usrp1_impl.cpp | 1 + + host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 1 + + host/lib/usrp_clock/octoclock/octoclock_impl.cpp | 1 + + host/lib/utils/ihex.cpp | 1 + + host/lib/utils/tasks.cpp | 1 + + host/utils/uhd_cal_rx_iq_balance.cpp | 1 + + host/utils/uhd_cal_tx_dc_offset.cpp | 1 + + host/utils/uhd_cal_tx_iq_balance.cpp | 1 + + 42 files changed, 44 insertions(+) + +diff --git a/host/cmake/Modules/UHDBoost.cmake b/host/cmake/Modules/UHDBoost.cmake +index 5ebb4acef..e3ee42b50 100644 +--- a/host/cmake/Modules/UHDBoost.cmake ++++ b/host/cmake/Modules/UHDBoost.cmake +@@ -259,6 +259,9 @@ else() + # disable Boost's use of std::experimental::string_view + # works for Boost 1.67.0 and newer & doesn't hurt older + add_definitions(-DBOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) ++ # UHD 3.15 still uses global placeholders (_1, _2, ...) from Boost which ++ # need to be enabled explicitly for some Boost versions ++ add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS) + + # Boost 1.70.0's find cmake scripts don't always set the expected + # return variables. Replicate the commit that fixes that issue here: +diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp +index bf2ac9255..9a9f56eb5 100644 +--- a/host/examples/network_relay.cpp ++++ b/host/examples/network_relay.cpp +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/examples/rfnoc_rx_to_file.cpp b/host/examples/rfnoc_rx_to_file.cpp +index 5bb9985ae..cbd35cbe8 100644 +--- a/host/examples/rfnoc_rx_to_file.cpp ++++ b/host/examples/rfnoc_rx_to_file.cpp +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/examples/test_clock_synch.cpp b/host/examples/test_clock_synch.cpp +index 8556063d7..ec071f7c7 100644 +--- a/host/examples/test_clock_synch.cpp ++++ b/host/examples/test_clock_synch.cpp +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp +index 271d249f6..a2f0427c9 100644 +--- a/host/examples/txrx_loopback_to_file.cpp ++++ b/host/examples/txrx_loopback_to_file.cpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp b/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp +index a80e2ef53..b78635002 100644 +--- a/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp ++++ b/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp +index 91de361df..f93fe871a 100644 +--- a/host/lib/rfnoc/legacy_compat.cpp ++++ b/host/lib/rfnoc/legacy_compat.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/host/lib/transport/xport_benchmarker.cpp b/host/lib/transport/xport_benchmarker.cpp +index 67582ff2c..7abd4c5fd 100644 +--- a/host/lib/transport/xport_benchmarker.cpp ++++ b/host/lib/transport/xport_benchmarker.cpp +@@ -6,6 +6,7 @@ + // + + #include "xport_benchmarker.hpp" ++#include + #include + #include + +diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp +index cd4319803..08006ae32 100644 +--- a/host/lib/usrp/b100/b100_impl.cpp ++++ b/host/lib/usrp/b100/b100_impl.cpp +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp +index 082be071c..cdf88f69b 100644 +--- a/host/lib/usrp/b200/b200_iface.cpp ++++ b/host/lib/usrp/b200/b200_iface.cpp +@@ -12,6 +12,7 @@ + #include + #include + ++#include + #include + #include + #include +diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp +index 1be8c263b..c0f8ee1ac 100644 +--- a/host/lib/usrp/b200/b200_impl.cpp ++++ b/host/lib/usrp/b200/b200_impl.cpp +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp +index 46fce3f69..ff7caf105 100644 +--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp ++++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include + #include //thread sleep + #include +diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.cpp b/host/lib/usrp/cores/tx_dsp_core_3000.cpp +index be7593841..b76a74b1c 100644 +--- a/host/lib/usrp/cores/tx_dsp_core_3000.cpp ++++ b/host/lib/usrp/cores/tx_dsp_core_3000.cpp +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include //sleep + #include +diff --git a/host/lib/usrp/dboard/db_cbx.cpp b/host/lib/usrp/dboard/db_cbx.cpp +index dd0640d00..f5c7f2399 100644 +--- a/host/lib/usrp/dboard/db_cbx.cpp ++++ b/host/lib/usrp/dboard/db_cbx.cpp +@@ -7,6 +7,7 @@ + + #include "db_sbx_common.hpp" + #include ++#include + #include + + using namespace uhd; +diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp +index 587158470..dc82b60f9 100644 +--- a/host/lib/usrp/dboard/db_dbsrx.cpp ++++ b/host/lib/usrp/dboard/db_dbsrx.cpp +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp +index e2505dfd7..da4da4148 100644 +--- a/host/lib/usrp/dboard/db_dbsrx2.cpp ++++ b/host/lib/usrp/dboard/db_dbsrx2.cpp +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/db_sbx_common.cpp b/host/lib/usrp/dboard/db_sbx_common.cpp +index b6eaedc3d..95aff96b4 100644 +--- a/host/lib/usrp/dboard/db_sbx_common.cpp ++++ b/host/lib/usrp/dboard/db_sbx_common.cpp +@@ -6,6 +6,7 @@ + // + + #include "db_sbx_common.hpp" ++#include + + using namespace uhd; + using namespace uhd::usrp; +diff --git a/host/lib/usrp/dboard/db_sbx_version3.cpp b/host/lib/usrp/dboard/db_sbx_version3.cpp +index 369315b2e..fb829cf34 100644 +--- a/host/lib/usrp/dboard/db_sbx_version3.cpp ++++ b/host/lib/usrp/dboard/db_sbx_version3.cpp +@@ -9,6 +9,7 @@ + #include "db_sbx_common.hpp" + #include + #include ++#include + + using namespace uhd; + using namespace uhd::usrp; +diff --git a/host/lib/usrp/dboard/db_sbx_version4.cpp b/host/lib/usrp/dboard/db_sbx_version4.cpp +index d1c76287b..e1adebf99 100644 +--- a/host/lib/usrp/dboard/db_sbx_version4.cpp ++++ b/host/lib/usrp/dboard/db_sbx_version4.cpp +@@ -9,6 +9,7 @@ + #include "db_sbx_common.hpp" + #include + #include ++#include + + using namespace uhd; + using namespace uhd::usrp; +diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp +index 8bf377c4d..5fbbf5bee 100644 +--- a/host/lib/usrp/dboard/db_tvrx.cpp ++++ b/host/lib/usrp/dboard/db_tvrx.cpp +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/db_tvrx2.cpp b/host/lib/usrp/dboard/db_tvrx2.cpp +index 5dba83551..e1623487d 100644 +--- a/host/lib/usrp/dboard/db_tvrx2.cpp ++++ b/host/lib/usrp/dboard/db_tvrx2.cpp +@@ -55,6 +55,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/db_twinrx.cpp b/host/lib/usrp/dboard/db_twinrx.cpp +index de1cd3f33..aa9da8adf 100644 +--- a/host/lib/usrp/dboard/db_twinrx.cpp ++++ b/host/lib/usrp/dboard/db_twinrx.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include "dboard_ctor_args.hpp" ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp +index 305a69c52..e78f9db75 100644 +--- a/host/lib/usrp/dboard/db_ubx.cpp ++++ b/host/lib/usrp/dboard/db_ubx.cpp +@@ -20,6 +20,7 @@ + #include + #include + ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/db_wbx_common.cpp b/host/lib/usrp/dboard/db_wbx_common.cpp +index 41f323d19..fd7b2481a 100644 +--- a/host/lib/usrp/dboard/db_wbx_common.cpp ++++ b/host/lib/usrp/dboard/db_wbx_common.cpp +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + using namespace uhd; + using namespace uhd::usrp; +diff --git a/host/lib/usrp/dboard/db_wbx_simple.cpp b/host/lib/usrp/dboard/db_wbx_simple.cpp +index 390c5c47a..e3a5667c7 100644 +--- a/host/lib/usrp/dboard/db_wbx_simple.cpp ++++ b/host/lib/usrp/dboard/db_wbx_simple.cpp +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + using namespace uhd; + using namespace uhd::usrp; +diff --git a/host/lib/usrp/dboard/db_wbx_version2.cpp b/host/lib/usrp/dboard/db_wbx_version2.cpp +index 775ee4467..f1bf7dacc 100644 +--- a/host/lib/usrp/dboard/db_wbx_version2.cpp ++++ b/host/lib/usrp/dboard/db_wbx_version2.cpp +@@ -16,6 +16,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp +index 41979f8ef..b755d09a2 100644 +--- a/host/lib/usrp/dboard/db_wbx_version3.cpp ++++ b/host/lib/usrp/dboard/db_wbx_version3.cpp +@@ -15,6 +15,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/db_wbx_version4.cpp b/host/lib/usrp/dboard/db_wbx_version4.cpp +index 8b3d13b37..f2976d3a7 100644 +--- a/host/lib/usrp/dboard/db_wbx_version4.cpp ++++ b/host/lib/usrp/dboard/db_wbx_version4.cpp +@@ -15,6 +15,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp +index 9e1c9f2b0..8f95dbb1c 100644 +--- a/host/lib/usrp/dboard/db_xcvr2450.cpp ++++ b/host/lib/usrp/dboard/db_xcvr2450.cpp +@@ -49,6 +49,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp +index 73851656b..717fa144f 100644 +--- a/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp ++++ b/host/lib/usrp/dboard/eiscat/eiscat_radio_ctrl_impl.cpp +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp +index 49ffec698..13cb03cf9 100644 +--- a/host/lib/usrp/multi_usrp.cpp ++++ b/host/lib/usrp/multi_usrp.cpp +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/n230/n230_resource_manager.cpp b/host/lib/usrp/n230/n230_resource_manager.cpp +index 22f8ddedb..df3c9fb15 100644 +--- a/host/lib/usrp/n230/n230_resource_manager.cpp ++++ b/host/lib/usrp/n230/n230_resource_manager.cpp +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/n230/n230_uart.cpp b/host/lib/usrp/n230/n230_uart.cpp +index 8689335c8..26fafde94 100644 +--- a/host/lib/usrp/n230/n230_uart.cpp ++++ b/host/lib/usrp/n230/n230_uart.cpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + using namespace uhd; + using namespace uhd::transport; +diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.cpp b/host/lib/usrp/usrp1/soft_time_ctrl.cpp +index 7f39caf8a..9a84ee188 100644 +--- a/host/lib/usrp/usrp1/soft_time_ctrl.cpp ++++ b/host/lib/usrp/usrp1/soft_time_ctrl.cpp +@@ -8,6 +8,7 @@ + #include "soft_time_ctrl.hpp" + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp +index 2134f8182..1e83ce3fc 100644 +--- a/host/lib/usrp/usrp1/usrp1_impl.cpp ++++ b/host/lib/usrp/usrp1/usrp1_impl.cpp +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +index 8d967ae15..de36379ea 100644 +--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp ++++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp +index f3cf3f4ea..4c11788d2 100644 +--- a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp ++++ b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp +@@ -9,6 +9,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/utils/ihex.cpp b/host/lib/utils/ihex.cpp +index 6bb0ba9d4..7fb605627 100644 +--- a/host/lib/utils/ihex.cpp ++++ b/host/lib/utils/ihex.cpp +@@ -7,6 +7,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/utils/tasks.cpp b/host/lib/utils/tasks.cpp +index 888a5a8f1..e5195fcf1 100644 +--- a/host/lib/utils/tasks.cpp ++++ b/host/lib/utils/tasks.cpp +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/utils/uhd_cal_rx_iq_balance.cpp b/host/utils/uhd_cal_rx_iq_balance.cpp +index c68c96173..3f5fa1788 100644 +--- a/host/utils/uhd_cal_rx_iq_balance.cpp ++++ b/host/utils/uhd_cal_rx_iq_balance.cpp +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/utils/uhd_cal_tx_dc_offset.cpp b/host/utils/uhd_cal_tx_dc_offset.cpp +index f47b5e913..2cb65d3f5 100644 +--- a/host/utils/uhd_cal_tx_dc_offset.cpp ++++ b/host/utils/uhd_cal_tx_dc_offset.cpp +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/utils/uhd_cal_tx_iq_balance.cpp b/host/utils/uhd_cal_tx_iq_balance.cpp +index 2e7229fd3..ace93462e 100644 +--- a/host/utils/uhd_cal_tx_iq_balance.cpp ++++ b/host/utils/uhd_cal_tx_iq_balance.cpp +@@ -8,6 +8,7 @@ + #include "usrp_cal_utils.hpp" + #include + #include ++#include + #include + #include + #include +-- +2.26.2 + diff --git a/package/uhd/0003-add-RISC-V-endian-detection.patch b/package/uhd/0003-add-RISC-V-endian-detection.patch new file mode 100644 index 00000000..fb1168ba --- /dev/null +++ b/package/uhd/0003-add-RISC-V-endian-detection.patch @@ -0,0 +1,113 @@ +From d4717a38d2287c2f583fefb2a0ed273337a92bb6 Mon Sep 17 00:00:00 2001 +From: Gwenhael Goavec-Merou +Date: Mon, 11 Jan 2021 18:18:26 +0100 +Subject: [PATCH] msgpack/predef: add riscV support + +When the target CPU is riscV, msgpack is unable to detect endianness with a list of errors like: + +uhd/host/lib/deps/rpclib/include/rpc/msgpack/pack.hpp:190:2: error: #error msgpack-c supports only big endian and little endian + 190 | #error msgpack-c supports only big endian and little endian + | ^~~~~ + +and with subsequent errors: + +uhd0/host/lib/deps/rpclib/include/rpc/msgpack/pack.hpp:236:46: error: there are no arguments to 'take8_8' that depend on a template parameter, so a declaration of 'take8_8' must be available [-fpermissive] + 236 | char buf[2] = {static_cast(0xccu), take8_8(d)}; + | + +This is due to a missing support for this architecture in msgpack. +This patch adapt commit from https://github.com/boostorg/predef + +[backported from https://github.com/EttusResearch/uhd/pull/400] + +Signed-off-by: Gwenhael Goavec-Merou +--- + .../include/rpc/msgpack/predef/architecture.h | 1 + + .../rpc/msgpack/predef/architecture/riscv.h | 48 +++++++++++++++++++ + .../include/rpc/msgpack/predef/other/endian.h | 3 +- + 3 files changed, 51 insertions(+), 1 deletion(-) + create mode 100644 host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture/riscv.h + +diff --git a/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture.h b/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture.h +index 4a0ce2749..1bd998c59 100644 +--- a/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture.h ++++ b/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture.h +@@ -18,6 +18,7 @@ http://www.boost.org/LICENSE_1_0.txt) + #include + #include + #include ++#include + #include + #include + #include +diff --git a/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture/riscv.h b/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture/riscv.h +new file mode 100644 +index 000000000..8b819d77e +--- /dev/null ++++ b/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture/riscv.h +@@ -0,0 +1,48 @@ ++/* ++Copyright Andreas Schwab 2019 ++Distributed under the Boost Software License, Version 1.0. ++(See accompanying file LICENSE_1_0.txt or copy at ++http://www.boost.org/LICENSE_1_0.txt) ++*/ ++ ++#ifndef BOOST_PREDEF_ARCHITECTURE_RISCV_H ++#define BOOST_PREDEF_ARCHITECTURE_RISCV_H ++ ++#include ++#include ++ ++/* tag::reference[] ++= `BOOST_ARCH_RISCV` ++ ++http://en.wikipedia.org/wiki/RISC-V[RISC-V] architecture. ++ ++[options="header"] ++|=== ++| {predef_symbol} | {predef_version} ++ ++| `+__riscv+` | {predef_detection} ++|=== ++*/ // end::reference[] ++ ++#define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_NOT_AVAILABLE ++ ++#if defined(__riscv) ++# undef BOOST_ARCH_RISCV ++# define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_AVAILABLE ++#endif ++ ++#if BOOST_ARCH_RISCV ++# define BOOST_ARCH_RISCV_AVAILABLE ++#endif ++ ++#if BOOST_ARCH_RISCV ++# undef BOOST_ARCH_WORD_BITS_32 ++# define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_AVAILABLE ++#endif ++ ++#define BOOST_ARCH_RISCV_NAME "RISC-V" ++ ++#endif ++ ++#include ++BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_RISCV,BOOST_ARCH_RISCV_NAME) +diff --git a/host/lib/deps/rpclib/include/rpc/msgpack/predef/other/endian.h b/host/lib/deps/rpclib/include/rpc/msgpack/predef/other/endian.h +index 3f367b3d4..a7c1fb4dc 100644 +--- a/host/lib/deps/rpclib/include/rpc/msgpack/predef/other/endian.h ++++ b/host/lib/deps/rpclib/include/rpc/msgpack/predef/other/endian.h +@@ -127,7 +127,8 @@ information and acquired knowledge: + defined(__AARCH64EL__) || \ + defined(_MIPSEL) || \ + defined(__MIPSEL) || \ +- defined(__MIPSEL__) ++ defined(__MIPSEL__) || \ ++ defined(__riscv) + # undef MSGPACK_ENDIAN_LITTLE_BYTE + # define MSGPACK_ENDIAN_LITTLE_BYTE MSGPACK_VERSION_NUMBER_AVAILABLE + # endif +-- +2.26.2 + diff --git a/package/uhd/Config.in b/package/uhd/Config.in new file mode 100644 index 00000000..f61bbf0e --- /dev/null +++ b/package/uhd/Config.in @@ -0,0 +1,160 @@ +comment "uhd needs a toolchain w/ C++, NPTL, wchar, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS + +comment "uhd needs a toolchain not affected by GCC bug 64735" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 + +config BR2_PACKAGE_UHD + bool "uhd" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_USE_MMU # use fork() + depends on BR2_USE_WCHAR # boost + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_ATOMIC + select BR2_PACKAGE_BOOST_CHRONO + select BR2_PACKAGE_BOOST_DATE_TIME + select BR2_PACKAGE_BOOST_FILESYSTEM + select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + select BR2_PACKAGE_BOOST_REGEX + select BR2_PACKAGE_BOOST_SERIALIZATION + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_BOOST_THREAD + help + Universal Software Radio Peripheral (USRP) Hardware Driver + + https://kb.etthus.com + +if BR2_PACKAGE_UHD + +config BR2_PACKAGE_UHD_B100 + bool "b100 support" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + select BR2_PACKAGE_UHD_USB + help + enable B100 support + +comment "B100 support needs a toolchain w/ gcc >= 4.9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_PACKAGE_UHD_B200 + bool "b200 support" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + select BR2_PACKAGE_UHD_USB + help + enable B200 support + +comment "B200 support needs a toolchain w/ gcc >= 4.9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_PACKAGE_UHD_E300 + bool "E300 support" + select BR2_PACKAGE_UHD_MPMD + help + enable E300 support + +config BR2_PACKAGE_UHD_E320 + bool "E320 support" + select BR2_PACKAGE_UHD_MPMD + help + enable E320 support + +config BR2_PACKAGE_UHD_EXAMPLES + bool "uhd-examples" + help + Examples + +config BR2_PACKAGE_UHD_MPMD + bool "MPMD support" + help + enable MPMD support + +config BR2_PACKAGE_UHD_N230 + bool "N230 support" + help + enable N230 support + +config BR2_PACKAGE_UHD_N300 + bool "N300 support" + select BR2_PACKAGE_UHD_MPMD + help + enable N300 support + +config BR2_PACKAGE_UHD_N320 + bool "N320 support" + select BR2_PACKAGE_UHD_MPMD + help + enable N320 support + +config BR2_PACKAGE_UHD_OCTOCLOCK + bool "OctoClock support" + help + enable OctoClock support + +comment "uhd python API needs python3 and a toolchain w/ glibc or musl" + depends on !BR2_PACKAGE_PYTHON3 + depends on !BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS + depends on !(BR2_TOOLCHAIN_USES_GLIBC && BR2_TOOLCHAIN_USES_MUSL) # python-numpy + +config BR2_PACKAGE_UHD_PYTHON + bool "python API support" + depends on BR2_PACKAGE_PYTHON3 + depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy + select BR2_PACKAGE_PYTHON_NUMPY + select BR2_PACKAGE_PYTHON_REQUESTS + help + enable python API support + +config BR2_PACKAGE_UHD_RFNOC + bool "RFNoC support" + help + enable RFNoC support + +config BR2_PACKAGE_UHD_USB + bool "USB support" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + select BR2_PACKAGE_LIBUSB + help + enable UHD USB support + +comment "USB support needs a toolchain w/ gcc >= 4.9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_PACKAGE_UHD_USRP1 + bool "USRP1 support" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + select BR2_PACKAGE_UHD_USB + help + enable USRP1 support + +comment "USRP1 support needs a toolchain w/ gcc >= 4.9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_PACKAGE_UHD_USRP2 + bool "USRP2 support" + help + enable USRP2 support + +comment "uhd utils depends on python API support" + depends on !BR2_PACKAGE_UHD_PYTHON + +config BR2_PACKAGE_UHD_UTILS + bool "uhd-utils" + depends on BR2_PACKAGE_UHD_PYTHON + select BR2_PACKAGE_PYTHON_SIX + help + uhd-utils + +config BR2_PACKAGE_UHD_X300 + bool "X300 support" + help + enable X300 support + +endif diff --git a/package/uhd/uhd.hash b/package/uhd/uhd.hash new file mode 100644 index 00000000..cfd1f3f6 --- /dev/null +++ b/package/uhd/uhd.hash @@ -0,0 +1,4 @@ +# Locally calculated: +sha256 eed4a77d75faafff56be78985950039f8d9d1eb9fcbd58b8862e481dd49825cd uhd-3.15.0.0.tar.gz +sha256 8fc99820c2419d0de6bbbd319ff935d54960b37b716d0b4bb1c75de493f3e1fd LICENSE.md +sha256 70bf7e79c8cd73a81f97ce81745ea0719a617eebe299a61868165daeae71fff2 host/LICENSE diff --git a/package/uhd/uhd.mk b/package/uhd/uhd.mk new file mode 100644 index 00000000..a8001dfd --- /dev/null +++ b/package/uhd/uhd.mk @@ -0,0 +1,153 @@ +################################################################################ +# +# uhd +# +################################################################################ + +UHD_VERSION = 3.15.0.0 +UHD_SITE = $(call github,EttusResearch,uhd,v$(UHD_VERSION)) +UHD_LICENSE = GPL-3.0+ +UHD_LICENSE_FILES = LICENSE.md host/LICENSE + +UHD_SUPPORTS_IN_SOURCE_BUILD = NO +UHD_SUBDIR = host +UHD_INSTALL_STAGING = YES + +UHD_DEPENDENCIES = \ + boost \ + $(if $(BR2_PACKAGE_PYTHON),host-python,host-python3) \ + host-python-mako + +UHD_CONF_OPTS = \ + -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python \ + -DRUNTIME_PYTHON_EXECUTABLE=/usr/bin/python \ + -DENABLE_C_API=ON \ + -DENABLE_DOXYGEN=OFF \ + -DENABLE_DPDK=OFF \ + -DENABLE_LIBUHD=ON \ + -DENABLE_MANUAL=OFF \ + -DENABLE_MAN_PAGES=OFF \ + -DENABLE_TESTS=OFF + +# As soon as architecture is ARM, uhd will try to use NEON. +# But not all ARM cores have NEON support. +# When CPU support NEON -mfpu=neon must be added to CXX_FLAGS +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +UHD_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -mfpu=neon" +UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=ON +else +UHD_CONF_OPTS += -Dhave_mfpu_neon=0 +UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=OFF +endif + +ifeq ($(BR2_PACKAGE_ORC),y) +UHD_DEPENDENCIES += orc +endif + +ifeq ($(BR2_PACKAGE_UHD_B100),y) +UHD_CONF_OPTS += -DENABLE_B100=ON +else +UHD_CONF_OPTS += -DENABLE_B100=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_B200),y) +UHD_CONF_OPTS += -DENABLE_B200=ON +else +UHD_CONF_OPTS += -DENABLE_B200=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_E300),y) +UHD_CONF_OPTS += -DENABLE_E300=ON +else +UHD_CONF_OPTS += -DENABLE_E300=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_E320),y) +UHD_CONF_OPTS += -DENABLE_E320=ON +else +UHD_CONF_OPTS += -DENABLE_E320=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_EXAMPLES),y) +UHD_CONF_OPTS += -DENABLE_EXAMPLES=ON +else +UHD_CONF_OPTS += -DENABLE_EXAMPLES=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_MPMD),y) +UHD_CONF_OPTS += -DENABLE_MPMD=ON +else +UHD_CONF_OPTS += -DENABLE_MPMD=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_N230),y) +UHD_CONF_OPTS += -DENABLE_N230=ON +else +UHD_CONF_OPTS += -DENABLE_N230=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_N300),y) +UHD_CONF_OPTS += -DENABLE_N300=ON +else +UHD_CONF_OPTS += -DENABLE_N300=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_N320),y) +UHD_CONF_OPTS += -DENABLE_N320=ON +else +UHD_CONF_OPTS += -DENABLE_N320=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_OCTOCLOCK),y) +UHD_CONF_OPTS += -DENABLE_OCTOCLOCK=ON +else +UHD_CONF_OPTS += -DENABLE_OCTOCLOCK=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_RFNOC),y) +UHD_CONF_OPTS += -DENABLE_RFNOC=ON +else +UHD_CONF_OPTS += -DENABLE_RFNOC=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_PYTHON),y) +UHD_DEPENDENCIES += host-python-numpy host-python3-requests \ + python-numpy python-requests +UHD_CONF_OPTS += -DENABLE_PYTHON_API=ON +else +UHD_CONF_OPTS += -DENABLE_PYTHON_API=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_USB),y) +UHD_DEPENDENCIES += libusb +UHD_CONF_OPTS += -DENABLE_USB=ON +else +UHD_CONF_OPTS += -DENABLE_USB=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_USRP1),y) +UHD_CONF_OPTS += -DENABLE_USRP1=ON +else +UHD_CONF_OPTS += -DENABLE_USRP1=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_USRP2),y) +UHD_CONF_OPTS += -DENABLE_USRP2=ON +else +UHD_CONF_OPTS += -DENABLE_USRP2=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_UTILS),y) +UHD_DEPENDENCIES += python-six +UHD_CONF_OPTS += -DENABLE_UTILS=ON +else +UHD_CONF_OPTS += -DENABLE_UTILS=OFF +endif + +ifeq ($(BR2_PACKAGE_UHD_X300),y) +UHD_CONF_OPTS += -DENABLE_X300=ON +else +UHD_CONF_OPTS += -DENABLE_X300=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/uhttpd/0001-Remove-Werror.patch b/package/uhttpd/0001-Remove-Werror.patch new file mode 100644 index 00000000..67028cfa --- /dev/null +++ b/package/uhttpd/0001-Remove-Werror.patch @@ -0,0 +1,33 @@ +From ac52380eeca27e1e2e7eb5fb9d39059dbe58b919 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 7 Dec 2016 22:48:27 +0100 +Subject: [PATCH] Remove -Werror + +-Werror might cause build failures with newer versions of gcc or C + libraries, not tested by upstream, for example: + + # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + ^ +cc1: all warnings being treated as errors + +Signed-off-by: Thomas Petazzoni +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7ae8ba4..825342f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,7 +5,7 @@ PROJECT(uhttpd C) + INCLUDE (CheckFunctionExists) + + SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") +-ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -Os -Wall -Werror -Wmissing-declarations --std=gnu99 -g3) ++ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -Os -Wall -Wmissing-declarations --std=gnu99 -g3) + + OPTION(TLS_SUPPORT "TLS support" ON) + OPTION(LUA_SUPPORT "Lua support" ON) +-- +2.7.4 + diff --git a/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch b/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch new file mode 100644 index 00000000..fb3ff54a --- /dev/null +++ b/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch @@ -0,0 +1,30 @@ +From adbab70d3602d77736781be344cfdc5508cb0600 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Mon, 3 Apr 2017 19:22:30 +0200 +Subject: [PATCH] Fix TCP_FASTOPEN related compile error. + +Signed-off-by: Peter Seiderer +--- + listen.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/listen.c b/listen.c +index 2a54888..4dabe34 100644 +--- a/listen.c ++++ b/listen.c +@@ -96,6 +96,12 @@ static void listener_cb(struct uloop_fd *fd, unsigned int events) + uh_block_listener(l); + } + ++#ifdef linux ++#ifndef TCP_FASTOPEN ++#define TCP_FASTOPEN 23 ++#endif ++#endif ++ + void uh_setup_listeners(void) + { + struct listener *l; +-- +2.11.0 + diff --git a/package/uhttpd/Config.in b/package/uhttpd/Config.in new file mode 100644 index 00000000..8d5d8bee --- /dev/null +++ b/package/uhttpd/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_UHTTPD + bool "uhttpd" + depends on !BR2_STATIC_LIBS # dlopen() + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBUBOX + select BR2_PACKAGE_JSON_C + help + uHTTPd is a tiny single threaded HTTP server with TLS, CGI + and Lua support. It is intended as a drop-in replacement for + the Busybox HTTP daemon. + + https://wiki.openwrt.org/doc/howto/http.uhttpd + +comment "uhttpd needs a toolchain w/ dynamic library" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/uhttpd/uhttpd.hash b/package/uhttpd/uhttpd.hash new file mode 100644 index 00000000..389a0ef6 --- /dev/null +++ b/package/uhttpd/uhttpd.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 5b81ebf9e419c668de4181cce7b9f5fa358cabb2a4a0d1f1a3a24190eeb21f25 uhttpd-a8bf9c00842224edb394e79909053f7628ee6a82-br1.tar.gz +sha256 2a61a8a690e7646a4bfe4261bf77c49f47588db5fc234b3cc66809dcc0cb3985 uhttpd.h diff --git a/package/uhttpd/uhttpd.mk b/package/uhttpd/uhttpd.mk new file mode 100644 index 00000000..cc7649d0 --- /dev/null +++ b/package/uhttpd/uhttpd.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# uhttpd +# +################################################################################ + +UHTTPD_VERSION = a8bf9c00842224edb394e79909053f7628ee6a82 +UHTTPD_SITE = http://git.openwrt.org/project/uhttpd.git +UHTTPD_SITE_METHOD = git +UHTTPD_LICENSE = ISC +UHTTPD_LICENSE_FILES = uhttpd.h +UHTTPD_DEPENDENCIES = libubox json-c + +ifeq ($(BR2_PACKAGE_LUA_5_1),y) +UHTTPD_DEPENDENCIES += lua +UHTTPD_CONF_OPTS += -DLUA_SUPPORT=ON +else +UHTTPD_CONF_OPTS += -DLUA_SUPPORT=OFF +endif + +ifeq ($(BR2_PACKAGE_USTREAM_SSL),y) +UHTTPD_DEPENDENCIES += ustream-ssl +UHTTPD_CONF_OPTS += -DTLS_SUPPORT=ON +else +UHTTPD_CONF_OPTS += -DTLS_SUPPORT=OFF +endif + +ifeq ($(BR2_PACKAGE_UBUS),y) +UHTTPD_DEPENDENCIES += ubus +UHTTPD_CONF_OPTS += -DUBUS_SUPPORT=ON +else +UHTTPD_CONF_OPTS += -DUBUS_SUPPORT=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/uhubctl/Config.in b/package/uhubctl/Config.in new file mode 100644 index 00000000..52b0268a --- /dev/null +++ b/package/uhubctl/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_UHUBCTL + bool "uhubctl" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + select BR2_PACKAGE_LIBUSB + help + Control USB power per-port on smart USB hubs. + + https://github.com/mvp/uhubctl + +comment "uhubctl needs a toolchain w/ threads, gcc >= 4.9" + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 diff --git a/package/uhubctl/uhubctl.hash b/package/uhubctl/uhubctl.hash new file mode 100644 index 00000000..c1370887 --- /dev/null +++ b/package/uhubctl/uhubctl.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 714f733592d3cb6ba8efc84fbc03b1beed2323918ff33aef01cdb956755be7b7 uhubctl-2.3.0.tar.gz +sha256 2d3aa0737e8db9dfd710f9a282b446cb7b15b2b3eecac383f0c45c64d736eea0 LICENSE diff --git a/package/uhubctl/uhubctl.mk b/package/uhubctl/uhubctl.mk new file mode 100644 index 00000000..08efca09 --- /dev/null +++ b/package/uhubctl/uhubctl.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# uhubctl +# +################################################################################ + +UHUBCTL_VERSION = 2.3.0 +UHUBCTL_SITE = $(call github,mvp,uhubctl,v$(UHUBCTL_VERSION)) +UHUBCTL_LICENSE = GPL-2.0 +UHUBCTL_LICENSE_FILES = LICENSE +UHUBCTL_DEPENDENCIES = libusb + +define UHUBCTL_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) GIT_VERSION=v$(UHUBCTL_VERSION) -C $(@D) +endef + +define UHUBCTL_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) \ + $(MAKE) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/ulogd/0001-ulogd-fix-build-with-musl-libc.patch b/package/ulogd/0001-ulogd-fix-build-with-musl-libc.patch new file mode 100644 index 00000000..af6e1364 --- /dev/null +++ b/package/ulogd/0001-ulogd-fix-build-with-musl-libc.patch @@ -0,0 +1,32 @@ +From 675e762091380590f78ff07a94a25caa459b786b Mon Sep 17 00:00:00 2001 +From: Cameron Norman +Date: Sat, 27 Oct 2018 13:05:45 -0700 +Subject: ulogd: fix build with musl libc + +The attached patch fixes building ulogd2 with musl libc. It is being +used on Void Linux right now. + +Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1278 +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Fabrice Fontaine +[Retrrieved from: +https://git.netfilter.org/ulogd2/commit/?id=675e762091380590f78ff07a94a25caa459b786b] +--- + src/ulogd.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/ulogd.c b/src/ulogd.c +index b8bc57c..9cd64e8 100644 +--- a/src/ulogd.c ++++ b/src/ulogd.c +@@ -65,6 +65,7 @@ + #include + #include + #include ++#include + #include + #include + #ifdef DEBUG +-- +cgit v1.2.1 + diff --git a/package/ulogd/Config.in b/package/ulogd/Config.in new file mode 100644 index 00000000..e0e19996 --- /dev/null +++ b/package/ulogd/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_ULOGD + bool "ulogd" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU + select BR2_PACKAGE_LIBMNL + select BR2_PACKAGE_LIBNETFILTER_ACCT + select BR2_PACKAGE_LIBNETFILTER_CONNTRACK + select BR2_PACKAGE_LIBNETFILTER_LOG + select BR2_PACKAGE_LIBNFNETLINK + help + ulogd is a userspace logging daemon for netfilter/iptables + related logging. + + http://www.netfilter.org/projects/ulogd/ + +comment "ulogd needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/ulogd/ulogd.hash b/package/ulogd/ulogd.hash new file mode 100644 index 00000000..aef69262 --- /dev/null +++ b/package/ulogd/ulogd.hash @@ -0,0 +1,7 @@ +# From ftp://ftp.netfilter.org/pub/ulogd/ulogd-2.0.7.tar.bz2.{md5sum,sha1sum} +md5 2bb2868cf51acbb90c35763c9f995f31 ulogd-2.0.7.tar.bz2 +sha1 f2d90469e2842e2bfbe19c55cf6d56ac107aa4b9 ulogd-2.0.7.tar.bz2 + +# Locally calculated +sha256 990a05494d9c16029ba0a83f3b7294fc05c756546b8d60d1c1572dc25249a92b ulogd-2.0.7.tar.bz2 +sha256 b8a2f73f743dc1a51aff23f1aacbca4b868564db52496fa3c0caba755bfd1eaf COPYING diff --git a/package/ulogd/ulogd.mk b/package/ulogd/ulogd.mk new file mode 100644 index 00000000..1b86c127 --- /dev/null +++ b/package/ulogd/ulogd.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# ulogd +# +################################################################################ + +ULOGD_VERSION = 2.0.7 +ULOGD_SOURCE = ulogd-$(ULOGD_VERSION).tar.bz2 +ULOGD_SITE = http://www.netfilter.org/projects/ulogd/files +ULOGD_CONF_OPTS = --without-dbi +ULOGD_DEPENDENCIES = host-pkgconf \ + libmnl libnetfilter_acct libnetfilter_conntrack libnetfilter_log \ + libnfnetlink +ULOGD_LICENSE = GPL-2.0 +ULOGD_LICENSE_FILES = COPYING + +# DB backends need threads +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +ifeq ($(BR2_PACKAGE_MYSQL),y) +ULOGD_CONF_OPTS += --with-mysql=$(STAGING_DIR)/usr +ULOGD_DEPENDENCIES += mysql +else +ULOGD_CONF_OPTS += --without-mysql +endif +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +ULOGD_CONF_OPTS += --with-pgsql +ULOGD_DEPENDENCIES += postgresql +else +ULOGD_CONF_OPTS += --without-pgsql +endif +ifeq ($(BR2_PACKAGE_SQLITE),y) +ULOGD_CONF_OPTS += --with-sqlite +ULOGD_DEPENDENCIES += sqlite +else +ULOGD_CONF_OPTS += --without-sqlite +endif +else +ULOGD_CONF_OPTS += --without-mysql --without-pgsql --without-sqlite +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +ULOGD_CONF_OPTS += --with-pcap +ULOGD_DEPENDENCIES += libpcap +else +ULOGD_CONF_OPTS += --without-pcap +endif + +ifeq ($(BR2_PACKAGE_JANSSON),y) +ULOGD_CONF_OPTS += --with-jansson +ULOGD_DEPENDENCIES += jansson +else +ULOGD_CONF_OPTS += --without-jansson +endif + +$(eval $(autotools-package)) diff --git a/package/umtprd/Config.in b/package/umtprd/Config.in new file mode 100644 index 00000000..24bf1195 --- /dev/null +++ b/package/umtprd/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_UMTPRD + bool "umtprd" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + help + Lightweight USB MTP responder daemon for GNU/Linux + + https://github.com/viveris/uMTP-Responder + +comment "umtprd needs a toolchain w/ threads, headers >= 3.15" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 diff --git a/package/umtprd/umtprd.hash b/package/umtprd/umtprd.hash new file mode 100644 index 00000000..170837d8 --- /dev/null +++ b/package/umtprd/umtprd.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 cce45c7d3df0022fc013c79de21b1f11b1027d090aeb628669f08b0c20d2afdd umtprd-1.3.10.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSE diff --git a/package/umtprd/umtprd.mk b/package/umtprd/umtprd.mk new file mode 100644 index 00000000..f1a4e66c --- /dev/null +++ b/package/umtprd/umtprd.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# umtprd +# +################################################################################ + +UMTPRD_VERSION = 1.3.10 +UMTPRD_SITE = https://github.com/viveris/uMTP-Responder/archive +UMTPRD_LICENSE = GPL-3.0+ +UMTPRD_LICENSE_FILES = LICENSE + +define UMTPRD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define UMTPRD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/umtprd $(TARGET_DIR)/usr/sbin/umtprd +endef + +$(eval $(generic-package)) diff --git a/package/unbound/Config.in b/package/unbound/Config.in new file mode 100644 index 00000000..ae2ebfd9 --- /dev/null +++ b/package/unbound/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_UNBOUND + bool "unbound" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_OPENSSL + help + Unbound is a validating, recursive, and caching DNS resolver. + It supports DNSSEC, QNAME minimisation, DNS-over-TLS and + DNSCrypt. + + https://www.unbound.net + +if BR2_PACKAGE_UNBOUND +config BR2_PACKAGE_UNBOUND_DNSCRYPT + bool "enable DNSCrypt" + select BR2_PACKAGE_LIBSODIUM + help + DNSCrypt wraps unmodified DNS queries between a client and + a DNS resolver. Default port used is 443 and like with + normal unencrypted DNS, it uses UDP first and falling back + to TCP if response too large. + + There is also DNS-over-TLS, a TCP only version + of proposed standard for DNS encryption (RFC 7858). + Default port for DNS-over-TLS is 853 and Unbound has + built-in support for it. + + https://tools.ietf.org/html/rfc7858 + + Note: Neither DNSCrypt or DNS-over-TLS encrypt the SNI. + Here is some suggestions how to handle SNI encryption: + + https://tools.ietf.org/html/draft-ietf-tls-sni-encryption-00 +endif + +comment "unbound needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/unbound/S70unbound b/package/unbound/S70unbound new file mode 100644 index 00000000..cb722ce2 --- /dev/null +++ b/package/unbound/S70unbound @@ -0,0 +1,52 @@ +#!/bin/sh + +DAEMON="unbound" +PIDFILE="/var/run/$DAEMON.pid" + +UNBOUND_ARGS="" + +# shellcheck source=/dev/null +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + +start() { + printf 'Starting %s: ' "$DAEMON" + start-stop-daemon -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \ + -- $UNBOUND_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -q -p "$PIDFILE" + status=$? + if [ "$status" -eq 0 ]; then + rm -f "$PIDFILE" + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start|stop|restart) + "$1";; + reload) + # Restart, since there is no true "reload" feature. + restart;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/unbound/unbound.hash b/package/unbound/unbound.hash new file mode 100644 index 00000000..ec7e9407 --- /dev/null +++ b/package/unbound/unbound.hash @@ -0,0 +1,5 @@ +# From https://nlnetlabs.nl/downloads/unbound/unbound-1.13.1.tar.gz.sha256 +sha256 8504d97b8fc5bd897345c95d116e0ee0ddf8c8ff99590ab2b4bd13278c9f50b8 unbound-1.13.1.tar.gz + +# Locally calculated +sha256 8eb9a16cbfb8703090bbfa3a2028fd46bb351509a2f90dc1001e51fbe6fd45db LICENSE diff --git a/package/unbound/unbound.mk b/package/unbound/unbound.mk new file mode 100644 index 00000000..140b7d27 --- /dev/null +++ b/package/unbound/unbound.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# unbound +# +################################################################################ + +UNBOUND_VERSION = 1.13.1 +UNBOUND_SITE = https://www.unbound.net/downloads +UNBOUND_DEPENDENCIES = host-pkgconf expat libevent openssl +UNBOUND_LICENSE = BSD-3-Clause +UNBOUND_LICENSE_FILES = LICENSE +UNBOUND_CPE_ID_VENDOR = nlnetlabs +UNBOUND_CONF_OPTS = \ + --disable-rpath \ + --disable-debug \ + --with-conf-file=/etc/unbound/unbound.conf \ + --with-pidfile=/var/run/unbound.pid \ + --with-rootkey-file=/etc/unbound/root.key \ + --enable-tfo-server \ + --with-libexpat=$(STAGING_DIR)/usr \ + --with-ssl=$(STAGING_DIR)/usr + +# uClibc-ng does not have MSG_FASTOPEN +# so TCP Fast Open client mode disabled for it +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +UNBOUND_CONF_OPTS += --disable-tfo-client +else +UNBOUND_CONF_OPTS += --enable-tfo-client +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y) +UNBOUND_CONF_OPTS += --with-pthreads +else +UNBOUND_CONF_OPTS += --without-pthreads +endif + +ifeq ($(BR2_GCC_ENABLE_LTO),y) +UNBOUND_CONF_OPTS += --enable-flto +else +UNBOUND_CONF_OPTS += --disable-flto +endif + +ifeq ($(BR2_PACKAGE_UNBOUND_DNSCRYPT),y) +UNBOUND_CONF_OPTS += --enable-dnscrypt +UNBOUND_DEPENDENCIES += libsodium +else +UNBOUND_CONF_OPTS += --disable-dnscrypt +endif + +define UNBOUND_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/unbound/S70unbound \ + $(TARGET_DIR)/etc/init.d/S70unbound +endef + +$(eval $(autotools-package)) diff --git a/package/unclutter-xfixes/Config.in b/package/unclutter-xfixes/Config.in new file mode 100644 index 00000000..852a8cfd --- /dev/null +++ b/package/unclutter-xfixes/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_UNCLUTTER_XFIXES + bool "unclutter-xfixes" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBEV + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXI + help + Remove idle cursor image from screen. + + A rewrite of unclutter using the x11-xfixes extension. + + https://github.com/Airblader/unclutter-xfixes diff --git a/package/unclutter-xfixes/unclutter-xfixes.hash b/package/unclutter-xfixes/unclutter-xfixes.hash new file mode 100644 index 00000000..785825da --- /dev/null +++ b/package/unclutter-xfixes/unclutter-xfixes.hash @@ -0,0 +1,3 @@ +# locally calculated +sha256 35c75ad24be989dd6708db1d9ce9b2a2f814b80638c0633cdb075c6df090ed11 unclutter-xfixes-1.5.tar.gz +sha256 33e94693849b57fdb34987c95fd0076b4aa4b70fcd9a3152313d00b86a3f7bf7 LICENSE diff --git a/package/unclutter-xfixes/unclutter-xfixes.mk b/package/unclutter-xfixes/unclutter-xfixes.mk new file mode 100644 index 00000000..713a84bc --- /dev/null +++ b/package/unclutter-xfixes/unclutter-xfixes.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# unclutter-xfixes +# +################################################################################ + +UNCLUTTER_XFIXES_VERSION = 1.5 +UNCLUTTER_XFIXES_SITE = $(call github,Airblader,unclutter-xfixes,v$(UNCLUTTER_XFIXES_VERSION)) +UNCLUTTER_XFIXES_LICENSE = MIT +UNCLUTTER_XFIXES_LICENSE_FILES = LICENSE +UNCLUTTER_XFIXES_DEPENDENCIES = libev xlib_libX11 xlib_libXfixes xlib_libXi host-pkgconf + +define UNCLUTTER_XFIXES_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) unclutter CC="$(TARGET_CC)" +endef + +define UNCLUTTER_XFIXES_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/unclutter $(TARGET_DIR)/usr/bin/unclutter +endef + +$(eval $(generic-package)) diff --git a/package/unionfs/Config.in b/package/unionfs/Config.in new file mode 100644 index 00000000..fe03b95f --- /dev/null +++ b/package/unionfs/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_UNIONFS + bool "unionfs (FUSE)" + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse + depends on BR2_USE_MMU # libfuse + depends on !BR2_STATIC_LIBS # libfuse + select BR2_PACKAGE_LIBFUSE + help + A userspace unionfs implementation. + + https://github.com/rpodgorny/unionfs-fuse + +comment "unionfs needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/unionfs/unionfs.hash b/package/unionfs/unionfs.hash new file mode 100644 index 00000000..7c4a9f4f --- /dev/null +++ b/package/unionfs/unionfs.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 f56a5579d670e18e0667700bc599acbc0b8217ca1f76b2adb3dad7d2953c4049 LICENSE +sha256 c705072a33a18cbc73ffe799331d43410b6deef5d6f2042038f8fd3ab17b6e2e unionfs-2.1.tar.gz diff --git a/package/unionfs/unionfs.mk b/package/unionfs/unionfs.mk new file mode 100644 index 00000000..12cd368f --- /dev/null +++ b/package/unionfs/unionfs.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# unionfs +# +################################################################################ + +UNIONFS_VERSION = 2.1 +UNIONFS_SITE = $(call github,rpodgorny,unionfs-fuse,v$(UNIONFS_VERSION)) +UNIONFS_DEPENDENCIES = libfuse host-pkgconf +UNIONFS_LICENSE = BSD-3-Clause +UNIONFS_LICENSE_FILES = LICENSE + +$(eval $(cmake-package)) diff --git a/package/unixodbc/Config.in b/package/unixodbc/Config.in new file mode 100644 index 00000000..eb0ad9c5 --- /dev/null +++ b/package/unixodbc/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_UNIXODBC + bool "unixodbc" + depends on !BR2_STATIC_LIBS # dlopen() + help + The unixODBC Project goals are to develop and promote + unixODBC to be the definitive standard for ODBC on non MS + Windows platforms. + + http://www.unixodbc.org + +comment "unixodbc needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/unixodbc/unixodbc.hash b/package/unixodbc/unixodbc.hash new file mode 100644 index 00000000..ba094f76 --- /dev/null +++ b/package/unixodbc/unixodbc.hash @@ -0,0 +1,6 @@ +# From ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.9.tar.gz.md5 +md5 06f76e034bb41df5233554abe961a16f unixODBC-2.3.9.tar.gz +# Locally computed +sha256 52833eac3d681c8b0c9a5a65f2ebd745b3a964f208fc748f977e44015a31b207 unixODBC-2.3.9.tar.gz +sha256 a6b9aa1e9bfade121164c06fd975e9b913a8e38bf33d25ff967dfa3ed07d12f8 COPYING +sha256 1e594f4c7fd6d099eca4bd1340b39d871ce0298331d8ebd4b68935548ee45cf4 exe/COPYING diff --git a/package/unixodbc/unixodbc.mk b/package/unixodbc/unixodbc.mk new file mode 100644 index 00000000..cdc4e69a --- /dev/null +++ b/package/unixodbc/unixodbc.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# unixodbc +# +################################################################################ + +UNIXODBC_VERSION = 2.3.9 +UNIXODBC_SOURCE = unixODBC-$(UNIXODBC_VERSION).tar.gz +UNIXODBC_SITE = ftp://ftp.unixodbc.org/pub/unixODBC +UNIXODBC_INSTALL_STAGING = YES +UNIXODBC_LICENSE = LGPL-2.1+ (library), GPL-2.0+ (programs) +UNIXODBC_LICENSE_FILES = COPYING exe/COPYING + +UNIXODBC_CONF_OPTS = --enable-drivers --enable-driver-conf + +ifeq ($(BR2_PACKAGE_LIBEDIT),y) +UNIXODBC_CONF_OPTS += --enable-editline +UNIXODBC_DEPENDENCIES += libedit +else +UNIXODBC_CONF_OPTS += --disable-editline +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +UNIXODBC_CONF_OPTS += --enable-iconv +UNIXODBC_DEPENDENCIES += libiconv +else +UNIXODBC_CONF_OPTS += --disable-iconv +endif + +ifeq ($(BR2_PACKAGE_LIBTOOL),y) +UNIXODBC_CONF_OPTS += --without-included-ltdl +UNIXODBC_DEPENDENCIES += libtool +else +UNIXODBC_CONF_OPTS += --with-included-ltdl +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +UNIXODBC_CONF_OPTS += --enable-readline +UNIXODBC_DEPENDENCIES += readline +else +UNIXODBC_CONF_OPTS += --disable-readline +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +UNIXODBC_CONF_OPTS += --enable-threads +else +UNIXODBC_CONF_OPTS += --disable-threads +endif + +$(eval $(autotools-package)) diff --git a/package/unrar/Config.in b/package/unrar/Config.in new file mode 100644 index 00000000..29696c35 --- /dev/null +++ b/package/unrar/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_UNRAR + bool "unrar" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + help + RAR file uncompressor. + + http://www.rarlab.com/rar_add.htm + +comment "unrar needs a toolchain w/ C++, wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/unrar/unrar.hash b/package/unrar/unrar.hash new file mode 100644 index 00000000..7900c44d --- /dev/null +++ b/package/unrar/unrar.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 3d010d14223e0c7a385ed740e8f046edcbe885e5c22c5ad5733d009596865300 unrarsrc-5.9.4.tar.gz +sha256 6ecc1687808b7d66b24f874755abfed7464d9751ed0001cd4e8e5d9bf397ff8a license.txt diff --git a/package/unrar/unrar.mk b/package/unrar/unrar.mk new file mode 100644 index 00000000..ab8d9228 --- /dev/null +++ b/package/unrar/unrar.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# unrar +# +################################################################################ + +UNRAR_VERSION = 5.9.4 +UNRAR_SOURCE = unrarsrc-$(UNRAR_VERSION).tar.gz +UNRAR_SITE = https://www.rarlab.com/rar +UNRAR_LICENSE = unrar +UNRAR_LICENSE_FILES = license.txt + +define UNRAR_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CXX="$(TARGET_CXX)" STRIP="/bin/true" \ + CXXFLAGS="$(TARGET_CXXFLAGS) -pthread" \ + LDFLAGS="$(TARGET_LDFLAGS) -pthread" -C $(@D) +endef + +define UNRAR_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/unscd/Config.in b/package/unscd/Config.in new file mode 100644 index 00000000..88f10621 --- /dev/null +++ b/package/unscd/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_UNSCD + bool "unscd" + depends on !BR2_RISCV_32 + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Micro Name Service Caching Daemon + + A daemon which handles passwd, group and host lookups for + running programs and caches the results for the next query. + You only need this package if you are using slow Name Services + like LDAP, NIS or NIS+. + + This particular NSCD is a complete rewrite of the GNU glibc + nscd which is a single threaded server process which offloads + all NSS lookups to worker children; cache hits are handled by + the parent, and only cache misses start worker children, + making the parent immune to resource leaks, hangs, and crashes + in NSS libraries. + + It should mostly be a drop-in replacement for existing + installs using nscd. + + http://busybox.net/~vda/unscd + +comment "unscd needs a glibc toolchain" + depends on !BR2_RISCV_32 + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/unscd/S46unscd b/package/unscd/S46unscd new file mode 100644 index 00000000..6a51eec1 --- /dev/null +++ b/package/unscd/S46unscd @@ -0,0 +1,25 @@ +#!/bin/sh + +NAME="nscd" +DAEMON="/usr/sbin/${NAME}" +PID_F="/var/run/nscd/${NAME}.pid" + +case "$1" in +start) + printf "Starting ${NAME}: " + start-stop-daemon -S -p ${PID_F} -x ${DAEMON} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +stop) + printf "Stopping ${NAME}: " + start-stop-daemon -K -p ${PID_F} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +restart|reload) + $0 stop + $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/unscd/nscd.conf b/package/unscd/nscd.conf new file mode 100644 index 00000000..3eb08ab6 --- /dev/null +++ b/package/unscd/nscd.conf @@ -0,0 +1,33 @@ +# /etc/nscd.conf +# +# An example Name Service Cache config file. This file is needed by nscd. +# +server-user unscd +debug-level 0 + +enable-cache passwd yes +positive-time-to-live passwd 600 +negative-time-to-live passwd 20 +suggested-size passwd 1001 +check-files passwd yes + +enable-cache group yes +positive-time-to-live group 3600 +negative-time-to-live group 60 +suggested-size group 1001 +check-files group yes + +# hosts caching is broken with gethostby* calls, hence is now disabled +# by default. Specifically, the caching does not obey DNS TTLs, and +# thus could lead to problems if the positive-time-to-live is +# significantly larger than the actual TTL. +# +# You should really use a caching nameserver instead of nscd for this +# sort of request. However, you can easily re-enable this by default. +enable-cache hosts no +positive-time-to-live hosts 3600 +negative-time-to-live hosts 20 +suggested-size hosts 1001 +check-files hosts yes + +# unscd does not support services caching diff --git a/package/unscd/unscd.hash b/package/unscd/unscd.hash new file mode 100644 index 00000000..9ed698fd --- /dev/null +++ b/package/unscd/unscd.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 90e12c71732474cac4d055bf9d104e599178b4e1ecb6d3b8c556eaa11f8f6447 nscd-0.54.c diff --git a/package/unscd/unscd.mk b/package/unscd/unscd.mk new file mode 100644 index 00000000..94b46460 --- /dev/null +++ b/package/unscd/unscd.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# unscd +# +################################################################################ + +UNSCD_VERSION = 0.54 +UNSCD_SOURCE = nscd-$(UNSCD_VERSION).c +UNSCD_SITE = http://busybox.net/~vda/unscd +UNSCD_LICENSE = GPL-2.0 +UNSCD_LICENSE_FILES = $(UNSCD_SOURCE) + +define UNSCD_EXTRACT_CMDS + cp $(UNSCD_DL_DIR)/$($(PKG)_SOURCE) $(@D)/ +endef + +define UNSCD_BUILD_CMDS + cd $(@D); \ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o nscd $(UNSCD_SOURCE) +endef + +define UNSCD_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/nscd $(TARGET_DIR)/usr/sbin/nscd + $(INSTALL) -m 600 -D package/unscd/nscd.conf $(TARGET_DIR)/etc/nscd.conf +endef + +define UNSCD_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/unscd/S46unscd \ + $(TARGET_DIR)/etc/init.d/S46unscd +endef + +define UNSCD_USERS + unscd -1 unscd -1 * - - - unscd user +endef + +$(eval $(generic-package)) diff --git a/package/unzip/0001-Add-a-CMakeFile.txt-to-ease-cross-compilation.patch b/package/unzip/0001-Add-a-CMakeFile.txt-to-ease-cross-compilation.patch new file mode 100644 index 00000000..cbc58e48 --- /dev/null +++ b/package/unzip/0001-Add-a-CMakeFile.txt-to-ease-cross-compilation.patch @@ -0,0 +1,53 @@ +From 992a497e9c5c421d3931e02a01e9d7c159f27135 Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Thu, 26 Nov 2015 12:49:10 +0100 +Subject: [PATCH] Add a CMakeFile.txt to ease cross-compilation + +Info-ZIP's UnZip 6.0 has a complex, hand-crafted Makefile with a +companion configure script which try to support an extremely wide +range of UNIX-like operating systems. The result is an overly complex +mass of code that does not support cross-compilation in several ways. + +Zip 3.0 has a similar build system, and has as many as 6 patches in +Buildroot to cross-compile [0]. UnZip fails at building even with +these patches adapted and a few more on top of them. + +Instead of tweaking and fixing a huge and complex build system, skip +it entirely and add a pretty simple CMakeLists.txt that cross-compiles +smoothly using CMake. It also preserves all of the Buildroot-provided +build options and flags as the original Makefile does. + +[0] http://git.buildroot.net/buildroot/tree/package/infozip?id=2015.11-rc3 + +Signed-off-by: Luca Ceresoli +--- + CMakeLists.txt | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + create mode 100644 CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..27951b4 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,17 @@ ++cmake_minimum_required(VERSION 2.8) ++INCLUDE(CheckFunctionExists) ++ ++project(unzip C) ++ ++CHECK_FUNCTION_EXISTS(lchmod HAVE_LCHMOD) ++if(NOT HAVE_LCHMOD) ++add_definitions("-DNO_LCHMOD") ++endif() ++ ++set(UNZIP_SOURCES unzip.c crc32.c crypt.c envargs.c explode.c ++ extract.c fileio.c globals.c inflate.c list.c match.c process.c ++ ttyio.c ubz2err.c unreduce.c unshrink.c zipinfo.c unix/unix.c) ++ ++include_directories(.) ++add_executable(unzip ${UNZIP_SOURCES}) ++install(TARGETS unzip DESTINATION bin) +-- +1.9.1 + diff --git a/package/unzip/Config.in b/package/unzip/Config.in new file mode 100644 index 00000000..da6902e4 --- /dev/null +++ b/package/unzip/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_UNZIP + bool "unzip" + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + UnZip is an extraction utility for archives compressed in + .zip format (also called "zipfiles"). Although highly + compatible both with PKWARE's PKZIP and PKUNZIP utilities + for MS-DOS and with Info-ZIP's own Zip program, our primary + objectives have been portability and non-MSDOS + functionality. + + http://www.info-zip.org/UnZip.html diff --git a/package/unzip/unzip.hash b/package/unzip/unzip.hash new file mode 100644 index 00000000..8b3f2755 --- /dev/null +++ b/package/unzip/unzip.hash @@ -0,0 +1,6 @@ +# From https://snapshot.debian.org/archive/debian/20210110T204103Z/pool/main/u/unzip/unzip_6.0-26.dsc +sha256 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37 unzip_6.0.orig.tar.gz +sha256 88cb7c0f1fd13252b662dfd224b64b352f9e75cd86389557fcb23fa6d2638599 unzip_6.0-26.debian.tar.xz + +# Locally computed: +sha256 7469b81d5d29ac4fd670f7c86ba0cb9fa34f137a2d4d5198437d92ddf918984b LICENSE diff --git a/package/unzip/unzip.mk b/package/unzip/unzip.mk new file mode 100644 index 00000000..e8c9366a --- /dev/null +++ b/package/unzip/unzip.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# unzip +# +################################################################################ + +UNZIP_VERSION = 6.0 +UNZIP_SOURCE = unzip_$(UNZIP_VERSION).orig.tar.gz +UNZIP_PATCH = unzip_$(UNZIP_VERSION)-26.debian.tar.xz +UNZIP_SITE = https://snapshot.debian.org/archive/debian/20210110T204103Z/pool/main/u/unzip +UNZIP_LICENSE = Info-ZIP +UNZIP_LICENSE_FILES = LICENSE +UNZIP_CPE_ID_VENDOR = unzip_project + +# unzip_$(UNZIP_VERSION)-26.debian.tar.xz has patches to fix: +UNZIP_IGNORE_CVES = \ + CVE-2014-8139 \ + CVE-2014-8140 \ + CVE-2014-8141 \ + CVE-2014-9636 \ + CVE-2014-9913 \ + CVE-2015-7696 \ + CVE-2015-7697 \ + CVE-2016-9844 \ + CVE-2018-18384 \ + CVE-2018-1000035 \ + CVE-2019-13232 + +$(eval $(cmake-package)) diff --git a/package/upmpdcli/Config.in b/package/upmpdcli/Config.in new file mode 100644 index 00000000..74eb7688 --- /dev/null +++ b/package/upmpdcli/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_UPMPDCLI + bool "upmpdcli" + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11, libupnpp + select BR2_PACKAGE_JSONCPP + select BR2_PACKAGE_LIBMICROHTTPD + select BR2_PACKAGE_LIBMPDCLIENT + select BR2_PACKAGE_LIBUPNPP + help + upmpdcli is a UPnP Media Renderer front-end for MPD, the Music + Player Daemon. It supports UPnP gapless track transitions and + the OpenHome ohMedia services. + + http://www.lesbonscomptes.com/upmpdcli/ + +comment "upmpdcli needs a toolchain w/ C++, NPTL, gcc >= 4.9" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 diff --git a/package/upmpdcli/S99upmpdcli b/package/upmpdcli/S99upmpdcli new file mode 100644 index 00000000..c1586eb0 --- /dev/null +++ b/package/upmpdcli/S99upmpdcli @@ -0,0 +1,36 @@ +#!/bin/sh + +NAME=upmpdcli +CONFFILE=/etc/$NAME.conf +PIDFILE=/var/run/$NAME.pid +DAEMON_ARGS="-D -c $CONFFILE" + +start() { + printf "Starting $NAME: " + start-stop-daemon --start --quiet --background --exec /usr/bin/upmpdcli \ + -- $DAEMON_ARGS \ + && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping $NAME: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + && echo "OK" || echo "FAIL" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + sleep 1 + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/upmpdcli/upmpdcli.hash b/package/upmpdcli/upmpdcli.hash new file mode 100644 index 00000000..fe8999d4 --- /dev/null +++ b/package/upmpdcli/upmpdcli.hash @@ -0,0 +1,5 @@ +# From http://www.lesbonscomptes.com/upmpdcli/downloads/upmpdcli-1.5.8.tar.gz.sha256: +sha256 802a2ab795841fbb9bfff5fd7951881022f5414ed893a1db704801b999e658a8 upmpdcli-1.5.8.tar.gz + +# Hash for license file: +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING diff --git a/package/upmpdcli/upmpdcli.mk b/package/upmpdcli/upmpdcli.mk new file mode 100644 index 00000000..3dc79f8f --- /dev/null +++ b/package/upmpdcli/upmpdcli.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# upmpdcli +# +################################################################################ + +UPMPDCLI_VERSION = 1.5.8 +UPMPDCLI_SITE = http://www.lesbonscomptes.com/upmpdcli/downloads +UPMPDCLI_LICENSE = LGPL-2.1+ +UPMPDCLI_LICENSE_FILES = COPYING +UPMPDCLI_DEPENDENCIES = host-pkgconf libmpdclient libupnpp libmicrohttpd jsoncpp + +# Disable spotify plugin which requires dlfcn.h +ifeq ($(BR2_STATIC_LIBS),y) +UPMPDCLI_CONF_OPTS = --disable-spotify +endif + +# Upmpdcli only runs if user upmpdcli exists +define UPMPDCLI_USERS + upmpdcli -1 upmpdcli -1 * - - audio Upmpdcli MPD UPnP Renderer Front-End +endef + +define UPMPDCLI_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/upmpdcli/S99upmpdcli $(TARGET_DIR)/etc/init.d/S99upmpdcli +endef + +define UPMPDCLI_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 $(@D)/systemd/upmpdcli.service \ + $(TARGET_DIR)/usr/lib/systemd/system/upmpdcli.service +endef + +define UPMPDCLI_INSTALL_CONF_FILE + $(INSTALL) -D -m 0755 $(@D)/src/upmpdcli.conf-dist $(TARGET_DIR)/etc/upmpdcli.conf +endef + +UPMPDCLI_POST_INSTALL_TARGET_HOOKS += UPMPDCLI_INSTALL_CONF_FILE + +$(eval $(autotools-package)) diff --git a/package/upower/Config.in b/package/upower/Config.in new file mode 100644 index 00000000..612a2b74 --- /dev/null +++ b/package/upower/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_UPOWER + bool "upower" + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_TOOLCHAIN_HAS_THREADS # libgudev, libusb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + depends on BR2_USE_MMU # libgudev + depends on BR2_USE_WCHAR # libgudev + select BR2_PACKAGE_LIBGUDEV + select BR2_PACKAGE_LIBUSB + help + UPower is an abstraction for enumerating power devices, + listening to device events and querying history and + statistics. Any application or service on the system can + access the org.freedesktop.UPower service via the system + message bus. + + Note: upowerd require CONFIG_TIMER_STATS enabled in the + Linux kernel. + + https://upower.freedesktop.org/ + +comment "upower needs udev /dev management" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_HAS_UDEV + +comment "upower needs a toolchain w/ threads, wchar, gcc >= 4.9" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 diff --git a/package/upower/upower.hash b/package/upower/upower.hash new file mode 100644 index 00000000..e69ad20c --- /dev/null +++ b/package/upower/upower.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 64b5ffbfccd5bdb15d925777979a4dbee1a957f9eaeb158dc76175267eddbdef upower-0.99.11.tar.xz +sha256 c1753877db41d798d63369a825ad9225bbeb5e10a407be5fcd8de96182f1c50d COPYING diff --git a/package/upower/upower.mk b/package/upower/upower.mk new file mode 100644 index 00000000..8989ca9f --- /dev/null +++ b/package/upower/upower.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# upower +# +################################################################################ + +UPOWER_VERSION = 0.99.11 +UPOWER_SOURCE = upower-$(UPOWER_VERSION).tar.xz +UPOWER_SITE = https://upower.freedesktop.org/releases +UPOWER_LICENSE = GPL-2.0+ +UPOWER_LICENSE_FILES = COPYING + +# libupower-glib.so +UPOWER_INSTALL_STAGING = YES + +UPOWER_DEPENDENCIES = \ + $(TARGET_NLS_DEPENDENCIES) \ + host-pkgconf \ + libgudev \ + libusb \ + udev + +UPOWER_CONF_OPTS = --disable-man-pages --disable-tests + +$(eval $(autotools-package)) diff --git a/package/upx/0001-Check-DT_REL-DT_RELA-DT_RELSZ-DT_RELASZ.patch b/package/upx/0001-Check-DT_REL-DT_RELA-DT_RELSZ-DT_RELASZ.patch new file mode 100644 index 00000000..6fae9cac --- /dev/null +++ b/package/upx/0001-Check-DT_REL-DT_RELA-DT_RELSZ-DT_RELASZ.patch @@ -0,0 +1,80 @@ +From 3781df9da23840e596d5e9e8493f22666802fe6c Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Fri, 11 Dec 2020 13:38:18 -0800 +Subject: [PATCH] Check DT_REL/DT_RELA, DT_RELSZ/DT_RELASZ + +https://github.com/upx/upx/issues/421 + modified: p_lx_elf.cpp + +[Retrieved from: +https://github.com/upx/upx/commit/3781df9da23840e596d5e9e8493f22666802fe6c] +Signed-off-by: Fabrice Fontaine +--- + src/p_lx_elf.cpp | 34 +++++++++++++++++++++++++++++----- + 1 file changed, 29 insertions(+), 5 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index 182db192f..3a4101cf7 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -2222,8 +2222,20 @@ bool PackLinuxElf32::canPack() + int z_rsz = dt_table[Elf32_Dyn::DT_RELSZ]; + if (z_rel && z_rsz) { + unsigned rel_off = get_te32(&dynseg[-1+ z_rel].d_val); ++ if ((unsigned)file_size <= rel_off) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf32_Dynamic[DT_REL] %#x\n", ++ rel_off); ++ throwCantPack(msg); ++ } + Elf32_Rel *rp = (Elf32_Rel *)&file_image[rel_off]; + unsigned relsz = get_te32(&dynseg[-1+ z_rsz].d_val); ++ if ((unsigned)file_size <= relsz) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf32_Dynamic[DT_RELSZ] %#x\n", ++ relsz); ++ throwCantPack(msg); ++ } + Elf32_Rel *last = (Elf32_Rel *)(relsz + (char *)rp); + for (; rp < last; ++rp) { + unsigned r_va = get_te32(&rp->r_offset); +@@ -2562,14 +2574,26 @@ PackLinuxElf64::canPack() + int z_rel = dt_table[Elf64_Dyn::DT_RELA]; + int z_rsz = dt_table[Elf64_Dyn::DT_RELASZ]; + if (z_rel && z_rsz) { +- unsigned rel_off = get_te64(&dynseg[-1+ z_rel].d_val); ++ upx_uint64_t rel_off = get_te64(&dynseg[-1+ z_rel].d_val); ++ if ((u64_t)file_size <= rel_off) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf64_Dynamic[DT_RELA] %#llx\n", ++ rel_off); ++ throwCantPack(msg); ++ } + Elf64_Rela *rp = (Elf64_Rela *)&file_image[rel_off]; +- unsigned relsz = get_te64(&dynseg[-1+ z_rsz].d_val); ++ upx_uint64_t relsz = get_te64(&dynseg[-1+ z_rsz].d_val); ++ if ((u64_t)file_size <= relsz) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf64_Dynamic[DT_RELASZ] %#llx\n", ++ relsz); ++ throwCantPack(msg); ++ } + Elf64_Rela *last = (Elf64_Rela *)(relsz + (char *)rp); + for (; rp < last; ++rp) { +- unsigned r_va = get_te64(&rp->r_offset); ++ upx_uint64_t r_va = get_te64(&rp->r_offset); + if (r_va == user_init_ava) { // found the Elf64_Rela +- unsigned r_info = get_te64(&rp->r_info); ++ upx_uint64_t r_info = get_te64(&rp->r_info); + unsigned r_type = ELF64_R_TYPE(r_info); + if (Elf64_Ehdr::EM_AARCH64 == e_machine + && R_AARCH64_RELATIVE == r_type) { +@@ -2581,7 +2605,7 @@ PackLinuxElf64::canPack() + } + else { + char msg[50]; snprintf(msg, sizeof(msg), +- "bad relocation %#x DT_INIT_ARRAY[0]", ++ "bad relocation %#llx DT_INIT_ARRAY[0]", + r_info); + throwCantPack(msg); + } diff --git a/package/upx/upx.hash b/package/upx/upx.hash new file mode 100644 index 00000000..7f3698ca --- /dev/null +++ b/package/upx/upx.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 47774df5c958f2868ef550fb258b97c73272cb1f44fe776b798e393465993714 upx-3.96-src.tar.xz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/upx/upx.mk b/package/upx/upx.mk new file mode 100644 index 00000000..e693a70d --- /dev/null +++ b/package/upx/upx.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# upx +# +################################################################################ + +UPX_VERSION = 3.96 +UPX_SITE = https://github.com/upx/upx/releases/download/v$(UPX_VERSION) +UPX_SOURCE = upx-$(UPX_VERSION)-src.tar.xz +UPX_LICENSE = GPL-2.0+ +UPX_LICENSE_FILES = COPYING +UPX_CPE_ID_VENDOR = upx_project + +# 0001-Check-DT_REL-DT_RELA-DT_RELSZ-DT_RELASZ.patch +UPX_IGNORE_CVES += CVE-2021-20285 + +HOST_UPX_DEPENDENCIES = host-ucl host-zlib + +# We need to specify all, otherwise the default target only prints a message +# stating to "please choose a target for 'make'"... :-( +define HOST_UPX_BUILD_CMDS + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \ + UPX_UCLDIR=$(HOST_DIR) CXXFLAGS_WERROR= -C $(@D) all +endef + +# UPX has no install procedure, so install it manually. +define HOST_UPX_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/upx.out $(HOST_DIR)/bin/upx +endef + +$(eval $(host-generic-package)) diff --git a/package/urandom-scripts/Config.in b/package/urandom-scripts/Config.in new file mode 100644 index 00000000..987e442e --- /dev/null +++ b/package/urandom-scripts/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_URANDOM_SCRIPTS + bool "urandom-initscripts" + default y if BR2_PACKAGE_INITSCRIPTS + depends on !BR2_PACKAGE_SYSTEMD + help + Initscript to preserve the random seed between reboots. + + WARNING: this is a poor fit to try and get high-quality + entropy at boot. There are better ways, like haveged, or + rng-tools. diff --git a/package/urandom-scripts/S20urandom b/package/urandom-scripts/S20urandom new file mode 100644 index 00000000..e4fd1257 --- /dev/null +++ b/package/urandom-scripts/S20urandom @@ -0,0 +1,74 @@ +#! /bin/sh +# +# Preserve the random seed between reboots. See urandom(4). +# + +# Quietly do nothing if /dev/urandom does not exist +[ -c /dev/urandom ] || exit 0 + +URANDOM_SEED="/var/lib/random-seed" + +# shellcheck source=/dev/null +[ -r "/etc/default/urandom" ] && . "/etc/default/urandom" + +if pool_bits=$(cat /proc/sys/kernel/random/poolsize 2> /dev/null); then + pool_size=$((pool_bits/8)) +else + pool_size=512 +fi + +check_file_size() { + [ -f "$URANDOM_SEED" ] || return 1 + # Try to read two blocks but exactly one will be read if the file has + # the correct size. + size=$(dd if="$URANDOM_SEED" bs="$pool_size" count=2 2> /dev/null | wc -c) + test "$size" -eq "$pool_size" +} + +init_rng() { + if check_file_size; then + printf 'Initializing random number generator: ' + dd if="$URANDOM_SEED" bs="$pool_size" of=/dev/urandom count=1 2> /dev/null + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" + fi +} + +save_random_seed() { + printf 'Saving random seed: ' + if touch "$URANDOM_SEED" 2> /dev/null; then + old_umask=$(umask) + umask 077 + dd if=/dev/urandom of="$URANDOM_SEED" bs="$pool_size" count=1 2> /dev/null + status=$? + umask "$old_umask" + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + else + status=$? + echo "SKIP (read-only file system detected)" + fi + return "$status" +} + +case "$1" in + start|restart|reload) + # Carry a random seed from start-up to start-up + # Load and then save the whole entropy pool + init_rng && save_random_seed;; + stop) + # Carry a random seed from shut-down to start-up + # Save the whole entropy pool + save_random_seed;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/urandom-scripts/urandom-scripts.mk b/package/urandom-scripts/urandom-scripts.mk new file mode 100644 index 00000000..2c09728c --- /dev/null +++ b/package/urandom-scripts/urandom-scripts.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# urandom-scripts +# +################################################################################ + +define URANDOM_SCRIPTS_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 $(URANDOM_SCRIPTS_PKGDIR)/S20urandom \ + $(TARGET_DIR)/etc/init.d/S20urandom +endef + +$(eval $(generic-package)) diff --git a/package/uredir/Config.in b/package/uredir/Config.in new file mode 100644 index 00000000..99206cfe --- /dev/null +++ b/package/uredir/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_UREDIR + bool "uredir" + select BR2_PACKAGE_LIBUEV + help + A small Linux daemon to redirect UDP connections. It can be + used to forward connections on small and embedded systems that + do not have (or want to use) iptables. + + https://github.com/troglobit/uredir diff --git a/package/uredir/uredir.hash b/package/uredir/uredir.hash new file mode 100644 index 00000000..00c816c2 --- /dev/null +++ b/package/uredir/uredir.hash @@ -0,0 +1,4 @@ +# From https://github.com/troglobit/uredir/releases/download/v3.3/uredir-3.3.tar.gz.md5 +md5 a42ee27e84de2e08e35ee733508bb6ea uredir-3.3.tar.gz +# License files +sha256 e4b8fd3375ce44e5e03be199724a8785510ea5fa58ed92a7a34fd0ccbd35db10 LICENSE diff --git a/package/uredir/uredir.mk b/package/uredir/uredir.mk new file mode 100644 index 00000000..22ffaa74 --- /dev/null +++ b/package/uredir/uredir.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# uredir +# +################################################################################ + +UREDIR_VERSION = 3.3 +UREDIR_SITE = https://github.com/troglobit/uredir/releases/download/v$(UREDIR_VERSION) +UREDIR_LICENSE = ISC +UREDIR_LICENSE_FILES = LICENSE +UREDIR_DEPENDENCIES = host-pkgconf libuev + +$(eval $(autotools-package)) diff --git a/package/urg/0001-select-h.patch b/package/urg/0001-select-h.patch new file mode 100644 index 00000000..1d09bb57 --- /dev/null +++ b/package/urg/0001-select-h.patch @@ -0,0 +1,39 @@ +From 08c7ebec7c58fbc9c1cc0542863b34119c75c91f Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Thu, 15 Sep 2016 06:19:57 +0200 +Subject: [PATCH] Serial driver: add missing header to C and C++ serial driver + +Fixes: + http://autobuild.buildroot.net/results/cd7/cd76699188d2ee99b5f2d32b6a797de0d832a192/ + +Signed-off-by: Samuel Martin +--- + src/c/connection/serial_ctrl_lin.c | 1 + + src/cpp/connection/SerialDevice_lin.cpp | 1 + + 2 files changed, 2 insertions(+) + +Index: b/src/c/connection/serial_ctrl_lin.c +=================================================================== +--- a/src/c/connection/serial_ctrl_lin.c ++++ b/src/c/connection/serial_ctrl_lin.c +@@ -18,6 +18,7 @@ + #include + #include + ++#include + //#include + + enum { +Index: b/src/cpp/connection/SerialDevice_lin.cpp +=================================================================== +--- a/src/cpp/connection/SerialDevice_lin.cpp ++++ b/src/cpp/connection/SerialDevice_lin.cpp +@@ -13,7 +13,7 @@ + #include + #include + #include +- ++#include + + class RawSerialDevice + { diff --git a/package/urg/0002-urg-gcc6-fix-narrowing-conversion.patch b/package/urg/0002-urg-gcc6-fix-narrowing-conversion.patch new file mode 100644 index 00000000..e3db8980 --- /dev/null +++ b/package/urg/0002-urg-gcc6-fix-narrowing-conversion.patch @@ -0,0 +1,99 @@ +urg: fix 'narrowing conversion' with gcc6 + +Fixes: + http://autobuild.buildroot.net/results/d0c/d0cd11163753db69a14c02e941dbda40e5f98bba/ + +Signed-off-by: Samuel Martin + +--- a/src/cpp/urg/ScipHandler.cpp 2016-09-11 16:11:16.083995214 +0200 ++++ b/src/cpp/urg/ScipHandler.cpp 2016-09-11 16:11:24.380832543 +0200 +@@ -120,7 +120,7 @@ struct ScipHandler::pImpl + + // QT ‚Ì”­�s + int return_code = -1; +- char qt_expected_response[] = { 0, -1 }; ++ char qt_expected_response[] = { 0, (char)-1 }; + // return_code ‚ðŽg‚¢‚½‚¢‚½‚ß�AsetLaserOutput() ‚ð—p‚¢‚¸‚É QT ‚ð‘—�M‚·‚é + if (response(return_code, "QT\n", qt_expected_response)) { + laser_state_ = LaserOff; +@@ -139,7 +139,7 @@ struct ScipHandler::pImpl + + } else if (return_code == Scip11Response) { + // SCIP1.1 ƒvƒ�ƒgƒRƒ‹‚Ì�ê�‡‚Ì‚Ý�ASCIP2.0 ‚ð‘—�M‚·‚é +- char scip20_expected_response[] = { 0, -1 }; ++ char scip20_expected_response[] = { 0, (char)-1 }; + if (! response(return_code, "SCIP2.0\n", scip20_expected_response)) { + error_message_ = + "SCIP1.1 protocol is not supported. Please update URG firmware, or reconnect after a few seconds because sensor is booting."; +@@ -150,7 +150,7 @@ struct ScipHandler::pImpl + + } else if (return_code == 0xE) { + // TM ƒ‚�[ƒh‚Ƃ݂Ȃµ�ATM2 ‚ð”­�s‚·‚é +- char tm2_expected_response[] = { 0, -1 }; ++ char tm2_expected_response[] = { 0, (char)-1 }; + if (response(return_code, "TM2\n", tm2_expected_response)) { + laser_state_ = LaserOff; + return changeBothBaudrate(baudrate); +@@ -202,7 +202,7 @@ struct ScipHandler::pImpl + snprintf(send_buffer, 10, "SS%06ld\n", baudrate); + int return_code = -1; + // !!! Šù‚É�Ý’è‘Î�ۂ̃{�[ƒŒ�[ƒg�A‚Ì�ê�‡‚Ì–ß‚è’l‚ð ss_expected... ‚ɒljÁ‚·‚é +- char ss_expected_response[] = { 0, 0x3, 0x4, 0xf, -1 }; ++ char ss_expected_response[] = { 0, 0x3, 0x4, 0xf, (char)-1 }; + if (! response(return_code, send_buffer, ss_expected_response)) { + error_message_ = "Baudrate change fail."; + return false; +@@ -216,7 +216,7 @@ struct ScipHandler::pImpl + { + // PP ‚Ì‘—�M‚ƃf�[ƒ^‚ÌŽó�M + int return_code = -1; +- char pp_expected_response[] = { 0, -1 }; ++ char pp_expected_response[] = { 0, (char)-1 }; + vector lines; + if (! response(return_code, "PP\n", pp_expected_response, &lines)) { + error_message_ = "PP fail."; +@@ -356,7 +356,7 @@ struct ScipHandler::pImpl + + if (on) { + int return_code = -1; +- char expected_response[] = { 0, -1 }; ++ char expected_response[] = { 0, (char)-1 }; + if (! response(return_code, "BM\n", expected_response)) { + error_message_ = "BM fail."; + return false; +@@ -369,7 +369,7 @@ struct ScipHandler::pImpl + if (! mx_capturing_) { + // �Á“”‚·‚邽‚ß‚Ì QT ‚Å‚Í�A‰ž“š‚ð‘҂‚ׂ« + int return_code = -1; +- char qt_expected_response[] = { 0, -1 }; ++ char qt_expected_response[] = { 0, (char)-1 }; + if (! response(return_code, "QT\n", qt_expected_response)) { + return false; + } +@@ -777,7 +777,7 @@ bool ScipHandler::loadParameter(RangeSen + bool ScipHandler::versionLines(vector& lines) + { + int return_code = -1; +- char expected_response[] = { 0, -1 }; ++ char expected_response[] = { 0, (char)-1 }; + if (! pimpl->response(return_code, "VV\n", expected_response, &lines)) { + return false; + } +@@ -792,7 +792,7 @@ bool ScipHandler::setRawTimestampMode(bo + + // TM0 or TM2 ‚Ì‘—�M + int return_code = -1; +- char expected_response[] = { 0, -1 }; ++ char expected_response[] = { 0, (char)-1 }; + if (! pimpl->response(return_code, send_command, expected_response)) { + pimpl->error_message_ = (on) ? "TM0 fail." : "TM2 fail."; + return false; +@@ -809,7 +809,7 @@ bool ScipHandler::rawTimestamp(int* time + { + // TM1 ‚Ì’l‚ð•Ô‚· + int return_code = -1; +- char expected_response[] = { 0, -1 }; ++ char expected_response[] = { 0, (char)-1 }; + vector lines; + if (! pimpl->response(return_code, "TM1\n", expected_response, &lines)) { + pimpl->error_message_ = "TM1 fail."; diff --git a/package/urg/Config.in b/package/urg/Config.in new file mode 100644 index 00000000..c6026242 --- /dev/null +++ b/package/urg/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_URG + bool "urg" + depends on BR2_INSTALL_LIBSTDCPP + help + Library to control Hokuyo's URG series sensors. + + https://sourceforge.net/p/urgnetwork/wiki/Home/ + +comment "urg needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/urg/urg.hash b/package/urg/urg.hash new file mode 100644 index 00000000..f2c5f143 --- /dev/null +++ b/package/urg/urg.hash @@ -0,0 +1,6 @@ +# from http://pkgs.fedoraproject.org/repo/pkgs/urg/urg-0.8.18.zip/ +md5 93f90d2ccc36e784407c5282ef6bd2cb urg-0.8.18.zip +# Locally calculated +sha256 b2cab7e539c90c60fc99a2350a42b5d5390ff952b694b196c3cbb54623cfee7f urg-0.8.18.zip +# License files, locally calculated +sha256 9ccf26cfe845e0eb8bb58053e47366e7ab6b697ae010f7650978d4b71b7d1fc1 COPYING diff --git a/package/urg/urg.mk b/package/urg/urg.mk new file mode 100644 index 00000000..86b7ec2c --- /dev/null +++ b/package/urg/urg.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# urg +# +################################################################################ + +URG_VERSION = 0.8.18 +URG_SITE = http://pkgs.fedoraproject.org/repo/pkgs/urg/urg-0.8.18.zip/md5/93f90d2ccc36e784407c5282ef6bd2cb +URG_SOURCE = urg-$(URG_VERSION).zip +URG_LICENSE = LGPL-3.0 +URG_LICENSE_FILES = COPYING + +URG_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_SDL)$(BR2_PACKAGE_SDL_NET),yy) +URG_DEPENDENCIES += sdl sdl_net +URG_CONF_OPTS += \ + --with-sdl-prefix=$(STAGING_DIR)/usr \ + --with-sdl-exec-prefix=$(STAGING_DIR)/usr +else +URG_CONF_OPTS = --without-sdl +URG_CONF_ENV += ac_cv_path_SDL_CONFIG="" +endif + +URG_CONFIG_SCRIPTS = c_urg-config urg-config + +define URG_EXTRACT_CMDS + $(UNZIP) -d $(BUILD_DIR) $(URG_DL_DIR)/$(URG_SOURCE) +endef + +$(eval $(autotools-package)) diff --git a/package/usb_modeswitch/Config.in b/package/usb_modeswitch/Config.in new file mode 100644 index 00000000..ecb043a1 --- /dev/null +++ b/package/usb_modeswitch/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_USB_MODESWITCH + bool "usb_modeswitch" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + select BR2_PACKAGE_JIMTCL if !BR2_PACKAGE_TCL || BR2_PACKAGE_TCL_SHLIB_ONLY + select BR2_PACKAGE_LIBUSB + help + Some USB devices such as 3G/4G broadband modems power-up + in mass storage mode to provide access to drivers + for the device's application mode. usb_modeswitch + changes the mode of such devices from the initial power-up + mode to the application mode. + Specific configuration data for each device model is required. + + usb_modeswitch can be used with the usb_modeswitch_data + package and eudev/systemd for automatic mode switching + when devices are connected. + + For more information search the Internet for "Virtual CD-ROM + switching utility". + + http://www.draisberghof.de/usb_modeswitch/ + +comment "usb_modeswitch needs a toolchain w/ threads, gcc >= 4.9" + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 diff --git a/package/usb_modeswitch/usb_modeswitch.hash b/package/usb_modeswitch/usb_modeswitch.hash new file mode 100644 index 00000000..765a2438 --- /dev/null +++ b/package/usb_modeswitch/usb_modeswitch.hash @@ -0,0 +1,5 @@ +# From https://www.draisberghof.de/usb_modeswitch/usb-modeswitch-versions.xml +md5 69d00d6ed7097b97d972a159d14cfba1 usb-modeswitch-2.6.1.tar.bz2 +# Locally calculated +sha256 5195d9e136e52f658f19e9f93e4f982b1b67bffac197d0a455cd8c2cd245fa34 usb-modeswitch-2.6.1.tar.bz2 +sha256 6195429209313925c0eba6c0da4ee7a6cb4277b99e35c886913f80f91ec20b94 COPYING diff --git a/package/usb_modeswitch/usb_modeswitch.mk b/package/usb_modeswitch/usb_modeswitch.mk new file mode 100644 index 00000000..f2ee004b --- /dev/null +++ b/package/usb_modeswitch/usb_modeswitch.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# usb_modeswitch +# +################################################################################ + +USB_MODESWITCH_VERSION = 2.6.1 +USB_MODESWITCH_SOURCE = usb-modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2 +USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch +USB_MODESWITCH_DEPENDENCIES = libusb +USB_MODESWITCH_LICENSE = GPL-2.0+, BSD-2-Clause +USB_MODESWITCH_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_TCL)$(BR2_PACKAGE_TCL_SHLIB_ONLY),y) +USB_MODESWITCH_DEPENDENCIES += tcl +USB_MODESWITCH_BUILD_TARGETS = all +USB_MODESWITCH_INSTALL_TARGETS = install-script +else +USB_MODESWITCH_DEPENDENCIES += jimtcl +USB_MODESWITCH_INSTALL_TARGETS = install-common +ifeq ($(BR2_STATIC_LIBS),y) +USB_MODESWITCH_BUILD_TARGETS = all-with-statlink-dispatcher +else +USB_MODESWITCH_BUILD_TARGETS = all-with-dynlink-dispatcher +endif +endif + +define USB_MODESWITCH_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + -C $(@D) $(USB_MODESWITCH_BUILD_TARGETS) +endef + +define USB_MODESWITCH_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(TARGET_DIR) \ + -C $(@D) $(USB_MODESWITCH_INSTALL_TARGETS) +endef + +$(eval $(generic-package)) diff --git a/package/usb_modeswitch_data/Config.in b/package/usb_modeswitch_data/Config.in new file mode 100644 index 00000000..6da7d3bb --- /dev/null +++ b/package/usb_modeswitch_data/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + bool "usb_modeswitch_data" + depends on BR2_TOOLCHAIN_HAS_THREADS # usb_modeswitch -> libusb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # usb_modeswitch -> libusb + select BR2_PACKAGE_USB_MODESWITCH + help + USB mode switch data + Contains udev rules and events to allow usb_modeswitch to + function automatically + + http://www.draisberghof.de/usb_modeswitch/ + +comment "usb_modeswitch_data needs a toolchain w/ threads, gcc >= 4.9" + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 diff --git a/package/usb_modeswitch_data/usb_modeswitch_data.hash b/package/usb_modeswitch_data/usb_modeswitch_data.hash new file mode 100644 index 00000000..922913b2 --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data.hash @@ -0,0 +1,5 @@ +# From http://www.draisberghof.de/usb_modeswitch/ +md5 e8fce7eb949cbe16c61fb71bade4cc17 usb-modeswitch-data-20191128.tar.bz2 +# Locally calculated +sha256 3f039b60791c21c7cb15c7986cac89650f076dc274798fa242231b910785eaf9 usb-modeswitch-data-20191128.tar.bz2 +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING diff --git a/package/usb_modeswitch_data/usb_modeswitch_data.mk b/package/usb_modeswitch_data/usb_modeswitch_data.mk new file mode 100644 index 00000000..a3a98ad7 --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# usb_modeswitch_data +# +################################################################################ + +USB_MODESWITCH_DATA_VERSION = 20191128 +USB_MODESWITCH_DATA_SOURCE = usb-modeswitch-data-$(USB_MODESWITCH_DATA_VERSION).tar.bz2 +USB_MODESWITCH_DATA_SITE = http://www.draisberghof.de/usb_modeswitch +USB_MODESWITCH_DATA_DEPENDENCIES = usb_modeswitch +USB_MODESWITCH_DATA_LICENSE = GPL-2.0+ +USB_MODESWITCH_DATA_LICENSE_FILES = COPYING + +# Nothing to build, it is a pure data package + +define USB_MODESWITCH_DATA_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/usbmount/0001-rules-fix.patch b/package/usbmount/0001-rules-fix.patch new file mode 100644 index 00000000..c71b613c --- /dev/null +++ b/package/usbmount/0001-rules-fix.patch @@ -0,0 +1,19 @@ +Signed-off-by: Yegor Yefremov +--- + usbmount.rules | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: b/usbmount.rules +=================================================================== +--- a/usbmount.rules ++++ b/usbmount.rules +@@ -1,7 +1,7 @@ + # Rules for USBmount -*- conf -*- + + KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" +-KERNEL=="sd*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" +-KERNEL=="ub*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" ++KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" ++KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" + KERNEL=="sd*", ACTION=="remove", RUN+="/usr/share/usbmount/usbmount remove" + KERNEL=="ub*", ACTION=="remove", RUN+="/usr/share/usbmount/usbmount remove" diff --git a/package/usbmount/0002-use-udev-environment-instead-of-blkid.patch b/package/usbmount/0002-use-udev-environment-instead-of-blkid.patch new file mode 100644 index 00000000..27928b5d --- /dev/null +++ b/package/usbmount/0002-use-udev-environment-instead-of-blkid.patch @@ -0,0 +1,71 @@ +udev can provide all the values that usbmount determined using the +blkid binary. This patch drops use of blkid in favor of using the +environment variables set by udev. Thus it removes the dependency +on blkid from usbmount. + +Signed-off-by: Sven Neumann +--- usbmount-0.0.22/usbmount.orig 2013-06-18 14:44:40.143096147 +0200 ++++ usbmount-0.0.22/usbmount 2013-06-19 16:13:09.882434896 +0200 +@@ -59,11 +59,6 @@ + exit 0 + fi + +-if [ ! -x /sbin/blkid ]; then +- log err "cannot execute /sbin/blkid" +- exit 1 +-fi +- + # Per Policy 9.3.2, directories under /var/run have to be created + # after every reboot. + if [ ! -e /var/run/usbmount ]; then +@@ -83,15 +78,7 @@ + trap '( lockfile-remove /var/run/usbmount/.mount )' 0 + log debug "acquired lock /var/run/usbmount/.mount.lock" + +- # Grab device information from device and "divide it" +- # FIXME: improvement: implement mounting by label (notice that labels +- # can contain spaces, which makes things a little bit less comfortable). +- DEVINFO=$(/sbin/blkid -p $DEVNAME) +- FSTYPE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- UUID=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- USAGE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- +- if ! echo $USAGE | egrep -q "(filesystem|disklabel)"; then ++ if ! echo $ID_FS_USAGE | egrep -q "(filesystem|disklabel)"; then + log info "$DEVNAME does not contain a filesystem or disklabel" + exit 1 + fi +@@ -101,14 +88,14 @@ + log info "executing command: mount $DEVNAME" + mount $DEVNAME || log err "mount by DEVNAME with $DEVNAME wasn't successful; return code $?" + +- elif grep -q "^[[:blank:]]*UUID=$UUID" /etc/fstab; then +- log info "executing command: mount -U $UUID" +- mount -U $UUID || log err "mount by UUID with $UUID wasn't successful; return code $?" ++ elif grep -q "^[[:blank:]]*UUID=$ID_FS_UUID" /etc/fstab; then ++ log info "executing command: mount -U $ID_FS_UUID" ++ mount -U $ID_FS_UUID || log err "mount by UUID with $ID_FS_UUID wasn't successful; return code $?" + + else +- log debug "$DEVNAME contains filesystem type $FSTYPE" ++ log debug "$DEVNAME contains filesystem type $ID_FS_TYPE" + +- fstype=$FSTYPE ++ fstype=$ID_FS_TYPE + # Test if the filesystem type is in the list of filesystem + # types to mount. + if in_list "$fstype" "$FILESYSTEMS"; then +@@ -176,11 +163,13 @@ + + # Run hook scripts; ignore errors. + export UM_DEVICE="$DEVNAME" ++ export UM_UUID="$ID_FS_UUID" + export UM_MOUNTPOINT="$mountpoint" + export UM_FILESYSTEM="$fstype" + export UM_MOUNTOPTIONS="$options" + export UM_VENDOR="$vendor" + export UM_MODEL="$model" ++ export UM_LABEL="$ID_FS_LABEL" + log info "executing command: run-parts /etc/usbmount/mount.d" + run-parts /etc/usbmount/mount.d || : + else diff --git a/package/usbmount/Config.in b/package/usbmount/Config.in new file mode 100644 index 00000000..8ce0ce76 --- /dev/null +++ b/package/usbmount/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_USBMOUNT + bool "usbmount" + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_LOCKFILE_PROGS + help + The usbmount package automatically mounts USB mass storage + devices when they are plugged in, and unmounts them when + they are removed. + + https://wiki.debian.org/usbmount + +comment "usbmount requires udev to be enabled" + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/usbmount/usbmount.hash b/package/usbmount/usbmount.hash new file mode 100644 index 00000000..64654616 --- /dev/null +++ b/package/usbmount/usbmount.hash @@ -0,0 +1,4 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/u/usbmount/usbmount_0.0.22.dsc +sha256 a2b8581534b6c92f0376d202639dbc28862d3834dac64c35bde752f84975527d usbmount_0.0.22.tar.gz +# Locally computed +sha256 797a416c87923338aa3ed05cce3cfdac6101f0142e72d5ab05c7bd76af5e527b debian/copyright diff --git a/package/usbmount/usbmount.mk b/package/usbmount/usbmount.mk new file mode 100644 index 00000000..538602fd --- /dev/null +++ b/package/usbmount/usbmount.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# usbmount +# +################################################################################ + +USBMOUNT_VERSION = 0.0.22 +USBMOUNT_SOURCE = usbmount_$(USBMOUNT_VERSION).tar.gz +USBMOUNT_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/u/usbmount +USBMOUNT_DEPENDENCIES = udev lockfile-progs +USBMOUNT_LICENSE = BSD-2-Clause +USBMOUNT_LICENSE_FILES = debian/copyright + +define USBMOUNT_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/usbmount $(TARGET_DIR)/usr/share/usbmount/usbmount + + $(INSTALL) -m 0755 -D $(@D)/00_create_model_symlink \ + $(TARGET_DIR)/etc/usbmount/mount.d/00_create_model_symlink + $(INSTALL) -m 0755 -D $(@D)/00_remove_model_symlink \ + $(TARGET_DIR)/etc/usbmount/umount.d/00_remove_model_symlink + + $(INSTALL) -m 0644 -D $(@D)/usbmount.rules $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules + $(INSTALL) -m 0644 -D $(@D)/usbmount.conf $(TARGET_DIR)/etc/usbmount/usbmount.conf + + mkdir -p $(addprefix $(TARGET_DIR)/media/usb,0 1 2 3 4 5 6 7) +endef + +$(eval $(generic-package)) diff --git a/package/usbredir/Config.in b/package/usbredir/Config.in new file mode 100644 index 00000000..8ce180a8 --- /dev/null +++ b/package/usbredir/Config.in @@ -0,0 +1,32 @@ +comment "usbredir needs a toolchain w/ threads, gcc >= 4.9" + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_PACKAGE_USBREDIR + bool "usbredir" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + select BR2_PACKAGE_LIBUSB + help + usbredir is the name of a network protocol for sending usb + device traffic over a network connection. It is also the + name of the software package offering a parsing library, a + usbredirhost library and several utilities implementing this + protocol. + + Note: only the library is installed, not the utilities. Say + 'y' below if you want the server too. + + http://www.spice-space.org/page/UsbRedir + +if BR2_PACKAGE_USBREDIR + +config BR2_PACKAGE_USBREDIR_SERVER + bool "usbredirserver on target" + help + If you want to serve usbredir requests on your target, say + 'y' here to have the usbredir server on the target. + + Note: the server is not required to use the library. + +endif diff --git a/package/usbredir/usbredir.hash b/package/usbredir/usbredir.hash new file mode 100644 index 00000000..485315d2 --- /dev/null +++ b/package/usbredir/usbredir.hash @@ -0,0 +1,4 @@ +# locally computed hash +sha256 87bc9c5a81c982517a1bec70dc8d22e15ae197847643d58f20c0ced3c38c5e00 usbredir-0.8.0.tar.bz2 +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c COPYING.LIB diff --git a/package/usbredir/usbredir.mk b/package/usbredir/usbredir.mk new file mode 100644 index 00000000..8848670e --- /dev/null +++ b/package/usbredir/usbredir.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# usbredir +# +################################################################################ + +USBREDIR_VERSION = 0.8.0 +USBREDIR_SOURCE = usbredir-$(USBREDIR_VERSION).tar.bz2 +USBREDIR_SITE = http://spice-space.org/download/usbredir +USBREDIR_LICENSE = LGPL-2.1+ (libraries) +USBREDIR_LICENSE_FILES = COPYING.LIB +USBREDIR_INSTALL_STAGING = YES +USBREDIR_DEPENDENCIES = host-pkgconf libusb + +ifeq ($(BR2_PACKAGE_USBREDIR_SERVER),y) + +USBREDIR_LICENSE += , GPL-2.0+ (program) +USBREDIR_LICENSE_FILES += COPYING + +else # BR2_PACKAGE_USBREDIR_SERVER != y + +define USBREDIR_POST_INSTALL_TARGET_RM_SERVER + rm -f $(TARGET_DIR)/usr/sbin/usbredirserver +endef +USBREDIR_POST_INSTALL_TARGET_HOOKS += USBREDIR_POST_INSTALL_TARGET_RM_SERVER + +endif # BR2_PACKAGE_USBREDIR_SERVER + +$(eval $(autotools-package)) diff --git a/package/usbutils/Config.in b/package/usbutils/Config.in new file mode 100644 index 00000000..a38eb2f2 --- /dev/null +++ b/package/usbutils/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_USBUTILS + bool "usbutils" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb + depends on BR2_PACKAGE_HAS_UDEV # needs hwdb + select BR2_PACKAGE_LIBUSB + help + USB enumeration utilities + + http://linux-usb.sourceforge.net/ + +comment "usbutils needs udev /dev management and toolchain w/ threads, gcc >= 4.9" + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_PACKAGE_HAS_UDEV || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 diff --git a/package/usbutils/usbutils.hash b/package/usbutils/usbutils.hash new file mode 100644 index 00000000..96426aee --- /dev/null +++ b/package/usbutils/usbutils.hash @@ -0,0 +1,5 @@ +# From https://www.kernel.org/pub/linux/utils/usb/usbutils/sha256sums.asc +sha256 9e23494fcc78b7a80ee29a07dd179c95ae2f71509c35728dbbabc2d1cca41338 usbutils-013.tar.xz +# Locally calculated +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSES/GPL-2.0.txt +sha256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 LICENSES/GPL-3.0.txt diff --git a/package/usbutils/usbutils.mk b/package/usbutils/usbutils.mk new file mode 100644 index 00000000..ef5fd120 --- /dev/null +++ b/package/usbutils/usbutils.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# usbutils +# +################################################################################ + +USBUTILS_VERSION = 013 +USBUTILS_SOURCE = usbutils-$(USBUTILS_VERSION).tar.xz +USBUTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/usb/usbutils +USBUTILS_DEPENDENCIES = host-pkgconf libusb udev +USBUTILS_LICENSE = GPL-2.0+ (utils) GPL-2.0 or GPL-3.0 (lsusb.py) +USBUTILS_LICENSE_FILES = LICENSES/GPL-2.0.txt LICENSES/GPL-3.0.txt +# Missing configure script +USBUTILS_AUTORECONF = YES + +# Nice lsusb.py script only if there's python 3.x +ifeq ($(BR2_PACKAGE_PYTHON3),) +define USBUTILS_REMOVE_PYTHON + rm -f $(TARGET_DIR)/usr/bin/lsusb.py +endef + +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_PYTHON +endif + +$(eval $(autotools-package)) diff --git a/package/ushare/Config.in b/package/ushare/Config.in new file mode 100644 index 00000000..2dcd7737 --- /dev/null +++ b/package/ushare/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_USHARE + bool "ushare" + depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp + # ushare has a completely custom configure script that does + # broken things with library ordering, which breaks static + # linking. + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBUPNP + help + uShare is a UPnP (TM) A/V & DLNA Media Server. + It implements the server component that provides UPnP media + devices with information on available multimedia files. + + http://ushare.geexbox.org/ + +comment "ushare needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/ushare/ushare.hash b/package/ushare/ushare.hash new file mode 100644 index 00000000..013b2479 --- /dev/null +++ b/package/ushare/ushare.hash @@ -0,0 +1,3 @@ +# locally computed hash +sha256 e4563141a171138900540cc979f205cf666e820f709d47a98521bc77f53a99e6 ushare-2.1.tar.gz +sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c COPYING diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk new file mode 100644 index 00000000..a4c97116 --- /dev/null +++ b/package/ushare/ushare.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# ushare +# +################################################################################ + +USHARE_VERSION = 2.1 +USHARE_SITE = $(call github,ddugovic,uShare,v$(USHARE_VERSION)) +USHARE_DEPENDENCIES = host-pkgconf libupnp $(TARGET_NLS_DEPENDENCIES) +USHARE_LICENSE = GPL-2.0+ +USHARE_LICENSE_FILES = COPYING +USHARE_LDFLAGS = $(TARGET_NLS_LIBS) + +USHARE_CONF_OPTS = \ + --prefix=/usr \ + --cross-compile \ + --cross-prefix="$(TARGET_CROSS)" \ + --sysconfdir=/etc \ + --disable-strip + +ifeq ($(BR2_SYSTEM_ENABLE_NLS),) +USHARE_CONF_OPTS += --disable-nls +endif + +define USHARE_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + $(USHARE_CONF_OPTS) \ + ) +endef + +define USHARE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)" -C $(@D) +endef + +define USHARE_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + rm -f $(TARGET_DIR)/etc/init.d/ushare +endef + +# Even though configure is called it's not autoconf +$(eval $(generic-package)) diff --git a/package/ussp-push/0001-fix-build-against-bluez-4.patch b/package/ussp-push/0001-fix-build-against-bluez-4.patch new file mode 100644 index 00000000..0694bfba --- /dev/null +++ b/package/ussp-push/0001-fix-build-against-bluez-4.patch @@ -0,0 +1,15 @@ +Fix build against bluez4. + +Signed-off-by: Samuel Martin + +--- ussp-push-0.11.orig/src/obex_socket.c 2012-11-01 09:58:51.049538708 +0100 ++++ ussp-push-0.11/src/obex_socket.c 2012-11-01 12:10:10.719506951 +0100 +@@ -197,7 +197,7 @@ static int bt_sock_name2bth(int devid, c + for (i = 0; i < niinf; i++) { + char devname[128]; + +- if (hci_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1, ++ if (hci_read_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1, + devname, 100000) >= 0) { + if (strcasecmp(devname, btname) == 0) { + *btaddr = piinf[i].bdaddr; diff --git a/package/ussp-push/0002-fix-build-again-obex-bluez.patch b/package/ussp-push/0002-fix-build-again-obex-bluez.patch new file mode 100644 index 00000000..e98fe6ef --- /dev/null +++ b/package/ussp-push/0002-fix-build-again-obex-bluez.patch @@ -0,0 +1,28 @@ +From 2d732026044d8e6cd16465ee87a73ac9692c021b Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Fri, 3 Nov 2017 09:04:12 +0100 +Subject: [PATCH] fix build again obex/bluez + +[fetch from debian source: http://http.debian.net/debian/pool/main/u/ussp-push/ussp-push_0.11-4.debian.tar.xz] + +Signed-off-by: Samuel Martin +--- + src/obex_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/obex_main.c b/src/obex_main.c +index a7126e6..6233d7e 100644 +--- a/src/obex_main.c ++++ b/src/obex_main.c +@@ -197,7 +197,7 @@ obex_t *__obex_connect(int devid, void *addr, int timeout, int *err) + *err = -1; + return NULL; + } +- if (!(handle = OBEX_Init(OBEX_TRANS_CUST, obex_event, 0))) { ++ if (!(handle = OBEX_Init(OBEX_TRANS_CUSTOM, obex_event, 0))) { + BTERROR("OBEX_Init failed: %s\n", strerror(errno)); + obex_free(gt); + *err = -1; +-- +2.15.0 + diff --git a/package/ussp-push/0003-add-OBEX_CharToUnicode.patch b/package/ussp-push/0003-add-OBEX_CharToUnicode.patch new file mode 100644 index 00000000..a660b552 --- /dev/null +++ b/package/ussp-push/0003-add-OBEX_CharToUnicode.patch @@ -0,0 +1,47 @@ +From eafac77d76d2a23c191a56f715d6c4afc0800da8 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Fri, 3 Nov 2017 09:10:01 +0100 +Subject: [PATCH] add OBEX_CharToUnicode + +[fetch from debian source: http://http.debian.net/debian/pool/main/u/ussp-push/ussp-push_0.11-4.debian.tar.xz] + +Signed-off-by: Samuel Martin +--- + src/obex_main.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/src/obex_main.c b/src/obex_main.c +index 6233d7e..971cc37 100644 +--- a/src/obex_main.c ++++ b/src/obex_main.c +@@ -84,7 +84,27 @@ void request_done(obex_t * handle, obex_object_t * object, int obex_cmd, int obe + + int bt_debug; + ++static int OBEX_CharToUnicode(uint8_t *uc, const uint8_t *c, int size) ++{ ++ int len, n; ++ ++ if (uc == NULL || c == NULL) ++ return -1; ++ ++ len = n = strlen((char *) c); ++ if (n*2+2 > size) ++ return -1; ++ ++ uc[n*2+1] = 0; ++ uc[n*2] = 0; + ++ while (n--) { ++ uc[n*2+1] = c[n]; ++ uc[n*2] = 0; ++ } ++ ++ return (len * 2) + 2; ++} + + /* + * These two functions are from affix/profiles/obex/obex_io.c +-- +2.15.0 + diff --git a/package/ussp-push/Config.in b/package/ussp-push/Config.in new file mode 100644 index 00000000..276c8dca --- /dev/null +++ b/package/ussp-push/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_USSP_PUSH + bool "ussp-push" + depends on !BR2_STATIC_LIBS # bluez5_utils + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # dbus + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # bluez5_utils + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 # bluez5_utils + select BR2_PACKAGE_OPENOBEX + select BR2_PACKAGE_BLUEZ5_UTILS + help + ussp-push is an OBEX object pusher for Linux, using the BlueZ + BlueTooth stack. + + http://www.xmailserver.org/ussp-push.html + +comment "ussp-push needs a toolchain w/ wchar, threads, dynamic library, headers >= 3.4" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 diff --git a/package/ussp-push/ussp-push.hash b/package/ussp-push/ussp-push.hash new file mode 100644 index 00000000..36c79cfa --- /dev/null +++ b/package/ussp-push/ussp-push.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 bb2748eaed6164812555b4a1e186c4f2820c5ef9ce30f12d7aac28a452719bbd ussp-push-0.11.tar.gz +# License files, locally calculated +sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING diff --git a/package/ussp-push/ussp-push.mk b/package/ussp-push/ussp-push.mk new file mode 100644 index 00000000..c0479270 --- /dev/null +++ b/package/ussp-push/ussp-push.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# ussp-push +# +################################################################################ + +USSP_PUSH_VERSION = 0.11 +USSP_PUSH_SITE = http://www.xmailserver.org +USSP_PUSH_LICENSE = GPL-2.0+ +USSP_PUSH_LICENSE_FILES = COPYING + +USSP_PUSH_DEPENDENCIES = bluez5_utils openobex + +$(eval $(autotools-package)) diff --git a/package/ustream-ssl/Config.in b/package/ustream-ssl/Config.in new file mode 100644 index 00000000..540e4368 --- /dev/null +++ b/package/ustream-ssl/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_USTREAM_SSL + bool "ustream-ssl" + depends on !BR2_STATIC_LIBS #libubox + select BR2_PACKAGE_LIBUBOX + select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_MBEDTLS + help + ustream SSL wrapper + + https://git.openwrt.org/?p=project/ustream-ssl.git;a=summary + +comment "ustream-ssl needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/ustream-ssl/ustream-ssl.hash b/package/ustream-ssl/ustream-ssl.hash new file mode 100644 index 00000000..60672b38 --- /dev/null +++ b/package/ustream-ssl/ustream-ssl.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 f09474dbe4680b51cc0c6a088807102d64954764ef58c2a1e3231e3a77c4b01f ustream-ssl-23a3f2830341acd1db149175baf7315a33bd0edb-br1.tar.gz +sha256 90dd1590cf400a548438e2575e1ff46d8fb8cebae7d09f544aae7e059e30b6c5 ustream-ssl.h diff --git a/package/ustream-ssl/ustream-ssl.mk b/package/ustream-ssl/ustream-ssl.mk new file mode 100644 index 00000000..7804eb5d --- /dev/null +++ b/package/ustream-ssl/ustream-ssl.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# ustream-ssl +# +################################################################################ + +USTREAM_SSL_VERSION = 23a3f2830341acd1db149175baf7315a33bd0edb +USTREAM_SSL_SITE = git://git.openwrt.org/project/ustream-ssl.git +USTREAM_SSL_LICENSE = ISC +USTREAM_SSL_LICENSE_FILES = ustream-ssl.h +USTREAM_SSL_INSTALL_STAGING = YES +USTREAM_SSL_DEPENDENCIES = libubox + +ifeq ($(BR2_PACKAGE_MBEDTLS),y) +USTREAM_SSL_DEPENDENCIES += mbedtls +USTREAM_SSL_CONF_OPTS += -DMBEDTLS=ON +else +USTREAM_SSL_DEPENDENCIES += openssl +endif + +$(eval $(cmake-package)) diff --git a/package/utf8proc/Config.in b/package/utf8proc/Config.in new file mode 100644 index 00000000..43b50738 --- /dev/null +++ b/package/utf8proc/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_UTF8PROC + bool "utf8proc" + help + A clean C library for processing UTF-8 Unicode data. + + https://juliastrings.github.io/utf8proc diff --git a/package/utf8proc/utf8proc.hash b/package/utf8proc/utf8proc.hash new file mode 100644 index 00000000..2deff4e0 --- /dev/null +++ b/package/utf8proc/utf8proc.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 4c06a9dc4017e8a2438ef80ee371d45868bda2237a98b26554de7a95406b283b utf8proc-2.6.1.tar.gz +sha256 fbc720fcc90fb44396985646f67e4d19be03e0c0539f7138ed9dc6efba49dc49 LICENSE.md diff --git a/package/utf8proc/utf8proc.mk b/package/utf8proc/utf8proc.mk new file mode 100644 index 00000000..bedd38ca --- /dev/null +++ b/package/utf8proc/utf8proc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# utf8proc +# +################################################################################ + +UTF8PROC_VERSION = 2.6.1 +UTF8PROC_SITE = $(call github,JuliaStrings,utf8proc,v$(UTF8PROC_VERSION)) +UTF8PROC_LICENSE = MIT +UTF8PROC_LICENSE_FILES = LICENSE.md +UTF8PROC_INSTALL_STAGING = YES +UTF8PROC_SUPPORTS_IN_SOURCE_BUILD = NO + +$(eval $(cmake-package)) diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in new file mode 100644 index 00000000..1f33eb55 --- /dev/null +++ b/package/util-linux/Config.in @@ -0,0 +1,443 @@ +menuconfig BR2_PACKAGE_UTIL_LINUX + bool "util-linux" + help + Various useful/essential linux libraries and utilities. + + Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc... + + http://www.kernel.org/pub/linux/utils/util-linux/ + +if BR2_PACKAGE_UTIL_LINUX + +config BR2_PACKAGE_UTIL_LINUX_LIBS + bool + +config BR2_PACKAGE_UTIL_LINUX_LIBBLKID + bool "libblkid" + depends on BR2_USE_MMU # fork() + help + Install libblkid. + +config BR2_PACKAGE_UTIL_LINUX_LIBFDISK + bool "libfdisk" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Install libfdisk. + +config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + bool "libmount" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + help + Install libmount. + +config BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + bool "libsmartcols" + depends on BR2_USE_MMU # fork() + help + Install libsmartcols. + +config BR2_PACKAGE_UTIL_LINUX_LIBUUID + bool "libuuid" + help + Install libuuid. + +config BR2_PACKAGE_UTIL_LINUX_BINARIES + bool "basic set" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBFDISK + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Install the basic set of util-linux binaries. + + blkdiscard, blkid, blockdev, chcpu, choom, col, colcrt, colrm, + column, ctrlaltdel, dmesg, fdisk, fincore, findfs, findmnt, + flock, fsfreeze, fstrim, getopt, hexdump, ipcmk, isosize, + ldattach, look, lsblk, lscpu, lsipc, lslocks, lsns, mcookie, + mkfs, mkswap, namei, prlimit, readprofile, renice, rev, + rtcwake, script, scriptlive, scriptreplay, setarch, setsid, + sfdisk, swaplabel, swapoff, swapon, uuidgen, uuidparse, + whereis, wipefs + + The setarch utility also installs architecture-specific + symlinks like linux32, linux64, uname26, i386 and x86_64. + +config BR2_PACKAGE_UTIL_LINUX_AGETTY + bool "agetty" + depends on BR2_USE_MMU # fork() + help + Alternative linux getty + +config BR2_PACKAGE_UTIL_LINUX_BFS + bool "bfs" + help + SCO bfs filesystem support + +config BR2_PACKAGE_UTIL_LINUX_CAL + bool "cal" + help + Display a calendar, or some part of it + +config BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH + bool "chfn/chsh" + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # 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" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS + +config BR2_PACKAGE_UTIL_LINUX_CHMEM + bool "chmem" + help + Sets a particular size or range of memory online or offline + +config BR2_PACKAGE_UTIL_LINUX_CRAMFS + bool "cramfs utilities" + select BR2_PACKAGE_ZLIB + help + Utilities for compressed ROM file system (fsck.cramfs, + mkfs.cramfs) + +config BR2_PACKAGE_UTIL_LINUX_EJECT + bool "eject" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Eject removable media + +config BR2_PACKAGE_UTIL_LINUX_FALLOCATE + bool "fallocate" + help + Preallocate space to a file + +config BR2_PACKAGE_UTIL_LINUX_FDFORMAT + bool "fdformat" + help + Low-level format a floppy disk + +config BR2_PACKAGE_UTIL_LINUX_FSCK + bool "fsck" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Check and repair a linux filesystem + +config BR2_PACKAGE_UTIL_LINUX_HARDLINK + bool "hardlink" + help + Consolidate duplicate files via hardlinks + +config BR2_PACKAGE_UTIL_LINUX_HWCLOCK + bool "hwclock" + help + Query or set the hardware clock (RTC) + +config BR2_PACKAGE_UTIL_LINUX_IPCRM + bool "ipcrm" + help + Remove certain IPC resources + +config BR2_PACKAGE_UTIL_LINUX_IPCS + bool "ipcs" + help + Show information on IPC facilities + +config BR2_PACKAGE_UTIL_LINUX_KILL + bool "kill" + help + Send a signal to a process + +config BR2_PACKAGE_UTIL_LINUX_LAST + bool "last" + help + Show a listing of last logged in users + +config BR2_PACKAGE_UTIL_LINUX_LINE + bool "line" + help + Read one line + +config BR2_PACKAGE_UTIL_LINUX_LOGGER + bool "logger" + help + Enter messages into the system log + +config BR2_PACKAGE_UTIL_LINUX_LOGIN + bool "login" + depends on BR2_ENABLE_LOCALE # linux-pam + depends on BR2_USE_WCHAR # linux-pam + depends on !BR2_STATIC_LIBS # linux-pam + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + depends on BR2_USE_MMU # fork(), 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" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_UTIL_LINUX_LOSETUP + bool "losetup" + depends on BR2_USE_MMU # libsmartcols + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + help + Set up and control loop devices + +config BR2_PACKAGE_UTIL_LINUX_LSLOGINS + bool "lslogins" + depends on BR2_USE_MMU # libsmartcols + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + help + Display information about known users in the system + +config BR2_PACKAGE_UTIL_LINUX_LSMEM + bool "lsmem" + depends on BR2_USE_MMU # libsmartcols + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + help + List the ranges of available memory with their online status + +config BR2_PACKAGE_UTIL_LINUX_MESG + bool "mesg" + help + Control write access to your terminal + +config BR2_PACKAGE_UTIL_LINUX_MINIX + bool "minix" + depends on BR2_USE_MMU # fork() + help + Minix filesystem support + +config BR2_PACKAGE_UTIL_LINUX_MORE + bool "more" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + File perusal filter for crt viewing + +config BR2_PACKAGE_UTIL_LINUX_MOUNT + bool "mount/umount" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Mount/unmount filesystems + +config BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT + bool "mountpoint" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + See if a directory is a mountpoint + +config BR2_PACKAGE_UTIL_LINUX_NEWGRP + bool "newgrp" + help + Log in to a new group + +config BR2_PACKAGE_UTIL_LINUX_NOLOGIN + bool "nologin" + help + Politely refuse a login + +config BR2_PACKAGE_UTIL_LINUX_NSENTER + bool "nsenter" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + help + Enter the namespaces of another process + +comment "nsenter needs a toolchain w/ headers >= 3.0" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_PACKAGE_UTIL_LINUX_PG + bool "pg" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + Browse pagewise through text files + +config BR2_PACKAGE_UTIL_LINUX_PARTX + bool "partition utilities" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Partition utilities (addpart, delpart, partx) + +config BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT + bool "pivot_root" + help + Change the root filesystem + +config BR2_PACKAGE_UTIL_LINUX_RAW + bool "raw" + help + Build a linux raw character device + +config BR2_PACKAGE_UTIL_LINUX_RENAME + bool "rename" + help + Rename files + +config BR2_PACKAGE_UTIL_LINUX_RFKILL + bool "rfkill" + depends on BR2_USE_MMU # libsmartcols + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + help + Tool for enabling and disabling wireless devices. This new + implementation is based upon, and backward compatible with, + the original rfkill from Johannes Berg and Marcel Holtmann. + +config BR2_PACKAGE_UTIL_LINUX_RUNUSER + bool "runuser" + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + depends on BR2_USE_MMU # fork(), 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" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS + bool "scheduling utilities" + help + Scheduling utilities (chrt, ionice, taskset) + +config BR2_PACKAGE_UTIL_LINUX_SETPRIV + bool "setpriv" + select BR2_PACKAGE_LIBCAP_NG + help + Run a program with different Linux privilege settings + +config BR2_PACKAGE_UTIL_LINUX_SETTERM + bool "setterm" + select BR2_PACKAGE_NCURSES + help + Set terminal attributes + +config BR2_PACKAGE_UTIL_LINUX_SU + bool "su" + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + depends on BR2_USE_MMU # fork(), 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" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_UTIL_LINUX_SULOGIN + bool "sulogin" + depends on BR2_USE_MMU # fork() + help + Single-user login + +config BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT + bool "switch_root" + depends on BR2_USE_MMU # fork() + help + Switch to another filesystem as the root of the mount tree + +config BR2_PACKAGE_UTIL_LINUX_TUNELP + bool "tunelp" + select BR2_PACKAGE_NCURSES + help + Set various parameters for the lp device + +config BR2_PACKAGE_UTIL_LINUX_UL + bool "ul" + select BR2_PACKAGE_NCURSES + help + Do underlining + +config BR2_PACKAGE_UTIL_LINUX_UNSHARE + bool "unshare" + depends on BR2_USE_MMU # fork() + help + Run program with some namespaces unshared from parent + +config BR2_PACKAGE_UTIL_LINUX_UTMPDUMP + bool "utmpdump" + help + Dump UTMP and WTMP files in raw format + +config BR2_PACKAGE_UTIL_LINUX_UUIDD + bool "uuidd" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + UUID generation daemon + +config BR2_PACKAGE_UTIL_LINUX_VIPW + bool "vipw" + depends on BR2_USE_MMU # fork() + help + Edit the password, group, shadow-password or shadow-group file + +config BR2_PACKAGE_UTIL_LINUX_WALL + bool "wall" + depends on BR2_USE_MMU # fork() + help + Send a message to everybody's terminal + +config BR2_PACKAGE_UTIL_LINUX_WIPEFS + bool "wipefs" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + help + wipefs can erase filesystem, raid or partition-table + signatures (magic strings) from the specified device + to make the signatures invisible for libblkid. wipefs + does not erase the filesystem itself nor any other data + from the device. + +config BR2_PACKAGE_UTIL_LINUX_WDCTL + bool "wdctl" + depends on BR2_USE_MMU # libsmartcols + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + help + Shows hardware watchdog status + +config BR2_PACKAGE_UTIL_LINUX_WRITE + bool "write" + help + Send a message to another user + +config BR2_PACKAGE_UTIL_LINUX_ZRAMCTL + bool "zramctl" + depends on BR2_USE_MMU # libsmartcols + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + help + Set up and control zram devices + +endif diff --git a/package/util-linux/Config.in.host b/package/util-linux/Config.in.host new file mode 100644 index 00000000..f73dc43d --- /dev/null +++ b/package/util-linux/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_UTIL_LINUX + bool "host util-linux" + help + Various useful/essential linux libraries and utilities. + + Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc... + + http://www.kernel.org/pub/linux/utils/util-linux/ diff --git a/package/util-linux/su.pam b/package/util-linux/su.pam new file mode 100644 index 00000000..69b2a40c --- /dev/null +++ b/package/util-linux/su.pam @@ -0,0 +1,15 @@ +auth sufficient pam_rootok.so +auth required pam_wheel.so use_uid +auth required pam_env.so +auth required pam_unix.so nullok + +account required pam_unix.so + +password required pam_unix.so nullok + +session required pam_selinux.so close +session required pam_limits.so +session required pam_env.so +session required pam_unix.so +session optional pam_lastlog.so +session required pam_selinux.so open diff --git a/package/util-linux/util-linux-libs/util-linux-libs.hash b/package/util-linux/util-linux-libs/util-linux-libs.hash new file mode 120000 index 00000000..dc1b2f86 --- /dev/null +++ b/package/util-linux/util-linux-libs/util-linux-libs.hash @@ -0,0 +1 @@ +../util-linux.hash \ 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 new file mode 100644 index 00000000..3a3a655e --- /dev/null +++ b/package/util-linux/util-linux-libs/util-linux-libs.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# util-linux-libs +# +################################################################################ + +# Please keep this file as similar as possible to util-linux.mk + +UTIL_LINUX_LIBS_VERSION = $(UTIL_LINUX_VERSION) +UTIL_LINUX_LIBS_SOURCE = $(UTIL_LINUX_SOURCE) +UTIL_LINUX_LIBS_SITE = $(UTIL_LINUX_SITE) +UTIL_LINUX_LIBS_DL_SUBDIR = $(UTIL_LINUX_DL_SUBDIR) + +# 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_LIBS_LICENSE = LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid) +UTIL_LINUX_LIBS_LICENSE_FILES = README.licensing \ + Documentation/licenses/COPYING.BSD-3-Clause \ + Documentation/licenses/COPYING.LGPL-2.1-or-later + +UTIL_LINUX_LIBS_INSTALL_STAGING = YES +UTIL_LINUX_LIBS_DEPENDENCIES = \ + host-pkgconf \ + $(TARGET_NLS_DEPENDENCIES) +UTIL_LINUX_LIBS_CONF_OPTS += \ + --disable-rpath \ + --disable-makeinstall-chown + +UTIL_LINUX_LIBS_LINK_LIBS = $(TARGET_NLS_LIBS) + +# Prevent the installation from attempting to move shared libraries from +# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are +# the same when merged usr is in use. +ifeq ($(BR2_ROOTFS_MERGED_USR),y) +UTIL_LINUX_LIBS_CONF_OPTS += --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib +endif + +# systemd depends on util-linux-libs so we disable systemd support +UTIL_LINUX_LIBS_CONF_OPTS += \ + --without-systemd \ + --with-systemdsystemunitdir=no + +# systemd/eudev depend on util-linux-libs so we disable udev support +UTIL_LINUX_LIBS_CONF_OPTS += --without-udev + +# No libs use wchar +UTIL_LINUX_LIBS_CONF_OPTS += --disable-widechar + +# No libs use ncurses +UTIL_LINUX_LIBS_CONF_OPTS += --without-ncursesw --without-ncurses + +# 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, +# and then pass it again at build time. +UTIL_LINUX_LIBS_CONF_ENV += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)" +UTIL_LINUX_LIBS_MAKE_OPTS += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)" + +# libmount optionally uses selinux +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT)$(BR2_PACKAGE_LIBSELINUX),yy) +UTIL_LINUX_LIBS_DEPENDENCIES += libselinux +UTIL_LINUX_LIBS_CONF_OPTS += --with-selinux +else +UTIL_LINUX_LIBS_CONF_OPTS += --without-selinux +endif + +# Disable utilities +UTIL_LINUX_LIBS_CONF_OPTS += \ + --disable-all-programs \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),--enable-libfdisk,--disable-libfdisk) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS),--enable-libsmartcols,--disable-libsmartcols) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) + +# libmount python bindings are separate, will be installed by full util-linux +UTIL_LINUX_LIBS_CONF_OPTS += --without-python --disable-pylibmount + +# No libs use readline +UTIL_LINUX_LIBS_CONF_OPTS += --without-readline + +# No libs use audit +UTIL_LINUX_LIBS_CONF_OPTS += --without-audit + +# No libs use libmagic +UTIL_LINUX_LIBS_CONF_OPTS += --without-libmagic + +$(eval $(autotools-package)) diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash new file mode 100644 index 00000000..3f9fe398 --- /dev/null +++ b/package/util-linux/util-linux.hash @@ -0,0 +1,9 @@ +# From https://www.kernel.org/pub/linux/utils/util-linux/v2.36/sha256sums.asc +sha256 f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f util-linux-2.36.2.tar.xz +# License files, locally calculated +sha256 869660b5269f4f40a8a679da7f403ea3a6e71d46087aab5e14871b09bcb55955 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 +sha256 e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63 Documentation/licenses/COPYING.ISC +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 Documentation/licenses/COPYING.LGPL-2.1-or-later diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk new file mode 100644 index 00000000..4bc7a112 --- /dev/null +++ b/package/util-linux/util-linux.mk @@ -0,0 +1,298 @@ +################################################################################ +# +# util-linux +# +################################################################################ + +# 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.36 +UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2 +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_FILES = README.licensing \ + Documentation/licenses/COPYING.BSD-3-Clause \ + Documentation/licenses/COPYING.BSD-4-Clause-UC \ + Documentation/licenses/COPYING.GPL-2.0-or-later \ + Documentation/licenses/COPYING.ISC \ + Documentation/licenses/COPYING.LGPL-2.1-or-later + +UTIL_LINUX_CPE_ID_VENDOR = kernel +UTIL_LINUX_INSTALL_STAGING = YES +UTIL_LINUX_DEPENDENCIES = \ + host-pkgconf \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBS),util-linux-libs) \ + $(TARGET_NLS_DEPENDENCIES) +UTIL_LINUX_CONF_OPTS += \ + --disable-rpath \ + --disable-makeinstall-chown + +UTIL_LINUX_LINK_LIBS = $(TARGET_NLS_LIBS) + +HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf + +# We also don't want the host-python dependency +HOST_UTIL_LINUX_CONF_OPTS = \ + --without-systemd \ + --with-systemdsystemunitdir=no \ + --without-python + +ifneq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES)$(BR2_PACKAGE_UTIL_LINUX_CRAMFS)$(BR2_PACKAGE_UTIL_LINUX_FSCK)$(BR2_PACKAGE_UTIL_LINUX_LOSETUP),) +UTIL_LINUX_SELINUX_MODULES = fstools +endif + +# Prevent the installation from attempting to move shared libraries from +# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are +# the same when merged usr is in use. +ifeq ($(BR2_ROOTFS_MERGED_USR),y) +UTIL_LINUX_CONF_OPTS += --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +UTIL_LINUX_CONF_OPTS += --with-systemd --with-systemdsystemunitdir=/usr/lib/systemd/system +UTIL_LINUX_DEPENDENCIES += systemd +else +UTIL_LINUX_CONF_OPTS += --without-systemd --with-systemdsystemunitdir=no +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +UTIL_LINUX_CONF_OPTS += --with-udev +UTIL_LINUX_DEPENDENCIES += udev +else +UTIL_LINUX_CONF_OPTS += --without-udev +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +UTIL_LINUX_DEPENDENCIES += ncurses +ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) +UTIL_LINUX_CONF_OPTS += --with-ncursesw +UTIL_LINUX_CONF_ENV += NCURSESW6_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) +else +UTIL_LINUX_CONF_OPTS += --without-ncursesw --with-ncurses --disable-widechar +UTIL_LINUX_CONF_ENV += NCURSES6_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) +endif +else +ifeq ($(BR2_USE_WCHAR),y) +UTIL_LINUX_CONF_OPTS += --enable-widechar +else +UTIL_LINUX_CONF_OPTS += --disable-widechar +endif +UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses +endif + +# 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, +# and then pass it again at build time. +UTIL_LINUX_CONF_ENV += LIBS="$(UTIL_LINUX_LINK_LIBS)" +UTIL_LINUX_MAKE_OPTS += LIBS="$(UTIL_LINUX_LINK_LIBS)" + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +UTIL_LINUX_DEPENDENCIES += libselinux +UTIL_LINUX_CONF_OPTS += --with-selinux +else +UTIL_LINUX_CONF_OPTS += --without-selinux +define UTIL_LINUX_SELINUX_PAMFILES_TWEAK + $(foreach f,su su-l, + $(SED) '/^.*pam_selinux.so.*$$/d' \ + $(TARGET_DIR)/etc/pam.d/$(f) + ) +endef +endif + +# Used by setpriv +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBCAP_NG),libcap-ng) + +# Used by cramfs utils +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_ZLIB),zlib) + +# Used by login-utils +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_LINUX_PAM),linux-pam) + +# Used by hardlink +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_PCRE2),pcre2) + +# Disable/Enable utilities +UTIL_LINUX_CONF_OPTS += \ + $(if $(BR2_PACKAGE_UTIL_LINUX_BINARIES),--enable-all-programs,--disable-all-programs) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_AGETTY),--enable-agetty,--disable-agetty) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_BFS),--enable-bfs,--disable-bfs) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_CAL),--enable-cal,--disable-cal) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH),--enable-chfn-chsh,--disable-chfn-chsh) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_CHMEM),--enable-chmem,--disable-chmem) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),--enable-cramfs,--disable-cramfs) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_EJECT),--enable-eject,--disable-eject) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),--enable-fallocate,--disable-fallocate) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_FDFORMAT),--enable-fdformat,--disable-fdformat) \ + $(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_IPCRM),--enable-ipcrm,--disable-ipcrm) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_IPCS),--enable-ipcs,--disable-ipcs) \ + $(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) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),--enable-libfdisk,--disable-libfdisk) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS),--enable-libsmartcols,--disable-libsmartcols) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LINE),--enable-line,--disable-line) \ + $(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_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) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MINIX),--enable-minix,--disable-minix) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MORE),--enable-more,--disable-more) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MOUNT),--enable-mount,--disable-mount) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT),--enable-mountpoint,--disable-mountpoint) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_NEWGRP),--enable-newgrp,--disable-newgrp) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),--enable-nologin,--disable-nologin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_NSENTER),--enable-nsenter,--disable-nsenter) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_PARTX),--enable-partx,--disable-partx) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_PG),--enable-pg,--disable-pg) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT),--enable-pivot_root,--disable-pivot_root) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RFKILL),--enable-rfkill,--disable-rfkill) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RUNUSER),--enable-runuser,--disable-runuser) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SETPRIV),--enable-setpriv,--disable-setpriv) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SETTERM),--enable-setterm,--disable-setterm) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SU),--enable-su,--disable-su) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SULOGIN),--enable-sulogin,--disable-sulogin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_TUNELP),--enable-tunelp,--disable-tunelp) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_UL),--enable-ul,--disable-ul) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_UNSHARE),--enable-unshare,--disable-unshare) \ + $(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_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) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write,--disable-write) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_ZRAMCTL),--enable-zramctl,--disable-zramctl) + +# In the host version of util-linux, we only require libuuid and +# libmount (plus libblkid as an indirect dependency of libmount). +# So disable all of the programs, unless BR2_PACKAGE_HOST_UTIL_LINUX is set + +HOST_UTIL_LINUX_CONF_OPTS += \ + --enable-libblkid \ + --enable-libmount \ + --enable-libuuid \ + --without-libmagic \ + --without-ncurses \ + --without-ncursesw \ + --without-tinfo + +ifeq ($(BR2_PACKAGE_HOST_UTIL_LINUX),y) +HOST_UTIL_LINUX_CONF_OPTS += --disable-makeinstall-chown +# disable commands that have ncurses dependency, as well as +# other ones that are useless on the host +HOST_UTIL_LINUX_CONF_OPTS += \ + --disable-agetty \ + --disable-chfn-chsh \ + --disable-chmem \ + --disable-login \ + --disable-lslogins \ + --disable-mesg \ + --disable-more \ + --disable-newgrp \ + --disable-nologin \ + --disable-nsenter \ + --disable-pg \ + --disable-rfkill \ + --disable-runuser \ + --disable-schedutils \ + --disable-setpriv \ + --disable-setterm \ + --disable-su \ + --disable-sulogin \ + --disable-tunelp \ + --disable-ul \ + --disable-unshare \ + --disable-uuidd \ + --disable-vipw \ + --disable-wall \ + --disable-wdctl \ + --disable-write \ + --disable-zramctl +# Used by cramfs utils +HOST_UTIL_LINUX_DEPENDENCIES += host-zlib +else +HOST_UTIL_LINUX_CONF_OPTS += --disable-all-programs +endif + +# Install libmount Python bindings +ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) +UTIL_LINUX_CONF_OPTS += --with-python +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y) +UTIL_LINUX_CONF_OPTS += --enable-pylibmount +else +UTIL_LINUX_CONF_OPTS += --disable-pylibmount +endif +else +UTIL_LINUX_CONF_OPTS += --without-python +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +UTIL_LINUX_CONF_OPTS += --with-readline +UTIL_LINUX_LINK_LIBS += $(if $(BR2_STATIC_LIBS),-lcurses) +UTIL_LINUX_DEPENDENCIES += readline +else +UTIL_LINUX_CONF_OPTS += --without-readline +endif + +ifeq ($(BR2_PACKAGE_AUDIT),y) +UTIL_LINUX_CONF_OPTS += --with-audit +UTIL_LINUX_DEPENDENCIES += audit +else +UTIL_LINUX_CONF_OPTS += --without-audit +endif + +ifeq ($(BR2_PACKAGE_FILE),y) +UTIL_LINUX_CONF_OPTS += --with-libmagic +UTIL_LINUX_DEPENDENCIES += file +else +UTIL_LINUX_CONF_OPTS += --without-libmagic +endif + +# Install PAM configuration files +ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU)$(BR2_PACKAGE_LINUX_PAM),yy) +define UTIL_LINUX_INSTALL_PAMFILES + $(INSTALL) -D -m 0644 package/util-linux/su.pam \ + $(TARGET_DIR)/etc/pam.d/su + $(INSTALL) -D -m 0644 package/util-linux/su.pam \ + $(TARGET_DIR)/etc/pam.d/su-l + $(UTIL_LINUX_SELINUX_PAMFILES_TWEAK) +endef +UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_INSTALL_PAMFILES +endif + +# Install agetty->getty symlink to avoid breakage when there's no busybox +ifeq ($(BR2_PACKAGE_UTIL_LINUX_AGETTY),y) +ifeq ($(BR2_PACKAGE_BUSYBOX),) +define UTIL_LINUX_GETTY_SYMLINK + ln -sf agetty $(TARGET_DIR)/sbin/getty +endef +endif +endif + +UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_GETTY_SYMLINK + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +# Must be included after the autotools-package call, to make sure all variables +# are available +include package/util-linux/util-linux-libs/util-linux-libs.mk diff --git a/package/utp_com/Config.in.host b/package/utp_com/Config.in.host new file mode 100644 index 00000000..8f733de8 --- /dev/null +++ b/package/utp_com/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_UTP_COM + bool "host utp_com" + help + This package is used to send commands to hardware + via Freescale's UTP protocol (similar to MFGTools) + + https://github.com/ixonos/utp_com diff --git a/package/utp_com/utp_com.hash b/package/utp_com/utp_com.hash new file mode 100644 index 00000000..bc25be20 --- /dev/null +++ b/package/utp_com/utp_com.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 8b5ba0058a78de69faf6822bb10b457fff2f9e55dc112ccb81c35214b061c6e6 utp_com-dee512ced1e9367d223d22f10797fbf9aeacfab6.tar.gz +sha256 a45d0bb572ed792ed34627a72621834b3ba92aab6e2cc4e04301dee7a728d753 LICENSE diff --git a/package/utp_com/utp_com.mk b/package/utp_com/utp_com.mk new file mode 100644 index 00000000..5890a70d --- /dev/null +++ b/package/utp_com/utp_com.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# utp_com +# +################################################################################ + +UTP_COM_VERSION = dee512ced1e9367d223d22f10797fbf9aeacfab6 +UTP_COM_SITE = $(call github,freescale,utp_com,$(UTP_COM_VERSION)) +UTP_COM_LICENSE = GPL-2.0+ +UTP_COM_LICENSE_FILES = LICENSE +HOST_UTP_COM_DEPENDENCIES = host-sg3_utils + +define HOST_UTP_COM_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define HOST_UTP_COM_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/utp_com $(HOST_DIR)/bin/utp_com +endef + +$(eval $(host-generic-package)) diff --git a/package/uvw/Config.in b/package/uvw/Config.in new file mode 100644 index 00000000..e5cfc541 --- /dev/null +++ b/package/uvw/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_UVW + bool "uvw" + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv + depends on BR2_USE_MMU # libuv + depends on !BR2_STATIC_LIBS # libuv + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17 + select BR2_PACKAGE_LIBUV + help + Header-only, event based, tiny and easy to use + libuv wrapper in modern C++. + + https://github.com/skypjack/uvw + +comment "uvw needs a toolchain w/ NPTL, dynamic library, C++, gcc >= 7" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS || \ + !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_7 + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 diff --git a/package/uvw/uvw.hash b/package/uvw/uvw.hash new file mode 100644 index 00000000..ba8c7b89 --- /dev/null +++ b/package/uvw/uvw.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 aa5769f5b9ba50de72ab02a8f8acf298b4aa9ceaef07992418a13a0fa119ce7d uvw-2.8.0_libuv_v1.40.tar.gz +sha256 755b2f245af22830c15b60c54469c0d92fbed42009b0d0074cec4b3959905757 LICENSE diff --git a/package/uvw/uvw.mk b/package/uvw/uvw.mk new file mode 100644 index 00000000..f152d9f1 --- /dev/null +++ b/package/uvw/uvw.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# uvw +# +################################################################################ + +UVW_VERSION = 2.8.0_libuv_v1.40 +UVW_SITE = $(call github,skypjack,uvw,v$(UVW_VERSION)) +UVW_INSTALL_STAGING = YES +UVW_INSTALL_TARGET = NO +UVW_SUPPORTS_IN_SOURCE_BUILD = NO +UVW_DEPENDENCIES = libuv +UVW_LICENSE = MIT +UVW_LICENSE_FILES = LICENSE + +$(eval $(cmake-package)) diff --git a/package/ux500-firmware/Config.in b/package/ux500-firmware/Config.in new file mode 100644 index 00000000..1c182373 --- /dev/null +++ b/package/ux500-firmware/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_UX500_FIRMWARE + bool "ux500-firmware" + help + This package provides various binary firmware files (closed + binary blobs) for the Azurewave AW-NH580 combo module (wifi, + bt, gps). + + https://launchpad.net/~igloocommunity-maintainers/+archive/snowball/+files/ diff --git a/package/ux500-firmware/ux500-firmware.hash b/package/ux500-firmware/ux500-firmware.hash new file mode 100644 index 00000000..b77ed204 --- /dev/null +++ b/package/ux500-firmware/ux500-firmware.hash @@ -0,0 +1,3 @@ +# locally computed hash +sha256 81633274a9157c076e5e09b5addd81fbcef504b829fc801041cea50eea774bcd ux500-firmware_1.1.3-6linaro1.tar.gz +sha256 b5bbc3fb3ff2f8e165b3bf60b25702d8970b3d7fe88b1c883f20615d550a7cb2 license.txt diff --git a/package/ux500-firmware/ux500-firmware.mk b/package/ux500-firmware/ux500-firmware.mk new file mode 100644 index 00000000..428ed342 --- /dev/null +++ b/package/ux500-firmware/ux500-firmware.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# ux500-firmware +# +################################################################################ + +UX500_FIRMWARE_VERSION = 1.1.3-6 +UX500_FIRMWARE_SOURCE = ux500-firmware_$(UX500_FIRMWARE_VERSION)linaro1.tar.gz +UX500_FIRMWARE_SITE = https://launchpad.net/~igloocommunity-maintainers/+archive/snowball/+files +UX500_FIRMWARE_LICENSE = Snowball click-wrap license +UX500_FIRMWARE_LICENSE_FILES = license.txt +UX500_FIRMWARE_REDISTRIBUTE = NO + +# The CG2900 linux driver has to load firmware named CG29XX_* but the firmware +# filenames contained in this package are CG2900_* hence the code below +define UX500_FIRMWARE_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + for f in $(TARGET_DIR)/lib/firmware/CG2900* ; do \ + mv $$f $${f/CG2900/CG29XX}; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/v4l2grab/Config.in b/package/v4l2grab/Config.in new file mode 100644 index 00000000..ec3a7a8c --- /dev/null +++ b/package/v4l2grab/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_V4L2GRAB + bool "v4l2grab" + depends on BR2_TOOLCHAIN_HAS_THREADS # libv4l + depends on BR2_USE_MMU # libv4l + depends on !BR2_STATIC_LIBS # libv4l + depends on BR2_INSTALL_LIBSTDCPP # libv4l + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # libv4l + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBV4L + help + Utility for grabbing JPEGs form V4L2 devices. This tool is + similar to v4l2grab available from libv4l contrib directory, + but provides additional features such as JPEG output. + + http://www.twam.info/software/v4l2grab-grabbing-jpegs-from-v4l2-devices + +comment "v4l2grab needs a toolchain w/ threads, dynamic library, C++ and headers >= 3.0" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/v4l2grab/v4l2grab.hash b/package/v4l2grab/v4l2grab.hash new file mode 100644 index 00000000..eba36b5c --- /dev/null +++ b/package/v4l2grab/v4l2grab.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 9a8d0d1ca5ac9fb9f66e00300bb3265d156cf1cb67eb30f6e6637c83b0b507a1 v4l2grab-f8d8844d52387b3db7b8736f5e86156d9374f781.tar.gz +sha256 7fa0d45fe86fda646fada21ecfa7672e951b01c521aecd358f586facd65fb5b3 LICENSE.md diff --git a/package/v4l2grab/v4l2grab.mk b/package/v4l2grab/v4l2grab.mk new file mode 100644 index 00000000..68efe27f --- /dev/null +++ b/package/v4l2grab/v4l2grab.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# v4l2grab +# +################################################################################ + +V4L2GRAB_VERSION = f8d8844d52387b3db7b8736f5e86156d9374f781 +V4L2GRAB_SITE = $(call github,twam,v4l2grab,$(V4L2GRAB_VERSION)) +V4L2GRAB_LICENSE = GPL-2.0+ +V4L2GRAB_LICENSE_FILES = LICENSE.md +# Fetched from github, no pre-generated configure script provided +V4L2GRAB_AUTORECONF = YES +V4L2GRAB_DEPENDENCIES = jpeg libv4l + +$(eval $(autotools-package)) diff --git a/package/v4l2loopback/Config.in b/package/v4l2loopback/Config.in new file mode 100644 index 00000000..d8ca31e5 --- /dev/null +++ b/package/v4l2loopback/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_V4L2LOOPBACK + bool "v4l2loopback" + depends on BR2_LINUX_KERNEL + help + This module allows you to create "virtual video devices". + Normal (v4l2) applications will read these devices as if + they were ordinary video devices, but the video will not be + read from e.g. a capture card but instead it is generated by + another application. + + https://github.com/umlaeute/v4l2loopback + +if BR2_PACKAGE_V4L2LOOPBACK + +config BR2_PACKAGE_V4L2LOOPBACK_UTILS + bool "utils" + depends on BR2_USE_MMU # bash + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash + select BR2_PACKAGE_BASH # runtime dependency + select BR2_PACKAGE_SUDO # runtime dependency + help + Install applications to interact with v4l2-loopback devices + ("virtual video devices"). Currently there is only a single + command line utility: v4l2loopback-ctl: tool to set + framerate, format and timeout image. + +endif + +comment "v4l2loopback needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/package/v4l2loopback/v4l2loopback.hash b/package/v4l2loopback/v4l2loopback.hash new file mode 100644 index 00000000..f4491e02 --- /dev/null +++ b/package/v4l2loopback/v4l2loopback.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 e152cd6df6a8add172fb74aca3a9188264823efa5a2317fe960d45880b9406ae v4l2loopback-0.12.5.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/v4l2loopback/v4l2loopback.mk b/package/v4l2loopback/v4l2loopback.mk new file mode 100644 index 00000000..7701bc3a --- /dev/null +++ b/package/v4l2loopback/v4l2loopback.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# v4l2loopback +# +################################################################################ + +V4L2LOOPBACK_VERSION = 0.12.5 +V4L2LOOPBACK_SITE = $(call github,umlaeute,v4l2loopback,v$(V4L2LOOPBACK_VERSION)) +V4L2LOOPBACK_LICENSE = GPL-2.0+ +V4L2LOOPBACK_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_V4L2LOOPBACK_UTILS),y) +define V4L2LOOPBACK_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/utils/v4l2loopback-ctl $(TARGET_DIR)/usr/bin/v4l2loopback-ctl +endef +endif + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/vala/0001-dont-add-dirty-to-valac-version.patch b/package/vala/0001-dont-add-dirty-to-valac-version.patch new file mode 100644 index 00000000..a2a06233 --- /dev/null +++ b/package/vala/0001-dont-add-dirty-to-valac-version.patch @@ -0,0 +1,25 @@ +valac: don't append -dirty to version + +Don't append -dirty to the valac version number if the Buildroot Git +tree has uncommited changes. + +The patched script is meant for the valac developers, but it also +activates if you build valac in a subdirectory of a Git tree (e.g. +as is commonly done in Buildroot). + +The effect is that valac gets built as being version x.y.z-dirty, which +breaks programs (such as Midori) that explicitly check for valac-x.y.z. + +Signed-off-by: Simon Dawson +diff -Nur a/build-aux/git-version-gen b/build-aux/git-version-gen +--- a/build-aux/git-version-gen 2010-08-15 12:49:03.000000000 +0100 ++++ b/build-aux/git-version-gen 2012-05-14 10:17:19.977204570 +0100 +@@ -135,7 +135,7 @@ + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; +- *) v="$v-dirty" ;; ++ #*) v="$v-dirty" ;; + esac ;; + esac + diff --git a/package/vala/vala-wrapper b/package/vala/vala-wrapper new file mode 100644 index 00000000..84fc905b --- /dev/null +++ b/package/vala/vala-wrapper @@ -0,0 +1,2 @@ +#!/bin/sh +$0-@VALA_VERSION@ --vapidir=${STAGING_DIR}/usr/share/vala/vapi --girdir=${STAGING_DIR}/usr/share/gir-1.0 "$@" diff --git a/package/vala/vala.hash b/package/vala/vala.hash new file mode 100644 index 00000000..319c7ef2 --- /dev/null +++ b/package/vala/vala.hash @@ -0,0 +1,4 @@ +# From https://download.gnome.org/sources/vala/0.46/vala-0.46.6.sha256sum +sha256 ef31649932872f094971d46453b21c60a41661670f98afa334062425b4aec47a vala-0.46.6.tar.xz +# Locally computed +sha256 5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a COPYING diff --git a/package/vala/vala.mk b/package/vala/vala.mk new file mode 100644 index 00000000..93a304f1 --- /dev/null +++ b/package/vala/vala.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# vala +# +################################################################################ + +VALA_VERSION_MAJOR = 0.46 +VALA_VERSION = $(VALA_VERSION_MAJOR).6 +VALA_SITE = http://download.gnome.org/sources/vala/$(VALA_VERSION_MAJOR) +VALA_SOURCE = vala-$(VALA_VERSION).tar.xz +VALA_LICENSE = LGPL-2.1+ +VALA_LICENSE_FILES = COPYING +VALA_CPE_ID_VENDOR = gnome + +HOST_VALA_DEPENDENCIES = host-bison host-flex host-libglib2 +# Yes, the autoconf script understands ':' as "xsltproc is not +# available". +HOST_VALA_CONF_ENV = ac_cv_path_XSLTPROC=: +HOST_VALA_CONF_OPTS += --disable-valadoc + +# We wrap vala, valac and vapigen to point to the proper gir and vapi data dirs +# Otherwise we'll get host directory data which isn't enough +define HOST_VALA_INSTALL_WRAPPER + $(INSTALL) -D -m 0755 package/vala/vala-wrapper \ + $(HOST_DIR)/bin/vala + $(INSTALL) -D -m 0755 package/vala/vala-wrapper \ + $(HOST_DIR)/bin/valac + $(INSTALL) -D -m 0755 package/vala/vala-wrapper \ + $(HOST_DIR)/bin/vapigen + $(SED) 's,@VALA_VERSION@,$(VALA_VERSION_MAJOR),' \ + $(HOST_DIR)/bin/vala \ + $(HOST_DIR)/bin/valac \ + $(HOST_DIR)/bin/vapigen +endef +HOST_VALA_POST_INSTALL_HOOKS += HOST_VALA_INSTALL_WRAPPER + +$(eval $(host-autotools-package)) diff --git a/package/valgrind/0001-workaround-SIGSEGV-on-PPC.patch b/package/valgrind/0001-workaround-SIGSEGV-on-PPC.patch new file mode 100644 index 00000000..8a6003cb --- /dev/null +++ b/package/valgrind/0001-workaround-SIGSEGV-on-PPC.patch @@ -0,0 +1,32 @@ +From ff29b837f21a69c79289c3a87b03f8c23e05616e Mon Sep 17 00:00:00 2001 +From: Pierre Habouzit +Date: Tue, 10 May 2011 23:11:45 +0200 +Subject: [PATCH] workaround SIGSEGV on PPC. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Pierre Habouzit +Signed-off-by: Jérôme Pouiller +--- + coregrind/m_machine.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c +index 6110c93..298a00e 100644 +--- a/coregrind/m_machine.c ++++ b/coregrind/m_machine.c +@@ -27,6 +27,10 @@ + The GNU General Public License is contained in the file COPYING. + */ + ++#ifdef __powerpc__ ++# pragma GCC optimize ("-O0") ++#endif ++ + #include "pub_core_basics.h" + #include "pub_core_vki.h" + #include "pub_core_threadstate.h" +-- +2.1.4 + diff --git a/package/valgrind/0002-Define-PTRACE_GETSIGINFO-on-PowerPC-when-not-availab.patch b/package/valgrind/0002-Define-PTRACE_GETSIGINFO-on-PowerPC-when-not-availab.patch new file mode 100644 index 00000000..44adfc41 --- /dev/null +++ b/package/valgrind/0002-Define-PTRACE_GETSIGINFO-on-PowerPC-when-not-availab.patch @@ -0,0 +1,37 @@ +From 7311686d6286972ff97cc18b2416a4cdd7fc5c7e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 31 Oct 2015 12:15:24 +0100 +Subject: [PATCH] Define PTRACE_GETSIGINFO on PowerPC when not available + +uClibc 0.9.33.2 does not define PTRACE_GETSIGINFO in PowerPC. Even +though Buildroot has a uClibc patch doing that, it doesn't solve the +case of external uClibc toolchain from other sources (such as +Crosstool-NG). Therefore, this patch modifies Valgrind to define +PTRACE_GETSIGINFO on PowerPC to the right value, when such definition +is not available from the C library. + +Signed-off-by: Thomas Petazzoni +--- + coregrind/vgdb-invoker-ptrace.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/coregrind/vgdb-invoker-ptrace.c b/coregrind/vgdb-invoker-ptrace.c +index d65f59a..bdefac2 100644 +--- a/coregrind/vgdb-invoker-ptrace.c ++++ b/coregrind/vgdb-invoker-ptrace.c +@@ -72,6 +72,12 @@ + # endif + #endif + ++#if defined(__powerpc__) ++# ifndef PTRACE_GETSIGINFO ++# define PTRACE_GETSIGINFO 0x4202 ++# endif ++#endif ++ + // 32-bit or 64-bit wide, depending on primary architecture. + typedef Addr CORE_ADDR; + typedef Addr PTRACE_XFER_TYPE; +-- +2.1.4 + diff --git a/package/valgrind/Config.in b/package/valgrind/Config.in new file mode 100644 index 00000000..56e4af21 --- /dev/null +++ b/package/valgrind/Config.in @@ -0,0 +1,87 @@ +config BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS + bool + default y if BR2_aarch64 + default y if BR2_ARM_CPU_ARMV7A + default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default y if BR2_i386 || BR2_x86_64 + default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + depends on !BR2_MIPS_SOFT_FLOAT + +comment "valgrind needs a toolchain w/ dynamic library" + depends on BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_VALGRIND + bool "valgrind" + depends on BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS + depends on !BR2_STATIC_LIBS + help + Tool for debugging and profiling Linux programs. + + http://valgrind.org/ + +if BR2_PACKAGE_VALGRIND + +config BR2_PACKAGE_VALGRIND_MEMCHECK + bool "Memcheck: a memory error detector" + default y + help + This option allows to install the Memcheck tool + +config BR2_PACKAGE_VALGRIND_CACHEGRIND + bool "Cachegrind: a cache and branch-prediction profiler" + default y + help + This option allows to install the Cachegrind tool + +config BR2_PACKAGE_VALGRIND_CALLGRIND + bool "Callgrind: a call-graph generating cache and branch prediction profiler" + default y + help + This option allows to install the Callgrind tool + +config BR2_PACKAGE_VALGRIND_HELGRIND + bool "Helgrind: a thread error detector" + default y + help + This option allows to install the Helgrind tool + +config BR2_PACKAGE_VALGRIND_DRD + bool "DRD: a thread error detector" + default y + help + This option allows to install the DRD tool + +config BR2_PACKAGE_VALGRIND_MASSIF + bool "Massif: a heap profiler" + default y + help + This option allows to install the Massif tool + +config BR2_PACKAGE_VALGRIND_DHAT + bool "DHAT: a dynamic heap analysis tool" + default y + help + This option allows to install the DHAT tool + +config BR2_PACKAGE_VALGRIND_SGCHECK + bool "SGCheck: an experimental stack and global array overrun detector" + help + This option allows to install the SGCheck tool + +config BR2_PACKAGE_VALGRIND_BBV + bool "BBV: an experimental basic block vector generation tool" + help + This option allows to install the BBV tool + +config BR2_PACKAGE_VALGRIND_LACKEY + bool "Lackey: an example tool" + help + This option allows to install the Lackey tool + +config BR2_PACKAGE_VALGRIND_NULGRIND + bool "Nulgrind: the minimal Valgrind tool" + help + This option allows to install the Nulgrind tool + +endif diff --git a/package/valgrind/uclibc.supp b/package/valgrind/uclibc.supp new file mode 100644 index 00000000..179d27b7 --- /dev/null +++ b/package/valgrind/uclibc.supp @@ -0,0 +1,212 @@ +{ + + Memcheck:Addr1 + fun:_dl_strdup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_malloc + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Cond + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_check_if_named_library_is_loaded + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_check_if_named_library_is_loaded + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_check_hashed_files + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_check_hashed_files + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_load_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_find_hash + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_find_hash + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_fixup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_fixup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_linux_resolve + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_linux_resolver + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_parse_lazy_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr4 + fun:_dl_parse_lazy_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr2 + fun:_dl_parse_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_parse_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc-0.9.27.so + fun:* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc-0.9.27.so + fun:* +} diff --git a/package/valgrind/valgrind.hash b/package/valgrind/valgrind.hash new file mode 100644 index 00000000..2b24ac44 --- /dev/null +++ b/package/valgrind/valgrind.hash @@ -0,0 +1,6 @@ +# From https://valgrind.org/downloads/current.html +md5 d1b153f1ab17cf1f311705e7a83ef589 valgrind-3.16.1.tar.bz2 + +# License files +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 56976e64523fa1e68db4e6f464f5b2cb89d7d08f54b1d012e317b8db286b3faf COPYING.DOCS diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk new file mode 100644 index 00000000..a1b4d97e --- /dev/null +++ b/package/valgrind/valgrind.mk @@ -0,0 +1,160 @@ +################################################################################ +# +# valgrind +# +################################################################################ + +VALGRIND_VERSION = 3.16.1 +VALGRIND_SITE = https://sourceware.org/pub/valgrind +VALGRIND_SOURCE = valgrind-$(VALGRIND_VERSION).tar.bz2 +VALGRIND_LICENSE = GPL-2.0, GFDL-1.2 +VALGRIND_LICENSE_FILES = COPYING COPYING.DOCS +VALGRIND_CPE_ID_VENDOR = valgrind +VALGRIND_CONF_OPTS = \ + --disable-ubsan \ + --without-mpicc +VALGRIND_INSTALL_STAGING = YES + +# Valgrind must be compiled with no stack protection, so forcefully +# pass -fno-stack-protector to override what Buildroot may have in +# TARGET_CFLAGS if BR2_SSP_* support is enabled. +VALGRIND_CFLAGS = \ + $(TARGET_CFLAGS) \ + -fno-stack-protector + +# When Valgrind detects a 32-bit MIPS architecture, it forcibly adds +# -march=mips32 to CFLAGS; when it detects a 64-bit MIPS architecture, +# it forcibly adds -march=mips64. This causes Valgrind to be built +# always for the first ISA revision level (R1), even when the user has +# configured Buildroot for the second ISA revision level (R2). +# +# Override the CFLAGS variable (which Valgrind appends to its CFLAGS) +# and pass the right -march option, so they take precedence over +# Valgrind's wrongfully detected value. +ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) +VALGRIND_CFLAGS += -march="$(GCC_TARGET_ARCH)" +endif + +VALGRIND_CONF_ENV = CFLAGS="$(VALGRIND_CFLAGS)" + +# fix uclibc configure c99 support detection +VALGRIND_CONF_ENV += ac_cv_prog_cc_c99='-std=gnu99' + +# On ARM, Valgrind only supports ARMv7, and uses the arch part of the +# host tuple to determine whether it's being built for ARMv7 or +# not. Therefore, we adjust the host tuple to specify we're on +# ARMv7. The valgrind package is guaranteed, through Config.in, to +# only be selected on ARMv7-A platforms. +ifeq ($(BR2_ARM_CPU_ARMV7A),y) +VALGRIND_CONF_OPTS += \ + --host=$(patsubst arm-%,armv7-%,$(GNU_TARGET_NAME)) +endif + +ifeq ($(BR2_GCC_ENABLE_LTO),y) +VALGRIND_CONF_OPTS += --enable-lto +else +VALGRIND_CONF_OPTS += --disable-lto +endif + +define VALGRIND_INSTALL_UCLIBC_SUPP + $(INSTALL) -D -m 0644 package/valgrind/uclibc.supp $(TARGET_DIR)/usr/lib/valgrind/uclibc.supp +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_INSTALL_UCLIBC_SUPP + +ifeq ($(BR2_PACKAGE_VALGRIND_MEMCHECK),) +define VALGRIND_REMOVE_MEMCHECK + rm -f $(TARGET_DIR)/usr/lib/valgrind/*memcheck* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_MEMCHECK +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_CACHEGRIND),) +define VALGRIND_REMOVE_CACHEGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*cachegrind* + for i in cg_annotate cg_diff cg_merge; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_CACHEGRIND +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_CALLGRIND),) +define VALGRIND_REMOVE_CALLGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*callgrind* + for i in callgrind_annotate callgrind_control ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_CALLGRIND +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_HELGRIND),) +define VALGRIND_REMOVE_HELGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*helgrind* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_HELGRIND +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_DRD),) +define VALGRIND_REMOVE_DRD + rm -f $(TARGET_DIR)/usr/lib/valgrind/*drd* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_DRD +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_MASSIF),) +define VALGRIND_REMOVE_MASSIF + rm -f $(TARGET_DIR)/usr/lib/valgrind/*massif* + rm -f $(TARGET_DIR)/usr/bin/ms_script +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_MASSIF +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_DHAT),) +define VALGRIND_REMOVE_DHAT + rm -f $(TARGET_DIR)/usr/lib/valgrind/*dhat* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_DHAT +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_SGCHECK),) +define VALGRIND_REMOVE_SGCHECK + rm -f $(TARGET_DIR)/usr/lib/valgrind/*sgcheck* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_SGCHECK +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_BBV),) +define VALGRIND_REMOVE_BBV + rm -f $(TARGET_DIR)/usr/lib/valgrind/*bbv* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_BBV +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_LACKEY),) +define VALGRIND_REMOVE_LACKEY + rm -f $(TARGET_DIR)/usr/lib/valgrind/*lackey* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_LACKEY +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_NULGRIND),) +define VALGRIND_REMOVE_NULGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*none* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_NULGRIND +endif + +$(eval $(autotools-package)) diff --git a/package/valijson/Config.in b/package/valijson/Config.in new file mode 100644 index 00000000..10721b37 --- /dev/null +++ b/package/valijson/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_VALIJSON + bool "valijson" + depends on BR2_USE_WCHAR + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_REGEX + help + Valijson is a header-only JSON Schema Validation library for + C++. Valijson provides a simple validation API that allows + you load JSON Schemas, and validate documents loaded by one + of several supported parser libraries like boost, jsoncpp, + rapidjson and picoJSON. + + https://github.com/tristanpenman/valijson + +comment "valijson needs a toolchain w/ C++, threads, wchar support" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/valijson/valijson.hash b/package/valijson/valijson.hash new file mode 100644 index 00000000..e184ccb7 --- /dev/null +++ b/package/valijson/valijson.hash @@ -0,0 +1,3 @@ +# Locally Computed: +sha256 2ac881a36f90810b41b66511502dea1e7886137ad31bcfb4e917d929c5028c35 valijson-0.3.tar.gz +sha256 1a0f99926a2dbec30eba3db820236d9953fbe3048976923ac24980e655fbe991 LICENSE diff --git a/package/valijson/valijson.mk b/package/valijson/valijson.mk new file mode 100644 index 00000000..e425757d --- /dev/null +++ b/package/valijson/valijson.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# valijson +# +################################################################################ + +VALIJSON_VERSION = 0.3 +VALIJSON_SITE = $(call github,tristanpenman,valijson,v$(VALIJSON_VERSION)) +VALIJSON_LICENSE = BSD-2-Clause +VALIJSON_LICENSE_FILES = LICENSE +VALIJSON_CPE_ID_VENDOR = valijson_project +VALIJSON_INSTALL_STAGING = YES +VALIJSON_INSTALL_TARGET = NO +VALIJSON_DEPENDENCIES = boost +VALIJSON_CONF_OPTS = -Dvalijson_INSTALL_HEADERS=TRUE -Dvalijson_BUILD_TESTS=FALSE + +$(eval $(cmake-package)) diff --git a/package/vboot-utils/0001-Add-missing-definition-of-MTD_CHAR_MAJOR.patch b/package/vboot-utils/0001-Add-missing-definition-of-MTD_CHAR_MAJOR.patch new file mode 100644 index 00000000..42410c8d --- /dev/null +++ b/package/vboot-utils/0001-Add-missing-definition-of-MTD_CHAR_MAJOR.patch @@ -0,0 +1,30 @@ +From 1438211660e700b2c9505863aae1cc957236b7c8 Mon Sep 17 00:00:00 2001 +From: Alex Suykov +Date: Thu, 21 Jan 2016 21:59:46 +0100 +Subject: [PATCH] Add missing definition of MTD_CHAR_MAJOR + +This definition missing from for kernels <= 3.13 + +Signed-off-by: Alex Suykov +--- + cgpt/cgpt_wrapper.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/cgpt/cgpt_wrapper.c b/cgpt/cgpt_wrapper.c +index dcfaab9..4d07aad 100644 +--- a/cgpt/cgpt_wrapper.c ++++ b/cgpt/cgpt_wrapper.c +@@ -25,6 +25,10 @@ + #include "cgpt_nor.h" + #include "cryptolib.h" + ++#ifndef MTD_CHAR_MAJOR ++#define MTD_CHAR_MAJOR 90 ++#endif ++ + // Check if cmdline |argv| has "-D". "-D" signifies that GPT structs are stored + // off device, and hence we should not wrap around cgpt. + static bool has_dash_D(int argc, const char *const argv[]) { +-- +2.6.4 + diff --git a/package/vboot-utils/0002-Add-missing-header-include-for-ssize_t.patch b/package/vboot-utils/0002-Add-missing-header-include-for-ssize_t.patch new file mode 100644 index 00000000..4d559eab --- /dev/null +++ b/package/vboot-utils/0002-Add-missing-header-include-for-ssize_t.patch @@ -0,0 +1,27 @@ +From b6bed8d4e9453bc74ba021c8c17e20c3b5964c37 Mon Sep 17 00:00:00 2001 +From: Alex Suykov +Date: Thu, 21 Jan 2016 22:00:34 +0100 +Subject: [PATCH] Add missing header include for ssize_t + +The code uses ssize_t which is usually defined in . + +Signed-off-by: Alex Suykov +--- + host/lib/fmap.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/host/lib/fmap.c b/host/lib/fmap.c +index c95338d..e3db826 100644 +--- a/host/lib/fmap.c ++++ b/host/lib/fmap.c +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + #include "fmap.h" + +-- +2.6.4 + diff --git a/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch new file mode 100644 index 00000000..86374ca8 --- /dev/null +++ b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch @@ -0,0 +1,44 @@ +From 593407d2b3ea3b871d55ec399671e48c84b900a7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 21 Jan 2016 22:01:37 +0100 +Subject: [PATCH] Avoid RSA type redefinition + +The host_key.h headers does: + + typedef struct rsa_st RSA; + +But this type definition is already done by the OpenSSL headers. + +While such a type redefinition is legal with recent gcc versions, it +doesn't build with older gcc versions such as gcc 4.4. + +To work around this problem, we instead use a forward declaration of +"struct rsa_st", and change the only place where the RSA type was used +by "struct rsa_st". + +Signed-off-by: Thomas Petazzoni +--- + host/lib/include/host_key.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/host/lib/include/host_key.h b/host/lib/include/host_key.h +index 9f98ccc..c2d01a5 100644 +--- a/host/lib/include/host_key.h ++++ b/host/lib/include/host_key.h +@@ -12,11 +12,11 @@ + #include "vboot_struct.h" + + +-typedef struct rsa_st RSA; ++struct rsa_st; + + /* Private key data */ + typedef struct VbPrivateKey { +- RSA* rsa_private_key; /* Private key data */ ++ struct rsa_rt* rsa_private_key; /* Private key data */ + uint64_t algorithm; /* Algorithm to use when signing */ + } VbPrivateKey; + +-- +2.6.4 + diff --git a/package/vboot-utils/0004-Disable-static-futility.patch b/package/vboot-utils/0004-Disable-static-futility.patch new file mode 100644 index 00000000..649d3162 --- /dev/null +++ b/package/vboot-utils/0004-Disable-static-futility.patch @@ -0,0 +1,30 @@ +The package attempts to build a statically-linked host binary, futility_s, +which is not used anywhere in buildroot but may be causing build failures +if the build host lacks static libc. + +Signed-off-by: Alex Suykov + +--- a/Makefile ++++ b/Makefile +@@ -1079,7 +1079,7 @@ + # new Firmware Utility + + .PHONY: futil +-futil: ${FUTIL_STATIC_BIN} ${FUTIL_BIN} ++futil: ${FUTIL_BIN} + + ${FUTIL_STATIC_BIN}: ${FUTIL_STATIC_OBJS} ${UTILLIB} + @${PRINTF} " LD $(subst ${BUILD}/,,$@)\n" +@@ -1091,10 +1091,10 @@ + ${Q}${LD} -o $@ ${CFLAGS} ${LDFLAGS} $^ ${LDLIBS} + + .PHONY: futil_install +-futil_install: ${FUTIL_BIN} ${FUTIL_STATIC_BIN} ++futil_install: ${FUTIL_BIN} + @${PRINTF} " INSTALL futility\n" + ${Q}mkdir -p ${UB_DIR} +- ${Q}${INSTALL} -t ${UB_DIR} ${FUTIL_BIN} ${FUTIL_STATIC_BIN} ++ ${Q}${INSTALL} -t ${UB_DIR} ${FUTIL_BIN} + ${Q}for prog in ${FUTIL_SYMLINKS}; do \ + ln -sf futility "${UB_DIR}/$$prog"; done + diff --git a/package/vboot-utils/0005-include-sys-sysmacros.h-for-major.patch b/package/vboot-utils/0005-include-sys-sysmacros.h-for-major.patch new file mode 100644 index 00000000..5d76428e --- /dev/null +++ b/package/vboot-utils/0005-include-sys-sysmacros.h-for-major.patch @@ -0,0 +1,51 @@ +From 435fbcee218b37a87368e2b22fa33366875d458c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Tue, 19 Apr 2016 13:58:49 -0400 +Subject: [PATCH] include sys/sysmacros.h for major() + +The major() func is defined in the sys/sysmacros.h header, so include it +explicitly for the prototype. Upstream C libs are moving away from having +sys/types.h include it all the time implicitly. + +BUG=None +TEST=precq passes +BRANCH=None + +Change-Id: I56b84138f08ded2376193403f9c9db22c5f24f71 +Reviewed-on: https://chromium-review.googlesource.com/339680 +Commit-Ready: Mike Frysinger +Tested-by: Mike Frysinger +Reviewed-by: Bill Richardson +Signed-off-by: Giulio Benetti +--- + cgpt/cgpt_wrapper.c | 1 + + futility/dump_kernel_config_lib.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/cgpt/cgpt_wrapper.c b/cgpt/cgpt_wrapper.c +index dcfaab9c..1716cdde 100644 +--- a/cgpt/cgpt_wrapper.c ++++ b/cgpt/cgpt_wrapper.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/futility/dump_kernel_config_lib.c b/futility/dump_kernel_config_lib.c +index 4fe990c3..abf37ae1 100644 +--- a/futility/dump_kernel_config_lib.c ++++ b/futility/dump_kernel_config_lib.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +2.17.1 + diff --git a/package/vboot-utils/0006-Update-for-openssl-1.1.patch b/package/vboot-utils/0006-Update-for-openssl-1.1.patch new file mode 100644 index 00000000..77e71e58 --- /dev/null +++ b/package/vboot-utils/0006-Update-for-openssl-1.1.patch @@ -0,0 +1,268 @@ +From 2e730b2259c701f16d473dbfb7e58e86a6e71b01 Mon Sep 17 00:00:00 2001 +From: Daniel Kurtz +Date: Fri, 18 Jan 2019 13:04:59 +0200 +Subject: [PATCH] Update for openssl 1.1 + +OpenSSL 1.1 has made significant non-backwards compatible changes to its +API as outlined in: +https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes + +BRANCH=none +BUG=chromium:738114 +TEST=cros_workon --host start vboot_reference +TEST=w/ openssl-1.0.2k: sudo emerge vboot_reference +TEST=w/ openssl-1.1.0e: sudo emerge vboot_reference + => both build ok + $ futility version + => command runs without error +TEST=cros_workon --board=soraka start vboot_reference coreboot +TEST=w/ openssl-1.0.2k: emerge-soraka vboot_reference coreboot +TEST=w/ openssl-1.1.0e: emerge-soraka vboot_reference coreboot + => All build ok + +Change-Id: I37cfc8cbb04a092eab7b0b3224f475b82609447c +Reviewed-on: https://chromium-review.googlesource.com/557739 +Commit-Ready: Daniel Kurtz +Tested-by: Daniel Kurtz +Reviewed-by: Randall Spangler +Reviewed-by: Mike Frysinger + +(cherry-picked from bce7904376beee2912932433a4634c1c25afe2f5) +Signed-off-by: Vadim Kochan +--- + futility/cmd_create.c | 5 ++++- + futility/vb2_helper.c | 7 +++++-- + host/include/openssl_compat.h | 26 ++++++++++++++++++++++++++ + host/lib/util_misc.c | 7 +++++-- + host/lib21/host_key.c | 8 +++++++- + utility/dumpRSAPublicKey.c | 19 ++++++++++++++----- + 6 files changed, 61 insertions(+), 11 deletions(-) + create mode 100644 host/include/openssl_compat.h + +diff --git a/futility/cmd_create.c b/futility/cmd_create.c +index 143ea9ae..80d3fd90 100644 +--- a/futility/cmd_create.c ++++ b/futility/cmd_create.c +@@ -13,6 +13,7 @@ + #include "2common.h" + #include "2id.h" + #include "2rsa.h" ++#include "openssl_compat.h" + #include "util_misc.h" + #include "vb2_common.h" + #include "vb2_struct.h" +@@ -170,6 +171,7 @@ static int vb2_make_keypair() + enum vb2_signature_algorithm sig_alg; + uint8_t *pubkey_buf = 0; + int has_priv = 0; ++ const BIGNUM *rsa_d; + + FILE *fp; + int ret = 1; +@@ -193,7 +195,8 @@ static int vb2_make_keypair() + goto done; + } + /* Public keys doesn't have the private exponent */ +- has_priv = !!rsa_key->d; ++ RSA_get0_key(rsa_key, NULL, NULL, &rsa_d); ++ has_priv = !!rsa_d; + if (!has_priv) + fprintf(stderr, "%s has a public key only.\n", infile); + +diff --git a/futility/vb2_helper.c b/futility/vb2_helper.c +index 51a78375..c6cc0fdd 100644 +--- a/futility/vb2_helper.c ++++ b/futility/vb2_helper.c +@@ -11,6 +11,7 @@ + #include "2common.h" + #include "2id.h" + #include "2rsa.h" ++#include "openssl_compat.h" + #include "util_misc.h" + #include "vb2_common.h" + #include "vb2_struct.h" +@@ -216,6 +217,7 @@ int ft_show_pem(const char *name, uint8_t *buf, uint32_t len, void *data) + uint8_t *keyb, *digest; + uint32_t keyb_len; + int i, bits; ++ const BIGNUM *rsa_key_n, *rsa_key_d; + + /* We're called only after ft_recognize_pem, so this should work. */ + rsa_key = rsa_from_buffer(buf, len); +@@ -223,10 +225,11 @@ int ft_show_pem(const char *name, uint8_t *buf, uint32_t len, void *data) + DIE; + + /* Use to presence of the private exponent to decide if it's public */ +- printf("%s Key file: %s\n", rsa_key->d ? "Private" : "Public", ++ RSA_get0_key(rsa_key, &rsa_key_n, NULL, &rsa_key_d); ++ printf("%s Key file: %s\n", rsa_key_d ? "Private" : "Public", + name); + +- bits = BN_num_bits(rsa_key->n); ++ bits = BN_num_bits(rsa_key_n); + printf(" Key length: %d\n", bits); + + if (vb_keyb_from_rsa(rsa_key, &keyb, &keyb_len)) { +diff --git a/host/include/openssl_compat.h b/host/include/openssl_compat.h +new file mode 100644 +index 00000000..7771f32a +--- /dev/null ++++ b/host/include/openssl_compat.h +@@ -0,0 +1,26 @@ ++/* Copyright 2017 The Chromium OS Authors. All rights reserved. ++ * Use of this source code is governed by a BSD-style license that can be ++ * found in the LICENSE file. ++ */ ++ ++#ifndef VBOOT_REFERENCE_OPENSSL_COMPAT_H_ ++#define VBOOT_REFERENCE_OPENSSL_COMPAT_H_ ++ ++#include ++ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ ++static inline void RSA_get0_key(const RSA *rsa, const BIGNUM **n, ++ const BIGNUM **e, const BIGNUM **d) ++{ ++ if (n != NULL) ++ *n = rsa->n; ++ if (e != NULL) ++ *e = rsa->e; ++ if (d != NULL) ++ *d = rsa->d; ++} ++ ++#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++ ++#endif /* VBOOT_REFERENCE_OPENSSL_COMPAT_H_ */ +diff --git a/host/lib/util_misc.c b/host/lib/util_misc.c +index 03ec683f..f0a1f7ad 100644 +--- a/host/lib/util_misc.c ++++ b/host/lib/util_misc.c +@@ -15,6 +15,7 @@ + + #include "cryptolib.h" + #include "host_common.h" ++#include "openssl_compat.h" + #include "util_misc.h" + #include "vboot_common.h" + +@@ -58,6 +59,7 @@ int vb_keyb_from_rsa(struct rsa_st *rsa_private_key, + BIGNUM *N0inv = NULL, *R = NULL, *RR = NULL; + BIGNUM *RRTemp = NULL, *NnumBits = NULL; + BIGNUM *n = NULL, *rr = NULL; ++ const BIGNUM *rsa_private_key_n; + BN_CTX *bn_ctx = BN_CTX_new(); + uint32_t n0invout; + uint32_t bufsize; +@@ -65,7 +67,7 @@ int vb_keyb_from_rsa(struct rsa_st *rsa_private_key, + int retval = 1; + + /* Size of RSA key in 32-bit words */ +- nwords = BN_num_bits(rsa_private_key->n) / 32; ++ nwords = RSA_size(rsa_private_key) / 4; + + bufsize = (2 + nwords + nwords) * sizeof(uint32_t); + outbuf = malloc(bufsize); +@@ -94,7 +96,8 @@ int vb_keyb_from_rsa(struct rsa_st *rsa_private_key, + NEW_BIGNUM(B); + #undef NEW_BIGNUM + +- BN_copy(N, rsa_private_key->n); ++ RSA_get0_key(rsa_private_key, &rsa_private_key_n, NULL, NULL); ++ BN_copy(N, rsa_private_key_n); + BN_set_word(Big1, 1L); + BN_set_word(Big2, 2L); + BN_set_word(Big32, 32L); +diff --git a/host/lib21/host_key.c b/host/lib21/host_key.c +index f7ea1622..f9419ad3 100644 +--- a/host/lib21/host_key.c ++++ b/host/lib21/host_key.c +@@ -17,6 +17,7 @@ + #include "host_common.h" + #include "host_key2.h" + #include "host_misc.h" ++#include "openssl_compat.h" + + struct vb2_text_vs_enum vb2_text_vs_algorithm[] = { + {"RSA1024 SHA1", VB2_ALG_RSA1024_SHA1}, +@@ -544,7 +545,12 @@ int vb2_public_key_hash(struct vb2_public_key *key, + + enum vb2_signature_algorithm vb2_rsa_sig_alg(struct rsa_st *rsa) + { +- int bits = BN_num_bits(rsa->n); ++ const BIGNUM *e, *n; ++ int exp, bits; ++ ++ RSA_get0_key(rsa, &n, &e, NULL); ++ exp = BN_get_word(e); ++ bits = BN_num_bits(n); + + switch (bits) { + case 1024: +diff --git a/utility/dumpRSAPublicKey.c b/utility/dumpRSAPublicKey.c +index b3b7b96b..a17b159e 100644 +--- a/utility/dumpRSAPublicKey.c ++++ b/utility/dumpRSAPublicKey.c +@@ -14,14 +14,20 @@ + #include + #include + ++#include "openssl_compat.h" ++ + /* Command line tool to extract RSA public keys from X.509 certificates + * and output a pre-processed version of keys for use by RSA verification + * routines. + */ + + int check(RSA* key) { +- int public_exponent = BN_get_word(key->e); +- int modulus = BN_num_bits(key->n); ++ const BIGNUM *n, *e; ++ int public_exponent, modulus; ++ ++ RSA_get0_key(key, &n, &e, NULL); ++ public_exponent = BN_get_word(e); ++ modulus = BN_num_bits(n); + + if (public_exponent != 65537) { + fprintf(stderr, "WARNING: Public exponent should be 65537 (but is %d).\n", +@@ -40,7 +46,8 @@ int check(RSA* key) { + */ + void output(RSA* key) { + int i, nwords; +- BIGNUM *N = key->n; ++ const BIGNUM *key_n; ++ BIGNUM *N = NULL; + BIGNUM *Big1 = NULL, *Big2 = NULL, *Big32 = NULL, *BigMinus1 = NULL; + BIGNUM *B = NULL; + BIGNUM *N0inv= NULL, *R = NULL, *RR = NULL, *RRTemp = NULL, *NnumBits = NULL; +@@ -48,14 +55,15 @@ void output(RSA* key) { + BN_CTX *bn_ctx = BN_CTX_new(); + uint32_t n0invout; + +- N = key->n; + /* Output size of RSA key in 32-bit words */ +- nwords = BN_num_bits(N) / 32; ++ nwords = RSA_size(key) / 4; + if (-1 == write(1, &nwords, sizeof(nwords))) + goto failure; + + + /* Initialize BIGNUMs */ ++ RSA_get0_key(key, &key_n, NULL, NULL); ++ N = BN_dup(key_n); + Big1 = BN_new(); + Big2 = BN_new(); + Big32 = BN_new(); +@@ -120,6 +128,7 @@ void output(RSA* key) { + + failure: + /* Free BIGNUMs. */ ++ BN_free(N); + BN_free(Big1); + BN_free(Big2); + BN_free(Big32); +-- +2.14.1 + diff --git a/package/vboot-utils/0007-Make-vboot_version-extern-in-header.patch b/package/vboot-utils/0007-Make-vboot_version-extern-in-header.patch new file mode 100644 index 00000000..6a3929f3 --- /dev/null +++ b/package/vboot-utils/0007-Make-vboot_version-extern-in-header.patch @@ -0,0 +1,50 @@ +From df4d2000a22db673a788b8e57e8e7c0cc3cee777 Mon Sep 17 00:00:00 2001 +From: Leonard Chan +Date: Thu, 3 Oct 2019 18:53:04 -0700 +Subject: [PATCH] Make vboot_version extern in header + +When enabling `-fno-common` in Fuchsia, we get a bunch of linker errors +when linking futility: + +``` +ld.lld: error: duplicate symbol: vboot_version +>>> defined at futility.h:43 (../../third_party/vboot_reference/futility/futility.h:43) +>>> host_x63-asan_no_detect_leaks/obj/third_party/vboot_reference/futility/futility.cmd_bdb.c.o:(vboot_version) +>>> defined at futility.h:43 (../../third_party/vboot_reference/futility/futility.h:43) +>>> host_x64-asan_no_detect_leaks/obj/third_party/vboot_reference/futility/futility.cmd_create.c.o:(.bss.vboot_version+0x0) +``` + +and think this is because -fno-common places vboot_version for +unitialized global variables in the BSS section of each object file. +Making it extern instead resolves each reference to its definition in +futility/misc.c. + +Change-Id: I591f07abd1f975a8a9d078bb4366e2e0861390b4 +Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1839207 +Reviewed-by: Julius Werner +Reviewed-by: Joel Kitching +Commit-Queue: Julius Werner +Tested-by: Julius Werner + +Patch taken from upstream: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/df4d2000a22db673a788b8e57e8e7c0cc3cee777 +Signed-off-by: Heiko Thiery +--- + futility/futility.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/futility/futility.h b/futility/futility.h +index 3bce1106..5dc426dd 100644 +--- a/futility/futility.h ++++ b/futility/futility.h +@@ -41,7 +41,7 @@ enum vboot_version { + }; + + /* What's our preferred API & data format? */ +-enum vboot_version vboot_version; ++extern enum vboot_version vboot_version; + + /* Here's a structure to define the commands that futility implements. */ + struct futil_cmd_t { +-- +2.20.1 + diff --git a/package/vboot-utils/Config.in.host b/package/vboot-utils/Config.in.host new file mode 100644 index 00000000..aa0caef2 --- /dev/null +++ b/package/vboot-utils/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_VBOOT_UTILS + bool "host vboot utils" + select BR2_PACKAGE_HOST_UTIL_LINUX + help + Chromium OS verified boot utilities: futility and cgpt. + + https://www.chromium.org/chromium-os/chromiumos-design-docs/verified-boot diff --git a/package/vboot-utils/vboot-utils.hash b/package/vboot-utils/vboot-utils.hash new file mode 100644 index 00000000..efef776c --- /dev/null +++ b/package/vboot-utils/vboot-utils.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 9cdeaa2e4e1190c0cd200e1b07d394e5d24f57cc0efffdce861d5de934035bf7 vboot-utils-bbdd62f9b030db7ad8eef789aaf58a7ff9a25656-br1.tar.gz +sha256 cb9dc8e96aedf9120b6757a60387db10f3c1a8e3fd97bb9d0f11327be5a7ed4d LICENSE diff --git a/package/vboot-utils/vboot-utils.mk b/package/vboot-utils/vboot-utils.mk new file mode 100644 index 00000000..3f63f458 --- /dev/null +++ b/package/vboot-utils/vboot-utils.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# vboot-utils +# +################################################################################ + +VBOOT_UTILS_VERSION = bbdd62f9b030db7ad8eef789aaf58a7ff9a25656 +VBOOT_UTILS_SITE = https://chromium.googlesource.com/chromiumos/platform/vboot_reference +VBOOT_UTILS_SITE_METHOD = git +VBOOT_UTILS_LICENSE = BSD-3-Clause +VBOOT_UTILS_LICENSE_FILES = LICENSE + +HOST_VBOOT_UTILS_DEPENDENCIES = host-openssl host-util-linux host-pkgconf + +# vboot_reference contains code that goes into bootloaders, +# utilities intended for the target system, and a bunch of scripts +# for Chromium OS build system. Most of that does not make sense +# in a buildroot host-package. +# +# We only need futility for signing images, the keys, and cgpt for boot +# media partitioning. +# +# make target for futility is "futil". +# +# The value of ARCH is only relevant for crossystem (a target tool) and +# does not affect futil or cgpt in any way as long as it is one of the +# supported targets. + +define HOST_VBOOT_UTILS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) \ + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS) -D_LARGEFILE64_SOURCE -D_GNU_SOURCE" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + ARCH=arm \ + futil cgpt +endef + +define HOST_VBOOT_UTILS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) \ + futil_install cgpt_install devkeys_install +endef + +$(eval $(host-generic-package)) diff --git a/package/vde2/0001-no-cxx.patch b/package/vde2/0001-no-cxx.patch new file mode 100644 index 00000000..67cefa2b --- /dev/null +++ b/package/vde2/0001-no-cxx.patch @@ -0,0 +1,22 @@ +configure: do not test for CXX, it's not needed + +There is no C++ source file, so no reason to require a C++ compiler. + +Reported-by: Peter Korsgaard +Signed-off-by: "Yann E. MORIN" + +--- +Patch sent upstream +( not yet in archives, awaits moderator approval... :-/ ) + +diff -durN vde2-2.3.2.orig/configure.ac vde2-2.3.2/configure.ac +--- vde2-2.3.2.orig/configure.ac 2011-11-23 17:41:19.000000000 +0100 ++++ vde2-2.3.2/configure.ac 2012-12-14 21:56:47.146319686 +0100 +@@ -11,7 +11,6 @@ + AC_CONFIG_LIBOBJ_DIR(src/common) + + # Checks for programs. +-AC_PROG_CXX + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_LN_S diff --git a/package/vde2/0002-fstp-Add-static-to-inline-functions.patch b/package/vde2/0002-fstp-Add-static-to-inline-functions.patch new file mode 100644 index 00000000..0dbe083d --- /dev/null +++ b/package/vde2/0002-fstp-Add-static-to-inline-functions.patch @@ -0,0 +1,44 @@ +From 67bc8443ac7e8144a78d84dee30a5cac3b5c99a4 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 27 Aug 2017 23:56:05 +0200 +Subject: [PATCH] fstp: Add static to inline functions + +From [1] +"This is needed to avoid a link error where the inline functions appear +missing at link time. +From c99 standard inline function should either be declared static or +have an extern instance in a c file for linking. +This fix is necessary to build with gcc 7; for some reason it was not +trigerred before." + +[1] https://git.buildroot.net/buildroot/commit/?id=21133ada326c87627f7bdee4493d8086587c3cca + +Signed-off-by: Romain Naour +--- + src/vde_switch/fstp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/vde_switch/fstp.c b/src/vde_switch/fstp.c +index aab7324..b1e7ee8 100644 +--- a/src/vde_switch/fstp.c ++++ b/src/vde_switch/fstp.c +@@ -30,14 +30,14 @@ static int numports; + #ifdef FSTP + #include + /*********************** sending macro used by FSTP & Core ******************/ +-void inline ltonstring(unsigned long l,unsigned char *s) { ++static void inline ltonstring(unsigned long l,unsigned char *s) { + s[3]=l; l>>=8; + s[2]=l; l>>=8; + s[1]=l; l>>=8; + s[0]=l; + } + +-unsigned long inline nstringtol(unsigned char *s) { ++static unsigned long inline nstringtol(unsigned char *s) { + return (s[0]<<24)+(s[1]<<16)+(s[2]<<8)+s[3]; + } + +-- +2.9.5 + diff --git a/package/vde2/Config.in b/package/vde2/Config.in new file mode 100644 index 00000000..f640a4ae --- /dev/null +++ b/package/vde2/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_VDE2 + bool "vde2" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # dlopen() + help + VDE is an ethernet compliant virtual network that can be + spawned over a set of physical computers over the Internet. + VDE is part of the virtualsquare project. + + http://vde.sourceforge.net/ + +comment "vde2 needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/vde2/vde2.hash b/package/vde2/vde2.hash new file mode 100644 index 00000000..a9e1ea22 --- /dev/null +++ b/package/vde2/vde2.hash @@ -0,0 +1,5 @@ +# Locally computed: +sha256 cbea9b7e03097f87a6b5e98b07890d2275848f1fe4b9fcda77b8994148bc9542 vde2-2.3.2.tar.bz2 +sha256 fb295d0c24b8ef4b39017ac68e772e8e6e839612ce10da12b9f48d1e8e512e2e COPYING +sha256 5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a COPYING.libvdeplug +sha256 d5ac74315b2d2f9c53f5839e311484f4646a9401b68d02d36f3dab386352e74d COPYING.slirpvde diff --git a/package/vde2/vde2.mk b/package/vde2/vde2.mk new file mode 100644 index 00000000..76d6f352 --- /dev/null +++ b/package/vde2/vde2.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# vde2 +# +################################################################################ + +VDE2_VERSION = 2.3.2 +VDE2_SOURCE = vde2-$(VDE2_VERSION).tar.bz2 +VDE2_SITE = http://downloads.sourceforge.net/project/vde/vde2/$(VDE2_VERSION) +VDE2_LICENSE = GPL-2.0+, LGPL-2.1+, BSD-3-Clause +VDE2_LICENSE_FILES = COPYING COPYING.libvdeplug COPYING.slirpvde +VDE2_CPE_ID_VENDOR = vde_project +VDE2_CPE_ID_PRODUCT = vde +VDE2_INSTALL_STAGING = YES + +# We touch configure.ac, so we need to autoreconf +VDE2_AUTORECONF = YES + +# Reasons for enabling/disabling stuff: +# - tuntap is enabled in the hope we're using a recent-enough toolchain +# that does have if_tun.h (virtually everything these days) +# - kvde_switch is disabled because it requires a patched kernel +# - cryptcab is disabled to not depend on openSSL +# - python is disabled to not depend on Python +# - pcap is disabled to not depend on libpcap +# - profiling is disabled because we do not want to debug/profile +# +# Note: disabled features can be added with corresponding dependencies +# in future commits. +VDE2_CONF_OPTS = \ + --disable-cryptcab \ + --disable-experimental \ + --disable-kernel-switch \ + --disable-pcap \ + --disable-profile \ + --disable-python \ + --enable-tuntap + +# Package does not build in parallel due to improper make rules +VDE2_MAKE = $(MAKE1) + +HOST_VDE2_CONF_OPTS = \ + --disable-cryptcab \ + --disable-experimental \ + --disable-kernel-switch \ + --disable-pcap \ + --disable-profile \ + --disable-python \ + --enable-tuntap + +HOST_VDE2_MAKE = $(MAKE1) + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/vdr-plugin-vnsiserver/Config.in b/package/vdr-plugin-vnsiserver/Config.in new file mode 100644 index 00000000..0a0ab8d3 --- /dev/null +++ b/package/vdr-plugin-vnsiserver/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_VDR_PLUGIN_VNSISERVER + bool "vdr-plugin-vnsiserver" + depends on BR2_PACKAGE_VDR + help + VDR plugin to handle KODI clients. + The vdr-plugin-vnsiserver is able to handle serveral KODI + clients connecting via the VNSI addon. + + https://github.com/FernetMenta/vdr-plugin-vnsiserver diff --git a/package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.hash b/package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.hash new file mode 100644 index 00000000..21c62fae --- /dev/null +++ b/package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 d5989461541a91fe4de4ca9c396d4e7b2f4a8663fc9d6155d0830d2b143fce4d vdr-plugin-vnsiserver-1.8.0.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.mk b/package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.mk new file mode 100644 index 00000000..9b49736d --- /dev/null +++ b/package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# vdr-plugin-vnsiserver +# +################################################################################ + +VDR_PLUGIN_VNSISERVER_VERSION = 1.8.0 +VDR_PLUGIN_VNSISERVER_SITE = $(call github,FernetMenta,vdr-plugin-vnsiserver,v$(VDR_PLUGIN_VNSISERVER_VERSION)) +VDR_PLUGIN_VNSISERVER_LICENSE = GPL-2.0+ +VDR_PLUGIN_VNSISERVER_LICENSE_FILES = COPYING +VDR_PLUGIN_VNSISERVER_DEPENDENCIES = vdr + +VDR_PLUGIN_VNSISERVER_CXXFLAGS = CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11 -fPIC" + +VDR_PLUGIN_VNSISERVER_INSTALL_TARGETS = install-lib +ifeq ($(BR2_SYSTEM_ENABLE_NLS),y) +VDR_PLUGIN_VNSISERVER_INSTALL_TARGETS += install-i18n +endif + +define VDR_PLUGIN_VNSISERVER_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + $(VDR_PLUGIN_VNSISERVER_CXXFLAGS) +endef + +define VDR_PLUGIN_VNSISERVER_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + $(VDR_PLUGIN_VNSISERVER_INSTALL_TARGETS) DESTDIR=$(TARGET_DIR) \ + LIBDIR=/usr/lib/vdr LOCDIR=/usr/share/locale +endef + +$(eval $(generic-package)) diff --git a/package/vdr/Config.in b/package/vdr/Config.in new file mode 100644 index 00000000..df602f26 --- /dev/null +++ b/package/vdr/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_VDR + bool "vdr" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + This project describes how to build your own digital + satellite receiver and Video Disk Recorder. + + http://www.tvdr.de + +comment "vdr needs a glibc toolchain w/ C++, dynamic library, NPTL, wchar, headers >= 3.9" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + !BR2_TOOLCHAIN_USES_GLIBC || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 diff --git a/package/vdr/vdr.hash b/package/vdr/vdr.hash new file mode 100644 index 00000000..3d0dc443 --- /dev/null +++ b/package/vdr/vdr.hash @@ -0,0 +1,5 @@ +# From https://www.linuxtv.org/pipermail/vdr/2020-December/029578.html +md5 aa91614159ae2db45655d35918e2c24e vdr-2.4.6.tar.bz2 +# Locally computed +sha256 c8993babf2a878a0fba84558de1e35f042c3c66f7c1ec569eea00a3af1014e4b vdr-2.4.6.tar.bz2 +sha256 ddb9db7630752f8fdc6898f7c99a99eaeeac5213627ecb093df9c82f56175dc7 COPYING diff --git a/package/vdr/vdr.mk b/package/vdr/vdr.mk new file mode 100644 index 00000000..eac13bff --- /dev/null +++ b/package/vdr/vdr.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# vdr +# +################################################################################ + +VDR_VERSION = 2.4.6 +VDR_SOURCE = vdr-$(VDR_VERSION).tar.bz2 +VDR_SITE = ftp://ftp.tvdr.de/vdr +VDR_LICENSE = GPL-2.0+ +VDR_LICENSE_FILES = COPYING +VDR_CPE_ID_VENDOR = tvdr +VDR_INSTALL_STAGING = YES +VDR_DEPENDENCIES = \ + host-pkgconf \ + freetype \ + fontconfig \ + jpeg \ + libcap \ + $(TARGET_NLS_DEPENDENCIES) + +VDR_MAKE_FLAGS = \ + NO_KBD=yes \ + PKG_CONFIG=$(PKG_CONFIG_HOST_BINARY) \ + PLUGINLIBDIR=/usr/lib/vdr \ + PREFIX=/usr \ + VIDEODIR=/var/lib/vdr +VDR_LDFLAGS = $(TARGET_NLS_LIBS) + +ifeq ($(BR2_PACKAGE_LIBFRIBIDI),y) +VDR_DEPENDENCIES += libfribidi +VDR_MAKE_FLAGS += BIDI=1 +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +VDR_DEPENDENCIES += libiconv +VDR_LDFLAGS += -liconv +endif + +VDR_MAKE_ENV = \ + LDFLAGS="$(VDR_LDFLAGS)" \ + $(VDR_MAKE_FLAGS) + +define VDR_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(VDR_MAKE_ENV) \ + vdr vdr.pc include-dir +endef + +define VDR_INSTALL_STAGING_CMDS + $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(VDR_MAKE_ENV) \ + DESTDIR=$(STAGING_DIR) \ + install-dirs install-bin install-conf install-includes \ + install-pc +endef + +define VDR_INSTALL_TARGET_CMDS + $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(VDR_MAKE_ENV) \ + DESTDIR=$(TARGET_DIR) \ + install-dirs install-bin install-conf +endef + +$(eval $(generic-package)) diff --git a/package/vim/Config.in b/package/vim/Config.in new file mode 100644 index 00000000..1469be8d --- /dev/null +++ b/package/vim/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_VIM + bool "vim" + depends on BR2_USE_MMU # uses fork() + depends on BR2_USE_WCHAR + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_NCURSES + help + VIM Text editor + + http://www.vim.org/ + +if BR2_PACKAGE_VIM + +config BR2_PACKAGE_VIM_RUNTIME + bool "install runtime" + default y + help + Install VIM runtime (syntax highlighing + macros). + This option adds about 11MB of data to /usr/share/ + +endif + +comment "vim needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + depends on BR2_USE_MMU + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS diff --git a/package/vim/vim.hash b/package/vim/vim.hash new file mode 100644 index 00000000..eb5928e9 --- /dev/null +++ b/package/vim/vim.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 8a72323817210daf40abe545bdf7637591b9b541a0fb3560baed76e436132dba vim-8.2.0000.tar.gz +sha256 accdbd6761e7dd7e580545fe30f3a5a7707d50073aec4b8afef85c30fc9c031b README.txt diff --git a/package/vim/vim.mk b/package/vim/vim.mk new file mode 100644 index 00000000..36cb5933 --- /dev/null +++ b/package/vim/vim.mk @@ -0,0 +1,93 @@ +################################################################################ +# +# vim +# +################################################################################ + +VIM_VERSION = 8.2.0000 +VIM_SITE = $(call github,vim,vim,v$(VIM_VERSION)) +VIM_DEPENDENCIES = ncurses $(TARGET_NLS_DEPENDENCIES) +VIM_SUBDIR = src +VIM_CONF_ENV = \ + vim_cv_toupper_broken=no \ + vim_cv_terminfo=yes \ + vim_cv_tgetent=zero \ + vim_cv_tty_group=world \ + vim_cv_tty_mode=0620 \ + vim_cv_getcwd_broken=no \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_memmove_handles_overlap=yes \ + ac_cv_sizeof_int=4 \ + ac_cv_small_wchar_t=no +# GUI/X11 headers leak from the host so forcibly disable them +VIM_CONF_OPTS = --with-tlib=ncurses --enable-gui=no --without-x +VIM_LICENSE = Charityware +VIM_LICENSE_FILES = README.txt +VIM_CPE_ID_VENDOR = vim + +ifeq ($(BR2_PACKAGE_ACL),y) +VIM_CONF_OPTS += --enable-acl +VIM_DEPENDENCIES += acl +else +VIM_CONF_OPTS += --disable-acl +endif + +ifeq ($(BR2_PACKAGE_GPM),y) +VIM_CONF_OPTS += --enable-gpm +VIM_DEPENDENCIES += gpm +else +VIM_CONF_OPTS += --disable-gpm +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +VIM_CONF_OPTS += --enable-selinux +VIM_DEPENDENCIES += libselinux +else +VIM_CONF_OPTS += --disable-selinux +endif + +define VIM_INSTALL_TARGET_CMDS + cd $(@D)/src; \ + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installvimbin; \ + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installtools; \ + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installlinks +endef + +define VIM_INSTALL_RUNTIME_CMDS + cd $(@D)/src; \ + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installrtbase; \ + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installmacros +endef + +define VIM_REMOVE_DOCS + $(RM) -rf $(TARGET_DIR)/usr/share/vim/vim*/doc/ +endef + +# Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation +ifeq ($(BR2_ROOTFS_MERGED_USR),y) +define VIM_INSTALL_VI_SYMLINK + ln -sf vim $(TARGET_DIR)/usr/bin/vi +endef +else +define VIM_INSTALL_VI_SYMLINK + ln -sf ../usr/bin/vim $(TARGET_DIR)/bin/vi +endef +endif +VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK + +ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y) +VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_RUNTIME_CMDS +VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS +endif + +HOST_VIM_DEPENDENCIES = host-ncurses +HOST_VIM_CONF_OPTS = \ + --with-tlib=ncurses \ + --enable-gui=no \ + --without-x \ + --disable-acl \ + --disable-gpm \ + --disable-selinux + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/vlc/0001-Disable-building-of-statically-linked-vlc-binary.patch b/package/vlc/0001-Disable-building-of-statically-linked-vlc-binary.patch new file mode 100644 index 00000000..784ffa35 --- /dev/null +++ b/package/vlc/0001-Disable-building-of-statically-linked-vlc-binary.patch @@ -0,0 +1,40 @@ +From 7c2b3343a30ee53a1cded2ca5e712d8cd7d50f5f Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Tue, 1 May 2018 22:27:21 +0200 +Subject: [PATCH] Disable building of statically linked vlc binary + +Signed-off-by: Bernd Kuhls +--- + Makefile.am | 2 +- + bin/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 3ac82623ad..637504a3f5 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -108,7 +108,7 @@ libvlc: libvlccore + cd lib && $(MAKE) $(AM_MAKEFLAGS) libvlc.la + + core: libvlc vlc$(EXEEXT) +- cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) vlc-static$(EXEEXT) ++ cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) + + doc: + cd doc && $(MAKE) $(AM_MAKEFLAGS) doc +diff --git a/bin/Makefile.am b/bin/Makefile.am +index 2877e8b0ea..bef4160e8b 100644 +--- a/bin/Makefile.am ++++ b/bin/Makefile.am +@@ -6,7 +6,7 @@ bin_PROGRAMS = vlc-osx + noinst_PROGRAMS = vlc-osx-static + else + bin_PROGRAMS = vlc +-noinst_PROGRAMS = vlc-static ++noinst_PROGRAMS = + endif + endif + EXTRA_DIST = vlc_win32_rc.rc.in +-- +2.14.4 + diff --git a/package/vlc/0002-automake-add-subdir-objects-option.patch b/package/vlc/0002-automake-add-subdir-objects-option.patch new file mode 100644 index 00000000..d4493bdf --- /dev/null +++ b/package/vlc/0002-automake-add-subdir-objects-option.patch @@ -0,0 +1,32 @@ +From 54e7e0bda02099ae9d1c42abed1932ffa8d354e8 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Tue, 1 May 2018 22:28:52 +0200 +Subject: [PATCH] automake: add subdir-objects option + +Our version of automake warns if this option is enabled and source files +in subdirectories are used. + +It doesn't really seems to have a noticable effect on the build, but it +does remove a lot of annoying warnings. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 206690b468..dfb4c1c329 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -24,7 +24,7 @@ AC_CANONICAL_BUILD + AC_CANONICAL_HOST + AC_PRESERVE_HELP_ORDER + +-AM_INIT_AUTOMAKE(tar-ustar color-tests foreign) ++AM_INIT_AUTOMAKE(tar-ustar color-tests foreign subdir-objects) + AC_CONFIG_HEADERS([config.h]) + + AM_SILENT_RULES([yes]) +-- +2.14.4 + diff --git a/package/vlc/0003-build-use-pkg-config-to-get-tremor-libs.patch b/package/vlc/0003-build-use-pkg-config-to-get-tremor-libs.patch new file mode 100644 index 00000000..652718b0 --- /dev/null +++ b/package/vlc/0003-build-use-pkg-config-to-get-tremor-libs.patch @@ -0,0 +1,50 @@ +From fb257e1e204c30436b3509ea3fa9f7c5fe131dc1 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 16 Oct 2018 14:25:20 +0200 +Subject: [PATCH] build: use pkg-config to get tremor libs + +Use PKG_ENABLE_MODULES_VLC to enable tremor based on availability of +ogg and vorbisidec + +Signed-off-by: Fabrice Fontaine +--- + configure.ac | 9 +-------- + modules/codec/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0d3222e00f..b506d735f2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2710,14 +2710,7 @@ PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorb + dnl + dnl Tremor plugin + dnl +-AC_ARG_ENABLE(tremor, +- [ --enable-tremor Tremor decoder support (default disabled)]) +-if test "${enable_tremor}" = "yes" +-then +- AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [ +- VLC_ADD_PLUGIN([tremor]) +- ],[]) +-fi ++PKG_ENABLE_MODULES_VLC([TREMOR], [], [vorbisidec ogg], [Tremor decoder support], [disabled]) + + dnl + dnl Speex plugins +diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am +index 075ee2a0e9..637b1d45a6 100644 +--- a/modules/codec/Makefile.am ++++ b/modules/codec/Makefile.am +@@ -318,7 +318,7 @@ codec_LTLIBRARIES += $(LTLIBdaala) + libtremor_plugin_la_SOURCES = codec/vorbis.c + libtremor_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMODULE_NAME_IS_tremor + libtremor_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' +-libtremor_plugin_la_LIBADD = -lvorbisdec -logg ++libtremor_plugin_la_LIBADD = $(TREMOR_LIBS) + EXTRA_LTLIBRARIES += libtremor_plugin.la + codec_LTLIBRARIES += $(LTLIBtremor) + +-- +2.17.1 + diff --git a/package/vlc/0004-Fix-build-error-using-uClibc-by-adding-sys-types.h.patch b/package/vlc/0004-Fix-build-error-using-uClibc-by-adding-sys-types.h.patch new file mode 100644 index 00000000..a1d71896 --- /dev/null +++ b/package/vlc/0004-Fix-build-error-using-uClibc-by-adding-sys-types.h.patch @@ -0,0 +1,44 @@ +From bbb15b9cbf9353423619f2c40abdf95d861e66ba Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 2 Apr 2016 16:49:54 +0200 +Subject: [PATCH] Fix build error using uClibc by adding sys/types.h + +Fixes + + CC core.lo +In file included from libvlc_internal.h:35:0, + from core.c:28: +../include/vlc/libvlc_media.h:313:18: error: expected declaration specifiers or '...' before '*' token + typedef ssize_t (*libvlc_media_read_cb)(void *opaque, unsigned char *buf, + ^ +../include/vlc/libvlc_media.h:423:36: error: unknown type name 'libvlc_media_read_cb' + libvlc_media_read_cb read_cb, + ^ +Bug was reported to trac: +https://trac.videolan.org/vlc/ticket/16768 + +This patch was suggested by courmisch in the trac ticket. + +Signed-off-by: Bernd Kuhls +[Patch sent upstream: + https://mailman.videolan.org/pipermail/vlc-devel/2016-April/106952.html] +--- + include/vlc/libvlc_media.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h +index 383f366b69..1cbf00c3e3 100644 +--- a/include/vlc/libvlc_media.h ++++ b/include/vlc/libvlc_media.h +@@ -26,6 +26,8 @@ + #ifndef VLC_LIBVLC_MEDIA_H + #define VLC_LIBVLC_MEDIA_H 1 + ++#include /* for ssize_t */ ++ + # ifdef __cplusplus + extern "C" { + # endif +-- +2.14.4 + diff --git a/package/vlc/0005-Don-t-assume-strerror_l-is-available.patch b/package/vlc/0005-Don-t-assume-strerror_l-is-available.patch new file mode 100644 index 00000000..cd839b73 --- /dev/null +++ b/package/vlc/0005-Don-t-assume-strerror_l-is-available.patch @@ -0,0 +1,58 @@ +From 0435cf37308652af1cf244b6429e919fa7ffaa95 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Tue, 1 May 2018 22:31:23 +0200 +Subject: [PATCH] Don't assume strerror_l() is available + +Fix compile error + + CCLD vlc +/home/br/br3/output/build/vlc-2.2.1/src/.libs/libvlccore.so: undefined reference to `strerror_l' + +Code for #else condition was taken from +http://patches.osdyson.org/patch/series/view/vlc/2.2.0~rc2-1+dyson2/dyson.patch + +[Bernd: rebased for vlc-3.0.6 & 3.0.9.2] +Signed-off-by: Bernd Kuhls +--- + configure.ac | 2 +- + src/posix/error.c | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index dfb4c1c329..bfe43512a2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -590,7 +590,7 @@ dnl Check for system libs needed + need_libc=false + + dnl Check for usual libc functions +-AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatvfs fork getenv getmntent_r getpwuid_r isatty lstat memalign mkostemp mmap newlocale open_memstream openat pipe2 pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp strptime uselocale]) ++AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatvfs fork getenv getmntent_r getpwuid_r isatty lstat memalign mkostemp mmap newlocale open_memstream openat pipe2 pread posix_fadvise posix_madvise posix_memalign setlocale strerror_l stricmp strnicmp strptime uselocale]) + AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lfind lldiv memrchr nrand48 poll recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp pathconf]) + AC_REPLACE_FUNCS([gettimeofday]) + AC_CHECK_FUNC(fdatasync,, +diff --git a/src/posix/error.c b/src/posix/error.c +index db51004601..b4aa6fb3ca 100644 +--- a/src/posix/error.c ++++ b/src/posix/error.c +@@ -31,6 +31,7 @@ + + static const char *vlc_strerror_l(int errnum, const char *lname) + { ++#ifdef HAVE_STRERROR_L + int saved_errno = errno; + locale_t loc = newlocale(LC_MESSAGES_MASK, lname, (locale_t)0); + +@@ -51,6 +52,9 @@ static const char *vlc_strerror_l(int errnum, const char *lname) + const char *buf = strerror_l(errnum, loc); + + freelocale(loc); ++#else ++ const char *buf = strerror(errnum); ++#endif + return buf; + } + +-- +2.14.4 + diff --git a/package/vlc/0006-posix-remove-ancient-run-time-fallback-to-real-time-.patch b/package/vlc/0006-posix-remove-ancient-run-time-fallback-to-real-time-.patch new file mode 100644 index 00000000..4fc639e2 --- /dev/null +++ b/package/vlc/0006-posix-remove-ancient-run-time-fallback-to-real-time-.patch @@ -0,0 +1,187 @@ +From 5d561e1e2dcde3c9fca4d925f12447009d0d4a4c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= +Date: Wed, 18 Apr 2018 17:23:57 +0300 +Subject: [PATCH] posix: remove ancient run-time fallback to real-time clock +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +posix: remove ancient run-time fallback to real-time clock + +For hysterical raisins, GNU/Linux and possibly some other OSes still +report that monotonic clock must be checked at run-time, although I +doubt that VLC or even current glibc would run on such old kernel. + +Drop that to simplify and avoid the systematic one-time init check. + +Downloaded from upstream commit to fix build error on m68k: + +posix/thread.c:79:5: warning: #warning Monotonic clock not available. Expect timing issues. [-Wcpp] + # warning Monotonic clock not available. Expect timing issues. + ^~~~~~~ +posix/thread.c: In function ‘vlc_clock_setup_once’: +posix/thread.c:88:18: error: lvalue required as left operand of assignment + vlc_clock_id = (val < 0) ? CLOCK_REALTIME : CLOCK_MONOTONIC; + +Signed-off-by: Bernd Kuhls +--- + src/posix/thread.c | 96 +++++++----------------------------------------------- + 1 file changed, 11 insertions(+), 85 deletions(-) + +diff --git a/src/posix/thread.c b/src/posix/thread.c +index dab8b71f97..8878941913 100644 +--- a/src/posix/thread.c ++++ b/src/posix/thread.c +@@ -51,62 +51,16 @@ + # include + #endif + +-#if !defined (_POSIX_TIMERS) +-# define _POSIX_TIMERS (-1) +-#endif +-#if !defined (_POSIX_CLOCK_SELECTION) +-/* Clock selection was defined in 2001 and became mandatory in 2008. */ +-# define _POSIX_CLOCK_SELECTION (-1) +-#endif +-#if !defined (_POSIX_MONOTONIC_CLOCK) +-# define _POSIX_MONOTONIC_CLOCK (-1) +-#endif +- +-#if (_POSIX_TIMERS > 0) + static unsigned vlc_clock_prec; + +-# if (_POSIX_MONOTONIC_CLOCK > 0) && (_POSIX_CLOCK_SELECTION > 0) +-/* Compile-time POSIX monotonic clock support */ +-# define vlc_clock_id (CLOCK_MONOTONIC) +- +-# elif (_POSIX_MONOTONIC_CLOCK == 0) && (_POSIX_CLOCK_SELECTION > 0) +-/* Run-time POSIX monotonic clock support (see clock_setup() below) */ +-static clockid_t vlc_clock_id; +- +-# else +-/* No POSIX monotonic clock support */ +-# define vlc_clock_id (CLOCK_REALTIME) +-# warning Monotonic clock not available. Expect timing issues. +- +-# endif /* _POSIX_MONOTONIC_CLOKC */ +- + static void vlc_clock_setup_once (void) + { +-# if (_POSIX_MONOTONIC_CLOCK == 0) +- long val = sysconf (_SC_MONOTONIC_CLOCK); +- assert (val != 0); +- vlc_clock_id = (val < 0) ? CLOCK_REALTIME : CLOCK_MONOTONIC; +-# endif +- + struct timespec res; +- if (unlikely(clock_getres (vlc_clock_id, &res) != 0 || res.tv_sec != 0)) ++ if (unlikely(clock_getres(CLOCK_MONOTONIC, &res) != 0 || res.tv_sec != 0)) + abort (); + vlc_clock_prec = (res.tv_nsec + 500) / 1000; + } + +-static pthread_once_t vlc_clock_once = PTHREAD_ONCE_INIT; +- +-# define vlc_clock_setup() \ +- pthread_once(&vlc_clock_once, vlc_clock_setup_once) +- +-#else /* _POSIX_TIMERS */ +- +-# include /* gettimeofday() */ +- +-# define vlc_clock_setup() (void)0 +-# warning Monotonic clock not available. Expect timing issues. +-#endif /* _POSIX_TIMERS */ +- + static struct timespec mtime_to_ts (mtime_t date) + { + lldiv_t d = lldiv (date, CLOCK_FREQ); +@@ -233,14 +187,11 @@ void vlc_cond_init (vlc_cond_t *p_condvar) + { + pthread_condattr_t attr; + +- if (unlikely(pthread_condattr_init (&attr))) +- abort (); +-#if (_POSIX_CLOCK_SELECTION > 0) +- vlc_clock_setup (); +- pthread_condattr_setclock (&attr, vlc_clock_id); +-#endif +- if (unlikely(pthread_cond_init (p_condvar, &attr))) ++ if (unlikely(pthread_condattr_init (&attr)) ++ || unlikely(pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) ++ || unlikely(pthread_cond_init (p_condvar, &attr))) + abort (); ++ + pthread_condattr_destroy (&attr); + } + +@@ -625,44 +576,27 @@ void vlc_control_cancel (int cmd, ...) + + mtime_t mdate (void) + { +-#if (_POSIX_TIMERS > 0) + struct timespec ts; + +- vlc_clock_setup (); +- if (unlikely(clock_gettime (vlc_clock_id, &ts) != 0)) ++ if (unlikely(clock_gettime(CLOCK_MONOTONIC, &ts) != 0)) + abort (); + + return (INT64_C(1000000) * ts.tv_sec) + (ts.tv_nsec / 1000); +- +-#else +- struct timeval tv; +- +- if (unlikely(gettimeofday (&tv, NULL) != 0)) +- abort (); +- return (INT64_C(1000000) * tv.tv_sec) + tv.tv_usec; +- +-#endif + } + + #undef mwait + void mwait (mtime_t deadline) + { +-#if (_POSIX_CLOCK_SELECTION > 0) +- vlc_clock_setup (); ++ static pthread_once_t vlc_clock_once = PTHREAD_ONCE_INIT; ++ + /* If the deadline is already elapsed, or within the clock precision, + * do not even bother the system timer. */ ++ pthread_once(&vlc_clock_once, vlc_clock_setup_once); + deadline -= vlc_clock_prec; + + struct timespec ts = mtime_to_ts (deadline); + +- while (clock_nanosleep (vlc_clock_id, TIMER_ABSTIME, &ts, NULL) == EINTR); +- +-#else +- deadline -= mdate (); +- if (deadline > 0) +- msleep (deadline); +- +-#endif ++ while (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, NULL) == EINTR); + } + + #undef msleep +@@ -670,15 +604,7 @@ void msleep (mtime_t delay) + { + struct timespec ts = mtime_to_ts (delay); + +-#if (_POSIX_CLOCK_SELECTION > 0) +- vlc_clock_setup (); +- while (clock_nanosleep (vlc_clock_id, 0, &ts, &ts) == EINTR); +- +-#else +- while (nanosleep (&ts, &ts) == -1) +- assert (errno == EINTR); +- +-#endif ++ while (clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, &ts) == EINTR); + } + + unsigned vlc_GetCPUCount(void) +-- +2.14.4 + diff --git a/package/vlc/0007-Add-support-for-freerdp2.patch b/package/vlc/0007-Add-support-for-freerdp2.patch new file mode 100644 index 00000000..75f09554 --- /dev/null +++ b/package/vlc/0007-Add-support-for-freerdp2.patch @@ -0,0 +1,150 @@ +From 3780bbb20bf35aa8f21ac672da3f0c5f408468e9 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Thu, 16 Aug 2018 12:27:40 +0200 +Subject: [PATCH] Add support for freerdp2 + +Downloaded from +https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/vlc/files/vlc-2.2.8-freerdp-2.patch + +Signed-off-by: Bernd Kuhls +--- + configure.ac | 2 +- + modules/access/rdp.c | 51 ++++++++++++++------------------------------------- + 2 files changed, 15 insertions(+), 38 deletions(-) + +diff --git a/configure.ac b/configure.ac +index bfe43512a2..4808b8becf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1992,7 +1992,7 @@ PKG_ENABLE_MODULES_VLC([VNC], [vnc], [libvncclient >= 0.9.9], (VNC/rfb client su + + dnl RDP/Remote Desktop access module + dnl +-PKG_ENABLE_MODULES_VLC([FREERDP], [rdp], [freerdp >= 1.0.1], (RDP/Remote Desktop client support) ) ++PKG_ENABLE_MODULES_VLC([FREERDP], [rdp], [freerdp2 >= 1.0.1], (RDP/Remote Desktop client support) ) + + dnl + dnl Real RTSP plugin +diff --git a/modules/access/rdp.c b/modules/access/rdp.c +index 2992090219..49986f5da9 100644 +--- a/modules/access/rdp.c ++++ b/modules/access/rdp.c +@@ -45,18 +45,6 @@ + # include + #endif + +-#if !defined(FREERDP_VERSION_MAJOR) || \ +- (defined(FREERDP_VERSION_MAJOR) && !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 1))) +-# define SoftwareGdi sw_gdi +-# define Fullscreen fullscreen +-# define ServerHostname hostname +-# define Username username +-# define Password password +-# define ServerPort port +-# define EncryptionMethods encryption +-# define ContextSize context_size +-#endif +- + #include + #ifdef HAVE_POLL + # include +@@ -144,6 +132,7 @@ static void desktopResizeHandler( rdpContext *p_context ) + vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_context; + demux_sys_t *p_sys = p_vlccontext->p_demux->p_sys; + rdpGdi *p_gdi = p_context->gdi; ++ unsigned bytesPerPixel; + + if ( p_sys->es ) + { +@@ -153,17 +142,21 @@ static void desktopResizeHandler( rdpContext *p_context ) + + /* Now init and fill es format */ + vlc_fourcc_t i_chroma; +- switch( p_gdi->bytesPerPixel ) ++ switch( p_gdi->dstFormat ) + { + default: +- case 16: ++ msg_Dbg( p_vlccontext->p_demux, "unhandled dstFormat %x bpp", p_gdi->dstFormat); ++ case PIXEL_FORMAT_BGR16: + i_chroma = VLC_CODEC_RGB16; ++ bytesPerPixel = 16; + break; +- case 24: ++ case PIXEL_FORMAT_BGR24: + i_chroma = VLC_CODEC_RGB24; ++ bytesPerPixel = 24; + break; +- case 32: ++ case PIXEL_FORMAT_BGRA32: + i_chroma = VLC_CODEC_RGB32; ++ bytesPerPixel = 32; + break; + } + es_format_t fmt; +@@ -176,7 +169,7 @@ static void desktopResizeHandler( rdpContext *p_context ) + fmt.video.i_height = p_gdi->height; + fmt.video.i_frame_rate_base = 1000; + fmt.video.i_frame_rate = 1000 * p_sys->f_fps; +- p_sys->i_framebuffersize = p_gdi->width * p_gdi->height * p_gdi->bytesPerPixel; ++ p_sys->i_framebuffersize = p_gdi->width * p_gdi->height * bytesPerPixel; + + if ( p_sys->p_block ) + p_sys->p_block = block_Realloc( p_sys->p_block, 0, p_sys->i_framebuffersize ); +@@ -237,28 +230,19 @@ static bool postConnectHandler( freerdp *p_instance ) + vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_instance->context; + + msg_Dbg( p_vlccontext->p_demux, "connected to desktop %dx%d (%d bpp)", +-#if defined(FREERDP_VERSION_MAJOR) && (FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 1)) + p_instance->settings->DesktopWidth, + p_instance->settings->DesktopHeight, + p_instance->settings->ColorDepth +-#else +- p_instance->settings->width, +- p_instance->settings->height, +- p_instance->settings->color_depth +-#endif + ); + + p_instance->update->DesktopResize = desktopResizeHandler; + p_instance->update->BeginPaint = beginPaintHandler; + p_instance->update->EndPaint = endPaintHandler; + +- gdi_init( p_instance, +- CLRBUF_16BPP | +-#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \ +- !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2)) +- CLRBUF_24BPP | +-#endif +- CLRBUF_32BPP, NULL ); ++ if ( p_instance->settings->ColorDepth > 16 ) ++ gdi_init( p_instance, PIXEL_FORMAT_XRGB32); ++ else ++ gdi_init( p_instance, PIXEL_FORMAT_RGB16); + + desktopResizeHandler( p_instance->context ); + return true; +@@ -432,10 +416,6 @@ static int Open( vlc_object_t *p_this ) + if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0; + p_sys->i_frame_interval = 1000000 / p_sys->f_fps; + +-#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 +- freerdp_channels_global_init(); +-#endif +- + p_sys->p_instance = freerdp_new(); + if ( !p_sys->p_instance ) + { +@@ -508,9 +488,6 @@ static void Close( vlc_object_t *p_this ) + + freerdp_disconnect( p_sys->p_instance ); + freerdp_free( p_sys->p_instance ); +-#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 +- freerdp_channels_global_uninit(); +-#endif + + if ( p_sys->p_block ) + block_Release( p_sys->p_block ); +-- +2.14.4 + diff --git a/package/vlc/0008-configure.ac-also-use-AC_PATH_PROG-to-check-for-wayl.patch b/package/vlc/0008-configure.ac-also-use-AC_PATH_PROG-to-check-for-wayl.patch new file mode 100644 index 00000000..2b74fe0d --- /dev/null +++ b/package/vlc/0008-configure.ac-also-use-AC_PATH_PROG-to-check-for-wayl.patch @@ -0,0 +1,50 @@ +From 27635f902831fac898586f1f3dc98369f12582c9 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 26 Aug 2018 12:51:04 +0200 +Subject: [PATCH] configure.ac: also use AC_PATH_PROG to check for + wayland-scanner + +When cross-compiling the .pc file might point to the wrong +wayland-scanner binary (target rather than host) resulting in a +non-executable and wrong scanner. +Try searching the PATH first, and if that fails fall back into +pkg-config. + +Signed-off-by: Bernd Kuhls +--- + configure.ac | 19 +++++++++++-------- + 1 file changed, 11 insertions(+), 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 4808b8becf..a18641ed23 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3140,14 +3140,17 @@ AS_IF([test "${enable_wayland}" != "no"], [ + AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors 'wayland-protocols >= 1.4')]) + ]) + +- AC_MSG_CHECKING([for the Wayland scanner]) +- PKG_CHECK_EXISTS([wayland-scanner], [ +- WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)" +- AC_MSG_RESULT([${WAYLAND_SCANNER}]) +- ], [ +- AC_MSG_RESULT([not found]) +- AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors wayland-scanner)]) +- ]) ++ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner]) ++ if test "x$WAYLAND_SCANNER" = x; then ++ AC_MSG_CHECKING([for the Wayland scanner]) ++ PKG_CHECK_EXISTS([wayland-scanner], [ ++ WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)" ++ AC_MSG_RESULT([${WAYLAND_SCANNER}]) ++ ], [ ++ AC_MSG_RESULT([not found]) ++ AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors wayland-scanner)]) ++ ]) ++ fi + + have_wayland="yes" + +-- +2.18.0 + diff --git a/package/vlc/0009-modules-video_filter-opencv_example.cpp-fix-build-wi.patch b/package/vlc/0009-modules-video_filter-opencv_example.cpp-fix-build-wi.patch new file mode 100644 index 00000000..952f9fdf --- /dev/null +++ b/package/vlc/0009-modules-video_filter-opencv_example.cpp-fix-build-wi.patch @@ -0,0 +1,42 @@ +From 57b1e723b73da4c8d42c20d4e28040ec4c0edd85 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 28 Feb 2020 14:29:47 +0100 +Subject: [PATCH] modules/video_filter/opencv_example.cpp: fix build with + opencv 3.4.9 + +Use cvScalar instead of CV_RGB to avoid the following build failure with +opencv 3.4.9: + +In file included from /home/naourr/work/instance-2/output-1/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/opencv2/imgproc/imgproc.hpp:48, + from video_filter/opencv_example.cpp:46: +video_filter/opencv_example.cpp: In function 'picture_t* Filter(filter_t*, picture_t*)': +video_filter/opencv_example.cpp:200:46: error: could not convert 'cv::Scalar_((double)0, (double)0, (double)0, (double)0)' from 'cv::Scalar' {aka 'cv::Scalar_'} to 'CvScalar' + cvRectangle( p_img[0], pt1, pt2, CV_RGB(0,0,0), 3, 8, 0 ); + ^~~~~~ + +Indeed, CV_RGB is defined as cv::Scalar instead of cvScalar since +version 3.4.2 and +https://github.com/opencv/opencv/commit/7f9253ea0a9fe2635926379420002dbf0c3fce0f + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://patches.videolan.org/patch/26655] +--- + modules/video_filter/opencv_example.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp +index 1334cd4c36..1a8d574f7a 100644 +--- a/modules/video_filter/opencv_example.cpp ++++ b/modules/video_filter/opencv_example.cpp +@@ -202,7 +202,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) + pt2.x = (r->x+r->width)*scale; + pt1.y = r->y*scale; + pt2.y = (r->y+r->height)*scale; +- cvRectangle( p_img[0], pt1, pt2, CV_RGB(0,0,0), 3, 8, 0 ); ++ cvRectangle( p_img[0], pt1, pt2, cvScalar(0,0,0,0), 3, 8, 0 ); + + *(CvRect*)(&(p_sys->event_info.p_region[i])) = *r; + p_sys->event_info.p_region[i].i_id = p_sys->i_id++; +-- +2.25.0 + diff --git a/package/vlc/0010-modules-access-live555.cpp-fix-build-with-live555-20.patch b/package/vlc/0010-modules-access-live555.cpp-fix-build-with-live555-20.patch new file mode 100644 index 00000000..5f046648 --- /dev/null +++ b/package/vlc/0010-modules-access-live555.cpp-fix-build-with-live555-20.patch @@ -0,0 +1,36 @@ +From eba390d13ec4089cd6b9d8687ab3f8905b9d3ac8 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 22 May 2021 22:56:04 +0200 +Subject: [PATCH] modules/access/live555.cpp: fix build with live555 >= + 2020.12.11 + +Since live555-2020.12.11, connectionEndpointAddress() member function +use a "struct sockaddr_storage" in preparation for eventual support of +IPv6: http://www.live555.com/liveMedia/public/changelog.txt + +Fixes: + - http://autobuild.buildroot.org/results/83170984f96238756c45bf1f4e542363afafd45f + +Signed-off-by: Fabrice Fontaine +--- + modules/access/live555.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp +index 9d6e01ae32..32a6c294eb 100644 +--- a/modules/access/live555.cpp ++++ b/modules/access/live555.cpp +@@ -850,7 +850,9 @@ static int SessionsSetup( demux_t *p_demux ) + if( !p_sys->b_multicast ) + { + /* We need different rollover behaviour for multicast */ +- p_sys->b_multicast = IsMulticastAddress( sub->connectionEndpointAddress() ); ++ struct sockaddr_storage tempAddr; ++ sub->getConnectionEndpointAddress( tempAddr ); ++ p_sys->b_multicast = IsMulticastAddress( tempAddr ); + } + + tk = (live_track_t*)malloc( sizeof( live_track_t ) ); +-- +2.30.2 + diff --git a/package/vlc/Config.in b/package/vlc/Config.in new file mode 100644 index 00000000..964b7660 --- /dev/null +++ b/package/vlc/Config.in @@ -0,0 +1,32 @@ +config BR2_PACKAGE_VLC + bool "vlc" + depends on !BR2_RISCV_32 + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + select BR2_PACKAGE_LIBVORBIS if BR2_PACKAGE_OPUS + select BR2_PACKAGE_VLC_OPENCV3_BACKEND if BR2_PACKAGE_OPENCV3 + select BR2_PACKAGE_ZLIB if BR2_PACKAGE_TAGLIB + help + VLC is a free and open source cross-platform multimedia player + and framework that plays most multimedia files as well as DVD, + Audio CD, VCD, and various streaming protocols. + + http://www.videolan.org/vlc/ + +config BR2_PACKAGE_VLC_OPENCV3_BACKEND + bool + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_OBJDETECT + +comment "vlc needs a toolchain w/ C++, dynamic library, wchar, threads, gcc >= 4.9, headers >= 3.7" + depends on !BR2_RISCV_32 + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS \ + || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \ + || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 diff --git a/package/vlc/vlc.hash b/package/vlc/vlc.hash new file mode 100644 index 00000000..468ec7df --- /dev/null +++ b/package/vlc/vlc.hash @@ -0,0 +1,7 @@ +# From https://get.videolan.org/vlc/3.0.16/vlc-3.0.16.tar.xz.sha256 +sha256 ffae35fc64f625c175571d2346bc5f6207be99762517f15423e74f18399410f6 vlc-3.0.16.tar.xz +# From https://get.videolan.org/vlc/3.0.16/vlc-3.0.16.tar.xz.sha1 +sha1 e22ac839a09b5ead8992ae6aa8ea886364283e6a vlc-3.0.16.tar.xz +# Locally computed +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk new file mode 100644 index 00000000..06fc650f --- /dev/null +++ b/package/vlc/vlc.mk @@ -0,0 +1,585 @@ +################################################################################ +# +# vlc +# +################################################################################ + +VLC_VERSION = 3.0.16 +VLC_SITE = https://get.videolan.org/vlc/$(VLC_VERSION) +VLC_SOURCE = vlc-$(VLC_VERSION).tar.xz +VLC_LICENSE = GPL-2.0+, LGPL-2.1+ +VLC_LICENSE_FILES = COPYING COPYING.LIB +VLC_CPE_ID_VENDOR = videolan +VLC_CPE_ID_PRODUCT = vlc_media_player +VLC_DEPENDENCIES = host-pkgconf +VLC_AUTORECONF = YES + +# Install vlc libraries in staging. +VLC_INSTALL_STAGING = YES + +# gcc bug internal compiler error: in merge_overlapping_regs, at +# regrename.c:304. This bug is fixed since gcc 6. +ifeq ($(BR2_microblaze)$(BR2_or1k):$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),y:) +VLC_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0" +VLC_CONF_OPTS += --disable-optimizations +endif + +# configure check for -fstack-protector-strong is broken +VLC_CONF_ENV += \ + ax_cv_check_cflags___fstack_protector_strong=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) + +# VLC defines two autoconf functions which are also defined by our own pkg.m4 +# from pkgconf. Unfortunately, they are defined in a different way: VLC adds +# --enable- options, but pkg.m4 adds --with- options. To make sure we use +# VLC's definition, rename these two functions. +define VLC_OVERRIDE_PKG_M4 + $(SED) 's/PKG_WITH_MODULES/VLC_PKG_WITH_MODULES/g' \ + -e 's/PKG_HAVE_WITH_MODULES/VLC_PKG_HAVE_WITH_MODULES/g' \ + $(@D)/configure.ac $(@D)/m4/with_pkg.m4 +endef +VLC_POST_PATCH_HOOKS += VLC_OVERRIDE_PKG_M4 + +VLC_CONF_OPTS += \ + --disable-a52 \ + --disable-addonmanagermodules \ + --disable-aom \ + --disable-aribb25 \ + --disable-aribsub \ + --disable-asdcp \ + --disable-bpg \ + --disable-caca \ + --disable-chromaprint \ + --disable-chromecast \ + --disable-crystalhd \ + --disable-dc1394 \ + --disable-dca \ + --disable-decklink \ + --disable-dsm \ + --disable-dv1394 \ + --disable-fluidlite \ + --disable-gme \ + --disable-goom \ + --disable-jack \ + --disable-jpeg \ + --disable-kai \ + --disable-kate \ + --disable-kva \ + --disable-libplacebo \ + --disable-linsys \ + --disable-mfx \ + --disable-microdns \ + --disable-mmal \ + --disable-mtp \ + --disable-notify \ + --disable-projectm \ + --disable-schroedinger \ + --disable-shine \ + --disable-shout \ + --disable-sndio \ + --disable-spatialaudio \ + --disable-srt \ + --disable-telx \ + --disable-tiger \ + --disable-twolame \ + --disable-vdpau \ + --disable-vsxu \ + --disable-wasapi \ + --disable-x262 \ + --disable-zvbi \ + --enable-run-as-root + +# Uses __atomic_fetch_add_4 +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +VLC_CONF_ENV += LIBS="-latomic" +endif + +# Building static and shared doesn't work, so force static off. +ifeq ($(BR2_STATIC_LIBS),) +VLC_CONF_OPTS += --disable-static +endif + +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) +VLC_CONF_OPTS += --enable-altivec +else +VLC_CONF_OPTS += --disable-altivec +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +VLC_CONF_OPTS += --enable-sse +else +VLC_CONF_OPTS += --disable-sse +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +VLC_CONF_OPTS += --enable-alsa +VLC_DEPENDENCIES += alsa-lib +else +VLC_CONF_OPTS += --disable-alsa +endif + +# avahi support needs avahi-client, which needs avahi-daemon and dbus +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy) +VLC_CONF_OPTS += --enable-avahi +VLC_DEPENDENCIES += avahi +else +VLC_CONF_OPTS += --disable-avahi +endif + +ifeq ($(BR2_PACKAGE_DAV1D),y) +VLC_CONF_OPTS += --enable-dav1d +VLC_DEPENDENCIES += dav1d +else +VLC_CONF_OPTS += --disable-dav1d +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +VLC_CONF_OPTS += --enable-dbus +VLC_DEPENDENCIES += dbus +else +VLC_CONF_OPTS += --disable-dbus +endif + +ifeq ($(BR2_PACKAGE_FAAD2),y) +VLC_CONF_OPTS += --enable-faad +VLC_DEPENDENCIES += faad2 +else +VLC_CONF_OPTS += --disable-faad +endif + +ifeq ($(BR2_PACKAGE_FFMPEG),y) +VLC_CONF_OPTS += --enable-avcodec +VLC_DEPENDENCIES += ffmpeg +else +VLC_CONF_OPTS += --disable-avcodec +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y) +VLC_CONF_OPTS += --enable-postproc +else +VLC_CONF_OPTS += --disable-postproc +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) +VLC_CONF_OPTS += --enable-swscale +else +VLC_CONF_OPTS += --disable-swscale +endif + +ifeq ($(BR2_PACKAGE_FLAC),y) +VLC_CONF_OPTS += --enable-flac +VLC_DEPENDENCIES += flac +else +VLC_CONF_OPTS += --disable-flac +endif + +ifeq ($(BR2_PACKAGE_FLUIDSYNTH),y) +VLC_CONF_OPTS += --enable-fluidsynth +VLC_DEPENDENCIES += fluidsynth +else +VLC_CONF_OPTS += --disable-fluidsynth +endif + +ifeq ($(BR2_PACKAGE_FREERDP),y) +VLC_CONF_OPTS += --enable-freerdp +VLC_DEPENDENCIES += freerdp +else +VLC_CONF_OPTS += --disable-freerdp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE),y) +VLC_CONF_OPTS += --enable-gst-decode +VLC_DEPENDENCIES += gst1-plugins-base +else +VLC_CONF_OPTS += --disable-gst-decode +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +VLC_DEPENDENCIES += libgl +endif + +ifeq ($(BR2_PACKAGE_HARFBUZZ),y) +VLC_CONF_OPTS += --enable-harfbuzz +VLC_DEPENDENCIES += harfbuzz +else +VLC_CONF_OPTS += --disable-harfbuzz +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +VLC_CONF_OPTS += --enable-gles2 +VLC_DEPENDENCIES += libgles +else +VLC_CONF_OPTS += --disable-gles2 +endif + +ifeq ($(BR2_PACKAGE_OPENCV3),y) +VLC_CONF_OPTS += --enable-opencv +VLC_DEPENDENCIES += opencv3 +else +VLC_CONF_OPTS += --disable-opencv +endif + +ifeq ($(BR2_PACKAGE_OPUS),y) +VLC_CONF_OPTS += --enable-opus +VLC_DEPENDENCIES += libvorbis opus +else +VLC_CONF_OPTS += --disable-opus +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +VLC_CONF_OPTS += --enable-archive +VLC_DEPENDENCIES += libarchive +else +VLC_CONF_OPTS += --disable-archive +endif + +ifeq ($(BR2_PACKAGE_LIBASS),y) +VLC_CONF_OPTS += --enable-libass +VLC_DEPENDENCIES += libass +else +VLC_CONF_OPTS += --disable-libass +endif + +ifeq ($(BR2_PACKAGE_LIBBLURAY),y) +VLC_CONF_OPTS += --enable-bluray +VLC_DEPENDENCIES += libbluray +else +VLC_CONF_OPTS += --disable-bluray +endif + +ifeq ($(BR2_PACKAGE_LIBCDDB),y) +VLC_CONF_OPTS += --enable-libcddb +VLC_DEPENDENCIES += libcddb +else +VLC_CONF_OPTS += --disable-libcddb +endif + +ifeq ($(BR2_PACKAGE_LIBDVBPSI),y) +VLC_CONF_OPTS += --enable-dvbpsi +VLC_DEPENDENCIES += libdvbpsi +else +VLC_CONF_OPTS += --disable-dvbpsi +endif + +ifeq ($(BR2_PACKAGE_LIBDVDNAV),y) +VLC_CONF_OPTS += --enable-dvdnav +VLC_DEPENDENCIES += libdvdnav +else +VLC_CONF_OPTS += --disable-dvdnav +endif + +ifeq ($(BR2_PACKAGE_LIBDVDREAD),y) +VLC_CONF_OPTS += --enable-dvdread +VLC_DEPENDENCIES += libdvdread +else +VLC_CONF_OPTS += --disable-dvdread +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +VLC_CONF_OPTS += --enable-libgcrypt +VLC_DEPENDENCIES += libgcrypt +VLC_CONF_ENV += \ + GCRYPT_CONFIG="$(STAGING_DIR)/usr/bin/libgcrypt-config" +else +VLC_CONF_OPTS += --disable-libgcrypt +endif + +ifeq ($(BR2_PACKAGE_LIBIDN),y) +VLC_DEPENDENCIES += libidn +endif + +ifeq ($(BR2_PACKAGE_LIBMAD),y) +VLC_CONF_OPTS += --enable-mad +VLC_DEPENDENCIES += libmad +else +VLC_CONF_OPTS += --disable-mad +endif + +ifeq ($(BR2_PACKAGE_LIBMATROSKA),y) +VLC_CONF_OPTS += --enable-matroska +VLC_DEPENDENCIES += libmatroska +else +VLC_CONF_OPTS += --disable-matroska +endif + +ifeq ($(BR2_PACKAGE_LIBMODPLUG),y) +VLC_CONF_OPTS += --enable-mod +VLC_DEPENDENCIES += libmodplug +else +VLC_CONF_OPTS += --disable-mod +endif + +ifeq ($(BR2_PACKAGE_LIBMPEG2),y) +VLC_CONF_OPTS += --enable-libmpeg2 +VLC_DEPENDENCIES += libmpeg2 +else +VLC_CONF_OPTS += --disable-libmpeg2 +endif + +ifeq ($(BR2_PACKAGE_LIBNFS),y) +VLC_CONF_OPTS += --enable-nfs +VLC_DEPENDENCIES += libnfs +else +VLC_CONF_OPTS += --disable-nfs +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +VLC_CONF_OPTS += --enable-png +VLC_DEPENDENCIES += libpng +else +VLC_CONF_OPTS += --disable-png +endif + +ifeq ($(BR2_PACKAGE_LIBRSVG),y) +VLC_CONF_OPTS += --enable-svg --enable-svgdec +VLC_DEPENDENCIES += librsvg +else +VLC_CONF_OPTS += --disable-svg --disable-svgdec +endif + +ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y) +VLC_CONF_OPTS += --enable-samplerate +VLC_DEPENDENCIES += libsamplerate +else +VLC_CONF_OPTS += --disable-samplerate +endif + +ifeq ($(BR2_PACKAGE_LIBSECRET),y) +VLC_CONF_OPTS += --enable-secret +VLC_DEPENDENCIES += libsecret +else +VLC_CONF_OPTS += --disable-secret +endif + +ifeq ($(BR2_PACKAGE_LIBSOXR),y) +VLC_CONF_OPTS += --enable-soxr +VLC_DEPENDENCIES += libsoxr +else +VLC_CONF_OPTS += --disable-soxr +endif + +ifeq ($(BR2_PACKAGE_LIBSSH2),y) +VLC_CONF_OPTS += --enable-sftp +VLC_DEPENDENCIES += libssh2 +else +VLC_CONF_OPTS += --disable-sftp +endif + +ifeq ($(BR2_PACKAGE_LIBSIDPLAY2),y) +VLC_CONF_OPTS += --enable-sid +VLC_DEPENDENCIES += libsidplay2 +else +VLC_CONF_OPTS += --disable-sid +endif + +ifeq ($(BR2_PACKAGE_LIBTHEORA),y) +VLC_CONF_OPTS += --enable-theora +VLC_DEPENDENCIES += libtheora +else +VLC_CONF_OPTS += --disable-theora +endif + +ifeq ($(BR2_PACKAGE_LIBUPNP),y) +VLC_CONF_OPTS += --enable-upnp +VLC_DEPENDENCIES += libupnp +else +VLC_CONF_OPTS += --disable-upnp +endif + +# libva support depends on ffmpeg +ifeq ($(BR2_PACKAGE_FFMPEG)$(BR2_PACKAGE_LIBVA),yy) +VLC_CONF_OPTS += --enable-libva +VLC_DEPENDENCIES += libva +else +VLC_CONF_OPTS += --disable-libva +endif + +ifeq ($(BR2_PACKAGE_LIBVNCSERVER),y) +VLC_CONF_OPTS += --enable-vnc +VLC_DEPENDENCIES += libvncserver +else +VLC_CONF_OPTS += --disable-vnc +endif + +ifeq ($(BR2_PACKAGE_LIBVORBIS),y) +VLC_CONF_OPTS += --enable-vorbis +VLC_DEPENDENCIES += libvorbis +else +VLC_CONF_OPTS += --disable-vorbis +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +VLC_CONF_OPTS += --enable-v4l2 +VLC_DEPENDENCIES += libv4l +else +VLC_CONF_OPTS += --disable-v4l2 +endif + +ifeq ($(BR2_PACKAGE_LIBVPX),y) +VLC_CONF_OPTS += --enable-vpx +VLC_DEPENDENCIES += libvpx +else +VLC_CONF_OPTS += --disable-vpx +endif + +ifeq ($(BR2_PACKAGE_LIBXCB),y) +VLC_CONF_OPTS += --enable-xcb +VLC_DEPENDENCIES += libxcb +else +VLC_CONF_OPTS += --disable-xcb +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +VLC_CONF_OPTS += --enable-libxml2 +VLC_DEPENDENCIES += libxml2 +else +VLC_CONF_OPTS += --disable-libxml2 +endif + +ifeq ($(BR2_PACKAGE_LIVE555),y) +VLC_CONF_OPTS += --enable-live555 +VLC_DEPENDENCIES += live555 +ifneq ($(BR2_PACKAGE_OPENSSL),y) +VLC_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -DNO_OPENSSL" +endif +else +VLC_CONF_OPTS += --disable-live555 +endif + +ifeq ($(BR2_PACKAGE_LUA),y) +VLC_CONF_OPTS += --enable-lua +VLC_DEPENDENCIES += lua host-lua +else +VLC_CONF_OPTS += --disable-lua +endif + +ifeq ($(BR2_PACKAGE_MINIZIP),y) +VLC_DEPENDENCIES += minizip +endif + +ifeq ($(BR2_PACKAGE_MPG123),y) +VLC_CONF_OPTS += --enable-mpg123 +VLC_DEPENDENCIES += mpg123 +else +VLC_CONF_OPTS += --disable-mpg123 +endif + +ifeq ($(BR2_PACKAGE_MUSEPACK),y) +VLC_CONF_OPTS += --enable-mpc +VLC_DEPENDENCIES += musepack +else +VLC_CONF_OPTS += --disable-mpc +endif + +ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) +VLC_CONF_OPTS += --enable-ncurses +VLC_DEPENDENCIES += ncurses +else +VLC_CONF_OPTS += --disable-ncurses +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +VLC_CONF_OPTS += --enable-pulse +VLC_DEPENDENCIES += pulseaudio +else +VLC_CONF_OPTS += --disable-pulse +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS)$(BR2_PACKAGE_QT5SVG),yy) +VLC_CONF_OPTS += --enable-qt +VLC_DEPENDENCIES += qt5base qt5svg +ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT)$(BR2_PACKAGE_XLIB_LIBXINERAMA)$(BR2_PACKAGE_XLIB_LIBXPM),yyy) +VLC_CONF_OPTS += --enable-skins2 +VLC_DEPENDENCIES += xlib_libXext xlib_libXinerama xlib_libXpm +else +VLC_CONF_OPTS += --disable-skins2 +endif +else +VLC_CONF_OPTS += --disable-qt --disable-skins2 +endif + +ifeq ($(BR2_PACKAGE_SDL_IMAGE),y) +VLC_CONF_OPTS += --enable-sdl-image +VLC_DEPENDENCIES += sdl_image +else +VLC_CONF_OPTS += --disable-sdl-image +endif + +ifeq ($(BR2_PACKAGE_SAMBA4),y) +VLC_CONF_OPTS += --enable-smbclient +VLC_DEPENDENCIES += samba4 +else +VLC_CONF_OPTS += --disable-smbclient +endif + +ifeq ($(BR2_PACKAGE_SPEEX)$(BR2_PACKAGE_SPEEXDSP),yy) +VLC_CONF_OPTS += --enable-speex +VLC_DEPENDENCIES += speex speexdsp +else +VLC_CONF_OPTS += --disable-speex +endif + +ifeq ($(BR2_PACKAGE_TAGLIB),y) +VLC_CONF_OPTS += --enable-taglib +VLC_DEPENDENCIES += taglib +else +VLC_CONF_OPTS += --disable-taglib +endif + +ifeq ($(BR2_PACKAGE_TREMOR),y) +VLC_CONF_OPTS += --enable-tremor +VLC_DEPENDENCIES += tremor +else +VLC_CONF_OPTS += --disable-tremor +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +VLC_CONF_OPTS += --enable-udev +VLC_DEPENDENCIES += udev +else +VLC_CONF_OPTS += --disable-udev +endif + +ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_WAYLAND_PROTOCOLS),yy) +VLC_CONF_OPTS += --enable-wayland +VLC_DEPENDENCIES += wayland wayland-protocols +else +VLC_CONF_OPTS += --disable-wayland +endif + +ifeq ($(BR2_PACKAGE_X264),y) +VLC_CONF_OPTS += --enable-x264 +VLC_DEPENDENCIES += x264 +else +VLC_CONF_OPTS += --disable-x264 +endif + +ifeq ($(BR2_PACKAGE_X265),y) +VLC_CONF_OPTS += --enable-x265 +VLC_DEPENDENCIES += x265 +else +VLC_CONF_OPTS += --disable-x265 +endif + +ifeq ($(BR2_PACKAGE_XCB_UTIL_KEYSYMS),y) +VLC_DEPENDENCIES += xcb-util-keysyms +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +VLC_CONF_OPTS += --with-x +VLC_DEPENDENCIES += xlib_libX11 +else +VLC_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +VLC_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +VLC_CONF_OPTS += --enable-gnutls +VLC_DEPENDENCIES += gnutls +else +VLC_CONF_OPTS += --disable-gnutls +endif + +$(eval $(autotools-package)) diff --git a/package/vmtouch/Config.in b/package/vmtouch/Config.in new file mode 100644 index 00000000..daae03aa --- /dev/null +++ b/package/vmtouch/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_VMTOUCH + bool "vmtouch" + depends on BR2_USE_MMU # fork() + help + vmtouch is a tool for learning about and controlling + the file system cache of unix and unix-like systems. It + can discover which files the OS is caching, tell the OS + to cache or evict some files or regions of files, lock + files into memory so the OS won't evict them, and more. + + https://hoytech.com/vmtouch/ diff --git a/package/vmtouch/vmtouch.hash b/package/vmtouch/vmtouch.hash new file mode 100644 index 00000000..451bf568 --- /dev/null +++ b/package/vmtouch/vmtouch.hash @@ -0,0 +1,5 @@ +# Locally computed +sha256 d57b7b3ae1146c4516429ab7d6db6f2122401db814ddd9cdaad10980e9c8428c vmtouch-1.3.1.tar.gz + +# Hash for license files: +sha256 13258709ed29c17394e0a3ba8c8b9360af35b85231db514f11a0ba385cecd08e LICENSE diff --git a/package/vmtouch/vmtouch.mk b/package/vmtouch/vmtouch.mk new file mode 100644 index 00000000..0aa7bfb4 --- /dev/null +++ b/package/vmtouch/vmtouch.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# vmtouch +# +################################################################################ + +VMTOUCH_VERSION = 1.3.1 +VMTOUCH_SITE = $(call github,hoytech,vmtouch,v$(VMTOUCH_VERSION)) +VMTOUCH_LICENSE = BSD-3-Clause +VMTOUCH_LICENSE_FILES = LICENSE + +define VMTOUCH_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define VMTOUCH_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install \ + DESTDIR=$(TARGET_DIR) PREFIX=/usr +endef + +$(eval $(generic-package)) diff --git a/package/vnstat/Config.in b/package/vnstat/Config.in new file mode 100644 index 00000000..677ff575 --- /dev/null +++ b/package/vnstat/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_VNSTAT + bool "vnstat" + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR # mbstowcs() + select BR2_PACKAGE_SQLITE + help + vnStat is a console-based network traffic monitor that keeps a + log of network traffic for the selected interface(s). It uses + the network interface statistics provided by the kernel as + information source. This means that vnStat won't actually be + sniffing any traffic and also ensures light use of system + resources. + + http://humdi.net/vnstat + +comment "vnstat needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/vnstat/vnstat.hash b/package/vnstat/vnstat.hash new file mode 100644 index 00000000..6934c569 --- /dev/null +++ b/package/vnstat/vnstat.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 89276e0a7281943edb554b874078278ad947dc312938a2451e03eb80679f7ff7 vnstat-2.6.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/vnstat/vnstat.mk b/package/vnstat/vnstat.mk new file mode 100644 index 00000000..be1b75a6 --- /dev/null +++ b/package/vnstat/vnstat.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# vnstat +# +################################################################################ + +VNSTAT_VERSION = 2.6 +VNSTAT_SITE = http://humdi.net/vnstat +VNSTAT_LICENSE = GPL-2.0 +VNSTAT_LICENSE_FILES = COPYING +VNSTAT_DEPENDENCIES = host-pkgconf sqlite +VNSTAT_CONF_OPTS = --disable-extra-paths + +ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy) +VNSTAT_DEPENDENCIES += gd +VNSTAT_CONF_OPTS += --enable-image-output +else +VNSTAT_CONF_OPTS += --disable-image-output +endif + +$(eval $(autotools-package)) diff --git a/package/vo-aacenc/Config.in b/package/vo-aacenc/Config.in new file mode 100644 index 00000000..b5487dc9 --- /dev/null +++ b/package/vo-aacenc/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_VO_AACENC + bool "vo-aacenc" + help + This library contains an encoder implementation of the + Advanced Audio Coding (AAC) audio codec. The library is + based on a codec implementation by VisualOn as part of the + Stagefright framework from the Google Android project. + + http://sourceforge.net/projects/opencore-amr/ diff --git a/package/vo-aacenc/vo-aacenc.hash b/package/vo-aacenc/vo-aacenc.hash new file mode 100644 index 00000000..f0d352f8 --- /dev/null +++ b/package/vo-aacenc/vo-aacenc.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 e51a7477a359f18df7c4f82d195dab4e14e7414cbd48cf79cc195fc446850f36 vo-aacenc-0.1.3.tar.gz +sha256 8b3f1762349248d444ab9acbafe73941254e36e1064954da56bb9ddbd5873ddb COPYING diff --git a/package/vo-aacenc/vo-aacenc.mk b/package/vo-aacenc/vo-aacenc.mk new file mode 100644 index 00000000..ecdd5849 --- /dev/null +++ b/package/vo-aacenc/vo-aacenc.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# vo-aacenc +# +################################################################################ + +VO_AACENC_VERSION = 0.1.3 +VO_AACENC_SITE = http://downloads.sourceforge.net/project/opencore-amr/vo-aacenc +VO_AACENC_LICENSE = Apache-2.0 +VO_AACENC_LICENSE_FILES = COPYING +VO_AACENC_INSTALL_STAGING = YES + +VO_AACENC_CFLAGS = $(TARGET_CFLAGS) + +# arm specific asm optimizations +ifeq ($(BR2_arm),y) + +ifeq ($(BR2_ARM_CPU_HAS_ARM),y) +# vo-aacenc has ARM assembly code that cannot be compiled in Thumb2 +# mode, so we must force the traditional ARM mode. +VO_AACENC_CFLAGS += -marm + +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +VO_AACENC_CONF_OPTS += --enable-armv7neon +# mfpu=neon needed to assemble neon code +VO_AACENC_CFLAGS += -mfpu=neon +else +VO_AACENC_CONF_OPTS += --disable-armv7neon + +ifeq ($(BR2_ARM_CPU_ARMV4),) +VO_AACENC_CONF_OPTS += --enable-armv5e +else +VO_AACENC_CONF_OPTS += --disable-armv5e +endif + +endif # !neon + +else +VO_AACENC_CONF_OPTS += --disable-armv7neon --disable-armv5e +endif # has-arm +endif # arm + +VO_AACENC_CONF_ENV = \ + CFLAGS="$(VO_AACENC_CFLAGS)" + +$(eval $(autotools-package)) diff --git a/package/vorbis-tools/Config.in b/package/vorbis-tools/Config.in new file mode 100644 index 00000000..6092e01a --- /dev/null +++ b/package/vorbis-tools/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_VORBIS_TOOLS + bool "vorbis-tools" + select BR2_PACKAGE_LIBAO + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_LIBCURL + help + Standalone player, encoder and decoder for Ogg format files. + + Works also as a streaming player. + + http://www.vorbis.com/ diff --git a/package/vorbis-tools/vorbis-tools.hash b/package/vorbis-tools/vorbis-tools.hash new file mode 100644 index 00000000..a4f463e4 --- /dev/null +++ b/package/vorbis-tools/vorbis-tools.hash @@ -0,0 +1,4 @@ +# From http://downloads.xiph.org/releases/vorbis/SHA256SUMS +sha256 db7774ec2bf2c939b139452183669be84fda5774d6400fc57fde37f77624f0b0 vorbis-tools-1.4.2.tar.gz +# Locally computed +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING diff --git a/package/vorbis-tools/vorbis-tools.mk b/package/vorbis-tools/vorbis-tools.mk new file mode 100644 index 00000000..936d2d81 --- /dev/null +++ b/package/vorbis-tools/vorbis-tools.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# vorbis-tools +# +################################################################################ + +VORBIS_TOOLS_VERSION = 1.4.2 +VORBIS_TOOLS_SITE = http://downloads.xiph.org/releases/vorbis +VORBIS_TOOLS_LICENSE = GPL-2.0 +VORBIS_TOOLS_LICENSE_FILES = COPYING +VORBIS_TOOLS_CPE_ID_VENDOR = xiph +VORBIS_TOOLS_DEPENDENCIES = libao libogg libvorbis libcurl +VORBIS_TOOLS_CONF_OPTS = --program-transform-name='' + +# ogg123 calls math functions but forgets to link with libm +VORBIS_TOOLS_CONF_ENV = LIBS=-lm + +ifeq ($(BR2_PACKAGE_FLAC),y) +VORBIS_TOOLS_DEPENDENCIES += flac +endif + +ifeq ($(BR2_PACKAGE_OPUSFILE),y) +VORBIS_TOOLS_DEPENDENCIES += opusfile +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +VORBIS_TOOLS_DEPENDENCIES += speex +endif + +$(eval $(autotools-package)) diff --git a/package/vpnc/0001-Makefile-allow-to-override-the-PREFIX-variable.patch b/package/vpnc/0001-Makefile-allow-to-override-the-PREFIX-variable.patch new file mode 100644 index 00000000..49909ada --- /dev/null +++ b/package/vpnc/0001-Makefile-allow-to-override-the-PREFIX-variable.patch @@ -0,0 +1,31 @@ +From 7314d232f8e85879d8f4c311ced44ee5b21fb239 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 10 Feb 2016 23:26:27 +0100 +Subject: [PATCH] Makefile: allow to override the PREFIX variable + +Some people may not want to install in /usr/local, so this commit +makes it possible to override the PREFIX variable from the make +command line. + +Signed-off-by: Thomas Petazzoni +--- + + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 69f5aca..f9a6781 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,7 +20,7 @@ + # $Id$ + + DESTDIR= +-PREFIX=/usr/local ++PREFIX?=/usr/local + ETCDIR=/etc/vpnc + BINDIR=$(PREFIX)/bin + SBINDIR=$(PREFIX)/sbin +-- +2.6.4 + diff --git a/package/vpnc/0002-Makefile-allow-to-override-the-version.patch b/package/vpnc/0002-Makefile-allow-to-override-the-version.patch new file mode 100644 index 00000000..9d0bae3d --- /dev/null +++ b/package/vpnc/0002-Makefile-allow-to-override-the-version.patch @@ -0,0 +1,41 @@ +From 8b035de4867db4fb8da41298224d92bf5b18e86f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 10 Feb 2016 23:27:30 +0100 +Subject: [PATCH] Makefile: allow to override the version + +The mk-version script makes the assumption that the build process runs +from a SVN checkout or a Git clone of the vpnc source code. However, +this is not always the case, for example when you are building from a +tarball, but inside a larger project that is versioned with Git. + +This is typically the case when building vpnc under a tool like +Buildroot, or potentially other embedded Linux build system: the build +system tool itself is versioned in Git, downloads tarballs of software +components and builds them. + +In order to support such situations, this commit adjusts the Makefile +to allow the VERSION variable to be overriden from the make command +line. + +Signed-off-by: Thomas Petazzoni +--- + + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index f9a6781..e80ef17 100644 +--- a/Makefile ++++ b/Makefile +@@ -57,7 +57,7 @@ OBJS = $(addsuffix .o,$(basename $(SRCS))) + CRYPTO_OBJS = $(addsuffix .o,$(basename $(CRYPTO_SRCS))) + BINOBJS = $(addsuffix .o,$(BINS)) + BINSRCS = $(addsuffix .c,$(BINS)) +-VERSION := $(shell sh mk-version) ++VERSION ?= $(shell sh mk-version) + RELEASE_VERSION := $(shell cat VERSION) + + CC ?= gcc +-- +2.6.4 + diff --git a/package/vpnc/0003-Makefile-allow-passing-custom-CFLAGS-CPPFLAGS.patch b/package/vpnc/0003-Makefile-allow-passing-custom-CFLAGS-CPPFLAGS.patch new file mode 100644 index 00000000..c232206a --- /dev/null +++ b/package/vpnc/0003-Makefile-allow-passing-custom-CFLAGS-CPPFLAGS.patch @@ -0,0 +1,45 @@ +From 014a8e04a0fa775b2ade78e5f7655a1453375884 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 10 Feb 2016 23:31:12 +0100 +Subject: [PATCH] Makefile: allow passing custom CFLAGS/CPPFLAGS + +vpnc's Makefile specifies some CFLAGS and CPPFLAGS value, but it may +be needed to pass additional custom flags on the make command line. To +make this possible, we switch from a plain += operator to the +"override ... +=" operator. + +Signed-off-by: Thomas Petazzoni +--- + + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index e80ef17..7ac225a 100644 +--- a/Makefile ++++ b/Makefile +@@ -62,9 +62,9 @@ RELEASE_VERSION := $(shell cat VERSION) + + CC ?= gcc + CFLAGS ?= -O3 -g +-CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings +-CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS) +-CPPFLAGS += -DVERSION=\"$(VERSION)\" ++override CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings ++override CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS) ++override CPPFLAGS += -DVERSION=\"$(VERSION)\" + LDFLAGS ?= -g + LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD) + +@@ -73,7 +73,7 @@ LIBS += -lnsl -lresolv -lsocket + endif + ifneq (,$(findstring Apple,$(shell $(CC) --version))) + # enabled in FSF GCC, disabled by default in Apple GCC +-CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock ++override CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock + endif + + all : $(BINS) vpnc.8 +-- +2.6.4 + diff --git a/package/vpnc/0004-Makefile-provide-an-option-to-not-build-manpages.patch b/package/vpnc/0004-Makefile-provide-an-option-to-not-build-manpages.patch new file mode 100644 index 00000000..f767a59b --- /dev/null +++ b/package/vpnc/0004-Makefile-provide-an-option-to-not-build-manpages.patch @@ -0,0 +1,57 @@ +From 3c16d0b7bf809a56affd6e1a4c0998027968b91a Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson +Date: Mon, 8 Feb 2016 23:03:48 +0100 +Subject: [PATCH] Makefile: provide an option to not build manpages + +The process of generating the vpnc.8 man page consists in running the +vpnc tool itself, and parse its --long-help output. While this is +perfectly fine when building natively, it fails completely when +cross-compiling: the vpnc binary that was built cannot be executed on +the build machine. + +In order to support such situations with minimal changes, this patch +adjusts the Makefile to make it understand a MANS variable. By +default, it's defined to "vpnc.8", which means the manpage continues +to be built as usual. However, if it's overriden to be empty, then no +manpage is built. + +Signed-off-by: Thomas Petazzoni +--- + + Makefile | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 7ac225a..ea2cd41 100644 +--- a/Makefile ++++ b/Makefile +@@ -54,6 +54,7 @@ endif + SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c crypto.c $(CRYPTO_SRCS) + BINS = vpnc cisco-decrypt test-crypto + OBJS = $(addsuffix .o,$(basename $(SRCS))) ++MANS ?= vpnc.8 + CRYPTO_OBJS = $(addsuffix .o,$(basename $(CRYPTO_SRCS))) + BINOBJS = $(addsuffix .o,$(BINS)) + BINSRCS = $(addsuffix .c,$(BINS)) +@@ -76,7 +77,7 @@ ifneq (,$(findstring Apple,$(shell $(CC) --version))) + override CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock + endif + +-all : $(BINS) vpnc.8 ++all : $(BINS) $(MANS) + + vpnc : $(OBJS) vpnc.o + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) +@@ -136,7 +137,9 @@ install-common: all + install -m600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf + install -m755 vpnc-disconnect $(DESTDIR)$(SBINDIR) + install -m755 pcf2vpnc $(DESTDIR)$(BINDIR) ++ifneq ($(MANS),) + install -m644 vpnc.8 $(DESTDIR)$(MANDIR)/man8 ++endif + install -m644 pcf2vpnc.1 $(DESTDIR)$(MANDIR)/man1 + install -m644 cisco-decrypt.1 $(DESTDIR)$(MANDIR)/man1 + install -m644 COPYING $(DESTDIR)$(DOCDIR) +-- +2.6.4 + diff --git a/package/vpnc/0005-Makefile-allow-passing-a-custom-path-to-libgcrypt-co.patch b/package/vpnc/0005-Makefile-allow-passing-a-custom-path-to-libgcrypt-co.patch new file mode 100644 index 00000000..86239079 --- /dev/null +++ b/package/vpnc/0005-Makefile-allow-passing-a-custom-path-to-libgcrypt-co.patch @@ -0,0 +1,40 @@ +From 6180ca780e3a792bd632d8899c2b35991822c93d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 8 Feb 2016 23:32:57 +0100 +Subject: [PATCH] Makefile: allow passing a custom path to libgcrypt-config + +The libgcrypt-config program may not be in the PATH, so this patch +adjusts the Makefile so that it understands a LIBGCRYPT_CONFIG +variable. By default, its value is libgcrypt-config so that the +behavior is unchanged. + +Signed-off-by: Thomas Petazzoni +--- + + Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index ea2cd41..649ddfb 100644 +--- a/Makefile ++++ b/Makefile +@@ -61,13 +61,14 @@ BINSRCS = $(addsuffix .c,$(BINS)) + VERSION ?= $(shell sh mk-version) + RELEASE_VERSION := $(shell cat VERSION) + ++LIBGCRYPT_CONFIG ?= libgcrypt-config + CC ?= gcc + CFLAGS ?= -O3 -g + override CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings +-override CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS) ++override CFLAGS += $(shell $(LIBGCRYPT_CONFIG) --cflags) $(CRYPTO_CFLAGS) + override CPPFLAGS += -DVERSION=\"$(VERSION)\" + LDFLAGS ?= -g +-LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD) ++LIBS += $(shell $(LIBGCRYPT_CONFIG) --libs) $(CRYPTO_LDADD) + + ifeq ($(shell uname -s), SunOS) + LIBS += -lnsl -lresolv -lsocket +-- +2.6.4 + diff --git a/package/vpnc/0006-config.c-Replace-deprecated-SUSv3-functions-with-POS.patch b/package/vpnc/0006-config.c-Replace-deprecated-SUSv3-functions-with-POS.patch new file mode 100644 index 00000000..5efe303b --- /dev/null +++ b/package/vpnc/0006-config.c-Replace-deprecated-SUSv3-functions-with-POS.patch @@ -0,0 +1,36 @@ +From 627a45d88acf236cb36326919e4a2fa975c688bd Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Mon, 8 Feb 2016 23:05:23 +0100 +Subject: [PATCH] config.c: Replace deprecated SUSv3 functions with POSIX + equivalents + +Replace the deprecated SUSv3 function index() by its POSIX equivalent +strchr(). This is necessary to successfully build vpnc with uClibc, +when SUSv3 compatibility functions are not compiled in. + +Patch originally from Bernhard Reutner-Fischer +. + +Signed-off-by: Thomas Petazzoni +--- + + config.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/config.c b/config.c +index 57778e3..11b363b 100644 +--- a/config.c ++++ b/config.c +@@ -657,8 +657,7 @@ static const struct config_names_s { + static char *get_config_filename(const char *name, int add_dot_conf) + { + char *realname; +- +- asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : ""); ++ asprintf(&realname, "%s%s%s", strchr(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : ""); + return realname; + } + +-- +2.6.4 + diff --git a/package/vpnc/0007-sysdep.h-don-t-assume-error.h-is-available-on-all-Li.patch b/package/vpnc/0007-sysdep.h-don-t-assume-error.h-is-available-on-all-Li.patch new file mode 100644 index 00000000..41c6191e --- /dev/null +++ b/package/vpnc/0007-sysdep.h-don-t-assume-error.h-is-available-on-all-Li.patch @@ -0,0 +1,52 @@ +From 7f41ef32c8c887ee23ca83da4dfd7a4f27e01186 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 10 Feb 2016 23:09:51 +0100 +Subject: [PATCH] sysdep.h: don't assume is available on all Linux + platforms + +The current logic in sysdep.h assumes that whenever you have __linux__ +or __GLIBC__ defined, then functionality is +available. However, the functionality is a glibc-ism, not +available in more standard-conformant C libraries such as the musl C +library. With musl, __linux__ is defined (but of course not +__GLIBC__). With the current logic, sysdep.h assumes that is +available, which isn't the case. + +This patch therefore changes the logic to only use when +__GLIBC__ is defined. It fixes the following build error: + +In file included from tunip.c:87:0: +sysdep.h:41:19: fatal error: error.h: No such file or directory + #include + +Original patch from +http://git.alpinelinux.org/cgit/aports/tree/testing/vpnc/working.patch. + +Signed-off-by: Thomas Petazzoni +--- + sysdep.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/sysdep.h b/sysdep.h +index 137bf6d..fb65b31 100644 +--- a/sysdep.h ++++ b/sysdep.h +@@ -38,11 +38,14 @@ int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr); + + /***************************************************************************/ + #if defined(__linux__) || defined(__GLIBC__) ++ ++#ifdef __GLIBC__ + #include ++#define HAVE_ERROR 1 ++#endif + + #define HAVE_VASPRINTF 1 + #define HAVE_ASPRINTF 1 +-#define HAVE_ERROR 1 + #define HAVE_UNSETENV 1 + #define HAVE_SETENV 1 + #endif +-- +2.6.4 + diff --git a/package/vpnc/0008-sysdep.c-don-t-include-linux-if_tun.h-on-Linux.patch b/package/vpnc/0008-sysdep.c-don-t-include-linux-if_tun.h-on-Linux.patch new file mode 100644 index 00000000..a4cfe11b --- /dev/null +++ b/package/vpnc/0008-sysdep.c-don-t-include-linux-if_tun.h-on-Linux.patch @@ -0,0 +1,54 @@ +From 2e2eab070384834036c1458c669070ed17d81dbe Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 10 Feb 2016 23:15:36 +0100 +Subject: [PATCH] sysdep.c: don't include on Linux +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Including in sysdep.c is not necessary since sysdep.h +already includes . And this is actually +potentially harmful since both files redefine the same 'struct +ethhdr', causing the following build failure with the musl C library: + +In file included from sysdep.h:28:0, + from sysdep.c:71: +.../buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/netinet/if_ether.h:96:8: error: redefinition of ‘struct ethhdr’ + struct ethhdr { + ^ +In file included from .../buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/linux/if_tun.h:20:0, + from sysdep.c:62: +.../buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/linux/if_ether.h:138:8: note: originally defined here + struct ethhdr { + ^ + +Original patch from: +http://git.alpinelinux.org/cgit/aports/tree/testing/vpnc/working.patch + +Signed-off-by: Thomas Petazzoni +--- + sysdep.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/sysdep.c b/sysdep.c +index d8f181d..f83543d 100644 +--- a/sysdep.c ++++ b/sysdep.c +@@ -58,13 +58,11 @@ + + #if defined(__DragonFly__) + #include +-#elif defined(__linux__) +-#include + #elif defined(__APPLE__) + /* no header for tun */ + #elif defined(__CYGWIN__) + #include "tap-win32.h" +-#else ++#elif !defined(__linux__) + #include + #endif + +-- +2.6.4 + diff --git a/package/vpnc/0009-config.c-add-missing-sys-ttydefaults.h-include.patch b/package/vpnc/0009-config.c-add-missing-sys-ttydefaults.h-include.patch new file mode 100644 index 00000000..bce552e5 --- /dev/null +++ b/package/vpnc/0009-config.c-add-missing-sys-ttydefaults.h-include.patch @@ -0,0 +1,36 @@ +From 17277915af703a4767de791916621d8f59aef516 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 10 Feb 2016 23:21:26 +0100 +Subject: [PATCH] config.c: add missing include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This include is needed to get the definition of CEOT, otherwise the +build fails with: + +config.c: In function ‘vpnc_getline’: +config.c:145:25: error: ‘CEOT’ undeclared (first use in this function) + if (llen == 0 && c == CEOT) + ^ + +Signed-off-by: Thomas Petazzoni +--- + config.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/config.c b/config.c +index 11b363b..f47a534 100644 +--- a/config.c ++++ b/config.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include + +-- +2.6.4 + diff --git a/package/vpnc/Config.in b/package/vpnc/Config.in new file mode 100644 index 00000000..6455b0d8 --- /dev/null +++ b/package/vpnc/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_VPNC + bool "vpnc" + depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt + depends on !BR2_STATIC_LIBS # gnutls + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR # gnutls + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBGPG_ERROR + select BR2_PACKAGE_GNUTLS + help + Client for Cisco VPN concentrator + 3000 Series VPN Concentrator + IOS Routers + PIX/ASA Zecurity Appliances + Juniper/Netscreen + + http://www.unix-ag.uni-kl.de/~massar/vpnc + +comment "vpnc needs a toolchain w/ wchar, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/vpnc/vpnc.hash b/package/vpnc/vpnc.hash new file mode 100644 index 00000000..a1b3b3b2 --- /dev/null +++ b/package/vpnc/vpnc.hash @@ -0,0 +1,3 @@ +# locally computed hash +sha256 5929d3b7f72970c8f7850e0daba0d9d05aaaa1281c69f58ac8647be11385ede5 vpnc-0.5.3r550-2jnpr1.tar.gz +sha256 bf3ec1bd1dec31a6ab8980bfd04569f506432f35ee01e88a3910847784bc2de1 COPYING diff --git a/package/vpnc/vpnc.mk b/package/vpnc/vpnc.mk new file mode 100644 index 00000000..8db5e766 --- /dev/null +++ b/package/vpnc/vpnc.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# vpnc +# +################################################################################ + +VPNC_VERSION = 0.5.3r550-2jnpr1 +VPNC_SITE = $(call github,ndpgroup,vpnc,$(VPNC_VERSION)) +VPNC_LICENSE = GPL-2.0+ +VPNC_LICENSE_FILES = COPYING + +VPNC_DEPENDENCIES = libgcrypt libgpg-error gnutls host-pkgconf + +define VPNC_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + $(TARGET_CONFIGURE_OPTS) \ + LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config \ + VERSION=$(VPNC_VERSION) MANS= +endef + +define VPNC_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) \ + VERSION=$(VPNC_VERSION) MANS= \ + DESTDIR="$(TARGET_DIR)" PREFIX=/usr +endef + +$(eval $(generic-package)) diff --git a/package/vsftpd/0001-utmpx-builddef.patch b/package/vsftpd/0001-utmpx-builddef.patch new file mode 100644 index 00000000..07bf13c8 --- /dev/null +++ b/package/vsftpd/0001-utmpx-builddef.patch @@ -0,0 +1,49 @@ +Add build option to disable utmpx update code + +On some embedded systems the libc may have utmpx support, but the +feature would be redundant. So add a build switch to disable utmpx +updating, similar to compiling on systems without utmpx support. + +Signed-off-by: Maarten ter Huurne + +diff -ru vsftpd-3.0.2.orig/builddefs.h vsftpd-3.0.2/builddefs.h +--- vsftpd-3.0.2.orig/builddefs.h 2012-04-05 05:24:56.000000000 +0200 ++++ vsftpd-3.0.2/builddefs.h 2014-09-16 14:23:36.128003245 +0200 +@@ -4,6 +4,7 @@ + #undef VSF_BUILD_TCPWRAPPERS + #define VSF_BUILD_PAM + #undef VSF_BUILD_SSL ++#define VSF_BUILD_UTMPX + + #endif /* VSF_BUILDDEFS_H */ + +diff -ru vsftpd-3.0.2.orig/sysdeputil.c vsftpd-3.0.2/sysdeputil.c +--- vsftpd-3.0.2.orig/sysdeputil.c 2012-09-16 06:18:04.000000000 +0200 ++++ vsftpd-3.0.2/sysdeputil.c 2014-09-16 14:26:42.686887724 +0200 +@@ -1158,7 +1158,7 @@ + + #endif /* !VSF_SYSDEP_NEED_OLD_FD_PASSING */ + +-#ifndef VSF_SYSDEP_HAVE_UTMPX ++#if !defined(VSF_BUILD_UTMPX) || !defined(VSF_SYSDEP_HAVE_UTMPX) + + void + vsf_insert_uwtmp(const struct mystr* p_user_str, +@@ -1173,7 +1173,7 @@ + { + } + +-#else /* !VSF_SYSDEP_HAVE_UTMPX */ ++#else /* !VSF_BUILD_UTMPX || !VSF_SYSDEP_HAVE_UTMPX */ + + /* IMHO, the pam_unix module REALLY should be doing this in its SM component */ + /* Statics */ +@@ -1238,7 +1238,7 @@ + updwtmpx(WTMPX_FILE, &s_utent); + } + +-#endif /* !VSF_SYSDEP_HAVE_UTMPX */ ++#endif /* !VSF_BUILD_UTMPX || !VSF_SYSDEP_HAVE_UTMPX */ + + void + vsf_set_die_if_parent_dies() diff --git a/package/vsftpd/0002-fix-CVE-2015-1419.patch b/package/vsftpd/0002-fix-CVE-2015-1419.patch new file mode 100644 index 00000000..95ad017a --- /dev/null +++ b/package/vsftpd/0002-fix-CVE-2015-1419.patch @@ -0,0 +1,102 @@ +Fix CVE-2015-1419 - config option deny_file is not handled correctly. +From SUSE: https://bugzilla.suse.com/show_bug.cgi?id=915522 + +Signed-off-by: Gustavo Zacarias + +Index: vsftpd-3.0.2/ls.c +=================================================================== +--- vsftpd-3.0.2.orig/ls.c ++++ vsftpd-3.0.2/ls.c +@@ -7,6 +7,7 @@ + * Would you believe, code to handle directory listing. + */ + ++#include + #include "ls.h" + #include "access.h" + #include "defs.h" +@@ -243,11 +244,42 @@ vsf_filename_passes_filter(const struct + struct mystr temp_str = INIT_MYSTR; + struct mystr brace_list_str = INIT_MYSTR; + struct mystr new_filter_str = INIT_MYSTR; ++ struct mystr normalize_filename_str = INIT_MYSTR; ++ const char *normname; ++ const char *path; + int ret = 0; + char last_token = 0; + int must_match_at_current_pos = 1; ++ + str_copy(&filter_remain_str, p_filter_str); +- str_copy(&name_remain_str, p_filename_str); ++ ++ /* normalize filepath */ ++ path = str_strdup(p_filename_str); ++ normname = realpath(path, NULL); ++ if (normname == NULL) ++ goto out; ++ str_alloc_text(&normalize_filename_str, normname); ++ ++ if (!str_isempty (&filter_remain_str) && !str_isempty(&normalize_filename_str)) { ++ if (str_get_char_at(p_filter_str, 0) == '/') { ++ if (str_get_char_at(&normalize_filename_str, 0) != '/') { ++ str_getcwd (&name_remain_str); ++ ++ if (str_getlen(&name_remain_str) > 1) /* cwd != root dir */ ++ str_append_char (&name_remain_str, '/'); ++ ++ str_append_str (&name_remain_str, &normalize_filename_str); ++ } ++ else ++ str_copy (&name_remain_str, &normalize_filename_str); ++ } else { ++ if (str_get_char_at(p_filter_str, 0) != '{') ++ str_basename (&name_remain_str, &normalize_filename_str); ++ else ++ str_copy (&name_remain_str, &normalize_filename_str); ++ } ++ } else ++ str_copy(&name_remain_str, &normalize_filename_str); + + while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX) + { +@@ -360,6 +392,9 @@ vsf_filename_passes_filter(const struct + ret = 0; + } + out: ++ free(normname); ++ free(path); ++ str_free(&normalize_filename_str); + str_free(&filter_remain_str); + str_free(&name_remain_str); + str_free(&temp_str); +Index: vsftpd-3.0.2/str.c +=================================================================== +--- vsftpd-3.0.2.orig/str.c ++++ vsftpd-3.0.2/str.c +@@ -770,3 +770,14 @@ str_replace_unprintable(struct mystr* p_ + } + } + ++void ++str_basename (struct mystr* d_str, const struct mystr* path) ++{ ++ static struct mystr tmp; ++ ++ str_copy (&tmp, path); ++ str_split_char_reverse(&tmp, d_str, '/'); ++ ++ if (str_isempty(d_str)) ++ str_copy (d_str, path); ++} +Index: vsftpd-3.0.2/str.h +=================================================================== +--- vsftpd-3.0.2.orig/str.h ++++ vsftpd-3.0.2/str.h +@@ -101,6 +101,7 @@ void str_replace_unprintable(struct myst + int str_atoi(const struct mystr* p_str); + filesize_t str_a_to_filesize_t(const struct mystr* p_str); + unsigned int str_octal_to_uint(const struct mystr* p_str); ++void str_basename (struct mystr* d_str, const struct mystr* path); + + /* PURPOSE: Extract a line of text (delimited by \n or EOF) from a string + * buffer, starting at character position 'p_pos'. The extracted line will diff --git a/package/vsftpd/0003-Prevent-hang-in-SIGCHLD-handler.patch b/package/vsftpd/0003-Prevent-hang-in-SIGCHLD-handler.patch new file mode 100644 index 00000000..0732c5f6 --- /dev/null +++ b/package/vsftpd/0003-Prevent-hang-in-SIGCHLD-handler.patch @@ -0,0 +1,87 @@ +From 1e65a0a15f819b8bf1b551bd84f71d0da1f5a00c Mon Sep 17 00:00:00 2001 +From: Martin Sehnoutka +Date: Thu, 17 Nov 2016 13:02:27 +0100 +Subject: [PATCH] Prevent hanging in SIGCHLD handler. + +vsftpd can now handle pam_exec.so in pam.d config without hanging +in SIGCHLD handler. + +[Abdelmalek: +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1198259 +Fetched from: +https://src.fedoraproject.org/cgit/rpms/vsftpd.git/plain/0026-Prevent-hanging-in-SIGCHLD-handler.patch] +Signed-off-by: Abdelmalek Benelouezzane +--- + sysutil.c | 4 ++-- + sysutil.h | 2 +- + twoprocess.c | 13 +++++++++++-- + 3 files changed, 14 insertions(+), 5 deletions(-) + +diff --git a/sysutil.c b/sysutil.c +index 6d7cb3f..099748f 100644 +--- a/sysutil.c ++++ b/sysutil.c +@@ -608,13 +608,13 @@ vsf_sysutil_exit(int exit_code) + } + + struct vsf_sysutil_wait_retval +-vsf_sysutil_wait(void) ++vsf_sysutil_wait(int hang) + { + struct vsf_sysutil_wait_retval retval; + vsf_sysutil_memclr(&retval, sizeof(retval)); + while (1) + { +- int sys_ret = wait(&retval.exit_status); ++ int sys_ret = waitpid(-1, &retval.exit_status, hang ? 0 : WNOHANG); + if (sys_ret < 0 && errno == EINTR) + { + vsf_sysutil_check_pending_actions(kVSFSysUtilUnknown, 0, 0); +diff --git a/sysutil.h b/sysutil.h +index c145bdf..13153cd 100644 +--- a/sysutil.h ++++ b/sysutil.h +@@ -177,7 +177,7 @@ struct vsf_sysutil_wait_retval + int PRIVATE_HANDS_OFF_syscall_retval; + int PRIVATE_HANDS_OFF_exit_status; + }; +-struct vsf_sysutil_wait_retval vsf_sysutil_wait(void); ++struct vsf_sysutil_wait_retval vsf_sysutil_wait(int hang); + int vsf_sysutil_wait_reap_one(void); + int vsf_sysutil_wait_get_retval( + const struct vsf_sysutil_wait_retval* p_waitret); +diff --git a/twoprocess.c b/twoprocess.c +index 33d84dc..b1891e7 100644 +--- a/twoprocess.c ++++ b/twoprocess.c +@@ -47,8 +47,17 @@ static void + handle_sigchld(void* duff) + { + +- struct vsf_sysutil_wait_retval wait_retval = vsf_sysutil_wait(); ++ struct vsf_sysutil_wait_retval wait_retval = vsf_sysutil_wait(0); + (void) duff; ++ if (!vsf_sysutil_wait_get_exitcode(&wait_retval) && ++ !vsf_sysutil_wait_get_retval(&wait_retval)) ++ /* There was nobody to wait for, possibly caused by underlying library ++ * which created a new process through fork()/vfork() and already picked ++ * it up, e.g. by pam_exec.so or integrity check routines for libraries ++ * when FIPS mode is on (nss freebl), which can lead to calling prelink ++ * if the prelink package is installed. ++ */ ++ return; + /* Child died, so we'll do the same! Report it as an error unless the child + * exited normally with zero exit code + */ +@@ -390,7 +399,7 @@ common_do_login(struct vsf_session* p_sess, const struct mystr* p_user_str, + priv_sock_send_result(p_sess->parent_fd, PRIV_SOCK_RESULT_OK); + if (!p_sess->control_use_ssl) + { +- (void) vsf_sysutil_wait(); ++ (void) vsf_sysutil_wait(1); + } + else + { +-- +2.14.4 + diff --git a/package/vsftpd/Config.in b/package/vsftpd/Config.in new file mode 100644 index 00000000..464d6f27 --- /dev/null +++ b/package/vsftpd/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_VSFTPD + bool "vsftpd" + depends on BR2_USE_MMU # fork() + help + vsftpd is an ftp daemon written with security in mind. + http://vsftpd.beasts.org/ + +if BR2_PACKAGE_VSFTPD + +config BR2_PACKAGE_VSFTPD_UTMPX + bool "log vsftpd access to utmpx" + # musl 1.1.4 has an empty utmpx implementation and no WTMPX_FILE + depends on !BR2_TOOLCHAIN_USES_MUSL + help + Enable logging of vsftpd access to utmpx. + Note that Buildroot does not generate utmpx by default. + +endif diff --git a/package/vsftpd/S70vsftpd b/package/vsftpd/S70vsftpd new file mode 100644 index 00000000..62f9a1b7 --- /dev/null +++ b/package/vsftpd/S70vsftpd @@ -0,0 +1,33 @@ +#! /bin/sh + +set -e + +DESC="vsftpd" +NAME=vsftpd +DAEMON=/usr/sbin/$NAME + +case "$1" in + start) + printf "Starting $DESC: " + start-stop-daemon -S -b -x $DAEMON + echo "OK" + ;; + stop) + printf "Stopping $DESC: " + start-stop-daemon -K -x $DAEMON + echo "OK" + ;; + restart|force-reload) + echo "Restarting $DESC: " + $0 stop + sleep 1 + $0 start + echo "" + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/package/vsftpd/vsftpd.hash b/package/vsftpd/vsftpd.hash new file mode 100644 index 00000000..955cd308 --- /dev/null +++ b/package/vsftpd/vsftpd.hash @@ -0,0 +1,4 @@ +# Locally calculated after checking pgp signature +sha256 9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7 vsftpd-3.0.3.tar.gz +# Locally computed +sha256 c9cf119e2f9dbcf187fb805ba5aded105db26a693803636fb7228c98460ffbf2 COPYING diff --git a/package/vsftpd/vsftpd.mk b/package/vsftpd/vsftpd.mk new file mode 100644 index 00000000..49b9b191 --- /dev/null +++ b/package/vsftpd/vsftpd.mk @@ -0,0 +1,73 @@ +################################################################################ +# +# vsftpd +# +################################################################################ + +VSFTPD_VERSION = 3.0.3 +VSFTPD_SITE = https://security.appspot.com/downloads +VSFTPD_LIBS = -lcrypt +VSFTPD_LICENSE = GPL-2.0 +VSFTPD_LICENSE_FILES = COPYING +VSFTPD_CPE_ID_VENDOR = vsftpd_project + +define VSFTPD_DISABLE_UTMPX + $(SED) 's/.*VSF_BUILD_UTMPX/#undef VSF_BUILD_UTMPX/' $(@D)/builddefs.h +endef + +define VSFTPD_ENABLE_SSL + $(SED) 's/.*VSF_BUILD_SSL/#define VSF_BUILD_SSL/' $(@D)/builddefs.h +endef + +ifeq ($(BR2_PACKAGE_VSFTPD_UTMPX),) +VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_DISABLE_UTMPX +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +VSFTPD_DEPENDENCIES += openssl host-pkgconf +VSFTPD_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto` +VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +VSFTPD_DEPENDENCIES += libcap +VSFTPD_LIBS += -lcap +endif + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +VSFTPD_DEPENDENCIES += linux-pam +VSFTPD_LIBS += -lpam +endif + +define VSFTPD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(VSFTPD_LIBS)" -C $(@D) +endef + +define VSFTPD_USERS + ftp -1 ftp -1 * /home/ftp - - Anonymous FTP User +endef + +define VSFTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/vsftpd/vsftpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/vsftpd.service +endef + +define VSFTPD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/vsftpd/S70vsftpd $(TARGET_DIR)/etc/init.d/S70vsftpd +endef + +# vsftpd won't work if the jail directory is writable, it has to be +# readable only otherwise you get the following error: +# 500 OOPS: vsftpd: refusing to run with writable root inside chroot() +# That's why we have to adjust the permissions of /home/ftp +define VSFTPD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/vsftpd $(TARGET_DIR)/usr/sbin/vsftpd + test -f $(TARGET_DIR)/etc/vsftpd.conf || \ + $(INSTALL) -D -m 644 $(@D)/vsftpd.conf \ + $(TARGET_DIR)/etc/vsftpd.conf + $(INSTALL) -d -m 700 $(TARGET_DIR)/usr/share/empty + $(INSTALL) -d -m 555 $(TARGET_DIR)/home/ftp +endef + +$(eval $(generic-package)) diff --git a/package/vsftpd/vsftpd.service b/package/vsftpd/vsftpd.service new file mode 100644 index 00000000..eba61add --- /dev/null +++ b/package/vsftpd/vsftpd.service @@ -0,0 +1,12 @@ +[Unit] +Description=vsftpd FTP server +After=network.target + +[Service] +Type=simple +ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf +ExecReload=/bin/kill -HUP $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/vte/Config.in b/package/vte/Config.in new file mode 100644 index 00000000..96de3d38 --- /dev/null +++ b/package/vte/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_VTE + bool "vte" + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS # libgtk3 -> host-libgtk3 -> host-librsvg + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND || \ + BR2_PACKAGE_HAS_LIBGL + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBGTK3 + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_PCRE2 + help + VTE is a library (libvte) implementing a terminal emulator + widget for GTK+, and a minimal sample application (vte) + using that. Vte is mainly used in gnome-terminal, but + can also be used to embed a console/terminal in games, + editors, IDEs, etc. + + http://github.com/GNOME/vte + +comment "vte needs a toolchain w/ wchar, threads, C++, gcc >= 4.8" + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +comment "vte needs an OpenGL or an OpenGL-EGL/wayland backend" + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_PACKAGE_HAS_LIBEGL_WAYLAND && \ + !BR2_PACKAGE_HAS_LIBGL diff --git a/package/vte/vte.hash b/package/vte/vte.hash new file mode 100644 index 00000000..3fbc5aca --- /dev/null +++ b/package/vte/vte.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 a3a9fb182740b392a45cd3f46fa61a985f68bb6b1817b52daec22034c46158c3 vte-0.48.3.tar.xz +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING diff --git a/package/vte/vte.mk b/package/vte/vte.mk new file mode 100644 index 00000000..6c8d1433 --- /dev/null +++ b/package/vte/vte.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# vte +# +################################################################################ + +VTE_VERSION = 0.48.3 +VTE_SOURCE = vte-$(VTE_VERSION).tar.xz +VTE_SITE = http://ftp.gnome.org/pub/gnome/sources/vte/0.48 +VTE_DEPENDENCIES = host-intltool host-pkgconf libgtk3 libxml2 pcre2 +VTE_LICENSE = LGPL-2.1+ +VTE_LICENSE_FILES = COPYING +VTE_CONF_OPTS += --disable-vala + +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) +VTE_CONF_OPTS += --enable-introspection +VTE_DEPENDENCIES += gobject-introspection +else +VTE_CONF_OPTS += --disable-introspection +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +VTE_CONF_OPTS += --with-gnutls +VTE_DEPENDENCIES += gnutls +else +VTE_CONF_OPTS += --without-gnutls +endif + +$(eval $(autotools-package)) diff --git a/package/vtun/0001-fix-installation.patch b/package/vtun/0001-fix-installation.patch new file mode 100644 index 00000000..d9659fa8 --- /dev/null +++ b/package/vtun/0001-fix-installation.patch @@ -0,0 +1,44 @@ +Makefile.in: fix installation steps + +Not sure what the reason for that patch is, but originally added by Ulf +Samuelsson , when upgrading from 2.6.x to 3.0.2. + +yann.morin.1998@free.fr: the initial commit in the Buildroot tree had the +SoB by Ulf, but it was not explicitly reproduced here in the patch; so I +added it here directly in the patch. + +Somewhat-signed-off-by: Ulf Samuelsson +Signed-off-by: "Yann E. MORIN" +diff -durN vtun-3.0.3.orig/Makefile.in vtun-3.0.3/Makefile.in +--- vtun-3.0.3.orig/Makefile.in 2012-07-09 06:55:38.000000000 +0200 ++++ vtun-3.0.3/Makefile.in 2013-02-16 23:28:47.034036869 +0100 +@@ -28,7 +28,7 @@ + LEXFLAGS = -t + + INSTALL = @INSTALL@ +-INSTALL_OWNER = -o root -g 0 ++INSTALL_OWNER = + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -89,16 +89,15 @@ + + install_config: + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR) +- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \ +- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \ +- fi ++ $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); ++ $(INSTALL) -m 600 $(INSTALL_OWNER) scripts/vtund-start.conf $(DESTDIR)$(ETC_DIR); + + install: vtund install_config install_man +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(STAT_DIR) + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(LOCK_DIR) + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(SBIN_DIR) + $(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(DESTDIR)$(SBIN_DIR) +- $(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund ++ $(INSTALL) -m 755 -D $(INSTALL_OWNER) scripts/vtund.rc.debian \ ++ $(DESTDIR)$(ETC_DIR)/init.d/S90vtun + + # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/package/vtun/0002-fix-ssl-headers-checks.patch b/package/vtun/0002-fix-ssl-headers-checks.patch new file mode 100644 index 00000000..765411af --- /dev/null +++ b/package/vtun/0002-fix-ssl-headers-checks.patch @@ -0,0 +1,47 @@ +configure.in: do not hard-code search patch for SSL headers + +Do. Not. Do. That. It breaks cross-compilation. + +Also use the SSL headers dir to look for blowfish headers. + +Signed-off-by: "Yann E. MORIN" + +diff -durN vtun-3.0.3.orig/configure.in vtun-3.0.3/configure.in +--- vtun-3.0.3.orig/configure.in 2009-03-29 12:08:51.000000000 +0200 ++++ vtun-3.0.3/configure.in 2013-02-16 23:44:44.004339680 +0100 +@@ -166,7 +166,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for md5 Library and Header files ... ) + AC_SEARCH_HEADERS(md5.h, +- $SSL_HDR_DIR /usr/include/openssl "" /usr/include /usr/include/ssl /usr/local/include /usr/local/ssl/include /usr/include/sys, ++ $SSL_HDR_DIR "" , + , + AC_MSG_ERROR( SSL headers not found. ) + ) +@@ -176,7 +176,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for blowfish Library and Header files ... ) + AC_SEARCH_HEADERS(blowfish.h, +- $BLOWFISH_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto, ++ $BLOWFISH_HDR_DIR $SSL_HDR_DIR, + AC_CHECK_LIB(crypto, BF_set_key, + [ + LIBS="$LIBS -lcrypto" +@@ -193,7 +193,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for AES Library and Header files ... ) + AC_SEARCH_HEADERS(aes.h, +- $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto, ++ $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, AES_set_encrypt_key, + [ + AC_DEFINE(HAVE_SSL_AES) +@@ -208,7 +208,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for EVP Library and Header files ... ) + AC_SEARCH_HEADERS(evp.h, +- $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto, ++ $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, EVP_EncryptInit, + [ + AC_DEFINE(HAVE_SSL_EVP) diff --git a/package/vtun/0003-openssl11.patch b/package/vtun/0003-openssl11.patch new file mode 100644 index 00000000..2c6bb812 --- /dev/null +++ b/package/vtun/0003-openssl11.patch @@ -0,0 +1,294 @@ +Fix build with OpenSSL 1.1.x + +Extracted vtun-openssl.patch from +http://dl.fedoraproject.org/pub/fedora/linux/releases/27/Everything/source/tree/Packages/v/vtun-3.0.4-4.fc27.src.rpm + +Signed-off-by: Bernd Kuhls + +diff -NarU5 a/lfd_encrypt.c b/lfd_encrypt.c +--- a/lfd_encrypt.c 2016-10-01 17:27:51.000000000 -0400 ++++ b/lfd_encrypt.c 2017-03-20 08:43:48.013308435 -0400 +@@ -93,15 +93,15 @@ + static int dec_init_first_time; + static unsigned long sequence_num; + static char * pkey; + static char * iv_buf; + +-static EVP_CIPHER_CTX ctx_enc; /* encrypt */ +-static EVP_CIPHER_CTX ctx_dec; /* decrypt */ ++static EVP_CIPHER_CTX *ctx_enc; /* encrypt */ ++static EVP_CIPHER_CTX *ctx_dec; /* decrypt */ + +-static EVP_CIPHER_CTX ctx_enc_ecb; /* sideband ecb encrypt */ +-static EVP_CIPHER_CTX ctx_dec_ecb; /* sideband ecb decrypt */ ++static EVP_CIPHER_CTX *ctx_enc_ecb; /* sideband ecb encrypt */ ++static EVP_CIPHER_CTX *ctx_dec_ecb; /* sideband ecb decrypt */ + + static int send_msg(int len, char *in, char **out); + static int recv_msg(int len, char *in, char **out); + static int send_ib_mesg(int *len, char **in); + static int recv_ib_mesg(int *len, char **in); +@@ -180,37 +180,37 @@ + case VTUN_ENC_AES256CBC: + blocksize = 16; + keysize = 32; + sb_init = 1; + cipher_type = EVP_aes_256_ecb(); +- pctx_enc = &ctx_enc_ecb; +- pctx_dec = &ctx_dec_ecb; ++ pctx_enc = ctx_enc_ecb; ++ pctx_dec = ctx_dec_ecb; + break; + + case VTUN_ENC_AES256ECB: + blocksize = 16; + keysize = 32; +- pctx_enc = &ctx_enc; +- pctx_dec = &ctx_dec; ++ pctx_enc = ctx_enc; ++ pctx_dec = ctx_dec; + cipher_type = EVP_aes_256_ecb(); + strcpy(cipher_name,"AES-256-ECB"); + break; + case VTUN_ENC_AES128OFB: + case VTUN_ENC_AES128CFB: + case VTUN_ENC_AES128CBC: + blocksize = 16; + keysize = 16; + sb_init=1; + cipher_type = EVP_aes_128_ecb(); +- pctx_enc = &ctx_enc_ecb; +- pctx_dec = &ctx_dec_ecb; ++ pctx_enc = ctx_enc_ecb; ++ pctx_dec = ctx_dec_ecb; + break; + case VTUN_ENC_AES128ECB: + blocksize = 16; + keysize = 16; +- pctx_enc = &ctx_enc; +- pctx_dec = &ctx_dec; ++ pctx_enc = ctx_enc; ++ pctx_dec = ctx_dec; + cipher_type = EVP_aes_128_ecb(); + strcpy(cipher_name,"AES-128-ECB"); + break; + + case VTUN_ENC_BF256OFB: +@@ -219,20 +219,20 @@ + blocksize = 8; + keysize = 32; + var_key = 1; + sb_init = 1; + cipher_type = EVP_bf_ecb(); +- pctx_enc = &ctx_enc_ecb; +- pctx_dec = &ctx_dec_ecb; ++ pctx_enc = ctx_enc_ecb; ++ pctx_dec = ctx_dec_ecb; + break; + + case VTUN_ENC_BF256ECB: + blocksize = 8; + keysize = 32; + var_key = 1; +- pctx_enc = &ctx_enc; +- pctx_dec = &ctx_dec; ++ pctx_enc = ctx_enc; ++ pctx_dec = ctx_dec; + cipher_type = EVP_bf_ecb(); + strcpy(cipher_name,"Blowfish-256-ECB"); + break; + + case VTUN_ENC_BF128OFB: +@@ -241,26 +241,28 @@ + blocksize = 8; + keysize = 16; + var_key = 1; + sb_init = 1; + cipher_type = EVP_bf_ecb(); +- pctx_enc = &ctx_enc_ecb; +- pctx_dec = &ctx_dec_ecb; ++ pctx_enc = ctx_enc_ecb; ++ pctx_dec = ctx_dec_ecb; + break; + case VTUN_ENC_BF128ECB: /* blowfish 128 ecb is the default */ + default: + blocksize = 8; + keysize = 16; + var_key = 1; +- pctx_enc = &ctx_enc; +- pctx_dec = &ctx_dec; ++ pctx_enc = ctx_enc; ++ pctx_dec = ctx_dec; + cipher_type = EVP_bf_ecb(); + strcpy(cipher_name,"Blowfish-128-ECB"); + break; + } /* switch(host->cipher) */ + + if (prep_key(&pkey, keysize, host) != 0) return -1; ++ pctx_enc = EVP_CIPHER_CTX_new(); ++ pctx_dec = EVP_CIPHER_CTX_new(); + EVP_CIPHER_CTX_init(pctx_enc); + EVP_CIPHER_CTX_init(pctx_dec); + EVP_EncryptInit_ex(pctx_enc, cipher_type, NULL, NULL, NULL); + EVP_DecryptInit_ex(pctx_dec, cipher_type, NULL, NULL, NULL); + if (var_key) +@@ -292,14 +294,14 @@ + free_key(pkey); pkey = NULL; + + lfd_free(enc_buf); enc_buf = NULL; + lfd_free(dec_buf); dec_buf = NULL; + +- EVP_CIPHER_CTX_cleanup(&ctx_enc); +- EVP_CIPHER_CTX_cleanup(&ctx_dec); +- EVP_CIPHER_CTX_cleanup(&ctx_enc_ecb); +- EVP_CIPHER_CTX_cleanup(&ctx_dec_ecb); ++ EVP_CIPHER_CTX_free(ctx_enc); ++ EVP_CIPHER_CTX_free(ctx_dec); ++ EVP_CIPHER_CTX_free(ctx_enc_ecb); ++ EVP_CIPHER_CTX_free(ctx_dec_ecb); + + return 0; + } + + static int encrypt_buf(int len, char *in, char **out) +@@ -321,11 +323,11 @@ + + memset(in_ptr+len, pad, pad); + outlen=len+pad; + if (pad == blocksize) + RAND_bytes(in_ptr+len, blocksize-1); +- EVP_EncryptUpdate(&ctx_enc, out_ptr, &outlen, in_ptr, len+pad); ++ EVP_EncryptUpdate(ctx_enc, out_ptr, &outlen, in_ptr, len+pad); + *out = enc_buf; + + sequence_num++; + + return outlen+msg_len; +@@ -341,11 +343,11 @@ + in = *out; + in_ptr = in; + + outlen=len; + if (!len) return 0; +- EVP_DecryptUpdate(&ctx_dec, out_ptr, &outlen, in_ptr, len); ++ EVP_DecryptUpdate(ctx_dec, out_ptr, &outlen, in_ptr, len); + recv_ib_mesg(&outlen, &out_ptr); + if (!outlen) return 0; + tmp_ptr = out_ptr + outlen; tmp_ptr--; + pad = *tmp_ptr; + if (pad < 1 || pad > blocksize) { +@@ -429,17 +431,18 @@ + /* if we're here, something weird's going on */ + return -1; + break; + } /* switch(cipher) */ + +- EVP_CIPHER_CTX_init(&ctx_enc); +- EVP_EncryptInit_ex(&ctx_enc, cipher_type, NULL, NULL, NULL); ++ ctx_enc = EVP_CIPHER_CTX_new(); ++ EVP_CIPHER_CTX_init(ctx_enc); ++ EVP_EncryptInit_ex(ctx_enc, cipher_type, NULL, NULL, NULL); + if (var_key) +- EVP_CIPHER_CTX_set_key_length(&ctx_enc, keysize); +- EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, pkey, NULL); +- EVP_EncryptInit_ex(&ctx_enc, NULL, NULL, NULL, iv); +- EVP_CIPHER_CTX_set_padding(&ctx_enc, 0); ++ EVP_CIPHER_CTX_set_key_length(ctx_enc, keysize); ++ EVP_EncryptInit_ex(ctx_enc, NULL, NULL, pkey, NULL); ++ EVP_EncryptInit_ex(ctx_enc, NULL, NULL, NULL, iv); ++ EVP_CIPHER_CTX_set_padding(ctx_enc, 0); + if (enc_init_first_time) + { + sprintf(tmpstr,"%s encryption initialized", cipher_name); + vtun_syslog(LOG_INFO, tmpstr); + enc_init_first_time = 0; +@@ -519,17 +522,18 @@ + /* if we're here, something weird's going on */ + return -1; + break; + } /* switch(cipher) */ + +- EVP_CIPHER_CTX_init(&ctx_dec); +- EVP_DecryptInit_ex(&ctx_dec, cipher_type, NULL, NULL, NULL); ++ ctx_dec = EVP_CIPHER_CTX_new(); ++ EVP_CIPHER_CTX_init(ctx_dec); ++ EVP_DecryptInit_ex(ctx_dec, cipher_type, NULL, NULL, NULL); + if (var_key) +- EVP_CIPHER_CTX_set_key_length(&ctx_dec, keysize); +- EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, pkey, NULL); +- EVP_DecryptInit_ex(&ctx_dec, NULL, NULL, NULL, iv); +- EVP_CIPHER_CTX_set_padding(&ctx_dec, 0); ++ EVP_CIPHER_CTX_set_key_length(ctx_dec, keysize); ++ EVP_DecryptInit_ex(ctx_dec, NULL, NULL, pkey, NULL); ++ EVP_DecryptInit_ex(ctx_dec, NULL, NULL, NULL, iv); ++ EVP_CIPHER_CTX_set_padding(ctx_dec, 0); + if (dec_init_first_time) + { + sprintf(tmpstr,"%s decryption initialized", cipher_name); + vtun_syslog(LOG_INFO, tmpstr); + dec_init_first_time = 0; +@@ -557,11 +561,11 @@ + memset(iv,0,blocksize); free(iv); iv = NULL; + RAND_bytes(in_ptr, in - in_ptr); + + in_ptr = in - blocksize*2; + outlen = blocksize*2; +- EVP_EncryptUpdate(&ctx_enc_ecb, in_ptr, ++ EVP_EncryptUpdate(ctx_enc_ecb, in_ptr, + &outlen, in_ptr, blocksize*2); + *out = in_ptr; + len = outlen; + cipher_enc_state = CIPHER_SEQUENCE; + break; +@@ -584,11 +588,11 @@ + { + case CIPHER_INIT: + in_ptr = in; + iv = malloc(blocksize); + outlen = blocksize*2; +- EVP_DecryptUpdate(&ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2); ++ EVP_DecryptUpdate(ctx_dec_ecb, in_ptr, &outlen, in_ptr, blocksize*2); + + if ( !strncmp(in_ptr, "ivec", 4) ) + { + memcpy(iv, in_ptr+4, blocksize); + cipher_dec_init(iv); +@@ -627,11 +631,11 @@ + "Max. gibberish threshold reached"); + #endif + if (cipher_enc_state != CIPHER_INIT) + { + cipher_enc_state = CIPHER_INIT; +- EVP_CIPHER_CTX_cleanup(&ctx_enc); ++ EVP_CIPHER_CTX_free(ctx_enc); + #ifdef LFD_ENCRYPT_DEBUG + vtun_syslog(LOG_INFO, + "Forcing local encryptor re-init"); + #endif + } +@@ -708,11 +712,11 @@ + *len -= blocksize; + + if (cipher_enc_state != CIPHER_INIT) + { + cipher_enc_state = CIPHER_INIT; +- EVP_CIPHER_CTX_cleanup(&ctx_enc); ++ EVP_CIPHER_CTX_free(ctx_enc); + } + #ifdef LFD_ENCRYPT_DEBUG + vtun_syslog(LOG_INFO, "Remote requests encryptor re-init"); + #endif + } +@@ -722,11 +726,11 @@ + + if (cipher_dec_state != CIPHER_INIT && + cipher_enc_state != CIPHER_REQ_INIT && + cipher_enc_state != CIPHER_INIT) + { +- EVP_CIPHER_CTX_cleanup (&ctx_dec); ++ EVP_CIPHER_CTX_free (ctx_dec); + cipher_dec_state = CIPHER_INIT; + cipher_enc_state = CIPHER_REQ_INIT; + } + #ifdef LFD_ENCRYPT_DEBUG + vtun_syslog(LOG_INFO, "Local decryptor out of sync"); diff --git a/package/vtun/Config.in b/package/vtun/Config.in new file mode 100644 index 00000000..d63e7c76 --- /dev/null +++ b/package/vtun/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_VTUN + bool "vtun" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LZO + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + Tool for easily creating Virtual Tunnels over TCP/IP networks + with traffic shaping, compression, and encryption. + + It supports IP, PPP, SLIP, Ethernet and other tunnel types. + + http://vtun.sourceforge.net/ diff --git a/package/vtun/vtun.hash b/package/vtun/vtun.hash new file mode 100644 index 00000000..363c9809 --- /dev/null +++ b/package/vtun/vtun.hash @@ -0,0 +1,6 @@ +# From https://sourceforge.net/projects/vtun/files/vtun/3.0.4/ +md5 f952c5895ae8f40235aaad9a8f41a4bd vtun-3.0.4.tar.gz +sha1 2335c21b56fadf9ce851dd7f342fb0ed4f522c47 vtun-3.0.4.tar.gz +# Locally computed: +sha256 abf8df6b15e3febeaaeae2ce24ead7105eb1537ad4ec0d830c83cbb684fd98b9 vtun-3.0.4.tar.gz +sha256 5692a9a69dc5abc1aa9cbc54899d114b65c4cefbd9d7fcecc304316a2f26ced3 README.OpenSSL diff --git a/package/vtun/vtun.mk b/package/vtun/vtun.mk new file mode 100644 index 00000000..35b0dded --- /dev/null +++ b/package/vtun/vtun.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# vtun +# +################################################################################ + +VTUN_VERSION = 3.0.4 +VTUN_SITE = http://downloads.sourceforge.net/project/vtun/vtun/$(VTUN_VERSION) +VTUN_LICENSE = GPL-2.0+ with OpenSSL exception +VTUN_LICENSE_FILES = README.OpenSSL +VTUN_DEPENDENCIES = host-bison host-flex host-pkgconf zlib lzo openssl +VTUN_AUTORECONF = YES + +VTUN_CONF_OPTS = \ + --with-ssl-headers=$(STAGING_DIR)/usr/include/openssl \ + --with-lzo-headers=$(STAGING_DIR)/usr/include/lzo \ + --with-lzo-lib=$(STAGING_DIR)/usr/lib + +# Assumes old-style gcc inline symbol visibility rules +VTUN_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu89" + +# configure.in forgets to link to dependent libraries of openssl breaking static +# linking +VTUN_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl` + +$(eval $(autotools-package)) diff --git a/package/vuejs/Config.in b/package/vuejs/Config.in new file mode 100644 index 00000000..6456d288 --- /dev/null +++ b/package/vuejs/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_VUEJS + bool "vuejs" + help + VueJS web application framework. + + http://vuejs.org diff --git a/package/vuejs/vuejs.hash b/package/vuejs/vuejs.hash new file mode 100644 index 00000000..db4a5bbe --- /dev/null +++ b/package/vuejs/vuejs.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 a69f04bf138af09a956150675151edb9354aeec8bd627c21cbcfa646248214fa vue-3.0.5.tgz diff --git a/package/vuejs/vuejs.mk b/package/vuejs/vuejs.mk new file mode 100644 index 00000000..43b45e00 --- /dev/null +++ b/package/vuejs/vuejs.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# vuejs +# +################################################################################ + +VUEJS_VERSION = 3.0.5 +VUEJS_SOURCE = vue-$(VUEJS_VERSION).tgz +VUEJS_SITE = https://registry.npmjs.org/vue/- +VUEJS_LICENSE = MIT + +# Install .min.js as .js +define VUEJS_INSTALL_TARGET_CMDS + $(INSTALL) -m 644 -D $(@D)/dist/vue.global.prod.js \ + $(TARGET_DIR)/var/www/vue.js +endef + +$(eval $(generic-package)) diff --git a/package/w_scan/0001-musl.patch b/package/w_scan/0001-musl.patch new file mode 100644 index 00000000..46d67677 --- /dev/null +++ b/package/w_scan/0001-musl.patch @@ -0,0 +1,26 @@ +Fix musl build + +Signed-off-by: Bernd Kuhls + +diff -uNr w_scan-20141122.org/descriptors.h w_scan-20141122/descriptors.h +--- w_scan-20141122.org/descriptors.h 2014-11-22 09:49:26.000000000 +0100 ++++ w_scan-20141122/descriptors.h 2016-01-24 14:05:21.000000000 +0100 +@@ -28,6 +28,7 @@ + #ifndef __DESCRIPTORS_H__ + #define __DESCRIPTORS_H__ + ++#include + #include "extended_frontend.h" + + /****************************************************************************** +diff -uNr w_scan-20141122.org/version.h w_scan-20141122/version.h +--- w_scan-20141122.org/version.h 2014-11-22 11:59:56.000000000 +0100 ++++ w_scan-20141122/version.h 2016-01-24 14:06:33.000000000 +0100 +@@ -1,6 +1,6 @@ + /* AUTOMATICALLY GENERATED - DO NOT EDIT MANUALLY */ + #ifndef W_SCAN_VERSION_H + #define W_SCAN_VERSION_H +-uint version=20170107; ++unsigned int version=20170107; + #endif + diff --git a/package/w_scan/0002-si_types-h-fix-build-with-gcc-10.patch b/package/w_scan/0002-si_types-h-fix-build-with-gcc-10.patch new file mode 100644 index 00000000..50d24881 --- /dev/null +++ b/package/w_scan/0002-si_types-h-fix-build-with-gcc-10.patch @@ -0,0 +1,37 @@ +si_types.h: fix build with gcc 10 + +Drop service_t, p_service_t, transponder_t and p_transponder_t to avoid +the following build failure with gcc 10 (which defaults to -fno-common): + +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/arm-buildroot-linux-gnueabihf-gcc -Wall -Wextra -Wno-comment -Wswitch-default -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -lrt -o w_scan atsc_psip_section.o countries.o descriptors.o diseqc.o dump-dvbscan.o dump-vdr.o dump-xine.o dump-mplayer.o dump-vlc-m3u.o dvbscan.o lnb.o parse-dvbscan.o satellites.o scan.o section.o tools.o emulate.o dump-xml.o iconv_codes.o char-coding.o +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: descriptors.o:(.bss+0x404): multiple definition of `p_transponder_t'; countries.o:(.bss+0x0): first defined here +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: descriptors.o:(.bss+0x408): multiple definition of `transponder_t'; countries.o:(.bss+0x4): first defined here +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: descriptors.o:(.bss+0x480): multiple definition of `p_service_t'; countries.o:(.bss+0x7c): first defined here +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: descriptors.o:(.bss+0x484): multiple definition of `service_t'; countries.o:(.bss+0x80): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/5640442cb4ba06bcbcf31540a64f5665862d39f7 + +Signed-off-by: Fabrice Fontaine + +diff -Nura w_scan-20170107.orig/si_types.h w_scan-20170107/si_types.h +--- w_scan-20170107.orig/si_types.h 2020-09-20 11:09:56.776963441 +0200 ++++ w_scan-20170107/si_types.h 2020-09-20 11:13:13.149232478 +0200 +@@ -114,7 +114,7 @@ + uint32_t logical_channel_number; + uint8_t running; + void * priv; +-} service_t, * p_service_t; ++}; + + /******************************************************************************* + /* transponder type. +@@ -201,7 +201,7 @@ + /*----------------------------*/ + char * network_name; + network_change_t network_change; +-} __attribute__((packed)) transponder_t, * p_transponder_t; ++} __attribute__((packed)); + + /******************************************************************************* + /* satellite channel routing type. diff --git a/package/w_scan/Config.in b/package/w_scan/Config.in new file mode 100644 index 00000000..d5471200 --- /dev/null +++ b/package/w_scan/Config.in @@ -0,0 +1,14 @@ +comment "w_scan needs a toolchain w/ headers >= 3.7" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + +config BR2_PACKAGE_W_SCAN + bool "w_scan" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + w_scan is a small command line utility used to perform + frequency scans for DVB and ATSC transmissions. It is + capable of creating channels.conf files (in different output + formats !) as well as initial tuning data for scan. + + https://www.gen2vdr.de/wirbel/w_scan/index2.html diff --git a/package/w_scan/w_scan.hash b/package/w_scan/w_scan.hash new file mode 100644 index 00000000..fcb0e611 --- /dev/null +++ b/package/w_scan/w_scan.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 38e0f38a7bf06cff6d6ea01652ad4ee60da2cb0e937360468f936da785b46ffe w_scan-20170107.tar.bz2 +sha256 ddb9db7630752f8fdc6898f7c99a99eaeeac5213627ecb093df9c82f56175dc7 COPYING diff --git a/package/w_scan/w_scan.mk b/package/w_scan/w_scan.mk new file mode 100644 index 00000000..c63f20cc --- /dev/null +++ b/package/w_scan/w_scan.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# w_scan +# +################################################################################ + +W_SCAN_VERSION = 20170107 +W_SCAN_SOURCE = w_scan-$(W_SCAN_VERSION).tar.bz2 +W_SCAN_SITE = http://wirbel.htpc-forum.de/w_scan +W_SCAN_LICENSE = GPL-2.0+ +W_SCAN_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +W_SCAN_DEPENDENCIES += libiconv +W_SCAN_CONF_ENV += LIBS=-liconv +endif + +$(eval $(autotools-package)) diff --git a/package/waf/waf.hash b/package/waf/waf.hash new file mode 100644 index 00000000..e9d387e7 --- /dev/null +++ b/package/waf/waf.hash @@ -0,0 +1,7 @@ +# Locally computed +sha1 494ada411468129ed229f946ecec3048400e320b waf-2.0.22 +sha256 0a09ad26a2cfc69fa26ab871cb558165b60374b5a653ff556a0c6aca63a00df1 waf-2.0.22 + +# The waf script also contains its license, but is renamed `waf` in the extract +# step, so this is a synonym for the above, to check WAF_LICENSE +sha256 0a09ad26a2cfc69fa26ab871cb558165b60374b5a653ff556a0c6aca63a00df1 waf diff --git a/package/waf/waf.mk b/package/waf/waf.mk new file mode 100644 index 00000000..5cc0dc37 --- /dev/null +++ b/package/waf/waf.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# waf +# +################################################################################ + +WAF_VERSION = 2.0.22 +WAF_SOURCE = waf-$(WAF_VERSION) +WAF_SITE = https://waf.io +WAF_LICENSE = BSD-3-Clause +WAF_LICENSE_FILES = waf + +define HOST_WAF_EXTRACT_CMDS + $(INSTALL) -D -m 0755 $(HOST_WAF_DL_DIR)/waf-$(WAF_VERSION) $(@D)/waf +endef + +define HOST_WAF_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/waf $(HOST_DIR)/bin/waf +endef + +$(eval $(host-generic-package)) diff --git a/package/waffle/0001-cmake-forward-cflags-from-.pc-files-to-waffle-cflags.patch b/package/waffle/0001-cmake-forward-cflags-from-.pc-files-to-waffle-cflags.patch new file mode 100644 index 00000000..126aa933 --- /dev/null +++ b/package/waffle/0001-cmake-forward-cflags-from-.pc-files-to-waffle-cflags.patch @@ -0,0 +1,40 @@ +From 8b0ae49c8bea78df73c3ecae0059d54a95c561fa Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 24 Dec 2017 00:11:45 +0100 +Subject: [PATCH] cmake: forward cflags from *.pc files to waffle cflags + +When building mesa egl without x11 and gles2 the headers need a +EGL_NO_X11 define to avoid including X11 headers. + +This define EGL_NO_X11 is lost while building waffle +since CFLAGS defined by pc files are not used. + +EGL_NO_X11 is defined in CFLAGS from egl.pc. + +Signed-off-by: Romain Naour +--- + src/waffle/CMakeLists.txt | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt +index d76e029..2ff72c8 100644 +--- a/src/waffle/CMakeLists.txt ++++ b/src/waffle/CMakeLists.txt +@@ -5,6 +5,14 @@ + add_definitions( + -DWAFFLE_API_VERSION=${waffle_api_version} + -DWAFFLE_API_EXPERIMENTAL ++ ${egl_CFLAGS} ++ ${gbm_CFLAGS} ++ ${gl_CFLAGS} ++ ${GLEXT_CFLAGS} ++ ${libudev_CFLAGS} ++ ${wayland-client_CFLAGS} ++ ${wayland-egl_CFLAGS} ++ ${x11-xcb_CFLAGS} + ) + + include_directories( +-- +2.14.3 + diff --git a/package/waffle/Config.in b/package/waffle/Config.in new file mode 100644 index 00000000..ad622e95 --- /dev/null +++ b/package/waffle/Config.in @@ -0,0 +1,47 @@ +config BR2_PACKAGE_WAFFLE_SUPPORTS_GLX + bool + default y if BR2_PACKAGE_HAS_LIBGL && BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND + bool + default y if BR2_PACKAGE_WAYLAND && BR2_PACKAGE_HAS_LIBEGL_WAYLAND + +config BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL + bool + default y if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_WAFFLE_SUPPORTS_GBM + bool + # mesa3d is for now the only GBM provider, and it is enabled + # together with its EGL support + default y if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_MESA3D_OPENGL_EGL && BR2_PACKAGE_HAS_UDEV + +config BR2_PACKAGE_WAFFLE + bool "waffle" + depends on BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || \ + BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND || \ + BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL || \ + BR2_PACKAGE_WAFFLE_SUPPORTS_GBM + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL + help + Waffle is a cross-platform library that allows one to defer + selection of an OpenGL API and of window system until + runtime. For example, on Linux, Waffle enables an application + to select X11/EGL with an OpenGL 3.3 core profile, Wayland + with OpenGL ES2, and other window system / API combinations. + + Waffle's immediate goal is to enable Piglit [1] to test + multiple OpenGL flavors in a cross-platform way, and to allow + each Piglit test to choose its OpenGL API and window system + at runtime. A future goal is to enable the ability to record + (with another tool such APITrace [2]) an application's OpenGL + calls on one operating system or window system, and then + replay that trace on a different system. + + For more information, visit to Waffle's website. + + [1] http://piglit.freedesktop.org + [2] http://github.com/apitrace/apitrace#readme + + http://www.waffle-gl.org diff --git a/package/waffle/waffle.hash b/package/waffle/waffle.hash new file mode 100644 index 00000000..84821312 --- /dev/null +++ b/package/waffle/waffle.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 234e65bdd2dd8f7d3bc8e9ad1a7cc80fce78a1deed3a04fe7f1d2c2edac0cd8a waffle-v1.6.1.tar.bz2 +sha256 630844d1911c8a1b7b888a1de9097c4860b7e381362fd5aa64141d58ab7ecc9b LICENSE.txt diff --git a/package/waffle/waffle.mk b/package/waffle/waffle.mk new file mode 100644 index 00000000..3340dc1c --- /dev/null +++ b/package/waffle/waffle.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# waffle +# +################################################################################ + +WAFFLE_VERSION = 1.6.1 +WAFFLE_SOURCE = waffle-v$(WAFFLE_VERSION).tar.bz2 +WAFFLE_SITE = https://gitlab.freedesktop.org/mesa/waffle/-/archive/v$(WAFFLE_VERSION) +WAFFLE_INSTALL_STAGING = YES +WAFFLE_LICENSE = BSD-2-Clause +WAFFLE_LICENSE_FILES = LICENSE.txt + +WAFFLE_DEPENDENCIES = host-pkgconf + +WAFFLE_CONF_OPTS = -Dwaffle_build_tests=OFF \ + -Dwaffle_build_examples=OFF \ + -Dwaffle_build_manpages=OFF \ + -Dwaffle_build_htmldocs=OFF \ + -Dwaffle_has_nacl=OFF + +ifeq ($(BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND),y) +WAFFLE_DEPENDENCIES += libegl wayland +WAFFLE_CONF_OPTS += -Dwaffle_has_wayland=ON +else +WAFFLE_CONF_OPTS += -Dwaffle_has_wayland=OFF +endif + +ifeq ($(BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL),y) +WAFFLE_DEPENDENCIES += libegl libxcb xlib_libX11 +WAFFLE_CONF_OPTS += -Dwaffle_has_x11_egl=ON +else +WAFFLE_CONF_OPTS += -Dwaffle_has_x11_egl=OFF +endif + +ifeq ($(BR2_PACKAGE_WAFFLE_SUPPORTS_GLX),y) +WAFFLE_DEPENDENCIES += libgl libxcb xlib_libX11 +WAFFLE_CONF_OPTS += -Dwaffle_has_glx=ON +else +WAFFLE_CONF_OPTS += -Dwaffle_has_glx=OFF +endif + +ifeq ($(BR2_PACKAGE_WAFFLE_SUPPORTS_GBM),y) +WAFFLE_DEPENDENCIES += libegl udev +WAFFLE_CONF_OPTS += -Dwaffle_has_gbm=ON +else +WAFFLE_CONF_OPTS += -Dwaffle_has_gbm=OFF +endif + +ifeq ($(BR2_PACKAGE_BASH_COMPLETION),y) +WAFFLE_DEPENDENCIES += bash-completion +endif + +ifeq ($(BR2_PACKAGE_MESA3D)$(BR2_PACKAGE_MESA3D_OPENGL_EGL),yy) +WAFFLE_DEPENDENCIES += mesa3d +WAFFLE_CONF_OPTS += -Dwaffle_has_surfaceless_egl=ON +else +WAFFLE_CONF_OPTS += -Dwaffle_has_surfaceless_egl=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/wampcc/0001-Add-RISC-V-endian-detection.patch b/package/wampcc/0001-Add-RISC-V-endian-detection.patch new file mode 100644 index 00000000..d23b44ee --- /dev/null +++ b/package/wampcc/0001-Add-RISC-V-endian-detection.patch @@ -0,0 +1,46 @@ +From e94589ed36c4a311355efc46ba3f76523c546057 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 7 Aug 2019 16:17:16 +0200 +Subject: [PATCH] Add RISC-V endian detection + +3rdparty/msgpack-c/include/msgpack/predef/other/endian.h (which comes +from Boost) two ways of detecting the endianess: + + (1) It includes if BOOST_LIB_C_GNU is defined, and then + use __BYTE_ORDER to decide the endianness. + + (2) Otherwise, if (1) was not possible for some reason, it uses + architecture defines to decide the endianness. + +(1) works perfectly fine with glibc toolchains, because +BOOST_LIB_C_GNU is defined, but it doesn't work with musl. Due to +this, is not included, __BYTE_ORDER is not defined, and +method (1) does not work, causing build failures on musl toolchains +that don't have explicit handling by architecture name (method 2). + +So this commit fixes RISC-V musl build by adding support for the +__riscv architecture define, to determine that the endianness is +little endian. + +Signed-off-by: Thomas Petazzoni +--- + 3rdparty/msgpack-c/include/msgpack/predef/other/endian.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h b/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h +index 3c609fa..63a5722 100644 +--- a/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h ++++ b/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h +@@ -127,7 +127,8 @@ information and acquired knowledge: + defined(__AARCH64EL__) || \ + defined(_MIPSEL) || \ + defined(__MIPSEL) || \ +- defined(__MIPSEL__) ++ defined(__MIPSEL__) || \ ++ defined(__riscv) + # undef MSGPACK_ENDIAN_LITTLE_BYTE + # define MSGPACK_ENDIAN_LITTLE_BYTE MSGPACK_VERSION_NUMBER_AVAILABLE + # endif +-- +2.21.0 + diff --git a/package/wampcc/0002-include-wampcc-platform.h-fix-build-with-musl-1.2.0.patch b/package/wampcc/0002-include-wampcc-platform.h-fix-build-with-musl-1.2.0.patch new file mode 100644 index 00000000..c7b8c786 --- /dev/null +++ b/package/wampcc/0002-include-wampcc-platform.h-fix-build-with-musl-1.2.0.patch @@ -0,0 +1,38 @@ +From 9c2559434b752df3dc8460ee242d321670a40847 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Mon, 1 Jun 2020 11:41:54 +0200 +Subject: [PATCH] include/wampcc/platform.h: fix build with musl 1.2.0 + +Fix the following build failure on musl 1.2.0 due to time_t being on 64 +bits: + +/home/naourr/work/instance-0/output-1/build/wampcc-1.6/libs/wampcc/utils.cc: In function 'std::__cxx11::string wampcc::local_timestamp()': +/home/naourr/work/instance-0/output-1/build/wampcc-1.6/libs/wampcc/utils.cc:205:15: error: cannot convert 'wampcc::time_val::type_type*' {aka 'long int*'} to 'const time_t*' {aka 'const long long int*'} + localtime_r(&now.sec, &parts); + ^~~~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/da996e189220499b85efbdb541a891ac18db38c6 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/darrenjs/wampcc/pull/62] +--- + include/wampcc/platform.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/wampcc/platform.h b/include/wampcc/platform.h +index 24d0868..aebf950 100644 +--- a/include/wampcc/platform.h ++++ b/include/wampcc/platform.h +@@ -27,7 +27,7 @@ namespace wampcc + struct time_val + { + #ifndef _WIN32 +- typedef long type_type; ++ typedef time_t type_type; + #else + typedef __time64_t type_type; + #endif +-- +2.26.2 + diff --git a/package/wampcc/0003-Broken-build-on-Windows.patch b/package/wampcc/0003-Broken-build-on-Windows.patch new file mode 100644 index 00000000..3c528cd8 --- /dev/null +++ b/package/wampcc/0003-Broken-build-on-Windows.patch @@ -0,0 +1,27 @@ +From eaa70a289288db1e8d90a2a9bcde435a8975fe74 Mon Sep 17 00:00:00 2001 +From: Sergey Lukashevich +Date: Fri, 26 Jul 2019 21:58:34 +0300 +Subject: [PATCH] Broken build on Windows: "http_parser.h(66,18): error C2039: + 'runtime_error': is not a member of 'std'" + +Add missing include. + +[Retrieved from: +https://github.com/darrenjs/wampcc/commit/eaa70a289288db1e8d90a2a9bcde435a8975fe74] +Signed-off-by: Fabrice Fontaine +--- + include/wampcc/http_parser.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/wampcc/http_parser.h b/include/wampcc/http_parser.h +index a9405dd..4c20417 100644 +--- a/include/wampcc/http_parser.h ++++ b/include/wampcc/http_parser.h +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + // types brought in from nodejs http-parser project + struct http_parser; diff --git a/package/wampcc/Config.in b/package/wampcc/Config.in new file mode 100644 index 00000000..92abc9cb --- /dev/null +++ b/package/wampcc/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_WAMPCC + bool "wampcc" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv + depends on BR2_USE_MMU # libuv + depends on !BR2_STATIC_LIBS # libuv + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future + select BR2_PACKAGE_LIBUV + select BR2_PACKAGE_JANSSON + select BR2_PACKAGE_OPENSSL + help + wampcc is a C++ library that implements the Web Application + Messaging Protocol. + + https://github.com/darrenjs/wampcc + +comment "wampcc needs a toolchain w/ C++, NPTL, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS + +comment "wampcc needs a toolchain not affected by GCC bug 64735" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 diff --git a/package/wampcc/wampcc.hash b/package/wampcc/wampcc.hash new file mode 100644 index 00000000..0e47ea69 --- /dev/null +++ b/package/wampcc/wampcc.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 b3c3633b4c6a74d7ac8a676a7ea30fbfde7ae19aa1fc37de3b8aa3a553b674a2 wampcc-1.6.tar.gz +sha256 bd185b1ec8a292d42b42346757ff6e198073e13c1e080e9ea548d34dd42d30d8 LICENSE diff --git a/package/wampcc/wampcc.mk b/package/wampcc/wampcc.mk new file mode 100644 index 00000000..11bb1f90 --- /dev/null +++ b/package/wampcc/wampcc.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# wampcc +# +################################################################################ + +WAMPCC_VERSION = 1.6 +WAMPCC_SITE = $(call github,darrenjs,wampcc,v$(WAMPCC_VERSION)) +WAMPCC_DEPENDENCIES = host-pkgconf libuv jansson openssl +WAMPCC_INSTALL_STAGING = YES +WAMPCC_LICENSE = MIT +WAMPCC_LICENSE_FILES = LICENSE + +# Uses __atomic_fetch_add_8 +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +WAMPCC_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic +endif + +$(eval $(cmake-package)) diff --git a/package/watchdog/Config.in b/package/watchdog/Config.in new file mode 100644 index 00000000..bf485034 --- /dev/null +++ b/package/watchdog/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_WATCHDOG + bool "watchdog" + depends on BR2_USE_MMU + help + Watchdog is a daemon that periodically pets a watchdog device + if the configured system status checks pass. If they do not, + the daemon may execute repair commands, shutdown the system or + reboot it. + + https://sourceforge.net/projects/watchdog/ diff --git a/package/watchdog/watchdog.hash b/package/watchdog/watchdog.hash new file mode 100644 index 00000000..7366c1b5 --- /dev/null +++ b/package/watchdog/watchdog.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 b8e7c070e1b72aee2663bdc13b5cc39f76c9232669cfbb1ac0adc7275a3b019d watchdog-5.16.tar.gz +sha256 af7f3f94e85080204b37f7c53717a2c94c6b54d7fa516ebd74e008cb4c0391bd COPYING diff --git a/package/watchdog/watchdog.mk b/package/watchdog/watchdog.mk new file mode 100644 index 00000000..2699fb47 --- /dev/null +++ b/package/watchdog/watchdog.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# watchdog +# +################################################################################ + +WATCHDOG_VERSION = 5.16 +WATCHDOG_SITE = http://downloads.sourceforge.net/sourceforge/watchdog +WATCHDOG_LICENSE = GPL-2.0+ +WATCHDOG_LICENSE_FILES = COPYING +# By default installs binaries in /usr/sbin/, but we want them in +# /sbin/ so that they fall at the same place as Busybox counterparts +WATCHDOG_CONF_OPTS = --sbindir=/sbin + +$(eval $(autotools-package)) diff --git a/package/wavemon/Config.in b/package/wavemon/Config.in new file mode 100644 index 00000000..0cb4cb5c --- /dev/null +++ b/package/wavemon/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_WAVEMON + bool "wavemon" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_LIBNL + help + wavemon is a wireless device monitoring application that + allows you to watch signal and noise levels, packet + statistics, device configuration and network parameters of + your wireless network hardware. + + Note that you need a Linux Kernel configuration with + wireless extensions or with wireless extensions + compatibility enabled. + + https://github.com/uoaerg/wavemon + +comment "wavemon needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wavemon/wavemon.hash b/package/wavemon/wavemon.hash new file mode 100644 index 00000000..455e64cb --- /dev/null +++ b/package/wavemon/wavemon.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 5ebd5b79d3b7c546bc16b95161872c699a75e9acdfc6e3f02ec48dad10802067 wavemon-0.9.1.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/wavemon/wavemon.mk b/package/wavemon/wavemon.mk new file mode 100644 index 00000000..3ae1141e --- /dev/null +++ b/package/wavemon/wavemon.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# wavemon +# +################################################################################ + +WAVEMON_VERSION = 0.9.1 +WAVEMON_SITE = $(call github,uoaerg,wavemon,v$(WAVEMON_VERSION)) +WAVEMON_LICENSE = GPL-3.0+ +WAVEMON_LICENSE_FILES = COPYING +WAVEMON_DEPENDENCIES = host-pkgconf libnl ncurses + +# Handwritten Makefile.in, automake isn't used +WAVEMON_MAKE_OPTS = CC="$(TARGET_CC)" + +$(eval $(autotools-package)) diff --git a/package/wavpack/Config.in b/package/wavpack/Config.in new file mode 100644 index 00000000..db7b8934 --- /dev/null +++ b/package/wavpack/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_WAVPACK + bool "wavpack" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + WavPack is a completely open audio compression format + providing lossless, high-quality lossy, and a unique + hybrid compression mode. + + http://www.wavpack.com/ diff --git a/package/wavpack/wavpack.hash b/package/wavpack/wavpack.hash new file mode 100644 index 00000000..abc9ab69 --- /dev/null +++ b/package/wavpack/wavpack.hash @@ -0,0 +1,3 @@ +# locally computed hash +sha256 4bde6a6b2a86614a6bd2579e60dcc974e2c8f93608d2281110a717c1b3c28b79 wavpack-5.4.0.tar.xz +sha256 f38defde000d62c4ff158f1445cb85a0c2f67cbc1d3cfa34ed882f439f6e3b43 COPYING diff --git a/package/wavpack/wavpack.mk b/package/wavpack/wavpack.mk new file mode 100644 index 00000000..485ab9b2 --- /dev/null +++ b/package/wavpack/wavpack.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# wavpack +# +################################################################################ + +WAVPACK_VERSION = 5.4.0 +WAVPACK_SITE = \ + https://github.com/dbry/WavPack/releases/download/$(WAVPACK_VERSION) +WAVPACK_SOURCE = wavpack-$(WAVPACK_VERSION).tar.xz +WAVPACK_INSTALL_STAGING = YES +WAVPACK_DEPENDENCIES = $(if $(BR2_ENABLE_LOCALE),,libiconv) +WAVPACK_LICENSE = BSD-3-Clause +WAVPACK_LICENSE_FILES = COPYING +WAVPACK_CPE_ID_VENDOR = wavpack + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +WAVPACK_CONF_OPTS += LIBS=-liconv +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +WAVPACK_DEPENDENCIES += openssl +WAVPACK_CONF_OPTS += --enable-libcrypto +else +WAVPACK_CONF_OPTS += --disable-libcrypto +endif + +# WavPack "autodetects" CPU type to enable ASM code. However, the assembly code +# for ARM is written for ARMv7 only and building WavPack for an ARM-non-v7 +# architecture will fail. We explicitly enable ASM for the supported +# architectures x86, x64 and ARMv7 and disable it for all others. +ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_ARM_CPU_ARMV7A),y) +WAVPACK_CONF_OPTS += --enable-asm +else +WAVPACK_CONF_OPTS += --disable-asm +endif + +$(eval $(autotools-package)) diff --git a/package/wayland-protocols/Config.in b/package/wayland-protocols/Config.in new file mode 100644 index 00000000..8b4dedfd --- /dev/null +++ b/package/wayland-protocols/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_WAYLAND_PROTOCOLS + bool "wayland-protocols" + # Not really... but useless otherwise + depends on BR2_PACKAGE_WAYLAND + help + Wayland protocols that adds functionality not available in + the Wayland core protocol. + + http://wayland.freedesktop.org/ diff --git a/package/wayland-protocols/wayland-protocols.hash b/package/wayland-protocols/wayland-protocols.hash new file mode 100644 index 00000000..321fc62d --- /dev/null +++ b/package/wayland-protocols/wayland-protocols.hash @@ -0,0 +1,5 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2020-February/041269.html +md5 b0836533a3f2dc6585b1dae00341157f wayland-protocols-1.20.tar.xz +sha1 e78c739a3a85477ed524b81e8bb75efe7f8bf4df wayland-protocols-1.20.tar.xz +sha256 9782b7a1a863d82d7c92478497d13c758f52e7da4f197aa16443f73de77e4de7 wayland-protocols-1.20.tar.xz +sha256 f1a2b233e8a9a71c40f4aa885be08a0842ac85bb8588703c1dd7e6e6502e3124 COPYING diff --git a/package/wayland-protocols/wayland-protocols.mk b/package/wayland-protocols/wayland-protocols.mk new file mode 100644 index 00000000..84028b97 --- /dev/null +++ b/package/wayland-protocols/wayland-protocols.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# wayland-protocols +# +################################################################################ + +WAYLAND_PROTOCOLS_VERSION = 1.20 +WAYLAND_PROTOCOLS_SITE = https://wayland.freedesktop.org/releases +WAYLAND_PROTOCOLS_SOURCE = wayland-protocols-$(WAYLAND_PROTOCOLS_VERSION).tar.xz +WAYLAND_PROTOCOLS_LICENSE = MIT +WAYLAND_PROTOCOLS_LICENSE_FILES = COPYING +WAYLAND_PROTOCOLS_INSTALL_STAGING = YES +WAYLAND_PROTOCOLS_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/wayland-utils/Config.in b/package/wayland-utils/Config.in new file mode 100644 index 00000000..d7842e61 --- /dev/null +++ b/package/wayland-utils/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_WAYLAND_UTILS + bool "wayland-utils" + depends on BR2_PACKAGE_WAYLAND # wayland-client, wayland-server + select BR2_PACKAGE_WAYLAND_PROTOCOLS + help + Wayland utils (wayland-info). + + https://gitlab.freedesktop.org/ofourdan/wayland-utils diff --git a/package/wayland-utils/wayland-utils.hash b/package/wayland-utils/wayland-utils.hash new file mode 100644 index 00000000..00b6da40 --- /dev/null +++ b/package/wayland-utils/wayland-utils.hash @@ -0,0 +1,6 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2020-July/041565.html +md5 714875aefb10e7f683cde24e58d033ad wayland-utils-1.0.0.tar.xz +sha1 b5b8d498a892866d56ffbe862039d7c97acbe7bc wayland-utils-1.0.0.tar.xz +sha256 64fecc4c58e87ae9b302901abe10c2e8af69c7503c221a96ecd0700e0aa268c0 wayland-utils-1.0.0.tar.xz +sha512 4c6f1822435b36b3acd361c0c54e56150e8a2697a9c4b2c20a149fcfaafe237e45807df3471884ddf594d89558001099e2d938e3f48988ba6950a0f1e3538db2 wayland-utils-1.0.0.tar.xz +sha256 1eba39c11640014a5841dd3017e5245fc31f47e1cf43a3287a286dd6a8de8a1a COPYING diff --git a/package/wayland-utils/wayland-utils.mk b/package/wayland-utils/wayland-utils.mk new file mode 100644 index 00000000..30a33b61 --- /dev/null +++ b/package/wayland-utils/wayland-utils.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# wayland-utils +# +################################################################################ + +WAYLAND_UTILS_VERSION = 1.0.0 +WAYLAND_UTILS_SITE = https://wayland.freedesktop.org/releases +WAYLAND_UTILS_SOURCE = wayland-utils-$(WAYLAND_UTILS_VERSION).tar.xz +WAYLAND_UTILS_LICENSE = MIT +WAYLAND_UTILS_LICENSE_FILES = COPYING +WAYLAND_UTILS_DEPENDENCIES = host-pkgconf wayland wayland-protocols + +$(eval $(meson-package)) diff --git a/package/wayland/0001-build-add-option-to-disable-tests.patch b/package/wayland/0001-build-add-option-to-disable-tests.patch new file mode 100644 index 00000000..6ab695e9 --- /dev/null +++ b/package/wayland/0001-build-add-option-to-disable-tests.patch @@ -0,0 +1,104 @@ +From 283085496e06b5543771abe5cc746ff0b77cdd23 Mon Sep 17 00:00:00 2001 +From: James Hilliard +Date: Tue, 3 Mar 2020 15:27:51 -0700 +Subject: [PATCH] build: add option to disable tests + +When building for a product, tests are not needed. + +Besides, one test requires a C++ compiler, which is not always +available. + +So, add an option to configure to disable building tests altogether. + +Signed-off-by: "Yann E. MORIN" +Signed-off-by: Alexey Brodkin +Signed-off-by: James Hilliard +[Upstream status: +https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/66] +--- + Makefile.am | 2 ++ + configure.ac | 9 +++++++++ + meson.build | 4 +++- + meson_options.txt | 4 ++++ + 4 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index cc87392..d5d43e3 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -162,6 +162,7 @@ pkgconfig_DATA += egl/wayland-egl.pc + include_HEADERS += egl/wayland-egl-backend.h + pkgconfig_DATA += egl/wayland-egl-backend.pc + ++if ENABLE_TESTS + built_test_programs = \ + array-test \ + client-test \ +@@ -295,6 +296,7 @@ os_wrappers_test_LDADD = libtest-runner.la + + exec_fd_leak_checker_SOURCES = tests/exec-fd-leak-checker.c + exec_fd_leak_checker_LDADD = libtest-helpers.la ++endif + + EXTRA_DIST += tests/scanner-test.sh \ + protocol/tests.xml \ +diff --git a/configure.ac b/configure.ac +index dda5e48..99b7c96 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -77,6 +77,13 @@ AC_ARG_ENABLE([libraries], + [], + [enable_libraries=yes]) + ++AC_ARG_ENABLE([tests], ++ [AC_HELP_STRING([--disable-tests], ++ [Disable compilation of test programs])], ++ [], ++ [enable_tests=yes]) ++ ++ + AC_ARG_WITH([host-scanner], + [AC_HELP_STRING([--with-host-scanner], + [Use installed wayland-scanner from host PATH during build])], +@@ -99,6 +106,8 @@ AM_CONDITIONAL(USE_HOST_SCANNER, test "x$with_host_scanner" = xyes) + + AM_CONDITIONAL(ENABLE_LIBRARIES, test "x$enable_libraries" = xyes) + ++AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = xyes) ++ + AC_ARG_WITH(icondir, [ --with-icondir= Look for cursor icons here], + [ ICONDIR=$withval], + [ ICONDIR=${datadir}/icons]) +diff --git a/meson.build b/meson.build +index 5632f4e..b37bb7a 100644 +--- a/meson.build ++++ b/meson.build +@@ -83,7 +83,9 @@ subdir('src') + if get_option('libraries') + subdir('cursor') + subdir('egl') +- subdir('tests') ++ if get_option('tests') ++ subdir('tests') ++ endif + endif + + if get_option('documentation') +diff --git a/meson_options.txt b/meson_options.txt +index 76314f7..ab4be92 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -2,6 +2,10 @@ option('libraries', + description: 'Compile Wayland libraries', + type: 'boolean', + value: 'true') ++option('tests', ++ description: 'Compile Wayland tests', ++ type: 'boolean', ++ value: 'true') + option('documentation', + description: 'Build the documentation (requires Doxygen, dot, xmlto, xsltproc)', + type: 'boolean', +-- +2.20.1 + diff --git a/package/wayland/0002-meson-do-not-check-for-c.patch b/package/wayland/0002-meson-do-not-check-for-c.patch new file mode 100644 index 00000000..c5819bf4 --- /dev/null +++ b/package/wayland/0002-meson-do-not-check-for-c.patch @@ -0,0 +1,29 @@ +From 1df9b73db6541cbc483c6ee1b21dbe0cb6e5cbfa Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Wed, 29 Jul 2020 08:20:41 +0200 +Subject: [PATCH] meson: do not check for c++ + +Wayland does not need c++, fixes building with toolchains lacking c++. + +Backported from upstream PR: +https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/88 + +Signed-off-by: Bernd Kuhls +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index b67b101..e47a52d 100644 +--- a/meson.build ++++ b/meson.build +@@ -1,5 +1,5 @@ + project( +- 'wayland', 'c', 'cpp', ++ 'wayland', 'c', + version: '1.18.0', + license: 'MIT', + meson_version: '>= 0.47.0', +-- +2.27.0 + diff --git a/package/wayland/Config.in b/package/wayland/Config.in new file mode 100644 index 00000000..c22d9c7e --- /dev/null +++ b/package/wayland/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_WAYLAND + bool "wayland" + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_LIBXML2 + help + Wayland is a project to define a protocol for a compositor + to talk to its clients as well as a library implementation + of the protocol. + + https://wayland.freedesktop.org/ + +comment "wayland needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/wayland/wayland.hash b/package/wayland/wayland.hash new file mode 100644 index 00000000..abd8bcdf --- /dev/null +++ b/package/wayland/wayland.hash @@ -0,0 +1,8 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2020-February/041207.html +md5 23317697b6e3ff2e1ac8c5ba3ed57b65 wayland-1.18.0.tar.xz +sha1 33e5292b32a115e829458ea627201ed1e4ad4f45 wayland-1.18.0.tar.xz +sha256 4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d wayland-1.18.0.tar.xz +sha512 e30199e30c2bbd361ee695b4f3f7a4e264f10ed8f46f2c90762b5739fc578ae757dc39aa0258d8fbf0ed418553470bccd4b2730ed9705481cfccdab5de96a8fc wayland-1.18.0.tar.xz + +# Locally calculated +sha256 6eefcb023622a463168a5c20add95fd24a38c7482622a9254a23b99b7c153061 COPYING diff --git a/package/wayland/wayland.mk b/package/wayland/wayland.mk new file mode 100644 index 00000000..6cb4a50d --- /dev/null +++ b/package/wayland/wayland.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# wayland +# +################################################################################ + +WAYLAND_VERSION = 1.18.0 +WAYLAND_SITE = https://wayland.freedesktop.org/releases +WAYLAND_SOURCE = wayland-$(WAYLAND_VERSION).tar.xz +WAYLAND_LICENSE = MIT +WAYLAND_LICENSE_FILES = COPYING +WAYLAND_CPE_ID_VENDOR = wayland +WAYLAND_INSTALL_STAGING = YES +WAYLAND_DEPENDENCIES = host-pkgconf host-wayland expat libffi libxml2 +HOST_WAYLAND_DEPENDENCIES = host-pkgconf host-expat host-libffi host-libxml2 + +WAYLAND_CONF_OPTS = -Dtests=false -Ddocumentation=false +HOST_WAYLAND_CONF_OPTS = -Dtests=false -Ddocumentation=false + +# Remove the DTD from the target, it's not needed at runtime +define WAYLAND_TARGET_CLEANUP + rm -rf $(TARGET_DIR)/usr/share/wayland +endef +WAYLAND_POST_INSTALL_TARGET_HOOKS += WAYLAND_TARGET_CLEANUP + +$(eval $(meson-package)) +$(eval $(host-meson-package)) diff --git a/package/waylandpp/Config.in b/package/waylandpp/Config.in new file mode 100644 index 00000000..86ca9650 --- /dev/null +++ b/package/waylandpp/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_WAYLANDPP + bool "waylandpp" + depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND + depends on BR2_HOST_GCC_AT_LEAST_4_9 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_WAYLAND + help + Wayland C++ bindings + + https://github.com/NilsBrause/waylandpp + +comment "waylandpp needs an OpenGL-EGL/wayland backend, a toolchain w/ gcc >= 4.9, host gcc >= 4.9, C++ support" + depends on BR2_PACKAGE_WAYLAND + depends on !BR2_PACKAGE_HAS_LIBEGL_WAYLAND || \ + !BR2_HOST_GCC_AT_LEAST_4_9 || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ + !BR2_INSTALL_LIBSTDCPP diff --git a/package/waylandpp/waylandpp.hash b/package/waylandpp/waylandpp.hash new file mode 100644 index 00000000..1b806af9 --- /dev/null +++ b/package/waylandpp/waylandpp.hash @@ -0,0 +1,4 @@ +# Locally computed +sha256 e7f486165d3568c3558b5c7099133aea4a285b82820eeafad329fc10271c654d waylandpp-0.2.8.tar.gz +sha256 8ff91f682a38f8a603b173222a60e8dc71754a79a522a316fb6b76ce138c542c LICENSE +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 scanner/gpl-3.0.txt diff --git a/package/waylandpp/waylandpp.mk b/package/waylandpp/waylandpp.mk new file mode 100644 index 00000000..45d9ccd5 --- /dev/null +++ b/package/waylandpp/waylandpp.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# waylandpp +# +################################################################################ + +WAYLANDPP_VERSION = 0.2.8 +WAYLANDPP_SITE = $(call github,NilsBrause,waylandpp,$(WAYLANDPP_VERSION)) +WAYLANDPP_LICENSE = MIT, GPL-3.0+ (wayland_scanner) +WAYLANDPP_LICENSE_FILES = LICENSE scanner/gpl-3.0.txt +WAYLANDPP_INSTALL_STAGING = YES +# pugixml is needed only to build the host version of wayland-scanner++ +HOST_WAYLANDPP_DEPENDENCIES = host-pugixml host-pkgconf host-wayland +WAYLANDPP_DEPENDENCIES = libegl host-pkgconf wayland host-waylandpp + +# host variant of wayland-scanner++ is needed for building the target +# package +HOST_WAYLANDPP_CONF_OPTS = \ + -DBUILD_LIBRARIES=OFF \ + -DBUILD_SCANNER=ON + +WAYLANDPP_CONF_OPTS = \ + -DBUILD_LIBRARIES=ON \ + -DBUILD_SCANNER=OFF \ + -DWAYLAND_SCANNERPP=$(HOST_DIR)/bin/wayland-scanner++ + +$(eval $(cmake-package)) +$(eval $(host-cmake-package)) diff --git a/package/webkitgtk/Config.in b/package/webkitgtk/Config.in new file mode 100644 index 00000000..2ba8d476 --- /dev/null +++ b/package/webkitgtk/Config.in @@ -0,0 +1,131 @@ +config BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS + bool + # ARM needs BLX, so v5t+, BE completely untested so disabled + default y if BR2_arm && !BR2_ARM_CPU_ARMV4 + default y if BR2_aarch64 || BR2_aarch64_be + default y if BR2_i386 || BR2_x86_64 + # Disabled on MIPS big endian due to sigbus + default y if BR2_mipsel || BR2_mips64el + # Disabled on PowerPC pending runtime testing + # Disabled on SuperH because of segfault + depends on BR2_USE_MMU # libglib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt + +comment "webkitgtk needs libgtk3 and a glibc toolchain w/ C++, gcc >= 7, host gcc >= 4.9" + depends on BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS + depends on !BR2_PACKAGE_LIBGTK3 || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \ + !BR2_HOST_GCC_AT_LEAST_4_9 + depends on BR2_USE_MMU + +config BR2_PACKAGE_WEBKITGTK + bool "webkitgtk" + depends on BR2_HOST_GCC_AT_LEAST_4_9 # icu + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_LIBGTK3 + depends on BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_ENCHANT + select BR2_PACKAGE_HARFBUZZ + select BR2_PACKAGE_ICU + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBSECRET + select BR2_PACKAGE_LIBSOUP + select BR2_PACKAGE_LIBTASN1 + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_OPENJPEG + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_WEBP + select BR2_PACKAGE_WEBP_DEMUX + select BR2_PACKAGE_WOFF2 + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_LIBGTK3_X11 + select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_LIBGTK3_X11 + select BR2_PACKAGE_XLIB_LIBXRENDER if BR2_PACKAGE_LIBGTK3_X11 + select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_LIBGTK3_X11 + help + WebKit is an open source, standards compliant web browser + engine. + + http://www.webkitgtk.org/ + +if BR2_PACKAGE_WEBKITGTK + +config BR2_PACKAGE_WEBKITGTK_SANDBOX + bool "sandboxing support" + depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS # libseccomp + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # libseccomp + select BR2_PACKAGE_BUBBLEWRAP # runtime + select BR2_PACKAGE_XDG_DBUS_PROXY # runtime + select BR2_PACKAGE_LIBSECCOMP + help + Enable sandboxing of the processes used for network operation, + disk access, and Web content rendering. + +comment "sandboxing support needs a toolchain w/ headers >= 3.12" + depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + +config BR2_PACKAGE_WEBKITGTK_HTTPS + bool "HTTPS support" + depends on !BR2_STATIC_LIBS # libsoup -> glib-networking, gnutls + select BR2_PACKAGE_CA_CERTIFICATES # runtime + select BR2_PACKAGE_LIBSOUP_SSL + help + Enable HTTPS protocol support. + +comment "webkitgtk https support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_WEBKITGTK_MULTIMEDIA + bool "multimedia support" + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BAD + select BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME + select BR2_PACKAGE_GST1_PLUGINS_GOOD + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUTODETECT + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4 + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VPX + select BR2_PACKAGE_GST1_LIBAV + help + This option pulls in all of the required dependencies + to enable multimedia (video/audio) support. + +if BR2_PACKAGE_WEBKITGTK_MULTIMEDIA + +config BR2_PACKAGE_WEBKITGTK_USE_GSTREAMER_GL + bool "use gstreamer-gl" + default y + depends on BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL + help + Use the GStreamer GL elements for handling video content. + This is recommended as it improves performance of video + playback. In some target configurations incorrect rendering + might be produced, and disabling this option may help. + +endif + +config BR2_PACKAGE_WEBKITGTK_WEBDRIVER + bool "WebDriver support" + help + Enable support for WebDriver. This will build and install the + WebKitWebDriver program in the target. + +endif diff --git a/package/webkitgtk/webkitgtk.hash b/package/webkitgtk/webkitgtk.hash new file mode 100644 index 00000000..d85a7f46 --- /dev/null +++ b/package/webkitgtk/webkitgtk.hash @@ -0,0 +1,8 @@ +# From https://webkitgtk.org/releases/webkitgtk-2.30.6.tar.xz.sums +md5 11148c4ed400c58fe330ac94208cbc4d webkitgtk-2.30.6.tar.xz +sha1 aaaf9b0f1780f3eae104ae0d3ad15b3e19cf6e8d webkitgtk-2.30.6.tar.xz +sha256 50736ec7a91770b5939d715196e5fe7209b93efcdeef425b24dc51fb8e9d7c1e webkitgtk-2.30.6.tar.xz + +# Hashes for license files: +sha256 0b5d3a7cc325942567373b0ecd757d07c132e0ebd7c97bfc63f7e1a76094edb4 Source/WebCore/LICENSE-APPLE +sha256 f2b3bd09663381deb99721109d22b47af1213bb43007a8b56a06c6375c8050ce Source/WebCore/LICENSE-LGPL-2.1 diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk new file mode 100644 index 00000000..f1c05604 --- /dev/null +++ b/package/webkitgtk/webkitgtk.mk @@ -0,0 +1,130 @@ +################################################################################ +# +# webkitgtk +# +################################################################################ + +WEBKITGTK_VERSION = 2.30.6 +WEBKITGTK_SITE = https://www.webkitgtk.org/releases +WEBKITGTK_SOURCE = webkitgtk-$(WEBKITGTK_VERSION).tar.xz +WEBKITGTK_INSTALL_STAGING = YES +WEBKITGTK_LICENSE = LGPL-2.1+, BSD-2-Clause +WEBKITGTK_LICENSE_FILES = \ + Source/WebCore/LICENSE-APPLE \ + Source/WebCore/LICENSE-LGPL-2.1 +WEBKITGTK_CPE_ID_VENDOR = webkitgtk +WEBKITGTK_DEPENDENCIES = host-ruby host-python host-gperf \ + enchant harfbuzz icu jpeg libgcrypt libgtk3 libsecret libsoup \ + libtasn1 libxml2 libxslt openjpeg sqlite webp woff2 +WEBKITGTK_CONF_OPTS = \ + -DENABLE_API_TESTS=OFF \ + -DENABLE_GAMEPAD=OFF \ + -DENABLE_GEOLOCATION=OFF \ + -DENABLE_GTKDOC=OFF \ + -DENABLE_INTROSPECTION=OFF \ + -DENABLE_MINIBROWSER=ON \ + -DENABLE_SPELLCHECK=ON \ + -DPORT=GTK \ + -DSILENCE_CROSS_COMPILATION_NOTICES=ON \ + -DUSE_LIBNOTIFY=OFF \ + -DUSE_LIBHYPHEN=OFF \ + -DUSE_OPENJPEG=ON \ + -DUSE_WOFF2=ON \ + -DUSE_WPE_RENDERER=OFF + +ifeq ($(BR2_PACKAGE_WEBKITGTK_SANDBOX),y) +WEBKITGTK_CONF_OPTS += \ + -DENABLE_BUBBLEWRAP_SANDBOX=ON \ + -DBWRAP_EXECUTABLE=/usr/bin/bwrap \ + -DDBUS_PROXY_EXECUTABLE=/usr/bin/xdg-dbus-proxy +WEBKITGTK_DEPENDENCIES += libseccomp +else +WEBKITGTK_CONF_OPTS += -DENABLE_BUBBLEWRAP_SANDBOX=OFF +endif + +ifeq ($(BR2_PACKAGE_WEBKITGTK_MULTIMEDIA),y) +WEBKITGTK_CONF_OPTS += \ + -DENABLE_VIDEO=ON \ + -DENABLE_WEB_AUDIO=ON +WEBKITGTK_DEPENDENCIES += gstreamer1 gst1-libav gst1-plugins-base gst1-plugins-good +else +WEBKITGTK_CONF_OPTS += \ + -DENABLE_VIDEO=OFF \ + -DENABLE_WEB_AUDIO=OFF +endif + +ifeq ($(BR2_PACKAGE_WEBKITGTK_WEBDRIVER),y) +WEBKITGTK_CONF_OPTS += -DENABLE_WEBDRIVER=ON +else +WEBKITGTK_CONF_OPTS += -DENABLE_WEBDRIVER=OFF +endif + +# Only one target platform can be built, assume X11 > Wayland + +# GTK3-X11 target gives OpenGL from newer libgtk3 versions +# Consider this better than EGL + maybe GLESv2 since both can't be built +# 2D CANVAS acceleration requires OpenGL proper with cairo-gl +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +WEBKITGTK_CONF_OPTS += \ + -DENABLE_ACCELERATED_2D_CANVAS=ON \ + -DENABLE_GLES2=OFF \ + -DENABLE_GRAPHICS_CONTEXT_GL=ON \ + -DENABLE_X11_TARGET=ON +WEBKITGTK_DEPENDENCIES += libgl \ + xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt +# It can use libgtk2 for npapi plugins +ifeq ($(BR2_PACKAGE_LIBGTK2),y) +WEBKITGTK_CONF_OPTS += -DENABLE_PLUGIN_PROCESS_GTK2=ON +WEBKITGTK_DEPENDENCIES += libgtk2 +else +WEBKITGTK_CONF_OPTS += -DENABLE_PLUGIN_PROCESS_GTK2=OFF +endif +else # !X11 +# GTK3-BROADWAY/WAYLAND needs at least EGL +WEBKITGTK_DEPENDENCIES += libegl +# GLESv2 support is optional though +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +WEBKITGTK_CONF_OPTS += \ + -DENABLE_GLES2=ON \ + -DENABLE_GRAPHICS_CONTEXT_GL=ON +WEBKITGTK_DEPENDENCIES += libgles +else +# Disable general OpenGL (shading) if there's no GLESv2 +WEBKITGTK_CONF_OPTS += \ + -DENABLE_GLES2=OFF \ + -DENABLE_GRAPHICS_CONTEXT_GL=OFF +endif +# We must explicitly state the wayland target +ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND),y) +WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=ON +endif +endif + +ifeq ($(BR2_PACKAGE_WEBKITGTK_USE_GSTREAMER_GL),y) +WEBKITGTK_CONF_OPTS += -DUSE_GSTREAMER_GL=ON +else +WEBKITGTK_CONF_OPTS += -DUSE_GSTREAMER_GL=OFF +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +WEBKITGTK_CONF_OPTS += -DUSE_SYSTEMD=ON +WEBKITGTK_DEPENDENCIES += systemd +else +WEBKITGTK_CONF_OPTS += -DUSE_SYSTEMD=OFF +endif + +# JIT is not supported for MIPS r6, but the WebKit build system does not +# have a check for these processors. The same goes for ARMv5 and ARMv6. +# Disable JIT forcibly here and use the CLoop interpreter instead. +# +# Also, we have to disable the sampling profiler, which does NOT work +# with ENABLE_C_LOOP. +# +# Upstream bugs: https://bugs.webkit.org/show_bug.cgi?id=191258 +# https://bugs.webkit.org/show_bug.cgi?id=172765 +# +ifeq ($(BR2_ARM_CPU_ARMV5)$(BR2_ARM_CPU_ARMV6)$(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS_CPU_MIPS64R6),y) +WEBKITGTK_CONF_OPTS += -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON -DENABLE_SAMPLING_PROFILER=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/webp/Config.in b/package/webp/Config.in new file mode 100644 index 00000000..e8263a95 --- /dev/null +++ b/package/webp/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_WEBP + bool "webp" + help + WebP is a new image format that provides lossless and lossy + compression for images on the web + + https://developers.google.com/speed/webp/ + +if BR2_PACKAGE_WEBP + +config BR2_PACKAGE_WEBP_DEMUX + bool "webpdemux" + help + Demux is a part of WebPMux for extraction and manipulation + of an extended format WebP file, which can have features + like color profile, metadata and animation. + +config BR2_PACKAGE_WEBP_MUX + bool "webpmux" + help + Mux is a part of WebPMux for creation and manipulation + of an extended format WebP file, which can have features + like color profile, metadata and animation. + +endif diff --git a/package/webp/webp.hash b/package/webp/webp.hash new file mode 100644 index 00000000..24cec6df --- /dev/null +++ b/package/webp/webp.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 2fc8bbde9f97f2ab403c0224fb9ca62b2e6852cbc519e91ceaa7c153ffd88a0c libwebp-1.2.0.tar.gz +sha256 5aec868f669e384a22372a4e8a1a6cd7d44c64cd451f960ca69cc170d1e13acf COPYING diff --git a/package/webp/webp.mk b/package/webp/webp.mk new file mode 100644 index 00000000..ecf26faa --- /dev/null +++ b/package/webp/webp.mk @@ -0,0 +1,58 @@ +################################################################################ +# +# webp +# +################################################################################ + +WEBP_VERSION = 1.2.0 +WEBP_SOURCE = libwebp-$(WEBP_VERSION).tar.gz +WEBP_SITE = http://downloads.webmproject.org/releases/webp +WEBP_LICENSE = BSD-3-Clause +WEBP_LICENSE_FILES = COPYING +WEBP_CPE_ID_VENDOR = webmproject +WEBP_CPE_ID_PRODUCT = libwebp +WEBP_INSTALL_STAGING = YES + +WEBP_CONF_OPTS += \ + --with-jpegincludedir=$(STAGING_DIR)/usr/include \ + --with-jpeglibdir=$(STAGING_DIR)/usr/lib \ + --with-tiffincludedir=$(STAGING_DIR)/usr/include \ + --with-tifflibdir=$(STAGING_DIR)/usr/lib + +ifeq ($(BR2_PACKAGE_WEBP_DEMUX),y) +WEBP_CONF_OPTS += --enable-libwebpdemux +else +WEBP_CONF_OPTS += --disable-libwebpdemux +endif + +ifeq ($(BR2_PACKAGE_WEBP_MUX),y) +WEBP_CONF_OPTS += --enable-libwebpmux +else +WEBP_CONF_OPTS += --disable-libwebpmux +endif + +ifeq ($(BR2_PACKAGE_GIFLIB),y) +WEBP_DEPENDENCIES += giflib +WEBP_CONF_OPTS += --enable-gif +else +WEBP_CONF_OPTS += --disable-gif +endif + +ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y) +WEBP_DEPENDENCIES += libfreeglut +WEBP_CONF_OPTS += --enable-gl +else +WEBP_CONF_OPTS += --disable-gl +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +WEBP_DEPENDENCIES += libpng +WEBP_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config +else +WEBP_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=/bin/false +endif + +WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_JPEG),jpeg) +WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_TIFF),tiff) + +$(eval $(autotools-package)) diff --git a/package/webrtc-audio-processing/0001-Proper-detection-of-cxxabi.h-and-execinfo.h.patch b/package/webrtc-audio-processing/0001-Proper-detection-of-cxxabi.h-and-execinfo.h.patch new file mode 100644 index 00000000..a0332db8 --- /dev/null +++ b/package/webrtc-audio-processing/0001-Proper-detection-of-cxxabi.h-and-execinfo.h.patch @@ -0,0 +1,63 @@ +From b7a166acaddc4c78afa2b653e25114d9114699f3 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 6 Aug 2016 11:24:50 +0200 +Subject: [PATCH] Proper detection of cxxabi.h and execinfo.h + +The current code in webrtc/base/checks.cc assumes that if __GLIBCXX__ is +defined and __UCLIBC__ is not defined, then both cxxabi.h and execinfo.h +will be available. + +Unfortunately, this is not correct with the musl C library: + + - It defines __GLIBCXX__ + - It does not define __UCLIBC__ (it's not uClibc after all!) + - But it also doesn't provide execinfo.h + +Therefore, in order to make things work properly, we switch to proper +autoconf checks for cxxabi.h and execinfo.h, and only use the backtrace +functionality if both are provided. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 2 ++ + webrtc/base/checks.cc | 4 ++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index acbb3e2..ff4c752 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -45,6 +45,8 @@ AC_SUBST(GNUSTL_CFLAGS) + # Borrowed from gst-plugins-bad + AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-]) + ++AC_CHECK_HEADERS([cxxabi.h execinfo.h]) ++ + # Based on gst-plugins-bad configure.ac and defines in + # /build/config/BUILDCONFIG.gn and + # webrtc/BUILD.gn +diff --git a/webrtc/base/checks.cc b/webrtc/base/checks.cc +index 49a31f2..05d23a6 100644 +--- a/webrtc/base/checks.cc ++++ b/webrtc/base/checks.cc +@@ -16,7 +16,7 @@ + #include + #include + +-#if defined(__GLIBCXX__) && !defined(__UCLIBC__) ++#if defined(HAVE_CXX_ABI_H) && defined(HAVE_EXECINFO_H) + #include + #include + #endif +@@ -55,7 +55,7 @@ void PrintError(const char* format, ...) { + // to get usable symbols on Linux. This is copied from V8. Chromium has a more + // advanced stace trace system; also more difficult to copy. + void DumpBacktrace() { +-#if defined(__GLIBCXX__) && !defined(__UCLIBC__) ++#if defined(HAVE_CXX_ABI_H) && defined(HAVE_EXECINFO_H) + void* trace[100]; + int size = backtrace(trace, sizeof(trace) / sizeof(*trace)); + char** symbols = backtrace_symbols(trace, size); +-- +2.7.4 + diff --git a/package/webrtc-audio-processing/Config.in b/package/webrtc-audio-processing/Config.in new file mode 100644 index 00000000..64138269 --- /dev/null +++ b/package/webrtc-audio-processing/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_ARCH_SUPPORTS + bool + default y if BR2_aarch64 || BR2_arm || BR2_i386 || BR2_x86_64 + +config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING + bool "webrtc-audio-processing" + depends on BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_ARCH_SUPPORTS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + # pthread_condattr_setclock + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + help + AudioProcessing library based on Google's implementation of + WebRTC. + + http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/ + +comment "webrtc-audio-processing needs a toolchain w/ C++, NPTL, gcc >= 4.8" + depends on BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 diff --git a/package/webrtc-audio-processing/webrtc-audio-processing.hash b/package/webrtc-audio-processing/webrtc-audio-processing.hash new file mode 100644 index 00000000..1376054f --- /dev/null +++ b/package/webrtc-audio-processing/webrtc-audio-processing.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 a0fdd938fd85272d67e81572c5a4d9e200a0c104753cb3c209ded175ce3c5dbf webrtc-audio-processing-0.3.1.tar.xz +sha256 9b79539028e216e813e152d45f5c1ed5fdd0554426ad50270fb03134e7082dac COPYING diff --git a/package/webrtc-audio-processing/webrtc-audio-processing.mk b/package/webrtc-audio-processing/webrtc-audio-processing.mk new file mode 100644 index 00000000..ff84a802 --- /dev/null +++ b/package/webrtc-audio-processing/webrtc-audio-processing.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# webrtc-audio-processing +# +################################################################################ + +WEBRTC_AUDIO_PROCESSING_VERSION = 0.3.1 +WEBRTC_AUDIO_PROCESSING_SOURCE = webrtc-audio-processing-$(WEBRTC_AUDIO_PROCESSING_VERSION).tar.xz +WEBRTC_AUDIO_PROCESSING_SITE = http://freedesktop.org/software/pulseaudio/webrtc-audio-processing +WEBRTC_AUDIO_PROCESSING_INSTALL_STAGING = YES +WEBRTC_AUDIO_PROCESSING_LICENSE = BSD-3-Clause +WEBRTC_AUDIO_PROCESSING_LICENSE_FILES = COPYING +WEBRTC_AUDIO_PROCESSING_DEPENDENCIES = host-pkgconf +# 0001-Proper-detection-of-cxxabi.h-and-execinfo.h.patch +WEBRTC_AUDIO_PROCESSING_AUTORECONF = YES + +ifeq ($(BR2_SOFT_FLOAT),y) +WEBRTC_AUDIO_PROCESSING_CONF_OPTS += --with-ns-mode=fixed +endif + +$(eval $(autotools-package)) diff --git a/package/websocketpp/Config.in b/package/websocketpp/Config.in new file mode 100644 index 00000000..cadb9ff6 --- /dev/null +++ b/package/websocketpp/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_WEBSOCKETPP + bool "websocketpp" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_INSTALL_LIBSTDCPP + help + WebSocket++ is a header only C++ library that implements + RFC6455 The WebSocket Protocol. It allows integrating + WebSocket client and server functionality into C++ programs. + It uses interchangeable network transport modules including + one based on C++ iostreams and one based on Boost Asio. + + http://www.zaphoyd.com/websocketpp + +comment "websocketpp needs a toolchain w/ C++ and gcc >= 4.8" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 diff --git a/package/websocketpp/websocketpp.hash b/package/websocketpp/websocketpp.hash new file mode 100644 index 00000000..e4d0c929 --- /dev/null +++ b/package/websocketpp/websocketpp.hash @@ -0,0 +1,3 @@ +# Locally Computed: +sha256 6ce889d85ecdc2d8fa07408d6787e7352510750daa66b5ad44aacb47bea76755 websocketpp-0.8.2.tar.gz +sha256 b31e597bc777d884a39663c11d0557a0af40780e1f451de11ea5103924a69667 COPYING diff --git a/package/websocketpp/websocketpp.mk b/package/websocketpp/websocketpp.mk new file mode 100644 index 00000000..59b365aa --- /dev/null +++ b/package/websocketpp/websocketpp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# websocketpp +# +################################################################################ + +WEBSOCKETPP_VERSION = 0.8.2 +WEBSOCKETPP_SITE = $(call github,zaphoyd,websocketpp,$(WEBSOCKETPP_VERSION)) +WEBSOCKETPP_LICENSE = BSD-3c, MIT, Zlib +WEBSOCKETPP_LICENSE_FILES = COPYING +WEBSOCKETPP_CPE_ID_VENDOR = zaphoyd +WEBSOCKETPP_INSTALL_STAGING = YES +# Only installs headers +WEBSOCKETPP_INSTALL_TARGET = NO + +$(eval $(cmake-package)) diff --git a/package/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch b/package/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch new file mode 100644 index 00000000..2eb6bd83 --- /dev/null +++ b/package/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch @@ -0,0 +1,48 @@ +From b10c0e843dcb8148bbe869bb15261955b94ac98c Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Tue, 8 Sep 2020 19:37:42 -0400 +Subject: [PATCH] tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and + O_CREAT + +musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(), +O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors: + +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock': +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:7: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~ +| | popen +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: note: each undeclared identifier is reported only once for each function it appears in +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~ + +Signed-off-by: Denys Dmytriyenko +Signed-off-by: James Hilliard +[james.hilliard1@gmail.com: backport from upstream commit +b10c0e843dcb8148bbe869bb15261955b94ac98c] +--- + tests/weston-test-fixture-compositor.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c +index 1c32959c..c1eb26c4 100644 +--- a/tests/weston-test-fixture-compositor.c ++++ b/tests/weston-test-fixture-compositor.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + #include "shared/helpers.h" + #include "weston-test-fixture-compositor.h" +-- +2.25.1 + diff --git a/package/weston/0002-libweston-backend-drm-might-need-EGL.patch b/package/weston/0002-libweston-backend-drm-might-need-EGL.patch new file mode 100644 index 00000000..f504e114 --- /dev/null +++ b/package/weston/0002-libweston-backend-drm-might-need-EGL.patch @@ -0,0 +1,47 @@ +From 4b93b71067949cc5efabb9b3d59278a3f362b11c Mon Sep 17 00:00:00 2001 +From: Heiko Thiery +Date: Wed, 21 Oct 2020 13:33:25 +0200 +Subject: [PATCH] libweston/backend/drm: might need EGL + +gbm-drm.c includes gl-renderer.h. When EGL is enabled, that in turns +includes egl.h. As such, dependencies for drm should include EGL if +it is available. + +This condition is modelled after a similar one in libweston/meson.build + +Reported-by: Gary Bisson +Reported-by: Heiko Thiery +Signed-off-by: Yann E. MORIN +Cc: Refik Tuzakli +Cc: Thomas Petazzoni +Signed-off-by: Heiko Thiery +--- +This patch should be a proper fix for the issue discribed in the patch from +Gary [1]. + +Since the MR on weston upstream [2] is not merged now I add this patch +to have working weston with imx in buildroot. + +[1] https://patchwork.ozlabs.org/project/buildroot/patch/20200402130842.918696-3-gary.bisson@boundarydevices.com/ +[2] https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/508 +--- + libweston/backend-drm/meson.build | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libweston/backend-drm/meson.build b/libweston/backend-drm/meson.build +index 484c2702..e3e5b976 100644 +--- a/libweston/backend-drm/meson.build ++++ b/libweston/backend-drm/meson.build +@@ -53,6 +53,9 @@ if get_option('renderer-gl') + config_h.set('HAVE_GBM_FD_IMPORT', '1') + endif + deps_drm += dep_gbm ++ if dep_egl.found() ++ deps_drm += dep_egl ++ endif + srcs_drm += 'drm-gbm.c' + config_h.set('BUILD_DRM_GBM', '1') + endif +-- +2.20.1 + diff --git a/package/weston/Config.in b/package/weston/Config.in new file mode 100644 index 00000000..d07eba4c --- /dev/null +++ b/package/weston/Config.in @@ -0,0 +1,142 @@ +comment "weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 3.0" + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 || BR2_STATIC_LIBS || \ + !BR2_ENABLE_LOCALE + +config BR2_PACKAGE_WESTON + bool "weston" + depends on BR2_PACKAGE_HAS_UDEV + depends on !BR2_STATIC_LIBS # wayland + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + select BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_WAYLAND_PROTOCOLS + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBINPUT + select BR2_PACKAGE_LIBDRM + # Runtime dependency + select BR2_PACKAGE_XKEYBOARD_CONFIG + help + Weston is the reference implementation of a Wayland + compositor, and a useful compositor in its own right. + Weston has various backends that lets it run on Linux kernel + modesetting and evdev input as well as under X11. + + http://wayland.freedesktop.org/ + +if BR2_PACKAGE_WESTON + +choice + prompt "default compositor" + +config BR2_PACKAGE_WESTON_DEFAULT_FBDEV + bool "fbdev" + select BR2_PACKAGE_WESTON_FBDEV + +config BR2_PACKAGE_WESTON_DEFAULT_DRM + bool "drm" + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL + select BR2_PACKAGE_WESTON_DRM + +comment "drm backend needs mesa3d w/ EGL driver" + depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL + +config BR2_PACKAGE_WESTON_DEFAULT_X11 + bool "X11" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_WESTON_X11 + +comment "X11 backend needs X.org" + depends on !BR2_PACKAGE_XORG7 + +endchoice + +config BR2_PACKAGE_WESTON_DEFAULT_COMPOSITOR + string + default "fbdev" if BR2_PACKAGE_WESTON_DEFAULT_FBDEV + default "drm" if BR2_PACKAGE_WESTON_DEFAULT_DRM + default "x11" if BR2_PACKAGE_WESTON_DEFAULT_X11 + +config BR2_PACKAGE_WESTON_DRM + bool "DRM compositor" + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL + +# Uses libgbm from mesa3d +comment "DRM compositor needs an OpenGL EGL backend provided by mesa3d" + depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL + +config BR2_PACKAGE_WESTON_FBDEV + bool "fbdev compositor" + +# FreeRDP needs threads and !static, already the case for weston +config BR2_PACKAGE_WESTON_RDP + bool "RDP compositor" + depends on BR2_USE_MMU # freerdp, libglib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_USE_WCHAR # freerdp + depends on BR2_INSTALL_LIBSTDCPP # freerdp + select BR2_PACKAGE_FREERDP + help + This enables the RDP backend, which allows accessing weston + through the network with any RDP-compliant client. + + Please note that one must pass those options to weston for RDP + to be functional: + --rdp-tls-cert=/path/to/server.crt + --rdp-tls-key=/path/to/server.key + + By default, Buildroot installs such files in + /etc/freerdp/server/ so you may want to change them in a + post-build script or a rootfs overlay. + +comment "RDP compositor needs a toolchain w/ wchar, C++" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_WESTON_X11 + bool "X11 compositor" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XLIB_LIBX11 + +comment "X11 compositor needs X.org enabled" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_WESTON_XWAYLAND + bool "XWayland support" + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_LIBEPOXY + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXCURSOR + +comment "XWayland support needs libepoxy and X.org enabled" + depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_LIBEPOXY + +config BR2_PACKAGE_WESTON_DEMO_CLIENTS + bool "demo clients" + depends on BR2_USE_MMU # pango + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango + depends on BR2_INSTALL_LIBSTDCPP # pango + depends on BR2_TOOLCHAIN_HAS_THREADS # pango + depends on BR2_USE_WCHAR # pango + depends on BR2_PACKAGE_HAS_LIBGLES + depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_PANGO + help + This enables the installation of Weston's demo clients. + +comment "demo clients needs an OpenGL ES provider, an OpenEGL-capable Wayland backend and a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR || !BR2_PACKAGE_HAS_LIBGLES || \ + !BR2_PACKAGE_HAS_LIBEGL_WAYLAND + +endif diff --git a/package/weston/weston.hash b/package/weston/weston.hash new file mode 100644 index 00000000..5a6b3868 --- /dev/null +++ b/package/weston/weston.hash @@ -0,0 +1,6 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2020-September/041595.html +md5 b406da0fe9139fd39653238fde22a6cf weston-9.0.0.tar.xz +sha1 90b9540a0bd6d6f7a465817f1c696d4d393183c9 weston-9.0.0.tar.xz +sha256 5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe weston-9.0.0.tar.xz +sha512 ccc263f8279b7b23e5c593b4a8a023de2c3dc178b1b8d6593599171770bcfe97608de9fcb77aa1cab39255451d289d323e51c317dae190c7641282e085b84f90 weston-9.0.0.tar.xz +sha256 fdb65868f65d0fbdb05c2d3b779e10ce9969fa0c4b9262ba4f260e87086ab860 COPYING diff --git a/package/weston/weston.mk b/package/weston/weston.mk new file mode 100644 index 00000000..8afe4bba --- /dev/null +++ b/package/weston/weston.mk @@ -0,0 +1,143 @@ +################################################################################ +# +# weston +# +################################################################################ + +WESTON_VERSION = 9.0.0 +WESTON_SITE = https://wayland.freedesktop.org/releases +WESTON_SOURCE = weston-$(WESTON_VERSION).tar.xz +WESTON_LICENSE = MIT +WESTON_LICENSE_FILES = COPYING +WESTON_CPE_ID_VENDOR = wayland + +WESTON_DEPENDENCIES = host-pkgconf wayland wayland-protocols \ + libxkbcommon pixman libpng jpeg udev cairo libinput libdrm + +WESTON_CONF_OPTS = \ + -Dbackend-headless=false \ + -Dcolor-management-colord=false \ + -Dremoting=false + +# Uses VIDIOC_EXPBUF, only available from 3.8+ +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8),y) +WESTON_CONF_OPTS += -Dsimple-clients=dmabuf-v4l +else +WESTON_CONF_OPTS += -Dsimple-clients= +endif + +ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_SYSTEMD),yy) +WESTON_CONF_OPTS += -Dlauncher-logind=true +WESTON_DEPENDENCIES += dbus systemd +else +WESTON_CONF_OPTS += -Dlauncher-logind=false +endif + +ifeq ($(BR2_PACKAGE_WEBP),y) +WESTON_CONF_OPTS += -Dimage-webp=true +WESTON_DEPENDENCIES += webp +else +WESTON_CONF_OPTS += -Dimage-webp=false +endif + +# weston-launch must be u+s root in order to work properly +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +define WESTON_PERMISSIONS + /usr/bin/weston-launch f 4755 0 0 - - - - - +endef +define WESTON_USERS + - - weston-launch -1 - - - - Weston launcher group +endef +WESTON_CONF_OPTS += -Dweston-launch=true +WESTON_DEPENDENCIES += linux-pam +else +WESTON_CONF_OPTS += -Dweston-launch=false +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL_WAYLAND)$(BR2_PACKAGE_HAS_LIBGLES),yy) +WESTON_CONF_OPTS += -Drenderer-gl=true +WESTON_DEPENDENCIES += libegl libgles +ifeq ($(BR2_PACKAGE_PIPEWIRE)$(BR2_PACKAGE_WESTON_DRM),yy) +WESTON_CONF_OPTS += -Dpipewire=true +WESTON_DEPENDENCIES += pipewire +else +WESTON_CONF_OPTS += -Dpipewire=false +endif +else +WESTON_CONF_OPTS += \ + -Drenderer-gl=false \ + -Dpipewire=false +endif + +ifeq ($(BR2_PACKAGE_WESTON_RDP),y) +WESTON_DEPENDENCIES += freerdp +WESTON_CONF_OPTS += -Dbackend-rdp=true +else +WESTON_CONF_OPTS += -Dbackend-rdp=false +endif + +ifeq ($(BR2_PACKAGE_WESTON_FBDEV),y) +WESTON_CONF_OPTS += -Dbackend-fbdev=true +else +WESTON_CONF_OPTS += -Dbackend-fbdev=false +endif + +ifeq ($(BR2_PACKAGE_WESTON_DRM),y) +WESTON_CONF_OPTS += -Dbackend-drm=true +else +WESTON_CONF_OPTS += -Dbackend-drm=false +endif + +ifeq ($(BR2_PACKAGE_WESTON_X11),y) +WESTON_CONF_OPTS += -Dbackend-x11=true +WESTON_DEPENDENCIES += libxcb xlib_libX11 +else +WESTON_CONF_OPTS += -Dbackend-x11=false +endif + +# We're guaranteed to have at least one backend +WESTON_CONF_OPTS += -Dbackend-default=$(call qstrip,$(BR2_PACKAGE_WESTON_DEFAULT_COMPOSITOR)) + +ifeq ($(BR2_PACKAGE_WESTON_XWAYLAND),y) +WESTON_CONF_OPTS += -Dxwayland=true +WESTON_DEPENDENCIES += cairo libepoxy libxcb xlib_libX11 xlib_libXcursor +else +WESTON_CONF_OPTS += -Dxwayland=false +endif + +ifeq ($(BR2_PACKAGE_LIBVA),y) +WESTON_CONF_OPTS += -Dbackend-drm-screencast-vaapi=true +WESTON_DEPENDENCIES += libva +else +WESTON_CONF_OPTS += -Dbackend-drm-screencast-vaapi=false +endif + +ifeq ($(BR2_PACKAGE_LCMS2),y) +WESTON_CONF_OPTS += -Dcolor-management-lcms=true +WESTON_DEPENDENCIES += lcms2 +else +WESTON_CONF_OPTS += -Dcolor-management-lcms=false +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +WESTON_CONF_OPTS += -Dsystemd=true +WESTON_DEPENDENCIES += systemd +else +WESTON_CONF_OPTS += -Dsystemd=false +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +WESTON_CONF_OPTS += -Dtest-junit-xml=true +WESTON_DEPENDENCIES += libxml2 +else +WESTON_CONF_OPTS += -Dtest-junit-xml=false +endif + +ifeq ($(BR2_PACKAGE_WESTON_DEMO_CLIENTS),y) +WESTON_CONF_OPTS += -Ddemo-clients=true +WESTON_DEPENDENCIES += pango +else +WESTON_CONF_OPTS += -Ddemo-clients=false +endif + +$(eval $(meson-package)) diff --git a/package/wf111/Config.in b/package/wf111/Config.in new file mode 100644 index 00000000..8dd20a7c --- /dev/null +++ b/package/wf111/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_WF111 + bool "wf111" + depends on BR2_LINUX_KERNEL + depends on BR2_ARM_CPU_ARMV5 || BR2_ARM_CPU_ARMV7A || BR2_i386 + # Binary tools are distributed alongside the driver, and are + # dynamically linked against the glibc. + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Silicon Labs WF111 WiFi driver and utilities. + + Warning: CONFIG_WIRELESS_EXT and CONFIG_WEXT_PRIV must be + selected in the Linux kernel configuration. These are blind + options (i.e. not selectable directly) so they cannot be + enabled by a change in linux/linux.mk. There are two choices + to enable these options: + - By making them non blind, with a "WF111 support" + configuration entry that selects them, for example. + - By enabling another random WiFi driver that select them. + + https://www.silabs.com/wireless/wi-fi/bluegiga-legacy-modules/device.wf111 + +comment "wf111 needs a glibc toolchain" + depends on BR2_LINUX_KERNEL + depends on BR2_ARM_CPU_ARMV5 || BR2_ARM_CPU_ARMV7A || BR2_i386 + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/wf111/wf111.hash b/package/wf111/wf111.hash new file mode 100644 index 00000000..e3a5c484 --- /dev/null +++ b/package/wf111/wf111.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 33de265d28702ce32bb292f29a43e9e946382a1e31f1e4feae0f4753cf18b4f4 wf111-linux-driver_5.2.2-r4_armv7-a.tar.gz +sha256 fbe86a30e4025b9f510feb4cb8f846aca82f8f3e8f6c8a28a74baf45c87f6e96 wf111-linux-driver_5.2.2-r4_armv5te.tar.gz +sha256 37983d73f60bab9768eb02a89695448f27cd1964e23cf462e76657344a9c67ac wf111-linux-driver-5-2-2-r3-x86.tar.gz diff --git a/package/wf111/wf111.mk b/package/wf111/wf111.mk new file mode 100644 index 00000000..fd9cb196 --- /dev/null +++ b/package/wf111/wf111.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# wf111 +# +################################################################################ + +ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_ARM_CPU_ARMV5),y) +WF111_VERSION = 5.2.2-r4 +else +WF111_VERSION = 5-2-2-r3 +endif + +WF111_SITE = https://www.silabs.com/documents/login/software +WF111_DEPENDENCIES = linux + +ifeq ($(BR2_ARM_CPU_ARMV7A),y) +WF111_SOURCE = wf111-linux-driver_$(WF111_VERSION)_armv7-a.tar.gz +else ifeq ($(BR2_ARM_CPU_ARMV5),y) +WF111_SOURCE = wf111-linux-driver_$(WF111_VERSION)_armv5te.tar.gz +else ifeq ($(BR2_i386),y) +WF111_SOURCE = wf111-linux-driver-$(WF111_VERSION)-x86.tar.gz +endif + +# Due to the stupidity of the package Makefile, we can't invoke +# separately the build step and the install step and get a correct +# behavior. So we do everything in the install step. +define WF111_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PWD=$(@D) \ + $(LINUX_MAKE_FLAGS) KDIR=$(LINUX_DIR) \ + OUTPUT=$(TARGET_DIR) install_static +endef + +$(eval $(generic-package)) diff --git a/package/wget/Config.in b/package/wget/Config.in new file mode 100644 index 00000000..acb20f8f --- /dev/null +++ b/package/wget/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_WGET + bool "wget" + # fork() + depends on BR2_USE_MMU + depends on BR2_USE_WCHAR + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + Network utility to retrieve files from http, https and ftp. + + http://www.gnu.org/software/wget/ + +comment "wget needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS diff --git a/package/wget/wget.hash b/package/wget/wget.hash new file mode 100644 index 00000000..956e1127 --- /dev/null +++ b/package/wget/wget.hash @@ -0,0 +1,6 @@ +# Locally calculated after checking pgp signature +# https://ftp.gnu.org/gnu/wget/wget-1.20.3.tar.lz.sig +# with key 1CB27DBC98614B2D5841646D08302DB6A2670428 +sha256 69607ce8216c2d1126b7a872db594b3f21e511e660e07ca1f81be96650932abb wget-1.20.3.tar.lz +# Locally calculated +sha256 e79e9c8a0c85d735ff98185918ec94ed7d175efc377012787aebcf3b80f0d90b COPYING diff --git a/package/wget/wget.mk b/package/wget/wget.mk new file mode 100644 index 00000000..65c132e4 --- /dev/null +++ b/package/wget/wget.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# wget +# +################################################################################ + +WGET_VERSION = 1.20.3 +WGET_SOURCE = wget-$(WGET_VERSION).tar.lz +WGET_SITE = $(BR2_GNU_MIRROR)/wget +WGET_DEPENDENCIES = host-pkgconf +WGET_LICENSE = GPL-3.0+ +WGET_LICENSE_FILES = COPYING +WGET_CPE_ID_VENDOR = gnu + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +WGET_CONF_OPTS += --with-ssl=gnutls +WGET_DEPENDENCIES += gnutls +else ifeq ($(BR2_PACKAGE_OPENSSL),y) +WGET_CONF_OPTS += --with-ssl=openssl +WGET_DEPENDENCIES += openssl +else +WGET_CONF_OPTS += --without-ssl +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +WGET_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_LIBIDN2),y) +WGET_CONF_OPTS += --with-libidn +WGET_DEPENDENCIES += libidn2 +else +WGET_CONF_OPTS += --without-libidn +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +WGET_DEPENDENCIES += util-linux +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +WGET_CONF_OPTS += --with-zlib +WGET_DEPENDENCIES += zlib +else +WGET_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_PCRE2),y) +WGET_CONF_OPTS += --disable-pcre --enable-pcre2 +WGET_DEPENDENCIES += pcre2 +else ifeq ($(BR2_PACKAGE_PCRE),y) +WGET_CONF_OPTS += --enable-pcre --disable-pcre2 +WGET_DEPENDENCIES += pcre +else +WGET_CONF_OPTS += --disable-pcre --disable-pcre2 +endif + +$(eval $(autotools-package)) diff --git a/package/whetstone/Config.in b/package/whetstone/Config.in new file mode 100644 index 00000000..7a68160d --- /dev/null +++ b/package/whetstone/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_WHETSTONE + bool "whetstone" + help + C Converted Whetstone Double Precision Benchmark + + http://www.netlib.org/benchmark/ diff --git a/package/whetstone/whetstone.hash b/package/whetstone/whetstone.hash new file mode 100644 index 00000000..db9bbb45 --- /dev/null +++ b/package/whetstone/whetstone.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 333e4ceca042c146f63eec605573d16ae8b07166cbc44a17bec1ea97c6f1efbf whetstone.c diff --git a/package/whetstone/whetstone.mk b/package/whetstone/whetstone.mk new file mode 100644 index 00000000..3b6ec341 --- /dev/null +++ b/package/whetstone/whetstone.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# whetstone +# +################################################################################ + +WHETSTONE_VERSION = 1.2 +WHETSTONE_SOURCE = whetstone.c +WHETSTONE_SITE = http://www.netlib.org/benchmark + +define WHETSTONE_EXTRACT_CMDS + cp $(WHETSTONE_DL_DIR)/$($(PKG)_SOURCE) $(@D)/ +endef + +define WHETSTONE_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) LDLIBS="-lm" -C $(@D) whetstone +endef + +define WHETSTONE_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/whetstone $(TARGET_DIR)/usr/bin/whetstone +endef + +$(eval $(generic-package)) diff --git a/package/which/Config.in b/package/which/Config.in new file mode 100644 index 00000000..0dc31b22 --- /dev/null +++ b/package/which/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_WHICH + bool "which" + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + The standard 'which' utility. + + http://carlowood.github.io/which/index.html diff --git a/package/which/which.hash b/package/which/which.hash new file mode 100644 index 00000000..edea4e5e --- /dev/null +++ b/package/which/which.hash @@ -0,0 +1,4 @@ +# Locally calculated after checking pgp signature +sha256 f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad which-2.21.tar.gz +# Locally computed +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/which/which.mk b/package/which/which.mk new file mode 100644 index 00000000..c96e8937 --- /dev/null +++ b/package/which/which.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# which +# +################################################################################ + +WHICH_VERSION = 2.21 +WHICH_SITE = $(BR2_GNU_MIRROR)/which +WHICH_LICENSE = GPL-3.0+ +WHICH_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/whois/Config.in b/package/whois/Config.in new file mode 100644 index 00000000..d2a03028 --- /dev/null +++ b/package/whois/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_WHOIS + bool "whois" + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + Improved whois client. + + https://github.com/rfc1036/whois diff --git a/package/whois/whois.hash b/package/whois/whois.hash new file mode 100644 index 00000000..f42db356 --- /dev/null +++ b/package/whois/whois.hash @@ -0,0 +1,5 @@ +# From http://snapshot.debian.org/archive/debian/20201003T204015Z/pool/main/w/whois/whois_5.5.7.dsc +sha256 3efa700dbf38d127c31b21af3176cd6e5a69f96a056be60ac1dcd13df7717393 whois_5.5.7.tar.xz + +# Hash for license file: +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/whois/whois.mk b/package/whois/whois.mk new file mode 100644 index 00000000..7d684922 --- /dev/null +++ b/package/whois/whois.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# whois +# +################################################################################ + +WHOIS_VERSION = 5.5.7 +WHOIS_SITE = http://snapshot.debian.org/archive/debian/20201003T204015Z/pool/main/w/whois +WHOIS_SOURCE = whois_$(WHOIS_VERSION).tar.xz +WHOIS_DEPENDENCIES = \ + host-pkgconf \ + $(if $(BR2_PACKAGE_LIBIDN2),libidn2) \ + $(TARGET_NLS_DEPENDENCIES) +WHOIS_MAKE_ENV = $(TARGET_MAKE_ENV) +WHOIS_MAKE_OPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LIBS="$(WHOIS_EXTRA_LIBS)" +WHOIS_LICENSE = GPL-2.0+ +WHOIS_LICENSE_FILES = COPYING +WHOIS_EXTRA_LIBS = $(TARGET_NLS_LIBS) + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +WHOIS_DEPENDENCIES += libiconv +WHOIS_EXTRA_LIBS += -liconv +WHOIS_MAKE_ENV += HAVE_ICONV=1 +endif + +ifeq ($(BR2_SYSTEM_ENABLE_NLS),y) +WHOIS_BUILD_TARGETS = +WHOIS_INSTALL_TARGETS = install +else +WHOIS_BUILD_TARGETS = Makefile.depend whois mkpasswd +WHOIS_INSTALL_TARGETS = install-whois install-mkpasswd +endif + +define WHOIS_BUILD_CMDS + $(WHOIS_MAKE_ENV) $(MAKE) $(WHOIS_MAKE_OPTS) \ + $(WHOIS_BUILD_TARGETS) -C $(@D) +endef + +define WHOIS_INSTALL_TARGET_CMDS + $(WHOIS_MAKE_ENV) $(MAKE) $(WHOIS_MAKE_OPTS) \ + BASEDIR="$(TARGET_DIR)" $(WHOIS_INSTALL_TARGETS) -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/wilc1000-firmware/Config.in b/package/wilc1000-firmware/Config.in new file mode 100644 index 00000000..df8a7a6b --- /dev/null +++ b/package/wilc1000-firmware/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_WILC1000_FIRMWARE + bool "wilc1000-firmware" + help + Firmware for Atmel Wilc1000 wireless device + + https://github.com/linux4sc/wireless-firmware.git diff --git a/package/wilc1000-firmware/wilc1000-firmware.hash b/package/wilc1000-firmware/wilc1000-firmware.hash new file mode 100644 index 00000000..5344efe5 --- /dev/null +++ b/package/wilc1000-firmware/wilc1000-firmware.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a2e7a327dd545ba2051946f7613005cbde88fdd952afb8eecdd1dacda7e767d2 v14.1_Firmware.zip diff --git a/package/wilc1000-firmware/wilc1000-firmware.mk b/package/wilc1000-firmware/wilc1000-firmware.mk new file mode 100644 index 00000000..6f504d67 --- /dev/null +++ b/package/wilc1000-firmware/wilc1000-firmware.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# wilc1000-firmware +# +################################################################################ + +WILC1000_FIRMWARE_VERSION = 14.1 +WILC1000_FIRMWARE_SITE = https://github.com/linux4sc/wireless-firmware/archive +WILC1000_FIRMWARE_SOURCE = v$(WILC1000_FIRMWARE_VERSION)_Firmware.zip + +WILC1000_FIRMWARE_LICENSE = PROPRIETARY + +define WILC1000_FIRMWARE_EXTRACT_CMDS + $(UNZIP) -d $(BUILD_DIR) $(WILC1000_FIRMWARE_DL_DIR)/$(WILC1000_FIRMWARE_SOURCE) + mv $(BUILD_DIR)/wireless-firmware-$(WILC1000_FIRMWARE_VERSION)_Firmware/* $(@D) + rmdir $(BUILD_DIR)/wireless-firmware-$(WILC1000_FIRMWARE_VERSION)_Firmware +endef + +define WILC1000_FIRMWARE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(@D)/wilc1003_firmware.bin \ + $(TARGET_DIR)/lib/firmware/atmel/wilc1003_firmware.bin +endef + +$(eval $(generic-package)) diff --git a/package/wilink-bt-firmware/Config.in b/package/wilink-bt-firmware/Config.in new file mode 100644 index 00000000..26683043 --- /dev/null +++ b/package/wilink-bt-firmware/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_WILINK_BT_FIRMWARE + bool "wilink-bt-firmware" + help + Texas Instruments Wilink7 and Wilink8 (wl12xx/wl18xx) UART + attached Bluetooth firmware. + + https://github.com/TI-ECS/bt-firmware diff --git a/package/wilink-bt-firmware/wilink-bt-firmware.hash b/package/wilink-bt-firmware/wilink-bt-firmware.hash new file mode 100644 index 00000000..b0aa6b91 --- /dev/null +++ b/package/wilink-bt-firmware/wilink-bt-firmware.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 209e1a46a945e7d4d031e22fb7bd1e3fc96fa3b99d069051ce257c5e2e0843f4 wilink-bt-firmware-43fca73c6a98c63fcb98f82af5bf83761778e005-br1.tar.gz +sha256 21fd99ce784dc33b39ec0b4a383a9a9b8dafea261d73ad4548683c4eecd87f37 LICENSE diff --git a/package/wilink-bt-firmware/wilink-bt-firmware.mk b/package/wilink-bt-firmware/wilink-bt-firmware.mk new file mode 100644 index 00000000..722c4655 --- /dev/null +++ b/package/wilink-bt-firmware/wilink-bt-firmware.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# wilink-bt-firmware +# +################################################################################ + +WILINK_BT_FIRMWARE_VERSION = 43fca73c6a98c63fcb98f82af5bf83761778e005 +WILINK_BT_FIRMWARE_SITE = git://git.ti.com/ti-bt/service-packs.git +WILINK_BT_FIRMWARE_SITE_METHOD = git +WILINK_BT_FIRMWARE_LICENSE = PROPRIETARY +WILINK_BT_FIRMWARE_LICENSE_FILES = LICENSE + +define WILINK_BT_FIRMWARE_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/firmware/ti-connectivity + cp $(@D)/initscripts/TIInit_*.bts $(TARGET_DIR)/lib/firmware/ti-connectivity +endef + +$(eval $(generic-package)) diff --git a/package/wine/Config.in b/package/wine/Config.in new file mode 100644 index 00000000..9de8cf0f --- /dev/null +++ b/package/wine/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_WINE_ARCH_SUPPORTS + bool + default y + # Wine only builds on certain architectures + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" || \ + BR2_HOSTARCH = "powerpc" || BR2_HOSTARCH = "arm" || \ + BR2_HOSTARCH = "aarch64" + # Wine has much CPU specific code and mostly makes sense on x86 + depends on BR2_i386 + +config BR2_PACKAGE_WINE + bool "wine" + depends on BR2_PACKAGE_WINE_ARCH_SUPPORTS + # Wine unconditionally builds shared libraries + depends on !BR2_STATIC_LIBS + help + Wine is a compatibility layer capable of running Windows + applications on Linux. Instead of simulating internal + Windows logic like a virtual machine or emulator, Wine + translates Windows API calls into POSIX calls on-the-fly, + eliminating the performance and memory penalties of other + methods. + + http://www.winehq.org + +comment "wine needs a toolchain w/ dynamic library" + depends on BR2_PACKAGE_WINE_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS diff --git a/package/wine/wine.hash b/package/wine/wine.hash new file mode 100644 index 00000000..08abccb4 --- /dev/null +++ b/package/wine/wine.hash @@ -0,0 +1,5 @@ +# Locally calculated after checking pgp signature +sha256 87f17254c6794ec6eeb7020b164c859983c9df0dacdd66d6449ff000498c842e wine-5.12.tar.xz +# Locally calculated +sha256 e237fa56668030e928551ddd60f05df5fe957f75eab874bbd017e085ed722e7c COPYING.LIB +sha256 f3ca909e68d38c972e8ded5248b4745958dbb26f2e581ad73cfbedb6b0408e58 LICENSE diff --git a/package/wine/wine.mk b/package/wine/wine.mk new file mode 100644 index 00000000..80c9d20d --- /dev/null +++ b/package/wine/wine.mk @@ -0,0 +1,417 @@ +################################################################################ +# +# wine +# +################################################################################ + +WINE_VERSION = 5.12 +WINE_SOURCE = wine-$(WINE_VERSION).tar.xz +WINE_SITE = https://dl.winehq.org/wine/source/5.x +WINE_LICENSE = LGPL-2.1+ +WINE_LICENSE_FILES = COPYING.LIB LICENSE +WINE_CPE_ID_VENDOR = winehq +WINE_DEPENDENCIES = host-bison host-flex host-wine +HOST_WINE_DEPENDENCIES = host-bison host-flex + +# Wine needs its own directory structure and tools for cross compiling +WINE_CONF_OPTS = \ + --with-wine-tools=../host-wine-$(WINE_VERSION) \ + --disable-tests \ + --disable-win64 \ + --without-capi \ + --without-coreaudio \ + --without-faudio \ + --without-gettext \ + --without-gettextpo \ + --without-gphoto \ + --without-gsm \ + --without-hal \ + --without-opencl \ + --without-oss \ + --without-vkd3d \ + --without-vulkan + +# Wine uses a wrapper around gcc, and uses the value of --host to +# construct the filename of the gcc to call. But for external +# toolchains, the GNU_TARGET_NAME tuple that we construct from our +# internal variables may differ from the actual gcc prefix for the +# external toolchains. So, we have to override whatever the gcc +# wrapper believes what the real gcc is named, and force the tuple of +# the external toolchain, not the one we compute in GNU_TARGET_NAME. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +WINE_CONF_OPTS += TARGETFLAGS="-b $(TOOLCHAIN_EXTERNAL_PREFIX)" +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_SEQ)$(BR2_PACKAGE_ALSA_LIB_RAWMIDI),yyy) +WINE_CONF_OPTS += --with-alsa +WINE_DEPENDENCIES += alsa-lib +else +WINE_CONF_OPTS += --without-alsa +endif + +ifeq ($(BR2_PACKAGE_CUPS),y) +WINE_CONF_OPTS += --with-cups +WINE_DEPENDENCIES += cups +WINE_CONF_ENV += CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config +else +WINE_CONF_OPTS += --without-cups +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +WINE_CONF_OPTS += --with-dbus +WINE_DEPENDENCIES += dbus +else +WINE_CONF_OPTS += --without-dbus +endif + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +WINE_CONF_OPTS += --with-fontconfig +WINE_DEPENDENCIES += fontconfig +else +WINE_CONF_OPTS += --without-fontconfig +endif + +# To support freetype in wine we also need freetype in host-wine for the cross compiling tools +ifeq ($(BR2_PACKAGE_FREETYPE),y) +WINE_CONF_OPTS += --with-freetype +HOST_WINE_CONF_OPTS += --with-freetype +WINE_DEPENDENCIES += freetype +HOST_WINE_DEPENDENCIES += host-freetype +WINE_CONF_ENV += FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config +else +WINE_CONF_OPTS += --without-freetype +HOST_WINE_CONF_OPTS += --without-freetype +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +WINE_CONF_OPTS += --with-gnutls +WINE_DEPENDENCIES += gnutls +else +WINE_CONF_OPTS += --without-gnutls +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE),y) +WINE_CONF_OPTS += --with-gstreamer +WINE_DEPENDENCIES += gst1-plugins-base +else +WINE_CONF_OPTS += --without-gstreamer +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +WINE_CONF_OPTS += --with-jpeg +WINE_DEPENDENCIES += jpeg +else +WINE_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_LCMS2),y) +WINE_CONF_OPTS += --with-cms +WINE_DEPENDENCIES += lcms2 +else +WINE_CONF_OPTS += --without-cms +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +WINE_CONF_OPTS += --with-opengl +WINE_DEPENDENCIES += libgl +else +WINE_CONF_OPTS += --without-opengl +endif + +ifeq ($(BR2_PACKAGE_LIBGLU),y) +WINE_CONF_OPTS += --with-glu +WINE_DEPENDENCIES += libglu +else +WINE_CONF_OPTS += --without-glu +endif + +ifeq ($(BR2_PACKAGE_LIBKRB5),y) +WINE_CONF_OPTS += --with-krb5 +WINE_DEPENDENCIES += libkrb5 +else +WINE_CONF_OPTS += --without-krb5 +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +WINE_CONF_OPTS += --with-pcap +WINE_DEPENDENCIES += libpcap +else +WINE_CONF_OPTS += --without-pcap +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +WINE_CONF_OPTS += --with-png +WINE_DEPENDENCIES += libpng +else +WINE_CONF_OPTS += --without-png +endif + +ifeq ($(BR2_PACKAGE_LIBUSB),y) +WINE_CONF_OPTS += --with-usb +WINE_DEPENDENCIES += libusb +else +WINE_CONF_OPTS += --without-usb +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +WINE_CONF_OPTS += --with-v4l2 +WINE_DEPENDENCIES += libv4l +else +WINE_CONF_OPTS += --without-v4l2 +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +WINE_CONF_OPTS += --with-xml +WINE_DEPENDENCIES += libxml2 +WINE_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config +else +WINE_CONF_OPTS += --without-xml +endif + +ifeq ($(BR2_PACKAGE_LIBXSLT),y) +WINE_CONF_OPTS += --with-xslt +WINE_DEPENDENCIES += libxslt +WINE_CONF_ENV += XSLT_CONFIG=$(STAGING_DIR)/usr/bin/xslt-config +else +WINE_CONF_OPTS += --without-xslt +endif + +ifeq ($(BR2_PACKAGE_MPG123),y) +WINE_CONF_OPTS += --with-mpg123 +WINE_DEPENDENCIES += mpg123 +else +WINE_CONF_OPTS += --without-mpg123 +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +WINE_CONF_OPTS += --with-curses +WINE_DEPENDENCIES += ncurses +else +WINE_CONF_OPTS += --without-curses +endif + +ifeq ($(BR2_PACKAGE_OPENAL),y) +WINE_CONF_OPTS += --with-openal +WINE_DEPENDENCIES += openal +else +WINE_CONF_OPTS += --without-openal +endif + +ifeq ($(BR2_PACKAGE_OPENLDAP),y) +WINE_CONF_OPTS += --with-ldap +WINE_DEPENDENCIES += openldap +else +WINE_CONF_OPTS += --without-ldap +endif + +ifeq ($(BR2_PACKAGE_MESA3D_OSMESA_CLASSIC),y) +WINE_CONF_OPTS += --with-osmesa +WINE_DEPENDENCIES += mesa3d +else +WINE_CONF_OPTS += --without-osmesa +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +WINE_CONF_OPTS += --with-pulse +WINE_DEPENDENCIES += pulseaudio +else +WINE_CONF_OPTS += --without-pulse +endif + +ifeq ($(BR2_PACKAGE_SAMBA4),y) +WINE_CONF_OPTS += --with-netapi +WINE_DEPENDENCIES += samba4 +else +WINE_CONF_OPTS += --without-netapi +endif + +ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y) +WINE_CONF_OPTS += --with-sane +WINE_DEPENDENCIES += sane-backends +WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config +else +WINE_CONF_OPTS += --without-sane +endif + +ifeq ($(BR2_PACKAGE_SDL2),y) +WINE_CONF_OPTS += --with-sdl +WINE_DEPENDENCIES += sdl2 +else +WINE_CONF_OPTS += --without-sdl +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +WINE_CONF_OPTS += --with-tiff +WINE_DEPENDENCIES += tiff +else +WINE_CONF_OPTS += --without-tiff +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +WINE_CONF_OPTS += --with-udev +WINE_DEPENDENCIES += udev +else +WINE_CONF_OPTS += --without-udev +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +WINE_CONF_OPTS += --with-x +WINE_DEPENDENCIES += xlib_libX11 +else +WINE_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y) +WINE_CONF_OPTS += --with-xcomposite +WINE_DEPENDENCIES += xlib_libXcomposite +else +WINE_CONF_OPTS += --without-xcomposite +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +WINE_CONF_OPTS += --with-xcursor +WINE_DEPENDENCIES += xlib_libXcursor +else +WINE_CONF_OPTS += --without-xcursor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y) +WINE_CONF_OPTS += --with-xshape --with-xshm +WINE_DEPENDENCIES += xlib_libXext +else +WINE_CONF_OPTS += --without-xshape --without-xshm +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) +WINE_CONF_OPTS += --with-xinput --with-xinput2 +WINE_DEPENDENCIES += xlib_libXi +else +WINE_CONF_OPTS += --without-xinput --without-xinput2 +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +WINE_CONF_OPTS += --with-xinerama +WINE_DEPENDENCIES += xlib_libXinerama +else +WINE_CONF_OPTS += --without-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +WINE_CONF_OPTS += --with-xrandr +WINE_DEPENDENCIES += xlib_libXrandr +else +WINE_CONF_OPTS += --without-xrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y) +WINE_CONF_OPTS += --with-xrender +WINE_DEPENDENCIES += xlib_libXrender +else +WINE_CONF_OPTS += --without-xrender +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y) +WINE_CONF_OPTS += --with-xxf86vm +WINE_DEPENDENCIES += xlib_libXxf86vm +else +WINE_CONF_OPTS += --without-xxf86vm +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +WINE_CONF_OPTS += --with-zlib +WINE_DEPENDENCIES += zlib +else +WINE_CONF_OPTS += --without-zlib +endif + +# host-gettext is essential for .po file support in host-wine wrc +ifeq ($(BR2_SYSTEM_ENABLE_NLS),y) +HOST_WINE_DEPENDENCIES += host-gettext +HOST_WINE_CONF_OPTS += --with-gettext --with-gettextpo +else +HOST_WINE_CONF_OPTS += --without-gettext --without-gettextpo +endif + +# Wine needs to enable 64-bit build tools on 64-bit host +ifeq ($(HOSTARCH),x86_64) +HOST_WINE_CONF_OPTS += --enable-win64 +endif + +# Wine only needs the host tools to be built, so cut-down the +# build time by building just what we need. +define HOST_WINE_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) \ + tools \ + tools/sfnt2fon \ + tools/widl \ + tools/winebuild \ + tools/winegcc \ + tools/wmc \ + tools/wrc +endef + +# Wine only needs its host variant to be built, not that it is +# installed, as it uses the tools from the build directory. But +# we have no way in Buildroot to state that a host package should +# not be installed. So, just provide an noop install command. +define HOST_WINE_INSTALL_CMDS + : +endef + +# We are focused on the cross compiling tools, disable everything else +HOST_WINE_CONF_OPTS += \ + --disable-tests \ + --disable-win16 \ + --without-alsa \ + --without-capi \ + --without-cms \ + --without-coreaudio \ + --without-faudio \ + --without-cups \ + --without-curses \ + --without-dbus \ + --without-fontconfig \ + --without-gphoto \ + --without-glu \ + --without-gnutls \ + --without-gsm \ + --without-gssapi \ + --without-gstreamer \ + --without-hal \ + --without-jpeg \ + --without-krb5 \ + --without-ldap \ + --without-mpg123 \ + --without-netapi \ + --without-openal \ + --without-opencl \ + --without-opengl \ + --without-osmesa \ + --without-oss \ + --without-pcap \ + --without-pulse \ + --without-png \ + --without-sane \ + --without-sdl \ + --without-tiff \ + --without-usb \ + --without-v4l2 \ + --without-vkd3d \ + --without-vulkan \ + --without-x \ + --without-xcomposite \ + --without-xcursor \ + --without-xinerama \ + --without-xinput \ + --without-xinput2 \ + --without-xml \ + --without-xrandr \ + --without-xrender \ + --without-xshape \ + --without-xshm \ + --without-xslt \ + --without-xxf86vm \ + --without-zlib + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/wipe/0001-musl.patch b/package/wipe/0001-musl.patch new file mode 100644 index 00000000..35b3af80 --- /dev/null +++ b/package/wipe/0001-musl.patch @@ -0,0 +1,28 @@ +Fix musl build + +In file included from main.c:46:0: +rand.h:31:9: error: unknown type name ‘u_int32_t’ + typedef u_int32_t u_rand_t; + ^ +: recipe for target 'main.o' failed + +Patch sent upstream: https://sourceforge.net/p/wipe/patches/4/ + +Signed-off-by: Bernd Kuhls + +diff -uNr wipe-2.3.1.org/rand.h wipe-2.3.1/rand.h +--- wipe-2.3.1.org/rand.h 2003-12-03 04:01:02.000000000 +0100 ++++ wipe-2.3.1/rand.h 2016-01-31 21:39:54.000000000 +0100 +@@ -22,10 +22,9 @@ + + #ifdef HAVE_STDINT_H + # include "stdint.h" +-#else +-# ifndef LINUX ++#endif ++#if !defined(u_int32_t) + # define u_int32_t uint32_t +-# endif + #endif + + typedef u_int32_t u_rand_t; diff --git a/package/wipe/Config.in b/package/wipe/Config.in new file mode 100644 index 00000000..0241c137 --- /dev/null +++ b/package/wipe/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_WIPE + bool "wipe" + help + Wipe is a little command for securely erasing files + from magnetic media. It compiles under various unix platforms. + + http://wipe.sourceforge.net diff --git a/package/wipe/wipe.hash b/package/wipe/wipe.hash new file mode 100644 index 00000000..d607efde --- /dev/null +++ b/package/wipe/wipe.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 463916370f9b35bb34419c2c0ae3dc4c0a471db32e8595afa1d14c0337b61aa0 wipe-2.3.1.tar.bz2 +sha256 890cd89006bb57ce95b460e867c7bcc81d30cbc23067a9be4644bdac6882bc14 LICENSE diff --git a/package/wipe/wipe.mk b/package/wipe/wipe.mk new file mode 100644 index 00000000..83a8c875 --- /dev/null +++ b/package/wipe/wipe.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# wipe +# +################################################################################ + +WIPE_VERSION = 2.3.1 +WIPE_SITE = http://downloads.sourceforge.net/project/wipe/wipe/$(WIPE_VERSION) +WIPE_SOURCE = wipe-$(WIPE_VERSION).tar.bz2 +WIPE_LICENSE = GPL-2.0+ +WIPE_LICENSE_FILES = LICENSE + +define WIPE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/wipe $(TARGET_DIR)/usr/bin/wipe +endef + +$(eval $(autotools-package)) diff --git a/package/wireguard-linux-compat/Config.in b/package/wireguard-linux-compat/Config.in new file mode 100644 index 00000000..5a323a35 --- /dev/null +++ b/package/wireguard-linux-compat/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_WIREGUARD_LINUX_COMPAT + bool "wireguard linux-compat" + depends on BR2_LINUX_KERNEL + # kernel module requires 3.10+ + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + # kernel module in upstream linux since 5.6 + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_6 + help + WireGuard is an extremely simple yet fast and modern VPN + that utilizes state-of-the-art cryptography. It aims to be + faster, simpler, leaner, and more useful than IPSec, while + avoiding the massive headache. It intends to be considerably + more performant than OpenVPN. WireGuard is designed as a + general purpose VPN for running on embedded interfaces and + super computers alike, fit for many different + circumstances. + + Support for WireGuard is included in Linux 5.6+. This + package provides a backport of the kernel support for older + kernels. + + https://www.wireguard.com + +comment "wireguard-linux-compat needs a toolchain w/ headers >= 3.10" + depends on BR2_LINUX_KERNEL + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 diff --git a/package/wireguard-linux-compat/wireguard-linux-compat.hash b/package/wireguard-linux-compat/wireguard-linux-compat.hash new file mode 100644 index 00000000..f4f94cfd --- /dev/null +++ b/package/wireguard-linux-compat/wireguard-linux-compat.hash @@ -0,0 +1,4 @@ +# https://lists.zx2c4.com/pipermail/wireguard/2021-January/006349.html +sha256 dac6e68cd4c3db441499850dfa8a70706384a3295f37fda1b839a50b79faef54 wireguard-linux-compat-1.0.20210124.tar.xz +# Locally calculated +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/wireguard-linux-compat/wireguard-linux-compat.mk b/package/wireguard-linux-compat/wireguard-linux-compat.mk new file mode 100644 index 00000000..2f36ec8b --- /dev/null +++ b/package/wireguard-linux-compat/wireguard-linux-compat.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# wireguard +# +################################################################################ + +WIREGUARD_LINUX_COMPAT_VERSION = 1.0.20210124 +WIREGUARD_LINUX_COMPAT_SITE = https://git.zx2c4.com/wireguard-linux-compat/snapshot +WIREGUARD_LINUX_COMPAT_SOURCE = wireguard-linux-compat-$(WIREGUARD_LINUX_COMPAT_VERSION).tar.xz +WIREGUARD_LINUX_COMPAT_LICENSE = GPL-2.0 +WIREGUARD_LINUX_COMPAT_LICENSE_FILES = COPYING +WIREGUARD_LINUX_COMPAT_MODULE_SUBDIRS = src + +define WIREGUARD_LINUX_COMPAT_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_INET) + $(call KCONFIG_ENABLE_OPT,CONFIG_NET) + $(call KCONFIG_ENABLE_OPT,CONFIG_NET_FOU) + $(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO) + $(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_MANAGER) +endef + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/wireguard-tools/Config.in b/package/wireguard-tools/Config.in new file mode 100644 index 00000000..130f4c48 --- /dev/null +++ b/package/wireguard-tools/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_WIREGUARD_TOOLS + bool "wireguard tools" + # kernel module requires 3.10+, userspace makes no sense without it + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + help + WireGuard is an extremely simple yet fast and modern VPN + that utilizes state-of-the-art cryptography. It aims to be + faster, simpler, leaner, and more useful than IPSec, while + avoiding the massive headache. It intends to be considerably + more performant than OpenVPN. WireGuard is designed as a + general purpose VPN for running on embedded interfaces and + super computers alike, fit for many different + circumstances. + + This package provides the userspace tooling to configure + WireGuard tunnels. + + https://www.wireguard.com + +comment "wireguard-tools needs a toolchain w/ headers >= 3.10" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 diff --git a/package/wireguard-tools/wireguard-tools.hash b/package/wireguard-tools/wireguard-tools.hash new file mode 100644 index 00000000..3bff364e --- /dev/null +++ b/package/wireguard-tools/wireguard-tools.hash @@ -0,0 +1,4 @@ +# https://lists.zx2c4.com/pipermail/wireguard/2020-August/005790.html +sha256 51bc85e33a5b3cf353786ae64b0f1216d7a871447f058b6137f793eb0f53b7fd wireguard-tools-1.0.20200827.tar.xz +# Locally calculated +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/wireguard-tools/wireguard-tools.mk b/package/wireguard-tools/wireguard-tools.mk new file mode 100644 index 00000000..d360c812 --- /dev/null +++ b/package/wireguard-tools/wireguard-tools.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# wireguard-tools +# +################################################################################ + +WIREGUARD_TOOLS_VERSION = 1.0.20200827 +WIREGUARD_TOOLS_SITE = https://git.zx2c4.com/wireguard-tools/snapshot +WIREGUARD_TOOLS_SOURCE = wireguard-tools-$(WIREGUARD_TOOLS_VERSION).tar.xz +WIREGUARD_TOOLS_LICENSE = GPL-2.0 +WIREGUARD_TOOLS_LICENSE_FILES = COPYING + +ifeq ($(BR2_INIT_SYSTEMD),y) +WIREGUARD_TOOLS_MAKE_OPTS += WITH_SYSTEMDUNITS=yes +WIREGUARD_TOOLS_DEPENDENCIES += host-pkgconf +else +WIREGUARD_TOOLS_MAKE_OPTS += WITH_SYSTEMDUNITS=no +endif + +ifeq ($(BR2_PACKAGE_BASH),y) +WIREGUARD_TOOLS_MAKE_OPTS += WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes +else +WIREGUARD_TOOLS_MAKE_OPTS += WITH_BASHCOMPLETION=no WITH_WGQUICK=no +endif + +define WIREGUARD_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(WIREGUARD_TOOLS_MAKE_OPTS) \ + -C $(@D)/src +endef + +define WIREGUARD_TOOLS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(WIREGUARD_TOOLS_MAKE_OPTS) \ + -C $(@D)/src install DESTDIR=$(TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/wireless-regdb/Config.in b/package/wireless-regdb/Config.in new file mode 100644 index 00000000..17350a41 --- /dev/null +++ b/package/wireless-regdb/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_WIRELESS_REGDB + bool "wireless-regdb" + help + Wireless regulatory database. + + Wireless regulatory database. The database lists the + allowed radio frequencies for each local jurisdiction. + + Since linux-4.15 the kernel supports loading the files + regulatory.db/regulatory.db.p7s directly from the + /lib/firmware directory, for earlier versions the crda helper + application is needed. + + https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb diff --git a/package/wireless-regdb/wireless-regdb.hash b/package/wireless-regdb/wireless-regdb.hash new file mode 100644 index 00000000..d941fc3b --- /dev/null +++ b/package/wireless-regdb/wireless-regdb.hash @@ -0,0 +1,4 @@ +# From https://www.kernel.org/pub/software/network/wireless-regdb/sha256sums.asc +sha256 9e4c02b2a9710df4dbdb327c39612e8cbbae6495987afeddaebab28c1ea3d8fa wireless-regdb-2021.04.21.tar.xz +# Locally computed +sha256 678b0df753c86198fc496d1f1033429bbd57f101472132ee7eaaf9f5e0a7fae1 LICENSE diff --git a/package/wireless-regdb/wireless-regdb.mk b/package/wireless-regdb/wireless-regdb.mk new file mode 100644 index 00000000..49a3824c --- /dev/null +++ b/package/wireless-regdb/wireless-regdb.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# wireless-regdb +# +################################################################################ + +WIRELESS_REGDB_VERSION = 2021.04.21 +WIRELESS_REGDB_SOURCE = wireless-regdb-$(WIRELESS_REGDB_VERSION).tar.xz +WIRELESS_REGDB_SITE = $(BR2_KERNEL_MIRROR)/software/network/wireless-regdb +WIRELESS_REGDB_LICENSE = ISC +WIRELESS_REGDB_LICENSE_FILES = LICENSE +WIRELESS_REGDB_CPE_ID_VENDOR = kernel + +ifeq ($(BR2_PACKAGE_CRDA),y) +define WIRELESS_REGDB_INSTALL_CRDA_TARGET_CMDS + $(INSTALL) -m 644 -D -T $(@D)/regulatory.bin \ + $(TARGET_DIR)/usr/lib/crda/regulatory.bin + $(INSTALL) -m 644 -D -T $(@D)/sforshee.key.pub.pem \ + $(TARGET_DIR)/etc/wireless-regdb/pubkeys/sforshee.key.pub.pem +endef +endif + +define WIRELESS_REGDB_INSTALL_TARGET_CMDS + $(WIRELESS_REGDB_INSTALL_CRDA_TARGET_CMDS) + $(INSTALL) -m 644 -D -T $(@D)/regulatory.db \ + $(TARGET_DIR)/lib/firmware/regulatory.db + $(INSTALL) -m 644 -D -T $(@D)/regulatory.db.p7s \ + $(TARGET_DIR)/lib/firmware/regulatory.db.p7s +endef + +$(eval $(generic-package)) diff --git a/package/wireless_tools/0001-remove-bzero.patch b/package/wireless_tools/0001-remove-bzero.patch new file mode 100644 index 00000000..53ef5886 --- /dev/null +++ b/package/wireless_tools/0001-remove-bzero.patch @@ -0,0 +1,95 @@ +Switch all instances of deprecated bzero() to memset() equivalent. + +Signed-off-by: Gustavo Zacarias + +diff -Nura wireless_tools.30/ifrename.c wireless_tools.30-bzero/ifrename.c +--- wireless_tools.30/ifrename.c 2007-10-16 20:12:41.000000000 -0300 ++++ wireless_tools.30-bzero/ifrename.c 2014-06-11 09:52:59.623741119 -0300 +@@ -541,7 +541,7 @@ + victimname, autoname); + + /* Prepare request */ +- bzero(&ifr, sizeof(struct ifreq)); ++ memset(&ifr, 0, sizeof(struct ifreq)); + strncpy(ifr.ifr_name, victimname, IFNAMSIZ); + strncpy(ifr.ifr_newname, autoname, IFNAMSIZ); + +@@ -587,7 +587,7 @@ + } + + /* Prepare request */ +- bzero(&ifr, sizeof(struct ifreq)); ++ memset(&ifr, 0, sizeof(struct ifreq)); + strncpy(ifr.ifr_name, oldname, IFNAMSIZ); + strncpy(ifr.ifr_newname, newname, IFNAMSIZ); + +@@ -747,7 +747,7 @@ + int i; + + /* Get MAC address */ +- bzero(&ifr, sizeof(struct ifreq)); ++ memset(&ifr, 0, sizeof(struct ifreq)); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ); + ret = ioctl(skfd, SIOCGIFHWADDR, &ifr); + if(ret < 0) +@@ -1040,8 +1040,8 @@ + return(0); + + /* Prepare request */ +- bzero(&ifr, sizeof(struct ifreq)); +- bzero(&drvinfo, sizeof(struct ethtool_drvinfo)); ++ memset(&ifr, 0, sizeof(struct ifreq)); ++ memset(&drvinfo, 0, sizeof(struct ethtool_drvinfo)); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ); + drvinfo.cmd = ETHTOOL_GDRVINFO; + ifr.ifr_data = (caddr_t) &drvinfo; +@@ -1206,8 +1206,8 @@ + return(0); + + /* Prepare request */ +- bzero(&ifr, sizeof(struct ifreq)); +- bzero(&map, sizeof(struct ifmap)); ++ memset(&ifr, 0, sizeof(struct ifreq)); ++ memset(&map, 0, sizeof(struct ifmap)); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ); + + /* Do it */ +@@ -2050,7 +2050,7 @@ + struct add_extra extrainfo; + + /* Reset the list of filters */ +- bzero(selector_active, sizeof(selector_active)); ++ memset(selector_active, 0, sizeof(selector_active)); + + /* Check filename */ + if(!strcmp(filename, "-")) +diff -Nura wireless_tools.30/iwlib.c wireless_tools.30-bzero/iwlib.c +--- wireless_tools.30/iwlib.c 2009-11-23 23:28:59.000000000 -0300 ++++ wireless_tools.30-bzero/iwlib.c 2014-06-11 09:50:20.611371384 -0300 +@@ -484,7 +484,7 @@ + union iw_range_raw * range_raw; + + /* Cleanup */ +- bzero(buffer, sizeof(buffer)); ++ memset(buffer, 0, sizeof(buffer)); + + wrq.u.data.pointer = (caddr_t) buffer; + wrq.u.data.length = sizeof(buffer); +@@ -513,7 +513,7 @@ + else + { + /* Zero unknown fields */ +- bzero((char *) range, sizeof(struct iw_range)); ++ memset((char *) range, 0, sizeof(struct iw_range)); + + /* Initial part unmoved */ + memcpy((char *) range, +@@ -3064,7 +3064,7 @@ + oldwscan->next = wscan; + + /* Reset it */ +- bzero(wscan, sizeof(struct wireless_scan)); ++ memset(wscan, 0, sizeof(struct wireless_scan)); + + /* Save cell identifier */ + wscan->has_ap_addr = 1; diff --git a/package/wireless_tools/Config.in b/package/wireless_tools/Config.in new file mode 100644 index 00000000..349908db --- /dev/null +++ b/package/wireless_tools/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_WIRELESS_TOOLS + bool "wireless tools" + help + A collection of tools to configure wireless lan cards. + + https://hewlettpackard.github.io/wireless-tools/ + +if BR2_PACKAGE_WIRELESS_TOOLS + +config BR2_PACKAGE_WIRELESS_TOOLS_LIB + bool "Install shared library" + depends on !BR2_STATIC_LIBS + help + The shared library of wireless tools + +endif diff --git a/package/wireless_tools/wireless_tools.hash b/package/wireless_tools/wireless_tools.hash new file mode 100644 index 00000000..50a3f62b --- /dev/null +++ b/package/wireless_tools/wireless_tools.hash @@ -0,0 +1,3 @@ +# locally computed hash +sha256 abd9c5c98abf1fdd11892ac2f8a56737544fe101e1be27c6241a564948f34c63 wireless_tools.30.pre9.tar.gz +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING diff --git a/package/wireless_tools/wireless_tools.mk b/package/wireless_tools/wireless_tools.mk new file mode 100644 index 00000000..1d29c3b1 --- /dev/null +++ b/package/wireless_tools/wireless_tools.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# wireless_tools +# +################################################################################ + +WIRELESS_TOOLS_VERSION_MAJOR = 30 +WIRELESS_TOOLS_VERSION = $(WIRELESS_TOOLS_VERSION_MAJOR).pre9 +WIRELESS_TOOLS_SITE = https://hewlettpackard.github.io/wireless-tools +WIRELESS_TOOLS_SOURCE = wireless_tools.$(WIRELESS_TOOLS_VERSION).tar.gz +WIRELESS_TOOLS_LICENSE = GPL-2.0 +WIRELESS_TOOLS_LICENSE_FILES = COPYING +WIRELESS_TOOLS_CPE_ID_VERSION = $(WIRELESS_TOOLS_VERSION_MAJOR) +WIRELESS_TOOLS_CPE_ID_UPDATE = pre9 +WIRELESS_TOOLS_INSTALL_STAGING = YES + +WIRELESS_TOOLS_BUILD_TARGETS = iwmulticall +WIRELESS_TOOLS_INSTALL_TARGETS = install-iwmulticall + +ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_LIB),y) +WIRELESS_TOOLS_BUILD_TARGETS += libiw.so.$(WIRELESS_TOOLS_VERSION_MAJOR) +WIRELESS_TOOLS_INSTALL_TARGETS += install-dynamic + +define WIRELESS_TOOLS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)" LDCONFIG=/bin/true \ + install-dynamic + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)/usr" install-hdr +endef + +endif + +define WIRELESS_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + $(WIRELESS_TOOLS_BUILD_TARGETS) +endef + +define WIRELESS_TOOLS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" LDCONFIG=/bin/true \ + $(WIRELESS_TOOLS_INSTALL_TARGETS) +endef + +$(eval $(generic-package)) diff --git a/package/wireshark/Config.in b/package/wireshark/Config.in new file mode 100644 index 00000000..95fc9b38 --- /dev/null +++ b/package/wireshark/Config.in @@ -0,0 +1,52 @@ +config BR2_PACKAGE_WIRESHARK + bool "wireshark" + depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt -> libgpg-error + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # fork(), glib2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + select BR2_PACKAGE_C_ARES + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_SPEEXDSP + help + Network traffic sniffer and protocol decoder. + + https://www.wireshark.org + +if BR2_PACKAGE_WIRESHARK + +config BR2_PACKAGE_WIRESHARK_GUI + bool "Qt5 GUI" + default y + depends on BR2_INSTALL_LIBSTDCPP # qt5 + depends on BR2_HOST_GCC_AT_LEAST_5 # qt5 + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # qt5 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # qt5 + depends on !BR2_arc # qt5 + depends on BR2_PACKAGE_HAS_UDEV # qt5 input + select BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5BASE_FONTCONFIG # runtime + select BR2_PACKAGE_QT5BASE_PNG # runtime + select BR2_PACKAGE_QT5BASE_WIDGETS + select BR2_PACKAGE_QT5MULTIMEDIA + select BR2_PACKAGE_QT5SVG + select BR2_PACKAGE_QT5TOOLS + select BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS + help + Enable Qt5 GUI + +comment "Qt5 GUI needs a udev /dev management and a toolchain w/ C++, NPTL, host gcc >= 5.0, gcc >= 5.0" + depends on !BR2_arc + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || \ + !BR2_HOST_GCC_AT_LEAST_5 + +endif # BR2_PACKAGE_WIRESHARK + +comment "wireshark needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/wireshark/wireshark.hash b/package/wireshark/wireshark.hash new file mode 100644 index 00000000..0876703e --- /dev/null +++ b/package/wireshark/wireshark.hash @@ -0,0 +1,6 @@ +# From https://www.wireshark.org/download/src/all-versions/SIGNATURES-3.4.7.txt +sha1 3fa4bb774030442b9908243a9927d38479c52bf5 wireshark-3.4.7.tar.xz +sha256 6c4cee51ef997cb9d9aaee84113525a5629157d3c743d7c4e320000de804a09d wireshark-3.4.7.tar.xz + +# Locally calculated +sha256 7cdbed2b697efaa45576a033f1ac0e73cd045644a91c79bbf41d4a7d81dac7bf COPYING diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk new file mode 100644 index 00000000..6ee4b203 --- /dev/null +++ b/package/wireshark/wireshark.mk @@ -0,0 +1,207 @@ +################################################################################ +# +# wireshark +# +################################################################################ + +WIRESHARK_VERSION = 3.4.7 +WIRESHARK_SOURCE = wireshark-$(WIRESHARK_VERSION).tar.xz +WIRESHARK_SITE = https://www.wireshark.org/download/src/all-versions +WIRESHARK_LICENSE = wireshark license +WIRESHARK_LICENSE_FILES = COPYING +WIRESHARK_CPE_ID_VENDOR = wireshark +WIRESHARK_DEPENDENCIES = \ + c-ares \ + host-pkgconf \ + host-python3 \ + libgcrypt \ + libglib2 \ + libpcap \ + speexdsp + +WIRESHARK_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + PATH="$(@D)/bin:$(BR_PATH)" + +WIRESHARK_CONF_OPTS = \ + -DDISABLE_WERROR=ON \ + -DENABLE_ILBC=OFF \ + -DENABLE_PCAP=ON \ + -DENABLE_SMI=OFF + +# wireshark needs the host version of lemon during compilation. +# This binrary is provided by sqlite-src (which is different from +# sqlite-autotools that is currently packaged in buildroot) moreover wireshark +# adds several patches. +# So, instead of creating a separate host package and installing lemon to +# $(HOST_DIR), this binary is compiled on-the-fly +define WIRESHARK_BUILD_LEMON_TOOL + cd $(@D); \ + mkdir -p $(@D)/bin; \ + $(HOSTCC) $(HOST_CFLAGS) -o $(@D)/bin/lemon tools/lemon/lemon.c +endef + +WIRESHARK_PRE_BUILD_HOOKS += WIRESHARK_BUILD_LEMON_TOOL + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +WIRESHARK_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic +endif + +ifeq ($(BR2_GCC_ENABLE_LTO),y) +WIRESHARK_CONF_OPTS += -DENABLE_LTO=ON +else +WIRESHARK_CONF_OPTS += -DENABLE_LTO=OFF +endif + +ifeq ($(BR2_PACKAGE_WIRESHARK_GUI),y) +WIRESHARK_CONF_OPTS += -DBUILD_wireshark=ON +WIRESHARK_DEPENDENCIES += qt5base qt5multimedia qt5svg qt5tools +else +WIRESHARK_CONF_OPTS += -DBUILD_wireshark=OFF +endif + +ifeq ($(BR2_PACKAGE_BCG729),y) +WIRESHARK_CONF_OPTS += -DENABLE_BCG729=ON +WIRESHARK_DEPENDENCIES += bcg729 +else +WIRESHARK_CONF_OPTS += -DENABLE_BCG729=OFF +endif + +ifeq ($(BR2_PACKAGE_BROTLI),y) +WIRESHARK_CONF_OPTS += -DENABLE_BROTLI=ON +WIRESHARK_DEPENDENCIES += brotli +else +WIRESHARK_CONF_OPTS += -DENABLE_BROTLI=OFF +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +WIRESHARK_CONF_OPTS += -DENABLE_GNUTLS=ON +WIRESHARK_DEPENDENCIES += gnutls +else +WIRESHARK_CONF_OPTS += -DENABLE_GNUTLS=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBKRB5),y) +WIRESHARK_CONF_OPTS += -DENABLE_KERBEROS=ON +WIRESHARK_DEPENDENCIES += libkrb5 +else +WIRESHARK_CONF_OPTS += -DENABLE_KERBEROS=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBMAXMINDDB),y) +WIRESHARK_CONF_OPTS += -DBUILD_mmdbresolve=ON +WIRESHARK_DEPENDENCIES += libmaxminddb +else +WIRESHARK_CONF_OPTS += -DBUILD_mmdbresolve=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBNL),y) +WIRESHARK_CONF_OPTS += -DENABLE_NETLINK=ON +WIRESHARK_DEPENDENCIES += libnl +else +WIRESHARK_CONF_OPTS += -DENABLE_NETLINK=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBSSH),y) +WIRESHARK_CONF_OPTS += -DENABLE_LIBSSH=ON +WIRESHARK_DEPENDENCIES += libssh +else +WIRESHARK_CONF_OPTS += -DENABLE_LIBSSH=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +WIRESHARK_CONF_OPTS += -DENABLE_LIBXML2=ON +WIRESHARK_DEPENDENCIES += libxml2 +else +WIRESHARK_CONF_OPTS += -DENABLE_LIBXML2=OFF +endif + +# no support for lua53 yet +ifeq ($(BR2_PACKAGE_LUA_5_1),y) +WIRESHARK_CONF_OPTS += -DENABLE_LUA=ON +WIRESHARK_DEPENDENCIES += lua +else +WIRESHARK_CONF_OPTS += -DENABLE_LUA=OFF +endif + +ifeq ($(BR2_PACKAGE_LZ4),y) +WIRESHARK_CONF_OPTS += -DENABLE_LZ4=ON +WIRESHARK_DEPENDENCIES += lz4 +else +WIRESHARK_CONF_OPTS += -DENABLE_LZ4=OFF +endif + +ifeq ($(BR2_PACKAGE_NGHTTP2),y) +WIRESHARK_CONF_OPTS += -DENABLE_NGHTTP2=ON +WIRESHARK_DEPENDENCIES += nghttp2 +else +WIRESHARK_CONF_OPTS += -DENABLE_NGHTTP2=OFF +endif + +ifeq ($(BR2_PACKAGE_OPUS),y) +WIRESHARK_CONF_OPTS += -DENABLE_OPUS=ON +WIRESHARK_DEPENDENCIES += opus +else +WIRESHARK_CONF_OPTS += -DENABLE_OPUS=OFF +endif + +ifeq ($(BR2_PACKAGE_SBC),y) +WIRESHARK_CONF_OPTS += -DENABLE_SBC=ON +WIRESHARK_DEPENDENCIES += sbc +else +WIRESHARK_CONF_OPTS += -DENABLE_SBC=OFF +endif + +ifeq ($(BR2_PACKAGE_SNAPPY),y) +WIRESHARK_CONF_OPTS += -DENABLE_SNAPPY=ON +WIRESHARK_DEPENDENCIES += snappy +else +WIRESHARK_CONF_OPTS += -DENABLE_SNAPPY=OFF +endif + +ifeq ($(BR2_PACKAGE_SPANDSP),y) +WIRESHARK_CONF_OPTS += -DENABLE_SPANDSP=ON +WIRESHARK_DEPENDENCIES += spandsp +else +WIRESHARK_CONF_OPTS += -DENABLE_SPANDSP=OFF +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +WIRESHARK_CONF_OPTS += -DBUILD_sdjournal=ON +WIRESHARK_DEPENDENCIES += systemd +else +WIRESHARK_CONF_OPTS += -DBUILD_sdjournal=OFF +endif + +ifeq ($(BR2_PACKAGE_ZSTD),y) +WIRESHARK_CONF_OPTS += -DENABLE_ZSTD=ON +WIRESHARK_DEPENDENCIES += zstd +else +WIRESHARK_CONF_OPTS += -DENABLE_ZSTD=OFF +endif + +# Disable plugins as some of them (like l16mono) can't be built +# statically. ENABLE_STATIC=ON actually means "disable shared library" +# and ENABLE_STATIC=OFF means "enable shared library". So for the +# BR2_SHARED_STATIC_LIBS=y case, we want ENABLE_STATIC=OFF even if +# that sounds counter-intuitive. +ifeq ($(BR2_STATIC_LIBS),y) +WIRESHARK_CONF_OPTS += \ + -DENABLE_PLUGINS=OFF \ + -DENABLE_STATIC=ON \ + -DUSE_STATIC=ON +else +WIRESHARK_CONF_OPTS += \ + -DENABLE_PLUGINS=ON \ + -DENABLE_STATIC=OFF \ + -DUSE_STATIC=OFF +endif + +define WIRESHARK_REMOVE_DOCS + find $(TARGET_DIR)/usr/share/wireshark -name '*.txt' -print0 \ + -o -name '*.html' -print0 | xargs -0 rm -f +endef + +WIRESHARK_POST_INSTALL_TARGET_HOOKS += WIRESHARK_REMOVE_DOCS + +$(eval $(cmake-package)) diff --git a/package/wlroots/Config.in b/package/wlroots/Config.in new file mode 100644 index 00000000..2f72fd49 --- /dev/null +++ b/package/wlroots/Config.in @@ -0,0 +1,41 @@ +comment "wlroots needs udev, mesa3d w/ EGL and GLES support" + depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL || \ + !BR2_PACKAGE_MESA3D_OPENGL_ES || \ + !BR2_PACKAGE_HAS_UDEV + +comment "wlroots needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS + +config BR2_PACKAGE_WLROOTS + bool "wlroots" + depends on !BR2_STATIC_LIBS # wayland + depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland + depends on BR2_PACKAGE_HAS_UDEV # libinput + # Technically wlroots should work with any OpenGL implementation + # which provides EGL, GLES2, and libgbm; but in practice only + # Mesa ships an usable libgbm. + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL + depends on BR2_PACKAGE_MESA3D_OPENGL_ES + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBINPUT + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_WAYLAND_PROTOCOLS + help + wlroots is a modular Wayland library for building compositors + which implements many of their common features. + + https://github.com/swaywm/wlroots + +if BR2_PACKAGE_WLROOTS + +config BR2_PACKAGE_WLROOTS_X11 + bool "X11 backend" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + help + Support Wayland sessions nested inside a X11 window + +endif diff --git a/package/wlroots/wlroots.hash b/package/wlroots/wlroots.hash new file mode 100644 index 00000000..2fab9b30 --- /dev/null +++ b/package/wlroots/wlroots.hash @@ -0,0 +1,5 @@ +# Generated locally, after checking https://github.com/swaywm/wlroots/releases/download/0.12.0/wlroots-0.12.0.tar.gz.sig +sha256 c9e9f4f6d2f526d0b2886daf3ec37e64831773059aa669fb98a88522a1626bdb wlroots-0.12.0.tar.gz + +# Hashes for license files: +sha256 ffd3737a478b83a8b51b42757d3bf909ef36694508355879722e11fc1fa6736b LICENSE diff --git a/package/wlroots/wlroots.mk b/package/wlroots/wlroots.mk new file mode 100644 index 00000000..5665d5a9 --- /dev/null +++ b/package/wlroots/wlroots.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# wlroots +# +################################################################################ + +WLROOTS_VERSION = 0.12.0 +WLROOTS_SITE = https://github.com/swaywm/wlroots/releases/download/$(WLROOTS_VERSION) +WLROOTS_LICENSE = MIT +WLROOTS_LICENSE_FILES = LICENSE +WLROOTS_INSTALL_STAGING = YES + +WLROOTS_DEPENDENCIES = \ + host-pkgconf \ + host-wayland \ + libinput \ + libxkbcommon \ + mesa3d \ + pixman \ + udev \ + wayland \ + wayland-protocols + +WLROOTS_CONF_OPTS = -Dexamples=false -Dxcb-errors=disabled -Dlibseat=disabled + +ifeq ($(BR2_PACKAGE_FFMPEG),y) +WLROOTS_DEPENDENCIES += ffmpeg +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +WLROOTS_DEPENDENCIES += libpng +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y) +WLROOTS_CONF_OPTS += -Dlogind=enabled -Dlogind-provider=systemd +WLROOTS_DEPENDENCIES += systemd +else +WLROOTS_CONF_OPTS += -Dlogind=disabled +endif + +ifeq ($(BR2_PACKAGE_WLROOTS_X11),y) +WLROOTS_CONF_OPTS += -Dx11-backend=enabled +WLROOTS_DEPENDENCIES += xlib_libX11 +else +WLROOTS_CONF_OPTS += -Dx11-backend=disabled +endif + +ifeq ($(BR2_PACKAGE_LIBXCB),y) +WLROOTS_CONF_OPTS += -Dxwayland=enabled +WLROOTS_DEPENDENCIES += libxcb +else +WLROOTS_CONF_OPTS += -Dxwayland=disabled +endif + +ifeq ($(BR2_PACKAGE_XCB_UTIL_WM),y) +WLROOTS_CONF_OPTS += -Dxcb-icccm=enabled +WLROOTS_DEPENDENCIES += xcb-util-wm +else +WLROOTS_CONF_OPTS += -Dxcb-icccm=disabled +endif + +$(eval $(meson-package)) diff --git a/package/wmctrl/Config.in b/package/wmctrl/Config.in new file mode 100644 index 00000000..37a1f252 --- /dev/null +++ b/package/wmctrl/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_WMCTRL + bool "wmctrl" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_LIBGLIB2 + help + Provides command line access to almost all the features + defined in the EWMH specification. It can be used, for + example, to get information about the window manager, to get + a detailed list of desktops and managed windows, to switch + and resize desktops, to make windows full-screen, + always-above or sticky, and to activate, close, move, + resize, maximize and minimize them. + + https://sites.google.com/site/tstyblo/wmctrl/ + +comment "wmctrl needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wmctrl/wmctrl.hash b/package/wmctrl/wmctrl.hash new file mode 100644 index 00000000..531f64a0 --- /dev/null +++ b/package/wmctrl/wmctrl.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 d78a1efdb62f18674298ad039c5cbdb1edb6e8e149bb3a8e3a01a4750aa3cca9 wmctrl-1.07.tar.gz +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING diff --git a/package/wmctrl/wmctrl.mk b/package/wmctrl/wmctrl.mk new file mode 100644 index 00000000..36ad3513 --- /dev/null +++ b/package/wmctrl/wmctrl.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# wmctrl +# +################################################################################ + +WMCTRL_VERSION = 1.07 +WMCTRL_SITE = https://sites.google.com/site/tstyblo/wmctrl +WMCTRL_LICENSE = GPL-2.0+ +WMCTRL_LICENSE_FILES = COPYING + +WMCTRL_DEPENDENCIES = libglib2 xlib_libX11 xlib_libXmu + +WMCTRL_CONF_OPTS = \ + --x-includes=$(STAGING_DIR)/usr/include \ + --x-libraries=$(STAGING_DIR)/usr/lib + +$(eval $(autotools-package)) diff --git a/package/woff2/0001-CMake-Handle-multiple-libraries-being-returned-for-B.patch b/package/woff2/0001-CMake-Handle-multiple-libraries-being-returned-for-B.patch new file mode 100644 index 00000000..142eab27 --- /dev/null +++ b/package/woff2/0001-CMake-Handle-multiple-libraries-being-returned-for-B.patch @@ -0,0 +1,80 @@ +From 9a6d50b3f355c1e4d72a235aa0bac4856dff1785 Mon Sep 17 00:00:00 2001 +From: Adrian Perez de Castro +Date: Tue, 27 Mar 2018 19:59:23 +0100 +Subject: [PATCH] CMake: Handle multiple libraries being returned for Brotli + +Brotli is built as three libraries: libbrotlienc, libbrotlidec, and +libbrotlicommon. When requesting the linker flags using pkg-config for +e.g. libbrotlidec, it will return both libbrotlidec and libbrotlicommon. +The FindBrotli*.cmake files ignore the names of the libraries returned +by pkg-config, and hardcode only the libbrotli{enc,dec} names. While +this is fine when using shared libraries (they contain an entry for +libbrotlicommon as required library in their headers), it will cause +linker errors when Brotli has been built as static libraries, due to +the missing symbols from libbrotlicommon being unknown to the linker. + +This fixes FindBrotli*.cmake files by using the library names reported +by pkg-config (instead of hardcoding them), and applying find_library() +to each of the libraries to find their absolute paths. If any of the +libraries is missing, the corresponding BROTLI{ENC,DEC}_LIBRARIES is +unset to let find_package_handle_standard_args() report an error. +--- + cmake/FindBrotliDec.cmake | 13 +++++++++---- + cmake/FindBrotliEnc.cmake | 14 ++++++++++---- + 2 files changed, 19 insertions(+), 8 deletions(-) + +Signed-off-by: Adrian Perez de Castro +Upstream-Status: Submitted [https://github.com/google/woff2/pull/112] + +diff --git a/cmake/FindBrotliDec.cmake b/cmake/FindBrotliDec.cmake +index abb06f4..9cbb415 100644 +--- a/cmake/FindBrotliDec.cmake ++++ b/cmake/FindBrotliDec.cmake +@@ -18,10 +18,15 @@ find_path(BROTLIDEC_INCLUDE_DIRS + HINTS ${PC_BROTLIDEC_INCLUDEDIR} + ) + +-find_library(BROTLIDEC_LIBRARIES +- NAMES brotlidec +- HINTS ${PC_BROTLIDEC_LIBDIR} +-) ++set(BROTLIDEC_LIBRARIES "") ++foreach(_lib ${PC_BROTLIDEC_LIBRARIES}) ++ find_library(PC_BROTLIDEC_PATH_${_lib} ${_lib} HINTS ${PC_BROTLIDEC_LIBRARY_DIRS}) ++ if(NOT PC_BROTLIDEC_PATH_${_lib}) ++ unset(BROTLIDEC_LIBRARIES) ++ break() ++ endif() ++ list(APPEND BROTLIDEC_LIBRARIES "${PC_BROTLIDEC_PATH_${_lib}}") ++endforeach() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(BrotliDec +diff --git a/cmake/FindBrotliEnc.cmake b/cmake/FindBrotliEnc.cmake +index 4be347d..55f3932 100644 +--- a/cmake/FindBrotliEnc.cmake ++++ b/cmake/FindBrotliEnc.cmake +@@ -18,10 +18,16 @@ find_path(BROTLIENC_INCLUDE_DIRS + HINTS ${PC_BROTLIENC_INCLUDEDIR} + ) + +-find_library(BROTLIENC_LIBRARIES +- NAMES brotlienc +- HINTS ${PC_BROTLIENC_LIBDIR} +-) ++set(BROTLIENC_LIBRARIES "") ++foreach(_lib ${PC_BROTLIENC_LIBRARIES}) ++ find_library(PC_BROTLIENC_PATH_${_lib} ${_lib} ++ HINTS ${PC_BROTLIENC_LIBRARY_DIRS}) ++ if(NOT PC_BROTLIENC_PATH_${_lib}) ++ unset(BROTLIENC_LIBRARIES) ++ break() ++ endif() ++ list(APPEND BROTLIENC_LIBRARIES "${PC_BROTLIENC_PATH_${_lib}}") ++endforeach() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(BrotliEnc +-- +2.16.3 + diff --git a/package/woff2/Config.in b/package/woff2/Config.in new file mode 100644 index 00000000..d280414d --- /dev/null +++ b/package/woff2/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_WOFF2 + bool "woff2" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_BROTLI + help + Reference implementation for the WOFF2 font file format, + typically used for Web fonts + + https://github.com/google/woff2 + +comment "woff2 needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/woff2/woff2.hash b/package/woff2/woff2.hash new file mode 100644 index 00000000..469071e3 --- /dev/null +++ b/package/woff2/woff2.hash @@ -0,0 +1,5 @@ +# Locally generated: +sha512 c788bba1530aec463e755e901f9342f4b599e3a07f54645fef1dc388ab5d5c30625535e5dd38e9e792e04a640574baa50eeefb6b7338ab403755f4a4e0c3044d v1.0.2.tar.gz + +# Hash for license files: +sha512 8ee924da3fb5d16135adcf6a8fbe9e2e8f3d2d80468617e72ca4fa059a60f8455c9a5f68a8dc381b1297c8bf39c887a912d0f69246d2604ada74d3da9e8e490b LICENSE diff --git a/package/woff2/woff2.mk b/package/woff2/woff2.mk new file mode 100644 index 00000000..b2ff33fe --- /dev/null +++ b/package/woff2/woff2.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# woff2 +# +################################################################################ + +WOFF2_VERSION = 1.0.2 +WOFF2_SOURCE = v$(WOFF2_VERSION).tar.gz +WOFF2_SITE = https://github.com/google/woff2/archive +WOFF2_LICENSE = MIT +WOFF2_LICENSE_FILES = LICENSE +WOFF2_INSTALL_STAGING = YES +WOFF2_DEPENDENCIES = brotli +WOFF2_CONF_OPTS = \ + -DNOISY_LOGGING=OFF + +# The CMake build files for woff2 manually set some RPATH handling options +# which make the installation steps fail with static builds, so pass this +# to prevent any attempt of mangling RPATH that CMake would do. +ifneq ($(BR2_SHARED_LIBS),y) +WOFF2_CONF_OPTS += -DCMAKE_SKIP_RPATH=ON +endif + +$(eval $(cmake-package)) diff --git a/package/wolfssl/Config.in b/package/wolfssl/Config.in new file mode 100644 index 00000000..3c6d68f5 --- /dev/null +++ b/package/wolfssl/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_WOLFSSL + bool "wolfssl" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + The wolfSSL embedded SSL library (formerly CyaSSL) is a + lightweight, portable, C-language-based SSL/TLS library + targeted at IoT, embedded, and RTOS environments primarily + because of its size, speed, and feature set. + + https://www.wolfssl.com/ + +if BR2_PACKAGE_WOLFSSL + +config BR2_PACKAGE_WOLFSSL_ALL + bool "enable all features, except SSLv3" + help + Enable all wolfSSL features, except SSL version 3.0 support. + +config BR2_PACKAGE_WOLFSSL_SSLV3 + bool "enable SSLv3" + help + Enable SSL version 3.0 support. + +endif + +comment "wolfssl needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wolfssl/wolfssl.hash b/package/wolfssl/wolfssl.hash new file mode 100644 index 00000000..9896713c --- /dev/null +++ b/package/wolfssl/wolfssl.hash @@ -0,0 +1,6 @@ +# Locally computed: +sha256 50db45f348f47e00c93dd244c24108220120cb3cc9d01434789229c32937c444 wolfssl-4.8.1-stable.tar.gz + +# Hash for license files: +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 b23c1da1f85d699d3288d73c952b4cd02760d23dc1ddc1b221cbb8be82387189 LICENSING diff --git a/package/wolfssl/wolfssl.mk b/package/wolfssl/wolfssl.mk new file mode 100644 index 00000000..d3dce0a4 --- /dev/null +++ b/package/wolfssl/wolfssl.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# wolfssl +# +################################################################################ + +WOLFSSL_VERSION = 4.8.1-stable +WOLFSSL_SITE = $(call github,wolfSSL,wolfssl,v$(WOLFSSL_VERSION)) +WOLFSSL_INSTALL_STAGING = YES + +WOLFSSL_LICENSE = GPL-2.0+ +WOLFSSL_LICENSE_FILES = COPYING LICENSING +WOLFSSL_CPE_ID_VENDOR = wolfssl + +WOLFSSL_DEPENDENCIES = host-pkgconf + +# wolfssl's source code is released without a configure +# script, so we need autoreconf +WOLFSSL_AUTORECONF = YES + +WOLFSSL_CONF_OPTS = --disable-examples --disable-crypttests + +ifeq ($(BR2_PACKAGE_WOLFSSL_ALL),y) +WOLFSSL_CONF_OPTS += --enable-all +else +WOLFSSL_CONF_OPTS += --disable-all +endif + +ifeq ($(BR2_PACKAGE_WOLFSSL_SSLV3),y) +WOLFSSL_CONF_OPTS += --enable-sslv3 +else +WOLFSSL_CONF_OPTS += --disable-sslv3 +endif + +# enable ARMv8 hardware acceleration +ifeq ($(BR2_ARM_CPU_ARMV8A),y) +WOLFSSL_CONF_OPTS += --enable-armasm +# the flag -mstrict-align is needed to prevent build errors caused by +# some inline assembly in parts of the AES structure using the "m" +# constraint +ifeq ($(BR2_aarch64),y) +WOLFSSL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -mstrict-align" +endif +else +WOLFSSL_CONF_OPTS += --disable-armasm +endif + +$(eval $(autotools-package)) diff --git a/package/wpa_supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch b/package/wpa_supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch new file mode 100644 index 00000000..959788c2 --- /dev/null +++ b/package/wpa_supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch @@ -0,0 +1,77 @@ +From 8c07fa9eda13e835f3f968b2e1c9a8be3a851ff9 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Thu, 29 Aug 2019 11:52:04 +0300 +Subject: [PATCH] AP: Silently ignore management frame from unexpected source + address + +Do not process any received Management frames with unexpected/invalid SA +so that we do not add any state for unexpected STA addresses or end up +sending out frames to unexpected destination. This prevents unexpected +sequences where an unprotected frame might end up causing the AP to send +out a response to another device and that other device processing the +unexpected response. + +In particular, this prevents some potential denial of service cases +where the unexpected response frame from the AP might result in a +connected station dropping its association. + +Signed-off-by: Jouni Malinen + +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://w1.fi/security/2019-7/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch] +--- + src/ap/drv_callbacks.c | 13 +++++++++++++ + src/ap/ieee802_11.c | 12 ++++++++++++ + 2 files changed, 25 insertions(+) + +diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c +index 31587685fe3b..34ca379edc3d 100644 +--- a/src/ap/drv_callbacks.c ++++ b/src/ap/drv_callbacks.c +@@ -131,6 +131,19 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr, + "hostapd_notif_assoc: Skip event with no address"); + return -1; + } ++ ++ if (is_multicast_ether_addr(addr) || ++ is_zero_ether_addr(addr) || ++ os_memcmp(addr, hapd->own_addr, ETH_ALEN) == 0) { ++ /* Do not process any frames with unexpected/invalid SA so that ++ * we do not add any state for unexpected STA addresses or end ++ * up sending out frames to unexpected destination. */ ++ wpa_printf(MSG_DEBUG, "%s: Invalid SA=" MACSTR ++ " in received indication - ignore this indication silently", ++ __func__, MAC2STR(addr)); ++ return 0; ++ } ++ + random_add_randomness(addr, ETH_ALEN); + + hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211, +diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c +index c85a28db44b7..e7065372e158 100644 +--- a/src/ap/ieee802_11.c ++++ b/src/ap/ieee802_11.c +@@ -4626,6 +4626,18 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len, + fc = le_to_host16(mgmt->frame_control); + stype = WLAN_FC_GET_STYPE(fc); + ++ if (is_multicast_ether_addr(mgmt->sa) || ++ is_zero_ether_addr(mgmt->sa) || ++ os_memcmp(mgmt->sa, hapd->own_addr, ETH_ALEN) == 0) { ++ /* Do not process any frames with unexpected/invalid SA so that ++ * we do not add any state for unexpected STA addresses or end ++ * up sending out frames to unexpected destination. */ ++ wpa_printf(MSG_DEBUG, "MGMT: Invalid SA=" MACSTR ++ " in received frame - ignore this frame silently", ++ MAC2STR(mgmt->sa)); ++ return 0; ++ } ++ + if (stype == WLAN_FC_STYPE_BEACON) { + handle_beacon(hapd, mgmt, len, fi); + return 1; +-- +2.20.1 + diff --git a/package/wpa_supplicant/0002-ASN.1-Validate-DigestAlgorithmIdentifier-parameters.patch b/package/wpa_supplicant/0002-ASN.1-Validate-DigestAlgorithmIdentifier-parameters.patch new file mode 100644 index 00000000..5dcfed94 --- /dev/null +++ b/package/wpa_supplicant/0002-ASN.1-Validate-DigestAlgorithmIdentifier-parameters.patch @@ -0,0 +1,116 @@ +From a0541334a6394f8237a4393b7372693cd7e96f15 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sat, 13 Mar 2021 18:19:31 +0200 +Subject: [PATCH] ASN.1: Validate DigestAlgorithmIdentifier parameters + +The supported hash algorithms do not use AlgorithmIdentifier parameters. +However, there are implementations that include NULL parameters in +addition to ones that omit the parameters. Previous implementation did +not check the parameters value at all which supported both these cases, +but did not reject any other unexpected information. + +Use strict validation of digest algorithm parameters and reject any +unexpected value when validating a signature. This is needed to prevent +potential forging attacks. + +Signed-off-by: Jouni Malinen +Signed-off-by: Peter Korsgaard +--- + src/tls/pkcs1.c | 21 +++++++++++++++++++++ + src/tls/x509v3.c | 20 ++++++++++++++++++++ + 2 files changed, 41 insertions(+) + +diff --git a/src/tls/pkcs1.c b/src/tls/pkcs1.c +index bbdb0d72d..5761dfed0 100644 +--- a/src/tls/pkcs1.c ++++ b/src/tls/pkcs1.c +@@ -244,6 +244,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, + os_free(decrypted); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestInfo", ++ hdr.payload, hdr.length); + + pos = hdr.payload; + end = pos + hdr.length; +@@ -265,6 +267,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, + os_free(decrypted); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestAlgorithmIdentifier", ++ hdr.payload, hdr.length); + da_end = hdr.payload + hdr.length; + + if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) { +@@ -273,6 +277,23 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, + os_free(decrypted); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: Digest algorithm parameters", ++ next, da_end - next); ++ ++ /* ++ * RFC 5754: The correct encoding for the SHA2 algorithms would be to ++ * omit the parameters, but there are implementation that encode these ++ * as a NULL element. Allow these two cases and reject anything else. ++ */ ++ if (da_end > next && ++ (asn1_get_next(next, da_end - next, &hdr) < 0 || ++ !asn1_is_null(&hdr) || ++ hdr.payload + hdr.length != da_end)) { ++ wpa_printf(MSG_DEBUG, ++ "PKCS #1: Unexpected digest algorithm parameters"); ++ os_free(decrypted); ++ return -1; ++ } + + if (!asn1_oid_equal(&oid, hash_alg)) { + char txt[100], txt2[100]; +diff --git a/src/tls/x509v3.c b/src/tls/x509v3.c +index a8944dd2f..df337ec4d 100644 +--- a/src/tls/x509v3.c ++++ b/src/tls/x509v3.c +@@ -1964,6 +1964,7 @@ int x509_check_signature(struct x509_certificate *issuer, + os_free(data); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "X509: DigestInfo", hdr.payload, hdr.length); + + pos = hdr.payload; + end = pos + hdr.length; +@@ -1985,6 +1986,8 @@ int x509_check_signature(struct x509_certificate *issuer, + os_free(data); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "X509: DigestAlgorithmIdentifier", ++ hdr.payload, hdr.length); + da_end = hdr.payload + hdr.length; + + if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) { +@@ -1992,6 +1995,23 @@ int x509_check_signature(struct x509_certificate *issuer, + os_free(data); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "X509: Digest algorithm parameters", ++ next, da_end - next); ++ ++ /* ++ * RFC 5754: The correct encoding for the SHA2 algorithms would be to ++ * omit the parameters, but there are implementation that encode these ++ * as a NULL element. Allow these two cases and reject anything else. ++ */ ++ if (da_end > next && ++ (asn1_get_next(next, da_end - next, &hdr) < 0 || ++ !asn1_is_null(&hdr) || ++ hdr.payload + hdr.length != da_end)) { ++ wpa_printf(MSG_DEBUG, ++ "X509: Unexpected digest algorithm parameters"); ++ os_free(data); ++ return -1; ++ } + + if (x509_sha1_oid(&oid)) { + if (signature->oid.oid[6] != 5 /* sha-1WithRSAEncryption */) { +-- +2.20.1 + diff --git a/package/wpa_supplicant/0003-Include-stdbool.h-to-allow-C99-bool-to-be-used.patch b/package/wpa_supplicant/0003-Include-stdbool.h-to-allow-C99-bool-to-be-used.patch new file mode 100644 index 00000000..e52dbdb6 --- /dev/null +++ b/package/wpa_supplicant/0003-Include-stdbool.h-to-allow-C99-bool-to-be-used.patch @@ -0,0 +1,32 @@ +From 99cf89555313056d3a8fa54b21d02dc880b363e1 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Mon, 20 Apr 2020 20:29:31 +0300 +Subject: [PATCH] Include stdbool.h to allow C99 bool to be used + +We have practically started requiring some C99 features, so might as +well finally go ahead and bring in the C99 bool as well. + +Signed-off-by: Jouni Malinen +[geomatsi@gmail.com: backport from upstream] +Signed-off-by: Sergey Matyukevich +[yann.morin.1998@free.fr: keep upstream sha1 in header, drop numbering] +Signed-off-by: Yann E. MORIN +--- + src/utils/includes.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/utils/includes.h b/src/utils/includes.h +index 75513fc8c..741fc9c14 100644 +--- a/src/utils/includes.h ++++ b/src/utils/includes.h +@@ -18,6 +18,7 @@ + + #include + #include ++#include + #include + #include + #include +-- +2.25.1 + diff --git a/package/wpa_supplicant/0004-ASN.1-Add-helper-functions-for-recognizing-tag-value.patch b/package/wpa_supplicant/0004-ASN.1-Add-helper-functions-for-recognizing-tag-value.patch new file mode 100644 index 00000000..a5415e7d --- /dev/null +++ b/package/wpa_supplicant/0004-ASN.1-Add-helper-functions-for-recognizing-tag-value.patch @@ -0,0 +1,37 @@ +From 9a990e8c4eb92dd64e0ec483599820e45c35ac23 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sat, 13 Mar 2021 23:14:23 +0200 +Subject: [PATCH] ASN.1: Add helper functions for recognizing tag values + +Signed-off-by: Jouni Malinen +[geomatsi@gmail.com: backport asn1_is_null() from upstream 9a990e8c4eb9] +Signed-off-by: Sergey Matyukevich +[yann.morin.1998@free.fr: + - reformat, keep the upstream sha1 and title, + - drop numbering +] +Signed-off-by: Yann E. MORIN +--- + src/tls/asn1.h | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 102 insertions(+) + +diff --git a/src/tls/asn1.h b/src/tls/asn1.h +index de3430adb..a4d1be473 100644 +--- a/src/tls/asn1.h ++++ b/src/tls/asn1.h +@@ -66,6 +66,12 @@ struct wpabuf * asn1_build_alg_id(const struct asn1_oid *oid, + unsigned long asn1_bit_string_to_long(const u8 *buf, size_t len); + int asn1_oid_equal(const struct asn1_oid *a, const struct asn1_oid *b); + ++static inline bool asn1_is_null(const struct asn1_hdr *hdr) ++{ ++ return hdr->class == ASN1_CLASS_UNIVERSAL && ++ hdr->tag == ASN1_TAG_NULL; ++} ++ + extern struct asn1_oid asn1_sha1_oid; + extern struct asn1_oid asn1_sha256_oid; + +-- +2.25.1 + diff --git a/package/wpa_supplicant/50-wpa_supplicant.preset b/package/wpa_supplicant/50-wpa_supplicant.preset new file mode 100644 index 00000000..9af8562c --- /dev/null +++ b/package/wpa_supplicant/50-wpa_supplicant.preset @@ -0,0 +1,4 @@ +disable wpa_supplicant@.service +disable wpa_supplicant-nl80211@.service +disable wpa_supplicant-wired@.service + diff --git a/package/wpa_supplicant/Config.in b/package/wpa_supplicant/Config.in new file mode 100644 index 00000000..c6e4de1d --- /dev/null +++ b/package/wpa_supplicant/Config.in @@ -0,0 +1,128 @@ +config BR2_PACKAGE_WPA_SUPPLICANT + bool "wpa_supplicant" + depends on BR2_USE_MMU # fork() + help + WPA supplicant for secure wireless networks + + http://w1.fi/wpa_supplicant/ + +if BR2_PACKAGE_WPA_SUPPLICANT + +config BR2_PACKAGE_WPA_SUPPLICANT_NL80211 + bool "Enable nl80211 support" + default y + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + select BR2_PACKAGE_LIBNL + help + Enable support for nl80211. This is the current wireless + API for Linux, supported by all wireless drivers in vanilla + Linux, but may not be supported by some out-of-tree Linux + wireless drivers. wpa_supplicant will still fall back to + using the Wireless Extensions (wext) API with these drivers. + + If this option is disabled, then only the deprecated wext + API will be supported, with far less features. Linux may + supports using wext with modern drivers using a + compatibility layer, but it must be enabled in the kernel + configuration. + +comment "nl80211 support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT + bool "Enable AP mode" + depends on BR2_PACKAGE_WPA_SUPPLICANT_NL80211 + help + With this option enabled, wpa_supplicant can act as an + access point much like hostapd does with a limited feature + set. This links in parts of hostapd functionality into + wpa_supplicant, making it bigger but dispensing the need for + a separate hostapd binary in some applications hence being + smaller overall. + +config BR2_PACKAGE_WPA_SUPPLICANT_WIFI_DISPLAY + bool "Enable Wi-Fi Display" + depends on BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT + help + Enable support for Wi-Fi Display + +config BR2_PACKAGE_WPA_SUPPLICANT_MESH_NETWORKING + bool "Enable mesh networking" + depends on BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL + help + Enable support for open and secured mesh networking + (IEEE 802.11s) + +config BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN + bool "Enable autoscan" + help + Enable support for the autoscan feature (allow periodic scan) + +config BR2_PACKAGE_WPA_SUPPLICANT_EAP + bool "Enable EAP" + help + Enable support for EAP. + +config BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT + bool "Enable HS20" + help + Enable Hotspot 2.0 and IEEE 802.11u interworking + functionality. + +config BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG + bool "Enable syslog support" + help + Enable support for sending debug messages to syslog. + +config BR2_PACKAGE_WPA_SUPPLICANT_WPS + bool "Enable WPS" + help + Enable support for Wi-Fi Protected Setup (WPS). + +config BR2_PACKAGE_WPA_SUPPLICANT_WPA3 + bool "Enable WPA3 support" + depends on BR2_PACKAGE_LIBOPENSSL_ARCH_SUPPORTS + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL + help + Enable WPA3 support including OWE, SAE, DPP + +config BR2_PACKAGE_WPA_SUPPLICANT_CLI + bool "Install wpa_cli binary" + help + Install wpa_cli command line utility + +config BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO + bool "Install wpa_client shared library" + depends on !BR2_STATIC_LIBS + help + Install libwpa_client.so. + +comment "wpa_client library needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE + bool "Install wpa_passphrase binary" + help + Install wpa_passphrase command line utility. + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS + bool "Enable support for the DBus control interface" + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus + select BR2_PACKAGE_DBUS + help + Enable support for the DBus control interface. + +comment "dbus support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION + bool "Introspection support" + depends on BR2_PACKAGE_WPA_SUPPLICANT_DBUS + help + Add introspection support for new DBus control interface. + +endif diff --git a/package/wpa_supplicant/wpa_supplicant.conf b/package/wpa_supplicant/wpa_supplicant.conf new file mode 100644 index 00000000..1994a6c7 --- /dev/null +++ b/package/wpa_supplicant/wpa_supplicant.conf @@ -0,0 +1,6 @@ +ctrl_interface=/var/run/wpa_supplicant +ap_scan=1 + +network={ + key_mgmt=NONE +} diff --git a/package/wpa_supplicant/wpa_supplicant.hash b/package/wpa_supplicant/wpa_supplicant.hash new file mode 100644 index 00000000..2387391a --- /dev/null +++ b/package/wpa_supplicant/wpa_supplicant.hash @@ -0,0 +1,5 @@ +# Locally calculated +sha256 fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17 wpa_supplicant-2.9.tar.gz +sha256 9da5dd0776da266b180b915e460ff75c6ff729aca1196ab396529510f24f3761 README +sha256 c4d65cc13863e0237d0644198558e2c47b4ed91e2b2be4516ff590724187c4a5 0001-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch +sha256 7f40cfec5faf5e927ea9028ab9392cd118685bde7229ad24210caf0a8f6e9611 0001-P2P-Fix-a-corner-case-in-peer-addition-based-on-PD-R.patch diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk new file mode 100644 index 00000000..c24bd0c9 --- /dev/null +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -0,0 +1,248 @@ +################################################################################ +# +# wpa_supplicant +# +################################################################################ + +WPA_SUPPLICANT_VERSION = 2.9 +WPA_SUPPLICANT_SITE = http://w1.fi/releases +WPA_SUPPLICANT_PATCH = \ + https://w1.fi/security/2020-2/0001-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch \ + https://w1.fi/security/2021-1/0001-P2P-Fix-a-corner-case-in-peer-addition-based-on-PD-R.patch +WPA_SUPPLICANT_LICENSE = BSD-3-Clause +WPA_SUPPLICANT_LICENSE_FILES = README +WPA_SUPPLICANT_CPE_ID_VENDOR = w1.fi +WPA_SUPPLICANT_CONFIG = $(WPA_SUPPLICANT_DIR)/wpa_supplicant/.config +WPA_SUPPLICANT_SUBDIR = wpa_supplicant +WPA_SUPPLICANT_DBUS_OLD_SERVICE = fi.epitest.hostap.WPASupplicant +WPA_SUPPLICANT_DBUS_NEW_SERVICE = fi.w1.wpa_supplicant1 +WPA_SUPPLICANT_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/ +WPA_SUPPLICANT_LDFLAGS = $(TARGET_LDFLAGS) +WPA_SUPPLICANT_SELINUX_MODULES = networkmanager + +# 0001-AP-Silently-ignore-management-frame-from-unexpected-.patch +WPA_SUPPLICANT_IGNORE_CVES += CVE-2019-16275 + +# 0001-P2P-Fix-a-corner-case-in-peer-addition-based-on-PD-R.patch +WPA_SUPPLICANT_IGNORE_CVES += CVE-2021-27803 + +# 0002-ASN.1-Validate-DigestAlgorithmIdentifier-parameters.patch +WPA_SUPPLICANT_IGNORE_CVES += CVE-2021-30004 + +# install the wpa_client library +WPA_SUPPLICANT_INSTALL_STAGING = YES + +WPA_SUPPLICANT_CONFIG_EDITS = + +# Add support for simple background scan +WPA_SUPPLICANT_CONFIG_SET = CONFIG_BGSCAN_SIMPLE + +WPA_SUPPLICANT_CONFIG_ENABLE = \ + CONFIG_IEEE80211AC \ + CONFIG_IEEE80211N \ + CONFIG_IEEE80211R \ + CONFIG_INTERNAL_LIBTOMMATH \ + CONFIG_DEBUG_FILE \ + CONFIG_MATCH_IFACE + +WPA_SUPPLICANT_CONFIG_DISABLE = \ + CONFIG_SMARTCARD + +# libnl-3 needs -lm (for rint) and -lpthread if linking statically +# And library order matters hence stick -lnl-3 first since it's appended +# in the wpa_supplicant Makefiles as in LIBS+=-lnl-3 ... thus failing +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_NL80211),y) +ifeq ($(BR2_STATIC_LIBS),y) +WPA_SUPPLICANT_LIBS += -lnl-3 -lm -lpthread +endif +WPA_SUPPLICANT_DEPENDENCIES += host-pkgconf libnl +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_LIBNL32 +else +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_DRIVER_NL80211 +endif + +# Trailing underscore on purpose to not enable CONFIG_EAPOL_TEST +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_EAP_ +# uses dlopen() +ifeq ($(BR2_STATIC_LIBS),y) +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_EAP_TNC +endif +else +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_EAP +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_HS20 \ + CONFIG_INTERWORKING +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT),y) +WPA_SUPPLICANT_CONFIG_ENABLE += \ + CONFIG_AP \ + CONFIG_P2P +else +WPA_SUPPLICANT_CONFIG_DISABLE += \ + CONFIG_AP \ + CONFIG_P2P +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WIFI_DISPLAY),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_WIFI_DISPLAY +else +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_WIFI_DISPLAY +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_MESH_NETWORKING),y) +WPA_SUPPLICANT_CONFIG_SET += CONFIG_MESH +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_IEEE80211W +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN),y) +WPA_SUPPLICANT_CONFIG_ENABLE += \ + CONFIG_AUTOSCAN_EXPONENTIAL \ + CONFIG_AUTOSCAN_PERIODIC +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPS),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_WPS +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPA3),y) +WPA_SUPPLICANT_CONFIG_ENABLE += \ + CONFIG_DPP \ + CONFIG_SAE \ + CONFIG_OWE +else +WPA_SUPPLICANT_CONFIG_DISABLE += \ + CONFIG_DPP \ + CONFIG_SAE \ + CONFIG_OWE +endif + +# Try to use openssl if it's already available +ifeq ($(BR2_PACKAGE_LIBOPENSSL),y) +WPA_SUPPLICANT_DEPENDENCIES += host-pkgconf libopenssl +WPA_SUPPLICANT_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs openssl` +WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/' +else +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_EAP_PWD CONFIG_EAP_TEAP +WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/' +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS),y) +WPA_SUPPLICANT_DEPENDENCIES += host-pkgconf dbus +WPA_SUPPLICANT_MAKE_ENV = \ + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS_NEW +define WPA_SUPPLICANT_INSTALL_DBUS_NEW + $(INSTALL) -m 0644 -D \ + $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service +endef + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS_INTRO +endif + +else +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_CTRL_IFACE_DBUS_NEW +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_DEBUG_SYSLOG +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +WPA_SUPPLICANT_DEPENDENCIES += readline +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_READLINE +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO),y) +WPA_SUPPLICANT_CONFIG_SET += CONFIG_BUILD_WPA_CLIENT_SO +define WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/libwpa_client.so \ + $(TARGET_DIR)/usr/lib/libwpa_client.so + $(INSTALL) -m 0644 -D $(@D)/src/common/wpa_ctrl.h \ + $(TARGET_DIR)/usr/include/wpa_ctrl.h +endef +define WPA_SUPPLICANT_INSTALL_STAGING_WPA_CLIENT_SO + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/libwpa_client.so \ + $(STAGING_DIR)/usr/lib/libwpa_client.so + $(INSTALL) -m 0644 -D $(@D)/src/common/wpa_ctrl.h \ + $(STAGING_DIR)/usr/include/wpa_ctrl.h +endef +endif + +define WPA_SUPPLICANT_CONFIGURE_CMDS + cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG) + sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \ + $(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \ + $(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \ + $(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \ + $(WPA_SUPPLICANT_CONFIG) +endef + +# LIBS for wpa_supplicant, LIBS_c for wpa_cli, LIBS_p for wpa_passphrase +define WPA_SUPPLICANT_BUILD_CMDS + $(TARGET_MAKE_ENV) CFLAGS="$(WPA_SUPPLICANT_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" BINDIR=/usr/sbin \ + LIBS="$(WPA_SUPPLICANT_LIBS)" LIBS_c="$(WPA_SUPPLICANT_LIBS)" \ + LIBS_p="$(WPA_SUPPLICANT_LIBS)" \ + $(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(WPA_SUPPLICANT_SUBDIR) +endef + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI),y) +define WPA_SUPPLICANT_INSTALL_CLI + $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_cli \ + $(TARGET_DIR)/usr/sbin/wpa_cli +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE),y) +define WPA_SUPPLICANT_INSTALL_PASSPHRASE + $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_passphrase \ + $(TARGET_DIR)/usr/sbin/wpa_passphrase +endef +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +define WPA_SUPPLICANT_INSTALL_DBUS + $(INSTALL) -m 0644 -D \ + $(@D)/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \ + $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf + $(WPA_SUPPLICANT_INSTALL_DBUS_OLD) + $(WPA_SUPPLICANT_INSTALL_DBUS_NEW) +endef +endif + +define WPA_SUPPLICANT_INSTALL_STAGING_CMDS + $(WPA_SUPPLICANT_INSTALL_STAGING_WPA_CLIENT_SO) +endef + +define WPA_SUPPLICANT_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_supplicant \ + $(TARGET_DIR)/usr/sbin/wpa_supplicant + $(INSTALL) -m 644 -D package/wpa_supplicant/wpa_supplicant.conf \ + $(TARGET_DIR)/etc/wpa_supplicant.conf + $(WPA_SUPPLICANT_INSTALL_CLI) + $(WPA_SUPPLICANT_INSTALL_PASSPHRASE) + $(WPA_SUPPLICANT_INSTALL_DBUS) + $(WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO) +endef + +define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant.service \ + $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant.service + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant@.service \ + $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant@.service + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-nl80211@.service \ + $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-nl80211@.service + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-wired@.service \ + $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-wired@.service + $(INSTALL) -D -m 644 $(WPA_SUPPLICANT_PKGDIR)/50-wpa_supplicant.preset \ + $(TARGET_DIR)/usr/lib/systemd/system-preset/50-wpa_supplicant.preset +endef + +$(eval $(generic-package)) diff --git a/package/wpan-tools/Config.in b/package/wpan-tools/Config.in new file mode 100644 index 00000000..9e327420 --- /dev/null +++ b/package/wpan-tools/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_WPAN_TOOLS + bool "wpan-tools" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBNL + help + Userspace tools for Linux IEEE 802.15.4 stack. + + http://wpan.cakelab.org/ + +comment "wpan-tools needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wpan-tools/wpan-tools.hash b/package/wpan-tools/wpan-tools.hash new file mode 100644 index 00000000..c9f0df2c --- /dev/null +++ b/package/wpan-tools/wpan-tools.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 3e509d9ed838df1247cc9a0c6ca483cb356ae778851817bd7410044687b655e2 wpan-tools-0.9.tar.gz +sha256 fe8e595c24d821a60885eb259619df5e5e3976c48465fde0be29fcd78530798f COPYING diff --git a/package/wpan-tools/wpan-tools.mk b/package/wpan-tools/wpan-tools.mk new file mode 100644 index 00000000..d8898a72 --- /dev/null +++ b/package/wpan-tools/wpan-tools.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# wpan-tools +# +################################################################################ + +WPAN_TOOLS_VERSION = 0.9 +WPAN_TOOLS_SITE = $(call github,linux-wpan,wpan-tools,wpan-tools-$(WPAN_TOOLS_VERSION)) +WPAN_TOOLS_DEPENDENCIES = host-pkgconf libnl +WPAN_TOOLS_LICENSE = ISC +WPAN_TOOLS_LICENSE_FILES = COPYING +# From git +WPAN_TOOLS_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/wpebackend-fdo/Config.in b/package/wpebackend-fdo/Config.in new file mode 100644 index 00000000..8a8c820c --- /dev/null +++ b/package/wpebackend-fdo/Config.in @@ -0,0 +1,20 @@ +comment "wpebackend-fdo needs a toolchain w/ C++, wchar, threads, dynamic library and an OpenEGL-capable Wayland backend" + depends on !BR2_PACKAGE_HAS_LIBEGL_WAYLAND || !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_WPEBACKEND_FDO + bool "wpebackend-fdo" + depends on !BR2_STATIC_LIBS # wayland + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, libglib2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND + select BR2_PACKAGE_LIBEPOXY + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBWPE + select BR2_PACKAGE_WAYLAND + help + WPEBackend interface using freedesktop.org API. + + https://wpewebkit.org/ diff --git a/package/wpebackend-fdo/wpebackend-fdo.hash b/package/wpebackend-fdo/wpebackend-fdo.hash new file mode 100644 index 00000000..27e827ae --- /dev/null +++ b/package/wpebackend-fdo/wpebackend-fdo.hash @@ -0,0 +1,7 @@ +# From https://wpewebkit.org/releases/wpebackend-fdo-1.8.3.tar.xz.sums +md5 980cbda207bf8f6263799c5062425737 wpebackend-fdo-1.8.3.tar.xz +sha1 c849043039d805448715be90cb5b3491f0a90c5f wpebackend-fdo-1.8.3.tar.xz +sha256 3d0b4282a1bd9e0664d7a20abe14e982f3285296ac62de56cae2a404b9d28b9e wpebackend-fdo-1.8.3.tar.xz + +# Hashes for license files: +sha256 c9f6803371047fad3e72200ec6cd226329a5ee08ac61104c8211c2761fb46825 COPYING diff --git a/package/wpebackend-fdo/wpebackend-fdo.mk b/package/wpebackend-fdo/wpebackend-fdo.mk new file mode 100644 index 00000000..5f7e7acf --- /dev/null +++ b/package/wpebackend-fdo/wpebackend-fdo.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# wpebackend-fdo +# +################################################################################ + +WPEBACKEND_FDO_VERSION = 1.8.3 +WPEBACKEND_FDO_SITE = https://wpewebkit.org/releases +WPEBACKEND_FDO_SOURCE = wpebackend-fdo-$(WPEBACKEND_FDO_VERSION).tar.xz +WPEBACKEND_FDO_INSTALL_STAGING = YES +WPEBACKEND_FDO_LICENSE = BSD-2-Clause +WPEBACKEND_FDO_LICENSE_FILES = COPYING +WPEBACKEND_FDO_DEPENDENCIES = libepoxy libglib2 libwpe wayland + +$(eval $(meson-package)) diff --git a/package/wpewebkit/0001-Fix-build-with-musl.patch b/package/wpewebkit/0001-Fix-build-with-musl.patch new file mode 100644 index 00000000..705c67c7 --- /dev/null +++ b/package/wpewebkit/0001-Fix-build-with-musl.patch @@ -0,0 +1,79 @@ +From cc3c27a7e997ef157ed469127f185a7bb6eb1feb Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Mon, 27 May 2019 23:51:32 +0200 +Subject: [PATCH] Fix build with musl + +Signed-off-by: Khem Raj +[Retrieved (and slightly updated) from: +https://github.com/WebPlatformForEmbedded/meta-wpe/blob/master/recipes-wpe/wpewebkit/wpewebkit/0001-Fix-build-with-musl.patch] +Signed-off-by: Fabrice Fontaine +--- + Source/JavaScriptCore/runtime/MachineContext.h | 10 +++++----- + Source/WTF/wtf/PlatformHave.h | 2 +- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Source/JavaScriptCore/runtime/MachineContext.h b/Source/JavaScriptCore/runtime/MachineContext.h +index bf0bdc7a51a..78d2ec81838 100644 +--- a/Source/JavaScriptCore/runtime/MachineContext.h ++++ b/Source/JavaScriptCore/runtime/MachineContext.h +@@ -146,7 +146,7 @@ inline void*& stackPointer(mcontext_t& machineContext) + #error Unknown Architecture + #endif + +-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) ++#elif OS(FUCHSIA) || OS(LINUX) || defined(__BIONIC__) + + #if CPU(X86) + return reinterpret_cast((uintptr_t&) machineContext.gregs[REG_ESP]); +@@ -251,7 +251,7 @@ inline void*& framePointer(mcontext_t& machineContext) + #error Unknown Architecture + #endif + +-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) ++#elif OS(FUCHSIA) || OS(LINUX) || defined(__BIONIC__) + + // The following sequence depends on glibc's sys/ucontext.h. + #if CPU(X86) +@@ -354,7 +354,7 @@ inline void*& instructionPointer(mcontext_t& machineContext) + #error Unknown Architecture + #endif + +-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) ++#elif OS(FUCHSIA) || OS(LINUX) || defined(__BIONIC__) + + // The following sequence depends on glibc's sys/ucontext.h. + #if CPU(X86) +@@ -466,7 +466,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineContext) + #error Unknown Architecture + #endif + +-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) ++#elif OS(FUCHSIA) || OS(LINUX) || defined(__BIONIC__) + + // The following sequence depends on glibc's sys/ucontext.h. + #if CPU(X86) +@@ -583,7 +583,7 @@ inline void*& llintInstructionPointer(mcontext_t& machineContext) + #error Unknown Architecture + #endif + +-#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) ++#elif OS(FUCHSIA) || OS(LINUX) || defined(__BIONIC__) + + // The following sequence depends on glibc's sys/ucontext.h. + #if CPU(X86) +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +index e2a3388993f..95fe7c593cf 100644 +--- a/Source/WTF/wtf/PlatformHave.h ++++ b/Source/WTF/wtf/PlatformHave.h +@@ -683,7 +683,7 @@ + #define HAVE_CFNETWORK_STORAGE_PARTITIONING 1 + #endif + +-#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__GLIBC__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) ++#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(LINUX) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) + #define HAVE_MACHINE_CONTEXT 1 + #endif + +-- +2.20.1 + diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in new file mode 100644 index 00000000..c8c66e84 --- /dev/null +++ b/package/wpewebkit/Config.in @@ -0,0 +1,128 @@ +config BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS + bool + # ARM needs BLX, so v5t+, BE completely untested so disabled + default y if BR2_arm && !BR2_ARM_CPU_ARMV4 + default y if BR2_aarch64 || BR2_aarch64_be + default y if BR2_i386 || BR2_x86_64 + # Disabled on MIPS big endian due to sigbus + default y if BR2_mipsel || BR2_mips64el + # Disabled on PowerPC pending runtime testing + # Disabled on SuperH because of segfault + depends on BR2_USE_MMU # libglib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt + +comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 7, host gcc >= 4.9" + depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS + depends on !BR2_BINFMT_FLAT + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_7 \ + || !BR2_HOST_GCC_AT_LEAST_4_9 + +comment "wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend" + depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS + depends on !BR2_BINFMT_FLAT + depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL \ + || !BR2_PACKAGE_HAS_LIBEGL_WAYLAND + +config BR2_PACKAGE_WPEWEBKIT + bool "wpewebkit" + depends on !BR2_STATIC_LIBS # wayland + depends on !BR2_BINFMT_FLAT # icu + depends on BR2_HOST_GCC_AT_LEAST_4_9 # icu + depends on BR2_INSTALL_LIBSTDCPP # harfbuzz, icu + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, icu, libsoup + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 + depends on BR2_USE_WCHAR # icu, libsoup + depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy + depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy + depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND # wpebackend-fdo + depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_HARFBUZZ + select BR2_PACKAGE_ICU + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBEPOXY + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBSOUP + select BR2_PACKAGE_LIBTASN1 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_OPENJPEG + select BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_WAYLAND_PROTOCOLS + select BR2_PACKAGE_WEBP + select BR2_PACKAGE_WEBP_DEMUX + select BR2_PACKAGE_WPEBACKEND_FDO + help + WPE (Web Platform for Embedded) port of the WebKit engine, + to allow embedders to create simple and performant systems + based on Web platform technologies. + + https://wpewebkit.org/ + +if BR2_PACKAGE_WPEWEBKIT + +config BR2_PACKAGE_WPEWEBKIT_SANDBOX + bool "sandboxing support" + depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS # libseccomp + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # libseccomp + select BR2_PACKAGE_BUBBLEWRAP # runtime + select BR2_PACKAGE_XDG_DBUS_PROXY # runtime + select BR2_PACKAGE_LIBSECCOMP + help + Enable sandboxing of the processes used for network operation, + disk asccess, and Web content rendering. + +comment "sandboxing supports needs a toolchain w/ headers >= 3.12" + depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + +config BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA + bool "multimedia support" + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BAD + select BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME + select BR2_PACKAGE_GST1_PLUGINS_GOOD + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUTODETECT + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4 + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VPX + select BR2_PACKAGE_GST1_LIBAV + help + This option pulls in all of the required dependencies + to enable multimedia (video/audio) support. + +if BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA + +config BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL + bool "use gstreamer-gl" + default y + depends on BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL + help + Use the GStreamer GL elements for handling video content. + This is recommended as it improves performance of video + playback. In some target configurations incorrect rendering + might be produced, and disabling this option may help. + +endif + +config BR2_PACKAGE_WPEWEBKIT_WEBDRIVER + bool "WebDriver support" + help + Enable support for WebDriver. This will build and install the + WebKitWebDriver program in the target. + +endif diff --git a/package/wpewebkit/wpewebkit.hash b/package/wpewebkit/wpewebkit.hash new file mode 100644 index 00000000..c3aa8d41 --- /dev/null +++ b/package/wpewebkit/wpewebkit.hash @@ -0,0 +1,8 @@ +# From https://wpewebkit.org/releases/wpewebkit-2.30.6.tar.xz.sums +md5 e35b31932ad3da6c06736d8f2d347072 wpewebkit-2.30.6.tar.xz +sha1 25a481e97e463df08fb2c0b0fa5d4299938670ac wpewebkit-2.30.6.tar.xz +sha256 893a3098226f116bbb38a665a3053c7d30e3c5dca786b954f9aa38f8c8581468 wpewebkit-2.30.6.tar.xz + +# Hashes for license files: +sha256 0b5d3a7cc325942567373b0ecd757d07c132e0ebd7c97bfc63f7e1a76094edb4 Source/WebCore/LICENSE-APPLE +sha256 f2b3bd09663381deb99721109d22b47af1213bb43007a8b56a06c6375c8050ce Source/WebCore/LICENSE-LGPL-2.1 diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk new file mode 100644 index 00000000..b18ee2a3 --- /dev/null +++ b/package/wpewebkit/wpewebkit.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# wpewebkit +# +################################################################################ + +WPEWEBKIT_VERSION = 2.30.6 +WPEWEBKIT_SITE = http://www.wpewebkit.org/releases +WPEWEBKIT_SOURCE = wpewebkit-$(WPEWEBKIT_VERSION).tar.xz +WPEWEBKIT_INSTALL_STAGING = YES +WPEWEBKIT_LICENSE = LGPL-2.1+, BSD-2-Clause +WPEWEBKIT_LICENSE_FILES = \ + Source/WebCore/LICENSE-APPLE \ + Source/WebCore/LICENSE-LGPL-2.1 +WPEWEBKIT_CPE_ID_VENDOR = wpewebkit +WPEWEBKIT_CPE_ID_PRODUCT = wpe_webkit +WPEWEBKIT_DEPENDENCIES = host-gperf host-python host-ruby \ + harfbuzz cairo icu jpeg libepoxy libgcrypt libgles libsoup libtasn1 \ + libpng libxslt openjpeg wayland-protocols webp wpebackend-fdo + +WPEWEBKIT_CONF_OPTS = \ + -DPORT=WPE \ + -DENABLE_ACCESSIBILITY=OFF \ + -DENABLE_API_TESTS=OFF \ + -DENABLE_MINIBROWSER=OFF \ + -DSILENCE_CROSS_COMPILATION_NOTICES=ON + +ifeq ($(BR2_PACKAGE_WPEWEBKIT_SANDBOX),y) +WPEWEBKIT_CONF_OPTS += \ + -DENABLE_BUBBLEWRAP_SANDBOX=ON \ + -DBWRAP_EXECUTABLE=/usr/bin/bwrap \ + -DDBUS_PROXY_EXECUTABLE=/usr/bin/xdg-dbus-proxy +WPEWEBKIT_DEPENDENCIES += libseccomp +else +WPEWEBKIT_CONF_OPTS += -DENABLE_BUBBLEWRAP_SANDBOX=OFF +endif + +ifeq ($(BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA),y) +WPEWEBKIT_CONF_OPTS += \ + -DENABLE_VIDEO=ON \ + -DENABLE_WEB_AUDIO=ON +WPEWEBKIT_DEPENDENCIES += gstreamer1 gst1-libav gst1-plugins-base gst1-plugins-good +else +WPEWEBKIT_CONF_OPTS += \ + -DENABLE_VIDEO=OFF \ + -DENABLE_WEB_AUDIO=OFF +endif + +ifeq ($(BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL),y) +WPEWEBKIT_CONF_OPTS += -DUSE_GSTREAMER_GL=ON +else +WPEWEBKIT_CONF_OPTS += -DUSE_GSTREAMER_GL=OFF +endif + +ifeq ($(BR2_PACKAGE_WPEWEBKIT_WEBDRIVER),y) +WPEWEBKIT_CONF_OPTS += -DENABLE_WEBDRIVER=ON +else +WPEWEBKIT_CONF_OPTS += -DENABLE_WEBDRIVER=OFF +endif + +ifeq ($(BR2_PACKAGE_WOFF2),y) +WPEWEBKIT_CONF_OPTS += -DUSE_WOFF2=ON +WPEWEBKIT_DEPENDENCIES += woff2 +else +WPEWEBKIT_CONF_OPTS += -DUSE_WOFF2=OFF +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +WPEWEBKIT_CONF_OPTS += -DUSE_SYSTEMD=ON +WPEWEBKIT_DEPENDENCIES += systemd +else +WPEWEBKIT_CONF_OPTS += -DUSE_SYSTEMD=OFF +endif + +# JIT is not supported for MIPS r6, but the WebKit build system does not +# have a check for these processors. The same goes for ARMv5 and ARMv6. +# Disable JIT forcibly here and use the CLoop interpreter instead. +# +# Also, we have to disable the sampling profiler, which does NOT work +# with ENABLE_C_LOOP. +# +# Upstream bugs: https://bugs.webkit.org/show_bug.cgi?id=191258 +# https://bugs.webkit.org/show_bug.cgi?id=172765 +# +ifeq ($(BR2_ARM_CPU_ARMV5)$(BR2_ARM_CPU_ARMV6)$(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS_CPU_MIPS64R6),y) +WPEWEBKIT_CONF_OPTS += -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON -DENABLE_SAMPLING_PROFILER=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/wqy-zenhei/Config.in b/package/wqy-zenhei/Config.in new file mode 100644 index 00000000..f9135e01 --- /dev/null +++ b/package/wqy-zenhei/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_WQY_ZENHEI + bool "wqy-zenhei" + help + "WenQuanYi Zen Hei" is a Hei-Ti Style (sans-serif) Chinese + font capable of text formatting and on-screen display of + both simplified and traditional forms of Chinese Hanzi + glyphs (among many other languages). Both the proportional + "WenQuanYi Zen Hei", as well as the monospaced typeface + "WenQuanYi Zen Hei Mono" provides over 35,000 glyphs, + including over 21,000 Chinese Hanzi. This font provides full + coverage of GBK (CP936) charset, CJK Unified Ideographs, as + well as the code-points needed for zh_CN, zh_SG, zh_TW, + zh_HK, zh_MO, ja (Japanese) and ko (Korean) locales for + fontconfig. + + https://sourceforge.net/projects/wqy/ diff --git a/package/wqy-zenhei/wqy-zenhei.hash b/package/wqy-zenhei/wqy-zenhei.hash new file mode 100644 index 00000000..386f16eb --- /dev/null +++ b/package/wqy-zenhei/wqy-zenhei.hash @@ -0,0 +1,6 @@ +# from https://sourceforge.net/projects/wqy/files/wqy-zenhei/0.9.45%20%28Fighting-state%20RC1%29/ +md5 4c6c3f4e902dd5ee0a121e8c41d040bd wqy-zenhei-0.9.45.tar.gz +sha1 b86b65d3048ade868fcc89229cfac6baf80a3e54 wqy-zenhei-0.9.45.tar.gz +# locally calculated +sha256 e4b7e306475bf9427d1757578f0e4528930c84c44eaa3f167d4c42f110ee75d6 wqy-zenhei-0.9.45.tar.gz +sha256 871c2a85e6bbf7bec65043820b706a265ed95d4e58c577fbb2c9f60c39c26ca7 COPYING diff --git a/package/wqy-zenhei/wqy-zenhei.mk b/package/wqy-zenhei/wqy-zenhei.mk new file mode 100644 index 00000000..88e60f3e --- /dev/null +++ b/package/wqy-zenhei/wqy-zenhei.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# wqy-zenhei +# +################################################################################ + +WQY_ZENHEI_VERSION = 0.9.45 +WQY_ZENHEI_SITE = https://downloads.sourceforge.net/project/wqy/wqy-zenhei/$(WQY_ZENHEI_VERSION)%20%28Fighting-state%20RC1%29 +WQY_ZENHEI_LICENSE = GPL-2.0-with-font-exception +WQY_ZENHEI_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +define WQY_ZENHEI_FONTCONFIG_CONF_INSTALL_CMDS + $(INSTALL) -D -m 0644 $(@D)/43-wqy-zenhei-sharp.conf \ + $(TARGET_DIR)/usr/share/fontconfig/conf.avail/43-wqy-zenhei-sharp.conf + $(INSTALL) -D -m 0644 $(@D)/44-wqy-zenhei.conf \ + $(TARGET_DIR)/usr/share/fontconfig/conf.avail/44-wqy-zenhei.conf +endef +endif + +define WQY_ZENHEI_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(@D)/wqy-zenhei.ttc \ + $(TARGET_DIR)/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc + $(WQY_ZENHEI_FONTCONFIG_CONF_INSTALL_CMDS) +endef + +$(eval $(generic-package)) diff --git a/package/wsapi-fcgi/Config.in b/package/wsapi-fcgi/Config.in new file mode 100644 index 00000000..657ae78c --- /dev/null +++ b/package/wsapi-fcgi/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_WSAPI_FCGI + bool "wsapi-fcgi" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBFCGI + select BR2_PACKAGE_WSAPI # runtime + help + WSAPI is an API that abstracts the web server from Lua web + applications. This is the rock that contains the FCGI module + lfcgi. + + https://luarocks.org/modules/mascarenhas/wsapi-fcgi diff --git a/package/wsapi-fcgi/wsapi-fcgi.hash b/package/wsapi-fcgi/wsapi-fcgi.hash new file mode 100644 index 00000000..0e3e5933 --- /dev/null +++ b/package/wsapi-fcgi/wsapi-fcgi.hash @@ -0,0 +1,4 @@ +# computed by luarocks/buildroot +sha256 14b77861638a5e863fd10d60ad460a961dc108ea5b915f71461a18d5e6be8e4e wsapi-fcgi-1.7-1.src.rock +sha256 6aa14e3febf7a9e810ce672b015f5a5514241ce5d1c3a6a48f921f089d270159 wsapi/doc/us/license.html +sha256 c7bf3061d00a96d10cb9dbc3a737d0af22594e2ef8f788842d7ab92eeaa864f2 wsapi/doc/us/license.md diff --git a/package/wsapi-fcgi/wsapi-fcgi.mk b/package/wsapi-fcgi/wsapi-fcgi.mk new file mode 100644 index 00000000..677bb774 --- /dev/null +++ b/package/wsapi-fcgi/wsapi-fcgi.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# wsapi-fcgi +# +################################################################################ + +WSAPI_FCGI_VERSION = 1.7-1 +WSAPI_FCGI_SUBDIR = wsapi +WSAPI_FCGI_LICENSE = MIT +WSAPI_FCGI_LICENSE_FILES = \ + $(WSAPI_FCGI_SUBDIR)/doc/us/license.html \ + $(WSAPI_FCGI_SUBDIR)/doc/us/license.md +WSAPI_FCGI_DEPENDENCIES = libfcgi + +$(eval $(luarocks-package)) diff --git a/package/wsapi-xavante/Config.in b/package/wsapi-xavante/Config.in new file mode 100644 index 00000000..7af23b84 --- /dev/null +++ b/package/wsapi-xavante/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_WSAPI_XAVANTE + bool "wsapi-xavante" + select BR2_PACKAGE_WSAPI # runtime + select BR2_PACKAGE_XAVANTE # runtime + help + WSAPI is an API that abstracts the web server from Lua web + applications. This is the rock that contains the Xavante + adapter and launcher. + + https://keplerproject.github.io/wsapi/ diff --git a/package/wsapi-xavante/wsapi-xavante.hash b/package/wsapi-xavante/wsapi-xavante.hash new file mode 100644 index 00000000..6045117b --- /dev/null +++ b/package/wsapi-xavante/wsapi-xavante.hash @@ -0,0 +1,4 @@ +# computed by luarocks/buildroot +sha256 01211bb80dab92f87cece6e31854d73ae4a2ce06af7c48423a54313d72adf9fb wsapi-xavante-1.7-1.src.rock +sha256 6aa14e3febf7a9e810ce672b015f5a5514241ce5d1c3a6a48f921f089d270159 wsapi/doc/us/license.html +sha256 c7bf3061d00a96d10cb9dbc3a737d0af22594e2ef8f788842d7ab92eeaa864f2 wsapi/doc/us/license.md diff --git a/package/wsapi-xavante/wsapi-xavante.mk b/package/wsapi-xavante/wsapi-xavante.mk new file mode 100644 index 00000000..3a747e9b --- /dev/null +++ b/package/wsapi-xavante/wsapi-xavante.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# wsapi-xavante +# +################################################################################ + +WSAPI_XAVANTE_VERSION = 1.7-1 +WSAPI_XAVANTE_SUBDIR = wsapi +WSAPI_XAVANTE_LICENSE = MIT +WSAPI_XAVANTE_LICENSE_FILES = \ + $(WSAPI_XAVANTE_SUBDIR)/doc/us/license.html \ + $(WSAPI_XAVANTE_SUBDIR)/doc/us/license.md + +$(eval $(luarocks-package)) diff --git a/package/wsapi/Config.in b/package/wsapi/Config.in new file mode 100644 index 00000000..e758e8e0 --- /dev/null +++ b/package/wsapi/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_WSAPI + bool "wsapi" + select BR2_PACKAGE_COXPCALL if BR2_PACKAGE_LUA_5_1 # runtime + select BR2_PACKAGE_LUAFILESYSTEM # runtime + select BR2_PACKAGE_RINGS # runtime + help + API that abstracts the web server from Lua web applications. + + https://keplerproject.github.io/wsapi/ diff --git a/package/wsapi/wsapi.hash b/package/wsapi/wsapi.hash new file mode 100644 index 00000000..a89853de --- /dev/null +++ b/package/wsapi/wsapi.hash @@ -0,0 +1,4 @@ +# computed by luarocks/buildroot +sha256 1a0829dffd6bdbf99f5c4278d504cda5ede9344d5089bdcf5216c9eb2999ae22 wsapi-1.7-1.src.rock +sha256 6aa14e3febf7a9e810ce672b015f5a5514241ce5d1c3a6a48f921f089d270159 wsapi/doc/us/license.html +sha256 c7bf3061d00a96d10cb9dbc3a737d0af22594e2ef8f788842d7ab92eeaa864f2 wsapi/doc/us/license.md diff --git a/package/wsapi/wsapi.mk b/package/wsapi/wsapi.mk new file mode 100644 index 00000000..d67efd0e --- /dev/null +++ b/package/wsapi/wsapi.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# wsapi +# +################################################################################ + +WSAPI_VERSION = 1.7-1 +WSAPI_SUBDIR = wsapi +WSAPI_LICENSE = MIT +WSAPI_LICENSE_FILES = \ + $(WSAPI_SUBDIR)/doc/us/license.html \ + $(WSAPI_SUBDIR)/doc/us/license.md + +$(eval $(luarocks-package)) diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in new file mode 100644 index 00000000..b891fb42 --- /dev/null +++ b/package/x11r7/Config.in @@ -0,0 +1,245 @@ +menuconfig BR2_PACKAGE_XORG7 + bool "X.org X Window System" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # dlopen in xlib_libX11 + help + Support for X11R7 libraries, servers, drivers, and/or + applications in the target. + + http://xorg.freedesktop.org + +if BR2_PACKAGE_XORG7 + menu "X11R7 Servers" + source package/x11r7/xserver_xorg-server/Config.in + endmenu + menu "X11R7 Libraries" + source package/x11r7/libxcb/Config.in + source package/x11r7/xcb-util/Config.in + source package/x11r7/xcb-util-cursor/Config.in + source package/x11r7/xcb-util-image/Config.in + source package/x11r7/xcb-util-keysyms/Config.in + source package/x11r7/xcb-util-renderutil/Config.in + source package/x11r7/xcb-util-wm/Config.in + source package/x11r7/xlib_libFS/Config.in + source package/x11r7/xlib_libICE/Config.in + source package/x11r7/xlib_libSM/Config.in + source package/x11r7/xlib_libX11/Config.in + source package/x11r7/xlib_libXScrnSaver/Config.in + source package/x11r7/xlib_libXau/Config.in + source package/x11r7/xlib_libXaw/Config.in + source package/x11r7/xlib_libXcomposite/Config.in + source package/x11r7/xlib_libXcursor/Config.in + source package/x11r7/xlib_libXdamage/Config.in + source package/x11r7/xlib_libXdmcp/Config.in + source package/x11r7/xlib_libXext/Config.in + source package/x11r7/xlib_libXfixes/Config.in + source package/x11r7/xlib_libXfont/Config.in + source package/x11r7/xlib_libXfont2/Config.in + source package/x11r7/xlib_libXft/Config.in + source package/x11r7/xlib_libXi/Config.in + source package/x11r7/xlib_libXinerama/Config.in + source package/x11r7/xlib_libXmu/Config.in + source package/x11r7/xlib_libXpm/Config.in + source package/x11r7/xlib_libXrandr/Config.in + source package/x11r7/xlib_libXrender/Config.in + source package/x11r7/xlib_libXres/Config.in + source package/x11r7/xlib_libXt/Config.in + source package/x11r7/xlib_libXtst/Config.in + source package/x11r7/xlib_libXv/Config.in + source package/x11r7/xlib_libXvMC/Config.in + source package/x11r7/xlib_libXxf86dga/Config.in + source package/x11r7/xlib_libXxf86vm/Config.in + source package/x11r7/xlib_libdmx/Config.in + source package/x11r7/xlib_libfontenc/Config.in + source package/x11r7/xlib_libxkbfile/Config.in + source package/x11r7/xlib_libxshmfence/Config.in + source package/x11r7/xlib_xtrans/Config.in + endmenu + menu "X11R7 Applications" + source package/x11r7/xapp_appres/Config.in + source package/x11r7/xapp_bdftopcf/Config.in + source package/x11r7/xapp_beforelight/Config.in + source package/x11r7/xapp_bitmap/Config.in + source package/x11r7/xapp_editres/Config.in + source package/x11r7/xapp_fonttosfnt/Config.in + source package/x11r7/xapp_fslsfonts/Config.in + source package/x11r7/xapp_fstobdf/Config.in + source package/x11r7/xapp_iceauth/Config.in + source package/x11r7/xapp_ico/Config.in + source package/x11r7/xapp_listres/Config.in + source package/x11r7/xapp_luit/Config.in + source package/x11r7/xapp_mkfontscale/Config.in + source package/x11r7/xapp_oclock/Config.in + source package/x11r7/xapp_rgb/Config.in + source package/x11r7/xapp_rstart/Config.in + source package/x11r7/xapp_scripts/Config.in + source package/x11r7/xapp_sessreg/Config.in + source package/x11r7/xapp_setxkbmap/Config.in + source package/x11r7/xapp_showfont/Config.in + source package/x11r7/xapp_smproxy/Config.in + source package/x11r7/xapp_twm/Config.in + source package/x11r7/xapp_viewres/Config.in + source package/x11r7/xapp_x11perf/Config.in + source package/x11r7/xapp_xauth/Config.in + source package/x11r7/xapp_xbacklight/Config.in + source package/x11r7/xapp_xbiff/Config.in + source package/x11r7/xapp_xcalc/Config.in + source package/x11r7/xapp_xclipboard/Config.in + source package/x11r7/xapp_xclock/Config.in + source package/x11r7/xapp_xcmsdb/Config.in + source package/x11r7/xapp_xcompmgr/Config.in + source package/x11r7/xapp_xconsole/Config.in + source package/x11r7/xapp_xcursorgen/Config.in + source package/x11r7/xapp_xdbedizzy/Config.in + source package/x11r7/xapp_xditview/Config.in + source package/x11r7/xapp_xdm/Config.in + source package/x11r7/xapp_xdpyinfo/Config.in + source package/x11r7/xapp_xdriinfo/Config.in + source package/x11r7/xapp_xedit/Config.in + source package/x11r7/xapp_xev/Config.in + source package/x11r7/xapp_xeyes/Config.in + source package/x11r7/xapp_xf86dga/Config.in + source package/x11r7/xapp_xfd/Config.in + source package/x11r7/xapp_xfindproxy/Config.in + source package/x11r7/xapp_xfontsel/Config.in + source package/x11r7/xapp_xfs/Config.in + source package/x11r7/xapp_xfsinfo/Config.in + source package/x11r7/xapp_xgamma/Config.in + source package/x11r7/xapp_xgc/Config.in + source package/x11r7/xapp_xhost/Config.in + source package/x11r7/xapp_xinit/Config.in + source package/x11r7/xapp_xinput/Config.in + source package/x11r7/xapp_xinput-calibrator/Config.in + source package/x11r7/xapp_xkbcomp/Config.in + source package/x11r7/xapp_xkbevd/Config.in + source package/x11r7/xapp_xkbprint/Config.in + source package/x11r7/xapp_xkbutils/Config.in + source package/x11r7/xapp_xkill/Config.in + source package/x11r7/xapp_xload/Config.in + source package/x11r7/xapp_xlogo/Config.in + source package/x11r7/xapp_xlsatoms/Config.in + source package/x11r7/xapp_xlsclients/Config.in + source package/x11r7/xapp_xlsfonts/Config.in + source package/x11r7/xapp_xmag/Config.in + source package/x11r7/xapp_xman/Config.in + source package/x11r7/xapp_xmessage/Config.in + source package/x11r7/xapp_xmh/Config.in + source package/x11r7/xapp_xmodmap/Config.in + source package/x11r7/xapp_xmore/Config.in + source package/x11r7/xapp_xpr/Config.in + source package/x11r7/xapp_xprop/Config.in + source package/x11r7/xapp_xrandr/Config.in + source package/x11r7/xapp_xrdb/Config.in + source package/x11r7/xapp_xrefresh/Config.in + source package/x11r7/xapp_xset/Config.in + source package/x11r7/xapp_xsetmode/Config.in + source package/x11r7/xapp_xsetpointer/Config.in + source package/x11r7/xapp_xsetroot/Config.in + source package/x11r7/xapp_xsm/Config.in + source package/x11r7/xapp_xstdcmap/Config.in + source package/x11r7/xapp_xvidtune/Config.in + source package/x11r7/xapp_xvinfo/Config.in + source package/x11r7/xapp_xwd/Config.in + source package/x11r7/xapp_xwininfo/Config.in + source package/x11r7/xapp_xwud/Config.in + endmenu + if BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + menu "X11R7 Drivers" + source package/x11r7/xdriver_xf86-input-evdev/Config.in + source package/x11r7/xdriver_xf86-input-joystick/Config.in + source package/x11r7/xdriver_xf86-input-keyboard/Config.in + source package/x11r7/xdriver_xf86-input-libinput/Config.in + source package/x11r7/xdriver_xf86-input-mouse/Config.in + source package/x11r7/xdriver_xf86-input-synaptics/Config.in + source package/x11r7/xdriver_xf86-input-tslib/Config.in + source package/x11r7/xdriver_xf86-input-vmmouse/Config.in + source package/x11r7/xdriver_xf86-video-amdgpu/Config.in + source package/x11r7/xdriver_xf86-video-ark/Config.in + source package/x11r7/xdriver_xf86-video-ast/Config.in + source package/x11r7/xdriver_xf86-video-ati/Config.in + source package/x11r7/xdriver_xf86-video-cirrus/Config.in + source package/x11r7/xdriver_xf86-video-dummy/Config.in + source package/x11r7/xdriver_xf86-video-fbdev/Config.in + source package/x11r7/xdriver_xf86-video-fbturbo/Config.in + source package/x11r7/xdriver_xf86-video-geode/Config.in + source package/x11r7/xdriver_xf86-video-glint/Config.in + source package/x11r7/xdriver_xf86-video-i128/Config.in + source package/x11r7/xdriver_xf86-video-imx/Config.in + source package/x11r7/xdriver_xf86-video-imx-viv/Config.in + source package/x11r7/xdriver_xf86-video-intel/Config.in + source package/x11r7/xdriver_xf86-video-mach64/Config.in + source package/x11r7/xdriver_xf86-video-mga/Config.in + source package/x11r7/xdriver_xf86-video-neomagic/Config.in + source package/x11r7/xdriver_xf86-video-nouveau/Config.in + source package/x11r7/xdriver_xf86-video-nv/Config.in + source package/x11r7/xdriver_xf86-video-openchrome/Config.in + source package/x11r7/xdriver_xf86-video-qxl/Config.in + source package/x11r7/xdriver_xf86-video-r128/Config.in + source package/x11r7/xdriver_xf86-video-savage/Config.in + source package/x11r7/xdriver_xf86-video-siliconmotion/Config.in + source package/x11r7/xdriver_xf86-video-sis/Config.in + source package/x11r7/xdriver_xf86-video-tdfx/Config.in + source package/x11r7/xdriver_xf86-video-tga/Config.in + source package/x11r7/xdriver_xf86-video-trident/Config.in + source package/x11r7/xdriver_xf86-video-vesa/Config.in + source package/x11r7/xdriver_xf86-video-vmware/Config.in + source package/x11r7/xdriver_xf86-video-voodoo/Config.in + endmenu + endif + menu "X11R7 Fonts" + source package/x11r7/xfont_font-util/Config.in + source package/x11r7/xfont_encodings/Config.in + source package/x11r7/xfont_font-adobe-100dpi/Config.in + source package/x11r7/xfont_font-adobe-75dpi/Config.in + source package/x11r7/xfont_font-adobe-utopia-100dpi/Config.in + source package/x11r7/xfont_font-adobe-utopia-75dpi/Config.in + source package/x11r7/xfont_font-adobe-utopia-type1/Config.in + source package/x11r7/xfont_font-alias/Config.in + source package/x11r7/xfont_font-arabic-misc/Config.in + source package/x11r7/xfont_font-bh-100dpi/Config.in + source package/x11r7/xfont_font-bh-75dpi/Config.in + source package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/Config.in + source package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/Config.in + source package/x11r7/xfont_font-bh-ttf/Config.in + source package/x11r7/xfont_font-bh-type1/Config.in + source package/x11r7/xfont_font-bitstream-100dpi/Config.in + source package/x11r7/xfont_font-bitstream-75dpi/Config.in + source package/x11r7/xfont_font-bitstream-type1/Config.in + source package/x11r7/xfont_font-cronyx-cyrillic/Config.in + source package/x11r7/xfont_font-cursor-misc/Config.in + source package/x11r7/xfont_font-daewoo-misc/Config.in + source package/x11r7/xfont_font-dec-misc/Config.in + source package/x11r7/xfont_font-ibm-type1/Config.in + source package/x11r7/xfont_font-isas-misc/Config.in + source package/x11r7/xfont_font-jis-misc/Config.in + source package/x11r7/xfont_font-micro-misc/Config.in + source package/x11r7/xfont_font-misc-cyrillic/Config.in + source package/x11r7/xfont_font-misc-ethiopic/Config.in + source package/x11r7/xfont_font-misc-meltho/Config.in + source package/x11r7/xfont_font-misc-misc/Config.in + source package/x11r7/xfont_font-mutt-misc/Config.in + source package/x11r7/xfont_font-schumacher-misc/Config.in + source package/x11r7/xfont_font-screen-cyrillic/Config.in + source package/x11r7/xfont_font-sony-misc/Config.in + source package/x11r7/xfont_font-sun-misc/Config.in + source package/x11r7/xfont_font-winitzki-cyrillic/Config.in + source package/x11r7/xfont_font-xfree86-type1/Config.in + endmenu + menu "X11R7 X protocols" + source package/x11r7/xcb-proto/Config.in + source package/x11r7/xorgproto/Config.in + endmenu + menu "X11R7 Utilities" + source package/x11r7/xutil_makedepend/Config.in + source package/x11r7/mcookie/Config.in + endmenu + menu "X11R7 Other data" + source package/x11r7/xdata_xbitmaps/Config.in + source package/x11r7/xdata_xcursor-themes/Config.in + source package/x11r7/xcursor-transparent-theme/Config.in + endmenu +endif + +comment "X.org needs a toolchain w/ wchar, threads, dynamic library" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/x11r7/libxcb/Config.in b/package/x11r7/libxcb/Config.in new file mode 100644 index 00000000..e15dde3b --- /dev/null +++ b/package/x11r7/libxcb/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBXCB + bool "libxcb" + select BR2_PACKAGE_XCB_PROTO + select BR2_PACKAGE_XLIB_LIBXDMCP + select BR2_PACKAGE_XLIB_LIBXAU + help + The X protocol C-language Binding (XCB) is a replacement for + Xlib featuring a small footprint, latency hiding, direct + access to the protocol, improved threading support, and + extensibility. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/libxcb/libxcb.hash b/package/x11r7/libxcb/libxcb.hash new file mode 100644 index 00000000..1861ef8a --- /dev/null +++ b/package/x11r7/libxcb/libxcb.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2020-February/003039.html +sha256 a55ed6db98d43469801262d81dc2572ed124edc3db31059d4e9916eb9f844c34 libxcb-1.14.tar.xz +sha512 b90a23204b0d2c29d8b115577edb01df0465e02d6a8876550fecd62375d24a5d5f872ddd5946772ddba077cadce75b12c7a6d218469dc30b5b92bc82188e8bc6 libxcb-1.14.tar.xz +# Locally computed +sha256 c5ffbfeaa501071ceeb97b7de2c0d703fdaa35de01c0fb6cbac1c28453a3e9fd COPYING diff --git a/package/x11r7/libxcb/libxcb.mk b/package/x11r7/libxcb/libxcb.mk new file mode 100644 index 00000000..4cbd9cf6 --- /dev/null +++ b/package/x11r7/libxcb/libxcb.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# libxcb +# +################################################################################ + +LIBXCB_VERSION = 1.14 +LIBXCB_SOURCE = libxcb-$(LIBXCB_VERSION).tar.xz +LIBXCB_SITE = http://xcb.freedesktop.org/dist +LIBXCB_LICENSE = MIT +LIBXCB_LICENSE_FILES = COPYING +LIBXCB_CPE_ID_VENDOR = x + +LIBXCB_INSTALL_STAGING = YES + +LIBXCB_DEPENDENCIES = \ + host-libxslt xcb-proto xlib_libXdmcp xlib_libXau \ + host-xcb-proto host-python3 host-pkgconf +HOST_LIBXCB_DEPENDENCIES = \ + host-libxslt host-xcb-proto host-xlib_libXdmcp \ + host-xlib_libXau host-python3 host-pkgconf + +LIBXCB_CONF_OPTS = --with-doxygen=no +HOST_LIBXCB_CONF_OPTS = --with-doxygen=no + +# Force detection of Buildroot host-python3 over system python +LIBXCB_CONF_OPTS += ac_cv_path_PYTHON=$(HOST_DIR)/bin/python3 +HOST_LIBXCB_CONF_OPTS += ac_cv_path_PYTHON=$(HOST_DIR)/bin/python3 + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/mcookie/Config.in b/package/x11r7/mcookie/Config.in new file mode 100644 index 00000000..2e9cfc76 --- /dev/null +++ b/package/x11r7/mcookie/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MCOOKIE + bool "mcookie" + help + cookie generator for X server + + http://www.x.org diff --git a/package/x11r7/mcookie/mcookie.c b/package/x11r7/mcookie/mcookie.c new file mode 100644 index 00000000..3c38f6f3 --- /dev/null +++ b/package/x11r7/mcookie/mcookie.c @@ -0,0 +1,425 @@ +/* mcookie.c -- Generates random numbers for xauth + * Created: Fri Feb 3 10:42:48 1995 by faith@cs.unc.edu + * Revised: Fri Mar 19 07:48:01 1999 by faith@acm.org + * Public Domain 1995, 1999 Rickard E. Faith (faith@acm.org) + * This program comes with ABSOLUTELY NO WARRANTY. + * + * $Id: mcookie.c,v 1.5 1997/07/06 00:13:06 aebr Exp $ + * + * This program gathers some random bits of data and used the MD5 + * message-digest algorithm to generate a 128-bit hexadecimal number for + * use with xauth(1). + * + * NOTE: Unless /dev/random is available, this program does not actually + * gather 128 bits of random information, so the magic cookie generated + * will be considerably easier to guess than one might expect. + * + * 1999-02-22 Arkadiusz Mi¶kiewicz + * - added Native Language Support + * 1999-03-21 aeb: Added some fragments of code from Colin Plumb. + * + */ + +#include +#include +#include +#include +#include +#include + +#define BUFFERSIZE 4096 + + +#ifndef MD5_H +#define MD5_H + +#if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) +typedef unsigned int uint32; +#else +typedef unsigned long uint32; +#endif + +struct MD5Context { + uint32 buf[4]; + uint32 bits[2]; + unsigned char in[64]; +}; + +void MD5Init(struct MD5Context *context); +void MD5Update(struct MD5Context *context, unsigned char const *buf, + unsigned len); +void MD5Final(unsigned char digest[16], struct MD5Context *context); +void MD5Transform(uint32 buf[4], uint32 const in[16]); + +/* + * This is needed to make RSAREF happy on some MS-DOS compilers. + */ +typedef struct MD5Context MD5_CTX; + +#endif /* !MD5_H */ + + + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + */ +#include /* for memcpy() */ +#include + +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define byteReverse(buf, len) /* Nothing */ +#else +void byteReverse(unsigned char *buf, unsigned longs); + +/* + * Note: this code is harmless on little-endian machines. + */ +void byteReverse(unsigned char *buf, unsigned longs) +{ + uint32 t; + do { + t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | + ((unsigned) buf[1] << 8 | buf[0]); + *(uint32 *) buf = t; + buf += 4; + } while (--longs); +} +#endif + +/* + * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious + * initialization constants. + */ +void MD5Init(struct MD5Context *ctx) +{ + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; + ctx->buf[2] = 0x98badcfe; + ctx->buf[3] = 0x10325476; + + ctx->bits[0] = 0; + ctx->bits[1] = 0; +} + +/* + * Update context to reflect the concatenation of another buffer full + * of bytes. + */ +void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) +{ + uint32 t; + + /* Update bitcount */ + + t = ctx->bits[0]; + if ((ctx->bits[0] = t + ((uint32) len << 3)) < t) + ctx->bits[1]++; /* Carry from low to high */ + ctx->bits[1] += len >> 29; + + t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ + + /* Handle any leading odd-sized chunks */ + + if (t) { + unsigned char *p = (unsigned char *) ctx->in + t; + + t = 64 - t; + if (len < t) { + memcpy(p, buf, len); + return; + } + memcpy(p, buf, t); + byteReverse(ctx->in, 16); + MD5Transform(ctx->buf, (uint32 *) ctx->in); + buf += t; + len -= t; + } + /* Process data in 64-byte chunks */ + + while (len >= 64) { + memcpy(ctx->in, buf, 64); + byteReverse(ctx->in, 16); + MD5Transform(ctx->buf, (uint32 *) ctx->in); + buf += 64; + len -= 64; + } + + /* Handle any remaining bytes of data. */ + + memcpy(ctx->in, buf, len); +} + +/* + * Final wrapup - pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +void MD5Final(unsigned char digest[16], struct MD5Context *ctx) +{ + unsigned count; + unsigned char *p; + + /* Compute number of bytes mod 64 */ + count = (ctx->bits[0] >> 3) & 0x3F; + + /* Set the first char of padding to 0x80. This is safe since there is + always at least one byte free */ + p = ctx->in + count; + *p++ = 0x80; + + /* Bytes of padding needed to make 64 bytes */ + count = 64 - 1 - count; + + /* Pad out to 56 mod 64 */ + if (count < 8) { + /* Two lots of padding: Pad the first block to 64 bytes */ + memset(p, 0, count); + byteReverse(ctx->in, 16); + MD5Transform(ctx->buf, (uint32 *) ctx->in); + + /* Now fill the next block with 56 bytes */ + memset(ctx->in, 0, 56); + } else { + /* Pad block to 56 bytes */ + memset(p, 0, count - 8); + } + byteReverse(ctx->in, 14); + + /* Append length in bits and transform */ + ((uint32 *) ctx->in)[14] = ctx->bits[0]; + ((uint32 *) ctx->in)[15] = ctx->bits[1]; + + MD5Transform(ctx->buf, (uint32 *) ctx->in); + byteReverse((unsigned char *) ctx->buf, 4); + memcpy(digest, ctx->buf, 16); + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ +} + +/* The four core functions - F1 is optimized somewhat */ + +/* #define F1(x, y, z) (x & y | ~x & z) */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) + +/* This is the central step in the MD5 algorithm. */ +#define MD5STEP(f, w, x, y, z, data, s) \ + ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) + +/* + * The core of the MD5 algorithm, this alters an existing MD5 hash to + * reflect the addition of 16 longwords of new data. MD5Update blocks + * the data and converts bytes into longwords for this routine. + */ +void MD5Transform(uint32 buf[4], uint32 const in[16]) +{ + register uint32 a, b, c, d; + + a = buf[0]; + b = buf[1]; + c = buf[2]; + d = buf[3]; + + MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); + MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); + MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); + MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); + MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); + MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); + MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); + MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); + MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); + MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); + MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); + MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); + MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); + MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); + MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); + MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); + + MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); + MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); + MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); + MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); + MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); + MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); + MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); + MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); + MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); + MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); + MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); + MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); + MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); + MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); + MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); + MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); + + MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); + MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); + MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); + MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); + MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); + MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); + MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); + MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); + MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); + MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); + MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); + MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); + MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); + MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); + MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); + MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); + + MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); + MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); + MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); + MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); + MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); + MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); + MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); + MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); + MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); + MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); + MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); + MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); + MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); + MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); + MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); + MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; +} + + + + +struct rngs { + const char *path; + int minlength, maxlength; +} rngs[] = { + { "/dev/random", 16, 16 }, /* 16 bytes = 128 bits suffice */ + { "/proc/interrupts", 0, 0 }, + { "/proc/slabinfo", 0, 0 }, + { "/proc/stat", 0, 0 }, + { "/dev/urandom", 32, 64 }, +}; +#define RNGS (sizeof(rngs)/sizeof(struct rngs)) + +int Verbose = 0; + +/* The basic function to hash a file */ +static off_t +hash_file(struct MD5Context *ctx, int fd) +{ + off_t count = 0; + ssize_t r; + unsigned char buf[BUFFERSIZE]; + + while ((r = read(fd, buf, sizeof(buf))) > 0) { + MD5Update(ctx, buf, r); + count += r; + } + /* Separate files with a null byte */ + buf[0] = 0; + MD5Update(ctx, buf, 1); + return count; +} + +int main( int argc, char **argv ) +{ + int i; + struct MD5Context ctx; + unsigned char digest[16]; + unsigned char buf[BUFFERSIZE]; + int fd; + int c; + pid_t pid; + char *file = NULL; + int r; + struct timeval tv; + struct timezone tz; + + while ((c = getopt( argc, argv, "vf:" )) != -1) + switch (c) { + case 'v': ++Verbose; break; + case 'f': file = optarg; break; + } + + MD5Init( &ctx ); + + gettimeofday( &tv, &tz ); + MD5Update( &ctx, (unsigned char *)&tv, sizeof( tv ) ); + pid = getppid(); + MD5Update( &ctx, (unsigned char *)&pid, sizeof( pid )); + pid = getpid(); + MD5Update( &ctx, (unsigned char *)&pid, sizeof( pid )); + + if (file) { + int count = 0; + + if (file[0] == '-' && !file[1]) + fd = fileno(stdin); + else + fd = open( file, O_RDONLY ); + + if (fd < 0) { + fprintf( stderr, "Could not open %s\n", file ); + } else { + count = hash_file( &ctx, fd ); + if (Verbose) + fprintf( stderr, "Got %d bytes from %s\n", count, file ); + + if (file[0] != '-' || file[1]) close( fd ); + } + } + + for (i = 0; i < RNGS; i++) { + if ((fd = open( rngs[i].path, O_RDONLY|O_NONBLOCK )) >= 0) { + int count = sizeof(buf); + + if (rngs[i].maxlength && count > rngs[i].maxlength) + count = rngs[i].maxlength; + r = read( fd, buf, count ); + if (r > 0) + MD5Update( &ctx, buf, r ); + else + r = 0; + close( fd ); + if (Verbose) + fprintf( stderr, "Got %d bytes from %s\n", r, rngs[i].path ); + if (rngs[i].minlength && r >= rngs[i].minlength) + break; + } else if (Verbose) + fprintf( stderr, "Could not open %s\n", rngs[i].path ); + } + + MD5Final( digest, &ctx ); + for (i = 0; i < 16; i++) printf( "%02x", digest[i] ); + putchar ( '\n' ); + + /* + * The following is important for cases like disk full, so shell scripts + * can bomb out properly rather than think they succeeded. + */ + if (fflush(stdout) < 0 || fclose(stdout) < 0) + return 1; + + return 0; +} diff --git a/package/x11r7/mcookie/mcookie.mk b/package/x11r7/mcookie/mcookie.mk new file mode 100644 index 00000000..b14599d5 --- /dev/null +++ b/package/x11r7/mcookie/mcookie.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# mcookie +# +################################################################################ + +MCOOKIE_LICENSE = Public Domain + +define MCOOKIE_EXTRACT_CMDS + cp package/x11r7/mcookie/mcookie.c $(@D)/ +endef + +define MCOOKIE_BUILD_CMDS + (cd $(@D); $(TARGET_CC) -Wall -Os -s mcookie.c -o mcookie) +endef + +define MCOOKIE_INSTALL_TARGET_CMDS + install -m 0755 -D $(@D)/mcookie $(TARGET_DIR)/usr/bin/mcookie +endef + +$(eval $(generic-package)) diff --git a/package/x11r7/x11r7.mk b/package/x11r7/x11r7.mk new file mode 100644 index 00000000..85ecbc59 --- /dev/null +++ b/package/x11r7/x11r7.mk @@ -0,0 +1 @@ +include $(sort $(wildcard package/x11r7/*/*.mk)) diff --git a/package/x11r7/xapp_appres/Config.in b/package/x11r7/xapp_appres/Config.in new file mode 100644 index 00000000..7574659a --- /dev/null +++ b/package/x11r7/xapp_appres/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_APPRES + bool "appres" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXT + help + list X application resource database diff --git a/package/x11r7/xapp_appres/xapp_appres.hash b/package/x11r7/xapp_appres/xapp_appres.hash new file mode 100644 index 00000000..8750e2d1 --- /dev/null +++ b/package/x11r7/xapp_appres/xapp_appres.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002847.html +md5 f544e701043249d2bb3deed48314bc55 appres-1.0.5.tar.bz2 +sha1 5e5dbffd0a125732bb8bb8a202e04555a9604089 appres-1.0.5.tar.bz2 +sha256 ffad893712c81943b919e3cbfe46fc65259cc0d9eb96d5e658670e3fbb265928 appres-1.0.5.tar.bz2 +sha512 70825563cd80f0f433c48ab2fdae888072939c1b22fb22340b70b9444c97916275ed92c9e5bf9a06bb76c32a5371b89ff7c0211a9a47a227c88311078c2c4137 appres-1.0.5.tar.bz2 +# Locally computed +sha256 5969302729a9621fd526a7f9942a51a29b858e0b682ffd28eeda5fc4dfaddf55 COPYING diff --git a/package/x11r7/xapp_appres/xapp_appres.mk b/package/x11r7/xapp_appres/xapp_appres.mk new file mode 100644 index 00000000..4159332b --- /dev/null +++ b/package/x11r7/xapp_appres/xapp_appres.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_appres +# +################################################################################ + +XAPP_APPRES_VERSION = 1.0.5 +XAPP_APPRES_SOURCE = appres-$(XAPP_APPRES_VERSION).tar.bz2 +XAPP_APPRES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_APPRES_LICENSE = MIT +XAPP_APPRES_LICENSE_FILES = COPYING +XAPP_APPRES_DEPENDENCIES = xlib_libX11 xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_bdftopcf/Config.in b/package/x11r7/xapp_bdftopcf/Config.in new file mode 100644 index 00000000..a9caffa6 --- /dev/null +++ b/package/x11r7/xapp_bdftopcf/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_BDFTOPCF + bool "bdftopcf" + select BR2_PACKAGE_XLIB_LIBXFONT + help + X.Org bdftopcf application diff --git a/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.hash b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.hash new file mode 100644 index 00000000..614d5438 --- /dev/null +++ b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.hash @@ -0,0 +1,8 @@ +# From https://lists.x.org/archives/xorg-announce/2017-November/002821.html +md5 2a455d3c02390597feb9cefb3fe97a45 bdftopcf-1.1.tar.bz2 +sha1 48a783337a5aa49ebc102c9788ff0f43ea35c5c4 bdftopcf-1.1.tar.bz2 +sha256 4b4df05fc53f1e98993638d6f7e178d95b31745c4568cee407e167491fd311a2 bdftopcf-1.1.tar.bz2 +sha512 7b790e8d512ca2812ac889c156ef91c48798b4744a6857e5b17e0128764b5afa8c5426fe5de05a9819d64745116718db4221b3e657e3c2633465e87179c44bec bdftopcf-1.1.tar.bz2 + +# Locally calculated +sha256 a437fb5272ba507c2977b2ef623bb391270f521b2a20271ed044785f4eaa5dbc COPYING diff --git a/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk new file mode 100644 index 00000000..7ee618d6 --- /dev/null +++ b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xapp_bdftopcf +# +################################################################################ + +XAPP_BDFTOPCF_VERSION = 1.1 +XAPP_BDFTOPCF_SOURCE = bdftopcf-$(XAPP_BDFTOPCF_VERSION).tar.bz2 +XAPP_BDFTOPCF_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_BDFTOPCF_LICENSE = MIT +XAPP_BDFTOPCF_LICENSE_FILES = COPYING +XAPP_BDFTOPCF_DEPENDENCIES = xlib_libXfont +HOST_XAPP_BDFTOPCF_DEPENDENCIES = host-xlib_libXfont + +# needed for linking against libXfont +XAPP_BDFTOPCF_MAKE_OPTS += LIBS=-ldl + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_beforelight/Config.in b/package/x11r7/xapp_beforelight/Config.in new file mode 100644 index 00000000..3a111897 --- /dev/null +++ b/package/x11r7/xapp_beforelight/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_BEFORELIGHT + bool "beforelight" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXSCRNSAVER + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXT + help + screen saver diff --git a/package/x11r7/xapp_beforelight/xapp_beforelight.hash b/package/x11r7/xapp_beforelight/xapp_beforelight.hash new file mode 100644 index 00000000..00aff757 --- /dev/null +++ b/package/x11r7/xapp_beforelight/xapp_beforelight.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002131.html +sha256 8fcab6f15148ca680c0d3da8de7dcb41f8e6a076f442cf8bdcf272be9e348166 beforelight-1.0.5.tar.bz2 +# Locally computed +sha256 27d8cbdcde7a0bd062ce49cdf8c672201452a64e3e6823f09b1beffe2c4b8eff COPYING diff --git a/package/x11r7/xapp_beforelight/xapp_beforelight.mk b/package/x11r7/xapp_beforelight/xapp_beforelight.mk new file mode 100644 index 00000000..7dcb715e --- /dev/null +++ b/package/x11r7/xapp_beforelight/xapp_beforelight.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_beforelight +# +################################################################################ + +XAPP_BEFORELIGHT_VERSION = 1.0.5 +XAPP_BEFORELIGHT_SOURCE = beforelight-$(XAPP_BEFORELIGHT_VERSION).tar.bz2 +XAPP_BEFORELIGHT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_BEFORELIGHT_LICENSE = MIT +XAPP_BEFORELIGHT_LICENSE_FILES = COPYING +XAPP_BEFORELIGHT_DEPENDENCIES = xlib_libX11 xlib_libXScrnSaver xlib_libXaw xlib_libXt +XAPP_BEFORELIGHT_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_bitmap/Config.in b/package/x11r7/xapp_bitmap/Config.in new file mode 100644 index 00000000..e5bb5e83 --- /dev/null +++ b/package/x11r7/xapp_bitmap/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_BITMAP + bool "bitmap" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XDATA_XBITMAPS + help + X.Org bitmap application diff --git a/package/x11r7/xapp_bitmap/xapp_bitmap.hash b/package/x11r7/xapp_bitmap/xapp_bitmap.hash new file mode 100644 index 00000000..f632bce3 --- /dev/null +++ b/package/x11r7/xapp_bitmap/xapp_bitmap.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002941.html +md5 b94172053ffa282bd88274f1e6a677f1 bitmap-1.0.9.tar.bz2 +sha1 26ba3130b14a2db81b427f2353ac21301c5d2527 bitmap-1.0.9.tar.bz2 +sha256 e0f3afad5272d796f54c33fa1b5bd1fb3f62843a54b28c87196d06a35123e5f5 bitmap-1.0.9.tar.bz2 +sha512 873c626c72a0f4025fe8c8aeedbf3fe4ee5657fb487ad7410406a20da518c0358041dc45c2549926cc10e1d031977073b9d1ddb32830fdce95b716a52fe44456 bitmap-1.0.9.tar.bz2 +# Locally computed +sha256 03be44611edac06827bd13c0815a67ecd37ffe8fb1b9e210d6545d79bec89a3a COPYING diff --git a/package/x11r7/xapp_bitmap/xapp_bitmap.mk b/package/x11r7/xapp_bitmap/xapp_bitmap.mk new file mode 100644 index 00000000..6bc0dbde --- /dev/null +++ b/package/x11r7/xapp_bitmap/xapp_bitmap.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_bitmap +# +################################################################################ + +XAPP_BITMAP_VERSION = 1.0.9 +XAPP_BITMAP_SOURCE = bitmap-$(XAPP_BITMAP_VERSION).tar.bz2 +XAPP_BITMAP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_BITMAP_LICENSE = MIT +XAPP_BITMAP_LICENSE_FILES = COPYING +XAPP_BITMAP_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXmu xdata_xbitmaps +XAPP_BITMAP_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_editres/Config.in b/package/x11r7/xapp_editres/Config.in new file mode 100644 index 00000000..390ec487 --- /dev/null +++ b/package/x11r7/xapp_editres/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_EDITRES + bool "editres" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXT + help + a dynamic resource editor for X Toolkit applications diff --git a/package/x11r7/xapp_editres/xapp_editres.hash b/package/x11r7/xapp_editres/xapp_editres.hash new file mode 100644 index 00000000..15367955 --- /dev/null +++ b/package/x11r7/xapp_editres/xapp_editres.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002846.html +md5 526cf79edc0c5e379aefb21539243f96 editres-1.0.7.tar.bz2 +sha1 389e953ebb5080564a6780cb34b72bafae7f5540 editres-1.0.7.tar.bz2 +sha256 089ad34628e55a779b97e369f55fb12caefc96d684b508d9022eb9e12b775c11 editres-1.0.7.tar.bz2 +sha512 b9c928b556116bf50cf4b6ea779bdc9fedf29f5db3e6a8cc75c122578c92e1cc530a81b226ec24aad183b8ebc2de570f200314b0d9ce7883b6e3306007365b32 editres-1.0.7.tar.bz2 +# Locally computed +sha256 b1049cf96db2c00428b8313541ab333ec4e06f102955f3edd44f88ec43b0acd6 COPYING diff --git a/package/x11r7/xapp_editres/xapp_editres.mk b/package/x11r7/xapp_editres/xapp_editres.mk new file mode 100644 index 00000000..108a0ec3 --- /dev/null +++ b/package/x11r7/xapp_editres/xapp_editres.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_editres +# +################################################################################ + +XAPP_EDITRES_VERSION = 1.0.7 +XAPP_EDITRES_SOURCE = editres-$(XAPP_EDITRES_VERSION).tar.bz2 +XAPP_EDITRES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_EDITRES_LICENSE = MIT +XAPP_EDITRES_LICENSE_FILES = COPYING +XAPP_EDITRES_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXmu xlib_libXt +XAPP_EDITRES_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_fonttosfnt/Config.in b/package/x11r7/xapp_fonttosfnt/Config.in new file mode 100644 index 00000000..eb35710f --- /dev/null +++ b/package/x11r7/xapp_fonttosfnt/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_FONTTOSFNT + bool "fonttosfnt" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBFONTENC + help + X.Org fonttosfnt application diff --git a/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.hash b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.hash new file mode 100644 index 00000000..72077bee --- /dev/null +++ b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2021-June/003093.html +sha256 1a1bb4ef25856dea7de3d491ae7231493225b400bee0f6a1f949017ffd203a64 fonttosfnt-1.2.2.tar.bz2 +sha512 ceac6ccb064043d46f9f16f31fb89c6cbf7f026d049f7b5325d6af97e809b4cd068e6149413bb328c0af601a98b5070e21d469888a6853f6cabecd5b46f60240 fonttosfnt-1.2.2.tar.bz2 +# Locally computed +sha256 f83378580cb7909a98b52bf5cd6a29f4894d76318c5c5312dd3f17a3e92beef1 COPYING diff --git a/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk new file mode 100644 index 00000000..9fdccbb8 --- /dev/null +++ b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_fonttosfnt +# +################################################################################ + +XAPP_FONTTOSFNT_VERSION = 1.2.2 +XAPP_FONTTOSFNT_SOURCE = fonttosfnt-$(XAPP_FONTTOSFNT_VERSION).tar.bz2 +XAPP_FONTTOSFNT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_FONTTOSFNT_LICENSE = MIT +XAPP_FONTTOSFNT_LICENSE_FILES = COPYING +XAPP_FONTTOSFNT_DEPENDENCIES = freetype xlib_libX11 xlib_libfontenc + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_fslsfonts/Config.in b/package/x11r7/xapp_fslsfonts/Config.in new file mode 100644 index 00000000..1917d615 --- /dev/null +++ b/package/x11r7/xapp_fslsfonts/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_FSLSFONTS + bool "fslsfonts" + select BR2_PACKAGE_XLIB_LIBFS + select BR2_PACKAGE_XLIB_LIBX11 + help + list fonts served by X font server diff --git a/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.hash b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.hash new file mode 100644 index 00000000..1a7985f9 --- /dev/null +++ b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2014-December/002510.html +sha256 f1ed55093356b78daec2678d22f52d42ec11fe88575562d734396962e626d7f6 fslsfonts-1.0.5.tar.bz2 +# Locally computed +sha256 fbdfcafb5755565ad688bf3f7f808109d358040ec83ed3de496155105451fdf4 COPYING diff --git a/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk new file mode 100644 index 00000000..27786a55 --- /dev/null +++ b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_fslsfonts +# +################################################################################ + +XAPP_FSLSFONTS_VERSION = 1.0.5 +XAPP_FSLSFONTS_SOURCE = fslsfonts-$(XAPP_FSLSFONTS_VERSION).tar.bz2 +XAPP_FSLSFONTS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_FSLSFONTS_LICENSE = MIT +XAPP_FSLSFONTS_LICENSE_FILES = COPYING +XAPP_FSLSFONTS_DEPENDENCIES = xlib_libFS xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_fstobdf/Config.in b/package/x11r7/xapp_fstobdf/Config.in new file mode 100644 index 00000000..0a1f62ba --- /dev/null +++ b/package/x11r7/xapp_fstobdf/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_FSTOBDF + bool "fstobdf" + select BR2_PACKAGE_XLIB_LIBFS + select BR2_PACKAGE_XLIB_LIBX11 + help + generate BDF font from X font server diff --git a/package/x11r7/xapp_fstobdf/xapp_fstobdf.hash b/package/x11r7/xapp_fstobdf/xapp_fstobdf.hash new file mode 100644 index 00000000..a2f1425a --- /dev/null +++ b/package/x11r7/xapp_fstobdf/xapp_fstobdf.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2014-December/002511.html +sha256 66cf550326c993e7043f260a8ec4a533a3bf9d8f0e7397a6fe9cca803732e92e fstobdf-1.0.6.tar.bz2 +# Locally computed +sha256 b76125d919ac2bfbff96955dec98b90729633b2df5fbfa2ad3f2e4376164febb COPYING diff --git a/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk b/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk new file mode 100644 index 00000000..e897514c --- /dev/null +++ b/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_fstobdf +# +################################################################################ + +XAPP_FSTOBDF_VERSION = 1.0.6 +XAPP_FSTOBDF_SOURCE = fstobdf-$(XAPP_FSTOBDF_VERSION).tar.bz2 +XAPP_FSTOBDF_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_FSTOBDF_LICENSE = MIT +XAPP_FSTOBDF_LICENSE_FILES = COPYING +XAPP_FSTOBDF_DEPENDENCIES = xlib_libFS xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_iceauth/Config.in b/package/x11r7/xapp_iceauth/Config.in new file mode 100644 index 00000000..ce2db988 --- /dev/null +++ b/package/x11r7/xapp_iceauth/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_ICEAUTH + bool "iceauth" + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_LIBX11 + help + ICE authority file utility diff --git a/package/x11r7/xapp_iceauth/xapp_iceauth.hash b/package/x11r7/xapp_iceauth/xapp_iceauth.hash new file mode 100644 index 00000000..f1ea73a7 --- /dev/null +++ b/package/x11r7/xapp_iceauth/xapp_iceauth.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002850.html +md5 3b9b79fa0f9928161f4bad94273de7ae iceauth-1.0.8.tar.bz2 +sha1 2ce23c40a17d98badeb8ce70d26e81a5ac0e178c iceauth-1.0.8.tar.bz2 +sha256 e6ee213a217265cc76050e4293ea70b98c32dce6505c6421227efbda62ab60c6 iceauth-1.0.8.tar.bz2 +sha512 9d4520adf951b16a3e784349dbb70d5d8176b74b956f8adc63abf55d049745c113b03ccfa60a281fc39b487db3742302dc6287c9985ce83a0157bf4674df2af1 iceauth-1.0.8.tar.bz2 +# Locally computed +sha256 fdd9ba8ccb92af2f31f542e7b7a18c27257e6cdce147d231bc9ba3654ad84976 COPYING diff --git a/package/x11r7/xapp_iceauth/xapp_iceauth.mk b/package/x11r7/xapp_iceauth/xapp_iceauth.mk new file mode 100644 index 00000000..0e0e0017 --- /dev/null +++ b/package/x11r7/xapp_iceauth/xapp_iceauth.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_iceauth +# +################################################################################ + +XAPP_ICEAUTH_VERSION = 1.0.8 +XAPP_ICEAUTH_SOURCE = iceauth-$(XAPP_ICEAUTH_VERSION).tar.bz2 +XAPP_ICEAUTH_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_ICEAUTH_LICENSE = MIT +XAPP_ICEAUTH_LICENSE_FILES = COPYING +XAPP_ICEAUTH_DEPENDENCIES = xlib_libICE xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_ico/Config.in b/package/x11r7/xapp_ico/Config.in new file mode 100644 index 00000000..892f2be8 --- /dev/null +++ b/package/x11r7/xapp_ico/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_ICO + bool "ico" + select BR2_PACKAGE_XLIB_LIBX11 + help + animate an icosahedron or other polyhedron diff --git a/package/x11r7/xapp_ico/xapp_ico.hash b/package/x11r7/xapp_ico/xapp_ico.hash new file mode 100644 index 00000000..693aff65 --- /dev/null +++ b/package/x11r7/xapp_ico/xapp_ico.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002880.html +md5 7895f2d109f4206b6d2db37257e07d12 ico-1.0.5.tar.bz2 +sha1 8759ec954375f3a1b37dc920a12790bfbfb0cad3 ico-1.0.5.tar.bz2 +sha256 d73b62f29eb98d850f16b76d759395180b860b613fbe1686b18eee99a6e3773f ico-1.0.5.tar.bz2 +sha512 93a94a66d4a41b39d4b3657050e58f8269d352dae5d5916c9ecdda1cb14f23b9d159d67c50fdfa654b4b1c2ad11434bed140ace70703c82b05d3fe8686aab8f6 ico-1.0.5.tar.bz2 +# Locally computed +sha256 97ef3a622f2f385cabfc8ab7aff13dc46468c10a5520670b5edfa33f2c3999eb COPYING diff --git a/package/x11r7/xapp_ico/xapp_ico.mk b/package/x11r7/xapp_ico/xapp_ico.mk new file mode 100644 index 00000000..8b0d4f90 --- /dev/null +++ b/package/x11r7/xapp_ico/xapp_ico.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_ico +# +################################################################################ + +XAPP_ICO_VERSION = 1.0.5 +XAPP_ICO_SOURCE = ico-$(XAPP_ICO_VERSION).tar.bz2 +XAPP_ICO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_ICO_LICENSE = MIT +XAPP_ICO_LICENSE_FILES = COPYING +XAPP_ICO_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_listres/Config.in b/package/x11r7/xapp_listres/Config.in new file mode 100644 index 00000000..a3be6b38 --- /dev/null +++ b/package/x11r7/xapp_listres/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_LISTRES + bool "listres" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXT + help + list resources in widgets diff --git a/package/x11r7/xapp_listres/xapp_listres.hash b/package/x11r7/xapp_listres/xapp_listres.hash new file mode 100644 index 00000000..1e1c1195 --- /dev/null +++ b/package/x11r7/xapp_listres/xapp_listres.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002848.html +md5 24e05349f2881aaa58cbe160e49223ac listres-1.0.4.tar.bz2 +sha1 903857c7a9ec3d8edc8a88101aef33cd27796649 listres-1.0.4.tar.bz2 +sha256 6a1229f478796e141d6658762f432ebbe1f6083b27550847d52239b3f7ec2b10 listres-1.0.4.tar.bz2 +sha512 925bceab6ff96fcf91f58ba2f858905d6e2eff7074ba29cfc02def7c19fb493545837884f1070dc004422451f749cd459000c01e8c9bb51a7cce7f7ab4067b8a listres-1.0.4.tar.bz2 +# Locally computed +sha256 aefb540c54bc95c68702cd2ae668c559e63cc1a84f55ae5c0e78547e7d75d2d5 COPYING diff --git a/package/x11r7/xapp_listres/xapp_listres.mk b/package/x11r7/xapp_listres/xapp_listres.mk new file mode 100644 index 00000000..b4ac3e1d --- /dev/null +++ b/package/x11r7/xapp_listres/xapp_listres.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_listres +# +################################################################################ + +XAPP_LISTRES_VERSION = 1.0.4 +XAPP_LISTRES_SOURCE = listres-$(XAPP_LISTRES_VERSION).tar.bz2 +XAPP_LISTRES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_LISTRES_LICENSE = MIT +XAPP_LISTRES_LICENSE_FILES = COPYING +XAPP_LISTRES_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXmu xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_luit/0001-posix-openpt.patch b/package/x11r7/xapp_luit/0001-posix-openpt.patch new file mode 100644 index 00000000..c8ff8e43 --- /dev/null +++ b/package/x11r7/xapp_luit/0001-posix-openpt.patch @@ -0,0 +1,19 @@ +Suggested workaround to build with recent gcc versions + +Upstream bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47792 + +Signed-off-by: Markos Chandras + +Index: xapp_luit-1.1.1/sys.c +=================================================================== +--- xapp_luit-1.1.1.orig/sys.c ++++ xapp_luit-1.1.1/sys.c +@@ -20,6 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWAR + THE SOFTWARE. + */ + ++#define _XOPEN_SOURCE 600 ++ + #ifdef HAVE_CONFIG_H + # include "config.h" + #endif diff --git a/package/x11r7/xapp_luit/Config.in b/package/x11r7/xapp_luit/Config.in new file mode 100644 index 00000000..69da5706 --- /dev/null +++ b/package/x11r7/xapp_luit/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_LUIT + bool "luit" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBFONTENC + help + Locale and ISO 2022 support for Unicode terminals diff --git a/package/x11r7/xapp_luit/xapp_luit.hash b/package/x11r7/xapp_luit/xapp_luit.hash new file mode 100644 index 00000000..55537b7f --- /dev/null +++ b/package/x11r7/xapp_luit/xapp_luit.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2012-March/001894.html +sha256 30b0e787cb07a0f504b70f1d6123930522111ce9d4276f6683a69b322b49c636 luit-1.1.1.tar.bz2 +# Locally computed +sha256 20b6a1481d9dafeaa471e2ac497ecc651428e8369cc935b5bd9d0e5b77d78081 COPYING diff --git a/package/x11r7/xapp_luit/xapp_luit.mk b/package/x11r7/xapp_luit/xapp_luit.mk new file mode 100644 index 00000000..d3217fe5 --- /dev/null +++ b/package/x11r7/xapp_luit/xapp_luit.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_luit +# +################################################################################ + +XAPP_LUIT_VERSION = 1.1.1 +XAPP_LUIT_SOURCE = luit-$(XAPP_LUIT_VERSION).tar.bz2 +XAPP_LUIT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_LUIT_LICENSE = MIT +XAPP_LUIT_LICENSE_FILES = COPYING +XAPP_LUIT_DEPENDENCIES = xlib_libX11 xlib_libfontenc + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_mkfontscale/Config.in b/package/x11r7/xapp_mkfontscale/Config.in new file mode 100644 index 00000000..d0a9d896 --- /dev/null +++ b/package/x11r7/xapp_mkfontscale/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XAPP_MKFONTSCALE + bool "mkfontscale" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBFONTENC + select BR2_PACKAGE_XORGPROTO + select BR2_PACKAGE_ZLIB + help + create an index of scalable font files for X diff --git a/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.hash b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.hash new file mode 100644 index 00000000..cbcdb170 --- /dev/null +++ b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002988.html +md5 215940de158b1a3d8b3f8b442c606e2f mkfontscale-1.2.1.tar.bz2 +sha1 fb9d0458a4476a237609b676f9cebcc64b0a8a85 mkfontscale-1.2.1.tar.bz2 +sha256 ca0495eb974a179dd742bfa6199d561bda1c8da4a0c5a667f21fd82aaab6bac7 mkfontscale-1.2.1.tar.bz2 +sha512 4d243160e1f7f8dfa6a8f53349c1a42a55fc99426455ebdef58352c5e951fce8b4f1fbd1061a76c9a148095b002eac372db1ae5e2647d2ccb4886635b317b18c mkfontscale-1.2.1.tar.bz2 +# Locally computed +sha256 80df6f5b759f7775042313e4586506db60f26fd15b98b532cf518bd8cf1e8488 COPYING diff --git a/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk new file mode 100644 index 00000000..11d9cc95 --- /dev/null +++ b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xapp_mkfontscale +# +################################################################################ + +XAPP_MKFONTSCALE_VERSION = 1.2.1 +XAPP_MKFONTSCALE_SOURCE = mkfontscale-$(XAPP_MKFONTSCALE_VERSION).tar.bz2 +XAPP_MKFONTSCALE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_MKFONTSCALE_LICENSE = MIT +XAPP_MKFONTSCALE_LICENSE_FILES = COPYING +XAPP_MKFONTSCALE_DEPENDENCIES = zlib freetype xlib_libfontenc xorgproto +HOST_XAPP_MKFONTSCALE_DEPENDENCIES = \ + host-zlib host-freetype host-xlib_libfontenc host-xorgproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_oclock/Config.in b/package/x11r7/xapp_oclock/Config.in new file mode 100644 index 00000000..00cd4132 --- /dev/null +++ b/package/x11r7/xapp_oclock/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_OCLOCK + bool "oclock" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXMU + help + round X clock diff --git a/package/x11r7/xapp_oclock/xapp_oclock.hash b/package/x11r7/xapp_oclock/xapp_oclock.hash new file mode 100644 index 00000000..b345b448 --- /dev/null +++ b/package/x11r7/xapp_oclock/xapp_oclock.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002856.html +md5 973f6d25a6f0990720b98a15c9436b92 oclock-1.0.4.tar.bz2 +sha1 0bc8f3f44290950f60af894e20e0ceb0c5e8e862 oclock-1.0.4.tar.bz2 +sha256 cc20cfc1c0d5128d89e1eecd9ba52e58f111075be163e0aeda5690dbaafbaefe oclock-1.0.4.tar.bz2 +sha512 6e0d36a84572a153226b2929f2253cb7adc3c9e5e3af168aeaf8c487ade2e43517b271a8e9cdb2a2c4a67ca56ed0b99c194ca63a4a822b68bfc72ca6518335e7 oclock-1.0.4.tar.bz2 +# Locally computed +sha256 f6cae4b0c603ef5bd76da2df96b38aa43aa7547e482adb8cb8b83f09af35e4a2 COPYING diff --git a/package/x11r7/xapp_oclock/xapp_oclock.mk b/package/x11r7/xapp_oclock/xapp_oclock.mk new file mode 100644 index 00000000..0f94cf8c --- /dev/null +++ b/package/x11r7/xapp_oclock/xapp_oclock.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xapp_oclock +# +################################################################################ + +XAPP_OCLOCK_VERSION = 1.0.4 +XAPP_OCLOCK_SOURCE = oclock-$(XAPP_OCLOCK_VERSION).tar.bz2 +XAPP_OCLOCK_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_OCLOCK_LICENSE = MIT +XAPP_OCLOCK_LICENSE_FILES = COPYING +XAPP_OCLOCK_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXmu +XAPP_OCLOCK_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +ifeq ($(BR2_PACKAGE_XLIB_LIBXKBFILE),y) +XAPP_OCLOCK_CONF_OPTS += --with-xkb +XAPP_OCLOCK_DEPENDENCIES += xlib_libxkbfile +else +XAPP_OCLOCK_CONF_OPTS += --without-xkb +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_rgb/Config.in b/package/x11r7/xapp_rgb/Config.in new file mode 100644 index 00000000..7198b5f1 --- /dev/null +++ b/package/x11r7/xapp_rgb/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_RGB + bool "rgb" + select BR2_PACKAGE_XORGPROTO + help + uncompile an rgb color-name database diff --git a/package/x11r7/xapp_rgb/xapp_rgb.hash b/package/x11r7/xapp_rgb/xapp_rgb.hash new file mode 100644 index 00000000..ce05454c --- /dev/null +++ b/package/x11r7/xapp_rgb/xapp_rgb.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2014-November/002494.html +sha256 bbca7c6aa59939b9f6a0fb9fff15dfd62176420ffd4ae30c8d92a6a125fbe6b0 rgb-1.0.6.tar.bz2 +# Locally computed +sha256 1d08eb3384f5dedc7735bcfae1aa58cb64643ca9389edce3312b1c3cefbfdaa7 COPYING diff --git a/package/x11r7/xapp_rgb/xapp_rgb.mk b/package/x11r7/xapp_rgb/xapp_rgb.mk new file mode 100644 index 00000000..b2d5d777 --- /dev/null +++ b/package/x11r7/xapp_rgb/xapp_rgb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_rgb +# +################################################################################ + +XAPP_RGB_VERSION = 1.0.6 +XAPP_RGB_SOURCE = rgb-$(XAPP_RGB_VERSION).tar.bz2 +XAPP_RGB_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_RGB_LICENSE = MIT +XAPP_RGB_LICENSE_FILES = COPYING +XAPP_RGB_DEPENDENCIES = xorgproto host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_rstart/Config.in b/package/x11r7/xapp_rstart/Config.in new file mode 100644 index 00000000..3c1d5a9e --- /dev/null +++ b/package/x11r7/xapp_rstart/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_RSTART + bool "rstart" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + help + X.Org rstart application diff --git a/package/x11r7/xapp_rstart/xapp_rstart.hash b/package/x11r7/xapp_rstart/xapp_rstart.hash new file mode 100644 index 00000000..e87424cb --- /dev/null +++ b/package/x11r7/xapp_rstart/xapp_rstart.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2013-February/002168.html +sha256 29134e9fdffc8d6ac6904c293b392ba6a493ce571fbd2015485b19a8e4d0ffeb rstart-1.0.5.tar.bz2 +# Locally computed +sha256 7561fa083e87cd511669d8725ebe89dde6cd4f72cdea35b817262dc6ad6fbe9a COPYING diff --git a/package/x11r7/xapp_rstart/xapp_rstart.mk b/package/x11r7/xapp_rstart/xapp_rstart.mk new file mode 100644 index 00000000..2bcc2923 --- /dev/null +++ b/package/x11r7/xapp_rstart/xapp_rstart.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_rstart +# +################################################################################ + +XAPP_RSTART_VERSION = 1.0.5 +XAPP_RSTART_SOURCE = rstart-$(XAPP_RSTART_VERSION).tar.bz2 +XAPP_RSTART_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_RSTART_LICENSE = MIT +XAPP_RSTART_LICENSE_FILES = COPYING +XAPP_RSTART_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_scripts/Config.in b/package/x11r7/xapp_scripts/Config.in new file mode 100644 index 00000000..691f0e21 --- /dev/null +++ b/package/x11r7/xapp_scripts/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_SCRIPTS + bool "scripts" + select BR2_PACKAGE_XLIB_LIBX11 + help + start an X program on a remote machine diff --git a/package/x11r7/xapp_scripts/xapp_scripts.hash b/package/x11r7/xapp_scripts/xapp_scripts.hash new file mode 100644 index 00000000..cc561eb2 --- /dev/null +++ b/package/x11r7/xapp_scripts/xapp_scripts.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 1b154b4359302ca499818c45396325aef9ff364d6ff4ce5c3769e4803994a136 scripts-1.0.1.tar.bz2 +sha256 27d8cbdcde7a0bd062ce49cdf8c672201452a64e3e6823f09b1beffe2c4b8eff COPYING diff --git a/package/x11r7/xapp_scripts/xapp_scripts.mk b/package/x11r7/xapp_scripts/xapp_scripts.mk new file mode 100644 index 00000000..5146db57 --- /dev/null +++ b/package/x11r7/xapp_scripts/xapp_scripts.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_scripts +# +################################################################################ + +XAPP_SCRIPTS_VERSION = 1.0.1 +XAPP_SCRIPTS_SOURCE = scripts-$(XAPP_SCRIPTS_VERSION).tar.bz2 +XAPP_SCRIPTS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_SCRIPTS_LICENSE = MIT +XAPP_SCRIPTS_LICENSE_FILES = COPYING +XAPP_SCRIPTS_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_sessreg/Config.in b/package/x11r7/xapp_sessreg/Config.in new file mode 100644 index 00000000..c9048b3b --- /dev/null +++ b/package/x11r7/xapp_sessreg/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_SESSREG + bool "sessreg" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XORGPROTO + help + manage utmp/wtmp entries for non-init clients diff --git a/package/x11r7/xapp_sessreg/xapp_sessreg.hash b/package/x11r7/xapp_sessreg/xapp_sessreg.hash new file mode 100644 index 00000000..12a7d368 --- /dev/null +++ b/package/x11r7/xapp_sessreg/xapp_sessreg.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-June/002994.html +md5 92be564d4be7d8aa7b5024057b715210 sessreg-1.1.2.tar.bz2 +sha1 169c1ff9fb152b4b4ca0cfbd3e1aee33af042016 sessreg-1.1.2.tar.bz2 +sha256 dfcb9e954273ace63879aec053c7880466f8755752a35aa9ced3fa5f04fd2c33 sessreg-1.1.2.tar.bz2 +sha512 7e3c2bdcadb7133aace463b58d8c6108d315ec95d2a42509073eeddc7f02644092a4b3168bd3b426c041736a016291092e0bf8368acd620dbeff96d53d12f98c sessreg-1.1.2.tar.bz2 +# Locally computed +sha256 ac8f5cc696e6c473aea4caaf18650316dc8912fcf0f370cae1df5f395cea8631 COPYING diff --git a/package/x11r7/xapp_sessreg/xapp_sessreg.mk b/package/x11r7/xapp_sessreg/xapp_sessreg.mk new file mode 100644 index 00000000..7f488e24 --- /dev/null +++ b/package/x11r7/xapp_sessreg/xapp_sessreg.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_sessreg +# +################################################################################ + +XAPP_SESSREG_VERSION = 1.1.2 +XAPP_SESSREG_SOURCE = sessreg-$(XAPP_SESSREG_VERSION).tar.bz2 +XAPP_SESSREG_SITE = https://xorg.freedesktop.org/archive/individual/app +XAPP_SESSREG_LICENSE = MIT +XAPP_SESSREG_LICENSE_FILES = COPYING +XAPP_SESSREG_DEPENDENCIES = xlib_libX11 xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_setxkbmap/Config.in b/package/x11r7/xapp_setxkbmap/Config.in new file mode 100644 index 00000000..2b1389c7 --- /dev/null +++ b/package/x11r7/xapp_setxkbmap/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_SETXKBMAP + bool "setxkbmap" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + Controls the keyboard layout of a running X server. diff --git a/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.hash b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.hash new file mode 100644 index 00000000..4f963593 --- /dev/null +++ b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-July/003007.html +md5 93e736c98fb75856ee8227a0c49a128d setxkbmap-1.3.2.tar.bz2 +sha1 44783734bc58fca93165a20da0bb3eca1ccb9ad9 setxkbmap-1.3.2.tar.bz2 +sha256 8ff27486442725e50b02d7049152f51d125ecad71b7ce503cfa09d5d8ceeb9f5 setxkbmap-1.3.2.tar.bz2 +sha512 bfa8015dee0d8d3fdbbd89afbd71c8606ce168d6edca8521d5ed05a00fecbea39bc4bfcce84b71458bdeb34c60bd80a5df27e0691ccee3966443ecdc937faf38 setxkbmap-1.3.2.tar.bz2 +# Locally computed +sha256 afb8ce58340b6a6b85b73e256425263ce46f5a427279785e275991cb660cce82 COPYING diff --git a/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk new file mode 100644 index 00000000..8b697475 --- /dev/null +++ b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_setxkbmap +# +################################################################################ + +XAPP_SETXKBMAP_VERSION = 1.3.2 +XAPP_SETXKBMAP_SOURCE = setxkbmap-$(XAPP_SETXKBMAP_VERSION).tar.bz2 +XAPP_SETXKBMAP_SITE = https://xorg.freedesktop.org/archive/individual/app +XAPP_SETXKBMAP_LICENSE = MIT +XAPP_SETXKBMAP_LICENSE_FILES = COPYING +XAPP_SETXKBMAP_DEPENDENCIES = xlib_libX11 xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_showfont/Config.in b/package/x11r7/xapp_showfont/Config.in new file mode 100644 index 00000000..edfab3fc --- /dev/null +++ b/package/x11r7/xapp_showfont/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_SHOWFONT + bool "showfont" + select BR2_PACKAGE_XLIB_LIBFS + help + font dumper for X font server diff --git a/package/x11r7/xapp_showfont/xapp_showfont.hash b/package/x11r7/xapp_showfont/xapp_showfont.hash new file mode 100644 index 00000000..ff35e9c9 --- /dev/null +++ b/package/x11r7/xapp_showfont/xapp_showfont.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2014-December/002513.html +sha256 e9735c1c530b8a52edfab7415cc0fd7f8d2889095114f4cb689a27476461ac89 showfont-1.0.5.tar.bz2 +# Locally computed +sha256 c32217021e0507207e2ee6da3fcee3d9e32816003a7153b3357c08cdc97934a8 COPYING diff --git a/package/x11r7/xapp_showfont/xapp_showfont.mk b/package/x11r7/xapp_showfont/xapp_showfont.mk new file mode 100644 index 00000000..c0b8c9a3 --- /dev/null +++ b/package/x11r7/xapp_showfont/xapp_showfont.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_showfont +# +################################################################################ + +XAPP_SHOWFONT_VERSION = 1.0.5 +XAPP_SHOWFONT_SOURCE = showfont-$(XAPP_SHOWFONT_VERSION).tar.bz2 +XAPP_SHOWFONT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_SHOWFONT_LICENSE = MIT +XAPP_SHOWFONT_LICENSE_FILES = COPYING +XAPP_SHOWFONT_DEPENDENCIES = xlib_libFS + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_smproxy/Config.in b/package/x11r7/xapp_smproxy/Config.in new file mode 100644 index 00000000..80ab984e --- /dev/null +++ b/package/x11r7/xapp_smproxy/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_SMPROXY + bool "smproxy" + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXT + help + Session Manager Proxy diff --git a/package/x11r7/xapp_smproxy/xapp_smproxy.hash b/package/x11r7/xapp_smproxy/xapp_smproxy.hash new file mode 100644 index 00000000..db9dd27a --- /dev/null +++ b/package/x11r7/xapp_smproxy/xapp_smproxy.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002564.html +sha256 6cf19155a2752237f36dbf8bc4184465ea190d2652f887faccb4e2a6ebf77266 smproxy-1.0.6.tar.bz2 +# Locally computed +sha256 92dce6d8a1fcc0c6b5e56dc44e431e7f73bfa2ed5e83295662aa314067a671d8 COPYING diff --git a/package/x11r7/xapp_smproxy/xapp_smproxy.mk b/package/x11r7/xapp_smproxy/xapp_smproxy.mk new file mode 100644 index 00000000..f51c1ec0 --- /dev/null +++ b/package/x11r7/xapp_smproxy/xapp_smproxy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_smproxy +# +################################################################################ + +XAPP_SMPROXY_VERSION = 1.0.6 +XAPP_SMPROXY_SOURCE = smproxy-$(XAPP_SMPROXY_VERSION).tar.bz2 +XAPP_SMPROXY_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_SMPROXY_LICENSE = MIT +XAPP_SMPROXY_LICENSE_FILES = COPYING +XAPP_SMPROXY_DEPENDENCIES = xlib_libXmu xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_twm/Config.in b/package/x11r7/xapp_twm/Config.in new file mode 100644 index 00000000..25bf800f --- /dev/null +++ b/package/x11r7/xapp_twm/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_TWM + bool "twm" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXMU + help + No description available diff --git a/package/x11r7/xapp_twm/xapp_twm.hash b/package/x11r7/xapp_twm/xapp_twm.hash new file mode 100644 index 00000000..26661f1f --- /dev/null +++ b/package/x11r7/xapp_twm/xapp_twm.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2020-June/003047.html +sha256 f4e8a842dec410e79741f25ed4dfac09df080835d0bba2e3983b5914569b68c7 twm-1.0.11.tar.xz +sha512 948034bba23e6b6c4412fcd2e46bb11a9980297601218a54a5055165ab0229a44dde0d50f338b24e82d76f390597e2fa09d11ff7f3fe1b1d736b10083c7da20d twm-1.0.11.tar.xz +# Locally computed +sha256 4809ffc9656bc9a704e19ab467d1cedc97c48c9d1f9a4018e6d99d2e61f75945 COPYING diff --git a/package/x11r7/xapp_twm/xapp_twm.mk b/package/x11r7/xapp_twm/xapp_twm.mk new file mode 100644 index 00000000..46d4ca33 --- /dev/null +++ b/package/x11r7/xapp_twm/xapp_twm.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_twm +# +################################################################################ + +XAPP_TWM_VERSION = 1.0.11 +XAPP_TWM_SOURCE = twm-$(XAPP_TWM_VERSION).tar.xz +XAPP_TWM_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_TWM_LICENSE = MIT +XAPP_TWM_LICENSE_FILES = COPYING +XAPP_TWM_DEPENDENCIES = \ + host-bison xlib_libX11 xlib_libXext xlib_libXt xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_viewres/Config.in b/package/x11r7/xapp_viewres/Config.in new file mode 100644 index 00000000..32827c80 --- /dev/null +++ b/package/x11r7/xapp_viewres/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_VIEWRES + bool "viewres" + select BR2_PACKAGE_XLIB_LIBXAW + help + graphical class browser for Xt diff --git a/package/x11r7/xapp_viewres/xapp_viewres.hash b/package/x11r7/xapp_viewres/xapp_viewres.hash new file mode 100644 index 00000000..9b40c0a5 --- /dev/null +++ b/package/x11r7/xapp_viewres/xapp_viewres.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-August/003020.html +md5 38e6568271d8098327706c5cf855dbc7 viewres-1.0.6.tar.bz2 +sha1 f1d12e5b4e1180916edb44234599a486b025b480 viewres-1.0.6.tar.bz2 +sha256 11c15db02066c1d5fc3febf9b185d16c1112f87e37c4b101a484dcefffb80934 viewres-1.0.6.tar.bz2 +sha512 3f4cfc61608bc6c9b35ef66ceb473661ca01946d3306d54040d32803e8e0eec506a0ce37ea22bfe514544a6ba9645fd30f39b20c063aff696b3c0fda3fe95dff viewres-1.0.6.tar.bz2 +# Locally computed +sha256 aefb540c54bc95c68702cd2ae668c559e63cc1a84f55ae5c0e78547e7d75d2d5 COPYING diff --git a/package/x11r7/xapp_viewres/xapp_viewres.mk b/package/x11r7/xapp_viewres/xapp_viewres.mk new file mode 100644 index 00000000..2e05a6e7 --- /dev/null +++ b/package/x11r7/xapp_viewres/xapp_viewres.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_viewres +# +################################################################################ + +XAPP_VIEWRES_VERSION = 1.0.6 +XAPP_VIEWRES_SOURCE = viewres-$(XAPP_VIEWRES_VERSION).tar.bz2 +XAPP_VIEWRES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_VIEWRES_LICENSE = MIT +XAPP_VIEWRES_LICENSE_FILES = COPYING +XAPP_VIEWRES_DEPENDENCIES = xlib_libXaw +XAPP_VIEWRES_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_x11perf/Config.in b/package/x11r7/xapp_x11perf/Config.in new file mode 100644 index 00000000..0f1eca89 --- /dev/null +++ b/package/x11r7/xapp_x11perf/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_X11PERF + bool "x11perf" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXFT + help + summarize x11perf results diff --git a/package/x11r7/xapp_x11perf/xapp_x11perf.hash b/package/x11r7/xapp_x11perf/xapp_x11perf.hash new file mode 100644 index 00000000..b472c21b --- /dev/null +++ b/package/x11r7/xapp_x11perf/xapp_x11perf.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002983.html +md5 e96b56756990c56c24d2d02c2964456b x11perf-1.6.1.tar.bz2 +sha1 c54ebef80b6cb565397fe2e3069e0d7470027e5a x11perf-1.6.1.tar.bz2 +sha256 1c7e0b8ffc2794b4ccf11e04d551823abe0ea47b4f7db0637390db6fbe817c34 x11perf-1.6.1.tar.bz2 +sha512 b386151bfe3d7c04ab9953ae1882f3c5b627d6d1afb9a8cfe87c58236a88883fc11bbadb2226b9aa61df84b4fce625a1c9e3d146a124ac17e8d7d605b35d9c0b x11perf-1.6.1.tar.bz2 +# Locally computed +sha256 f467ff659142e2eb4cb7275c48c789d249af398b09a405d3e181dcc339b3b922 COPYING diff --git a/package/x11r7/xapp_x11perf/xapp_x11perf.mk b/package/x11r7/xapp_x11perf/xapp_x11perf.mk new file mode 100644 index 00000000..ec10590b --- /dev/null +++ b/package/x11r7/xapp_x11perf/xapp_x11perf.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_x11perf +# +################################################################################ + +XAPP_X11PERF_VERSION = 1.6.1 +XAPP_X11PERF_SOURCE = x11perf-$(XAPP_X11PERF_VERSION).tar.bz2 +XAPP_X11PERF_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_X11PERF_LICENSE = MIT +XAPP_X11PERF_LICENSE_FILES = COPYING +XAPP_X11PERF_DEPENDENCIES = xlib_libX11 xlib_libXmu xlib_libXft + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xauth/Config.in b/package/x11r7/xapp_xauth/Config.in new file mode 100644 index 00000000..919fd50b --- /dev/null +++ b/package/x11r7/xapp_xauth/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XAUTH + bool "xauth" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAU + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXMU + help + X authority file utility diff --git a/package/x11r7/xapp_xauth/xapp_xauth.hash b/package/x11r7/xapp_xauth/xapp_xauth.hash new file mode 100644 index 00000000..0251c083 --- /dev/null +++ b/package/x11r7/xapp_xauth/xapp_xauth.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-July/003005.html +md5 e50587c1bb832aafd1a19d91a0890a0b xauth-1.1.tar.bz2 +sha1 16180e36d75a23cb182cb91e78f24273f1a63967 xauth-1.1.tar.bz2 +sha256 6d1dd1b79dd185107c5b0fdd22d1d791ad749ad6e288d0cdf80964c4ffa7530c xauth-1.1.tar.bz2 +sha512 b6ecd59a853a491ef45bf8cfbff63bed36645f81cb79ae9d18458b57f7502bccf92f0d979d3337578518646f680ad379e67b1dac15a927cbb11372733e7a3a0c xauth-1.1.tar.bz2 +# Locally computed +sha256 dcdf5fa36a652efbe61a21def1301739b0010334ae3f049f1cff433221a8c7a5 COPYING diff --git a/package/x11r7/xapp_xauth/xapp_xauth.mk b/package/x11r7/xapp_xauth/xapp_xauth.mk new file mode 100644 index 00000000..cd900f00 --- /dev/null +++ b/package/x11r7/xapp_xauth/xapp_xauth.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xauth +# +################################################################################ + +XAPP_XAUTH_VERSION = 1.1 +XAPP_XAUTH_SOURCE = xauth-$(XAPP_XAUTH_VERSION).tar.bz2 +XAPP_XAUTH_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XAUTH_LICENSE = MIT +XAPP_XAUTH_LICENSE_FILES = COPYING +XAPP_XAUTH_DEPENDENCIES = xlib_libX11 xlib_libXau xlib_libXext xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xbacklight/Config.in b/package/x11r7/xapp_xbacklight/Config.in new file mode 100644 index 00000000..5764056d --- /dev/null +++ b/package/x11r7/xapp_xbacklight/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XBACKLIGHT + bool "xbacklight" + select BR2_PACKAGE_XCB_UTIL + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXRENDER + help + xbacklight diff --git a/package/x11r7/xapp_xbacklight/xapp_xbacklight.hash b/package/x11r7/xapp_xbacklight/xapp_xbacklight.hash new file mode 100644 index 00000000..12d20525 --- /dev/null +++ b/package/x11r7/xapp_xbacklight/xapp_xbacklight.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-July/003008.html +md5 5b6405973db69c0443be2fba8e1a8ab7 xbacklight-1.2.3.tar.bz2 +sha1 f0a6163738143ec23542b459aef567309a119e0c xbacklight-1.2.3.tar.bz2 +sha256 3a27f324777ae99fee476cfb2f064576fb8cba4eb77f97cda37adda1c1d39ade xbacklight-1.2.3.tar.bz2 +sha512 717c87ce24634892fc4ac54fc59dcc0a5bc8f206aaf1d13410f95f7e4fe6e3dbc7ff8d951bcd8ea8c5e955357a00fea6ceadd4559e60b1a632e40f71290e12c7 xbacklight-1.2.3.tar.bz2 +# Locally computed +sha256 c9fbf1f272215babef31808c1235de8e4f7641ca5edfc4fc615b6556054b2b04 COPYING diff --git a/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk b/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk new file mode 100644 index 00000000..d52d562c --- /dev/null +++ b/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xbacklight +# +################################################################################ + +XAPP_XBACKLIGHT_VERSION = 1.2.3 +XAPP_XBACKLIGHT_SOURCE = xbacklight-$(XAPP_XBACKLIGHT_VERSION).tar.bz2 +XAPP_XBACKLIGHT_SITE = https://xorg.freedesktop.org/archive/individual/app +XAPP_XBACKLIGHT_LICENSE = MIT +XAPP_XBACKLIGHT_LICENSE_FILES = COPYING +XAPP_XBACKLIGHT_DEPENDENCIES = xlib_libX11 xlib_libXrandr xlib_libXrender xcb-util + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xbiff/Config.in b/package/x11r7/xapp_xbiff/Config.in new file mode 100644 index 00000000..ea4b58aa --- /dev/null +++ b/package/x11r7/xapp_xbiff/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XBIFF + bool "xbiff" + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XDATA_XBITMAPS + help + mailbox flag for X diff --git a/package/x11r7/xapp_xbiff/xapp_xbiff.hash b/package/x11r7/xapp_xbiff/xapp_xbiff.hash new file mode 100644 index 00000000..9c646785 --- /dev/null +++ b/package/x11r7/xapp_xbiff/xapp_xbiff.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-July/003009.html +md5 66dd3ebd6351b1911b831b89b2dba8ec xbiff-1.0.4.tar.bz2 +sha1 193c0a2be1f7f374bb9d32217a198c92a63619e8 xbiff-1.0.4.tar.bz2 +sha256 e1e1a39628a5678585008ef7fb1ff2864edaaa0e062989c2331f8c74e0fec971 xbiff-1.0.4.tar.bz2 +sha512 0fb920a08640ec59f23d8a8a47bd244565dfbaff7a21c38a8a2abe1edb5eacabc970b5dbdc409163fc444fde5b75a2dc4e0114312938efec5b77228f3bf785ac xbiff-1.0.4.tar.bz2 +# Locally computed +sha256 9b840f2e1900889124cc999f3158da2b6b07bf6d0d77bdbb01ce65d2e702dc83 COPYING diff --git a/package/x11r7/xapp_xbiff/xapp_xbiff.mk b/package/x11r7/xapp_xbiff/xapp_xbiff.mk new file mode 100644 index 00000000..2c3975c1 --- /dev/null +++ b/package/x11r7/xapp_xbiff/xapp_xbiff.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xbiff +# +################################################################################ + +XAPP_XBIFF_VERSION = 1.0.4 +XAPP_XBIFF_SOURCE = xbiff-$(XAPP_XBIFF_VERSION).tar.bz2 +XAPP_XBIFF_SITE = https://xorg.freedesktop.org/archive/individual/app +XAPP_XBIFF_LICENSE = MIT +XAPP_XBIFF_LICENSE_FILES = COPYING +XAPP_XBIFF_DEPENDENCIES = xlib_libXaw xdata_xbitmaps + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcalc/Config.in b/package/x11r7/xapp_xcalc/Config.in new file mode 100644 index 00000000..2552be02 --- /dev/null +++ b/package/x11r7/xapp_xcalc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XCALC + bool "xcalc" + select BR2_PACKAGE_XLIB_LIBXAW + help + scientific calculator for X diff --git a/package/x11r7/xapp_xcalc/xapp_xcalc.hash b/package/x11r7/xapp_xcalc/xapp_xcalc.hash new file mode 100644 index 00000000..d7fac37e --- /dev/null +++ b/package/x11r7/xapp_xcalc/xapp_xcalc.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-June/002996.html +md5 3b566e47c76356cecaa71eb431767ae1 xcalc-1.1.0.tar.bz2 +sha1 0537f7ee56558cf80133c6b49c4757c1166aaeb6 xcalc-1.1.0.tar.bz2 +sha256 d5d746954465afc3da1f355d721882806568fb04b4d059c027702c0d16a3b5eb xcalc-1.1.0.tar.bz2 +sha512 877aab7bb08f409a21c26b841f4d91eb6993914ed0d26512e47d6b3d2b3e0b231158901415a106cfb45de43f03f253bf2a8733f986538d4ee810afe0e54f98d5 xcalc-1.1.0.tar.bz2 +# Locally computed +sha256 8dd69dbec37866a41d3040c5c478aca46e0b50c30319f178064d5e2ed9d3f912 COPYING diff --git a/package/x11r7/xapp_xcalc/xapp_xcalc.mk b/package/x11r7/xapp_xcalc/xapp_xcalc.mk new file mode 100644 index 00000000..b917d9e9 --- /dev/null +++ b/package/x11r7/xapp_xcalc/xapp_xcalc.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xapp_xcalc +# +################################################################################ + +XAPP_XCALC_VERSION = 1.1.0 +XAPP_XCALC_SOURCE = xcalc-$(XAPP_XCALC_VERSION).tar.bz2 +XAPP_XCALC_SITE = https://xorg.freedesktop.org/releases/individual/app +XAPP_XCALC_LICENSE = MIT +XAPP_XCALC_LICENSE_FILES = COPYING +XAPP_XCALC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec install-data +XAPP_XCALC_DEPENDENCIES = xlib_libXaw +XAPP_XCALC_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xclipboard/Config.in b/package/x11r7/xapp_xclipboard/Config.in new file mode 100644 index 00000000..941c2197 --- /dev/null +++ b/package/x11r7/xapp_xclipboard/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XCLIPBOARD + bool "xclipboard" + select BR2_PACKAGE_XLIB_LIBXAW + help + interchange between cut buffer and selection diff --git a/package/x11r7/xapp_xclipboard/xapp_xclipboard.hash b/package/x11r7/xapp_xclipboard/xapp_xclipboard.hash new file mode 100644 index 00000000..ef45b928 --- /dev/null +++ b/package/x11r7/xapp_xclipboard/xapp_xclipboard.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002299.html +sha256 9c0e0a1f4f1d49f73c6cf3ccd27b5ca0e18afc63679f1a1ee466b1d82446ebb5 xclipboard-1.1.3.tar.bz2 +# Locally computed +sha256 f0a362fc1b8e788845b1c0ad7ba9ade58fdfb73da750c3b9780db5d70b947657 COPYING diff --git a/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk b/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk new file mode 100644 index 00000000..d77ac986 --- /dev/null +++ b/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xclipboard +# +################################################################################ + +XAPP_XCLIPBOARD_VERSION = 1.1.3 +XAPP_XCLIPBOARD_SOURCE = xclipboard-$(XAPP_XCLIPBOARD_VERSION).tar.bz2 +XAPP_XCLIPBOARD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCLIPBOARD_LICENSE = MIT +XAPP_XCLIPBOARD_LICENSE_FILES = COPYING +XAPP_XCLIPBOARD_DEPENDENCIES = xlib_libXaw xlib_libXmu xlib_libXt +XAPP_XCLIPBOARD_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xclock/Config.in b/package/x11r7/xapp_xclock/Config.in new file mode 100644 index 00000000..083a6d1e --- /dev/null +++ b/package/x11r7/xapp_xclock/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XAPP_XCLOCK + bool "xclock" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXFT + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + analog / digital clock for X diff --git a/package/x11r7/xapp_xclock/xapp_xclock.hash b/package/x11r7/xapp_xclock/xapp_xclock.hash new file mode 100644 index 00000000..881b4015 --- /dev/null +++ b/package/x11r7/xapp_xclock/xapp_xclock.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-July/003010.html +md5 437522a96f424f68fc64ed34ece9b211 xclock-1.0.9.tar.bz2 +sha1 774c711cf7ee3f601f7209bbb01ce3f0d5ddbde6 xclock-1.0.9.tar.bz2 +sha256 cf461fb2c6f2ac42c54d8429ee2010fdb9a1442a370adfbfe8a7bfaf33c123bb xclock-1.0.9.tar.bz2 +sha512 fcbac0b4ab1cea4ae0751ce1c0c6302048e5d98d459873c7580e4ca786ec49fa27f73e5831bdfe135abb5cfeabe886456276e9d01351ea7905c606f40f84522d xclock-1.0.9.tar.bz2 +# Locally computed +sha256 ee1f19f46801ef00e70498603e74df644d0b93fc82f06b55ce64c3a2c9f16e71 COPYING diff --git a/package/x11r7/xapp_xclock/xapp_xclock.mk b/package/x11r7/xapp_xclock/xapp_xclock.mk new file mode 100644 index 00000000..77cc7011 --- /dev/null +++ b/package/x11r7/xapp_xclock/xapp_xclock.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xclock +# +################################################################################ + +XAPP_XCLOCK_VERSION = 1.0.9 +XAPP_XCLOCK_SOURCE = xclock-$(XAPP_XCLOCK_VERSION).tar.bz2 +XAPP_XCLOCK_SITE = https://xorg.freedesktop.org/archive/individual/app +XAPP_XCLOCK_LICENSE = MIT +XAPP_XCLOCK_LICENSE_FILES = COPYING +XAPP_XCLOCK_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXft xlib_libXrender xlib_libxkbfile +XAPP_XCLOCK_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcmsdb/Config.in b/package/x11r7/xapp_xcmsdb/Config.in new file mode 100644 index 00000000..82c9da3a --- /dev/null +++ b/package/x11r7/xapp_xcmsdb/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XCMSDB + bool "xcmsdb" + select BR2_PACKAGE_XLIB_LIBX11 + help + Device Color Characterization utility for X Color Management + System diff --git a/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.hash b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.hash new file mode 100644 index 00000000..75a07f36 --- /dev/null +++ b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002567.html +sha256 e5585361bb8b6a05bb814a8d0e444ee93e0f00180881d3070aff4571e97f67c6 xcmsdb-1.0.5.tar.bz2 +# Locally computed +sha256 c3bd4ac91beb08fee5272b17a3ddee8d2791cc5eaee5bce5271042a45fa4fa6a COPYING diff --git a/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk new file mode 100644 index 00000000..3cccacc0 --- /dev/null +++ b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xcmsdb +# +################################################################################ + +XAPP_XCMSDB_VERSION = 1.0.5 +XAPP_XCMSDB_SOURCE = xcmsdb-$(XAPP_XCMSDB_VERSION).tar.bz2 +XAPP_XCMSDB_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCMSDB_LICENSE = MIT +XAPP_XCMSDB_LICENSE_FILES = COPYING +XAPP_XCMSDB_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcompmgr/Config.in b/package/x11r7/xapp_xcompmgr/Config.in new file mode 100644 index 00000000..b46014db --- /dev/null +++ b/package/x11r7/xapp_xcompmgr/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XAPP_XCOMPMGR + bool "xcompmgr" + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XLIB_LIBXDAMAGE + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXRENDER + help + xcompmgr is a sample compositing manager that enables basic + eye-candy effects. diff --git a/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.hash b/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.hash new file mode 100644 index 00000000..b893d018 --- /dev/null +++ b/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002989.html +md5 ef8c7d4140c11efb8de4141b3968208c xcompmgr-1.1.8.tar.bz2 +sha1 7bb28329b4bb687763df2d2c1723cb6ecb20945a xcompmgr-1.1.8.tar.bz2 +sha256 0b89daf4f060fa3fa83cca862c45d531fef7121b5d06552c1d73d396ad9a7243 xcompmgr-1.1.8.tar.bz2 +sha512 ccf29426ffb0797a53653d1ce152de5eee0cec284811fed4b8e634ea0d948180531e4619d96f47e4f9594432c57322624fe0fdaee2c9200efac427fc0904953d xcompmgr-1.1.8.tar.bz2 +# Locally computed +sha256 c843545f72771b3ff95eb88defc2e3ed8f9a1802d9bb6c32c196bb5eec3d3a5d COPYING diff --git a/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.mk b/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.mk new file mode 100644 index 00000000..24ebad7b --- /dev/null +++ b/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xapp_xcompmgr +# +################################################################################ + +XAPP_XCOMPMGR_VERSION = 1.1.8 +XAPP_XCOMPMGR_SOURCE = xcompmgr-$(XAPP_XCOMPMGR_VERSION).tar.bz2 +XAPP_XCOMPMGR_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCOMPMGR_LICENSE = MIT +XAPP_XCOMPMGR_LICENSE_FILES = COPYING +XAPP_XCOMPMGR_DEPENDENCIES = \ + xlib_libXcomposite \ + xlib_libXdamage \ + xlib_libXext \ + xlib_libXfixes \ + xlib_libXrender + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xconsole/Config.in b/package/x11r7/xapp_xconsole/Config.in new file mode 100644 index 00000000..3d796bd3 --- /dev/null +++ b/package/x11r7/xapp_xconsole/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XAPP_XCONSOLE + bool "xconsole" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XORGPROTO + help + xconsole - monitor system console messages with X diff --git a/package/x11r7/xapp_xconsole/xapp_xconsole.hash b/package/x11r7/xapp_xconsole/xapp_xconsole.hash new file mode 100644 index 00000000..5d6c2ac8 --- /dev/null +++ b/package/x11r7/xapp_xconsole/xapp_xconsole.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2017-January/002774.html +sha256 d1144882df207378381bc83927906559defbf7b83a01d52c50ad44234c5851e0 xconsole-1.0.7.tar.bz2 +# Locally computed +sha256 a29ea5dbcde7ba1695c95949be6303d1ca1de0b7786a38b60f33eccf03506f9d COPYING diff --git a/package/x11r7/xapp_xconsole/xapp_xconsole.mk b/package/x11r7/xapp_xconsole/xapp_xconsole.mk new file mode 100644 index 00000000..ddec4cfa --- /dev/null +++ b/package/x11r7/xapp_xconsole/xapp_xconsole.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xapp_xconsole +# +################################################################################ + +XAPP_XCONSOLE_VERSION = 1.0.7 +XAPP_XCONSOLE_SOURCE = xconsole-$(XAPP_XCONSOLE_VERSION).tar.bz2 +XAPP_XCONSOLE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCONSOLE_LICENSE = MIT +XAPP_XCONSOLE_LICENSE_FILES = COPYING +XAPP_XCONSOLE_DEPENDENCIES = \ + xlib_libX11 xlib_libXaw xlib_libXt xorgproto \ + xlib_libXmu +XAPP_XCONSOLE_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcursorgen/Config.in b/package/x11r7/xapp_xcursorgen/Config.in new file mode 100644 index 00000000..c47ec28f --- /dev/null +++ b/package/x11r7/xapp_xcursorgen/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XCURSORGEN + bool "xcursorgen" + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXCURSOR + help + create an X cursor file from a collection of PNG images diff --git a/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.hash b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.hash new file mode 100644 index 00000000..51031d62 --- /dev/null +++ b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-January/002936.html +md5 25cc7ca1ce5dcbb61c2b471c55e686b5 xcursorgen-1.0.7.tar.bz2 +sha1 109367eb23b0ad52cf5de15f50c02ebe872698ae xcursorgen-1.0.7.tar.bz2 +sha256 35b6f844b24f1776e9006c880a745728800764dbe3b327a128772b4610d8eb3d xcursorgen-1.0.7.tar.bz2 +sha512 bd13ad23691d3daa2d5dcdc5902cf62e3dcb97a0289aff362e6cd85866a1d8cafb64f98800a75bfb4cf1f3c76244ca20201847dff594543d136d0abaec7011d2 xcursorgen-1.0.7.tar.bz2 +# Locally computed +sha256 8c773336b654442ac8018715a52be1a8254895c57c898d5387016e9488cc2009 COPYING diff --git a/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk new file mode 100644 index 00000000..bcc696b0 --- /dev/null +++ b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xapp_xcursorgen +# +################################################################################ + +XAPP_XCURSORGEN_VERSION = 1.0.7 +XAPP_XCURSORGEN_SOURCE = xcursorgen-$(XAPP_XCURSORGEN_VERSION).tar.bz2 +XAPP_XCURSORGEN_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCURSORGEN_LICENSE = MIT +XAPP_XCURSORGEN_LICENSE_FILES = COPYING +XAPP_XCURSORGEN_DEPENDENCIES = libpng xlib_libX11 xlib_libXcursor +HOST_XAPP_XCURSORGEN_DEPENDENCIES = \ + host-libpng host-xlib_libX11 host-xlib_libXcursor + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_xdbedizzy/Config.in b/package/x11r7/xapp_xdbedizzy/Config.in new file mode 100644 index 00000000..e4a5960f --- /dev/null +++ b/package/x11r7/xapp_xdbedizzy/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XDBEDIZZY + bool "xdbedizzy" + select BR2_PACKAGE_XLIB_LIBXEXT + help + X.Org xdbedizzy application diff --git a/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.hash b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.hash new file mode 100644 index 00000000..88b84382 --- /dev/null +++ b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2010-October/001514.html +sha1 281bee72116311e2d8393ae53ea832e9d267eded xdbedizzy-1.1.0.tar.bz2 +# Locally computed +sha256 27d8cbdcde7a0bd062ce49cdf8c672201452a64e3e6823f09b1beffe2c4b8eff COPYING diff --git a/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk new file mode 100644 index 00000000..72d04f83 --- /dev/null +++ b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xdbedizzy +# +################################################################################ + +XAPP_XDBEDIZZY_VERSION = 1.1.0 +XAPP_XDBEDIZZY_SOURCE = xdbedizzy-$(XAPP_XDBEDIZZY_VERSION).tar.bz2 +XAPP_XDBEDIZZY_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDBEDIZZY_LICENSE = MIT +XAPP_XDBEDIZZY_LICENSE_FILES = COPYING +XAPP_XDBEDIZZY_DEPENDENCIES = xlib_libXext + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xditview/Config.in b/package/x11r7/xapp_xditview/Config.in new file mode 100644 index 00000000..22944f70 --- /dev/null +++ b/package/x11r7/xapp_xditview/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XDITVIEW + bool "xditview" + select BR2_PACKAGE_XLIB_LIBXAW + help + display ditroff output diff --git a/package/x11r7/xapp_xditview/xapp_xditview.hash b/package/x11r7/xapp_xditview/xapp_xditview.hash new file mode 100644 index 00000000..0eb3a13f --- /dev/null +++ b/package/x11r7/xapp_xditview/xapp_xditview.hash @@ -0,0 +1,7 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002570.html +md5 3a909116a3b2abe3845215cf49e09fa5 xditview-1.0.5.tar.bz2 +sha1 f06f65bca31168c86bcebd7f92dbbda08817a5cc xditview-1.0.5.tar.bz2 +sha256 eecb1ed51ab4edc7f454476d1248cfb7799a17c5679b3dd834e8b4658331c04b xditview-1.0.5.tar.bz2 +sha512 e20c903f38394b496111267e142d84d11e69a3b89f91869652d1f2ee5c997a13f90bfa2966651b42cd3979a330b348a6e397cc6a74c45b1f3f91643e7c06765d xditview-1.0.5.tar.bz2 +# Locally computed +sha256 023d879308a49249181f78bbb567e93c45138ad847fe969d191e4802e7a1a005 COPYING diff --git a/package/x11r7/xapp_xditview/xapp_xditview.mk b/package/x11r7/xapp_xditview/xapp_xditview.mk new file mode 100644 index 00000000..38871003 --- /dev/null +++ b/package/x11r7/xapp_xditview/xapp_xditview.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xditview +# +################################################################################ + +XAPP_XDITVIEW_VERSION = 1.0.5 +XAPP_XDITVIEW_SOURCE = xditview-$(XAPP_XDITVIEW_VERSION).tar.bz2 +XAPP_XDITVIEW_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDITVIEW_LICENSE = MIT +XAPP_XDITVIEW_LICENSE_FILES = COPYING +XAPP_XDITVIEW_DEPENDENCIES = xlib_libXaw +XAPP_XDITVIEW_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xdm/Config.in b/package/x11r7/xapp_xdm/Config.in new file mode 100644 index 00000000..af816a13 --- /dev/null +++ b/package/x11r7/xapp_xdm/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_XAPP_XDM + bool "xdm" + depends on BR2_USE_MMU # fork() + # Runtime dependency: can't start an X server unless there is one + depends on BR2_PACKAGE_XSERVER_XORG_SERVER + select BR2_PACKAGE_XAPP_SESSREG + select BR2_PACKAGE_XAPP_XRDB + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXDMCP + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XORGPROTO + help + X.Org xdm application diff --git a/package/x11r7/xapp_xdm/S99xdm b/package/x11r7/xapp_xdm/S99xdm new file mode 100644 index 00000000..a2c0a1de --- /dev/null +++ b/package/x11r7/xapp_xdm/S99xdm @@ -0,0 +1,25 @@ +#!/bin/sh + +XDM_BIN=/usr/bin/xdm + +case "$1" in + start) + printf "Starting XDM: " + $XDM_BIN + echo "done" + ;; + stop) + echo "Stopping XDM" + killall -q xdm + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 diff --git a/package/x11r7/xapp_xdm/xapp_xdm.hash b/package/x11r7/xapp_xdm/xapp_xdm.hash new file mode 100644 index 00000000..605be9de --- /dev/null +++ b/package/x11r7/xapp_xdm/xapp_xdm.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002959.html +md5 47c4c3bf8d59b64b64d134df8b5e5ec5 xdm-1.1.12.tar.bz2 +sha1 5cc5590e40837949b1a63cb030878f8ceebd4d85 xdm-1.1.12.tar.bz2 +sha256 0dd283f72dda098d09e2925b9278c95e21551e693a5802ab442d1b577d8327f4 xdm-1.1.12.tar.bz2 +sha512 1a4be0a070ced5db8fda6fc74794c9f9ed0cb37fa440fda6a3a7652aff62dfc3d7ba68b9facf054671ebf0f4db2a0eec29d0aa3716e3407ccd5529bac3553bdb xdm-1.1.12.tar.bz2 +# Locally computed +sha256 b33b4bebbd6511b3e15315e8e29d67f25334ee45da8b7da6e6e97c53a70c6923 COPYING diff --git a/package/x11r7/xapp_xdm/xapp_xdm.mk b/package/x11r7/xapp_xdm/xapp_xdm.mk new file mode 100644 index 00000000..3c91e215 --- /dev/null +++ b/package/x11r7/xapp_xdm/xapp_xdm.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# xapp_xdm +# +################################################################################ + +XAPP_XDM_VERSION = 1.1.12 +XAPP_XDM_SOURCE = xdm-$(XAPP_XDM_VERSION).tar.bz2 +XAPP_XDM_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDM_LICENSE = MIT +XAPP_XDM_LICENSE_FILES = COPYING +XAPP_XDM_CONF_ENV = ac_cv_file__dev_urandom=yes +XAPP_XDM_DEPENDENCIES = \ + xapp_sessreg \ + xapp_xrdb \ + xlib_libX11 \ + xlib_libXaw \ + xlib_libXdmcp \ + xlib_libXinerama \ + xlib_libXt \ + xorgproto +XAPP_XDM_CONF_OPTS = \ + --with-appdefaultdir=/usr/share/X11/app-defaults \ + --with-utmp-file=/var/adm/utmpx \ + --with-wtmp-file=/var/adm/wtmpx + +define XAPP_XDM_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/x11r7/xapp_xdm/S99xdm \ + $(TARGET_DIR)/etc/init.d/S99xdm +endef + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xdpyinfo/Config.in b/package/x11r7/xapp_xdpyinfo/Config.in new file mode 100644 index 00000000..85279038 --- /dev/null +++ b/package/x11r7/xapp_xdpyinfo/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XDPYINFO + bool "xdpyinfo" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXTST + help + display information utility for X diff --git a/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.hash b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.hash new file mode 100644 index 00000000..eb02eaed --- /dev/null +++ b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002569.html +sha256 30238ed915619e06ceb41721e5f747d67320555cc38d459e954839c189ccaf51 xdpyinfo-1.3.2.tar.bz2 +# Locally computed +sha256 49733ead65fdfa1da0d176f9b965cc08dae74d73d66c9606488d52f6fc036abf COPYING diff --git a/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk new file mode 100644 index 00000000..cf94f70b --- /dev/null +++ b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# xapp_xdpyinfo +# +################################################################################ + +XAPP_XDPYINFO_VERSION = 1.3.2 +XAPP_XDPYINFO_SOURCE = xdpyinfo-$(XAPP_XDPYINFO_VERSION).tar.bz2 +XAPP_XDPYINFO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDPYINFO_LICENSE = MIT +XAPP_XDPYINFO_LICENSE_FILES = COPYING +XAPP_XDPYINFO_CONF_OPTS = --without-xf86misc # not in BR +XAPP_XDPYINFO_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXtst \ + $(if $(BR2_PACKAGE_XLIB_LIBXI),xlib_libXi) \ + $(if $(BR2_PACKAGE_XLIB_LIBXRENDER),xlib_libXrender) \ + $(if $(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),xlib_libXcomposite) \ + $(if $(BR2_PACKAGE_XLIB_LIBXXF86VM),xlib_libXxf86vm) + +ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86DGA),y) +XAPP_XDPYINFO_DEPENDENCIES += xlib_libXxf86dga +else +XAPP_XDPYINFO_CONF_OPTS += --without-dga +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBDMX),y) +XAPP_XDPYINFO_DEPENDENCIES += xlib_libdmx +else +XAPP_XDPYINFO_CONF_OPTS += --without-dmx +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +XAPP_XDPYINFO_DEPENDENCIES += xlib_libXinerama +else +XAPP_XDPYINFO_CONF_OPTS += --without-xinerama +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xdriinfo/Config.in b/package/x11r7/xapp_xdriinfo/Config.in new file mode 100644 index 00000000..df65b491 --- /dev/null +++ b/package/x11r7/xapp_xdriinfo/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XAPP_XDRIINFO + bool "xdriinfo" + depends on BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XORGPROTO + help + query configuration information of DRI drivers + +comment "xdriinfo needs an OpenGL backend" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.hash b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.hash new file mode 100644 index 00000000..80a4ac48 --- /dev/null +++ b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002858.html +md5 480e63cd365f03eb2515a6527d5f4ca6 xdriinfo-1.0.6.tar.bz2 +sha1 11682ae1f04a311b832651d78bbf4c6ac77f0ed9 xdriinfo-1.0.6.tar.bz2 +sha256 d9ccd2c3e87899417acc9ea1f3e319a4198112babe1dc711273584f607449d51 xdriinfo-1.0.6.tar.bz2 +sha512 7ddd9e19abaef93e4d85004293528ec3814ef84c470d496dbb8dc8313d804bb7520406de8d33d2bc2b3af942bd0a5d5032a109b2726438a966af63ea680a102f xdriinfo-1.0.6.tar.bz2 +# Locally computed +sha256 de2fbb160bbb64c48975d7a3ebe3636a312b73227df1efe37488a8cecb9c1932 COPYING diff --git a/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk new file mode 100644 index 00000000..7f7aac9e --- /dev/null +++ b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xdriinfo +# +################################################################################ + +XAPP_XDRIINFO_VERSION = 1.0.6 +XAPP_XDRIINFO_SOURCE = xdriinfo-$(XAPP_XDRIINFO_VERSION).tar.bz2 +XAPP_XDRIINFO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDRIINFO_LICENSE = MIT +XAPP_XDRIINFO_LICENSE_FILES = COPYING +XAPP_XDRIINFO_DEPENDENCIES = libgl xlib_libX11 xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xedit/Config.in b/package/x11r7/xapp_xedit/Config.in new file mode 100644 index 00000000..876d5412 --- /dev/null +++ b/package/x11r7/xapp_xedit/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XEDIT + bool "xedit" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXAW + help + simple text editor for X diff --git a/package/x11r7/xapp_xedit/xapp_xedit.hash b/package/x11r7/xapp_xedit/xapp_xedit.hash new file mode 100644 index 00000000..e521e008 --- /dev/null +++ b/package/x11r7/xapp_xedit/xapp_xedit.hash @@ -0,0 +1,5 @@ +# From http://lists.x.org/archives/xorg-announce/2015-February/002535.html +sha1 f37b5d0f8ec461955f0419dbb1890d8cf63d179d xedit-1.2.2.tar.bz2 +sha256 69aa42885dfc06332ca22eb01cc7187e49206e6d65b74113a8ee4cc345fc2927 xedit-1.2.2.tar.bz2 +# Locally computed +sha256 6d3e4092277ea08fc6b3180dba061120ea53ee965afb84fce16f8ab3d35bb47a COPYING diff --git a/package/x11r7/xapp_xedit/xapp_xedit.mk b/package/x11r7/xapp_xedit/xapp_xedit.mk new file mode 100644 index 00000000..1cb99dc6 --- /dev/null +++ b/package/x11r7/xapp_xedit/xapp_xedit.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xapp_xedit +# +################################################################################ + +XAPP_XEDIT_VERSION = 1.2.2 +XAPP_XEDIT_SOURCE = xedit-$(XAPP_XEDIT_VERSION).tar.bz2 +XAPP_XEDIT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XEDIT_LICENSE = MIT +XAPP_XEDIT_LICENSE_FILES = COPYING +XAPP_XEDIT_DEPENDENCIES = xlib_libXaw + +XAPP_XEDIT_CONF_OPTS = \ + --disable-selective-werror \ + --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xev/Config.in b/package/x11r7/xapp_xev/Config.in new file mode 100644 index 00000000..864d6424 --- /dev/null +++ b/package/x11r7/xapp_xev/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XEV + bool "xev" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXRANDR + help + print contents of X events diff --git a/package/x11r7/xapp_xev/xapp_xev.hash b/package/x11r7/xapp_xev/xapp_xev.hash new file mode 100644 index 00000000..8b9a006c --- /dev/null +++ b/package/x11r7/xapp_xev/xapp_xev.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2020-July/003048.html +sha256 d700e08bfe751ed2dbf802baa204b056d0e49348b6eb3c6f9cb035d8ae4885e2 xev-1.2.4.tar.bz2 +sha512 383472ddbfad639ba46a69080ecdd11a514a0578fd32c463fae18da02e0265c944589eebf12a858994f5fd601c02a0d51517e9b3ff61c6afe740d374f02781ca xev-1.2.4.tar.bz2 +# Locally computed +sha256 9b840f2e1900889124cc999f3158da2b6b07bf6d0d77bdbb01ce65d2e702dc83 COPYING diff --git a/package/x11r7/xapp_xev/xapp_xev.mk b/package/x11r7/xapp_xev/xapp_xev.mk new file mode 100644 index 00000000..7d5f3cbb --- /dev/null +++ b/package/x11r7/xapp_xev/xapp_xev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xev +# +################################################################################ + +XAPP_XEV_VERSION = 1.2.4 +XAPP_XEV_SOURCE = xev-$(XAPP_XEV_VERSION).tar.bz2 +XAPP_XEV_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XEV_LICENSE = MIT +XAPP_XEV_LICENSE_FILES = COPYING +XAPP_XEV_DEPENDENCIES = xlib_libX11 xlib_libXrandr + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xeyes/Config.in b/package/x11r7/xapp_xeyes/Config.in new file mode 100644 index 00000000..5cf7f6c0 --- /dev/null +++ b/package/x11r7/xapp_xeyes/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XAPP_XEYES + bool "xeyes" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXT + help + X.Org xeyes application diff --git a/package/x11r7/xapp_xeyes/xapp_xeyes.hash b/package/x11r7/xapp_xeyes/xapp_xeyes.hash new file mode 100644 index 00000000..bbb6a9b0 --- /dev/null +++ b/package/x11r7/xapp_xeyes/xapp_xeyes.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002860.html +md5 6f0543ec84283df5743eeafc173bea4a xeyes-1.1.2.tar.bz2 +sha1 458987f8accdbd8abf993ee51030391cf584d2e8 xeyes-1.1.2.tar.bz2 +sha256 57bcec0d2d167af9e5d44d0dbd74c6d7c0f0591cd0608952b23c749fdd910553 xeyes-1.1.2.tar.bz2 +sha512 008d76f03ddabd3d86ad9e52a540504553b94cb7a6743b20cf08897549eb27505667365ab9af21956a1b5ec7297acca8903a326536e6195a30e643cd93297ee0 xeyes-1.1.2.tar.bz2 +# Locally computed +sha256 d8de1de40e16227d1eb4b19e95117ce3f990f71f71df096a2259b0bc9931e042 COPYING diff --git a/package/x11r7/xapp_xeyes/xapp_xeyes.mk b/package/x11r7/xapp_xeyes/xapp_xeyes.mk new file mode 100644 index 00000000..6c7f859d --- /dev/null +++ b/package/x11r7/xapp_xeyes/xapp_xeyes.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xeyes +# +################################################################################ + +XAPP_XEYES_VERSION = 1.1.2 +XAPP_XEYES_SOURCE = xeyes-$(XAPP_XEYES_VERSION).tar.bz2 +XAPP_XEYES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XEYES_LICENSE = MIT +XAPP_XEYES_LICENSE_FILES = COPYING +XAPP_XEYES_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXmu xlib_libXrender xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xf86dga/Config.in b/package/x11r7/xapp_xf86dga/Config.in new file mode 100644 index 00000000..5d812033 --- /dev/null +++ b/package/x11r7/xapp_xf86dga/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XF86DGA + bool "xf86dga" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXXF86DGA + help + test program for the XFree86-DGA extension diff --git a/package/x11r7/xapp_xf86dga/xapp_xf86dga.hash b/package/x11r7/xapp_xf86dga/xapp_xf86dga.hash new file mode 100644 index 00000000..1a82db9f --- /dev/null +++ b/package/x11r7/xapp_xf86dga/xapp_xf86dga.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2010-October/001515.html +sha1 030659e3728f5f7142e1cf727f147aceeabe4b9e xf86dga-1.0.3.tar.bz2 +# Locally computed +sha256 27d8cbdcde7a0bd062ce49cdf8c672201452a64e3e6823f09b1beffe2c4b8eff COPYING diff --git a/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk b/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk new file mode 100644 index 00000000..fe8e4278 --- /dev/null +++ b/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xapp_xf86dga +# +################################################################################ + +XAPP_XF86DGA_VERSION = 1.0.3 +XAPP_XF86DGA_SOURCE = xf86dga-$(XAPP_XF86DGA_VERSION).tar.bz2 +XAPP_XF86DGA_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XF86DGA_LICENSE = MIT +XAPP_XF86DGA_LICENSE_FILES = COPYING +XAPP_XF86DGA_DEPENDENCIES = \ + host-pkgconf \ + xlib_libX11 \ + xlib_libXxf86dga + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfd/Config.in b/package/x11r7/xapp_xfd/Config.in new file mode 100644 index 00000000..f006b1e4 --- /dev/null +++ b/package/x11r7/xapp_xfd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XFD + bool "xfd" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXFT + help + X.Org xfd application diff --git a/package/x11r7/xapp_xfd/xapp_xfd.hash b/package/x11r7/xapp_xfd/xapp_xfd.hash new file mode 100644 index 00000000..d1f5c454 --- /dev/null +++ b/package/x11r7/xapp_xfd/xapp_xfd.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002968.html +md5 f9c9f2b101a96d4b50c2a4ab9b5ab5b1 xfd-1.1.3.tar.bz2 +sha1 ca6dbe2027b205992a52c6bb717a43508f12a8c4 xfd-1.1.3.tar.bz2 +sha256 192f938ba5830e84cc807d8ead2ad9655b43eaed6500c830f3e083aad10ed958 xfd-1.1.3.tar.bz2 +sha512 68e2d4ce5e24215353b6f3231191d69639c4dd90a703e03ccf152bbfe4012da071c387ba289f918fb0336a3be9ee49dc05cbec7273fa85f5e476ead7e10795f0 xfd-1.1.3.tar.bz2 +# Locally computed +sha256 57ae10f24fc110dafb3b8d7735cf26b1905ff74e716745b2520e4ccd7751095c COPYING diff --git a/package/x11r7/xapp_xfd/xapp_xfd.mk b/package/x11r7/xapp_xfd/xapp_xfd.mk new file mode 100644 index 00000000..149e24b7 --- /dev/null +++ b/package/x11r7/xapp_xfd/xapp_xfd.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# xapp_xfd +# +################################################################################ + +XAPP_XFD_VERSION = 1.1.3 +XAPP_XFD_SOURCE = xfd-$(XAPP_XFD_VERSION).tar.bz2 +XAPP_XFD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFD_LICENSE = MIT +XAPP_XFD_LICENSE_FILES = COPYING +XAPP_XFD_DEPENDENCIES = \ + freetype \ + fontconfig \ + xlib_libXaw \ + xlib_libXft \ + $(TARGET_NLS_DEPENDENCIES) +XAPP_XFD_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults +XAPP_XFD_CONF_ENV = LIBS=$(TARGET_NLS_LIBS) + +ifeq ($(BR2_PACKAGE_XLIB_LIBXKBFILE),y) +XAPP_XFD_CONF_OPTS += --with-xkb +XAPP_XFD_DEPENDENCIES += xlib_libxkbfile +else +XAPP_XFD_CONF_OPTS += --without-xkb +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfindproxy/Config.in b/package/x11r7/xapp_xfindproxy/Config.in new file mode 100644 index 00000000..e452dc96 --- /dev/null +++ b/package/x11r7/xapp_xfindproxy/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XAPP_XFINDPROXY + bool "xfindproxy" + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XORGPROTO + help + xfindproxy utilizes the Proxy Management Protocol to + communicate with a proxy manager to locate available X11 + proxy services. diff --git a/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.hash b/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.hash new file mode 100644 index 00000000..55091ad2 --- /dev/null +++ b/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002573.html +sha256 5626bda27c7faa5cbe289a17f8552538fff08a96d542b85efdda1804ccf8a01f xfindproxy-1.0.4.tar.bz2 +# Locally computed +sha256 373984cd13212f3e2fbbcdf88694fd1f5a3658ed9184a6ac44f686fc2e8620f2 COPYING diff --git a/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.mk b/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.mk new file mode 100644 index 00000000..7832e0ca --- /dev/null +++ b/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xapp_xfindproxy +# +################################################################################ + +XAPP_XFINDPROXY_VERSION = 1.0.4 +XAPP_XFINDPROXY_SOURCE = xfindproxy-$(XAPP_XFINDPROXY_VERSION).tar.bz2 +XAPP_XFINDPROXY_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFINDPROXY_LICENSE = MIT +XAPP_XFINDPROXY_LICENSE_FILES = COPYING +XAPP_XFINDPROXY_DEPENDENCIES = \ + xlib_libICE \ + xlib_libXt \ + xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfontsel/Config.in b/package/x11r7/xapp_xfontsel/Config.in new file mode 100644 index 00000000..0c6aa379 --- /dev/null +++ b/package/x11r7/xapp_xfontsel/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XFONTSEL + bool "xfontsel" + select BR2_PACKAGE_XLIB_LIBXAW + help + point and click selection of X11 font names diff --git a/package/x11r7/xapp_xfontsel/xapp_xfontsel.hash b/package/x11r7/xapp_xfontsel/xapp_xfontsel.hash new file mode 100644 index 00000000..a09df558 --- /dev/null +++ b/package/x11r7/xapp_xfontsel/xapp_xfontsel.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002861.html +md5 13150ff98846bf6d9a14bee00697fa47 xfontsel-1.0.6.tar.bz2 +sha1 3fd8d78cc270030b41298170c3e5222065dd1cfd xfontsel-1.0.6.tar.bz2 +sha256 25aa0b7c4262f5e99c07c2b96e00e4eb25b7e53f94fa803942af9d0e8da3001c xfontsel-1.0.6.tar.bz2 +sha512 2f6bc51549a302404cdaf9a5a825add383953fcbb2a0c7076691cefd4dd7e4a3c772c047be74101c8486f75d03ce0bd3e65ede14e91732cf2a932810441c9099 xfontsel-1.0.6.tar.bz2 +# Locally computed +sha256 a27097bcc5cdf4fa5d761dd4e5cea1f41911c51b0a7d9da6e3a48f69d9fd0c09 COPYING diff --git a/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk b/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk new file mode 100644 index 00000000..9dea4299 --- /dev/null +++ b/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xfontsel +# +################################################################################ + +XAPP_XFONTSEL_VERSION = 1.0.6 +XAPP_XFONTSEL_SOURCE = xfontsel-$(XAPP_XFONTSEL_VERSION).tar.bz2 +XAPP_XFONTSEL_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFONTSEL_LICENSE = MIT +XAPP_XFONTSEL_LICENSE_FILES = COPYING +XAPP_XFONTSEL_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfs/Config.in b/package/x11r7/xapp_xfs/Config.in new file mode 100644 index 00000000..19e675b2 --- /dev/null +++ b/package/x11r7/xapp_xfs/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XFS + bool "xfs" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBFS + select BR2_PACKAGE_XLIB_LIBXFONT2 + select BR2_PACKAGE_XORGPROTO + help + X font server diff --git a/package/x11r7/xapp_xfs/xapp_xfs.hash b/package/x11r7/xapp_xfs/xapp_xfs.hash new file mode 100644 index 00000000..22ec25a1 --- /dev/null +++ b/package/x11r7/xapp_xfs/xapp_xfs.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2017-November/002826.html +md5 b4d2e644bfb35cae8858d2411501b07e xfs-1.2.0.tar.bz2 +sha1 00848fcc2915ed8b00e75ac311c4727327324f57 xfs-1.2.0.tar.bz2 +sha256 db2212115783498f8eeaaee1349461d6c4e9d2005e142bacd3a984fe57269860 xfs-1.2.0.tar.bz2 +sha512 557b08aa07919239ce345d60b288b886640200bb1a59649fc890c3ccaa8559cc6745189614e696ab1b390ec024b393be5493787b7b0d2b3545b342d743c2e0ef xfs-1.2.0.tar.bz2 +# Locally computed +sha256 0314ea37f40eff3c9ffe44b3924b2a768422f006a754e8286bfd1c73203d225e COPYING diff --git a/package/x11r7/xapp_xfs/xapp_xfs.mk b/package/x11r7/xapp_xfs/xapp_xfs.mk new file mode 100644 index 00000000..9177a65b --- /dev/null +++ b/package/x11r7/xapp_xfs/xapp_xfs.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xfs +# +################################################################################ + +XAPP_XFS_VERSION = 1.2.0 +XAPP_XFS_SOURCE = xfs-$(XAPP_XFS_VERSION).tar.bz2 +XAPP_XFS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFS_LICENSE = MIT +XAPP_XFS_LICENSE_FILES = COPYING +XAPP_XFS_DEPENDENCIES = xlib_libFS xlib_libXfont2 xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfsinfo/Config.in b/package/x11r7/xapp_xfsinfo/Config.in new file mode 100644 index 00000000..84c8ac13 --- /dev/null +++ b/package/x11r7/xapp_xfsinfo/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XFSINFO + bool "xfsinfo" + select BR2_PACKAGE_XLIB_LIBFS + select BR2_PACKAGE_XLIB_LIBX11 + help + X font server information utility diff --git a/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.hash b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.hash new file mode 100644 index 00000000..67480a51 --- /dev/null +++ b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002949.html +md5 0060d6151427d9e570e54fc52a88e7d7 xfsinfo-1.0.6.tar.bz2 +sha1 cbfe7470179f1ab5eecf992226dc1b28902c6b4c xfsinfo-1.0.6.tar.bz2 +sha256 8a3e8b9b9ae6ed571989d04e1846d39b9043e28f7623b500ebe1d47762c9b1d6 xfsinfo-1.0.6.tar.bz2 +sha512 901fc3817d7c95f2ba75ed0c51de91abd8efa67bbb93ad6b7d66e56a2f721af9db364e92f9ef2e719835fd48e934a5ea7402e5565c0ccd9b6b82633e869dc57b xfsinfo-1.0.6.tar.bz2 +# Locally computed +sha256 bae01fa08f30f21f9cfb75e8339d081b34e5e03d12677177f85a55b0ca41d0db COPYING diff --git a/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk new file mode 100644 index 00000000..bef9787f --- /dev/null +++ b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xfsinfo +# +################################################################################ + +XAPP_XFSINFO_VERSION = 1.0.6 +XAPP_XFSINFO_SOURCE = xfsinfo-$(XAPP_XFSINFO_VERSION).tar.bz2 +XAPP_XFSINFO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFSINFO_LICENSE = MIT +XAPP_XFSINFO_LICENSE_FILES = COPYING +XAPP_XFSINFO_DEPENDENCIES = xlib_libFS xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xgamma/Config.in b/package/x11r7/xapp_xgamma/Config.in new file mode 100644 index 00000000..b20a7840 --- /dev/null +++ b/package/x11r7/xapp_xgamma/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XGAMMA + bool "xgamma" + select BR2_PACKAGE_XLIB_LIBXXF86VM + help + Alter a monitor's gamma correction through the X server diff --git a/package/x11r7/xapp_xgamma/xapp_xgamma.hash b/package/x11r7/xapp_xgamma/xapp_xgamma.hash new file mode 100644 index 00000000..0031450c --- /dev/null +++ b/package/x11r7/xapp_xgamma/xapp_xgamma.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002574.html +sha256 0ef1c35b5c18b1b22317f455c8df13c0a471a8efad63c89c98ae3ce8c2b222d3 xgamma-1.0.6.tar.bz2 +# Locally computed +sha256 78d354d348feaaab8d67a220e84137ec24fece04af4dface2e67132c72e216a2 COPYING diff --git a/package/x11r7/xapp_xgamma/xapp_xgamma.mk b/package/x11r7/xapp_xgamma/xapp_xgamma.mk new file mode 100644 index 00000000..a73a29e5 --- /dev/null +++ b/package/x11r7/xapp_xgamma/xapp_xgamma.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xgamma +# +################################################################################ + +XAPP_XGAMMA_VERSION = 1.0.6 +XAPP_XGAMMA_SOURCE = xgamma-$(XAPP_XGAMMA_VERSION).tar.bz2 +XAPP_XGAMMA_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XGAMMA_LICENSE = MIT +XAPP_XGAMMA_LICENSE_FILES = COPYING +XAPP_XGAMMA_DEPENDENCIES = xlib_libXxf86vm + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xgc/Config.in b/package/x11r7/xapp_xgc/Config.in new file mode 100644 index 00000000..98faba88 --- /dev/null +++ b/package/x11r7/xapp_xgc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XGC + bool "xgc" + select BR2_PACKAGE_XLIB_LIBXAW + help + X graphics demo diff --git a/package/x11r7/xapp_xgc/xapp_xgc.hash b/package/x11r7/xapp_xgc/xapp_xgc.hash new file mode 100644 index 00000000..50e1362b --- /dev/null +++ b/package/x11r7/xapp_xgc/xapp_xgc.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002575.html +sha256 14828d9bda358ad57efc0206bc416ee33ba542091edb186485cca5389adc2f5e xgc-1.0.5.tar.bz2 +# Locally computed +sha256 13ebeb3e59e406064d46e94a707ed5ec5d8d2bf840971265dd46db0850d22d02 COPYING diff --git a/package/x11r7/xapp_xgc/xapp_xgc.mk b/package/x11r7/xapp_xgc/xapp_xgc.mk new file mode 100644 index 00000000..41d42c46 --- /dev/null +++ b/package/x11r7/xapp_xgc/xapp_xgc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xgc +# +################################################################################ + +XAPP_XGC_VERSION = 1.0.5 +XAPP_XGC_SOURCE = xgc-$(XAPP_XGC_VERSION).tar.bz2 +XAPP_XGC_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XGC_LICENSE = MIT +XAPP_XGC_LICENSE_FILES = COPYING +XAPP_XGC_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xhost/Config.in b/package/x11r7/xapp_xhost/Config.in new file mode 100644 index 00000000..659b34de --- /dev/null +++ b/package/x11r7/xapp_xhost/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XHOST + bool "xhost" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + Controls host and/or user access to a running X server. diff --git a/package/x11r7/xapp_xhost/xapp_xhost.hash b/package/x11r7/xapp_xhost/xapp_xhost.hash new file mode 100644 index 00000000..0c387944 --- /dev/null +++ b/package/x11r7/xapp_xhost/xapp_xhost.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002950.html +md5 a48c72954ae6665e0616f6653636da8c xhost-1.0.8.tar.bz2 +sha1 971670858a464d4f8eeb6f4e182f9fcd94149790 xhost-1.0.8.tar.bz2 +sha256 a2dc3c579e13674947395ef8ccc1b3763f89012a216c2cc6277096489aadc396 xhost-1.0.8.tar.bz2 +sha512 55581f9bc45a70a73b13fe718ca83c4cb0a6116d26addc0f07659ebeb5bf7d2379e84cab5a1702ae77a298a66f42ae03f41ddc7d5acd61c6f18448e58ad7cb6b xhost-1.0.8.tar.bz2 +# Locally computed +sha256 7e69bed6fcfff05ecf454d7e4b29cd265172385833f1978f04b638f92f2cfecf COPYING diff --git a/package/x11r7/xapp_xhost/xapp_xhost.mk b/package/x11r7/xapp_xhost/xapp_xhost.mk new file mode 100644 index 00000000..e9fb1552 --- /dev/null +++ b/package/x11r7/xapp_xhost/xapp_xhost.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xhost +# +################################################################################ + +XAPP_XHOST_VERSION = 1.0.8 +XAPP_XHOST_SOURCE = xhost-$(XAPP_XHOST_VERSION).tar.bz2 +XAPP_XHOST_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XHOST_LICENSE = MIT +XAPP_XHOST_LICENSE_FILES = COPYING +XAPP_XHOST_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xinit/Config.in b/package/x11r7/xapp_xinit/Config.in new file mode 100644 index 00000000..d9fb1c5f --- /dev/null +++ b/package/x11r7/xapp_xinit/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XAPP_XINIT + bool "xinit" + depends on BR2_USE_MMU # fork() + # Runtime dependency: can't start an X server unless there is one + depends on BR2_PACKAGE_XSERVER_XORG_SERVER + # Runtime dependency; mcookie is also in util-linux + select BR2_PACKAGE_MCOOKIE if !BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_XAPP_XAUTH + select BR2_PACKAGE_XLIB_LIBX11 + help + X Window System initializer diff --git a/package/x11r7/xapp_xinit/xapp_xinit.hash b/package/x11r7/xapp_xinit/xapp_xinit.hash new file mode 100644 index 00000000..076bd647 --- /dev/null +++ b/package/x11r7/xapp_xinit/xapp_xinit.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002962.html +md5 6d506ab2efc17a08e87778654e099d37 xinit-1.4.1.tar.bz2 +sha1 d874a2eecf2c30291e327851b151fdab8183260c xinit-1.4.1.tar.bz2 +sha256 de9b8f617b68a70f6caf87da01fcf0ebd2b75690cdcba9c921d0ef54fa54abb9 xinit-1.4.1.tar.bz2 +sha512 6cbc5d025a891c419f3f4493381b2fca57a67d78df866d2f16a83426f86bad6eca7f240fac12b25cbcc63df0fec41f625407184e044898602d66483715315340 xinit-1.4.1.tar.bz2 +# Locally computed +sha256 c47001aa217d4ae7787121d80634db4bdba564e49a0ecab8d48b1bdc4edee1c7 COPYING diff --git a/package/x11r7/xapp_xinit/xapp_xinit.mk b/package/x11r7/xapp_xinit/xapp_xinit.mk new file mode 100644 index 00000000..86a4d926 --- /dev/null +++ b/package/x11r7/xapp_xinit/xapp_xinit.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xinit +# +################################################################################ + +XAPP_XINIT_VERSION = 1.4.1 +XAPP_XINIT_SOURCE = xinit-$(XAPP_XINIT_VERSION).tar.bz2 +XAPP_XINIT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XINIT_DEPENDENCIES = xapp_xauth xlib_libX11 +XAPP_XINIT_LICENSE = MIT +XAPP_XINIT_LICENSE_FILES = COPYING +XAPP_XINIT_CONF_OPTS = MCOOKIE=/usr/bin/mcookie + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xinput-calibrator/Config.in b/package/x11r7/xapp_xinput-calibrator/Config.in new file mode 100644 index 00000000..76fbcd43 --- /dev/null +++ b/package/x11r7/xapp_xinput-calibrator/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_XAPP_XINPUT_CALIBRATOR + bool "xinput-calibrator" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + help + A generic touchscreen calibration program for X.Org. + + http://www.freedesktop.org/wiki/Software/xinput_calibrator + +comment "xinput-calibrator needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.hash b/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.hash new file mode 100644 index 00000000..b8fcaed0 --- /dev/null +++ b/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 baa4ddca49ec94c27ba4c715bfa26692fec1132103e927213c3169e475d3d971 xinput_calibrator-0.7.5.tar.gz +sha256 ba6f260bba7d9640cfedfde3a6ae1790583ab8b9ee7c547233ecc0a214d1a6d3 COPYING diff --git a/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.mk b/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.mk new file mode 100644 index 00000000..974b83df --- /dev/null +++ b/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xinput-calibrator +# +################################################################################ + +XAPP_XINPUT_CALIBRATOR_VERSION = 0.7.5 +XAPP_XINPUT_CALIBRATOR_SOURCE = xinput_calibrator-$(XAPP_XINPUT_CALIBRATOR_VERSION).tar.gz +XAPP_XINPUT_CALIBRATOR_SITE = http://github.com/downloads/tias/xinput_calibrator +XAPP_XINPUT_CALIBRATOR_LICENSE = MIT +XAPP_XINPUT_CALIBRATOR_LICENSE_FILES = COPYING +XAPP_XINPUT_CALIBRATOR_DEPENDENCIES = xlib_libX11 xlib_libXi + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xinput/Config.in b/package/x11r7/xapp_xinput/Config.in new file mode 100644 index 00000000..e438a45b --- /dev/null +++ b/package/x11r7/xapp_xinput/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XINPUT + bool "xinput" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXINERAMA + help + xinput diff --git a/package/x11r7/xapp_xinput/xapp_xinput.hash b/package/x11r7/xapp_xinput/xapp_xinput.hash new file mode 100644 index 00000000..456a58c7 --- /dev/null +++ b/package/x11r7/xapp_xinput/xapp_xinput.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-July/003013.html +md5 ac6b7432726008b2f50eba82b0e2dbe4 xinput-1.6.3.tar.bz2 +sha1 92ea7dfb3d8465921b0dca85da7d5b01cedae6c8 xinput-1.6.3.tar.bz2 +sha256 35a281dd3b9b22ea85e39869bb7670ba78955d5fec17c6ef7165d61e5aeb66ed xinput-1.6.3.tar.bz2 +sha512 cb2fef866ac5a71dbca3e23b4ecadaca38e65dc1b30f8bb024bad92486554fafc472706619a1af04c746a4f53ce6aea827d694b9f4f0c7d0d46bb1da81984076 xinput-1.6.3.tar.bz2 +# Locally computed +sha256 bbd35c7a8e8c5cb073935e84b29b0c53f7131a4ef1ce737dc2be5616941e07e1 COPYING diff --git a/package/x11r7/xapp_xinput/xapp_xinput.mk b/package/x11r7/xapp_xinput/xapp_xinput.mk new file mode 100644 index 00000000..0d6c0def --- /dev/null +++ b/package/x11r7/xapp_xinput/xapp_xinput.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xinput +# +################################################################################ + +XAPP_XINPUT_VERSION = 1.6.3 +XAPP_XINPUT_SOURCE = xinput-$(XAPP_XINPUT_VERSION).tar.bz2 +XAPP_XINPUT_SITE = https://xorg.freedesktop.org/archive/individual/app +XAPP_XINPUT_LICENSE = MIT +XAPP_XINPUT_LICENSE_FILES = COPYING +XAPP_XINPUT_DEPENDENCIES = xlib_libX11 xlib_libXi xlib_libXrandr xlib_libXinerama + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkbcomp/Config.in b/package/x11r7/xapp_xkbcomp/Config.in new file mode 100644 index 00000000..2b575b25 --- /dev/null +++ b/package/x11r7/xapp_xkbcomp/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XKBCOMP + bool "xkbcomp" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + compile XKB keyboard description diff --git a/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.hash b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.hash new file mode 100644 index 00000000..7191d552 --- /dev/null +++ b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2020-November/003063.html +sha256 59cce603a607a17722a0a1cf99010f4894e7812beb5d695abbc08474d59af27e xkbcomp-1.4.4.tar.bz2 +sha512 971eb06277a49083b42154472596f1452fa94cdee28bad345bbcd85b028441bfd975763c20ed92aa69d6605b3fb23d27fee89df91501963b77c863667bae41c4 xkbcomp-1.4.4.tar.bz2 +# Locally computed +sha256 f1a78f5796fe2374f2b93e579328a02283e57d2a8316484b31799b12debe7ee3 COPYING diff --git a/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk new file mode 100644 index 00000000..69d4aefb --- /dev/null +++ b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xapp_xkbcomp +# +################################################################################ + +XAPP_XKBCOMP_VERSION = 1.4.4 +XAPP_XKBCOMP_SOURCE = xkbcomp-$(XAPP_XKBCOMP_VERSION).tar.bz2 +XAPP_XKBCOMP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKBCOMP_LICENSE = MIT +XAPP_XKBCOMP_LICENSE_FILES = COPYING +XAPP_XKBCOMP_DEPENDENCIES = xlib_libX11 xlib_libxkbfile +HOST_XAPP_XKBCOMP_DEPENDENCIES = host-xlib_libX11 host-xlib_libxkbfile +XAPP_XKBCOMP_CONF_ENV = ac_cv_file___xkbparse_c=yes + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_xkbevd/Config.in b/package/x11r7/xapp_xkbevd/Config.in new file mode 100644 index 00000000..0cbb9e4f --- /dev/null +++ b/package/x11r7/xapp_xkbevd/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XKBEVD + bool "xkbevd" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + XKB event daemon diff --git a/package/x11r7/xapp_xkbevd/xapp_xkbevd.hash b/package/x11r7/xapp_xkbevd/xapp_xkbevd.hash new file mode 100644 index 00000000..c3cf2f32 --- /dev/null +++ b/package/x11r7/xapp_xkbevd/xapp_xkbevd.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002577.html +sha256 2430a2e5302a4cb4a5530c1df8cb3721a149bbf8eb377a2898921a145197f96a xkbevd-1.1.4.tar.bz2 +# Locally computed +sha256 38c6dbf8f88b1c920561ff3a4d1ffdb85c069c664f5f8b64a9adb477ef347b7c COPYING diff --git a/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk b/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk new file mode 100644 index 00000000..7a9a8fb1 --- /dev/null +++ b/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xkbevd +# +################################################################################ + +XAPP_XKBEVD_VERSION = 1.1.4 +XAPP_XKBEVD_SOURCE = xkbevd-$(XAPP_XKBEVD_VERSION).tar.bz2 +XAPP_XKBEVD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKBEVD_LICENSE = MIT +XAPP_XKBEVD_LICENSE_FILES = COPYING +XAPP_XKBEVD_DEPENDENCIES = xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkbprint/Config.in b/package/x11r7/xapp_xkbprint/Config.in new file mode 100644 index 00000000..e7a4242c --- /dev/null +++ b/package/x11r7/xapp_xkbprint/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XKBPRINT + bool "xkbprint" + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + print an XKB keyboard description diff --git a/package/x11r7/xapp_xkbprint/xapp_xkbprint.hash b/package/x11r7/xapp_xkbprint/xapp_xkbprint.hash new file mode 100644 index 00000000..c7e0747f --- /dev/null +++ b/package/x11r7/xapp_xkbprint/xapp_xkbprint.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-November/003030.html +md5 9c34da77363dc3d0f616980da87244bf xkbprint-1.0.5.tar.bz2 +sha1 e707caffb3c680b3a869a776aa3f80caeac9e9c3 xkbprint-1.0.5.tar.bz2 +sha256 5b58fe834f0822f06d63d283fac404098c6d3f6acce61888b81016f1c41023fa xkbprint-1.0.5.tar.bz2 +sha512 ac3870352f3a595b5b8a8cb64f39e9bea81b17572c73cfbf72482477a2f576d0ffcdcf735cb3c66b8a88a7fe0f7aece6738cbac87df5641e44fae1ab9b97111f xkbprint-1.0.5.tar.bz2 +# Locally computed +sha256 79b32f28f7f5063054a564e1fdeee56f82a525b6516303704a1f70e55fe7197e COPYING diff --git a/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk b/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk new file mode 100644 index 00000000..8643cb42 --- /dev/null +++ b/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xkbprint +# +################################################################################ + +XAPP_XKBPRINT_VERSION = 1.0.5 +XAPP_XKBPRINT_SOURCE = xkbprint-$(XAPP_XKBPRINT_VERSION).tar.bz2 +XAPP_XKBPRINT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKBPRINT_LICENSE = MIT +XAPP_XKBPRINT_LICENSE_FILES = COPYING +XAPP_XKBPRINT_DEPENDENCIES = xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkbutils/Config.in b/package/x11r7/xapp_xkbutils/Config.in new file mode 100644 index 00000000..22a819b3 --- /dev/null +++ b/package/x11r7/xapp_xkbutils/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XKBUTILS + bool "xkbutils" + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + X.Org xkbutils application diff --git a/package/x11r7/xapp_xkbutils/xapp_xkbutils.hash b/package/x11r7/xapp_xkbutils/xapp_xkbutils.hash new file mode 100644 index 00000000..2f8dbc7c --- /dev/null +++ b/package/x11r7/xapp_xkbutils/xapp_xkbutils.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2013-February/002162.html +sha256 d2a18ab90275e8bca028773c44264d2266dab70853db4321bdbc18da75148130 xkbutils-1.0.4.tar.bz2 +# Locally computed +sha256 3d67b53c085de6d475705b60855b9277afac5d4c4ec531d0ffd1ef0d00571594 COPYING diff --git a/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk b/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk new file mode 100644 index 00000000..96ca8a40 --- /dev/null +++ b/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xkbutils +# +################################################################################ + +XAPP_XKBUTILS_VERSION = 1.0.4 +XAPP_XKBUTILS_SOURCE = xkbutils-$(XAPP_XKBUTILS_VERSION).tar.bz2 +XAPP_XKBUTILS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKBUTILS_LICENSE = MIT +XAPP_XKBUTILS_LICENSE_FILES = COPYING +XAPP_XKBUTILS_DEPENDENCIES = xlib_libXaw xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkill/Config.in b/package/x11r7/xapp_xkill/Config.in new file mode 100644 index 00000000..fcab92a5 --- /dev/null +++ b/package/x11r7/xapp_xkill/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XKILL + bool "xkill" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + kill a client by its X resource diff --git a/package/x11r7/xapp_xkill/xapp_xkill.hash b/package/x11r7/xapp_xkill/xapp_xkill.hash new file mode 100644 index 00000000..06029717 --- /dev/null +++ b/package/x11r7/xapp_xkill/xapp_xkill.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002864.html +md5 938177e4472c346cf031c1aefd8934fc xkill-1.0.5.tar.bz2 +sha1 c5ee06b33adb252a41e4f737be6bd47651ff582a xkill-1.0.5.tar.bz2 +sha256 c5f0bb6a95e1ac7c4def8a657496d5d2f21ccd41eb47ef2c9ccb03fb6d6aff6b xkill-1.0.5.tar.bz2 +sha512 4603a1794f114f5cea2c885020c9d073c8421d1e785c99ff6b936ae97139c8dac8020a187b5bbd0fa6d56ed6fab879441b42ba900cc5f2f5a534dafdc86b9249 xkill-1.0.5.tar.bz2 +# Locally computed +sha256 13306c3890e4c8710bc468dee0eba7f9677cd94c7a67d2d81fa932d4f635b21f COPYING diff --git a/package/x11r7/xapp_xkill/xapp_xkill.mk b/package/x11r7/xapp_xkill/xapp_xkill.mk new file mode 100644 index 00000000..64ddbca6 --- /dev/null +++ b/package/x11r7/xapp_xkill/xapp_xkill.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xkill +# +################################################################################ + +XAPP_XKILL_VERSION = 1.0.5 +XAPP_XKILL_SOURCE = xkill-$(XAPP_XKILL_VERSION).tar.bz2 +XAPP_XKILL_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKILL_LICENSE = MIT +XAPP_XKILL_LICENSE_FILES = COPYING +XAPP_XKILL_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xload/Config.in b/package/x11r7/xapp_xload/Config.in new file mode 100644 index 00000000..25c79d2c --- /dev/null +++ b/package/x11r7/xapp_xload/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XLOAD + bool "xload" + select BR2_PACKAGE_XLIB_LIBXAW + help + system load average display for X diff --git a/package/x11r7/xapp_xload/xapp_xload.hash b/package/x11r7/xapp_xload/xapp_xload.hash new file mode 100644 index 00000000..99d9cabb --- /dev/null +++ b/package/x11r7/xapp_xload/xapp_xload.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002865.html +md5 29afafdffe97f809d43a41db9dd63f25 xload-1.1.3.tar.bz2 +sha1 fd5053d38551883309863c2a43de2ceffa908a50 xload-1.1.3.tar.bz2 +sha256 f34e4803871d771325cfe52bebd98cc5b6040d3f065184ec73de436f9a375907 xload-1.1.3.tar.bz2 +sha512 8dbc4f0cee7b30d7381be819152b27653d9b0049266e59bde2e2c972a88c4f2bdea766fc407bbdfef15d0aab30fedc756189a1048170a812853133a5094fe7a5 xload-1.1.3.tar.bz2 +# Locally computed +sha256 a09b31d26e4d2781eef1e71f39789f86cad6d81153e72064f45875910fa6258f COPYING diff --git a/package/x11r7/xapp_xload/xapp_xload.mk b/package/x11r7/xapp_xload/xapp_xload.mk new file mode 100644 index 00000000..9f491ccd --- /dev/null +++ b/package/x11r7/xapp_xload/xapp_xload.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# xapp_xload +# +################################################################################ + +XAPP_XLOAD_VERSION = 1.1.3 +XAPP_XLOAD_SOURCE = xload-$(XAPP_XLOAD_VERSION).tar.bz2 +XAPP_XLOAD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLOAD_LICENSE = MIT +XAPP_XLOAD_LICENSE_FILES = COPYING +XAPP_XLOAD_DEPENDENCIES = xlib_libXaw $(TARGET_NLS_DEPENDENCIES) +XAPP_XLOAD_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults +XAPP_XLOAD_CONF_ENV = LIBS=$(TARGET_NLS_LIBS) + +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +# musl doesn't have rwhod.h, but xload can replace it with stubs +XAPP_XLOAD_CONF_OPTS += CFLAGS="$(TARGET_CFLAGS) -DRLOADSTUB" +endif + +ifeq ($(BR2_SYSTEM_ENABLE_NLS),) +XAPP_XLOAD_CONF_ENV += ac_cv_search_gettext=no +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlogo/Config.in b/package/x11r7/xapp_xlogo/Config.in new file mode 100644 index 00000000..aacb75ff --- /dev/null +++ b/package/x11r7/xapp_xlogo/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XLOGO + bool "xlogo" + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXFT + help + X Window System logo diff --git a/package/x11r7/xapp_xlogo/xapp_xlogo.hash b/package/x11r7/xapp_xlogo/xapp_xlogo.hash new file mode 100644 index 00000000..a4aada48 --- /dev/null +++ b/package/x11r7/xapp_xlogo/xapp_xlogo.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002963.html +md5 e9d21de1dc8c8b9f854509a26a985cd7 xlogo-1.0.5.tar.bz2 +sha1 f025a0ad30c45cbec1c2f3b1610bff94fb4e9f33 xlogo-1.0.5.tar.bz2 +sha256 633d7a3aa5df61e4e643b740e5799664741ab1a0ba40593e54fcd15dc30f378e xlogo-1.0.5.tar.bz2 +sha512 0d78e269b0be3c5de71de7f362b896bfd9934ecd9d0361b3302399b1269e029c4a9f35418d792121a1edc34405d753f9d69c996cc3a69ac717f2b0d1f736406b xlogo-1.0.5.tar.bz2 +# Locally computed +sha256 972b454b6c0da17cec61225ab9dfd4afc69fd8e7e4c629497197c6f79adc6fb0 COPYING diff --git a/package/x11r7/xapp_xlogo/xapp_xlogo.mk b/package/x11r7/xapp_xlogo/xapp_xlogo.mk new file mode 100644 index 00000000..455469e1 --- /dev/null +++ b/package/x11r7/xapp_xlogo/xapp_xlogo.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xapp_xlogo +# +################################################################################ + +XAPP_XLOGO_VERSION = 1.0.5 +XAPP_XLOGO_SOURCE = xlogo-$(XAPP_XLOGO_VERSION).tar.bz2 +XAPP_XLOGO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLOGO_LICENSE = MIT +XAPP_XLOGO_LICENSE_FILES = COPYING +XAPP_XLOGO_DEPENDENCIES = \ + xlib_libXaw xlib_libXrender \ + xlib_libXft host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlsatoms/Config.in b/package/x11r7/xapp_xlsatoms/Config.in new file mode 100644 index 00000000..2ad84845 --- /dev/null +++ b/package/x11r7/xapp_xlsatoms/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XLSATOMS + bool "xlsatoms" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + list interned atoms defined on server diff --git a/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.hash b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.hash new file mode 100644 index 00000000..de7eabe3 --- /dev/null +++ b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002951.html +md5 61671fee12535347db24ec3a715032a7 xlsatoms-1.1.3.tar.bz2 +sha1 9fdb1e8df6bb08529a812ac90f63d500bf5174cc xlsatoms-1.1.3.tar.bz2 +sha256 57868f958c263976727881f3078e55b86b4a109dc578d2b92f5c6d690850a382 xlsatoms-1.1.3.tar.bz2 +sha512 c267ccfdc5a83e834bfb5c3b144e22642badcadef4eb146eeec2df6fe6f85e9379500ae4219912c70fa2e535036a1a96cf496381f5d814e79af075e03c975f30 xlsatoms-1.1.3.tar.bz2 +# Locally computed +sha256 f0a362fc1b8e788845b1c0ad7ba9ade58fdfb73da750c3b9780db5d70b947657 COPYING diff --git a/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk new file mode 100644 index 00000000..a3230fc2 --- /dev/null +++ b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xlsatoms +# +################################################################################ + +XAPP_XLSATOMS_VERSION = 1.1.3 +XAPP_XLSATOMS_SOURCE = xlsatoms-$(XAPP_XLSATOMS_VERSION).tar.bz2 +XAPP_XLSATOMS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLSATOMS_LICENSE = MIT +XAPP_XLSATOMS_LICENSE_FILES = COPYING +XAPP_XLSATOMS_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlsclients/Config.in b/package/x11r7/xapp_xlsclients/Config.in new file mode 100644 index 00000000..a934af45 --- /dev/null +++ b/package/x11r7/xapp_xlsclients/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XLSCLIENTS + bool "xlsclients" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL + help + X.Org xlsclients application diff --git a/package/x11r7/xapp_xlsclients/xapp_xlsclients.hash b/package/x11r7/xapp_xlsclients/xapp_xlsclients.hash new file mode 100644 index 00000000..a465c3ce --- /dev/null +++ b/package/x11r7/xapp_xlsclients/xapp_xlsclients.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002866.html +md5 4fa92377e0ddc137cd226a7a87b6b29a xlsclients-1.1.4.tar.bz2 +sha1 175af1c216a1db3de5023ecd6cce186e7693c6e4 xlsclients-1.1.4.tar.bz2 +sha256 773f2af49c7ea2c44fba4213bee64325875c1b3c9bc4bbcd8dac9261751809c1 xlsclients-1.1.4.tar.bz2 +sha512 42fd848d88d3cf31168a37fed63f9f5b60ddc4f36be2956b354e574c93129d75f29e005d6631784380bcef27860b54c64f419ca18ad77f092f4520dec47b10f4 xlsclients-1.1.4.tar.bz2 +# Locally computed +sha256 716d6f1d18cb97cdd4a2ef7b101d944a250ca9de57578a490c038b9aaf950648 COPYING diff --git a/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk b/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk new file mode 100644 index 00000000..167748b3 --- /dev/null +++ b/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xlsclients +# +################################################################################ + +XAPP_XLSCLIENTS_VERSION = 1.1.4 +XAPP_XLSCLIENTS_SOURCE = xlsclients-$(XAPP_XLSCLIENTS_VERSION).tar.bz2 +XAPP_XLSCLIENTS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLSCLIENTS_LICENSE = MIT +XAPP_XLSCLIENTS_LICENSE_FILES = COPYING +XAPP_XLSCLIENTS_DEPENDENCIES = xlib_libX11 xlib_libXmu libxcb xcb-util + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlsfonts/Config.in b/package/x11r7/xapp_xlsfonts/Config.in new file mode 100644 index 00000000..dab61ebf --- /dev/null +++ b/package/x11r7/xapp_xlsfonts/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XLSFONTS + bool "xlsfonts" + select BR2_PACKAGE_XLIB_LIBX11 + help + X.Org xlsfonts application diff --git a/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.hash b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.hash new file mode 100644 index 00000000..f76369f9 --- /dev/null +++ b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002867.html +md5 5774fd4f518b3f338f2b28f270e04bfc xlsfonts-1.0.6.tar.bz2 +sha1 bf95e46e0897dcb9d197ce20d4fa024b8ace5148 xlsfonts-1.0.6.tar.bz2 +sha256 89b80b3a030006ab6cef717be286c12f2477894b227158b1e6133274f6ebd368 xlsfonts-1.0.6.tar.bz2 +sha512 052a3b1dec23cb20fdfacd4500cb836feb3b888bf568a548ea71deb58a4ba10a1ad5392d658e95272c6d4a1832edf1f19c3de2498b78dca82c43ee52800a30c0 xlsfonts-1.0.6.tar.bz2 +# Locally computed +sha256 dcdf5fa36a652efbe61a21def1301739b0010334ae3f049f1cff433221a8c7a5 COPYING diff --git a/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk new file mode 100644 index 00000000..0ccd4ea6 --- /dev/null +++ b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xlsfonts +# +################################################################################ + +XAPP_XLSFONTS_VERSION = 1.0.6 +XAPP_XLSFONTS_SOURCE = xlsfonts-$(XAPP_XLSFONTS_VERSION).tar.bz2 +XAPP_XLSFONTS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLSFONTS_LICENSE = MIT +XAPP_XLSFONTS_LICENSE_FILES = COPYING +XAPP_XLSFONTS_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmag/Config.in b/package/x11r7/xapp_xmag/Config.in new file mode 100644 index 00000000..44d2c8e1 --- /dev/null +++ b/package/x11r7/xapp_xmag/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMAG + bool "xmag" + select BR2_PACKAGE_XLIB_LIBXAW + help + X.Org xmag application diff --git a/package/x11r7/xapp_xmag/xapp_xmag.hash b/package/x11r7/xapp_xmag/xapp_xmag.hash new file mode 100644 index 00000000..55a9d479 --- /dev/null +++ b/package/x11r7/xapp_xmag/xapp_xmag.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002581.html +sha256 87a2bc23b251e2d8f8370d3283a4d6c8dac98a30cb5749a04336cdb55c14e161 xmag-1.0.6.tar.bz2 +# Locally computed +sha256 ef8744e617719339c4934579f8558ee4a5aec4396bebd6af02562b63a7c16d27 COPYING diff --git a/package/x11r7/xapp_xmag/xapp_xmag.mk b/package/x11r7/xapp_xmag/xapp_xmag.mk new file mode 100644 index 00000000..113c328e --- /dev/null +++ b/package/x11r7/xapp_xmag/xapp_xmag.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xmag +# +################################################################################ + +XAPP_XMAG_VERSION = 1.0.6 +XAPP_XMAG_SOURCE = xmag-$(XAPP_XMAG_VERSION).tar.bz2 +XAPP_XMAG_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMAG_LICENSE = MIT +XAPP_XMAG_LICENSE_FILES = COPYING +XAPP_XMAG_DEPENDENCIES = xlib_libXaw +XAPP_XMAG_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xman/Config.in b/package/x11r7/xapp_xman/Config.in new file mode 100644 index 00000000..4f4f067e --- /dev/null +++ b/package/x11r7/xapp_xman/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMAN + bool "xman" + select BR2_PACKAGE_XLIB_LIBXAW + help + Manual page display program for the X Window System diff --git a/package/x11r7/xapp_xman/xapp_xman.hash b/package/x11r7/xapp_xman/xapp_xman.hash new file mode 100644 index 00000000..e4a93d17 --- /dev/null +++ b/package/x11r7/xapp_xman/xapp_xman.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-July/003011.html +md5 629436867b202098967636b17c8d303c xman-1.1.5.tar.bz2 +sha1 ec76dbd010f68974e05dfe8bc4b91731a3b7285b xman-1.1.5.tar.bz2 +sha256 4e3c2c7497e9734a6d3c8e1b6a364612892bb31e9f33076c9fdae7177ab60978 xman-1.1.5.tar.bz2 +sha512 f6b2be424a79f298bf1a81edce4172572195c9efc9454e5b7b7046f344ed08154c77ccaa763ccdf3f1a30b64aa4802783bf813ee637437ccb1fba434fc5d4400 xman-1.1.5.tar.bz2 +# Locally computed +sha256 4c3d6d6fc5661c64285931a0871728f3745d962d877477235dc66e4043db3d36 COPYING diff --git a/package/x11r7/xapp_xman/xapp_xman.mk b/package/x11r7/xapp_xman/xapp_xman.mk new file mode 100644 index 00000000..f8abfe57 --- /dev/null +++ b/package/x11r7/xapp_xman/xapp_xman.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xapp_xman +# +################################################################################ + +XAPP_XMAN_VERSION = 1.1.5 +XAPP_XMAN_SOURCE = xman-$(XAPP_XMAN_VERSION).tar.bz2 +XAPP_XMAN_SITE = https://xorg.freedesktop.org/archive/individual/app +XAPP_XMAN_LICENSE = MIT +XAPP_XMAN_LICENSE_FILES = COPYING +XAPP_XMAN_DEPENDENCIES = xlib_libXaw +XAPP_XMAN_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +XAPP_XMAN_CONF_ENV = \ + ac_cv_file__etc_man_conf=no \ + ac_cv_file__etc_man_config=no \ + ac_cv_file__etc_manpath_config=no \ + ac_cv_file__usr_share_misc_man_conf=no + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmessage/Config.in b/package/x11r7/xapp_xmessage/Config.in new file mode 100644 index 00000000..e80562ff --- /dev/null +++ b/package/x11r7/xapp_xmessage/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMESSAGE + bool "xmessage" + select BR2_PACKAGE_XLIB_LIBXAW + help + display a message or query in a window (X-based /bin/echo) diff --git a/package/x11r7/xapp_xmessage/xapp_xmessage.hash b/package/x11r7/xapp_xmessage/xapp_xmessage.hash new file mode 100644 index 00000000..b668edf6 --- /dev/null +++ b/package/x11r7/xapp_xmessage/xapp_xmessage.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002868.html +md5 e50ffae17eeb3943079620cb78f5ce0b xmessage-1.0.5.tar.bz2 +sha1 d3eca72c7173d0d9547c676a16bcec51ca1213a2 xmessage-1.0.5.tar.bz2 +sha256 373dfb81e7a6f06d3d22485a12fcde6e255d58c6dee1bbaeb00c7d0caa9b2029 xmessage-1.0.5.tar.bz2 +sha512 a8423c3986b1576fa67800c315a605a527bb9a8f594ac269a736ae7b91eed0d4d83deb89148197dc3cd3f0e51894146958ce2979f78e97dcdb99c5326e34dabe xmessage-1.0.5.tar.bz2 +# Locally computed +sha256 dfd5427188bd6d6647ad1a9a0644428403c6239f6aa7f9d1a17629d8cc0a4ecd COPYING diff --git a/package/x11r7/xapp_xmessage/xapp_xmessage.mk b/package/x11r7/xapp_xmessage/xapp_xmessage.mk new file mode 100644 index 00000000..9d426974 --- /dev/null +++ b/package/x11r7/xapp_xmessage/xapp_xmessage.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xmessage +# +################################################################################ + +XAPP_XMESSAGE_VERSION = 1.0.5 +XAPP_XMESSAGE_SOURCE = xmessage-$(XAPP_XMESSAGE_VERSION).tar.bz2 +XAPP_XMESSAGE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMESSAGE_LICENSE = MIT +XAPP_XMESSAGE_LICENSE_FILES = COPYING +XAPP_XMESSAGE_DEPENDENCIES = xlib_libXaw +XAPP_XMESSAGE_CONF_OPTS = --with-appdefaultdir=/usr/share/X11/app-defaults + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmh/Config.in b/package/x11r7/xapp_xmh/Config.in new file mode 100644 index 00000000..4e86d0f4 --- /dev/null +++ b/package/x11r7/xapp_xmh/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XMH + bool "xmh" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XDATA_XBITMAPS + help + send and read mail with an X interface to MH diff --git a/package/x11r7/xapp_xmh/xapp_xmh.hash b/package/x11r7/xapp_xmh/xapp_xmh.hash new file mode 100644 index 00000000..1dadc345 --- /dev/null +++ b/package/x11r7/xapp_xmh/xapp_xmh.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002582.html +sha256 b92f4f912a5fb6346d52cc2b639aea087b347f3b2e4e1a4fc7a165b1345f5689 xmh-1.0.3.tar.bz2 +# Locally computed +sha256 27d8cbdcde7a0bd062ce49cdf8c672201452a64e3e6823f09b1beffe2c4b8eff COPYING diff --git a/package/x11r7/xapp_xmh/xapp_xmh.mk b/package/x11r7/xapp_xmh/xapp_xmh.mk new file mode 100644 index 00000000..c18bbfe5 --- /dev/null +++ b/package/x11r7/xapp_xmh/xapp_xmh.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xmh +# +################################################################################ + +XAPP_XMH_VERSION = 1.0.3 +XAPP_XMH_SOURCE = xmh-$(XAPP_XMH_VERSION).tar.bz2 +XAPP_XMH_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMH_LICENSE = MIT +XAPP_XMH_LICENSE_FILES = COPYING +XAPP_XMH_DEPENDENCIES = xlib_libXaw xdata_xbitmaps + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmodmap/Config.in b/package/x11r7/xapp_xmodmap/Config.in new file mode 100644 index 00000000..9be79abf --- /dev/null +++ b/package/x11r7/xapp_xmodmap/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMODMAP + bool "xmodmap" + select BR2_PACKAGE_XLIB_LIBX11 + help + utility for modifying keymaps and pointer button mappings in X diff --git a/package/x11r7/xapp_xmodmap/xapp_xmodmap.hash b/package/x11r7/xapp_xmodmap/xapp_xmodmap.hash new file mode 100644 index 00000000..4925ec00 --- /dev/null +++ b/package/x11r7/xapp_xmodmap/xapp_xmodmap.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002952.html +md5 51f1d30a525e9903280ffeea2744b1f6 xmodmap-1.0.10.tar.bz2 +sha1 69e041f8a8c501bd1feb68805a0880633a685bc8 xmodmap-1.0.10.tar.bz2 +sha256 473f0941d7439d501bb895ff358832b936ec34c749b9704c37a15e11c318487c xmodmap-1.0.10.tar.bz2 +sha512 324c7dcef843186088f16b3bc47485eb3c9b4331e56ce43b692deb4bb3d4f4f27512480e91a379cceac8383df920dc5e37cd825246b50b6343291cec48134c04 xmodmap-1.0.10.tar.bz2 +# Locally computed +sha256 c149563cf2cb0ecfb1148b6eb8f604c62bed43452a0d0fbafb97286a97840f5c COPYING diff --git a/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk b/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk new file mode 100644 index 00000000..f3a458b7 --- /dev/null +++ b/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xmodmap +# +################################################################################ + +XAPP_XMODMAP_VERSION = 1.0.10 +XAPP_XMODMAP_SOURCE = xmodmap-$(XAPP_XMODMAP_VERSION).tar.bz2 +XAPP_XMODMAP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMODMAP_LICENSE = MIT +XAPP_XMODMAP_LICENSE_FILES = COPYING +XAPP_XMODMAP_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmore/Config.in b/package/x11r7/xapp_xmore/Config.in new file mode 100644 index 00000000..80c3950b --- /dev/null +++ b/package/x11r7/xapp_xmore/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMORE + bool "xmore" + select BR2_PACKAGE_XLIB_LIBXAW + help + plain text display program for the X Window System diff --git a/package/x11r7/xapp_xmore/xapp_xmore.hash b/package/x11r7/xapp_xmore/xapp_xmore.hash new file mode 100644 index 00000000..cd777831 --- /dev/null +++ b/package/x11r7/xapp_xmore/xapp_xmore.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002964.html +md5 8e1279352192e4142740c21db58f9be9 xmore-1.0.3.tar.bz2 +sha1 b57b92afd783d28c4c505e0c95556939f24c3ec9 xmore-1.0.3.tar.bz2 +sha256 644a1e0d5182d7708d413722d0579a587dc56b9a8cb60640df076d302e09251b xmore-1.0.3.tar.bz2 +sha512 e3e44831cd87a54bb585f80ef0d87f69dc35f6c834a73241aad9f6e2b0999b53c51a0a3f915a94ae4d6dc9bdfb9f60b6576f0bdcec441443abd98efa6c51b1d3 xmore-1.0.3.tar.bz2 +# Locally computed +sha256 27d8cbdcde7a0bd062ce49cdf8c672201452a64e3e6823f09b1beffe2c4b8eff COPYING diff --git a/package/x11r7/xapp_xmore/xapp_xmore.mk b/package/x11r7/xapp_xmore/xapp_xmore.mk new file mode 100644 index 00000000..f8a3ba8c --- /dev/null +++ b/package/x11r7/xapp_xmore/xapp_xmore.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xmore +# +################################################################################ + +XAPP_XMORE_VERSION = 1.0.3 +XAPP_XMORE_SOURCE = xmore-$(XAPP_XMORE_VERSION).tar.bz2 +XAPP_XMORE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMORE_LICENSE = MIT +XAPP_XMORE_LICENSE_FILES = COPYING +XAPP_XMORE_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xpr/Config.in b/package/x11r7/xapp_xpr/Config.in new file mode 100644 index 00000000..0710d62a --- /dev/null +++ b/package/x11r7/xapp_xpr/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XPR + bool "xpr" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + X.Org xpr application diff --git a/package/x11r7/xapp_xpr/xapp_xpr.hash b/package/x11r7/xapp_xpr/xapp_xpr.hash new file mode 100644 index 00000000..0a1b4f81 --- /dev/null +++ b/package/x11r7/xapp_xpr/xapp_xpr.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002869.html +md5 eaac255076ea351fd08d76025788d9f9 xpr-1.0.5.tar.bz2 +sha1 0632c7d8632ac9d23f285811aaea805a2956e155 xpr-1.0.5.tar.bz2 +sha256 b936e0f1f8d63f5ad097a0bbdce2e67c34f5d49b7263f32a832ff62d394d1e1f xpr-1.0.5.tar.bz2 +sha512 d5dfb936ec4ad0067d02654dec8e862fe337ff6a2c2f974b2b3a612a829c2e728a0d51e7aba00ed2a94dc96dc50cc69f2c59f522e0635013f5f4f5bb3f4ab967 xpr-1.0.5.tar.bz2 +# Locally computed +sha256 5e8ff9b5d3fc86b5d0bc5957c9ee0aa1a6d0fb9a6b116aae70762b628a0d5069 COPYING diff --git a/package/x11r7/xapp_xpr/xapp_xpr.mk b/package/x11r7/xapp_xpr/xapp_xpr.mk new file mode 100644 index 00000000..b77c5b48 --- /dev/null +++ b/package/x11r7/xapp_xpr/xapp_xpr.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xpr +# +################################################################################ + +XAPP_XPR_VERSION = 1.0.5 +XAPP_XPR_SOURCE = xpr-$(XAPP_XPR_VERSION).tar.bz2 +XAPP_XPR_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XPR_LICENSE = MIT +XAPP_XPR_LICENSE_FILES = COPYING +XAPP_XPR_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xprop/Config.in b/package/x11r7/xapp_xprop/Config.in new file mode 100644 index 00000000..314e79f6 --- /dev/null +++ b/package/x11r7/xapp_xprop/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XPROP + bool "xprop" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + property displayer for X diff --git a/package/x11r7/xapp_xprop/xapp_xprop.hash b/package/x11r7/xapp_xprop/xapp_xprop.hash new file mode 100644 index 00000000..43eed80b --- /dev/null +++ b/package/x11r7/xapp_xprop/xapp_xprop.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2020-November/003064.html +sha256 9b92ed0316bf2486121d8bac88bd1878f16b43bd335f18009b1f941f1eca93a1 xprop-1.2.5.tar.bz2 +sha512 93cfa621fa76ca6e8e780a252c508380b6dc9db39b67bfca16bb9800f0d39110f5d18189409a8577ef79e98bf5eece17f5e23f2218ca72ae8bb04ee7b429d559 xprop-1.2.5.tar.bz2 +# Locally computed +sha256 f19ff982936cca133b9593a6561c3817512207e0b4c951d0e4eb5956d30d4415 COPYING diff --git a/package/x11r7/xapp_xprop/xapp_xprop.mk b/package/x11r7/xapp_xprop/xapp_xprop.mk new file mode 100644 index 00000000..75f0d37c --- /dev/null +++ b/package/x11r7/xapp_xprop/xapp_xprop.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xprop +# +################################################################################ + +XAPP_XPROP_VERSION = 1.2.5 +XAPP_XPROP_SOURCE = xprop-$(XAPP_XPROP_VERSION).tar.bz2 +XAPP_XPROP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XPROP_LICENSE = MIT +XAPP_XPROP_LICENSE_FILES = COPYING +XAPP_XPROP_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xrandr/Config.in b/package/x11r7/xapp_xrandr/Config.in new file mode 100644 index 00000000..fe9bd4e9 --- /dev/null +++ b/package/x11r7/xapp_xrandr/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XRANDR + bool "xrandr" + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBX11 + help + primitive command line interface to RandR extension diff --git a/package/x11r7/xapp_xrandr/xapp_xrandr.hash b/package/x11r7/xapp_xrandr/xapp_xrandr.hash new file mode 100644 index 00000000..408b070d --- /dev/null +++ b/package/x11r7/xapp_xrandr/xapp_xrandr.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-August/003018.html +md5 fe40f7a4fd39dd3a02248d3e0b1972e4 xrandr-1.5.1.tar.xz +sha1 9f72957e0d2a26ece509336ea7e1529cc9ea881e xrandr-1.5.1.tar.xz +sha256 7bc76daf9d72f8aff885efad04ce06b90488a1a169d118dea8a2b661832e8762 xrandr-1.5.1.tar.xz +sha512 3d0d37e974b9dffb996276ee7fd676327fd0956e5f5f572dd142a651a35d3cdfa2f6dd415cf27bf87f306981957aba4cc014c12baebefcabaa5d66b78a114922 xrandr-1.5.1.tar.xz +# Locally computed +sha256 0dd9a3d62c48dd7b87790029e39fb5e11756d33fded3bc1644e11585c87b2038 COPYING diff --git a/package/x11r7/xapp_xrandr/xapp_xrandr.mk b/package/x11r7/xapp_xrandr/xapp_xrandr.mk new file mode 100644 index 00000000..8586c6fe --- /dev/null +++ b/package/x11r7/xapp_xrandr/xapp_xrandr.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xrandr +# +################################################################################ + +XAPP_XRANDR_VERSION = 1.5.1 +XAPP_XRANDR_SOURCE = xrandr-$(XAPP_XRANDR_VERSION).tar.xz +XAPP_XRANDR_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XRANDR_LICENSE = MIT +XAPP_XRANDR_LICENSE_FILES = COPYING +XAPP_XRANDR_DEPENDENCIES = xlib_libXrandr xlib_libX11 +XAPP_XRANDR_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xrdb/Config.in b/package/x11r7/xapp_xrdb/Config.in new file mode 100644 index 00000000..8c078570 --- /dev/null +++ b/package/x11r7/xapp_xrdb/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XRDB + bool "xrdb" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + X server resource database utility diff --git a/package/x11r7/xapp_xrdb/xapp_xrdb.hash b/package/x11r7/xapp_xrdb/xapp_xrdb.hash new file mode 100644 index 00000000..b8a6896c --- /dev/null +++ b/package/x11r7/xapp_xrdb/xapp_xrdb.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002953.html +md5 34ae801ef994d192c70fcce2bdb2a1b2 xrdb-1.2.0.tar.bz2 +sha1 79596928246288a217abdec0e4a2315ec9b07963 xrdb-1.2.0.tar.bz2 +sha256 f23a65cfa1f7126040d68b6cf1e4567523edac10f8dc06f23d840d330c7c6946 xrdb-1.2.0.tar.bz2 +sha512 14e1cdfb2152fb28f1f4641b177ab236648d7e967a95b952bf4cfce8d3e1ef085e85385354e3381aaf644462e8888a1847f755ab4016ecb4cb4a715b001dd2ef xrdb-1.2.0.tar.bz2 +# Locally computed +sha256 ca1b3e2f9f37c35876b69a9c1c5a7860fae59b7ba87a1d2dc541b722e29b1ecc COPYING diff --git a/package/x11r7/xapp_xrdb/xapp_xrdb.mk b/package/x11r7/xapp_xrdb/xapp_xrdb.mk new file mode 100644 index 00000000..b445805d --- /dev/null +++ b/package/x11r7/xapp_xrdb/xapp_xrdb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xrdb +# +################################################################################ + +XAPP_XRDB_VERSION = 1.2.0 +XAPP_XRDB_SOURCE = xrdb-$(XAPP_XRDB_VERSION).tar.bz2 +XAPP_XRDB_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XRDB_LICENSE = MIT +XAPP_XRDB_LICENSE_FILES = COPYING +XAPP_XRDB_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xrefresh/Config.in b/package/x11r7/xapp_xrefresh/Config.in new file mode 100644 index 00000000..16b1e50b --- /dev/null +++ b/package/x11r7/xapp_xrefresh/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XREFRESH + bool "xrefresh" + select BR2_PACKAGE_XLIB_LIBX11 + help + refresh all or part of an X screen diff --git a/package/x11r7/xapp_xrefresh/xapp_xrefresh.hash b/package/x11r7/xapp_xrefresh/xapp_xrefresh.hash new file mode 100644 index 00000000..8eae8ed1 --- /dev/null +++ b/package/x11r7/xapp_xrefresh/xapp_xrefresh.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002872.html +md5 c56fa4adbeed1ee5173f464a4c4a61a6 xrefresh-1.0.6.tar.bz2 +sha1 11eb5b3f905631281d2cedd86a0b666bab0d9bdc xrefresh-1.0.6.tar.bz2 +sha256 287dfb9bb7e8d780d07e672e3252150850869cb550958ed5f8401f0835cd6353 xrefresh-1.0.6.tar.bz2 +sha512 361e97fecfc2706d5eeab69df0d4dd4baa55b6783cfddabf51d8561b7c930d71ce6c217e0512c6564208d69b04f89c69ea8c0bfb2e4f6cc25b062b55e4db3674 xrefresh-1.0.6.tar.bz2 +# Locally computed +sha256 4f51c9a91cd277697cbea6604bf4cb240c1ed14cdba82550cb9cac8f1286f663 COPYING diff --git a/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk b/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk new file mode 100644 index 00000000..36a4feaa --- /dev/null +++ b/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xrefresh +# +################################################################################ + +XAPP_XREFRESH_VERSION = 1.0.6 +XAPP_XREFRESH_SOURCE = xrefresh-$(XAPP_XREFRESH_VERSION).tar.bz2 +XAPP_XREFRESH_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XREFRESH_LICENSE = MIT +XAPP_XREFRESH_LICENSE_FILES = COPYING +XAPP_XREFRESH_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xset/Config.in b/package/x11r7/xapp_xset/Config.in new file mode 100644 index 00000000..71497ab7 --- /dev/null +++ b/package/x11r7/xapp_xset/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XSET + bool "xset" + select BR2_PACKAGE_XLIB_LIBXMU + help + X.Org xset application diff --git a/package/x11r7/xapp_xset/xapp_xset.hash b/package/x11r7/xapp_xset/xapp_xset.hash new file mode 100644 index 00000000..62f951ba --- /dev/null +++ b/package/x11r7/xapp_xset/xapp_xset.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002873.html +md5 70ea7bc7bacf1a124b1692605883f620 xset-1.2.4.tar.bz2 +sha1 41a857f30ff5bb0dfbda1549bb703984344ea228 xset-1.2.4.tar.bz2 +sha256 e4fd95280df52a88e9b0abc1fee11dcf0f34fc24041b9f45a247e52df941c957 xset-1.2.4.tar.bz2 +sha512 f24714c9a82081a09d3054bbad98553de9366992f22eaf3e2bcadbb58fad1d3dad2547fef6fa9898d8a9df064573c29df9d82a5c801fa92248604c95f65dc83d xset-1.2.4.tar.bz2 +# Locally computed +sha256 6bfc619b6d37dd0e6ca575edcb3a05194136e04d1d9989b8e14e6f7850587382 COPYING diff --git a/package/x11r7/xapp_xset/xapp_xset.mk b/package/x11r7/xapp_xset/xapp_xset.mk new file mode 100644 index 00000000..9ead55a2 --- /dev/null +++ b/package/x11r7/xapp_xset/xapp_xset.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xset +# +################################################################################ + +XAPP_XSET_VERSION = 1.2.4 +XAPP_XSET_SOURCE = xset-$(XAPP_XSET_VERSION).tar.bz2 +XAPP_XSET_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSET_LICENSE = MIT +XAPP_XSET_LICENSE_FILES = COPYING +XAPP_XSET_DEPENDENCIES = xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsetmode/Config.in b/package/x11r7/xapp_xsetmode/Config.in new file mode 100644 index 00000000..a08e02d7 --- /dev/null +++ b/package/x11r7/xapp_xsetmode/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XSETMODE + bool "xsetmode" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + help + set the mode for an X Input device diff --git a/package/x11r7/xapp_xsetmode/xapp_xsetmode.hash b/package/x11r7/xapp_xsetmode/xapp_xsetmode.hash new file mode 100644 index 00000000..5d4e1645 --- /dev/null +++ b/package/x11r7/xapp_xsetmode/xapp_xsetmode.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 988b47cd922991c6e6adbce15dc386ac75690b61744b526c3af5a4eaa9afa0aa xsetmode-1.0.0.tar.bz2 +sha256 8f22998f14924220f0f530660811d24e5371a8d7672287c9d22f1eafb7256863 COPYING diff --git a/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk b/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk new file mode 100644 index 00000000..c4599a9b --- /dev/null +++ b/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xsetmode +# +################################################################################ + +XAPP_XSETMODE_VERSION = 1.0.0 +XAPP_XSETMODE_SOURCE = xsetmode-$(XAPP_XSETMODE_VERSION).tar.bz2 +XAPP_XSETMODE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSETMODE_LICENSE = MIT +XAPP_XSETMODE_LICENSE_FILES = COPYING +XAPP_XSETMODE_DEPENDENCIES = xlib_libX11 xlib_libXi + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsetpointer/Config.in b/package/x11r7/xapp_xsetpointer/Config.in new file mode 100644 index 00000000..0deb6d81 --- /dev/null +++ b/package/x11r7/xapp_xsetpointer/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XSETPOINTER + bool "xsetpointer" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XORGPROTO + help + set an X Input device as the main pointer diff --git a/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.hash b/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.hash new file mode 100644 index 00000000..8167f3d1 --- /dev/null +++ b/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.hash @@ -0,0 +1,6 @@ +# From https://lists.freedesktop.org/archives/xorg-announce/2006-November/000150.html +md5 9e5bcbeda4aaf02bfa095e41d30baee4 xsetpointer-1.0.1.tar.bz2 +sha1 a8b01c6f27625a6f6943f9be17b1e5511f69d710 xsetpointer-1.0.1.tar.bz2 +# locally computed +sha256 495d88871eb5081e98bbae55f813f73cb3ce4145d6ca3e8f2826800166c04571 xsetpointer-1.0.1.tar.bz2 +sha256 8f22998f14924220f0f530660811d24e5371a8d7672287c9d22f1eafb7256863 COPYING diff --git a/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk b/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk new file mode 100644 index 00000000..21630eb7 --- /dev/null +++ b/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xsetpointer +# +################################################################################ + +XAPP_XSETPOINTER_VERSION = 1.0.1 +XAPP_XSETPOINTER_SOURCE = xsetpointer-$(XAPP_XSETPOINTER_VERSION).tar.bz2 +XAPP_XSETPOINTER_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSETPOINTER_LICENSE = MIT +XAPP_XSETPOINTER_LICENSE_FILES = COPYING +XAPP_XSETPOINTER_DEPENDENCIES = xlib_libX11 xlib_libXi xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsetroot/Config.in b/package/x11r7/xapp_xsetroot/Config.in new file mode 100644 index 00000000..a70df80d --- /dev/null +++ b/package/x11r7/xapp_xsetroot/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XSETROOT + bool "xsetroot" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XDATA_XBITMAPS + help + X.Org xsetroot application diff --git a/package/x11r7/xapp_xsetroot/xapp_xsetroot.hash b/package/x11r7/xapp_xsetroot/xapp_xsetroot.hash new file mode 100644 index 00000000..7cbabb5c --- /dev/null +++ b/package/x11r7/xapp_xsetroot/xapp_xsetroot.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002874.html +md5 5fe769c8777a6e873ed1305e4ce2c353 xsetroot-1.1.2.tar.bz2 +sha1 42ab81761823b44974feab86477007c49dbace50 xsetroot-1.1.2.tar.bz2 +sha256 10c442ba23591fb5470cea477a0aa5f679371f4f879c8387a1d9d05637ae417c xsetroot-1.1.2.tar.bz2 +sha512 0b9df1b72305e5c24f1e1664578aa4411a5ffcdc5d318458117594e641f01c34700205b0d16c08abf4a8106d36128ccdbe1ea1f1035fce9018d6b52801a8b72b xsetroot-1.1.2.tar.bz2 +# Locally computed +sha256 48e9c9572e0dc1c14b93b753542f780e7751dd7f035816374d8a8be0211a4520 COPYING diff --git a/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk b/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk new file mode 100644 index 00000000..98ba344c --- /dev/null +++ b/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xsetroot +# +################################################################################ + +XAPP_XSETROOT_VERSION = 1.1.2 +XAPP_XSETROOT_SOURCE = xsetroot-$(XAPP_XSETROOT_VERSION).tar.bz2 +XAPP_XSETROOT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSETROOT_LICENSE = MIT +XAPP_XSETROOT_LICENSE_FILES = COPYING +XAPP_XSETROOT_DEPENDENCIES = xlib_libX11 xlib_libXmu xlib_libXcursor xdata_xbitmaps + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsm/Config.in b/package/x11r7/xapp_xsm/Config.in new file mode 100644 index 00000000..88f20cf6 --- /dev/null +++ b/package/x11r7/xapp_xsm/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XSM + bool "xsm" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXAW + help + X Session Manager diff --git a/package/x11r7/xapp_xsm/xapp_xsm.hash b/package/x11r7/xapp_xsm/xapp_xsm.hash new file mode 100644 index 00000000..eda231fe --- /dev/null +++ b/package/x11r7/xapp_xsm/xapp_xsm.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002875.html +md5 bd32c14f09d58f46084b6a8f20e6e8f1 xsm-1.0.4.tar.bz2 +sha1 dd41234e276fe8b2d0a853879568f73b6d98812a xsm-1.0.4.tar.bz2 +sha256 9934b6893a4e52cf7435368fc8d425c371b5e32d96e420ead30166eb82d64425 xsm-1.0.4.tar.bz2 +sha512 d4e4da7c309a4eae126d2b58a13684f4dbc06b09f76dde9c89c707375df2843614f3d83bc44f9cd02f239200db3397abd86796dca0dbafc69f60482b0af5a176 xsm-1.0.4.tar.bz2 +# Locally computed +sha256 27d8cbdcde7a0bd062ce49cdf8c672201452a64e3e6823f09b1beffe2c4b8eff COPYING diff --git a/package/x11r7/xapp_xsm/xapp_xsm.mk b/package/x11r7/xapp_xsm/xapp_xsm.mk new file mode 100644 index 00000000..6d752b4d --- /dev/null +++ b/package/x11r7/xapp_xsm/xapp_xsm.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xsm +# +################################################################################ + +XAPP_XSM_VERSION = 1.0.4 +XAPP_XSM_SOURCE = xsm-$(XAPP_XSM_VERSION).tar.bz2 +XAPP_XSM_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSM_LICENSE = MIT +XAPP_XSM_LICENSE_FILES = COPYING +XAPP_XSM_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xstdcmap/Config.in b/package/x11r7/xapp_xstdcmap/Config.in new file mode 100644 index 00000000..f15c36b8 --- /dev/null +++ b/package/x11r7/xapp_xstdcmap/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XSTDCMAP + bool "xstdcmap" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + X standard colormap utility diff --git a/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.hash b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.hash new file mode 100644 index 00000000..fc067850 --- /dev/null +++ b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002954.html +md5 da67142c128d18386ff145882e0afc66 xstdcmap-1.0.4.tar.bz2 +sha1 a5eff72ba31625e5b11506add800140019a39636 xstdcmap-1.0.4.tar.bz2 +sha256 06898b3f1eaad0b205ff3c75bdefa3207868b889d4cb37b32b8267b2bbfe6f8b xstdcmap-1.0.4.tar.bz2 +sha512 2adbb0aec1766341e04090efa962241ff6c9e32c612851b7221cec0ee16852107d406a08ec5251070f39df882c13e3c8c9edcd88f278187a9f373e1727643a8f xstdcmap-1.0.4.tar.bz2 +# Locally computed +sha256 f0a362fc1b8e788845b1c0ad7ba9ade58fdfb73da750c3b9780db5d70b947657 COPYING diff --git a/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk new file mode 100644 index 00000000..dd5b0ee3 --- /dev/null +++ b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xstdcmap +# +################################################################################ + +XAPP_XSTDCMAP_VERSION = 1.0.4 +XAPP_XSTDCMAP_SOURCE = xstdcmap-$(XAPP_XSTDCMAP_VERSION).tar.bz2 +XAPP_XSTDCMAP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSTDCMAP_LICENSE = MIT +XAPP_XSTDCMAP_LICENSE_FILES = COPYING +XAPP_XSTDCMAP_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xvidtune/Config.in b/package/x11r7/xapp_xvidtune/Config.in new file mode 100644 index 00000000..b1902cd9 --- /dev/null +++ b/package/x11r7/xapp_xvidtune/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XVIDTUNE + bool "xvidtune" + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXXF86VM + help + video mode tuner for Xorg diff --git a/package/x11r7/xapp_xvidtune/xapp_xvidtune.hash b/package/x11r7/xapp_xvidtune/xapp_xvidtune.hash new file mode 100644 index 00000000..ecf7d033 --- /dev/null +++ b/package/x11r7/xapp_xvidtune/xapp_xvidtune.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002129.html +sha256 24e5e103933a04bfb2e1d18562619ed74031ab515e7343eb546bacdbcbeecf01 xvidtune-1.0.3.tar.bz2 +# Locally computed +sha256 f3da8eaed19e27e4f67e6f076d4ebdb8d649e15a8ad33a415fb65a23de1b6689 COPYING diff --git a/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk b/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk new file mode 100644 index 00000000..d7c4d5bf --- /dev/null +++ b/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xvidtune +# +################################################################################ + +XAPP_XVIDTUNE_VERSION = 1.0.3 +XAPP_XVIDTUNE_SOURCE = xvidtune-$(XAPP_XVIDTUNE_VERSION).tar.bz2 +XAPP_XVIDTUNE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XVIDTUNE_LICENSE = MIT +XAPP_XVIDTUNE_LICENSE_FILES = COPYING +XAPP_XVIDTUNE_DEPENDENCIES = xlib_libXaw xlib_libXxf86vm + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xvinfo/Config.in b/package/x11r7/xapp_xvinfo/Config.in new file mode 100644 index 00000000..2612c047 --- /dev/null +++ b/package/x11r7/xapp_xvinfo/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XVINFO + bool "xvinfo" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXV + help + Print out X-Video extension adaptor information diff --git a/package/x11r7/xapp_xvinfo/xapp_xvinfo.hash b/package/x11r7/xapp_xvinfo/xapp_xvinfo.hash new file mode 100644 index 00000000..405fc36e --- /dev/null +++ b/package/x11r7/xapp_xvinfo/xapp_xvinfo.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002955.html +md5 b13afec137b9b331814a9824ab03ec80 xvinfo-1.1.4.tar.bz2 +sha1 136a70a72b23c81f4fe8f4c8cb7073316be16b44 xvinfo-1.1.4.tar.bz2 +sha256 0353220d6606077ba42363db65f50410759f9815352f77adc799e2adfa76e73f xvinfo-1.1.4.tar.bz2 +sha512 85e1f936c5c826f0fdde3670bd77d5cde8641c6e8e7849e42142e91b5aa01d7e0e60d2b064eb6fef4f5666321813ca2dc9f9656756ccbe6dcda37b119ee8a63e xvinfo-1.1.4.tar.bz2 +# Locally computed +sha256 7725b0484faa1832534814ecb577f5a86acc74f1bcce25f92c55dfc1b693717d COPYING diff --git a/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk b/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk new file mode 100644 index 00000000..7b3b97f0 --- /dev/null +++ b/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xvinfo +# +################################################################################ + +XAPP_XVINFO_VERSION = 1.1.4 +XAPP_XVINFO_SOURCE = xvinfo-$(XAPP_XVINFO_VERSION).tar.bz2 +XAPP_XVINFO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XVINFO_LICENSE = MIT +XAPP_XVINFO_LICENSE_FILES = COPYING +XAPP_XVINFO_DEPENDENCIES = xlib_libX11 xlib_libXv + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xwd/Config.in b/package/x11r7/xapp_xwd/Config.in new file mode 100644 index 00000000..ada4820f --- /dev/null +++ b/package/x11r7/xapp_xwd/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XWD + bool "xwd" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXKBFILE + select BR2_PACKAGE_XLIB_LIBXMU + help + dump an image of an X window diff --git a/package/x11r7/xapp_xwd/xapp_xwd.hash b/package/x11r7/xapp_xwd/xapp_xwd.hash new file mode 100644 index 00000000..606618bc --- /dev/null +++ b/package/x11r7/xapp_xwd/xapp_xwd.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002876.html +md5 11794a8eba6d295a192a8975287fd947 xwd-1.0.7.tar.bz2 +sha1 65ce0617be29687cf6082c3a0e85d15a0dcccda9 xwd-1.0.7.tar.bz2 +sha256 cd6815b8b9e0b98e284d3d732fb12162159cb9dcee4f45a7d4c0bd8b308a6794 xwd-1.0.7.tar.bz2 +sha512 6fdb0a115ae505169bbc7fcc45580daf26bced2e26e0bf9a877636016038931a8386e8edcbe015f4024be508d0461906adef4834cf22a445e3c282f0b8fad17e xwd-1.0.7.tar.bz2 +# Locally computed +sha256 7cfda56afd92a1ecd2f23bd0064e01b5141053390d854785504adfe2c0fbd946 COPYING diff --git a/package/x11r7/xapp_xwd/xapp_xwd.mk b/package/x11r7/xapp_xwd/xapp_xwd.mk new file mode 100644 index 00000000..4d7ed0f8 --- /dev/null +++ b/package/x11r7/xapp_xwd/xapp_xwd.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xwd +# +################################################################################ + +XAPP_XWD_VERSION = 1.0.7 +XAPP_XWD_SOURCE = xwd-$(XAPP_XWD_VERSION).tar.bz2 +XAPP_XWD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XWD_LICENSE = MIT +XAPP_XWD_LICENSE_FILES = COPYING +XAPP_XWD_DEPENDENCIES = xlib_libX11 xlib_libXmu xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xwininfo/Config.in b/package/x11r7/xapp_xwininfo/Config.in new file mode 100644 index 00000000..4e095707 --- /dev/null +++ b/package/x11r7/xapp_xwininfo/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XWININFO + bool "xwininfo" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + window information utility for X diff --git a/package/x11r7/xapp_xwininfo/xapp_xwininfo.hash b/package/x11r7/xapp_xwininfo/xapp_xwininfo.hash new file mode 100644 index 00000000..163d5cc4 --- /dev/null +++ b/package/x11r7/xapp_xwininfo/xapp_xwininfo.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-July/003012.html +md5 26d46f7ef0588d3392da3ad5802be420 xwininfo-1.1.5.tar.bz2 +sha1 9f67b1eb07c5824d437bf577cf6198962af1aeb7 xwininfo-1.1.5.tar.bz2 +sha256 7a405441dfc476666c744f5fcd1bc8a75abf8b5b1d85db7b88b370982365080e xwininfo-1.1.5.tar.bz2 +sha512 a3268bbeeeeafac94e589fdd47554a965910d40df7cc3d9c36c7c24fa4f5dd49615484d5916ccb41efca9cd4cf9d8981a4c60953b921220b3f4f57f9cce0e1a6 xwininfo-1.1.5.tar.bz2 +# Locally computed +sha256 443d675237c023a47e4886506b72796afbb2633394812027f91d6e8fa433b2af COPYING diff --git a/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk b/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk new file mode 100644 index 00000000..9652487a --- /dev/null +++ b/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xwininfo +# +################################################################################ + +XAPP_XWININFO_VERSION = 1.1.5 +XAPP_XWININFO_SOURCE = xwininfo-$(XAPP_XWININFO_VERSION).tar.bz2 +XAPP_XWININFO_SITE = https://xorg.freedesktop.org/archive/individual/app +XAPP_XWININFO_LICENSE = MIT +XAPP_XWININFO_LICENSE_FILES = COPYING +XAPP_XWININFO_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xwud/Config.in b/package/x11r7/xapp_xwud/Config.in new file mode 100644 index 00000000..cb8337e9 --- /dev/null +++ b/package/x11r7/xapp_xwud/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XWUD + bool "xwud" + select BR2_PACKAGE_XLIB_LIBX11 + help + image displayer for X diff --git a/package/x11r7/xapp_xwud/xapp_xwud.hash b/package/x11r7/xapp_xwud/xapp_xwud.hash new file mode 100644 index 00000000..e4205781 --- /dev/null +++ b/package/x11r7/xapp_xwud/xapp_xwud.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002878.html +md5 79972093bb0766fcd0223b2bd6d11932 xwud-1.0.5.tar.bz2 +sha1 a85d84a1b81f8e667ea6ac126d447590c93eb079 xwud-1.0.5.tar.bz2 +sha256 99997051f8a892313f22edf41dab45864e86e7062ee9012d5dbb6a40fc6b10a9 xwud-1.0.5.tar.bz2 +sha512 27a0ce7481978ae6cd94b0d94374af72185e270d68f2496620e148bb00945427c4827138d9efc48745e6382e3da3390ed0cdff7dbd02dcf9706e8ecccae97184 xwud-1.0.5.tar.bz2 +# Locally computed +sha256 be3db9aa060c462490a8c1ed44a4d059b32bba359f4688b1ecf3f794d363539e COPYING diff --git a/package/x11r7/xapp_xwud/xapp_xwud.mk b/package/x11r7/xapp_xwud/xapp_xwud.mk new file mode 100644 index 00000000..2c2e1ad4 --- /dev/null +++ b/package/x11r7/xapp_xwud/xapp_xwud.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xwud +# +################################################################################ + +XAPP_XWUD_VERSION = 1.0.5 +XAPP_XWUD_SOURCE = xwud-$(XAPP_XWUD_VERSION).tar.bz2 +XAPP_XWUD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XWUD_LICENSE = MIT +XAPP_XWUD_LICENSE_FILES = COPYING +XAPP_XWUD_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-proto/Config.in b/package/x11r7/xcb-proto/Config.in new file mode 100644 index 00000000..a4c93831 --- /dev/null +++ b/package/x11r7/xcb-proto/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XCB_PROTO + bool "xcb-proto" + help + The protocol headers that define XCB. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-proto/xcb-proto.hash b/package/x11r7/xcb-proto/xcb-proto.hash new file mode 100644 index 00000000..e6bc2379 --- /dev/null +++ b/package/x11r7/xcb-proto/xcb-proto.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2020-October/003061.html +sha256 f04add9a972ac334ea11d9d7eb4fc7f8883835da3e4859c9afa971efdf57fcc3 xcb-proto-1.14.1.tar.xz +sha512 140fbf48483bacc7f6b70fdcf76f9e4ff0e87df9cb3a071cea47d8fe4574407cdefcfbd674099014d297e5fc010748e71d8609fca4cc32e8b25c634f928b727d xcb-proto-1.14.1.tar.xz +# Locally computed +sha256 c5ffbfeaa501071ceeb97b7de2c0d703fdaa35de01c0fb6cbac1c28453a3e9fd COPYING diff --git a/package/x11r7/xcb-proto/xcb-proto.mk b/package/x11r7/xcb-proto/xcb-proto.mk new file mode 100644 index 00000000..64190c81 --- /dev/null +++ b/package/x11r7/xcb-proto/xcb-proto.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# xcb-proto +# +################################################################################ + +XCB_PROTO_VERSION = 1.14.1 +XCB_PROTO_SOURCE = xcb-proto-$(XCB_PROTO_VERSION).tar.xz +XCB_PROTO_SITE = https://xorg.freedesktop.org/archive/individual/proto +XCB_PROTO_LICENSE = MIT +XCB_PROTO_LICENSE_FILES = COPYING + +XCB_PROTO_INSTALL_STAGING = YES + +XCB_PROTO_DEPENDENCIES = host-python3 +HOST_XCB_PROTO_DEPENDENCIES = host-python3 + +# Force detection of Buildroot host-python3 over system python +XCB_PROTO_CONF_OPTS += ac_cv_path_PYTHON=$(HOST_DIR)/bin/python3 +HOST_XCB_PROTO_CONF_OPTS += ac_cv_path_PYTHON=$(HOST_DIR)/bin/python3 + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xcb-util-cursor/Config.in b/package/x11r7/xcb-util-cursor/Config.in new file mode 100644 index 00000000..aa81615c --- /dev/null +++ b/package/x11r7/xcb-util-cursor/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_XCB_UTIL_CURSOR + bool "xcb-util-cursor" + depends on BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL + select BR2_PACKAGE_XCB_UTIL_IMAGE + select BR2_PACKAGE_XCB_UTIL_RENDERUTIL + help + The XCB util modules provides a number of libraries which + sit on top of libxcb, the core X protocol library, and some + of the extension libraries. These experimental libraries + provide convenience functions and interfaces which make the + raw X protocol more usable. Some of the libraries also + provide client-side code which is not strictly part of the X + protocol but which have traditionally been provided by Xlib. + + XCB util-cursor module provides the following libraries: + - cursor: port of libxcursor + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-cursor/xcb-util-cursor.hash b/package/x11r7/xcb-util-cursor/xcb-util-cursor.hash new file mode 100644 index 00000000..1964624d --- /dev/null +++ b/package/x11r7/xcb-util-cursor/xcb-util-cursor.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2016-May/002691.html +sha1 26562eb6d4151307f7b6a53453d360ecfc0563ac xcb-util-cursor-0.1.3.tar.bz2 +# Locally computed +sha256 0dde91ae1d443105dc9e13cbaed6674c36683b7095836ad9ddfce26be270aad5 COPYING diff --git a/package/x11r7/xcb-util-cursor/xcb-util-cursor.mk b/package/x11r7/xcb-util-cursor/xcb-util-cursor.mk new file mode 100644 index 00000000..07b37c5e --- /dev/null +++ b/package/x11r7/xcb-util-cursor/xcb-util-cursor.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xcb-util-cursor +# +################################################################################ + +XCB_UTIL_CURSOR_VERSION = 0.1.3 +XCB_UTIL_CURSOR_SITE = http://xcb.freedesktop.org/dist +XCB_UTIL_CURSOR_SOURCE = xcb-util-cursor-$(XCB_UTIL_CURSOR_VERSION).tar.bz2 +XCB_UTIL_CURSOR_LICENSE = MIT +XCB_UTIL_CURSOR_LICENSE_FILES = COPYING +XCB_UTIL_CURSOR_INSTALL_STAGING = YES +XCB_UTIL_CURSOR_DEPENDENCIES = xcb-util xcb-util-image xcb-util-renderutil + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-image/Config.in b/package/x11r7/xcb-util-image/Config.in new file mode 100644 index 00000000..c8d7ef8a --- /dev/null +++ b/package/x11r7/xcb-util-image/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_XCB_UTIL_IMAGE + bool "xcb-util-image" + select BR2_PACKAGE_XCB_UTIL + help + + The XCB util modules provides a number of libraries which + sit on top of libxcb, the core X protocol library, and some + of the extension libraries. These experimental libraries + provide convenience functions and interfaces which make the + raw X protocol more usable. Some of the libraries also + provide client-side code which is not strictly part of the X + protocol but which have traditionally been provided by Xlib. + + XCB util-image module provides the following library: + - image: Port of Xlib's XImage and XShmImage functions. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-image/xcb-util-image.hash b/package/x11r7/xcb-util-image/xcb-util-image.hash new file mode 100644 index 00000000..a9a2eaab --- /dev/null +++ b/package/x11r7/xcb-util-image/xcb-util-image.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2014-October/002489.html +sha256 2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc xcb-util-image-0.4.0.tar.bz2 +# License file, locally calculated +sha256 19672c6153d8c4870abe734fa4dd2197481a311f4788d02ad729be07e116b26b COPYING diff --git a/package/x11r7/xcb-util-image/xcb-util-image.mk b/package/x11r7/xcb-util-image/xcb-util-image.mk new file mode 100644 index 00000000..8ddb0be8 --- /dev/null +++ b/package/x11r7/xcb-util-image/xcb-util-image.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xcb-util-image +# +################################################################################ + +XCB_UTIL_IMAGE_VERSION = 0.4.0 +XCB_UTIL_IMAGE_SITE = http://xcb.freedesktop.org/dist +XCB_UTIL_IMAGE_SOURCE = xcb-util-image-$(XCB_UTIL_IMAGE_VERSION).tar.bz2 +XCB_UTIL_IMAGE_INSTALL_STAGING = YES +XCB_UTIL_IMAGE_LICENSE = MIT +XCB_UTIL_IMAGE_LICENSE_FILES = COPYING +XCB_UTIL_IMAGE_DEPENDENCIES = xcb-util + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-keysyms/Config.in b/package/x11r7/xcb-util-keysyms/Config.in new file mode 100644 index 00000000..9ca2e0ef --- /dev/null +++ b/package/x11r7/xcb-util-keysyms/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_XCB_UTIL_KEYSYMS + bool "xcb-util-keysyms" + select BR2_PACKAGE_LIBXCB + help + The XCB util modules provides a number of libraries which + sit on top of libxcb, the core X protocol library, and some + of the extension libraries. These experimental libraries + provide convenience functions and interfaces which make the + raw X protocol more usable. Some of the libraries also + provide client-side code which is not strictly part of the X + protocol but which have traditionally been provided by Xlib. + + XCB util-keysyms module provides the following library: + keysyms: Standard X key constants and conversion to/from + keycodes. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.hash b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.hash new file mode 100644 index 00000000..a25a263d --- /dev/null +++ b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-October/002485.html +sha256 0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9 xcb-util-keysyms-0.4.0.tar.bz2 diff --git a/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.mk b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.mk new file mode 100644 index 00000000..9036b06f --- /dev/null +++ b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xcb-util-keysyms +# +################################################################################ + +XCB_UTIL_KEYSYMS_VERSION = 0.4.0 +XCB_UTIL_KEYSYMS_SOURCE = xcb-util-keysyms-$(XCB_UTIL_KEYSYMS_VERSION).tar.bz2 +XCB_UTIL_KEYSYMS_SITE = http://xcb.freedesktop.org/dist + +# unfortunately, no license file +XCB_UTIL_KEYSYMS_LICENSE = MIT + +XCB_UTIL_KEYSYMS_INSTALL_STAGING = YES + +XCB_UTIL_KEYSYMS_DEPENDENCIES = host-pkgconf libxcb + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-renderutil/Config.in b/package/x11r7/xcb-util-renderutil/Config.in new file mode 100644 index 00000000..088bb18f --- /dev/null +++ b/package/x11r7/xcb-util-renderutil/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_XCB_UTIL_RENDERUTIL + bool "xcb-util-renderutil" + depends on BR2_PACKAGE_LIBXCB # xcb-util + select BR2_PACKAGE_XCB_UTIL + help + The XCB util modules provides a number of libraries which + sit on top of libxcb, the core X protocol library, and some + of the extension libraries. These experimental libraries + provide convenience functions and interfaces which make the + raw X protocol more usable. Some of the libraries also + provide client-side code which is not strictly part of the X + protocol but which have traditionally been provided by Xlib. + + XCB util-renderutil module provides the following library: + - renderutil: Convenience functions for the Render + extension. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.hash b/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.hash new file mode 100644 index 00000000..19ed9d46 --- /dev/null +++ b/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2014-June/002446.html +sha256 c6e97e48fb1286d6394dddb1c1732f00227c70bd1bedb7d1acabefdd340bea5b xcb-util-renderutil-0.3.9.tar.bz2 +# Locally computed +sha256 271169dd66674e9c396697af0b4822d1c59ccd2342b7740864d667a02963068b COPYING diff --git a/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.mk b/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.mk new file mode 100644 index 00000000..9e6683bf --- /dev/null +++ b/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xcb-util-renderutil +# +################################################################################ + +XCB_UTIL_RENDERUTIL_VERSION = 0.3.9 +XCB_UTIL_RENDERUTIL_SITE = http://xcb.freedesktop.org/dist +XCB_UTIL_RENDERUTIL_SOURCE = xcb-util-renderutil-$(XCB_UTIL_RENDERUTIL_VERSION).tar.bz2 +XCB_UTIL_RENDERUTIL_LICENSE = MIT +XCB_UTIL_RENDERUTIL_LICENSE_FILES = COPYING +XCB_UTIL_RENDERUTIL_INSTALL_STAGING = YES +XCB_UTIL_RENDERUTIL_DEPENDENCIES = xcb-util + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-wm/Config.in b/package/x11r7/xcb-util-wm/Config.in new file mode 100644 index 00000000..26096008 --- /dev/null +++ b/package/x11r7/xcb-util-wm/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_XCB_UTIL_WM + bool "xcb-util-wm" + select BR2_PACKAGE_LIBXCB + help + The XCB util modules provides a number of libraries which + sit on top of libxcb, the core X protocol library, and some + of the extension libraries. These experimental libraries + provide convenience functions and interfaces which make the + raw X protocol more usable. Some of the libraries also + provide client-side code which is not strictly part of the X + protocol but which have traditionally been provided by Xlib. + + XCB util-wm module provides the following libraries: + - ewmh: Both client and window-manager helpers for EWMH. + - icccm: Both client and window-manager helpers for ICCCM. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-wm/xcb-util-wm.hash b/package/x11r7/xcb-util-wm/xcb-util-wm.hash new file mode 100644 index 00000000..e31228fc --- /dev/null +++ b/package/x11r7/xcb-util-wm/xcb-util-wm.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2014-February/002401.html +sha256 28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f xcb-util-wm-0.4.1.tar.bz2 +# License file, locally calculated +sha256 12ab3559977a4b22ae3030b90c64a386e6ec51ab0e4eab1ff530f81a2639400a COPYING diff --git a/package/x11r7/xcb-util-wm/xcb-util-wm.mk b/package/x11r7/xcb-util-wm/xcb-util-wm.mk new file mode 100644 index 00000000..37df3fd9 --- /dev/null +++ b/package/x11r7/xcb-util-wm/xcb-util-wm.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xcb-util-wm +# +################################################################################ + +XCB_UTIL_WM_VERSION = 0.4.1 +XCB_UTIL_WM_SITE = http://xcb.freedesktop.org/dist +XCB_UTIL_WM_SOURCE = xcb-util-wm-$(XCB_UTIL_WM_VERSION).tar.bz2 +XCB_UTIL_WM_INSTALL_STAGING = YES +XCB_UTIL_WM_LICENSE = MIT +XCB_UTIL_WM_LICENSE_FILES = COPYING +XCB_UTIL_WM_DEPENDENCIES = libxcb + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util/Config.in b/package/x11r7/xcb-util/Config.in new file mode 100644 index 00000000..350afd06 --- /dev/null +++ b/package/x11r7/xcb-util/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XCB_UTIL + bool "xcb-util" + depends on BR2_PACKAGE_LIBXCB + help + Libraries which sit on top of libxcb, the core X protocol + library, and some of the extension libraries. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util/xcb-util.hash b/package/x11r7/xcb-util/xcb-util.hash new file mode 100644 index 00000000..c088a62b --- /dev/null +++ b/package/x11r7/xcb-util/xcb-util.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9 xcb-util-0.4.0.tar.bz2 +sha256 325b64f0b0284e08bbb7a78ae3e55c1edc2a7cd77f603225ae4b8ffc35423e37 COPYING diff --git a/package/x11r7/xcb-util/xcb-util.mk b/package/x11r7/xcb-util/xcb-util.mk new file mode 100644 index 00000000..bb73530f --- /dev/null +++ b/package/x11r7/xcb-util/xcb-util.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xcb-util +# +################################################################################ + +XCB_UTIL_VERSION = 0.4.0 +XCB_UTIL_SOURCE = xcb-util-$(XCB_UTIL_VERSION).tar.bz2 +XCB_UTIL_SITE = http://xcb.freedesktop.org/dist +XCB_UTIL_LICENSE = MIT +XCB_UTIL_LICENSE_FILES = COPYING +XCB_UTIL_INSTALL_STAGING = YES +XCB_UTIL_DEPENDENCIES = libxcb + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcursor-transparent-theme/0001-fix-symlink.patch b/package/x11r7/xcursor-transparent-theme/0001-fix-symlink.patch new file mode 100644 index 00000000..9cf351f2 --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/0001-fix-symlink.patch @@ -0,0 +1,37 @@ +Do not symlink to a host directory + +The installation of xcursor-transparent-theme creates many symbolic +links to the 'transp' cursor file, but it does so using an absolute +directory, that happens to point to the installation location, which +is incorrect when cross-compiling. + +Also add the -f option so that the package can be reinstalled even if +it has already been installed. + +Signed-off-by: Thomas Petazzoni + +Index: b/cursors/Makefile.am +=================================================================== +--- a/cursors/Makefile.am ++++ b/cursors/Makefile.am +@@ -91,6 +91,6 @@ + $(INSTALL_DATA) $(CURSOR_REAL) $(DESTDIR)$(CURSOR_DIR)/ + for CURSOR in $(CURSOR_NAMES); do \ + echo '-- Installing cursor '$$CURSOR; \ +- ln -s $(DESTDIR)$(CURSOR_DIR)/transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ ++ ln -sf transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ + done + +Index: b/cursors/Makefile.in +=================================================================== +--- a/cursors/Makefile.in ++++ b/cursors/Makefile.in +@@ -177,7 +177,7 @@ + $(INSTALL_DATA) $(CURSOR_REAL) $(DESTDIR)$(CURSOR_DIR)/ + for CURSOR in $(CURSOR_NAMES); do \ + echo '-- Installing cursor '$$CURSOR; \ +- ln -s $(DESTDIR)$(CURSOR_DIR)/transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ ++ ln -sf transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ + done + + # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/package/x11r7/xcursor-transparent-theme/Config.in b/package/x11r7/xcursor-transparent-theme/Config.in new file mode 100644 index 00000000..8282db89 --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XCURSOR_TRANSPARENT_THEME + bool "xcursor-transparent-theme" + select BR2_PACKAGE_XLIB_LIBXCURSOR + help + Completely transparent theme for hiding the X11 cursor. + + No upstream site. diff --git a/package/x11r7/xcursor-transparent-theme/index.theme b/package/x11r7/xcursor-transparent-theme/index.theme new file mode 100644 index 00000000..5300850f --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/index.theme @@ -0,0 +1,2 @@ +[Icon Theme] +Inherits=xcursor-transparent diff --git a/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.hash b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.hash new file mode 100644 index 00000000..52d23076 --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 b26adf2d503d01299718390ae39dab4691a67220de09423be0364e9a060bf7e4 xcursor-transparent-theme-0.1.1.tar.gz +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING diff --git a/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.mk b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.mk new file mode 100644 index 00000000..ddcc6ac9 --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xcursor-transparent-theme +# +################################################################################ + +XCURSOR_TRANSPARENT_THEME_VERSION = 0.1.1 +XCURSOR_TRANSPARENT_THEME_SITE = http://downloads.yoctoproject.org/releases/matchbox/utils +XCURSOR_TRANSPARENT_THEME_DEPENDENCIES = xlib_libXcursor host-xapp_xcursorgen +XCURSOR_TRANSPARENT_THEME_LICENSE = GPL-2.0 +XCURSOR_TRANSPARENT_THEME_LICENSE_FILES = COPYING + +define ICONS_DEFAULT_CONFIG_INSTALL + $(INSTALL) -m 0755 -D package/x11r7/xcursor-transparent-theme/index.theme \ + $(TARGET_DIR)/usr/share/icons/default/index.theme +endef + +XCURSOR_TRANSPARENT_THEME_POST_INSTALL_TARGET_HOOKS += ICONS_DEFAULT_CONFIG_INSTALL + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdata_xbitmaps/Config.in b/package/x11r7/xdata_xbitmaps/Config.in new file mode 100644 index 00000000..2308caec --- /dev/null +++ b/package/x11r7/xdata_xbitmaps/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XDATA_XBITMAPS + bool "xbitmaps" + help + No description available diff --git a/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.hash b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.hash new file mode 100644 index 00000000..05d37288 --- /dev/null +++ b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-March/002881.html +md5 cedeef095918aca86da79a2934e03daf xbitmaps-1.1.2.tar.bz2 +sha1 1cb0e485a66280e9a64b48426140b8a0de9cf169 xbitmaps-1.1.2.tar.bz2 +sha256 b9f0c71563125937776c8f1f25174ae9685314cbd130fb4c2efce811981e07ee xbitmaps-1.1.2.tar.bz2 +sha512 eed5e2fce9fc6c532984e6ed1262e440591e311ca6c61a7fe7a5c877df84bfc2d7aff388fb9c894fc098785b8e5352f0bd7c918252247a040cf123874847450d xbitmaps-1.1.2.tar.bz2 +# Locally computed +sha256 e121ec6605558ee021674d33b1ab9306e16b9ea7d30453df42286556247be17a COPYING diff --git a/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk new file mode 100644 index 00000000..e9545aba --- /dev/null +++ b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdata_xbitmaps +# +################################################################################ + +XDATA_XBITMAPS_VERSION = 1.1.2 +XDATA_XBITMAPS_SOURCE = xbitmaps-$(XDATA_XBITMAPS_VERSION).tar.bz2 +XDATA_XBITMAPS_SITE = http://xorg.freedesktop.org/releases/individual/data +XDATA_XBITMAPS_LICENSE = MIT +XDATA_XBITMAPS_LICENSE_FILES = COPYING + +XDATA_XBITMAPS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdata_xcursor-themes/Config.in b/package/x11r7/xdata_xcursor-themes/Config.in new file mode 100644 index 00000000..78d10209 --- /dev/null +++ b/package/x11r7/xdata_xcursor-themes/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDATA_XCURSOR_THEMES + bool "xdata_xcursor-themes" + select BR2_PACKAGE_XLIB_LIBXCURSOR + help + No description available diff --git a/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.hash b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.hash new file mode 100644 index 00000000..dd8d2ad2 --- /dev/null +++ b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002945.html +md5 aea14eabf40528ec4db18f1cfcf5c458 xcursor-themes-1.0.6.tar.bz2 +sha1 b56fd5bf5b1ada0532a85c27db0d296e392168c5 xcursor-themes-1.0.6.tar.bz2 +sha256 ee1ec574741293abcf66ac14ce7e74add7ac6be7deb8b38179ef010d22354999 xcursor-themes-1.0.6.tar.bz2 +sha512 2ad3586a5571a5ddc0001187362b54b839644916164834213af98e58698044aec4392dd6e1e42f1794fda85c8fedf259b09214a9636bd0e71a1629c710f198d3 xcursor-themes-1.0.6.tar.bz2 +# Locally computed +sha256 e437aed89c3440a9fe7e19968a3f2eeb97041ef6c9616837a3fd42d0874fc0e6 COPYING diff --git a/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk new file mode 100644 index 00000000..c3c5f388 --- /dev/null +++ b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xdata_xcursor-themes +# +################################################################################ + +XDATA_XCURSOR_THEMES_VERSION = 1.0.6 +XDATA_XCURSOR_THEMES_SOURCE = xcursor-themes-$(XDATA_XCURSOR_THEMES_VERSION).tar.bz2 +XDATA_XCURSOR_THEMES_SITE = http://xorg.freedesktop.org/releases/individual/data +XDATA_XCURSOR_THEMES_LICENSE = MIT +XDATA_XCURSOR_THEMES_LICENSE_FILES = COPYING + +XDATA_XCURSOR_THEMES_INSTALL_STAGING = YES +XDATA_XCURSOR_THEMES_DEPENDENCIES = xlib_libXcursor host-xapp_xcursorgen + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-evdev/0001-build-get-rid-of-sdkdir.patch b/package/x11r7/xdriver_xf86-input-evdev/0001-build-get-rid-of-sdkdir.patch new file mode 100644 index 00000000..b3422954 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-evdev/0001-build-get-rid-of-sdkdir.patch @@ -0,0 +1,87 @@ +From 1ad5e1593556f767150c2ca75176453bee4771e6 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 23 Oct 2016 22:00:10 +0200 +Subject: [PATCH] build: get rid of sdkdir + +Use of sdkdir causes problems during cross-compilation, where the full +path is then appended to the DESTDIR, leading to host paths being +appended in the target: + https://bugs.busybox.net/show_bug.cgi?id=8696 + +Other drivers (e.g. keyboard) got rid of sdkdir. Do the same. + +Signed-off-by: "Yann E. MORIN" +--- + Makefile.am | 4 ---- + configure.ac | 9 --------- + include/Makefile.am | 5 ++++- + xorg-evdev.pc.in | 10 ++++++++-- + 4 files changed, 12 insertions(+), 16 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 1cc3ea6..1ae042a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -18,10 +18,6 @@ + # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +- +-# Provide an sdk location that is writable by the evdev module +-DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' +- + SUBDIRS = src man include + MAINTAINERCLEANFILES = ChangeLog INSTALL + +diff --git a/configure.ac b/configure.ac +index e4887a3..4adfa43 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -66,15 +66,6 @@ AC_ARG_WITH(xorg-conf-dir, + [xorgconfdir="$prefix/share/X11/xorg.conf.d"]) + AC_SUBST(xorgconfdir) + +-# X Server SDK location is required to install evdev header files +-# This location is also relayed in the xorg-evdev.pc file +-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` +- +-# Workaround overriding sdkdir to be able to create a tarball when user has no +-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am +-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"]) +-AC_SUBST([sdkdir]) +- + DRIVER_NAME=evdev + AC_SUBST([DRIVER_NAME]) + +diff --git a/include/Makefile.am b/include/Makefile.am +index 0e3fc1b..afc96ed 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -1 +1,4 @@ +-sdk_HEADERS = evdev-properties.h ++# location formerly known as 'sdkdir': ++xorgincludedir = $(includedir)/xorg ++ ++xorginclude_HEADERS = evdev-properties.h +diff --git a/xorg-evdev.pc.in b/xorg-evdev.pc.in +index 20710a6..fcbf511 100644 +--- a/xorg-evdev.pc.in ++++ b/xorg-evdev.pc.in +@@ -1,6 +1,12 @@ +-sdkdir=@sdkdir@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++datarootdir=@datarootdir@ ++moduledir=@moduledir@ ++sysconfigdir=@sysconfigdir@ + + Name: xorg-evdev + Description: X.Org evdev input driver. + Version: @PACKAGE_VERSION@ +-Cflags: -I${sdkdir} ++Cflags: -I${includedir}/xorg +-- +2.7.4 + diff --git a/package/x11r7/xdriver_xf86-input-evdev/Config.in b/package/x11r7/xdriver_xf86-input-evdev/Config.in new file mode 100644 index 00000000..fe4e451e --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-evdev/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV + bool "xf86-input-evdev" + depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency + select BR2_PACKAGE_LIBEVDEV + select BR2_PACKAGE_MTDEV + select BR2_PACKAGE_XORGPROTO + help + Generic Linux input driver + +comment "xf86-input-evdev requires udev to be enabled" + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.hash b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.hash new file mode 100644 index 00000000..eb4cb659 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-May/002898.html +md5 e8bd1edc6751f92e425cae7eba3c61eb xf86-input-evdev-2.10.6.tar.bz2 +sha1 660de292d5a40e2b8f385965c6a4e149c981ba59 xf86-input-evdev-2.10.6.tar.bz2 +sha256 8726073e81861bc7b2321e76272cbdbd33c7e1a121535a9827977265b9033ec0 xf86-input-evdev-2.10.6.tar.bz2 +sha512 560b0a6491d50a46913a5890a35c0367e59f550670993493bd9712d712a9747ddaa6fe5086daabf2fcafa24b0159383787eb273da4a2a60c089bfc0a77ad2ad1 xf86-input-evdev-2.10.6.tar.bz2 +# Locally computed +sha256 f6b9b4732932434cad03b29cb3151d20edcf7d6e5681f40ee3c47f03dbd92dc9 COPYING diff --git a/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk new file mode 100644 index 00000000..28923cb2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xdriver_xf86-input-evdev +# +################################################################################ + +XDRIVER_XF86_INPUT_EVDEV_VERSION = 2.10.6 +XDRIVER_XF86_INPUT_EVDEV_SOURCE = xf86-input-evdev-$(XDRIVER_XF86_INPUT_EVDEV_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_EVDEV_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_EVDEV_LICENSE = MIT +XDRIVER_XF86_INPUT_EVDEV_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_EVDEV_AUTORECONF = YES + +XDRIVER_XF86_INPUT_EVDEV_DEPENDENCIES = \ + host-pkgconf \ + libevdev \ + mtdev \ + xorgproto \ + xserver_xorg-server \ + udev + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-joystick/0001-build-get-rid-of-sdkdir.patch b/package/x11r7/xdriver_xf86-input-joystick/0001-build-get-rid-of-sdkdir.patch new file mode 100644 index 00000000..a611f153 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/0001-build-get-rid-of-sdkdir.patch @@ -0,0 +1,78 @@ +From 2826691dcd01f470d30dc8eb3bbd24a96cd3a93c Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 23 Oct 2016 22:29:29 +0200 +Subject: [PATCH] build: get rid of sdkdir + +Use of sdkdir causes problems during cross-compilation, where the full +path is then appended to the DESTDIR, leading to host paths being +appended in the target: + https://bugs.busybox.net/show_bug.cgi?id=8696 + +Other drivers (e.g. keyboard) got rid of sdkdir. Do the same. + +Signed-off-by: "Yann E. MORIN" +--- + Makefile.am | 1 - + configure.ac | 9 --------- + include/Makefile.am | 5 ++++- + xorg-joystick.pc.in | 2 +- + 4 files changed, 5 insertions(+), 12 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 13946b8..c1567ae 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -18,7 +18,6 @@ + # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir=\$${includedir}/xorg + SUBDIRS = src man config include + MAINTAINERCLEANFILES = ChangeLog INSTALL + +diff --git a/configure.ac b/configure.ac +index b5834a5..44b9d27 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -66,15 +66,6 @@ AC_ARG_WITH(xorg-module-dir, + inputdir=${moduledir}/input + AC_SUBST(inputdir) + +-# Define a configure option for an alternate X Server SDK Headers +-# X Server SDK location is required to install joystick header files +-AC_ARG_WITH(sdkdir, +- AS_HELP_STRING([--with-sdkdir=], +- [Xorg X Server sdk headers (default is autodetected)]), +- [sdkdir="$withval"], +- [sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`]) +-AC_SUBST(sdkdir) +- + # Define a configure option to enable code debugging + AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug], + [Disable debugging code (default: enabled)]), +diff --git a/include/Makefile.am b/include/Makefile.am +index ed618c2..d656568 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -18,4 +18,7 @@ + # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-sdk_HEADERS = joystick-properties.h ++# Location formerly known as 'sdkdir' ++xorgincludedir = $(includedir)/xorg ++ ++xorginclude_HEADERS = joystick-properties.h +diff --git a/xorg-joystick.pc.in b/xorg-joystick.pc.in +index 76bb92f..a5972c7 100644 +--- a/xorg-joystick.pc.in ++++ b/xorg-joystick.pc.in +@@ -4,4 +4,4 @@ includedir=@includedir@ + Name: xorg-joystick + Description: X.Org joystick input driver. + Version: @PACKAGE_VERSION@ +-Cflags: -I${includedir} ++Cflags: -I${includedir}/xorg +-- +2.7.4 + diff --git a/package/x11r7/xdriver_xf86-input-joystick/50-joystick.conf b/package/x11r7/xdriver_xf86-input-joystick/50-joystick.conf new file mode 100644 index 00000000..95a295ab --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/50-joystick.conf @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "joystick catchall" + MatchIsJoystick "on" + MatchDevicePath "/dev/input/event*" + Driver "joystick" +EndSection diff --git a/package/x11r7/xdriver_xf86-input-joystick/Config.in b/package/x11r7/xdriver_xf86-input-joystick/Config.in new file mode 100644 index 00000000..892d1a16 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_JOYSTICK + bool "xf86-input-joystick" + select BR2_PACKAGE_XORGPROTO + help + X.Org driver for joystick input devices diff --git a/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.hash b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.hash new file mode 100644 index 00000000..d2384d6c --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2016-November/002742.html +sha256 9e7669ecf0f23b8e5dc39d5397cf28296f692aa4c0e4255f5e02816612c18eab xf86-input-joystick-1.6.3.tar.bz2 +# Locally calculated +sha256 460cf612147407317a3911ce03a215707d8d6d5f3e604a53fefa6e54974ad07e COPYING diff --git a/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk new file mode 100644 index 00000000..0ec4be5e --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xdriver_xf86-input-joystick +# +################################################################################ + +XDRIVER_XF86_INPUT_JOYSTICK_VERSION = 1.6.3 +XDRIVER_XF86_INPUT_JOYSTICK_SOURCE = xf86-input-joystick-$(XDRIVER_XF86_INPUT_JOYSTICK_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_JOYSTICK_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_JOYSTICK_LICENSE = MIT +XDRIVER_XF86_INPUT_JOYSTICK_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_JOYSTICK_DEPENDENCIES = xserver_xorg-server xorgproto +XDRIVER_XF86_INPUT_JOYSTICK_AUTORECONF = YES + +define XDRIVER_XF86_INPUT_JOYSTICK_CONF + $(INSTALL) -m 0644 -D \ + $(XDRIVER_XF86_INPUT_JOYSTICK_PKGDIR)/50-joystick.conf \ + $(TARGET_DIR)/usr/share/X11/xorg.conf.d/50-joystick.conf +endef +XDRIVER_XF86_INPUT_JOYSTICK_POST_INSTALL_TARGET_HOOKS += XDRIVER_XF86_INPUT_JOYSTICK_CONF + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-keyboard/Config.in b/package/x11r7/xdriver_xf86-input-keyboard/Config.in new file mode 100644 index 00000000..ee23033b --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-keyboard/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD + bool "xf86-input-keyboard" + select BR2_PACKAGE_XORGPROTO + help + Keyboard input driver diff --git a/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.hash b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.hash new file mode 100644 index 00000000..66e2c3ed --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2016-November/002739.html +sha256 f7c900f21752683402992b288d5a2826de7a6c0c0abac2aadd7e8a409e170388 xf86-input-keyboard-1.9.0.tar.bz2 +# Locally calculated +sha256 b91b17c53724c79685e3025a38028b7d48c966fdd239e0efe2d98874d3c139a0 COPYING diff --git a/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk new file mode 100644 index 00000000..fb1e2896 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-input-keyboard +# +################################################################################ + +XDRIVER_XF86_INPUT_KEYBOARD_VERSION = 1.9.0 +XDRIVER_XF86_INPUT_KEYBOARD_SOURCE = xf86-input-keyboard-$(XDRIVER_XF86_INPUT_KEYBOARD_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_KEYBOARD_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_KEYBOARD_LICENSE = MIT +XDRIVER_XF86_INPUT_KEYBOARD_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_KEYBOARD_DEPENDENCIES = xserver_xorg-server xorgproto +XDRIVER_XF86_INPUT_KEYBOARD_CONF_OPTS = --disable-selective-werror + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-libinput/0001-build-get-rid-of-sdkdir.patch b/package/x11r7/xdriver_xf86-input-libinput/0001-build-get-rid-of-sdkdir.patch new file mode 100644 index 00000000..2f9784c2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-libinput/0001-build-get-rid-of-sdkdir.patch @@ -0,0 +1,78 @@ +From 1b2cf6e6c2640e08166af36eee775542a45325af Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 23 Oct 2016 22:36:40 +0200 +Subject: [PATCH] build: get rid of sdkdir + +Use of sdkdir causes problems during cross-compilation, where the full +path is then appended to the DESTDIR, leading to host paths being +appended in the target: + https://bugs.busybox.net/show_bug.cgi?id=8696 + +Other drivers (e.g. keyboard) got rid of sdkdir. Do the same. + +Signed-off-by: "Yann E. MORIN" +--- + Makefile.am | 2 -- + configure.ac | 8 -------- + include/Makefile.am | 4 +++- + xorg-libinput.pc.in | 5 +++-- + 4 files changed, 6 insertions(+), 13 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index a447d61..7aa5523 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -19,8 +19,6 @@ + # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +-DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' +- + SUBDIRS = src include man test + MAINTAINERCLEANFILES = ChangeLog INSTALL + +diff --git a/configure.ac b/configure.ac +index 9894817..fe198cb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -63,14 +63,6 @@ AC_ARG_WITH(xorg-conf-dir, + [xorgconfdir='${prefix}/share/X11/xorg.conf.d']) + AC_SUBST(xorgconfdir) + +-# X Server SDK location is required to install header files +-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` +- +-# Workaround overriding sdkdir to be able to create a tarball when user has no +-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am +-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"]) +-AC_SUBST([sdkdir]) +- + DRIVER_NAME=libinput + AC_SUBST([DRIVER_NAME]) + +diff --git a/include/Makefile.am b/include/Makefile.am +index 0d52b9b..271ffac 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -1 +1,3 @@ +-sdk_HEADERS = libinput-properties.h ++# Location formerly known as 'sdkdir' ++xorgincludedir = $(includedir)/xorg ++xorginclude_HEADERS = libinput-properties.h +diff --git a/xorg-libinput.pc.in b/xorg-libinput.pc.in +index ff98189..9c0f506 100644 +--- a/xorg-libinput.pc.in ++++ b/xorg-libinput.pc.in +@@ -1,6 +1,7 @@ +-sdkdir=@sdkdir@ ++prefix=@prefix@ ++includedir=@includedir@ + + Name: xorg-libinput + Description: X.Org libinput input driver. + Version: @PACKAGE_VERSION@ +-Cflags: -I${sdkdir} ++Cflags: -I${includedir}/xorg +-- +2.7.4 + diff --git a/package/x11r7/xdriver_xf86-input-libinput/Config.in b/package/x11r7/xdriver_xf86-input-libinput/Config.in new file mode 100644 index 00000000..f66196a5 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-libinput/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_LIBINPUT + bool "xf86-input-libinput" + depends on BR2_PACKAGE_HAS_UDEV # libinput + select BR2_PACKAGE_LIBINPUT + select BR2_PACKAGE_XORGPROTO + help + This is an X driver based on libinput. It is a thin wrapper + around libinput, so while it does provide all features that + libinput supports it does little beyond. + +comment "xf86-input-libinput needs udev /dev management" + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.hash b/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.hash new file mode 100644 index 00000000..51f0ce78 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2020-May/003045.html +md5 11dcfa2cc39f790731a9545fcdeea717 xf86-input-libinput-0.30.0.tar.bz2 +sha1 b705d0280b4fa7ccf44b9ff3869f5d7846e26414 xf86-input-libinput-0.30.0.tar.bz2 +sha256 f9c7f9fd41ae14061e0e9c3bd45fa170e5e21027a2bc5810034e1e748db996c0 xf86-input-libinput-0.30.0.tar.bz2 +sha512 823f80f7d53866f2f06c1fb7b2d64111bf807329acaaeda4a09413cdb5f3e3235c1dd4f99183aae75adf5a01503e40e35b4449b31f977afd842b4723b062c380 xf86-input-libinput-0.30.0.tar.bz2 +# Locally computed +sha256 b808a8a077995380c6064bec41616f98546b0b2e79bb7f3d0247d290e275b396 COPYING diff --git a/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.mk b/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.mk new file mode 100644 index 00000000..64d972cf --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-input-libinput +# +################################################################################ + +XDRIVER_XF86_INPUT_LIBINPUT_VERSION = 0.30.0 +XDRIVER_XF86_INPUT_LIBINPUT_SOURCE = xf86-input-libinput-$(XDRIVER_XF86_INPUT_LIBINPUT_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_LIBINPUT_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_LIBINPUT_LICENSE = MIT +XDRIVER_XF86_INPUT_LIBINPUT_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_LIBINPUT_DEPENDENCIES = libinput xserver_xorg-server xorgproto +XDRIVER_XF86_INPUT_LIBINPUT_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-mouse/0001-build-get-rid-of-sdkdir.patch b/package/x11r7/xdriver_xf86-input-mouse/0001-build-get-rid-of-sdkdir.patch new file mode 100644 index 00000000..d5f97f98 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-mouse/0001-build-get-rid-of-sdkdir.patch @@ -0,0 +1,81 @@ +From aef3d9bca4d77db833f71d50b1c84b16c69d7deb Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 23 Oct 2016 22:53:21 +0200 +Subject: [PATCH] build: get rid of sdkdir + +Use of sdkdir causes problems during cross-compilation, where the full +path is then appended to the DESTDIR, leading to host paths being +appended in the target: + https://bugs.busybox.net/show_bug.cgi?id=8696 + +Other drivers (e.g. keyboard) got rid of sdkdir. Do the same. + +Signed-off-by: "Yann E. MORIN" +--- + Makefile.am | 3 --- + configure.ac | 10 ---------- + include/Makefile.am | 4 +++- + xorg-mouse.pc.in | 3 +-- + 4 files changed, 4 insertions(+), 16 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 7142485..efe66cb 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -34,9 +34,6 @@ ChangeLog: + + dist-hook: ChangeLog INSTALL + +-# Provide an sdk location that is writable by this module +-DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' +- + if LINT + # Check source code with tools like lint & sparse + lint: +diff --git a/configure.ac b/configure.ac +index 15d9047..515681d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -60,16 +60,6 @@ AC_ARG_WITH(xorg-module-dir, + inputdir=${moduledir}/input + AC_SUBST(inputdir) + +-# X Server SDK location is required to install xf86-mouse-properties.h +-# This location is also relayed in the xorg-mouse.pc file +-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` +- +-# Workaround overriding sdkdir to be able to create a tarball when user has no +-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am +-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"]) +-AC_SUBST([sdkdir]) +- +- + # Work out which OS mouse driver we need to build + case $host_os in + linux*) +diff --git a/include/Makefile.am b/include/Makefile.am +index 27ce0fb..2b85e4e 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -1 +1,3 @@ +-sdk_HEADERS = xf86-mouse-properties.h ++# Location formerly known as 'sdkdir' ++xorgincludedir = $(includedir)/xorg ++xorginclude_HEADERS = xf86-mouse-properties.h +diff --git a/xorg-mouse.pc.in b/xorg-mouse.pc.in +index 57df596..8355e61 100644 +--- a/xorg-mouse.pc.in ++++ b/xorg-mouse.pc.in +@@ -1,6 +1,7 @@ prefix=@prefix@ +-sdkdir=@sdkdir@ ++prefix=@prefix@ ++includedir=@includedir@ + + Name: xorg-mouse + Description: X.Org mouse input driver for non-evdev OS'es + Version: @PACKAGE_VERSION@ +-Cflags: -I${sdkdir} ++Cflags: -I${includedir}/xorg +-- +2.7.4 + diff --git a/package/x11r7/xdriver_xf86-input-mouse/Config.in b/package/x11r7/xdriver_xf86-input-mouse/Config.in new file mode 100644 index 00000000..efa181e5 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-mouse/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE + bool "xf86-input-mouse" + select BR2_PACKAGE_XORGPROTO + help + X.Org driver for mouse input devices diff --git a/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.hash b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.hash new file mode 100644 index 00000000..551ff9d8 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-June/002903.html +md5 a2104693bbcfe1413397f7905eecd3dc xf86-input-mouse-1.9.3.tar.bz2 +sha1 b3982998808ba43117fc066c4ecc94ce67c5818e xf86-input-mouse-1.9.3.tar.bz2 +sha256 93ecb350604d05be98b7d4e5db3b8155a44890069a7d8d6b800c0bea79c85cc5 xf86-input-mouse-1.9.3.tar.bz2 +sha512 d99f5b4b1ef1aa4cbf1a92549e412f54f121bc804e4d6643248ad7ea18081b38b958bd289dc8476ebc0f6ef5f7424c2f2a8abcfaa30cae5378829549af6b148f xf86-input-mouse-1.9.3.tar.bz2 +# Locally computed +sha256 472ff645ead9bf3ffb48d42c596376ffc595897e0c0993a071a7ada0da1f4f10 COPYING diff --git a/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk new file mode 100644 index 00000000..3886fa7a --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-input-mouse +# +################################################################################ + +XDRIVER_XF86_INPUT_MOUSE_VERSION = 1.9.3 +XDRIVER_XF86_INPUT_MOUSE_SOURCE = xf86-input-mouse-$(XDRIVER_XF86_INPUT_MOUSE_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_MOUSE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_MOUSE_LICENSE = MIT +XDRIVER_XF86_INPUT_MOUSE_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_MOUSE_DEPENDENCIES = xserver_xorg-server xorgproto +XDRIVER_XF86_INPUT_MOUSE_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-synaptics/0001-build-get-rid-of-sdkdir.patch b/package/x11r7/xdriver_xf86-input-synaptics/0001-build-get-rid-of-sdkdir.patch new file mode 100644 index 00000000..62950b06 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-synaptics/0001-build-get-rid-of-sdkdir.patch @@ -0,0 +1,88 @@ +From 231a35e99fee8aba23f18cce21dfb5fa8bef0c36 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 23 Oct 2016 23:07:33 +0200 +Subject: [PATCH] build: get rid of sdkdir + +Use of sdkdir causes problems during cross-compilation, where the full +path is then appended to the DESTDIR, leading to host paths being +appended in the target: + https://bugs.busybox.net/show_bug.cgi?id=8696 + +Other drivers (e.g. keyboard) got rid of sdkdir. Do the same. + +Signed-off-by: "Yann E. MORIN" +--- + Makefile.am | 1 - + configure.ac | 9 --------- + include/Makefile.am | 4 +++- + xorg-synaptics.pc.in | 5 +++-- + 4 files changed, 6 insertions(+), 13 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 678124c..c48c5c8 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -21,7 +21,6 @@ + # During distcheck, system locations (as provided by pkg-config) may + # not be writable; provide instead relative locations. + DISTCHECK_CONFIGURE_FLAGS = \ +- --with-sdkdir='$${includedir}/xorg' \ + --with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d' + + SUBDIRS = include src man tools conf +diff --git a/configure.ac b/configure.ac +index 970dd5f..574353b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -55,11 +55,6 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto) + # Obtain compiler/linker options for the Synaptics driver dependencies + PKG_CHECK_MODULES(XORG, [inputproto >= 2.1.99.3] [xorg-server >= 1.12] xproto inputproto $REQUIRED_MODULES) + +-# X Server SDK location is required to install Synaptics header files +-# This location is also relayed in the xorg-synaptics.pc file +-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` +-AC_SUBST([sdkdir]) +- + # ----------------------------------------------------------------------------- + # Configuration options + # ----------------------------------------------------------------------------- +@@ -154,10 +149,6 @@ if test "x$have_libxtst" = "xyes" ; then + fi + # ----------------------------------------------------------------------------- + +-# Workaround overriding sdkdir to be able to create a tarball when user has no +-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am +-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"]) +- + AC_CONFIG_FILES([Makefile + src/Makefile + man/Makefile +diff --git a/include/Makefile.am b/include/Makefile.am +index 8234020..565868b 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -18,4 +18,6 @@ + # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-sdk_HEADERS = synaptics-properties.h ++# Location formerly known as 'sdkdir' ++xorgincludedir = $(includedir)/xorg ++xorginclude_HEADERS = synaptics-properties.h +diff --git a/xorg-synaptics.pc.in b/xorg-synaptics.pc.in +index 159cfbf..68e0fbe 100644 +--- a/xorg-synaptics.pc.in ++++ b/xorg-synaptics.pc.in +@@ -1,6 +1,7 @@ +-sdkdir=@sdkdir@ ++prefix=@prefix@ ++includedir=@includedir@ + + Name: synaptics + Description: X.Org synaptics input driver. + Version: @PACKAGE_VERSION@ +-Cflags: -I${sdkdir} ++Cflags: -I${includedir}/xorg +-- +2.7.4 + diff --git a/package/x11r7/xdriver_xf86-input-synaptics/Config.in b/package/x11r7/xdriver_xf86-input-synaptics/Config.in new file mode 100644 index 00000000..b974265b --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-synaptics/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_SYNAPTICS + bool "xf86-input-synaptics" + select BR2_PACKAGE_LIBEVDEV + select BR2_PACKAGE_MTDEV + select BR2_PACKAGE_XORGPROTO + help + X.Org driver for synaptics input devices diff --git a/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.hash b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.hash new file mode 100644 index 00000000..b482a1db --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-May/002899.html +md5 cfb79d3c975151f9bbf30b727c260cb9 xf86-input-synaptics-1.9.1.tar.bz2 +sha1 07eeef716820105cae959bbc3aa103e2fcfd0084 xf86-input-synaptics-1.9.1.tar.bz2 +sha256 7af83526eff1c76e8b9e1553b34245c203d029028d8044dd9dcf71eef1001576 xf86-input-synaptics-1.9.1.tar.bz2 +sha512 978eddd456aa7361047bc3d72e5127b24b13de29b0dddb6a0acc9f9da93931baa2b22fb5d1e6be164f629a11e5d97d753b835426435396b45b1af5eb8d546c3f xf86-input-synaptics-1.9.1.tar.bz2 +# Locally computed +sha256 e14dc9a27158cadaeea8bcc2c70069762f05adb29030a444336bfde268751dc7 COPYING diff --git a/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk new file mode 100644 index 00000000..c8ef98f8 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-input-synaptics +# +################################################################################ + +XDRIVER_XF86_INPUT_SYNAPTICS_VERSION = 1.9.1 +XDRIVER_XF86_INPUT_SYNAPTICS_SOURCE = xf86-input-synaptics-$(XDRIVER_XF86_INPUT_SYNAPTICS_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_SYNAPTICS_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_SYNAPTICS_LICENSE = MIT +XDRIVER_XF86_INPUT_SYNAPTICS_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_SYNAPTICS_DEPENDENCIES = libevdev xserver_xorg-server xorgproto mtdev +XDRIVER_XF86_INPUT_SYNAPTICS_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-tslib/Config.in b/package/x11r7/xdriver_xf86-input-tslib/Config.in new file mode 100644 index 00000000..9205cba6 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_TSLIB + bool "xf86-input-tslib" + select BR2_PACKAGE_XORGPROTO + select BR2_PACKAGE_TSLIB + help + Touch screen library input driver + + https://github.com/merge/xf86-input-tslib diff --git a/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.hash b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.hash new file mode 100644 index 00000000..d2c1d8ed --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.hash @@ -0,0 +1,5 @@ +# https://github.com/merge/xf86-input-tslib/releases/download/1.1.1/xf86-input-tslib-1.1.1.tar.bz2.sha256 +sha256 8b6a9f2ad73598a3619e66e252bd54b1792c4deba0213101fa4d272b5e9217ec xf86-input-tslib-1.1.1.tar.bz2 + +# Locally computed +sha256 edfc46c9b91499699fc54d39e986756a2dcce8a919c6066be177123441532856 COPYING diff --git a/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk new file mode 100644 index 00000000..f8944f35 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xdriver_xf86-input-tslib +# +################################################################################ + +XDRIVER_XF86_INPUT_TSLIB_VERSION = 1.1.1 +XDRIVER_XF86_INPUT_TSLIB_SOURCE = xf86-input-tslib-$(XDRIVER_XF86_INPUT_TSLIB_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_TSLIB_SITE = https://github.com/merge/xf86-input-tslib/releases/download/$(XDRIVER_XF86_INPUT_TSLIB_VERSION) +XDRIVER_XF86_INPUT_TSLIB_LICENSE = MIT +XDRIVER_XF86_INPUT_TSLIB_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_TSLIB_DEPENDENCIES = \ + xserver_xorg-server \ + xorgproto \ + tslib + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-vmmouse/Config.in b/package/x11r7/xdriver_xf86-input-vmmouse/Config.in new file mode 100644 index 00000000..d77def02 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-vmmouse/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_VMMOUSE + bool "xf86-input-vmmouse" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_XORGPROTO + help + VMWare mouse input driver diff --git a/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.hash b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.hash new file mode 100644 index 00000000..fd6221fa --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-June/002616.html +sha256 0af558957ac1be1b2863712c2475de8f4d7f14921fd01ded2e2fde4921b19319 xf86-input-vmmouse-13.1.0.tar.bz2 +# Locally calculated +sha256 804737a1582428fdde4e2bfd1e9f3ca07971fc3bdce20ba2d06cc2bba6c84a9e COPYING diff --git a/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk new file mode 100644 index 00000000..b8c77de5 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xdriver_xf86-input-vmmouse +# +################################################################################ + +XDRIVER_XF86_INPUT_VMMOUSE_VERSION = 13.1.0 +XDRIVER_XF86_INPUT_VMMOUSE_SOURCE = xf86-input-vmmouse-$(XDRIVER_XF86_INPUT_VMMOUSE_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_VMMOUSE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_VMMOUSE_LICENSE = MIT +XDRIVER_XF86_INPUT_VMMOUSE_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_VMMOUSE_DEPENDENCIES = xserver_xorg-server xorgproto + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XDRIVER_XF86_INPUT_VMMOUSE_CONF_OPTS += --with-libudev +XDRIVER_XF86_INPUT_VMMOUSE_DEPENDENCIES += udev +else +XDRIVER_XF86_INPUT_VMMOUSE_CONF_OPTS += --without-libudev +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-amdgpu/Config.in b/package/x11r7/xdriver_xf86-video-amdgpu/Config.in new file mode 100644 index 00000000..c42255f5 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-amdgpu/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_AMDGPU + bool "xf86-video-amdgpu" + depends on BR2_USE_MMU # libdrm + depends on BR2_PACKAGE_MESA3D_DRI_DRIVER + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # gbm + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_AMDGPU + select BR2_PACKAGE_LIBEPOXY + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XORGPROTO + help + AMD GPU video driver + +comment "xf86-video-amdgpu needs egl/opengl support from mesa3d" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL || \ + !BR2_PACKAGE_MESA3D_DRI_DRIVER diff --git a/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.hash b/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.hash new file mode 100644 index 00000000..4bbfb0de --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-October/003026.html +md5 55ad19b858e186a2cf4e91ed832c05e7 xf86-video-amdgpu-19.1.0.tar.bz2 +sha1 044a97ea2f36dd3d2d4844bb503dd4e2b2854d56 xf86-video-amdgpu-19.1.0.tar.bz2 +sha256 4f0ea4e0ae61995ac2b7c72433d31deab63b60c78763020aaa1b28696124fe5d xf86-video-amdgpu-19.1.0.tar.bz2 +sha512 ccdaa2378492da1a2f3d18fedacd1318c4708da534a8a959276a82730d5420619d83ad1ec8d7835c55655fe56123cd9bffb44e6223c5a97033c01f598af4a173 xf86-video-amdgpu-19.1.0.tar.bz2 +# Locally computed +sha256 58847c8e97190c401afa84b3f0b8b147379c876a184e99af2cb51bfd40ac8936 COPYING diff --git a/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.mk b/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.mk new file mode 100644 index 00000000..e7196956 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xdriver_xf86-video-amdgpu +# +################################################################################ + +XDRIVER_XF86_VIDEO_AMDGPU_VERSION = 19.1.0 +XDRIVER_XF86_VIDEO_AMDGPU_SOURCE = xf86-video-amdgpu-$(XDRIVER_XF86_VIDEO_AMDGPU_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_AMDGPU_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_AMDGPU_LICENSE = MIT +XDRIVER_XF86_VIDEO_AMDGPU_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_AMDGPU_DEPENDENCIES = \ + libdrm \ + xlib_libXcomposite \ + xorgproto \ + xserver_xorg-server + +# xdriver_xf86-video-amdgpu requires O_CLOEXEC +XDRIVER_XF86_VIDEO_AMDGPU_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-ark/0001-mibstore.patch b/package/x11r7/xdriver_xf86-video-ark/0001-mibstore.patch new file mode 100644 index 00000000..fa3e6859 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ark/0001-mibstore.patch @@ -0,0 +1,40 @@ +From 3a3eb72baec46f48e6cf15a834271c3d3386deac Mon Sep 17 00:00:00 2001 +From: Gaetan Nadon +Date: Tue, 17 Sep 2013 19:55:37 +0000 +Subject: Remove usage of mibstore.h (removed from server) + +The module had a compile error for this missing header file. + +Changes similar to vmware commit +23d87c92b7211cc5249eefe4ab3a2c7f370e279e + +Reviewed-by: Alex Deucher +Signed-off-by: Gaetan Nadon +--- +Fetch from: +http://cgit.freedesktop.org/xorg/driver/xf86-video-ark/commit/?id=3a3eb72baec46f48e6cf15a834271c3d3386deac + +Signed-off-by: Bernd Kuhls + +diff --git a/src/ark_driver.c b/src/ark_driver.c +index b7c287c..65cfe84 100644 +--- a/src/ark_driver.c ++++ b/src/ark_driver.c +@@ -39,7 +39,6 @@ + #include "compiler.h" + #include "mipointer.h" + #include "micmap.h" +-#include "mibstore.h" + #include "fb.h" + #include "ark.h" + +@@ -538,7 +537,6 @@ static Bool ARKScreenInit(SCREEN_INIT_ARGS_DECL) + + fbPictureInit (pScreen, 0, 0); + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + + if (!pARK->NoAccel) { +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xdriver_xf86-video-ark/Config.in b/package/x11r7/xdriver_xf86-video-ark/Config.in new file mode 100644 index 00000000..e1219aff --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ark/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ARK + bool "xf86-video-ark" + select BR2_PACKAGE_XORGPROTO + help + X.Org driver for ark cards diff --git a/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.hash b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.hash new file mode 100644 index 00000000..2e2e9536 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2012-July/002007.html +sha256 c690e046f34a393aac1c8d9616b4790e93cda60a460b00b9597d322175dbe51e xf86-video-ark-0.7.5.tar.bz2 +# Locally calculated +sha256 8ba9850fb0ecd9033bb1d25c1be85625cb53ca56ce76b71f78f4a034f7310bda COPYING diff --git a/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk new file mode 100644 index 00000000..3f2a6360 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-ark +# +################################################################################ + +XDRIVER_XF86_VIDEO_ARK_VERSION = 0.7.5 +XDRIVER_XF86_VIDEO_ARK_SOURCE = xf86-video-ark-$(XDRIVER_XF86_VIDEO_ARK_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_ARK_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_ARK_LICENSE = MIT +XDRIVER_XF86_VIDEO_ARK_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_ARK_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-ast/Config.in b/package/x11r7/xdriver_xf86-video-ast/Config.in new file mode 100644 index 00000000..2ebe8fc2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ast/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_AST + bool "xf86-video-ast" + select BR2_PACKAGE_XORGPROTO + help + No description available diff --git a/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.hash b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.hash new file mode 100644 index 00000000..2988db98 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.hash @@ -0,0 +1,4 @@ +# Locally computed +sha256 1edbbc55d47d3fd71dec99b15c2483e22738c642623a0fb86ef4a81a9067a2de xf86-video-ast-1.1.5.tar.bz2 +# Locally calculated +sha256 1cdd3d57e2fdcbd21b8a7b788ffbe6f809216a9bdd36b2225cff6c4b4404a170 COPYING diff --git a/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk new file mode 100644 index 00000000..b39bbf9a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-ast +# +################################################################################ + +XDRIVER_XF86_VIDEO_AST_VERSION = 1.1.5 +XDRIVER_XF86_VIDEO_AST_SOURCE = xf86-video-ast-$(XDRIVER_XF86_VIDEO_AST_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_AST_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_AST_LICENSE = MIT +XDRIVER_XF86_VIDEO_AST_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_AST_DEPENDENCIES = xorgproto xserver_xorg-server + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-ati/0001-Fix-link-failure-with-gcc-10.patch b/package/x11r7/xdriver_xf86-video-ati/0001-Fix-link-failure-with-gcc-10.patch new file mode 100644 index 00000000..b7a66c5c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/0001-Fix-link-failure-with-gcc-10.patch @@ -0,0 +1,35 @@ +From f223035f4ffcff2a9296d1e907a5193f8e8845a3 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 4 Feb 2020 16:38:06 -0500 +Subject: [PATCH xf86-video-ati] Fix link failure with gcc 10 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Without the 'extern' this looks like a definition not just a +declaration, in every file that includes the header. gcc 10 is stricter +about this kind of multiple definition. + +Reviewed-by: Michel Dänzer +[backport from upstream: f223035f4ffcff2a9296d1e907a5193f8e8845a3] +Signed-off-by: Romain Naour +--- + src/drmmode_display.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/drmmode_display.h b/src/drmmode_display.h +index 96eaef0a..8cd8a0a6 100644 +--- a/src/drmmode_display.h ++++ b/src/drmmode_display.h +@@ -262,7 +262,7 @@ Bool drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type, + uint64_t *ust, uint32_t *result_seq); + + +-miPointerSpriteFuncRec drmmode_sprite_funcs; ++extern miPointerSpriteFuncRec drmmode_sprite_funcs; + + + #endif +-- +2.25.4 + diff --git a/package/x11r7/xdriver_xf86-video-ati/Config.in b/package/x11r7/xdriver_xf86-video-ati/Config.in new file mode 100644 index 00000000..1246014d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI + bool "xf86-video-ati" + depends on BR2_i386 || BR2_x86_64 # DRI radeon r100 driver + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_RADEON + select BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XORGPROTO + help + ATI video driver + +comment "xf86-video-ati needs mesa3d" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.hash b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.hash new file mode 100644 index 00000000..c6f8c53e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-October/003027.html +md5 6e49d3c2839582af415ceded76e626e6 xf86-video-ati-19.1.0.tar.bz2 +sha1 aea1d11c05531b03f2eb67c6785cddf6d7f30e5f xf86-video-ati-19.1.0.tar.bz2 +sha256 659f5a1629eea5f5334d9b39b18e6807a63aa1efa33c1236d9cc53acbb223c49 xf86-video-ati-19.1.0.tar.bz2 +sha512 73a81f6c492daf2e89067fb52b3033dc0fe6841f109627ddca1aee54a45a738c8c134443753a2a2aaa2c131e1d560057ebc76351ff2304c16407df3ff568fcd6 xf86-video-ati-19.1.0.tar.bz2 +# Locally computed +sha256 58847c8e97190c401afa84b3f0b8b147379c876a184e99af2cb51bfd40ac8936 COPYING diff --git a/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk new file mode 100644 index 00000000..f7aeba8b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# xdriver_xf86-video-ati +# +################################################################################ + +XDRIVER_XF86_VIDEO_ATI_VERSION = 19.1.0 +XDRIVER_XF86_VIDEO_ATI_SOURCE = xf86-video-ati-$(XDRIVER_XF86_VIDEO_ATI_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_ATI_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_ATI_LICENSE = MIT +XDRIVER_XF86_VIDEO_ATI_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_ATI_DEPENDENCIES = \ + libdrm \ + xlib_libXcomposite \ + xorgproto \ + xserver_xorg-server + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGL)$(BR2_PACKAGE_LIBEPOXY),yyy) +XDRIVER_XF86_VIDEO_ATI_CONF_OPTS = --enable-glamor +else +XDRIVER_XF86_VIDEO_ATI_CONF_OPTS = --disable-glamor +endif + +# xdriver_xf86-video-ati requires O_CLOEXEC +XDRIVER_XF86_VIDEO_ATI_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-cirrus/Config.in b/package/x11r7/xdriver_xf86-video-cirrus/Config.in new file mode 100644 index 00000000..2987c3f0 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-cirrus/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_CIRRUS + bool "xf86-video-cirrus" + select BR2_PACKAGE_XORGPROTO + help + Cirrus Logic video driver diff --git a/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.hash b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.hash new file mode 100644 index 00000000..0600bce1 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2015-May/002600.html +sha256 edc87b20a55259126b5239b5c1ef913419eab7ded0ed12ae9ae989460d7351ab xf86-video-cirrus-1.5.3.tar.bz2 +# Locally calculated +sha256 a113cf02dcfa523593727790a17172080ac87d8de16e766bda4cbbe73dd8dc62 COPYING diff --git a/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk new file mode 100644 index 00000000..fa776a24 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-cirrus +# +################################################################################ + +XDRIVER_XF86_VIDEO_CIRRUS_VERSION = 1.5.3 +XDRIVER_XF86_VIDEO_CIRRUS_SOURCE = xf86-video-cirrus-$(XDRIVER_XF86_VIDEO_CIRRUS_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_CIRRUS_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_CIRRUS_LICENSE = MIT +XDRIVER_XF86_VIDEO_CIRRUS_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_CIRRUS_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-dummy/Config.in b/package/x11r7/xdriver_xf86-video-dummy/Config.in new file mode 100644 index 00000000..58c70a84 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-dummy/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_DUMMY + bool "xf86-video-dummy" + select BR2_PACKAGE_XORGPROTO + help + X.Org driver for dummy cards diff --git a/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.hash b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.hash new file mode 100644 index 00000000..3eac3840 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2016-December/002751.html +sha256 3712bb869307233491e4c570732d6073c0dc3d99adfdb9977396a3fdf84e95b9 xf86-video-dummy-0.3.8.tar.bz2 +# Locally calculated +sha256 e29aa81e74563d14e5633963107c030e74e8352ea7dafee1a9d7e19b7d0e887b COPYING diff --git a/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk new file mode 100644 index 00000000..3127f6cb --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-dummy +# +################################################################################ + +XDRIVER_XF86_VIDEO_DUMMY_VERSION = 0.3.8 +XDRIVER_XF86_VIDEO_DUMMY_SOURCE = xf86-video-dummy-$(XDRIVER_XF86_VIDEO_DUMMY_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_DUMMY_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_DUMMY_LICENSE = MIT +XDRIVER_XF86_VIDEO_DUMMY_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_DUMMY_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-fbdev/Config.in b/package/x11r7/xdriver_xf86-video-fbdev/Config.in new file mode 100644 index 00000000..0ecba482 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbdev/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV + bool "xf86-video-fbdev" + select BR2_PACKAGE_XORGPROTO + help + video driver for framebuffer device diff --git a/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.hash b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.hash new file mode 100644 index 00000000..dd3a9c38 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002324.html +sha256 dcc3d85f378022180e437a9ec00a59b6cb7680ff79c40394d695060af2374699 xf86-video-fbdev-0.5.0.tar.bz2 +# Locally calculated +sha256 e437aed89c3440a9fe7e19968a3f2eeb97041ef6c9616837a3fd42d0874fc0e6 COPYING diff --git a/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk new file mode 100644 index 00000000..a480befd --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-fbdev +# +################################################################################ + +XDRIVER_XF86_VIDEO_FBDEV_VERSION = 0.5.0 +XDRIVER_XF86_VIDEO_FBDEV_SOURCE = xf86-video-fbdev-$(XDRIVER_XF86_VIDEO_FBDEV_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_FBDEV_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_FBDEV_LICENSE = MIT +XDRIVER_XF86_VIDEO_FBDEV_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_FBDEV_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-fbturbo/0001-sunxi_x_g2d-drop-unused-dri2-include.patch b/package/x11r7/xdriver_xf86-video-fbturbo/0001-sunxi_x_g2d-drop-unused-dri2-include.patch new file mode 100644 index 00000000..8b4e817b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbturbo/0001-sunxi_x_g2d-drop-unused-dri2-include.patch @@ -0,0 +1,28 @@ +From 232c5b6924652f65ef5c047754e84b87b5fc6ac8 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Sat, 3 Oct 2015 19:01:38 +0200 +Subject: [PATCH] sunxi_x_g2d: drop unused dri2 include + +The driver doesn't use DRI for anything. + +[Upstream-status: submitted (https://github.com/ssvb/xf86-video-fbturbo/pull/45)] +Signed-off-by: Peter Korsgaard +--- + src/sunxi_x_g2d.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/sunxi_x_g2d.c b/src/sunxi_x_g2d.c +index d826027..8888abe 100644 +--- a/src/sunxi_x_g2d.c ++++ b/src/sunxi_x_g2d.c +@@ -31,7 +31,6 @@ + #include "xf86_OSproc.h" + #include "xf86.h" + #include "xf86drm.h" +-#include "dri2.h" + #include "damage.h" + #include "fb.h" + #include "gcstruct.h" +-- +2.1.4 + diff --git a/package/x11r7/xdriver_xf86-video-fbturbo/Config.in b/package/x11r7/xdriver_xf86-video-fbturbo/Config.in new file mode 100644 index 00000000..7acf93e2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbturbo/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBTURBO + bool "xf86-video-fbturbo" + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_XORGPROTO + help + video driver, primarily optimized for the devices powered + by the Allwinner SoC (A10, A13, A20). It can use some of + the 2D/3D hardware acceleration features. + + https://github.com/ssvb/xf86-video-fbturbo diff --git a/package/x11r7/xdriver_xf86-video-fbturbo/xdriver_xf86-video-fbturbo.hash b/package/x11r7/xdriver_xf86-video-fbturbo/xdriver_xf86-video-fbturbo.hash new file mode 100644 index 00000000..4b3cf8dd --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbturbo/xdriver_xf86-video-fbturbo.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 10411686de0a9d8b2cde300b0d68e9f1d22e3611470d357ef3afc337f123ca0f xdriver_xf86-video-fbturbo-0.4.0.tar.gz +sha256 8333e3fa5b0f8d8aceca2f060d4eceeb6033cefed2301b03c3e92f6e3ebbffce COPYING diff --git a/package/x11r7/xdriver_xf86-video-fbturbo/xdriver_xf86-video-fbturbo.mk b/package/x11r7/xdriver_xf86-video-fbturbo/xdriver_xf86-video-fbturbo.mk new file mode 100644 index 00000000..049a2b5b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbturbo/xdriver_xf86-video-fbturbo.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# xdriver_xf86-video-fbturbo +# +################################################################################ + +XDRIVER_XF86_VIDEO_FBTURBO_VERSION = 0.4.0 +XDRIVER_XF86_VIDEO_FBTURBO_SITE = $(call github,ssvb,xf86-video-fbturbo,$(XDRIVER_XF86_VIDEO_FBTURBO_VERSION)) +XDRIVER_XF86_VIDEO_FBTURBO_LICENSE = MIT +XDRIVER_XF86_VIDEO_FBTURBO_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_FBTURBO_DEPENDENCIES = \ + xserver_xorg-server \ + libdrm \ + pixman \ + xorgproto + +ifeq ($(BR2_PACKAGE_LIBPCIACCESS),y) +XDRIVER_XF86_VIDEO_FBTURBO_DEPENDENCIES += libpciaccess +XDRIVER_XF86_VIDEO_FBTURBO_CONF_OPTS += --enable-pciaccess +else +XDRIVER_XF86_VIDEO_FBTURBO_CONF_OPTS += --disable-pciaccess +endif + +define XDRIVER_XF86_VIDEO_FBTURBO_INSTALL_CONF_FILE + $(INSTALL) -m 0644 -D $(@D)/xorg.conf $(TARGET_DIR)/etc/X11/xorg.conf +endef + +XDRIVER_XF86_VIDEO_FBTURBO_POST_INSTALL_TARGET_HOOKS += XDRIVER_XF86_VIDEO_FBTURBO_INSTALL_CONF_FILE + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-geode/Config.in b/package/x11r7/xdriver_xf86-video-geode/Config.in new file mode 100644 index 00000000..b432f2d4 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-geode/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GEODE + bool "xf86-video-geode" + depends on BR2_i386 + select BR2_PACKAGE_XORGPROTO + help + video driver for geode device diff --git a/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.hash b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.hash new file mode 100644 index 00000000..7a66c28b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 f497d0bfb09f36c72e3467e2d701f57f6b03ab8992c5d570e66582f714f84d64 xf86-video-geode-2.11.20.tar.bz2 +sha256 3994ef7cee54f0935a4b57b1c34efd904da567931dd9e1a2d9390d22c8332ea2 COPYING diff --git a/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk new file mode 100644 index 00000000..dbeae1aa --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-geode +# +################################################################################ + +XDRIVER_XF86_VIDEO_GEODE_VERSION = 2.11.20 +XDRIVER_XF86_VIDEO_GEODE_SOURCE = xf86-video-geode-$(XDRIVER_XF86_VIDEO_GEODE_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_GEODE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_GEODE_LICENSE = MIT +XDRIVER_XF86_VIDEO_GEODE_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_GEODE_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-glint/Config.in b/package/x11r7/xdriver_xf86-video-glint/Config.in new file mode 100644 index 00000000..c474f6c9 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glint/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GLINT + bool "xf86-video-glint" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XORGPROTO + help + GLINT/Permedia video driver + +comment "xf86-video-glint needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.hash b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.hash new file mode 100644 index 00000000..40474ebc --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2017-January/002759.html +sha256 852833ab2ea9ce519195dfd061a6c7aa5945a093cdc19546d1e9e69df7d577d2 xf86-video-glint-1.2.9.tar.bz2 +# Locally calculated +sha256 6ca8e1a7e1d491f3618d3f14df1be64dbc8adefae7bbaf11d4920240dfb12f6e COPYING diff --git a/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk new file mode 100644 index 00000000..fba00307 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-glint +# +################################################################################ + +XDRIVER_XF86_VIDEO_GLINT_VERSION = 1.2.9 +XDRIVER_XF86_VIDEO_GLINT_SOURCE = xf86-video-glint-$(XDRIVER_XF86_VIDEO_GLINT_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_GLINT_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_GLINT_LICENSE = MIT +XDRIVER_XF86_VIDEO_GLINT_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_GLINT_DEPENDENCIES = xserver_xorg-server libdrm xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-i128/Config.in b/package/x11r7/xdriver_xf86-video-i128/Config.in new file mode 100644 index 00000000..4f4810cc --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-i128/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_I128 + bool "xf86-video-i128" + select BR2_PACKAGE_XORGPROTO + help + Number 9 I128 video driver diff --git a/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.hash b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.hash new file mode 100644 index 00000000..325e754f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-December/002932.html +md5 a980f1b8532ccfe81932580bc4e0f2a0 xf86-video-i128-1.4.0.tar.bz2 +sha1 56d5b897b2695222c13e59d2ade74620a99e1011 xf86-video-i128-1.4.0.tar.bz2 +sha256 8f2c0a6bf5a169dad3fc07c6dd4537b492d0e44489e4a1297311e617c3bed0ea xf86-video-i128-1.4.0.tar.bz2 +sha512 d58baee3f20b3ad2ece6853da0ff20a6d54b984c6e3289bad2715cc003b277a0b44d20ded25cfc116400468df552390bdb5d80fbd3fb60861488ee5d027664b2 xf86-video-i128-1.4.0.tar.bz2 +# Locally computed +sha256 7677424d79633dbf255a81bd4e05dd621931b89997af33c31522269ec2ed391e COPYING diff --git a/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk new file mode 100644 index 00000000..e44deaf6 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-i128 +# +################################################################################ + +XDRIVER_XF86_VIDEO_I128_VERSION = 1.4.0 +XDRIVER_XF86_VIDEO_I128_SOURCE = xf86-video-i128-$(XDRIVER_XF86_VIDEO_I128_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_I128_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_I128_LICENSE = MIT +XDRIVER_XF86_VIDEO_I128_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_I128_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-imx-viv/Config.in b/package/x11r7/xdriver_xf86-video-imx-viv/Config.in new file mode 100644 index 00000000..13cee14d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx-viv/Config.in @@ -0,0 +1,40 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX_VIV + bool "xf86-video-imx-viv" + depends on BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 + depends on BR2_PACKAGE_IMX_GPU_G2D + depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3d + select BR2_PACKAGE_MESA3D # Needed in order to compile xorg with glx/dri + select BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XORGPROTO + help + X.Org driver for iMX6 GPU (Vivante) + + Notice EGL and GLes2 APIs are correctly supported. This + driver should also be able to provide Desktop OpenGL + implementation but, this feature seems broken since quite + some time. + + To use this driver, add correct configuration to your + /etc/X11/xorg.conf: + + Section "Device" + [...] + Driver "vivante" + Option "vivante_fbdev" "/dev/fbX" + EndSection + + Don't forget to load galcore.ko and create /dev/galcore + before using this driver (else, Xorg will exit with an + obscur message like "Segmentation fault at address 0xc"). + +comment "xf86-video-imx-viv depends on imx-gpu-viv with X11 output" + depends on BR2_arm + depends on !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 + depends on BR2_TOOLCHAIN_HAS_SYNC_1 + +comment "xf86-video-imx-viv depends on imx-gpu-g2d" + depends on BR2_arm + depends on !BR2_PACKAGE_IMX_GPU_G2D + depends on BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 + depends on BR2_TOOLCHAIN_HAS_SYNC_1 diff --git a/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.hash b/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.hash new file mode 100644 index 00000000..5873b4b1 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 638a8aa8b64f860900d003527529689bc342d18ff5e41a9e1750884544898e67 xdriver_xf86-video-imx-viv-rel_imx_4.9.x_1.0.0_ga-br1.tar.gz +sha256 9d3e373f0440cc0c58853e963636a7c1ffda9308ec5f30ebe9adfb9c16a8a1e4 COPYING-MIT diff --git a/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.mk b/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.mk new file mode 100644 index 00000000..09134275 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# xdriver_xf86-video-imx-viv +# +################################################################################ + +XDRIVER_XF86_VIDEO_IMX_VIV_VERSION = rel_imx_4.9.x_1.0.0_ga +XDRIVER_XF86_VIDEO_IMX_VIV_SITE = https://source.codeaurora.org/external/imx/xf86-video-imx-vivante +XDRIVER_XF86_VIDEO_IMX_VIV_SITE_METHOD = git +XDRIVER_XF86_VIDEO_IMX_VIV_DEPENDENCIES = imx-gpu-viv imx-gpu-g2d xserver_xorg-server \ + xorgproto libdrm +XDRIVER_XF86_VIDEO_IMX_VIV_LICENSE = MIT +XDRIVER_XF86_VIDEO_IMX_VIV_LICENSE_FILES = COPYING-MIT +XDRIVER_XF86_VIDEO_IMX_VIV_INSTALL_STAGING = YES +XDRIVER_XF86_VIDEO_IMX_VIV_MAKE_CMD = $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/EXA/src -f makefile.linux + +define XDRIVER_XF86_VIDEO_IMX_VIV_BUILD_CMDS + $(XDRIVER_XF86_VIDEO_IMX_VIV_MAKE_CMD) sysroot=$(STAGING_DIR) \ + BUSID_HAS_NUMBER=1 BUILD_IN_YOCTO=1 XSERVER_GREATER_THAN_13=1 \ + CFLAGS="$(TARGET_CFLAGS)" +endef + +define XDRIVER_XF86_VIDEO_IMX_VIV_INSTALL_STAGING_CMDS + $(XDRIVER_XF86_VIDEO_IMX_VIV_MAKE_CMD) prefix=$(STAGING_DIR)/usr install + $(INSTALL) -D -m 644 $(@D)/EXA/src/vivante_gal/vivante_priv.h \ + $(STAGING_DIR)/usr/include/vivante_priv.h + $(INSTALL) -D -m 644 $(@D)/EXA/src/vivante_gal/vivante_gal.h \ + $(STAGING_DIR)/usr/include/vivante_gal.h +endef + +define XDRIVER_XF86_VIDEO_IMX_VIV_INSTALL_TARGET_CMDS + $(XDRIVER_XF86_VIDEO_IMX_VIV_MAKE_CMD) prefix=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/x11r7/xdriver_xf86-video-imx/0001-Update-to-newer-swap-macros.patch b/package/x11r7/xdriver_xf86-video-imx/0001-Update-to-newer-swap-macros.patch new file mode 100644 index 00000000..05be6b32 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0001-Update-to-newer-swap-macros.patch @@ -0,0 +1,65 @@ +From fc7f191a1a0f290a4e808dd8f9bd58ba1dbd2be4 Mon Sep 17 00:00:00 2001 +From: Otavio Salvador +Date: Sat, 29 Dec 2012 18:00:36 -0200 +Subject: [PATCH 1/2] ext: Update to newer swap macros + +The swap macros now use an internal temporary variable so we need to +adapt the code according. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador +--- + src/imx_ext.c | 16 ++++++---------- + 1 file changed, 6 insertions(+), 10 deletions(-) + +diff --git a/src/imx_ext.c b/src/imx_ext.c +index f12469a..710cba4 100644 +--- a/src/imx_ext.c ++++ b/src/imx_ext.c +@@ -57,8 +57,6 @@ void imxExtInit() + static int + Proc_IMX_EXT_GetPixmapPhysAddr(ClientPtr client) + { +- int n; +- + REQUEST(xIMX_EXT_GetPixmapPhysAddrReq); + REQUEST_SIZE_MATCH(xIMX_EXT_GetPixmapPhysAddrReq); + +@@ -96,10 +94,10 @@ Proc_IMX_EXT_GetPixmapPhysAddr(ClientPtr client) + /* Check if any reply values need byte swapping */ + if (client->swapped) { + +- swaps(&rep.sequenceNumber, n); +- swapl(&rep.length, n); +- swapl(&rep.pixmapPhysAddr, n); +- swapl(&rep.pixmapPitch, n); ++ swaps(&rep.sequenceNumber); ++ swapl(&rep.length); ++ swapl(&rep.pixmapPhysAddr); ++ swapl(&rep.pixmapPitch); + } + + /* Reply to client */ +@@ -123,16 +121,14 @@ Proc_IMX_EXT_Dispatch(ClientPtr client) + static int + SProc_IMX_EXT_GetPixmapPhysAddr(ClientPtr client) + { +- int n; +- + REQUEST(xIMX_EXT_GetPixmapPhysAddrReq); + + /* Swap request message length and verify it is correct. */ +- swaps(&stuff->length, n); ++ swaps(&stuff->length); + REQUEST_SIZE_MATCH(xIMX_EXT_GetPixmapPhysAddrReq); + + /* Swap remaining request message parameters. */ +- swapl(&stuff->pixmap, n); ++ swapl(&stuff->pixmap); + + return Proc_IMX_EXT_GetPixmapPhysAddr(client); + } +-- +1.7.10.4 + diff --git a/package/x11r7/xdriver_xf86-video-imx/0002-Fix-error-unknown-type-name-uint.patch b/package/x11r7/xdriver_xf86-video-imx/0002-Fix-error-unknown-type-name-uint.patch new file mode 100644 index 00000000..6a2fcdf4 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0002-Fix-error-unknown-type-name-uint.patch @@ -0,0 +1,33 @@ +From ccdfce5e75ba707deacdd5808a8f3de8744848d0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eric=20B=C3=A9nard?= +Date: Tue, 5 Feb 2013 10:57:47 +0100 +Subject: [PATCH] Fix "error: unknown type name 'uint'" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In file included from imx_driver.c:33:0: +.../sysroots/imx53qsb/usr/src/kernel/include/linux/mxcfb.h:107:2: error: unknown type name 'uint' + +Upstream-Status: Pending + +Signed-off-by: Eric Bénard +--- + src/imx_driver.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/imx_driver.c b/src/imx_driver.c +index f4b3e38..4cf662d 100644 +--- a/src/imx_driver.c ++++ b/src/imx_driver.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +1.7.10.4 + diff --git a/package/x11r7/xdriver_xf86-video-imx/0003-support-glibc-2.20.patch b/package/x11r7/xdriver_xf86-video-imx/0003-support-glibc-2.20.patch new file mode 100644 index 00000000..3b1b84d1 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0003-support-glibc-2.20.patch @@ -0,0 +1,57 @@ +Fix build errors seen with glibc 2.20 + +/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/imx53qsb/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__' + strndup(const char *str, size_t n); + ^ + +Signed-off-by: Khem Raj +Upstream-Status: Pending +Index: xserver-xorg-video-imx-11.09.01/src/imx_accel.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_accel.c 2011-07-26 14:22:47.000000000 -0700 ++++ xserver-xorg-video-imx-11.09.01/src/imx_accel.c 2014-08-29 15:54:43.648070587 -0700 +@@ -21,6 +21,7 @@ + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ ++#include + + #include + #include "xf86.h" +Index: xserver-xorg-video-imx-11.09.01/src/imx_exa_offscreen.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_exa_offscreen.c 2014-08-29 15:26:31.992070587 -0700 ++++ xserver-xorg-video-imx-11.09.01/src/imx_exa_offscreen.c 2014-08-29 15:54:54.632070587 -0700 +@@ -53,7 +53,7 @@ + * When allocating, the contiguous block of areas with the minimum eviction + * cost is found and evicted in order to make room for the new allocation. + */ +- ++#include + + #include "xf86.h" + #include "exa.h" +Index: xserver-xorg-video-imx-11.09.01/src/imx_exa_z160.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_exa_z160.c 2014-08-29 15:26:31.992070587 -0700 ++++ xserver-xorg-video-imx-11.09.01/src/imx_exa_z160.c 2014-08-29 15:54:36.056070587 -0700 +@@ -21,6 +21,7 @@ + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ ++#include + + #include "xf86.h" + #include "xf86_OSproc.h" +Index: xserver-xorg-video-imx-11.09.01/src/imx_ext.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_ext.c 2014-08-29 15:26:32.064070587 -0700 ++++ xserver-xorg-video-imx-11.09.01/src/imx_ext.c 2014-08-29 15:55:18.048070587 -0700 +@@ -21,6 +21,7 @@ + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ ++#include + + #include + #include diff --git a/package/x11r7/xdriver_xf86-video-imx/0004-Make-video-API-forward-and-backward-compatible.patch b/package/x11r7/xdriver_xf86-video-imx/0004-Make-video-API-forward-and-backward-compatible.patch new file mode 100644 index 00000000..2ac6311f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0004-Make-video-API-forward-and-backward-compatible.patch @@ -0,0 +1,787 @@ +From 5216cb0f14414b5451f58df48a36c1c62c035276 Mon Sep 17 00:00:00 2001 +From: Otavio Salvador +Date: Sat, 29 Dec 2012 18:02:11 -0200 +Subject: [PATCH] Make video API forward and backward compatible + +This updates the video API in a forward and backward compatible way +using the "compat-api.h" as used in Xorg maintained drivers. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador +--- + src/compat-api.h | 106 +++++++++++++++++++++++++++++++++++++++++++++++ + src/imx_display.c | 22 +++++----- + src/imx_display.h | 8 ++-- + src/imx_driver.c | 60 ++++++++++++++------------- + src/imx_exa_offscreen.c | 12 +++--- + src/imx_exa_z160.c | 53 ++++++++++++------------ + src/imx_xv_ipu.c | 4 +- + 7 files changed, 188 insertions(+), 77 deletions(-) + create mode 100644 src/compat-api.h + +diff --git a/src/compat-api.h b/src/compat-api.h +new file mode 100644 +index 0000000..73ac8a2 +--- /dev/null ++++ b/src/compat-api.h +@@ -0,0 +1,106 @@ ++/* ++ * Copyright 2012 Red Hat, Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ * DEALINGS IN THE SOFTWARE. ++ * ++ * Author: Dave Airlie ++ */ ++ ++/* this file provides API compat between server post 1.13 and pre it, ++ it should be reused inside as many drivers as possible */ ++#ifndef COMPAT_API_H ++#define COMPAT_API_H ++ ++#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR ++#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] ++#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p ++#endif ++ ++#ifndef XF86_HAS_SCRN_CONV ++#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] ++#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] ++#endif ++ ++#ifndef XF86_SCRN_INTERFACE ++ ++#define SCRN_ARG_TYPE int ++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] ++ ++#define SCREEN_ARG_TYPE int ++#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] ++ ++#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char **argv ++ ++#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask ++#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask ++ ++#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen ++#define CLOSE_SCREEN_ARGS scrnIndex, pScreen ++#define CLOSE_SCREEN_DECL_ScrnInfoPtr ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ ++#define FBDEVHWADJUSTFRAME_ARGS(x, y) scrnIndex, (x), (y), 0 ++ ++#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags ++ ++#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags ++ ++#define FREE_SCREEN_ARGS_DECL int arg, int flags ++#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0 ++ ++#define VT_FUNC_ARGS_DECL int arg, int flags ++#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags) ++ ++#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn->scrnIndex, b ++ ++#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex) ++#else ++#define SCRN_ARG_TYPE ScrnInfoPtr ++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) ++ ++#define SCREEN_ARG_TYPE ScreenPtr ++#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) ++ ++#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv ++ ++#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask ++#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask ++ ++#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen ++#define CLOSE_SCREEN_ARGS pScreen ++#define CLOSE_SCREEN_DECL_ScrnInfoPtr ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ++#define FBDEVHWADJUSTFRAME_ARGS(x, y) pScrn, (x), (y) ++ ++#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y ++#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode ++ ++#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg ++#define FREE_SCREEN_ARGS(x) (x) ++ ++#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg ++#define VT_FUNC_ARGS(flags) pScrn ++ ++#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn, b ++ ++#define XF86_ENABLEDISABLEFB_ARG(x) (x) ++ ++#endif ++ ++#endif +diff --git a/src/imx_display.c b/src/imx_display.c +index fcb8195..e2dc36a 100644 +--- a/src/imx_display.c ++++ b/src/imx_display.c +@@ -42,6 +42,8 @@ + #include "imx.h" + #include "imx_display.h" + ++#include "compat-api.h" ++ + #include + + #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,7,6,0,0) +@@ -1373,19 +1375,19 @@ imxDisplayPreInit(ScrnInfoPtr pScrn) + Bool + imxDisplayStartScreenInit(int scrnIndex, ScreenPtr pScreen) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr fPtr = IMXPTR(pScrn); + + if (!xf86SetDesiredModes(pScrn)) { + +- xf86DrvMsg(scrnIndex, X_ERROR, "mode initialization failed\n"); ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mode initialization failed\n"); + return FALSE; + } + + #if 0 + if (!fbdevHWModeInit(pScrn, pScrn->currentMode)) { + +- xf86DrvMsg(scrnIndex, X_ERROR, "mode initialization failed\n"); ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mode initialization failed\n"); + return FALSE; + } + pScrn->displayWidth = +@@ -1463,29 +1465,29 @@ imxDisplayFinishScreenInit(int scrnIndex, ScreenPtr pScreen) + /* -------------------------------------------------------------------- */ + + Bool +-imxDisplaySwitchMode(int scrnIndex, DisplayModePtr mode, int flags) ++imxDisplaySwitchMode(SWITCH_MODE_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ SCRN_INFO_PTR(arg); + + return xf86SetSingleMode(pScrn, mode, RR_Rotate_0); + } + + void +-imxDisplayAdjustFrame(int scrnIndex, int x, int y, int flags) ++imxDisplayAdjustFrame(ADJUST_FRAME_ARGS_DECL) + { +-// fbdevHWAdjustFrame(scrnIndex, x, y, flags); ++// fbdevHWAdjustFrame(pScrn->scrnIndex, x, y, flags); + } + + Bool +-imxDisplayEnterVT(int scrnIndex, int flags) ++imxDisplayEnterVT(VT_FUNC_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ SCRN_INFO_PTR(arg); + + return xf86SetDesiredModes(pScrn); + } + + void +-imxDisplayLeaveVT(int scrnIndex, int flags) ++imxDisplayLeaveVT(VT_FUNC_ARGS_DECL) + { + } + +diff --git a/src/imx_display.h b/src/imx_display.h +index 4a5d5aa..3a3d43a 100644 +--- a/src/imx_display.h ++++ b/src/imx_display.h +@@ -59,16 +59,16 @@ imxDisplayValidMode(int scrnIndex, DisplayModePtr mode, + Bool verbose, int flags); + + extern Bool +-imxDisplaySwitchMode(int scrnIndex, DisplayModePtr mode, int flags); ++imxDisplaySwitchMode(SWITCH_MODE_ARGS_DECL); + + extern void +-imxDisplayAdjustFrame(int scrnIndex, int x, int y, int flags); ++imxDisplayAdjustFrame(ADJUST_FRAME_ARGS_DECL); + + extern Bool +-imxDisplayEnterVT(int scrnIndex, int flags); ++imxDisplayEnterVT(VT_FUNC_ARGS_DECL); + + extern void +-imxDisplayLeaveVT(int scrnIndex, int flags); ++imxDisplayLeaveVT(VT_FUNC_ARGS_DECL); + + extern Bool + imxDisplayChangeFrameBufferRotateEPDC(int scrnIndex, int fbRotate); +diff --git a/src/imx_driver.c b/src/imx_driver.c +index 178e36e..f4b3e38 100644 +--- a/src/imx_driver.c ++++ b/src/imx_driver.c +@@ -46,6 +46,8 @@ + #include "fb.h" + #include "fbdevhw.h" + ++#include "compat-api.h" ++ + #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 + #include "xf86Resources.h" + #include "xf86RAC.h" +@@ -435,17 +437,17 @@ errorPreInit: + } + + static void +-imxFreeScreen(int scrnIndex, int flags) ++imxFreeScreen(FREE_SCREEN_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ SCRN_INFO_PTR(arg); + + imxFreeRec(pScrn); + } + + static Bool +-imxCloseScreen(int scrnIndex, ScreenPtr pScreen) ++imxCloseScreen(CLOSE_SCREEN_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ CLOSE_SCREEN_DECL_ScrnInfoPtr; + ImxPtr fPtr = IMXPTR(pScrn); + + fbdevHWRestore(pScrn); +@@ -453,7 +455,7 @@ imxCloseScreen(int scrnIndex, ScreenPtr pScreen) + pScrn->vtSema = FALSE; + + pScreen->CloseScreen = fPtr->saveCloseScreen; +- return (*pScreen->CloseScreen)(scrnIndex, pScreen); ++ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); + } + + static int +@@ -488,9 +490,9 @@ LCM(a, b) + } + + static Bool +-imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) ++imxScreenInit(SCREEN_INIT_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr fPtr = IMXPTR(pScrn); + VisualPtr visual; + int init_picture = 0; +@@ -514,7 +516,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + /* Map frame buffer memory */ + fPtr->fbMemoryBase = fbdevHWMapVidmem(pScrn); + if (NULL == fPtr->fbMemoryBase) { +- xf86DrvMsg(scrnIndex,X_ERROR,"mapping of video memory" ++ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"mapping of video memory" + " failed\n"); + return FALSE; + } +@@ -558,7 +560,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + const int fbOffsetScreen2 = + IMX_ALIGN(fbMaxScreenSize, fbMaxAlignOffset); + fPtr->fbMemoryScreenReserve = fbMaxScreenSize; +- xf86DrvMsg(scrnIndex, X_INFO, ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "reserve %d bytes of frame buffer for screen\n", + fPtr->fbMemoryScreenReserve); + fPtr->fbMemoryStart2 = NULL; +@@ -568,12 +570,12 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + + fPtr->fbMemoryScreenReserve += fbOffsetScreen2; + +- xf86DrvMsg(scrnIndex, X_INFO, ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "reserve same number of bytes for XRandR rotated screen at offset %d\n", + fbOffsetScreen2); + } + +- if (!imxDisplayStartScreenInit(scrnIndex, pScreen)) { ++ if (!imxDisplayStartScreenInit(pScrn->scrnIndex, pScreen)) { + + return FALSE; + } +@@ -582,7 +584,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + miClearVisualTypes(); + if (pScrn->bitsPerPixel > 8) { + if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, TrueColor)) { +- xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed" ++ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"visual type setup failed" + " for %d bits per pixel [1]\n", + pScrn->bitsPerPixel); + return FALSE; +@@ -591,14 +593,14 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + if (!miSetVisualTypes(pScrn->depth, + miGetDefaultVisualMask(pScrn->depth), + pScrn->rgbBits, pScrn->defaultVisual)) { +- xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed" ++ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"visual type setup failed" + " for %d bits per pixel [2]\n", + pScrn->bitsPerPixel); + return FALSE; + } + } + if (!miSetPixmapDepths()) { +- xf86DrvMsg(scrnIndex,X_ERROR,"pixmap depth setup failed\n"); ++ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"pixmap depth setup failed\n"); + return FALSE; + } + +@@ -607,10 +609,10 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + has a padding which is independent from the depth (controlfb) */ + pScrn->displayWidth = fbdevHWGetLineLength(pScrn) / + (pScrn->bitsPerPixel / 8); +- xf86DrvMsg(scrnIndex, X_INFO, "displayWidth = %d\n", pScrn->displayWidth); ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "displayWidth = %d\n", pScrn->displayWidth); + + if (pScrn->displayWidth != pScrn->virtualX) { +- xf86DrvMsg(scrnIndex, X_INFO, ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Pitch updated to %d after ModeInit\n", + pScrn->displayWidth); + } +@@ -633,7 +635,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + init_picture = 1; + break; + default: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: invalid number of bits per" + " pixel (%d) encountered in" + " imxScreenInit()\n", pScrn->bitsPerPixel); +@@ -644,7 +646,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + case FBDEVHW_INTERLEAVED_PLANES: + /* This should never happen ... + * we should check for this much much earlier ... */ +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: interleaved planes are not yet " + "supported by the imx driver\n"); + ret = FALSE; +@@ -652,20 +654,20 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + case FBDEVHW_TEXT: + /* This should never happen ... + * we should check for this much much earlier ... */ +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: text mode is not supported by the " + "imx driver\n"); + ret = FALSE; + break; + case FBDEVHW_VGA_PLANES: + /* Not supported yet */ +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: EGA/VGA Planes are not yet " + "supported by the imx driver\n"); + ret = FALSE; + break; + default: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: unrecognised hardware type (%d) " + "encountered in imxScreenInit()\n", type); + ret = FALSE; +@@ -699,7 +701,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + /* INIT ACCELERATION BEFORE INIT FOR BACKING STORE & SOFTWARE CURSOR */ + if (fPtr->useAccel) { + +- if (!imxExaZ160Setup(scrnIndex, pScreen)) { ++ if (!imxExaZ160Setup(pScrn->scrnIndex, pScreen)) { + + fPtr->useAccel = FALSE; + } +@@ -731,29 +733,29 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + /* XXX It would be simpler to use miCreateDefColormap() in all cases. */ + case FBDEVHW_PACKED_PIXELS: + if (!miCreateDefColormap(pScreen)) { +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: miCreateDefColormap failed " + "in imxScreenInit()\n"); + return FALSE; + } + break; + case FBDEVHW_INTERLEAVED_PLANES: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: interleaved planes are not yet " + "supported by the imx driver\n"); + return FALSE; + case FBDEVHW_TEXT: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: text mode is not supported by " + "the imx driver\n"); + return FALSE; + case FBDEVHW_VGA_PLANES: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: EGA/VGA planes are not yet " + "supported by the imx driver\n"); + return FALSE; + default: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: unrecognised imx hardware type " + "(%d) encountered in imxScreenInit()\n", type); + return FALSE; +@@ -782,7 +784,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + } + #endif + +- if (!imxDisplayFinishScreenInit(scrnIndex, pScreen)) { ++ if (!imxDisplayFinishScreenInit(pScrn->scrnIndex, pScreen)) { + return FALSE; + } + +@@ -810,7 +812,7 @@ IMXGetPixmapProperties( + } + + /* Access screen associated with this pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Check if the screen associated with this pixmap has IMX driver. */ + if (0 != strcmp(IMX_DRIVER_NAME, pScrn->driverName)) { +diff --git a/src/imx_exa_offscreen.c b/src/imx_exa_offscreen.c +index 3a5c24d..0fbe2fc 100644 +--- a/src/imx_exa_offscreen.c ++++ b/src/imx_exa_offscreen.c +@@ -79,7 +79,7 @@ static void + imxExaOffscreenValidate (ScreenPtr pScreen) + { + /* Access the driver specific data. */ +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + ExaOffscreenArea *prev = 0, *area; +@@ -135,7 +135,7 @@ imxExaOffscreenMerge (ImxExaPtr imxExaPtr, ExaOffscreenArea *area) + ExaOffscreenArea * + imxExaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + ExaOffscreenArea *next = area->next; +@@ -281,7 +281,7 @@ imxExaOffscreenAlloc (ScreenPtr pScreen, int size, int align, + pointer privData) + { + ExaOffscreenArea *area; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + int real_size = 0, largest_avail = 0; +@@ -418,7 +418,7 @@ imxExaOffscreenSwapIn (ScreenPtr pScreen) + Bool + imxExaOffscreenInit (ScreenPtr pScreen) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + ExaOffscreenArea *area; +@@ -453,7 +453,7 @@ imxExaOffscreenInit (ScreenPtr pScreen) + void + imxExaOffscreenFini (ScreenPtr pScreen) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + ExaOffscreenArea *area; +@@ -472,7 +472,7 @@ imxExaOffscreenFini (ScreenPtr pScreen) + void + imxExaOffscreenSwapOut (ScreenPtr pScreen) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + +diff --git a/src/imx_exa_z160.c b/src/imx_exa_z160.c +index fb718e0..3d0bc96 100644 +--- a/src/imx_exa_z160.c ++++ b/src/imx_exa_z160.c +@@ -32,6 +32,7 @@ + #include + #include + ++#include "compat-api.h" + + /* Set if handles pixmap allocation and migration, i.e, EXA_HANDLES_PIXMAPS */ + #define IMX_EXA_ENABLE_HANDLES_PIXMAPS \ +@@ -299,7 +300,7 @@ imxExaZ160GetPixmapAddress(PixmapPtr pPixmap) + return fPixmapPtr->ptr; + #else + /* Access screen associated with this pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -344,7 +345,7 @@ imxExaZ160GetPixmapProperties( + #else + + /* Access screen associated with this pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Make sure pixmap is in framebuffer */ + if (!exaDrawableIsOffscreen(&(pPixmap->drawable))) { +@@ -856,7 +857,7 @@ imxExaZ160SyncIfBusyPixmap(PixmapPtr pPixmap) + { + /* Access screen associated with this pixmap. */ + ScreenPtr pScreen = pPixmap->drawable.pScreen; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + + /* Access driver specific data for screen. */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -924,7 +925,7 @@ imxExaZ160CreatePixmap2(ScreenPtr pScreen, int width, int height, + } + + /* Access the driver specific data. */ +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaZ160Ptr fPtr = IMXEXAZ160PTR(imxPtr); + +@@ -1028,7 +1029,7 @@ imxExaZ160DestroyPixmap(ScreenPtr pScreen, void *driverPriv) + ImxExaPixmapPtr fPixmapPtr = (ImxExaPixmapPtr)driverPriv; + + /* Access the driver specific data. */ +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaZ160Ptr fPtr = IMXEXAZ160PTR(imxPtr); + +@@ -1068,7 +1069,7 @@ imxExaZ160ModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, + } + + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1194,7 +1195,7 @@ imxExaZ160TrackBusyPixmap(ImxExaZ160Ptr fPtr, PixmapPtr pPixmap) + static void + imxExaZ160WaitMarker(ScreenPtr pScreen, int marker) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + + /* Access driver specific data associated with the screen. */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1249,7 +1250,7 @@ imxExaZ160PrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg) + } + + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1352,7 +1353,7 @@ static void + imxExaZ160Solid(PixmapPtr pPixmap, int x1, int y1, int x2, int y2) + { + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1423,7 +1424,7 @@ static void + imxExaZ160DoneSolid(PixmapPtr pPixmap) + { + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1485,7 +1486,7 @@ imxExaZ160PrepareCopy( + } + + /* Access the screen associated with this pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1599,7 +1600,7 @@ static void + imxExaZ160Copy(PixmapPtr pPixmapDst, int srcX, int srcY, int dstX, int dstY, int width, int height) + { + /* Access screen associated with dst pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1661,7 +1662,7 @@ static void + imxExaZ160DoneCopy(PixmapPtr pPixmapDst) + { + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1770,7 +1771,7 @@ imxExaZ160CheckComposite(int op, PicturePtr pPictureSrc, PicturePtr pPictureMask + } + + /* Access screen associated with dst pixmap (same screen as for src pixmap). */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Check the number of entities, and fail if it isn't one. */ + if (pScrn->numEntities != 1) { +@@ -1987,7 +1988,7 @@ imxExaZ160PrepareComposite( + { + /* Access screen associated with dst pixmap. */ + /* Should be same screen as for src pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* NOTE - many preconditions already verified in CheckComposite. */ + +@@ -2196,7 +2197,7 @@ imxExaZ160Composite( + int height) + { + /* Access screen associated with dst pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -2275,7 +2276,7 @@ static void + imxExaZ160DoneComposite(PixmapPtr pPixmapDst) + { + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -2323,7 +2324,7 @@ imxExaZ160UploadToScreen( + + /* Access screen associated with this pixmap */ + ScreenPtr pScreen = pPixmapDst->drawable.pScreen; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -2381,7 +2382,7 @@ imxExaZ160DownloadFromScreen( + + /* Access screen associated with this pixmap */ + ScreenPtr pScreen = pPixmapSrc->drawable.pScreen; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -2412,9 +2413,9 @@ imxExaZ160DownloadFromScreen( + } + + Bool +-imxExaZ160CloseScreen(int scrnIndex, ScreenPtr pScreen) ++imxExaZ160CloseScreen(CLOSE_SCREEN_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ CLOSE_SCREEN_DECL_ScrnInfoPtr; + ImxPtr imxPtr = IMXPTR(pScrn); + + ImxExaZ160Ptr fPtr = IMXEXAZ160PTR(imxPtr); +@@ -2504,7 +2505,7 @@ imxExaZ160CloseScreen(int scrnIndex, ScreenPtr pScreen) + /* Install our CloseScreen function so that it gets called. */ + if (NULL != pScreen->CloseScreen) { + +- return (*pScreen->CloseScreen)(scrnIndex, pScreen); ++ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); + } + + return TRUE; +@@ -2514,7 +2515,7 @@ Bool + imxExaZ160Setup(int scrnIndex, ScreenPtr pScreen) + { + /* Access the screen info and then private data structures. */ +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + + /* Private data structure must not already be in use. */ +@@ -2582,7 +2583,7 @@ imxExaZ160Setup(int scrnIndex, ScreenPtr pScreen) + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Initialize Z160 interfaces failed.\n"); +- imxExaZ160CloseScreen(scrnIndex, pScreen); ++ imxExaZ160CloseScreen(CLOSE_SCREEN_ARGS); + return FALSE; + } + +@@ -2592,7 +2593,7 @@ imxExaZ160Setup(int scrnIndex, ScreenPtr pScreen) + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Allocate EXA driver structure.\n"); +- imxExaZ160CloseScreen(scrnIndex, pScreen); ++ imxExaZ160CloseScreen(CLOSE_SCREEN_ARGS); + return FALSE; + } + +@@ -2657,7 +2658,7 @@ imxExaZ160Setup(int scrnIndex, ScreenPtr pScreen) + if (!exaDriverInit(pScreen, exaDriverPtr)) { + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "EXA initialization failed.\n"); +- imxExaZ160CloseScreen(scrnIndex, pScreen); ++ imxExaZ160CloseScreen(CLOSE_SCREEN_ARGS); + return FALSE; + } + fPtr->imxExaRec.exaDriverPtr = exaDriverPtr; +diff --git a/src/imx_xv_ipu.c b/src/imx_xv_ipu.c +index a517742..fc8a827 100644 +--- a/src/imx_xv_ipu.c ++++ b/src/imx_xv_ipu.c +@@ -398,7 +398,7 @@ xf86XVFillKeyHelper1 (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) + xRectangle *rects; + GCPtr gc; + +- if(!xf86Screens[pScreen->myNum]->vtSema) return; ++ if(!xf86ScreenToScrn(pScreen)->vtSema) return; + + gc = GetScratchGC(root->depth, pScreen); + pval[0] = key; +@@ -771,7 +771,7 @@ MXXVInitializeAdaptor + XF86VideoAdaptorPtr **pppAdaptor + ) + { +- ScreenPtr pScreen = screenInfo.screens[pScreenInfo->scrnIndex]; ++ ScreenPtr pScreen = xf86ScrnToScreen(pScreenInfo); + XF86VideoAdaptorPtr *ppAdaptor = NULL; + IMXPtr fPtr = IMXPTR(pScreenInfo); + int nAdaptor; +-- +1.7.10.4 + diff --git a/package/x11r7/xdriver_xf86-video-imx/0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch b/package/x11r7/xdriver_xf86-video-imx/0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch new file mode 100644 index 00000000..64af7732 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch @@ -0,0 +1,53 @@ +From 5b348e7be67957f4be6fcfa4942128c04f6db905 Mon Sep 17 00:00:00 2001 +From: Adrian Alonso +Date: Thu, 4 Aug 2011 14:24:26 -0500 +Subject: [PATCH] xf86-video-imxfb: fix m4 hardcodded paths + +* Fix m4 macros lookup location; remove /usr/share/aclocal path + +Signed-off-by: Adrian Alonso +--- + Makefile.am | 2 +- + Makefile.in | 2 +- + configure.ac | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 6752256..e205657 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -20,4 +20,4 @@ + + AUTOMAKE_OPTIONS = foreign + SUBDIRS = src +-ACLOCAL_AMFLAGS = -I /usr/share/aclocal ++ACLOCAL_AMFLAGS = -I m4 +diff --git a/Makefile.in b/Makefile.in +index 5c0ba0e..f829db7 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -243,7 +243,7 @@ top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = foreign + SUBDIRS = src +-ACLOCAL_AMFLAGS = -I /usr/share/aclocal ++ACLOCAL_AMFLAGS = -I m4 + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +diff --git a/configure.ac b/configure.ac +index a1ac73b..0078b86 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -29,7 +29,7 @@ AC_INIT([xf86-video-imx], + AC_CONFIG_SRCDIR([Makefile.am]) + AM_CONFIG_HEADER([config.h]) + AC_CONFIG_AUX_DIR(.) +-AC_CONFIG_MACRO_DIR([/usr/share/aclocal]) ++AC_CONFIG_MACRO_DIR([m4]) + + AM_INIT_AUTOMAKE([dist-bzip2]) + +-- +1.7.4.1 + diff --git a/package/x11r7/xdriver_xf86-video-imx/0006-xserver-1.14-compat.patch b/package/x11r7/xdriver_xf86-video-imx/0006-xserver-1.14-compat.patch new file mode 100644 index 00000000..14ccbbf9 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0006-xserver-1.14-compat.patch @@ -0,0 +1,34 @@ +Fix building using new Xorg 1.14 + +mibstore functions are no longer supported. This patch removes them +from this driver, following the pattern in +http://patches.openembedded.org/patch/46133/ + +This checkin shows when/where the changes to the X server were made +that deleted the header mibstore.h and mentions the reasons. +http://lists.x.org/archives/xorg-devel/2012-September/033575.html + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador + +Index: xserver-xorg-video-imx-11.09.01/src/imx_driver.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_driver.c ++++ xserver-xorg-video-imx-11.09.01/src/imx_driver.c +@@ -37,7 +37,6 @@ + #include "xf86_OSproc.h" + + #include "mipointer.h" +-#include "mibstore.h" + #include "micmap.h" + #include "colormapst.h" + #include "xf86cmap.h" +@@ -722,7 +721,6 @@ imxScreenInit(SCREEN_INIT_ARGS_DECL) + /* Initialize for X extensions. */ + imxExtInit(); + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + + /* software cursor */ diff --git a/package/x11r7/xdriver_xf86-video-imx/Config.in b/package/x11r7/xdriver_xf86-video-imx/Config.in new file mode 100644 index 00000000..410a4584 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX + bool "xf86-video-imx" + depends on BR2_ARM_EABI # libz160 + depends on BR2_TOOLCHAIN_USES_GLIBC # libz160 + depends on BR2_LINUX_KERNEL # linux/mxcfb.h + depends on BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11 + select BR2_PACKAGE_LIBZ160 + select BR2_PACKAGE_XORGPROTO + help + X.Org driver for iMX5 GPU + + To use this driver, add the correct configuration to your + /etc/X11/xorg.conf, as follows: + + Section "Device" + [...] + Driver "imx" + Option "fbdev" "/dev/fb0" + EndSection + +comment "xf86-video-imx needs an EABI toolchain w/ glibc" + depends on BR2_arm + depends on !BR2_ARM_EABI || !BR2_TOOLCHAIN_USES_GLIBC + +comment "xf86-video-imx needs gpu-amd-bin-mx51 with X11 output and a Linux kernel to be built" + depends on BR2_arm + depends on !BR2_LINUX_KERNEL || !BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11 diff --git a/package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.hash b/package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.hash new file mode 100644 index 00000000..e2a36c55 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 d7d85e9f13c6dd58addab89847f3a8a67f6382a54135c7978c9a95368af024d4 xserver-xorg-video-imx-11.09.01.tar.gz diff --git a/package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk b/package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk new file mode 100644 index 00000000..b80c6b77 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-imx +# +################################################################################ + +XDRIVER_XF86_VIDEO_IMX_VERSION = 11.09.01 +XDRIVER_XF86_VIDEO_IMX_SOURCE = xserver-xorg-video-imx-$(XDRIVER_XF86_VIDEO_IMX_VERSION).tar.gz +XDRIVER_XF86_VIDEO_IMX_SITE = $(FREESCALE_IMX_SITE) +XDRIVER_XF86_VIDEO_IMX_DEPENDENCIES = linux libz160 xserver_xorg-server \ + xorgproto +XDRIVER_XF86_VIDEO_IMX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_DIR)/include" + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-intel/Config.in b/package/x11r7/xdriver_xf86-video-intel/Config.in new file mode 100644 index 00000000..c4152b7c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-intel/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL + bool "xf86-video-intel" + depends on (BR2_i386 || BR2_x86_64) + select BR2_PACKAGE_LIBPCIACCESS + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_INTEL + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XORGPROTO + help + Intel video driver diff --git a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.hash b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.hash new file mode 100644 index 00000000..4e41bda1 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 e121871de0396caff0349d761033aa4c0618d27b1ad5d79dab6c8246d9fb50d1 xdriver_xf86-video-intel-5ca3ac1a90af177eb111a965e9b4dd8a27cc58fc-br1.tar.gz +sha256 5808e89f4b9a30afc59f335bfa8219ecf2dacb89a81d16b322bc6d92993a48fa COPYING diff --git a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk new file mode 100644 index 00000000..ac598cf0 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# xdriver_xf86-video-intel +# +################################################################################ + +XDRIVER_XF86_VIDEO_INTEL_VERSION = 5ca3ac1a90af177eb111a965e9b4dd8a27cc58fc +XDRIVER_XF86_VIDEO_INTEL_SITE = git://anongit.freedesktop.org/xorg/driver/xf86-video-intel +XDRIVER_XF86_VIDEO_INTEL_LICENSE = MIT +XDRIVER_XF86_VIDEO_INTEL_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_INTEL_AUTORECONF = YES + +# -D_GNU_SOURCE fixes a getline-related compile error in src/sna/kgem.c +# We force -O2 regardless of the optimization level chosen by the user, +# as compiling this package is known to be broken with -Os. +XDRIVER_XF86_VIDEO_INTEL_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -O2" + +XDRIVER_XF86_VIDEO_INTEL_CONF_OPTS = \ + --disable-xvmc \ + --enable-sna \ + --disable-xaa \ + --disable-dga \ + --disable-async-swap + +XDRIVER_XF86_VIDEO_INTEL_DEPENDENCIES = \ + libdrm \ + libpciaccess \ + xlib_libXrandr \ + xorgproto \ + xserver_xorg-server + +# X.org server support for DRI depends on a Mesa3D DRI driver +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y) +XDRIVER_XF86_VIDEO_INTEL_CONF_OPTS += \ + --enable-dri2 \ + --enable-dri3 \ + --enable-uxa +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-mach64/0001-cross-compile.patch b/package/x11r7/xdriver_xf86-video-mach64/0001-cross-compile.patch new file mode 100644 index 00000000..d2761760 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/0001-cross-compile.patch @@ -0,0 +1,27 @@ +--- a/configure.ac 2008-06-23 10:39:28.000000000 -0400 ++++ b/configure.ac 2008-06-23 10:40:46.000000000 -0400 +@@ -85,14 +85,20 @@ sdkdir=$(pkg-config --variable=sdkdir xo + AC_HEADER_STDC + + if test "$DRI" != no; then +- AC_CHECK_FILE([${sdkdir}/dri.h], ++ if test "$cross_compiling" = "no" ; then ++ AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) +- AC_CHECK_FILE([${sdkdir}/sarea.h], ++ AC_CHECK_FILE([${sdkdir}/sarea.h], + [have_sarea_h="yes"], [have_sarea_h="no"]) +- AC_CHECK_FILE([${sdkdir}/dristruct.h], ++ AC_CHECK_FILE([${sdkdir}/dristruct.h], + [have_dristruct_h="yes"], [have_dristruct_h="no"]) +- AC_CHECK_FILE([${sdkdir}/damage.h], ++ AC_CHECK_FILE([${sdkdir}/damage.h], + [have_damage_h="yes"], [have_damage_h="no"]) ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-mach64/Config.in b/package/x11r7/xdriver_xf86-video-mach64/Config.in new file mode 100644 index 00000000..71c89dd2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MACH64 + bool "xf86-video-mach64" + select BR2_PACKAGE_XORGPROTO + help + mach64 video driver diff --git a/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.hash b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.hash new file mode 100644 index 00000000..55acd746 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-May/002896.html +md5 0e12f9a3b5659e1e27e03adc42b04d99 xf86-video-mach64-6.9.6.tar.bz2 +sha1 1fdf0c3488ab88cb46b563efee166a5d54a01932 xf86-video-mach64-6.9.6.tar.bz2 +sha256 7a0707c71bb522430f83bb5e9d9ee697e661e35534a3a2d10834f86b327a3c9c xf86-video-mach64-6.9.6.tar.bz2 +sha512 687f6ac60491b704d5c4788463763d2f4bf725611e10bd2163156963fe0a8fdbffe0a1b7c737eff131f01759e43b5ec3544a7dabe66a67e85b286dcb969da2f1 xf86-video-mach64-6.9.6.tar.bz2 +# Locally computed +sha256 a7d68021893bced0d709338a59a137c74b11e624880e110e4a2f14ccef475120 COPYING diff --git a/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk new file mode 100644 index 00000000..e6f8d747 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xdriver_xf86-video-mach64 +# +################################################################################ + +XDRIVER_XF86_VIDEO_MACH64_VERSION = 6.9.6 +XDRIVER_XF86_VIDEO_MACH64_SOURCE = xf86-video-mach64-$(XDRIVER_XF86_VIDEO_MACH64_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_MACH64_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_MACH64_LICENSE = MIT +XDRIVER_XF86_VIDEO_MACH64_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_MACH64_AUTORECONF = YES +XDRIVER_XF86_VIDEO_MACH64_DEPENDENCIES = xserver_xorg-server xorgproto + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) +XDRIVER_XF86_VIDEO_MACH64_CONF_OPTS = --disable-dri +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch b/package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch new file mode 100644 index 00000000..5707bd1b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch @@ -0,0 +1,21 @@ +--- xf86-video-mga-1.4.9/configure.ac.orig 2007-06-10 11:55:24.000000000 +0200 ++++ xf86-video-mga-1.4.9/configure.ac 2007-06-10 12:00:37.000000000 +0200 +@@ -77,12 +77,18 @@ + AC_HEADER_STDC + + if test "x$DRI" != xno; then ++ if test "$cross_compiling" = no; then + AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) + AC_CHECK_FILE([${sdkdir}/sarea.h], + [have_sarea_h="yes"], [have_sarea_h="no"]) + AC_CHECK_FILE([${sdkdir}/dristruct.h], + [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-mga/Config.in b/package/x11r7/xdriver_xf86-video-mga/Config.in new file mode 100644 index 00000000..15fb3b9f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mga/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MGA + bool "xf86-video-mga" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XORGPROTO + help + Matrox video driver + +comment "xf86-video-mga needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.hash b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.hash new file mode 100644 index 00000000..218e52e1 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-December/002933.html +md5 b8fc99b4adea8bfe80156b13df4b6c9c xf86-video-mga-2.0.0.tar.bz2 +sha1 833f2710a1fd7b3f2db3700b2ad055527da5033b xf86-video-mga-2.0.0.tar.bz2 +sha256 268946e1a13e9d80e4f724a0740df9e6e8c8bad37697fcbf456924e9fdbb5d79 xf86-video-mga-2.0.0.tar.bz2 +sha512 b92006486aef815ff4399f291d610c65d88c0b32a9dae97658c644715ff62b221b01495b5c7a2311745e26f699c1c1f753b81c7bf54cf75567af9f78ac015540 xf86-video-mga-2.0.0.tar.bz2 +# Locally computed +sha256 6c567575e381478c7616eedff3ea2ae5228a5b54fbdd22d4070ebae312fa085c COPYING diff --git a/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk new file mode 100644 index 00000000..2720848a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xdriver_xf86-video-mga +# +################################################################################ + +XDRIVER_XF86_VIDEO_MGA_VERSION = 2.0.0 +XDRIVER_XF86_VIDEO_MGA_SOURCE = xf86-video-mga-$(XDRIVER_XF86_VIDEO_MGA_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_MGA_SITE = http://xorg.freedesktop.org/archive/individual/driver +XDRIVER_XF86_VIDEO_MGA_LICENSE = MIT +XDRIVER_XF86_VIDEO_MGA_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_MGA_AUTORECONF = YES +XDRIVER_XF86_VIDEO_MGA_DEPENDENCIES = xserver_xorg-server libdrm xorgproto + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) +XDRIVER_XF86_VIDEO_MGA_CONF_OPTS = --disable-dri +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-neomagic/Config.in b/package/x11r7/xdriver_xf86-video-neomagic/Config.in new file mode 100644 index 00000000..5f36a48f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-neomagic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_NEOMAGIC + bool "xf86-video-neomagic" + select BR2_PACKAGE_XORGPROTO + help + Neomagic video driver diff --git a/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.hash b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.hash new file mode 100644 index 00000000..55996f5b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-December/002934.html +md5 349d5254d09eb46f2a1f151cd423b89a xf86-video-neomagic-1.3.0.tar.bz2 +sha1 6bccfa15ea05d5264120cd96ccf13687642e8f6d xf86-video-neomagic-1.3.0.tar.bz2 +sha256 93833950fae7757088eb6abb125e15e8c245e5e25681c19c3ad4213ec7319064 xf86-video-neomagic-1.3.0.tar.bz2 +sha512 25d019a2556e52aeb4e25942f444437a921e76d527c10ddd420f16aa7d85bf2b8a51612c382a2a7e3e407bb1e8d610d063101184eea0889c3e1a69bfb3b37735 xf86-video-neomagic-1.3.0.tar.bz2 +# Locally computed +sha256 95063ce9aa09850025dd317549ce688519079a8d3cf66ceb3d882cb2bafcced9 COPYING diff --git a/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk new file mode 100644 index 00000000..8dd2777f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-neomagic +# +################################################################################ + +XDRIVER_XF86_VIDEO_NEOMAGIC_VERSION = 1.3.0 +XDRIVER_XF86_VIDEO_NEOMAGIC_SOURCE = xf86-video-neomagic-$(XDRIVER_XF86_VIDEO_NEOMAGIC_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_NEOMAGIC_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_NEOMAGIC_LICENSE = MIT +XDRIVER_XF86_VIDEO_NEOMAGIC_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_NEOMAGIC_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-nouveau/Config.in b/package/x11r7/xdriver_xf86-video-nouveau/Config.in new file mode 100644 index 00000000..c9fd2e3d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nouveau/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_NOUVEAU + bool "xf86-video-nouveau" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_NOUVEAU + select BR2_PACKAGE_XORGPROTO + help + Nouveau video driver + + http://nouveau.freedesktop.org + +comment "xf86-video-nouveau needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.hash b/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.hash new file mode 100644 index 00000000..b70728f9 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.hash @@ -0,0 +1,7 @@ +# From https://lists.freedesktop.org/archives/nouveau/2019-January/032053.html +md5 ecd9be89d853301167e3d564c49f7a8e xf86-video-nouveau-1.0.16.tar.bz2 +sha1 a2d19439ceed315079207a62c6888a12e8489995 xf86-video-nouveau-1.0.16.tar.bz2 +sha256 304060806415579cdb5c1f71f1c54d11cacb431b5552b170decbc883ed43bf06 xf86-video-nouveau-1.0.16.tar.bz2 +sha512 41b7839c37372660968ab7da2bc3d9feef3cab4e994d05d4ba6e59071f0d1b1f8d7dcdbcb15a42a375a556d28dc067f9ffe45d73c1d121ad307d199107ade3e0 xf86-video-nouveau-1.0.16.tar.bz2 +# Locally computed +sha256 27d8cbdcde7a0bd062ce49cdf8c672201452a64e3e6823f09b1beffe2c4b8eff COPYING diff --git a/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.mk b/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.mk new file mode 100644 index 00000000..d85cbfe4 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xdriver_xf86-video-nouveau +# +################################################################################ + +XDRIVER_XF86_VIDEO_NOUVEAU_VERSION = 1.0.16 +XDRIVER_XF86_VIDEO_NOUVEAU_SOURCE = xf86-video-nouveau-$(XDRIVER_XF86_VIDEO_NOUVEAU_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_NOUVEAU_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_NOUVEAU_LICENSE = MIT +XDRIVER_XF86_VIDEO_NOUVEAU_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_NOUVEAU_DEPENDENCIES = \ + host-pkgconf \ + libdrm \ + xorgproto \ + xserver_xorg-server + +# xdriver_xf86-video-nouveau requires O_CLOEXEC +XDRIVER_XF86_VIDEO_NOUVEAU_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-nv/Config.in b/package/x11r7/xdriver_xf86-video-nv/Config.in new file mode 100644 index 00000000..5ff8b798 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nv/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_NV + bool "xf86-video-nv" + select BR2_PACKAGE_XORGPROTO + help + NVIDIA video driver diff --git a/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.hash b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.hash new file mode 100644 index 00000000..e1835687 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2017-January/002761.html +sha256 1f98649e6ff0e8214b9d5dcac661f1d004be8e73823d8247b9c7025fd81db32d xf86-video-nv-2.1.21.tar.bz2 +# Locally calculated +sha256 10d10e1ec37594d481c3de8dda22a40b731ebd43be7ccd462baaa7394738a9f3 COPYING diff --git a/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk new file mode 100644 index 00000000..1e5fc26d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-nv +# +################################################################################ + +XDRIVER_XF86_VIDEO_NV_VERSION = 2.1.21 +XDRIVER_XF86_VIDEO_NV_SOURCE = xf86-video-nv-$(XDRIVER_XF86_VIDEO_NV_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_NV_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_NV_LICENSE = MIT +XDRIVER_XF86_VIDEO_NV_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_NV_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-openchrome/Config.in b/package/x11r7/xdriver_xf86-video-openchrome/Config.in new file mode 100644 index 00000000..a93d1437 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-openchrome/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_OPENCHROME + bool "xf86-video-openchrome" + depends on BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XLIB_LIBXVMC + select BR2_PACKAGE_XORGPROTO + help + Openchrome, A free and Open Source video driver for the + VIA/S3G UniChrome and UniChrome Pro graphics chipsets. + + https://www.freedesktop.org/wiki/Openchrome/ + +comment "xf86-video-openchrome needs a DRI driver from mesa3d" + depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER diff --git a/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.hash b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.hash new file mode 100644 index 00000000..57cc9aca --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.hash @@ -0,0 +1,6 @@ +# From https://lists.x.org/archives/xorg-announce/2017-March/002781.html +md5 c87f164739729b00f7e1a9934420c22d xf86-video-openchrome-0.6.0.tar.bz2 +sha1 2077181ded4d86e9cbe6d3e9b1245339692e848d xf86-video-openchrome-0.6.0.tar.bz2 +sha256 da2975c6379358de52c1257710c67eb59139a7f0a1cd28d00cc64cc3e1c02f75 xf86-video-openchrome-0.6.0.tar.bz2 +# Locally computed +sha256 1fde58bce5cff8c32e9a0a80bfa3e60213a2767954e30a367127d5afa2884ca2 COPYING diff --git a/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk new file mode 100644 index 00000000..db9e11f6 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xdriver_xf86-video-openchrome +# +################################################################################ + +XDRIVER_XF86_VIDEO_OPENCHROME_VERSION = 0.6.0 +XDRIVER_XF86_VIDEO_OPENCHROME_SOURCE = xf86-video-openchrome-$(XDRIVER_XF86_VIDEO_OPENCHROME_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_OPENCHROME_SITE = http://xorg.freedesktop.org/archive/individual/driver +XDRIVER_XF86_VIDEO_OPENCHROME_LICENSE = MIT +XDRIVER_XF86_VIDEO_OPENCHROME_LICENSE_FILES = COPYING + +XDRIVER_XF86_VIDEO_OPENCHROME_DEPENDENCIES = \ + xserver_xorg-server \ + libdrm \ + xlib_libX11 \ + xlib_libXcomposite \ + xlib_libXvMC \ + xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-qxl/Config.in b/package/x11r7/xdriver_xf86-video-qxl/Config.in new file mode 100644 index 00000000..40f61fd6 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-qxl/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_QXL + bool "xf86-video-qxl" + depends on (BR2_i386 || BR2_x86_64) + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_HAS_UDEV # for KMS + select BR2_PACKAGE_LIBPCIACCESS + select BR2_PACKAGE_SPICE_PROTOCOL + select BR2_PACKAGE_XLIB_LIBXFONT2 if !BR2_PACKAGE_XLIB_LIBXFONT + select BR2_PACKAGE_XORGPROTO + help + QEMU QXL paravirt video driver + + http://www.spice-space.org/page/XorgQXL diff --git a/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.hash b/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.hash new file mode 100644 index 00000000..fdf0cc43 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2016-December/002753.html +sha256 b18682e04503c6326f7bf7190f3ee50a3d4d69758a2a3cc9af102a6b3f114c92 xf86-video-qxl-0.1.5.tar.bz2 +# Locally calculated +sha256 83f3bf7be3fbf5e66174b8184bd837a6b44264f8e340126ea4d9e9ce956a1866 COPYING diff --git a/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.mk b/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.mk new file mode 100644 index 00000000..ffbac05e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# xdriver_xf86-video-qxl +# +################################################################################ + +XDRIVER_XF86_VIDEO_QXL_VERSION = 0.1.5 +XDRIVER_XF86_VIDEO_QXL_SOURCE = xf86-video-qxl-$(XDRIVER_XF86_VIDEO_QXL_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_QXL_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_QXL_LICENSE = MIT +XDRIVER_XF86_VIDEO_QXL_LICENSE_FILES = COPYING + +XDRIVER_XF86_VIDEO_QXL_CONF_OPTS = \ + --enable-xspice=no + +XDRIVER_XF86_VIDEO_QXL_DEPENDENCIES = \ + libpciaccess \ + spice-protocol \ + xorgproto \ + xserver_xorg-server + +# configure doesn't look for drm headers in the appropiate place, so help it +# libdrm is only useful with udev for KMS +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XDRIVER_XF86_VIDEO_QXL_CONF_ENV += REQUIRED_MODULES=libdrm +XDRIVER_XF86_VIDEO_QXL_DEPENDENCIES += libdrm +else +XDRIVER_XF86_VIDEO_QXL_CONF_OPTS += --disable-kms +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFONT2),y) +XDRIVER_XF86_VIDEO_QXL_DEPENDENCIES += xlib_libXfont2 +else +XDRIVER_XF86_VIDEO_QXL_DEPENDENCIES += xlib_libXfont +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-r128/Config.in b/package/x11r7/xdriver_xf86-video-r128/Config.in new file mode 100644 index 00000000..e1e2dd2f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-r128/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_R128 + bool "xf86-video-r128" + select BR2_PACKAGE_XORGPROTO + help + R128 video driver diff --git a/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.hash b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.hash new file mode 100644 index 00000000..eee28650 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-October/002926.html +md5 105ebcfe1bac06fe84645ac3def91184 xf86-video-r128-6.12.0.tar.bz2 +sha1 7cfa41d386fa43b5d30299203e4845d8afba4899 xf86-video-r128-6.12.0.tar.bz2 +sha256 801c86882cbd2bbb3084d471dcc5cfee2c1754dcbfb4dc446676d58a6bd9e057 xf86-video-r128-6.12.0.tar.bz2 +sha512 0e667e2cfa8a87a00846361d86528c93754c403c812b66798953fa4c857b2143b2c4c44885da467e7f910d8cb910b69492cdcb6f25e2197bae6617364d152e38 xf86-video-r128-6.12.0.tar.bz2 +# Locally computed +sha256 69f7c71859dc8f51aabdbe7a9ee915a480933eb81658f8af2bf4c918e65afe8b COPYING diff --git a/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk new file mode 100644 index 00000000..455cfbad --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xdriver_xf86-video-r128 +# +################################################################################ + +XDRIVER_XF86_VIDEO_R128_VERSION = 6.12.0 +XDRIVER_XF86_VIDEO_R128_SOURCE = xf86-video-r128-$(XDRIVER_XF86_VIDEO_R128_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_R128_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_R128_LICENSE = MIT +XDRIVER_XF86_VIDEO_R128_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_R128_DEPENDENCIES = xserver_xorg-server xorgproto + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) +XDRIVER_XF86_VIDEO_R128_CONF_OPTS = --disable-dri +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-savage/0001-cross-compile.patch b/package/x11r7/xdriver_xf86-video-savage/0001-cross-compile.patch new file mode 100644 index 00000000..b9c296b6 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-savage/0001-cross-compile.patch @@ -0,0 +1,27 @@ +--- a/configure.ac 2008-05-21 16:04:23.000000000 -0400 ++++ b/configure.ac 2008-06-23 11:41:50.000000000 -0400 +@@ -68,12 +68,18 @@ sdkdir=$(pkg-config --variable=sdkdir xo + AC_HEADER_STDC + + if test "$DRI" != no; then +- AC_CHECK_FILE([${sdkdir}/dri.h], +- [have_dri_h="yes"], [have_dri_h="no"]) +- AC_CHECK_FILE([${sdkdir}/sarea.h], +- [have_sarea_h="yes"], [have_sarea_h="no"]) +- AC_CHECK_FILE([${sdkdir}/dristruct.h], +- [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++ if test "$cross_compiling" = "no" ; then ++ AC_CHECK_FILE([${sdkdir}/dri.h], ++ [have_dri_h="yes"], [have_dri_h="no"]) ++ AC_CHECK_FILE([${sdkdir}/sarea.h], ++ [have_sarea_h="yes"], [have_sarea_h="no"]) ++ AC_CHECK_FILE([${sdkdir}/dristruct.h], ++ [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-savage/0002-xorg-xserver120.patch b/package/x11r7/xdriver_xf86-video-savage/0002-xorg-xserver120.patch new file mode 100644 index 00000000..4c695960 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-savage/0002-xorg-xserver120.patch @@ -0,0 +1,23 @@ +Fix build with modular-xorg-server-1.20 + +Downloaded from +http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/x11/xf86-video-savage/patches/patch-src_savage__driver.c?rev=1.3&content-type=text/x-cvsweb-markup + +Patch was sent upstream by Thomas Klausner : +https://lists.x.org/archives/xorg-devel/2018-May/056952.html + +Signed-off-by: Bernd Kuhls + +--- a/src/savage_driver.c.orig 2017-01-17 22:43:40.000000000 +0000 ++++ b/src/savage_driver.c +@@ -2034,8 +2034,10 @@ static Bool SavagePreInit(ScrnInfoPtr pS + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Detected current MCLK value of %1.3f MHz\n", + mclk / 1000.0); + ++#if 0 + pScrn->maxHValue = 2048 << 3; /* 11 bits of h_total 8-pixel units */ + pScrn->maxVValue = 2048; /* 11 bits of v_total */ ++#endif + pScrn->virtualX = pScrn->display->virtualX; + pScrn->virtualY = pScrn->display->virtualY; + diff --git a/package/x11r7/xdriver_xf86-video-savage/Config.in b/package/x11r7/xdriver_xf86-video-savage/Config.in new file mode 100644 index 00000000..bc6ca523 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-savage/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SAVAGE + bool "xf86-video-savage" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XORGPROTO + help + S3 Savage video driver + +comment "xf86-video-savage needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.hash b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.hash new file mode 100644 index 00000000..661c8749 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2017-January/002760.html +sha256 2c93c4db1f71e725dda0caee5821253129d4b52d7aa0fd720593e7769bceec86 xf86-video-savage-2.3.9.tar.bz2 +# Locally calculated +sha256 611f4020815e3d5011a39a58f0958262715cd3becd9cb1ef14cc166fd84ec5a6 COPYING diff --git a/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk new file mode 100644 index 00000000..d7311aa9 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xdriver_xf86-video-savage +# +################################################################################ + +XDRIVER_XF86_VIDEO_SAVAGE_VERSION = 2.3.9 +XDRIVER_XF86_VIDEO_SAVAGE_SOURCE = xf86-video-savage-$(XDRIVER_XF86_VIDEO_SAVAGE_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_SAVAGE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_SAVAGE_LICENSE = MIT +XDRIVER_XF86_VIDEO_SAVAGE_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_SAVAGE_AUTORECONF = YES +XDRIVER_XF86_VIDEO_SAVAGE_DEPENDENCIES = xserver_xorg-server libdrm xorgproto + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) +XDRIVER_XF86_VIDEO_SAVAGE_CONF_OPTS = --disable-dri +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in b/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in new file mode 100644 index 00000000..036a2f1c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SILICONMOTION + bool "xf86-video-siliconmotion" + select BR2_PACKAGE_XORGPROTO + help + Silicon Motion video driver diff --git a/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.hash b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.hash new file mode 100644 index 00000000..dc9a3503 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2017-January/002763.html +sha256 d0f3c691e71108d27a061beb62bf78b36ec35bd755905692734dd68cfb3359bc xf86-video-siliconmotion-1.7.9.tar.bz2 +# Locally calculated +sha256 e1e3ce7ce1f63fff96444206e09c8490ad7a4af7457c81ea6cdee4f1fee1f960 COPYING diff --git a/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk new file mode 100644 index 00000000..65fd8465 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xdriver_xf86-video-siliconmotion +# +################################################################################ + +XDRIVER_XF86_VIDEO_SILICONMOTION_VERSION = 1.7.9 +XDRIVER_XF86_VIDEO_SILICONMOTION_SOURCE = xf86-video-siliconmotion-$(XDRIVER_XF86_VIDEO_SILICONMOTION_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_SILICONMOTION_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_SILICONMOTION_LICENSE = MIT +XDRIVER_XF86_VIDEO_SILICONMOTION_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_SILICONMOTION_DEPENDENCIES = xserver_xorg-server xorgproto + +XDRIVER_XF86_VIDEO_SILICONMOTION_CONF_OPTS = --disable-selective-werror + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-sis/Config.in b/package/x11r7/xdriver_xf86-video-sis/Config.in new file mode 100644 index 00000000..db01cf2a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-sis/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SIS + bool "xf86-video-sis" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XORGPROTO + help + SiS and XGI video driver + +comment "xf86-video-sis needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.hash b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.hash new file mode 100644 index 00000000..f6709527 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-December/003033.html +md5 b8ec9c21758043b1480f11baec296f5d xf86-video-sis-0.12.0.tar.bz2 +sha1 d22f0d0081e222a62f9e788f5e73246c6d339f80 xf86-video-sis-0.12.0.tar.bz2 +sha256 119d3f17d53c862ec4bf891ed696a6f1d32cdf8bd11d944a9f0ad24625333a5b xf86-video-sis-0.12.0.tar.bz2 +sha512 5aa101e5217f15667f2c94f7a76f4afcf47717b61f5d206ce65efe35dc3f674ca294f98ca8586971c6467f31decdd94d8255ebfc7dc220fac0179afc61995952 xf86-video-sis-0.12.0.tar.bz2 +# Locally computed +sha256 e7958f9497a4daa3ae5aeaf885e4565520af2c540b6e4e04b52bf95d41d56c39 COPYING diff --git a/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk new file mode 100644 index 00000000..f96b0a9d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xdriver_xf86-video-sis +# +################################################################################ + +XDRIVER_XF86_VIDEO_SIS_VERSION = 0.12.0 +XDRIVER_XF86_VIDEO_SIS_SOURCE = xf86-video-sis-$(XDRIVER_XF86_VIDEO_SIS_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_SIS_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_SIS_LICENSE = MIT +XDRIVER_XF86_VIDEO_SIS_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_SIS_DEPENDENCIES = xserver_xorg-server libdrm xorgproto + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) +XDRIVER_XF86_VIDEO_SIS_CONF_OPTS += --disable-dri +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch b/package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch new file mode 100644 index 00000000..e53591bb --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch @@ -0,0 +1,24 @@ +--- xf86-video-tdfx-1.3.0/configure.ac.orig 2007-06-10 21:01:54.000000000 +0200 ++++ xf86-video-tdfx-1.3.0/configure.ac 2007-06-10 21:02:06.000000000 +0200 +@@ -67,13 +67,20 @@ + # Checks for header files. + AC_HEADER_STDC + +-if test "$DRI" != no; then ++if test "x$DRI" != xno; then ++ if test "$cross_compiling" = "no" ; then + AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) + AC_CHECK_FILE([${sdkdir}/sarea.h], + [have_sarea_h="yes"], [have_sarea_h="no"]) + AC_CHECK_FILE([${sdkdir}/dristruct.h], + [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++ AC_CHECK_HEADER ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-tdfx/Config.in b/package/x11r7/xdriver_xf86-video-tdfx/Config.in new file mode 100644 index 00000000..959dc310 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tdfx/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TDFX + bool "xf86-video-tdfx" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XORGPROTO + help + 3Dfx video driver + +comment "xf86-video-tdfx needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.hash b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.hash new file mode 100644 index 00000000..5e9a88fb --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002944.html +md5 4697f0cc69ff1ff90bc770863c158d29 xf86-video-tdfx-1.5.0.tar.bz2 +sha1 8042dd0c2bc5a396b2cfeb5418b03059a089be25 xf86-video-tdfx-1.5.0.tar.bz2 +sha256 2f4580e1f66901dd578d6e1f73df8150fd4b8480eb0c9653d4c5d8e0f8e78561 xf86-video-tdfx-1.5.0.tar.bz2 +sha512 eca3359c7db56183a1cfcce7295e41ccc349005ee1cbcf75209f1e4e8e04e887ba511712ef35efc11c940713c8327b0b8ab8b6c86facf02062b3e84c0b1af5ff xf86-video-tdfx-1.5.0.tar.bz2 +# Locally computed +sha256 5bb3d3baff0b7bbef885215ca9c12a5be1a42c848c96601b699637557fbb41ec COPYING diff --git a/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk new file mode 100644 index 00000000..8975334f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xdriver_xf86-video-tdfx +# +################################################################################ + +XDRIVER_XF86_VIDEO_TDFX_VERSION = 1.5.0 +XDRIVER_XF86_VIDEO_TDFX_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_TDFX_SOURCE = xf86-video-tdfx-$(XDRIVER_XF86_VIDEO_TDFX_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_TDFX_LICENSE = MIT +XDRIVER_XF86_VIDEO_TDFX_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_TDFX_AUTORECONF = YES +XDRIVER_XF86_VIDEO_TDFX_DEPENDENCIES = \ + libdrm \ + xorgproto \ + xserver_xorg-server + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) +XDRIVER_XF86_VIDEO_TDFX_CONF_OPTS = --disable-dri +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-tga/0001-mibstore.patch b/package/x11r7/xdriver_xf86-video-tga/0001-mibstore.patch new file mode 100644 index 00000000..07bcd04f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tga/0001-mibstore.patch @@ -0,0 +1,47 @@ +From b7022db0559cd1b6cd3eb6b5abf6896a607b478d Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 25 Sep 2012 12:55:00 +0000 +Subject: Remove mibstore.h + +Signed-off-by: Adam Jackson +--- +Fetch from: +http://cgit.freedesktop.org/xorg/driver/xf86-video-tga/commit/?id=b7022db0559cd1b6cd3eb6b5abf6896a607b478d + +Signed-off-by: Bernd Kuhls + +diff --git a/src/tga_accel.c b/src/tga_accel.c +index 35af1a4..b414df5 100644 +--- a/src/tga_accel.c ++++ b/src/tga_accel.c +@@ -37,7 +37,6 @@ + #include "xf86cmap.h" + #include "mipointer.h" + +-#include "mibstore.h" + #include "miline.h" + + #include "tga_regs.h" +diff --git a/src/tga_driver.c b/src/tga_driver.c +index dd4f3e6..90d2660 100644 +--- a/src/tga_driver.c ++++ b/src/tga_driver.c +@@ -46,8 +46,6 @@ + + /* software cursor */ + #include "mipointer.h" +-/* backing store */ +-#include "mibstore.h" + + /* #include "mibank.h" */ + /* colormap manipulation */ +@@ -1451,7 +1449,6 @@ TGAScreenInit(SCREEN_INIT_ARGS_DECL) + + fbPictureInit (pScreen, 0, 0); + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + xf86SetSilkenMouse(pScreen); + +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xdriver_xf86-video-tga/Config.in b/package/x11r7/xdriver_xf86-video-tga/Config.in new file mode 100644 index 00000000..7c75661a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tga/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TGA + bool "xf86-video-tga" + select BR2_PACKAGE_XORGPROTO + help + X.Org driver for tga cards diff --git a/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.hash b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.hash new file mode 100644 index 00000000..4f8c1096 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2012-July/002025.html +sha256 2023818000200eb50a59476e36d59b07a361b110e73b1d9cc526beb669306131 xf86-video-tga-1.2.2.tar.bz2 +# Locally calculated +sha256 92e36c6b7c99c8335e5823d53686e58ebd82ee8051a6360f60c8c0fb05745954 COPYING diff --git a/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk new file mode 100644 index 00000000..421b09be --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-tga +# +################################################################################ + +XDRIVER_XF86_VIDEO_TGA_VERSION = 1.2.2 +XDRIVER_XF86_VIDEO_TGA_SOURCE = xf86-video-tga-$(XDRIVER_XF86_VIDEO_TGA_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_TGA_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_TGA_LICENSE = MIT +XDRIVER_XF86_VIDEO_TGA_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_TGA_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-trident/Config.in b/package/x11r7/xdriver_xf86-video-trident/Config.in new file mode 100644 index 00000000..ca7069c8 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-trident/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TRIDENT + bool "xf86-video-trident" + select BR2_PACKAGE_XORGPROTO + help + Trident video driver diff --git a/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.hash b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.hash new file mode 100644 index 00000000..8f47bac2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2017-January/002762.html +sha256 9e5119d974c3e2221994542d35e3a0b3426a441869ddd6dd08a84f324856ac3f xf86-video-trident-1.3.8.tar.bz2 +# Locally calculated +sha256 4f065198c49eac1513b915bc4478152c21119f31a97919a6ea8f3e1d10133d15 COPYING diff --git a/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk new file mode 100644 index 00000000..20ec4bbc --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-trident +# +################################################################################ + +XDRIVER_XF86_VIDEO_TRIDENT_VERSION = 1.3.8 +XDRIVER_XF86_VIDEO_TRIDENT_SOURCE = xf86-video-trident-$(XDRIVER_XF86_VIDEO_TRIDENT_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_TRIDENT_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_TRIDENT_LICENSE = MIT +XDRIVER_XF86_VIDEO_TRIDENT_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_TRIDENT_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-vesa/Config.in b/package/x11r7/xdriver_xf86-video-vesa/Config.in new file mode 100644 index 00000000..fb4e4e8e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vesa/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VESA + bool "xf86-video-vesa" + select BR2_PACKAGE_XORGPROTO + help + Generic VESA video driver diff --git a/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.hash b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.hash new file mode 100644 index 00000000..d179228a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2020-September/003060.html +sha256 1f1624f3c73906801ad1bc98335a2cb5676a7a4d18e5374d9a1d18464e54c659 xf86-video-vesa-2.5.0.tar.bz2 +sha512 36fd921f54f33eb25966b5f9ea1e1b3e9009965c012c8b9c676686b472111719921b80cf62dafc746058878253e21f0ef341a2ff2d650df22ca1e35e81716a8b xf86-video-vesa-2.5.0.tar.bz2 +# Locally computed +sha256 bda49ba1e860501c20fd444423bc790f6da4f769561b69acc0cbe5abff9409b6 COPYING diff --git a/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk new file mode 100644 index 00000000..b08bab4e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-vesa +# +################################################################################ + +XDRIVER_XF86_VIDEO_VESA_VERSION = 2.5.0 +XDRIVER_XF86_VIDEO_VESA_SOURCE = xf86-video-vesa-$(XDRIVER_XF86_VIDEO_VESA_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_VESA_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_VESA_LICENSE = MIT +XDRIVER_XF86_VIDEO_VESA_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_VESA_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-vmware/Config.in b/package/x11r7/xdriver_xf86-video-vmware/Config.in new file mode 100644 index 00000000..6d937b47 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vmware/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VMWARE + bool "xf86-video-vmware" + depends on BR2_PACKAGE_MESA3D + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA + select BR2_PACKAGE_XORGPROTO + help + VMware SVGA video driver + +comment "xf86-video-vmware needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.hash b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.hash new file mode 100644 index 00000000..f07e0614 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-May/002895.html +md5 08d66d062055080ff699ab4869726ea2 xf86-video-vmware-13.3.0.tar.bz2 +sha1 f01335fe6bdb507e749571bfcd69163aed97312a xf86-video-vmware-13.3.0.tar.bz2 +sha256 47971924659e51666a757269ad941a059ef5afe7a47b5101c174a6022ac4066c xf86-video-vmware-13.3.0.tar.bz2 +sha512 c318de893cae7b2b11e11c1b389ee47478b7c8d1f52c27099dbe453efec28f3e9da449217307a8c2251999eada66312f766996be1a6ead413b8b6dedc42c68ca xf86-video-vmware-13.3.0.tar.bz2 +# Locally computed +sha256 7e59b8ca2a161855a60561f27ada8dfdbb678733eacdb23423fff6d21f9ad43b COPYING diff --git a/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk new file mode 100644 index 00000000..5f0cb77b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xdriver_xf86-video-vmware +# +################################################################################ + +XDRIVER_XF86_VIDEO_VMWARE_VERSION = 13.3.0 +XDRIVER_XF86_VIDEO_VMWARE_SOURCE = xf86-video-vmware-$(XDRIVER_XF86_VIDEO_VMWARE_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_VMWARE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_VMWARE_LICENSE = MIT +XDRIVER_XF86_VIDEO_VMWARE_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_VMWARE_DEPENDENCIES = mesa3d xserver_xorg-server xorgproto + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XDRIVER_XF86_VIDEO_VMWARE_CONF_OPTS += --with-libudev +XDRIVER_XF86_VIDEO_VMWARE_DEPENDENCIES += udev +else +XDRIVER_XF86_VIDEO_VMWARE_CONF_OPTS += --without-libudev +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-voodoo/Config.in b/package/x11r7/xdriver_xf86-video-voodoo/Config.in new file mode 100644 index 00000000..f4612120 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-voodoo/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VOODOO + bool "xf86-video-voodoo" + select BR2_PACKAGE_XORGPROTO + help + Voodoo video driver diff --git a/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk b/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk new file mode 100644 index 00000000..d6deaa79 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-voodoo +# +################################################################################ + +XDRIVER_XF86_VIDEO_VOODOO_VERSION = 9172ae566a0e85313fc80ab62b4455393eefe593 +XDRIVER_XF86_VIDEO_VOODOO_SITE = git://anongit.freedesktop.org/xorg/driver/xf86-video-voodoo +XDRIVER_XF86_VIDEO_VOODOO_LICENSE = MIT +XDRIVER_XF86_VIDEO_VOODOO_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_VOODOO_AUTORECONF = YES +XDRIVER_XF86_VIDEO_VOODOO_DEPENDENCIES = xserver_xorg-server xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_encodings/Config.in b/package/x11r7/xfont_encodings/Config.in new file mode 100644 index 00000000..d771ffb9 --- /dev/null +++ b/package/x11r7/xfont_encodings/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_ENCODINGS + bool "encodings" + select BR2_PACKAGE_XUTIL_UTIL_MACROS + help + No description available diff --git a/package/x11r7/xfont_encodings/xfont_encodings.hash b/package/x11r7/xfont_encodings/xfont_encodings.hash new file mode 100644 index 00000000..30dc9276 --- /dev/null +++ b/package/x11r7/xfont_encodings/xfont_encodings.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-June/002998.html +md5 bbae4f247b88ccde0e85ed6a403da22a encodings-1.0.5.tar.bz2 +sha1 7ffec76dba1cfd5040c5b43ccfae930c83ddf92e encodings-1.0.5.tar.bz2 +sha256 bd96e16143a044b19e87f217cf6a3763a70c561d1076aad6f6d862ec41774a31 encodings-1.0.5.tar.bz2 +sha512 920e49f0b3545f181a1574ca3280ac9adef1e68fe27566c195dd7013f728d355c0d759132789357fcf8fa7391fcbe1e17edf2bd85aa5611df5a4d99740011008 encodings-1.0.5.tar.bz2 +# Locally computed +sha256 13b4a0f9431f0fdd6ee36ed386e0b7d1eb429c5cb88df73353896078cbb5a137 COPYING diff --git a/package/x11r7/xfont_encodings/xfont_encodings.mk b/package/x11r7/xfont_encodings/xfont_encodings.mk new file mode 100644 index 00000000..06d99738 --- /dev/null +++ b/package/x11r7/xfont_encodings/xfont_encodings.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xfont_encodings +# +################################################################################ + +XFONT_ENCODINGS_VERSION = 1.0.5 +XFONT_ENCODINGS_SOURCE = encodings-$(XFONT_ENCODINGS_VERSION).tar.bz2 +XFONT_ENCODINGS_SITE = https://xorg.freedesktop.org/releases/individual/font +XFONT_ENCODINGS_LICENSE = Public Domain +XFONT_ENCODINGS_LICENSE_FILES = COPYING + +XFONT_ENCODINGS_DEPENDENCIES = host-xapp_mkfontscale host-pkgconf xutil_util-macros +HOST_XFONT_ENCODINGS_DEPENDENCIES = \ + host-xapp_mkfontscale host-pkgconf host-xutil_util-macros + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-100dpi/Config.in b/package/x11r7/xfont_font-adobe-100dpi/Config.in new file mode 100644 index 00000000..766c06e7 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_100DPI + bool "font-adobe-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.hash b/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.hash new file mode 100644 index 00000000..514c9091 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 b2c08433eab5cb202470aa9f779efefce8d9cab2534f34f3aa4a31d05671c054 font-adobe-100dpi-1.0.3.tar.bz2 +sha256 bf6d862672b4fcc86f3f38bc138ad44e52d52207dd8689b8d3701630fc331194 COPYING diff --git a/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk b/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk new file mode 100644 index 00000000..24187698 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-adobe-100dpi +# +################################################################################ + +XFONT_FONT_ADOBE_100DPI_VERSION = 1.0.3 +XFONT_FONT_ADOBE_100DPI_SOURCE = font-adobe-100dpi-$(XFONT_FONT_ADOBE_100DPI_VERSION).tar.bz2 +XFONT_FONT_ADOBE_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_100DPI_LICENSE = MIT +XFONT_FONT_ADOBE_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_ADOBE_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_ADOBE_100DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-75dpi/Config.in b/package/x11r7/xfont_font-adobe-75dpi/Config.in new file mode 100644 index 00000000..1d79f416 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_75DPI + bool "font-adobe-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.hash b/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.hash new file mode 100644 index 00000000..41ac96fc --- /dev/null +++ b/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 c6024a1e4a1e65f413f994dd08b734efd393ce0a502eb465deb77b9a36db4d09 font-adobe-75dpi-1.0.3.tar.bz2 +sha256 bf6d862672b4fcc86f3f38bc138ad44e52d52207dd8689b8d3701630fc331194 COPYING diff --git a/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk b/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk new file mode 100644 index 00000000..90e94d27 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-adobe-75dpi +# +################################################################################ + +XFONT_FONT_ADOBE_75DPI_VERSION = 1.0.3 +XFONT_FONT_ADOBE_75DPI_SOURCE = font-adobe-75dpi-$(XFONT_FONT_ADOBE_75DPI_VERSION).tar.bz2 +XFONT_FONT_ADOBE_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_75DPI_LICENSE = MIT +XFONT_FONT_ADOBE_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_ADOBE_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_ADOBE_75DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-utopia-100dpi/Config.in b/package/x11r7/xfont_font-adobe-utopia-100dpi/Config.in new file mode 100644 index 00000000..a31ee5da --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_UTOPIA_100DPI + bool "font-adobe-utopia-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.hash b/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.hash new file mode 100644 index 00000000..81498788 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 d16f5e3f227cc6dd07a160a71f443559682dbc35f1c056a5385085aaec4fada5 font-adobe-utopia-100dpi-1.0.4.tar.bz2 +sha256 234c2a8109afa8034c787dbf69696a9bdd374914aadf937d2a103831d95c1867 COPYING diff --git a/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk b/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk new file mode 100644 index 00000000..83157f5c --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-adobe-utopia-100dpi +# +################################################################################ + +XFONT_FONT_ADOBE_UTOPIA_100DPI_VERSION = 1.0.4 +XFONT_FONT_ADOBE_UTOPIA_100DPI_SOURCE = font-adobe-utopia-100dpi-$(XFONT_FONT_ADOBE_UTOPIA_100DPI_VERSION).tar.bz2 +XFONT_FONT_ADOBE_UTOPIA_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_UTOPIA_100DPI_LICENSE = Adobe License (no modification allowed) +XFONT_FONT_ADOBE_UTOPIA_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_UTOPIA_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_ADOBE_UTOPIA_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_ADOBE_UTOPIA_100DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-utopia-75dpi/Config.in b/package/x11r7/xfont_font-adobe-utopia-75dpi/Config.in new file mode 100644 index 00000000..22797230 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_UTOPIA_75DPI + bool "font-adobe-utopia-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.hash b/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.hash new file mode 100644 index 00000000..0b6e1af6 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 8732719c61f3661c8bad63804ebfd54fc7de21ab848e9a26a19b1778ef8b5c94 font-adobe-utopia-75dpi-1.0.4.tar.bz2 +sha256 234c2a8109afa8034c787dbf69696a9bdd374914aadf937d2a103831d95c1867 COPYING diff --git a/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk b/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk new file mode 100644 index 00000000..ac3bf2e2 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-adobe-utopia-75dpi +# +################################################################################ + +XFONT_FONT_ADOBE_UTOPIA_75DPI_VERSION = 1.0.4 +XFONT_FONT_ADOBE_UTOPIA_75DPI_SOURCE = font-adobe-utopia-75dpi-$(XFONT_FONT_ADOBE_UTOPIA_75DPI_VERSION).tar.bz2 +XFONT_FONT_ADOBE_UTOPIA_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_UTOPIA_75DPI_LICENSE = Adobe License (no modification allowed) +XFONT_FONT_ADOBE_UTOPIA_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_UTOPIA_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_ADOBE_UTOPIA_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_ADOBE_UTOPIA_75DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-utopia-type1/Config.in b/package/x11r7/xfont_font-adobe-utopia-type1/Config.in new file mode 100644 index 00000000..60b631ed --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_UTOPIA_TYPE1 + bool "font-adobe-utopia-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.hash b/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.hash new file mode 100644 index 00000000..514dd282 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 979435105f897a70f8993fa02c8362160b0513366c2ab896965416f96dbb8077 font-adobe-utopia-type1-1.0.4.tar.bz2 +sha256 234c2a8109afa8034c787dbf69696a9bdd374914aadf937d2a103831d95c1867 COPYING diff --git a/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk b/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk new file mode 100644 index 00000000..9ec8f800 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-adobe-utopia-type1 +# +################################################################################ + +XFONT_FONT_ADOBE_UTOPIA_TYPE1_VERSION = 1.0.4 +XFONT_FONT_ADOBE_UTOPIA_TYPE1_SOURCE = font-adobe-utopia-type1-$(XFONT_FONT_ADOBE_UTOPIA_TYPE1_VERSION).tar.bz2 +XFONT_FONT_ADOBE_UTOPIA_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_UTOPIA_TYPE1_LICENSE = Adobe License (no modification allowed) +XFONT_FONT_ADOBE_UTOPIA_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_UTOPIA_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_ADOBE_UTOPIA_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_ADOBE_UTOPIA_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-alias/Config.in b/package/x11r7/xfont_font-alias/Config.in new file mode 100644 index 00000000..b30e2221 --- /dev/null +++ b/package/x11r7/xfont_font-alias/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ALIAS + bool "font-alias" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-alias/xfont_font-alias.hash b/package/x11r7/xfont_font-alias/xfont_font-alias.hash new file mode 100644 index 00000000..5390d1c1 --- /dev/null +++ b/package/x11r7/xfont_font-alias/xfont_font-alias.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2020-August/003054.html +sha256 f3111ae8bf2e980f5f56af400e8eefe5fc9f4207f4a412ea79637fd66c945276 font-alias-1.0.4.tar.bz2 +sha512 c67ac2ee344a601fcc09471580214b30c3fd6acc4800702840de44f0733e6d18b3faeec2fa3f4e2314025cc1724d7d6796ebaf620398fe350710182fd2c4b07d font-alias-1.0.4.tar.bz2 +# locally computed +sha256 bdba5452fc080c0f1a56d66978ac4150d1d1a00a9cc0248bba4f0b76c80ad47e COPYING diff --git a/package/x11r7/xfont_font-alias/xfont_font-alias.mk b/package/x11r7/xfont_font-alias/xfont_font-alias.mk new file mode 100644 index 00000000..7f8e4b2e --- /dev/null +++ b/package/x11r7/xfont_font-alias/xfont_font-alias.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-alias +# +################################################################################ + +XFONT_FONT_ALIAS_VERSION = 1.0.4 +XFONT_FONT_ALIAS_SOURCE = font-alias-$(XFONT_FONT_ALIAS_VERSION).tar.bz2 +XFONT_FONT_ALIAS_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ALIAS_LICENSE = MIT +XFONT_FONT_ALIAS_LICENSE_FILES = COPYING + +XFONT_FONT_ALIAS_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_ALIAS_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_ALIAS_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-arabic-misc/Config.in b/package/x11r7/xfont_font-arabic-misc/Config.in new file mode 100644 index 00000000..1ec50901 --- /dev/null +++ b/package/x11r7/xfont_font-arabic-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ARABIC_MISC + bool "font-arabic-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.hash b/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.hash new file mode 100644 index 00000000..3c565450 --- /dev/null +++ b/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 505d9b12a7093389e67a925dfda6346bde26d114c67f0cdca7aeda6e5d3344f4 font-arabic-misc-1.0.3.tar.bz2 +sha256 192b677a887c20f9671cc357cd5ea7bae586003d61c1f8f6e164e8f5530abf57 COPYING diff --git a/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk b/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk new file mode 100644 index 00000000..c867a602 --- /dev/null +++ b/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-arabic-misc +# +################################################################################ + +XFONT_FONT_ARABIC_MISC_VERSION = 1.0.3 +XFONT_FONT_ARABIC_MISC_SOURCE = font-arabic-misc-$(XFONT_FONT_ARABIC_MISC_VERSION).tar.bz2 +XFONT_FONT_ARABIC_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ARABIC_MISC_LICENSE = MIT +XFONT_FONT_ARABIC_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_ARABIC_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_ARABIC_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_ARABIC_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-100dpi/Config.in b/package/x11r7/xfont_font-bh-100dpi/Config.in new file mode 100644 index 00000000..3bfb0b8f --- /dev/null +++ b/package/x11r7/xfont_font-bh-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_100DPI + bool "font-bh-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.hash b/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.hash new file mode 100644 index 00000000..154d6eb2 --- /dev/null +++ b/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 23c07162708e4b79eb33095c8bfa62c783717a9431254bbf44863734ea239481 font-bh-100dpi-1.0.3.tar.bz2 +sha256 888fd79d2c7e6332559d661c62f7a50f92fc5842e6ff0e0bd4c59b0083dabce9 COPYING diff --git a/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk b/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk new file mode 100644 index 00000000..cc157386 --- /dev/null +++ b/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-bh-100dpi +# +################################################################################ + +XFONT_FONT_BH_100DPI_VERSION = 1.0.3 +XFONT_FONT_BH_100DPI_SOURCE = font-bh-100dpi-$(XFONT_FONT_BH_100DPI_VERSION).tar.bz2 +XFONT_FONT_BH_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_100DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BH_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_BH_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_BH_100DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-75dpi/Config.in b/package/x11r7/xfont_font-bh-75dpi/Config.in new file mode 100644 index 00000000..0fe93bb6 --- /dev/null +++ b/package/x11r7/xfont_font-bh-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_75DPI + bool "font-bh-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.hash b/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.hash new file mode 100644 index 00000000..0648e26d --- /dev/null +++ b/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 3486aa51ac92c646a448fe899c5c3dae0024b1fef724d5100d52640d1cac721c font-bh-75dpi-1.0.3.tar.bz2 +sha256 888fd79d2c7e6332559d661c62f7a50f92fc5842e6ff0e0bd4c59b0083dabce9 COPYING diff --git a/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk b/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk new file mode 100644 index 00000000..788a76a2 --- /dev/null +++ b/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-bh-75dpi +# +################################################################################ + +XFONT_FONT_BH_75DPI_VERSION = 1.0.3 +XFONT_FONT_BH_75DPI_SOURCE = font-bh-75dpi-$(XFONT_FONT_BH_75DPI_VERSION).tar.bz2 +XFONT_FONT_BH_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_75DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BH_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_BH_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_BH_75DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/Config.in b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/Config.in new file mode 100644 index 00000000..0005cc11 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI + bool "font-bh-lucidatypewriter-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.hash b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.hash new file mode 100644 index 00000000..439d5d26 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 62a83363c2536095fda49d260d21e0847675676e4e3415054064cbdffa641fbb font-bh-lucidatypewriter-100dpi-1.0.3.tar.bz2 +sha256 9428a98add4fada4c98e031ae0f29d27f8b15a2c8c6e8830591a4c18ea26a6cd COPYING diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk new file mode 100644 index 00000000..2f055dda --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-bh-lucidatypewriter-100dpi +# +################################################################################ + +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_VERSION = 1.0.3 +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_SOURCE = font-bh-lucidatypewriter-100dpi-$(XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_VERSION).tar.bz2 +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/Config.in b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/Config.in new file mode 100644 index 00000000..60dfb952 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI + bool "font-bh-lucidatypewriter-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.hash b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.hash new file mode 100644 index 00000000..ed8d8514 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 4ac16afbe205480cc5572e2977ea63488c543d05be0ea8e5a94c845a6eebcb31 font-bh-lucidatypewriter-75dpi-1.0.3.tar.bz2 +sha256 9428a98add4fada4c98e031ae0f29d27f8b15a2c8c6e8830591a4c18ea26a6cd COPYING diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk new file mode 100644 index 00000000..4166b2d7 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-bh-lucidatypewriter-75dpi +# +################################################################################ + +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_VERSION = 1.0.3 +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_SOURCE = font-bh-lucidatypewriter-75dpi-$(XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_VERSION).tar.bz2 +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-ttf/Config.in b/package/x11r7/xfont_font-bh-ttf/Config.in new file mode 100644 index 00000000..d747989b --- /dev/null +++ b/package/x11r7/xfont_font-bh-ttf/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_TTF + bool "font-bh-ttf" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.hash b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.hash new file mode 100644 index 00000000..05063726 --- /dev/null +++ b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.hash @@ -0,0 +1,4 @@ +# From http://lists.x.org/archives/xorg-announce/2010-November/001537.html +sha1 f42ebd527096011040a312e0f9cdf78d64177419 font-bh-ttf-1.0.3.tar.bz2 +# Locally computed +sha256 27d47d50006773f1c0bd97661252ae27bb8cfd6951f253bd9d3ef81ed1243934 COPYING diff --git a/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk new file mode 100644 index 00000000..e3ed2a6f --- /dev/null +++ b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bh-ttf +# +################################################################################ + +XFONT_FONT_BH_TTF_VERSION = 1.0.3 +XFONT_FONT_BH_TTF_SOURCE = font-bh-ttf-$(XFONT_FONT_BH_TTF_VERSION).tar.bz2 +XFONT_FONT_BH_TTF_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_TTF_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_TTF_LICENSE_FILES = COPYING + +XFONT_FONT_BH_TTF_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_BH_TTF_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_BH_TTF_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-type1/Config.in b/package/x11r7/xfont_font-bh-type1/Config.in new file mode 100644 index 00000000..0a3ab186 --- /dev/null +++ b/package/x11r7/xfont_font-bh-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_TYPE1 + bool "font-bh-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.hash b/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.hash new file mode 100644 index 00000000..cb0387d9 --- /dev/null +++ b/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 761455a297486f3927a85d919b5c948d1d324181d4bea6c95d542504b68a63c1 font-bh-type1-1.0.3.tar.bz2 +sha256 27d47d50006773f1c0bd97661252ae27bb8cfd6951f253bd9d3ef81ed1243934 COPYING diff --git a/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk b/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk new file mode 100644 index 00000000..244c91ff --- /dev/null +++ b/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bh-type1 +# +################################################################################ + +XFONT_FONT_BH_TYPE1_VERSION = 1.0.3 +XFONT_FONT_BH_TYPE1_SOURCE = font-bh-type1-$(XFONT_FONT_BH_TYPE1_VERSION).tar.bz2 +XFONT_FONT_BH_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_TYPE1_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_BH_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_BH_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_BH_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bitstream-100dpi/Config.in b/package/x11r7/xfont_font-bitstream-100dpi/Config.in new file mode 100644 index 00000000..5363fae3 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BITSTREAM_100DPI + bool "font-bitstream-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.hash b/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.hash new file mode 100644 index 00000000..1cef17d4 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 ebe0d7444e3d7c8da7642055ac2206f0190ee060700d99cd876f8fc9964cb6ce font-bitstream-100dpi-1.0.3.tar.bz2 +sha256 6faf32f092c2b92f3f99e0d63db9d802b11b4dd5aa0ce991f107a398d7f1ae80 COPYING diff --git a/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk b/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk new file mode 100644 index 00000000..90d9e5bb --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-bitstream-100dpi +# +################################################################################ + +XFONT_FONT_BITSTREAM_100DPI_VERSION = 1.0.3 +XFONT_FONT_BITSTREAM_100DPI_SOURCE = font-bitstream-100dpi-$(XFONT_FONT_BITSTREAM_100DPI_VERSION).tar.bz2 +XFONT_FONT_BITSTREAM_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BITSTREAM_100DPI_LICENSE = MIT +XFONT_FONT_BITSTREAM_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BITSTREAM_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_BITSTREAM_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_BITSTREAM_100DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bitstream-75dpi/Config.in b/package/x11r7/xfont_font-bitstream-75dpi/Config.in new file mode 100644 index 00000000..34a4a19e --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BITSTREAM_75DPI + bool "font-bitstream-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.hash b/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.hash new file mode 100644 index 00000000..9973f1f4 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 ba3f5e4610c07bd5859881660753ec6d75d179f26fc967aa776dbb3d5d5cf48e font-bitstream-75dpi-1.0.3.tar.bz2 +sha256 6faf32f092c2b92f3f99e0d63db9d802b11b4dd5aa0ce991f107a398d7f1ae80 COPYING diff --git a/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk b/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk new file mode 100644 index 00000000..deb99aa5 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-bitstream-75dpi +# +################################################################################ + +XFONT_FONT_BITSTREAM_75DPI_VERSION = 1.0.3 +XFONT_FONT_BITSTREAM_75DPI_SOURCE = font-bitstream-75dpi-$(XFONT_FONT_BITSTREAM_75DPI_VERSION).tar.bz2 +XFONT_FONT_BITSTREAM_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BITSTREAM_75DPI_LICENSE = MIT +XFONT_FONT_BITSTREAM_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BITSTREAM_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_BITSTREAM_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_BITSTREAM_75DPI_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bitstream-type1/Config.in b/package/x11r7/xfont_font-bitstream-type1/Config.in new file mode 100644 index 00000000..c8cbc908 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BITSTREAM_TYPE1 + bool "font-bitstream-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.hash b/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.hash new file mode 100644 index 00000000..81bb8fc7 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 c6ea0569adad2c577f140328dc3302e729cb1b1ea90cd0025caf380625f8a688 font-bitstream-type1-1.0.3.tar.bz2 +sha256 ecad5afdbd1308634896744a4c962361e9eca73e7d9969bb3aad94533c66d046 COPYING diff --git a/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk b/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk new file mode 100644 index 00000000..640ce863 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bitstream-type1 +# +################################################################################ + +XFONT_FONT_BITSTREAM_TYPE1_VERSION = 1.0.3 +XFONT_FONT_BITSTREAM_TYPE1_SOURCE = font-bitstream-type1-$(XFONT_FONT_BITSTREAM_TYPE1_VERSION).tar.bz2 +XFONT_FONT_BITSTREAM_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BITSTREAM_TYPE1_LICENSE = MIT +XFONT_FONT_BITSTREAM_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_BITSTREAM_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_BITSTREAM_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_BITSTREAM_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-cronyx-cyrillic/Config.in b/package/x11r7/xfont_font-cronyx-cyrillic/Config.in new file mode 100644 index 00000000..e92ab836 --- /dev/null +++ b/package/x11r7/xfont_font-cronyx-cyrillic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_CRONYX_CYRILLIC + bool "font-cronyx-cyrillic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.hash b/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.hash new file mode 100644 index 00000000..893ba571 --- /dev/null +++ b/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 6e8631936157677c77ba032b5c7b1fb3cb2ee872dbcea0444f12cd602cd9212a font-cronyx-cyrillic-1.0.3.tar.bz2 +sha256 857fa9f8d12bd7ce7fb235393d775dd5e0b5130fac7a88fdea9156d75b609402 COPYING diff --git a/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk b/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk new file mode 100644 index 00000000..caca639c --- /dev/null +++ b/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-cronyx-cyrillic +# +################################################################################ + +XFONT_FONT_CRONYX_CYRILLIC_VERSION = 1.0.3 +XFONT_FONT_CRONYX_CYRILLIC_SOURCE = font-cronyx-cyrillic-$(XFONT_FONT_CRONYX_CYRILLIC_VERSION).tar.bz2 +XFONT_FONT_CRONYX_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_CRONYX_CYRILLIC_LICENSE = MIT +XFONT_FONT_CRONYX_CYRILLIC_LICENSE_FILES = COPYING + +XFONT_FONT_CRONYX_CYRILLIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_CRONYX_CYRILLIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_CRONYX_CYRILLIC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-cursor-misc/Config.in b/package/x11r7/xfont_font-cursor-misc/Config.in new file mode 100644 index 00000000..0e10da6a --- /dev/null +++ b/package/x11r7/xfont_font-cursor-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_CURSOR_MISC + bool "font-cursor-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.hash b/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.hash new file mode 100644 index 00000000..04565f8b --- /dev/null +++ b/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 17363eb35eece2e08144da5f060c70103b59d0972b4f4d77fd84c9a7a2dba635 font-cursor-misc-1.0.3.tar.bz2 +sha256 c22415fb2144d7298e995dbeee2eb120822d653c61ae43c64fa0fda2cc3ca3a0 COPYING diff --git a/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk b/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk new file mode 100644 index 00000000..e7528030 --- /dev/null +++ b/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-cursor-misc +# +################################################################################ + +XFONT_FONT_CURSOR_MISC_VERSION = 1.0.3 +XFONT_FONT_CURSOR_MISC_SOURCE = font-cursor-misc-$(XFONT_FONT_CURSOR_MISC_VERSION).tar.bz2 +XFONT_FONT_CURSOR_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_CURSOR_MISC_LICENSE = unencumbered +XFONT_FONT_CURSOR_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_CURSOR_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_CURSOR_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_CURSOR_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-daewoo-misc/Config.in b/package/x11r7/xfont_font-daewoo-misc/Config.in new file mode 100644 index 00000000..cffe81de --- /dev/null +++ b/package/x11r7/xfont_font-daewoo-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_DAEWOO_MISC + bool "font-daewoo-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.hash b/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.hash new file mode 100644 index 00000000..1b4ebe9d --- /dev/null +++ b/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 bc65de70bee12698caa95b523d3b652c056347e17b68cc8b5d6bbdff235c4be8 font-daewoo-misc-1.0.3.tar.bz2 diff --git a/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk b/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk new file mode 100644 index 00000000..f5bd9413 --- /dev/null +++ b/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xfont_font-daewoo-misc +# +################################################################################ + +XFONT_FONT_DAEWOO_MISC_VERSION = 1.0.3 +XFONT_FONT_DAEWOO_MISC_SOURCE = font-daewoo-misc-$(XFONT_FONT_DAEWOO_MISC_VERSION).tar.bz2 +XFONT_FONT_DAEWOO_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_DAEWOO_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_DAEWOO_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_DAEWOO_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_DAEWOO_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-dec-misc/Config.in b/package/x11r7/xfont_font-dec-misc/Config.in new file mode 100644 index 00000000..a926d9f9 --- /dev/null +++ b/package/x11r7/xfont_font-dec-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_DEC_MISC + bool "font-dec-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.hash b/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.hash new file mode 100644 index 00000000..34873fe3 --- /dev/null +++ b/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 e19ddf8b5f8de914d81675358fdfe37762e9ce524887cc983adef34f2850ff7b font-dec-misc-1.0.3.tar.bz2 +sha256 bf4d44be4b5eb66c53bf5f7eb2d9d4817fb937788b37ed6ceda1876fdb964817 COPYING diff --git a/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk b/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk new file mode 100644 index 00000000..1642b413 --- /dev/null +++ b/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-dec-misc +# +################################################################################ + +XFONT_FONT_DEC_MISC_VERSION = 1.0.3 +XFONT_FONT_DEC_MISC_SOURCE = font-dec-misc-$(XFONT_FONT_DEC_MISC_VERSION).tar.bz2 +XFONT_FONT_DEC_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_DEC_MISC_LICENSE = MIT +XFONT_FONT_DEC_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_DEC_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_DEC_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_DEC_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-ibm-type1/Config.in b/package/x11r7/xfont_font-ibm-type1/Config.in new file mode 100644 index 00000000..d4ac1ae4 --- /dev/null +++ b/package/x11r7/xfont_font-ibm-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_IBM_TYPE1 + bool "font-ibm-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.hash b/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.hash new file mode 100644 index 00000000..c5e8f4e4 --- /dev/null +++ b/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 fddb28d3db5a07f4b4ca15388488a9680a10e1367a18f358f903b2a608a5d2df font-ibm-type1-1.0.3.tar.bz2 +sha256 fc0fd4df7ac7ac7f9b1ff3a221f28c52edea4506dc4c84f1869a3f4281360ca1 COPYING diff --git a/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk b/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk new file mode 100644 index 00000000..4d34998a --- /dev/null +++ b/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-ibm-type1 +# +################################################################################ + +XFONT_FONT_IBM_TYPE1_VERSION = 1.0.3 +XFONT_FONT_IBM_TYPE1_SOURCE = font-ibm-type1-$(XFONT_FONT_IBM_TYPE1_VERSION).tar.bz2 +XFONT_FONT_IBM_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_IBM_TYPE1_LICENSE = IBM/MIT X Consortium Courier Typefont agreement (no modification) +XFONT_FONT_IBM_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_IBM_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_IBM_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_IBM_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-isas-misc/Config.in b/package/x11r7/xfont_font-isas-misc/Config.in new file mode 100644 index 00000000..4dddaf75 --- /dev/null +++ b/package/x11r7/xfont_font-isas-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ISAS_MISC + bool "font-isas-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.hash b/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.hash new file mode 100644 index 00000000..bc4a9e5b --- /dev/null +++ b/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 5824ab4b485951107dd245b8f7717d2822f1a6dbf6cea98f1ac7f49905c0a867 font-isas-misc-1.0.3.tar.bz2 +sha256 32d5d082b8186051bbe75ea9cbedc646830217ca931b1b7a1e534a828c94e839 COPYING diff --git a/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk b/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk new file mode 100644 index 00000000..1393d67e --- /dev/null +++ b/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-isas-misc +# +################################################################################ + +XFONT_FONT_ISAS_MISC_VERSION = 1.0.3 +XFONT_FONT_ISAS_MISC_SOURCE = font-isas-misc-$(XFONT_FONT_ISAS_MISC_VERSION).tar.bz2 +XFONT_FONT_ISAS_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ISAS_MISC_LICENSE = MIT +XFONT_FONT_ISAS_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_ISAS_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_ISAS_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_ISAS_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-jis-misc/Config.in b/package/x11r7/xfont_font-jis-misc/Config.in new file mode 100644 index 00000000..1874ad82 --- /dev/null +++ b/package/x11r7/xfont_font-jis-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_JIS_MISC + bool "font-jis-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.hash b/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.hash new file mode 100644 index 00000000..c39db360 --- /dev/null +++ b/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 2b18ce10b367ebafe95a17de799b6db9a24e2337188d124adaf68af05b1fac65 font-jis-misc-1.0.3.tar.bz2 diff --git a/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk b/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk new file mode 100644 index 00000000..78a5bbbf --- /dev/null +++ b/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xfont_font-jis-misc +# +################################################################################ + +XFONT_FONT_JIS_MISC_VERSION = 1.0.3 +XFONT_FONT_JIS_MISC_SOURCE = font-jis-misc-$(XFONT_FONT_JIS_MISC_VERSION).tar.bz2 +XFONT_FONT_JIS_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_JIS_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_JIS_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_JIS_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_JIS_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-micro-misc/Config.in b/package/x11r7/xfont_font-micro-misc/Config.in new file mode 100644 index 00000000..2062e16e --- /dev/null +++ b/package/x11r7/xfont_font-micro-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MICRO_MISC + bool "font-micro-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.hash b/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.hash new file mode 100644 index 00000000..ce0899b6 --- /dev/null +++ b/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 9a3381c10f32d9511f0ad4179df395914c50779103c16cddf7017f5220ed8db6 font-micro-misc-1.0.3.tar.bz2 +sha256 1711d038bca0efb51b5114e902412019d1c21531882866b1a6908c6386268cfb COPYING diff --git a/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk b/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk new file mode 100644 index 00000000..b5da83f3 --- /dev/null +++ b/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-micro-misc +# +################################################################################ + +XFONT_FONT_MICRO_MISC_VERSION = 1.0.3 +XFONT_FONT_MICRO_MISC_SOURCE = font-micro-misc-$(XFONT_FONT_MICRO_MISC_VERSION).tar.bz2 +XFONT_FONT_MICRO_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MICRO_MISC_LICENSE = Public Domain +XFONT_FONT_MICRO_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_MICRO_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_MICRO_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_MICRO_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-cyrillic/Config.in b/package/x11r7/xfont_font-misc-cyrillic/Config.in new file mode 100644 index 00000000..58702c14 --- /dev/null +++ b/package/x11r7/xfont_font-misc-cyrillic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_CYRILLIC + bool "font-misc-cyrillic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.hash b/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.hash new file mode 100644 index 00000000..5eb407f4 --- /dev/null +++ b/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 e40fe3e3323c62b738550795457ad555c70c008aa91b5912dfd46f8e745f5e60 font-misc-cyrillic-1.0.3.tar.bz2 +sha256 8765722448e0ca6ce113d0406554c40224f74abfc005f4b2ef927567349f1529 COPYING diff --git a/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk b/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk new file mode 100644 index 00000000..8fa30ea3 --- /dev/null +++ b/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-misc-cyrillic +# +################################################################################ + +XFONT_FONT_MISC_CYRILLIC_VERSION = 1.0.3 +XFONT_FONT_MISC_CYRILLIC_SOURCE = font-misc-cyrillic-$(XFONT_FONT_MISC_CYRILLIC_VERSION).tar.bz2 +XFONT_FONT_MISC_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MISC_CYRILLIC_LICENSE = MIT / Public Domain +XFONT_FONT_MISC_CYRILLIC_LICENSE_FILES = COPYING + +XFONT_FONT_MISC_CYRILLIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_MISC_CYRILLIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_MISC_CYRILLIC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-ethiopic/Config.in b/package/x11r7/xfont_font-misc-ethiopic/Config.in new file mode 100644 index 00000000..af62ddc3 --- /dev/null +++ b/package/x11r7/xfont_font-misc-ethiopic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_ETHIOPIC + bool "font-misc-ethiopic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.hash b/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.hash new file mode 100644 index 00000000..45cf4300 --- /dev/null +++ b/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2020-August/003055.html +sha256 698c0f6ddf9ca482250bdafa08293893148393bb9cb23e0a9ca313c6dbfc4ae0 font-misc-ethiopic-1.0.4.tar.bz2 +sha512 4fed9ff3782746898c56dac199e9ca89356f4967779937049b9ff4ffad202317c023859f92d44b371dfa5485d5368ccad648e64b12cde0ed21f7d4aee5affcd5 font-misc-ethiopic-1.0.4.tar.bz2 +# locally computed +sha256 94835f274f1ddad34f8fd3a06b2c493222a68e4094f4097000d101f22ee0d0d5 COPYING diff --git a/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk b/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk new file mode 100644 index 00000000..9ded4b6c --- /dev/null +++ b/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-misc-ethiopic +# +################################################################################ + +XFONT_FONT_MISC_ETHIOPIC_VERSION = 1.0.4 +XFONT_FONT_MISC_ETHIOPIC_SOURCE = font-misc-ethiopic-$(XFONT_FONT_MISC_ETHIOPIC_VERSION).tar.bz2 +XFONT_FONT_MISC_ETHIOPIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MISC_ETHIOPIC_LICENSE = MIT +XFONT_FONT_MISC_ETHIOPIC_LICENSE_FILES = COPYING + +XFONT_FONT_MISC_ETHIOPIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_MISC_ETHIOPIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_MISC_ETHIOPIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-meltho/Config.in b/package/x11r7/xfont_font-misc-meltho/Config.in new file mode 100644 index 00000000..dd2d87d9 --- /dev/null +++ b/package/x11r7/xfont_font-misc-meltho/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_MELTHO + bool "font-misc-meltho" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.hash b/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.hash new file mode 100644 index 00000000..92046c85 --- /dev/null +++ b/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 3721323f13855cf7ca609115a1f7b182491e9b2b9c6e01eb1a2c7f8edd480791 font-misc-meltho-1.0.3.tar.bz2 +sha256 6a02b45e4877b9df8c1bdaa21e1e8fba86d85e3be4c90f2791183a501e0cbd25 COPYING diff --git a/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk b/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk new file mode 100644 index 00000000..ac4a71b7 --- /dev/null +++ b/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-misc-meltho +# +################################################################################ + +XFONT_FONT_MISC_MELTHO_VERSION = 1.0.3 +XFONT_FONT_MISC_MELTHO_SOURCE = font-misc-meltho-$(XFONT_FONT_MISC_MELTHO_VERSION).tar.bz2 +XFONT_FONT_MISC_MELTHO_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MISC_MELTHO_LICENSE = Meltho License +XFONT_FONT_MISC_MELTHO_LICENSE_FILES = COPYING + +XFONT_FONT_MISC_MELTHO_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_MISC_MELTHO_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_MISC_MELTHO_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-misc/Config.in b/package/x11r7/xfont_font-misc-misc/Config.in new file mode 100644 index 00000000..fc379a6e --- /dev/null +++ b/package/x11r7/xfont_font-misc-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_MISC + bool "font-misc-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.hash b/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.hash new file mode 100644 index 00000000..78174242 --- /dev/null +++ b/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 b8e77940e4e1769dc47ef1805918d8c9be37c708735832a07204258bacc11794 font-misc-misc-1.1.2.tar.bz2 +sha256 1711d038bca0efb51b5114e902412019d1c21531882866b1a6908c6386268cfb COPYING diff --git a/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk b/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk new file mode 100644 index 00000000..e03da6f1 --- /dev/null +++ b/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-misc-misc +# +################################################################################ + +XFONT_FONT_MISC_MISC_VERSION = 1.1.2 +XFONT_FONT_MISC_MISC_SOURCE = font-misc-misc-$(XFONT_FONT_MISC_MISC_VERSION).tar.bz2 +XFONT_FONT_MISC_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MISC_MISC_LICENSE = Public Domain +XFONT_FONT_MISC_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_MISC_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_MISC_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_MISC_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-mutt-misc/Config.in b/package/x11r7/xfont_font-mutt-misc/Config.in new file mode 100644 index 00000000..563dc9f2 --- /dev/null +++ b/package/x11r7/xfont_font-mutt-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MUTT_MISC + bool "font-mutt-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.hash b/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.hash new file mode 100644 index 00000000..f6e8e9aa --- /dev/null +++ b/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 bd5f7adb34367c197773a9801df5bce7b019664941900b2a31fbfe1ff2830f8f font-mutt-misc-1.0.3.tar.bz2 +sha256 81d42a6eeaf3ac2fcc1e1408fb6e2039d1162ca85d4abaf75e3daddcb250e4ff COPYING diff --git a/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk b/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk new file mode 100644 index 00000000..6fcaa5da --- /dev/null +++ b/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-mutt-misc +# +################################################################################ + +XFONT_FONT_MUTT_MISC_VERSION = 1.0.3 +XFONT_FONT_MUTT_MISC_SOURCE = font-mutt-misc-$(XFONT_FONT_MUTT_MISC_VERSION).tar.bz2 +XFONT_FONT_MUTT_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MUTT_MISC_LICENSE = MIT +XFONT_FONT_MUTT_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_MUTT_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_MUTT_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_MUTT_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-schumacher-misc/Config.in b/package/x11r7/xfont_font-schumacher-misc/Config.in new file mode 100644 index 00000000..e30940a6 --- /dev/null +++ b/package/x11r7/xfont_font-schumacher-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_SCHUMACHER_MISC + bool "font-schumacher-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.hash b/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.hash new file mode 100644 index 00000000..107493b2 --- /dev/null +++ b/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 e444028656e0767e2eddc6d9aca462b16a2be75a47244dbc199b2c44eca87e5a font-schumacher-misc-1.1.2.tar.bz2 +sha256 4e2b9933887950acad3a780dce91c71770c8887f132bcd0c2ba6146cdc372407 COPYING diff --git a/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk b/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk new file mode 100644 index 00000000..e07569d4 --- /dev/null +++ b/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-schumacher-misc +# +################################################################################ + +XFONT_FONT_SCHUMACHER_MISC_VERSION = 1.1.2 +XFONT_FONT_SCHUMACHER_MISC_SOURCE = font-schumacher-misc-$(XFONT_FONT_SCHUMACHER_MISC_VERSION).tar.bz2 +XFONT_FONT_SCHUMACHER_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_SCHUMACHER_MISC_LICENSE = MIT +XFONT_FONT_SCHUMACHER_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_SCHUMACHER_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_SCHUMACHER_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_SCHUMACHER_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-screen-cyrillic/Config.in b/package/x11r7/xfont_font-screen-cyrillic/Config.in new file mode 100644 index 00000000..67f4ae6c --- /dev/null +++ b/package/x11r7/xfont_font-screen-cyrillic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_SCREEN_CYRILLIC + bool "font-screen-cyrillic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.hash b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.hash new file mode 100644 index 00000000..e8d3fa16 --- /dev/null +++ b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.hash @@ -0,0 +1,4 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 824231e8dffe15299454e47259f29d98001c9cf8ad3d6b5171399e4d71705e79 font-screen-cyrillic-1.0.4.tar.bz2 +# Locally computed +sha256 5234cbcbdcc9865ce2b576b5f67e77e40ccdc1aa01e6528bea5a17784934b894 COPYING diff --git a/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk new file mode 100644 index 00000000..a254d4a7 --- /dev/null +++ b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-screen-cyrillic +# +################################################################################ + +XFONT_FONT_SCREEN_CYRILLIC_VERSION = 1.0.4 +XFONT_FONT_SCREEN_CYRILLIC_SOURCE = font-screen-cyrillic-$(XFONT_FONT_SCREEN_CYRILLIC_VERSION).tar.bz2 +XFONT_FONT_SCREEN_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_SCREEN_CYRILLIC_LICENSE = MIT +XFONT_FONT_SCREEN_CYRILLIC_LICENSE_FILES = COPYING + +XFONT_FONT_SCREEN_CYRILLIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_SCREEN_CYRILLIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_SCREEN_CYRILLIC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-sony-misc/Config.in b/package/x11r7/xfont_font-sony-misc/Config.in new file mode 100644 index 00000000..df558c43 --- /dev/null +++ b/package/x11r7/xfont_font-sony-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_SONY_MISC + bool "font-sony-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.hash b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.hash new file mode 100644 index 00000000..80261ff3 --- /dev/null +++ b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.hash @@ -0,0 +1,4 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 2043a326ba347c9da5ca1e9bc363e2521c3ea40b43b1f9662d333efd4867cff5 font-sony-misc-1.0.3.tar.bz2 +# Locally computed +sha256 8233ff7d7bc8b5b46cbba3f6cd0069d2ef875bd1b1e0090ca4145282aa096739 COPYING diff --git a/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk new file mode 100644 index 00000000..6e580fd9 --- /dev/null +++ b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-sony-misc +# +################################################################################ + +XFONT_FONT_SONY_MISC_VERSION = 1.0.3 +XFONT_FONT_SONY_MISC_SOURCE = font-sony-misc-$(XFONT_FONT_SONY_MISC_VERSION).tar.bz2 +XFONT_FONT_SONY_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_SONY_MISC_LICENSE = MIT +XFONT_FONT_SONY_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_SONY_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_SONY_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_SONY_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-sun-misc/Config.in b/package/x11r7/xfont_font-sun-misc/Config.in new file mode 100644 index 00000000..accc764a --- /dev/null +++ b/package/x11r7/xfont_font-sun-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_SUN_MISC + bool "font-sun-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.hash b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.hash new file mode 100644 index 00000000..8b195c9f --- /dev/null +++ b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.hash @@ -0,0 +1,4 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 481f4fcbbf7005658b080b3cf342c8c76de752e77f47958b2b383de73266d2e0 font-sun-misc-1.0.3.tar.bz2 +# Locally computed +sha256 dd6da1d39832ab2878c3304405c1c7883c6da292ffde262fca1785239534c40f COPYING diff --git a/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk new file mode 100644 index 00000000..737cfb5c --- /dev/null +++ b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-sun-misc +# +################################################################################ + +XFONT_FONT_SUN_MISC_VERSION = 1.0.3 +XFONT_FONT_SUN_MISC_SOURCE = font-sun-misc-$(XFONT_FONT_SUN_MISC_VERSION).tar.bz2 +XFONT_FONT_SUN_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_SUN_MISC_LICENSE = MIT +XFONT_FONT_SUN_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_SUN_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_SUN_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_SUN_MISC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-util/Config.in b/package/x11r7/xfont_font-util/Config.in new file mode 100644 index 00000000..4edeffdd --- /dev/null +++ b/package/x11r7/xfont_font-util/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_UTIL + bool "font-util" + help + No description available diff --git a/package/x11r7/xfont_font-util/xfont_font-util.hash b/package/x11r7/xfont_font-util/xfont_font-util.hash new file mode 100644 index 00000000..55beba89 --- /dev/null +++ b/package/x11r7/xfont_font-util/xfont_font-util.hash @@ -0,0 +1,8 @@ +# From https://lists.x.org/archives/xorg-announce/2019-August/003019.html +md5 3d6adb76fdd072db8c8fae41b40855e8 font-util-1.3.2.tar.bz2 +sha1 1b36275c174b64a9c16da5c902c91546789a67ef font-util-1.3.2.tar.bz2 +sha256 3ad880444123ac06a7238546fa38a2a6ad7f7e0cc3614de7e103863616522282 font-util-1.3.2.tar.bz2 +sha512 7cac529b12ae71185b89c72c1569b9826f52eeaecc1c76010338e7c42c4078ae339f18220b580bbd68fb5dc09df6ecf169a47c32e6104d8ee53bd443fa21d167 font-util-1.3.2.tar.bz2 + +# Locally calculated +sha256 ce16c3ee6f2a38db6870b66bdb54fce9dcf24acd1161840789e321f6faa1251c COPYING diff --git a/package/x11r7/xfont_font-util/xfont_font-util.mk b/package/x11r7/xfont_font-util/xfont_font-util.mk new file mode 100644 index 00000000..cd2ae81c --- /dev/null +++ b/package/x11r7/xfont_font-util/xfont_font-util.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xfont_font-util +# +################################################################################ + +XFONT_FONT_UTIL_VERSION = 1.3.2 +XFONT_FONT_UTIL_SOURCE = font-util-$(XFONT_FONT_UTIL_VERSION).tar.bz2 +XFONT_FONT_UTIL_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_UTIL_LICENSE = MIT/BSD-2-Clause +XFONT_FONT_UTIL_LICENSE_FILES = COPYING + +XFONT_FONT_UTIL_DEPENDENCIES = host-pkgconf +HOST_XFONT_FONT_UTIL_DEPENDENCIES = host-pkgconf +XFONT_FONT_UTIL_INSTALL_STAGING = YES +XFONT_FONT_UTIL_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xfont_font-winitzki-cyrillic/Config.in b/package/x11r7/xfont_font-winitzki-cyrillic/Config.in new file mode 100644 index 00000000..ccfb0802 --- /dev/null +++ b/package/x11r7/xfont_font-winitzki-cyrillic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_WINITZKI_CYRILLIC + bool "font-winitzki-cyrillic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.hash b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.hash new file mode 100644 index 00000000..283f6f9f --- /dev/null +++ b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.hash @@ -0,0 +1,4 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 abd13b63d02fcaec488686c23683e5cf640b43bd32f8ca22eeae6f84df0a36a0 font-winitzki-cyrillic-1.0.3.tar.bz2 +# Locally computed +sha256 ca60a2aa1133e39e8c72a01af06cf0c927f5ddfe70d469d1535231100618095d COPYING diff --git a/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk new file mode 100644 index 00000000..e43cd115 --- /dev/null +++ b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfont_font-winitzki-cyrillic +# +################################################################################ + +XFONT_FONT_WINITZKI_CYRILLIC_VERSION = 1.0.3 +XFONT_FONT_WINITZKI_CYRILLIC_SOURCE = font-winitzki-cyrillic-$(XFONT_FONT_WINITZKI_CYRILLIC_VERSION).tar.bz2 +XFONT_FONT_WINITZKI_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_WINITZKI_CYRILLIC_LICENSE = Public Domain +XFONT_FONT_WINITZKI_CYRILLIC_LICENSE_FILES = COPYING + +XFONT_FONT_WINITZKI_CYRILLIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_WINITZKI_CYRILLIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_WINITZKI_CYRILLIC_DEPENDENCIES = \ + xfont_font-util \ + host-xfont_font-util \ + host-xapp_mkfontscale \ + host-xapp_bdftopcf \ + host-gzip + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-xfree86-type1/Config.in b/package/x11r7/xfont_font-xfree86-type1/Config.in new file mode 100644 index 00000000..1a897b24 --- /dev/null +++ b/package/x11r7/xfont_font-xfree86-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_XFREE86_TYPE1 + bool "font-xfree86-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.hash b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.hash new file mode 100644 index 00000000..640f5663 --- /dev/null +++ b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.hash @@ -0,0 +1,4 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 caebf42aec7be7f3bd40e0f232d6f34881b853dc84acfcdf7458358701fbe34a font-xfree86-type1-1.0.4.tar.bz2 +# Locally computed +sha256 51e6bc6513b3fa94512d8dd570240498c878605f25292c3883d92fdfca18d0c6 COPYING diff --git a/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk new file mode 100644 index 00000000..a26fbc89 --- /dev/null +++ b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-xfree86-type1 +# +################################################################################ + +XFONT_FONT_XFREE86_TYPE1_VERSION = 1.0.4 +XFONT_FONT_XFREE86_TYPE1_SOURCE = font-xfree86-type1-$(XFONT_FONT_XFREE86_TYPE1_VERSION).tar.bz2 +XFONT_FONT_XFREE86_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_XFREE86_TYPE1_LICENSE = MIT +XFONT_FONT_XFREE86_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_XFREE86_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install +XFONT_FONT_XFREE86_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/bin/mkfontdir install-data +XFONT_FONT_XFREE86_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xkeyboard-config/Config.in b/package/x11r7/xkeyboard-config/Config.in new file mode 100644 index 00000000..17cfe738 --- /dev/null +++ b/package/x11r7/xkeyboard-config/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XKEYBOARD_CONFIG + bool "xkeyboard-config" + # Runtime dependencies + select BR2_PACKAGE_XAPP_XKBCOMP if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XORGPROTO if BR2_PACKAGE_XORG7 + help + keyboard configuration database for X + + https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config diff --git a/package/x11r7/xkeyboard-config/xkeyboard-config.hash b/package/x11r7/xkeyboard-config/xkeyboard-config.hash new file mode 100644 index 00000000..3cbd1911 --- /dev/null +++ b/package/x11r7/xkeyboard-config/xkeyboard-config.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 da44181f2c8828789c720decf7d13acb3c3950e2a040af5132f50f04bb6aada3 xkeyboard-config-2.31.tar.bz2 +sha256 6ca90f4b67dced4062894d6d77f4cc39343df9e359fc12f5e5d3c89ef2a3ef6d COPYING diff --git a/package/x11r7/xkeyboard-config/xkeyboard-config.mk b/package/x11r7/xkeyboard-config/xkeyboard-config.mk new file mode 100644 index 00000000..f192836d --- /dev/null +++ b/package/x11r7/xkeyboard-config/xkeyboard-config.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# xkeyboard-config +# +################################################################################ + +XKEYBOARD_CONFIG_VERSION = 2.31 +XKEYBOARD_CONFIG_SOURCE = xkeyboard-config-$(XKEYBOARD_CONFIG_VERSION).tar.bz2 +XKEYBOARD_CONFIG_SITE = https://www.x.org/releases/individual/data/xkeyboard-config +XKEYBOARD_CONFIG_LICENSE = MIT +XKEYBOARD_CONFIG_LICENSE_FILES = COPYING + +XKEYBOARD_CONFIG_DEPENDENCIES = \ + $(BR2_PYTHON3_HOST_DEPENDENCY) \ + host-gettext \ + host-xapp_xkbcomp + +# xkeyboard-config.pc +XKEYBOARD_CONFIG_INSTALL_STAGING = YES + +XKEYBOARD_CONFIG_CONF_OPTS = --disable-runtime-deps + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libFS/Config.in b/package/x11r7/xlib_libFS/Config.in new file mode 100644 index 00000000..6ff0bcc3 --- /dev/null +++ b/package/x11r7/xlib_libFS/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBFS + bool "libFS" + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XORGPROTO + help + X.Org FS library diff --git a/package/x11r7/xlib_libFS/xlib_libFS.hash b/package/x11r7/xlib_libFS/xlib_libFS.hash new file mode 100644 index 00000000..c6f16857 --- /dev/null +++ b/package/x11r7/xlib_libFS/xlib_libFS.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002970.html +md5 4e1196275aa743d6ebd3d3d5ec1dff9c libFS-1.0.8.tar.bz2 +sha1 70173cc15a7a55defb7b22b00a9387901acad634 libFS-1.0.8.tar.bz2 +sha256 c8e13727149b2ddfe40912027459b2522042e3844c5cd228c3300fe5eef6bd0f libFS-1.0.8.tar.bz2 +sha512 466198ae5c0b83e3579713d86ddfd0b039f5c5b511cf6d5dc0e9664ee2d40aec9e8929445c8e97394d85faf76a7cf2f81bddb13d23de7ce19919e3b1e36ba56f libFS-1.0.8.tar.bz2 +# Locally computed +sha256 5386724e7475b89394dd836b954a6688f875efab99e43e8eb7e8775f5b99a341 COPYING diff --git a/package/x11r7/xlib_libFS/xlib_libFS.mk b/package/x11r7/xlib_libFS/xlib_libFS.mk new file mode 100644 index 00000000..9d9aecb7 --- /dev/null +++ b/package/x11r7/xlib_libFS/xlib_libFS.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libFS +# +################################################################################ + +XLIB_LIBFS_VERSION = 1.0.8 +XLIB_LIBFS_SOURCE = libFS-$(XLIB_LIBFS_VERSION).tar.bz2 +XLIB_LIBFS_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBFS_LICENSE = MIT +XLIB_LIBFS_LICENSE_FILES = COPYING +XLIB_LIBFS_CPE_ID_VENDOR = x +XLIB_LIBFS_CPE_ID_PRODUCT = libfs +XLIB_LIBFS_INSTALL_STAGING = YES +XLIB_LIBFS_DEPENDENCIES = xlib_xtrans xorgproto host-pkgconf +XLIB_LIBFS_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libICE/Config.in b/package/x11r7/xlib_libICE/Config.in new file mode 100644 index 00000000..ccdd4003 --- /dev/null +++ b/package/x11r7/xlib_libICE/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBICE + bool "libICE" + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XORGPROTO + help + X.Org ICE library diff --git a/package/x11r7/xlib_libICE/xlib_libICE.hash b/package/x11r7/xlib_libICE/xlib_libICE.hash new file mode 100644 index 00000000..426ada32 --- /dev/null +++ b/package/x11r7/xlib_libICE/xlib_libICE.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-July/003006.html +md5 76d77499ee7120a56566891ca2c0dbcf libICE-1.0.10.tar.bz2 +sha1 5b5eb125d4f43a3ab8153b0f850963ee6c982c24 libICE-1.0.10.tar.bz2 +sha256 6f86dce12cf4bcaf5c37dddd8b1b64ed2ddf1ef7b218f22b9942595fb747c348 libICE-1.0.10.tar.bz2 +sha512 2f1ef2c32c833c71894a08fa7e7ed53f301f6c7bd22485d71c12884d8e8b36b99f362ec886349dcc84d08edc81c8b2cea035320831d64974edeba021b433c468 libICE-1.0.10.tar.bz2 +# Locally computed +sha256 60105b7ea93cb07a67fee8443b092b727e3db7f0dff4fbe05bc6cd7747fb53c8 COPYING diff --git a/package/x11r7/xlib_libICE/xlib_libICE.mk b/package/x11r7/xlib_libICE/xlib_libICE.mk new file mode 100644 index 00000000..2b56aaab --- /dev/null +++ b/package/x11r7/xlib_libICE/xlib_libICE.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xlib_libICE +# +################################################################################ + +XLIB_LIBICE_VERSION = 1.0.10 +XLIB_LIBICE_SOURCE = libICE-$(XLIB_LIBICE_VERSION).tar.bz2 +XLIB_LIBICE_SITE = https://xorg.freedesktop.org/archive/individual/lib +XLIB_LIBICE_LICENSE = MIT +XLIB_LIBICE_LICENSE_FILES = COPYING +XLIB_LIBICE_CPE_ID_VENDOR = freedesktop +XLIB_LIBICE_CPE_ID_PRODUCT = libice +XLIB_LIBICE_INSTALL_STAGING = YES +XLIB_LIBICE_DEPENDENCIES = xlib_xtrans xorgproto host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libSM/Config.in b/package/x11r7/xlib_libSM/Config.in new file mode 100644 index 00000000..02ee2bd2 --- /dev/null +++ b/package/x11r7/xlib_libSM/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBSM + bool "libSM" + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XORGPROTO + help + X.Org SM library diff --git a/package/x11r7/xlib_libSM/xlib_libSM.hash b/package/x11r7/xlib_libSM/xlib_libSM.hash new file mode 100644 index 00000000..1653dc6d --- /dev/null +++ b/package/x11r7/xlib_libSM/xlib_libSM.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-October/002922.html +md5 87c7fad1c1813517979184c8ccd76628 libSM-1.2.3.tar.bz2 +sha1 437d7b13fa2eba325df3a106f177df46ccec6546 libSM-1.2.3.tar.bz2 +sha256 2d264499dcb05f56438dee12a1b4b71d76736ce7ba7aa6efbf15ebb113769cbb libSM-1.2.3.tar.bz2 +sha512 74c42e27029db78475e62025b4711dbac5e22d2f8e8a24be98a1c31b03c0fc4afe859928f851800ea0b76854f12147900dc4f27bbfd3d8ea45daaaf24b70a903 libSM-1.2.3.tar.bz2 +# Locally computed +sha256 af7926a14d85ad367622688636e8c9c6f7807c8a6867536af1c530b5c262bfba COPYING diff --git a/package/x11r7/xlib_libSM/xlib_libSM.mk b/package/x11r7/xlib_libSM/xlib_libSM.mk new file mode 100644 index 00000000..708224e2 --- /dev/null +++ b/package/x11r7/xlib_libSM/xlib_libSM.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libSM +# +################################################################################ + +XLIB_LIBSM_VERSION = 1.2.3 +XLIB_LIBSM_SOURCE = libSM-$(XLIB_LIBSM_VERSION).tar.bz2 +XLIB_LIBSM_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBSM_LICENSE = MIT +XLIB_LIBSM_LICENSE_FILES = COPYING +XLIB_LIBSM_INSTALL_STAGING = YES +XLIB_LIBSM_DEPENDENCIES = xlib_libICE xlib_xtrans xorgproto +XLIB_LIBSM_CONF_OPTS = --without-libuuid + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libX11/Config.in b/package/x11r7/xlib_libX11/Config.in new file mode 100644 index 00000000..d69c51b9 --- /dev/null +++ b/package/x11r7/xlib_libX11/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XLIB_LIBX11 + bool "libX11" + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XUTIL_UTIL_MACROS + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XLIB_LIBXAU + select BR2_PACKAGE_XLIB_LIBXDMCP + select BR2_PACKAGE_XORGPROTO + help + X.Org X11 library diff --git a/package/x11r7/xlib_libX11/xlib_libX11.hash b/package/x11r7/xlib_libX11/xlib_libX11.hash new file mode 100644 index 00000000..7aeef334 --- /dev/null +++ b/package/x11r7/xlib_libX11/xlib_libX11.hash @@ -0,0 +1,6 @@ +# From https://lists.x.org/archives/xorg-announce/2021-June/003092.html +sha256 1cfa35e37aaabbe4792e9bb690468efefbfbf6b147d9c69d6f90d13c3092ea6c libX11-1.7.2.tar.bz2 +sha512 d01e5c1848c76218605e5af2d353de6b301a251555b52a38dbe930e6635d5e8a92d1486eb6d328ad5d42a5939e0d16868ffa19a75e5a7863d1a32e0d0727bdc7 libX11-1.7.2.tar.bz2 + +# Locally computed +sha256 2daec087a88e7c9b8082557cdeebad5bbb8155a4137472f0b22e269cd99d0c1e COPYING diff --git a/package/x11r7/xlib_libX11/xlib_libX11.mk b/package/x11r7/xlib_libX11/xlib_libX11.mk new file mode 100644 index 00000000..aa3ebf15 --- /dev/null +++ b/package/x11r7/xlib_libX11/xlib_libX11.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# xlib_libX11 +# +################################################################################ + +XLIB_LIBX11_VERSION = 1.7.2 +XLIB_LIBX11_SOURCE = libX11-$(XLIB_LIBX11_VERSION).tar.bz2 +XLIB_LIBX11_SITE = https://xorg.freedesktop.org/archive/individual/lib +XLIB_LIBX11_LICENSE = MIT +XLIB_LIBX11_LICENSE_FILES = COPYING +XLIB_LIBX11_CPE_ID_VENDOR = x.org +XLIB_LIBX11_CPE_ID_PRODUCT = libx11 +XLIB_LIBX11_INSTALL_STAGING = YES +XLIB_LIBX11_DEPENDENCIES = \ + libxcb \ + xutil_util-macros \ + xlib_xtrans \ + xlib_libXau \ + xlib_libXdmcp \ + xorgproto \ + host-xorgproto + +HOST_XLIB_LIBX11_DEPENDENCIES = \ + host-libxcb \ + host-xutil_util-macros \ + host-xlib_xtrans \ + host-xlib_libXau \ + host-xlib_libXdmcp \ + host-xorgproto + +XLIB_LIBX11_CONF_OPTS = \ + --disable-malloc0returnsnull \ + --disable-specs \ + --without-perl + +HOST_XLIB_LIBX11_CONF_OPTS = \ + --disable-specs \ + --without-perl + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXScrnSaver/Config.in b/package/x11r7/xlib_libXScrnSaver/Config.in new file mode 100644 index 00000000..05c96d74 --- /dev/null +++ b/package/x11r7/xlib_libXScrnSaver/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXSCRNSAVER + bool "libXScrnSaver" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XORGPROTO + help + X.Org XScrnSaver library diff --git a/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.hash b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.hash new file mode 100644 index 00000000..26684011 --- /dev/null +++ b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-July/002906.html +md5 eeea9d5af3e6c143d0ea1721d27a5e49 libXScrnSaver-1.2.3.tar.bz2 +sha1 70c791c5755a298ecf1a0823e239a24fa4b2b42f libXScrnSaver-1.2.3.tar.bz2 +sha256 f917075a1b7b5a38d67a8b0238eaab14acd2557679835b154cf2bca576e89bf8 libXScrnSaver-1.2.3.tar.bz2 +sha512 7ea628324a11b25ee82c7b11c6bf98f37de219354de51c1e29467b5de422669ba1ab121f3b9dc674093c8f3960e93c5d5428122f5539092f79bc8451c768354a libXScrnSaver-1.2.3.tar.bz2 +# Locally computed +sha256 5cf3e16f5dd753a4c0853e8227134ab65f5562d9ef89b1a2d7681f5c8ac9feb5 COPYING diff --git a/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk new file mode 100644 index 00000000..92abb902 --- /dev/null +++ b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXScrnSaver +# +################################################################################ + +XLIB_LIBXSCRNSAVER_VERSION = 1.2.3 +XLIB_LIBXSCRNSAVER_SOURCE = libXScrnSaver-$(XLIB_LIBXSCRNSAVER_VERSION).tar.bz2 +XLIB_LIBXSCRNSAVER_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXSCRNSAVER_LICENSE = MIT +XLIB_LIBXSCRNSAVER_LICENSE_FILES = COPYING +XLIB_LIBXSCRNSAVER_INSTALL_STAGING = YES +XLIB_LIBXSCRNSAVER_DEPENDENCIES = xlib_libX11 xlib_libXext xorgproto +XLIB_LIBXSCRNSAVER_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXau/Config.in b/package/x11r7/xlib_libXau/Config.in new file mode 100644 index 00000000..0323faa3 --- /dev/null +++ b/package/x11r7/xlib_libXau/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBXAU + bool "libXau" + select BR2_PACKAGE_XORGPROTO + select BR2_PACKAGE_XUTIL_UTIL_MACROS + help + X.Org Xau library diff --git a/package/x11r7/xlib_libXau/xlib_libXau.hash b/package/x11r7/xlib_libXau/xlib_libXau.hash new file mode 100644 index 00000000..a78d7f0f --- /dev/null +++ b/package/x11r7/xlib_libXau/xlib_libXau.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002942.html +md5 c5f16288f2da9f071b29111d68797480 libXau-1.0.9.tar.bz2 +sha1 ef9b1ad00f958c8b6e30a1bbc11fdfac311c9733 libXau-1.0.9.tar.bz2 +sha256 ccf8cbf0dbf676faa2ea0a6d64bcc3b6746064722b606c8c52917ed00dcb73ec libXau-1.0.9.tar.bz2 +sha512 3ca454ba466a807ea28b0f715066d73dc76ad312697b121d43e4d5766215052e9b7ffb8fe3ed3e496fa3f2a13f164ac692ff85cc428e26731b679f0f06a1d562 libXau-1.0.9.tar.bz2 +# Locally computed +sha256 56abe29bb1d9806a9e04fa9f80fed2c0f18027594df3f098148d814aef6bddfa COPYING diff --git a/package/x11r7/xlib_libXau/xlib_libXau.mk b/package/x11r7/xlib_libXau/xlib_libXau.mk new file mode 100644 index 00000000..bac10818 --- /dev/null +++ b/package/x11r7/xlib_libXau/xlib_libXau.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXau +# +################################################################################ + +XLIB_LIBXAU_VERSION = 1.0.9 +XLIB_LIBXAU_SOURCE = libXau-$(XLIB_LIBXAU_VERSION).tar.bz2 +XLIB_LIBXAU_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXAU_LICENSE = MIT +XLIB_LIBXAU_LICENSE_FILES = COPYING +XLIB_LIBXAU_INSTALL_STAGING = YES +XLIB_LIBXAU_DEPENDENCIES = host-pkgconf xutil_util-macros xorgproto +HOST_XLIB_LIBXAU_DEPENDENCIES = \ + host-pkgconf host-xutil_util-macros host-xorgproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXaw/Config.in b/package/x11r7/xlib_libXaw/Config.in new file mode 100644 index 00000000..bda4ded2 --- /dev/null +++ b/package/x11r7/xlib_libXaw/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XLIB_LIBXAW + bool "libXaw" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXPM + select BR2_PACKAGE_XORGPROTO + help + X.Org Xaw library diff --git a/package/x11r7/xlib_libXaw/xlib_libXaw.hash b/package/x11r7/xlib_libXaw/xlib_libXaw.hash new file mode 100644 index 00000000..f289e661 --- /dev/null +++ b/package/x11r7/xlib_libXaw/xlib_libXaw.hash @@ -0,0 +1,6 @@ +# From https://lists.x.org/archives/xorg-announce/2021-March/003077.html +sha256 76aef98ea3df92615faec28004b5ce4e5c6855e716fa16de40c32030722a6f8e libXaw-1.0.14.tar.bz2 +sha512 29d1c151369523ae6cb418e636b0b7b39ccccc35462a0b394dbeb46d5b6d780badd2eb872a55d9fbba1ee1af034e76c0463f40f8d8a7be2c336d08b3b1bf81d4 libXaw-1.0.14.tar.bz2 + +# Locally calculated +sha256 9f5adb26952f93b3e4650285b94ec6c61a27aab5a21088bfb6694001be1b360d COPYING diff --git a/package/x11r7/xlib_libXaw/xlib_libXaw.mk b/package/x11r7/xlib_libXaw/xlib_libXaw.mk new file mode 100644 index 00000000..6b615a8d --- /dev/null +++ b/package/x11r7/xlib_libXaw/xlib_libXaw.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libXaw +# +################################################################################ + +XLIB_LIBXAW_VERSION = 1.0.14 +XLIB_LIBXAW_SOURCE = libXaw-$(XLIB_LIBXAW_VERSION).tar.bz2 +XLIB_LIBXAW_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXAW_LICENSE = MIT +XLIB_LIBXAW_LICENSE_FILES = COPYING +XLIB_LIBXAW_INSTALL_STAGING = YES +XLIB_LIBXAW_DEPENDENCIES = xlib_libX11 xlib_libXt xlib_libXmu xlib_libXpm xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXcomposite/Config.in b/package/x11r7/xlib_libXcomposite/Config.in new file mode 100644 index 00000000..b417140a --- /dev/null +++ b/package/x11r7/xlib_libXcomposite/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXCOMPOSITE + bool "libXcomposite" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XORGPROTO + help + X.Org Xcomposite library diff --git a/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.hash b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.hash new file mode 100644 index 00000000..37e9c721 --- /dev/null +++ b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002971.html +md5 3fa0841ea89024719b20cd702a9b54e0 libXcomposite-0.4.5.tar.bz2 +sha1 902631efb55a798c81086e5ff90b60349839db40 libXcomposite-0.4.5.tar.bz2 +sha256 b3218a2c15bab8035d16810df5b8251ffc7132ff3aa70651a1fba0bfe9634e8f libXcomposite-0.4.5.tar.bz2 +sha512 502fd51fd9097bb3ca72174ac5b25b9d3b1ff240d32c4765199df03d89337d94b4ddea49e90b177b370862430089d966ce9c38988337156352cfeae911c2d3d5 libXcomposite-0.4.5.tar.bz2 +# Locally computed +sha256 efa0219ed8485ac555c1a3fb82daf34539b2e0dcf4dadc99c01f1e39c69a4a68 COPYING diff --git a/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk new file mode 100644 index 00000000..80e94fe3 --- /dev/null +++ b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libXcomposite +# +################################################################################ + +XLIB_LIBXCOMPOSITE_VERSION = 0.4.5 +XLIB_LIBXCOMPOSITE_SOURCE = libXcomposite-$(XLIB_LIBXCOMPOSITE_VERSION).tar.bz2 +XLIB_LIBXCOMPOSITE_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXCOMPOSITE_LICENSE = MIT +XLIB_LIBXCOMPOSITE_LICENSE_FILES = COPYING +XLIB_LIBXCOMPOSITE_INSTALL_STAGING = YES +XLIB_LIBXCOMPOSITE_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXfixes xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXcursor/Config.in b/package/x11r7/xlib_libXcursor/Config.in new file mode 100644 index 00000000..0c70f959 --- /dev/null +++ b/package/x11r7/xlib_libXcursor/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXCURSOR + bool "libXcursor" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XORGPROTO + help + X.Org Xcursor library diff --git a/package/x11r7/xlib_libXcursor/xlib_libXcursor.hash b/package/x11r7/xlib_libXcursor/xlib_libXcursor.hash new file mode 100644 index 00000000..3a12253d --- /dev/null +++ b/package/x11r7/xlib_libXcursor/xlib_libXcursor.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002972.html +md5 9b9be0e289130fb820aedf67705fc549 libXcursor-1.2.0.tar.bz2 +sha1 cca0b34955d3c2f657f05a2a2c40f75353ddd912 libXcursor-1.2.0.tar.bz2 +sha256 3ad3e9f8251094af6fe8cb4afcf63e28df504d46bfa5a5529db74a505d628782 libXcursor-1.2.0.tar.bz2 +sha512 2b12d0fd17e311ce269dbba58588698885815eb07aa44d48525ed5cd9e5f379bb90138a792a191e2f74888ab10b3ca9a4f507f21de0984ed79748973ab927a03 libXcursor-1.2.0.tar.bz2 +# Locally computed +sha256 1f1588aff23eec0cb6bb9cfe02f8a75abbe43faf3d9b1eff54b7fbc42774b3ad COPYING diff --git a/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk b/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk new file mode 100644 index 00000000..79d99040 --- /dev/null +++ b/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xlib_libXcursor +# +################################################################################ + +XLIB_LIBXCURSOR_VERSION = 1.2.0 +XLIB_LIBXCURSOR_SOURCE = libXcursor-$(XLIB_LIBXCURSOR_VERSION).tar.bz2 +XLIB_LIBXCURSOR_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXCURSOR_LICENSE = MIT +XLIB_LIBXCURSOR_LICENSE_FILES = COPYING +XLIB_LIBXCURSOR_INSTALL_STAGING = YES +XLIB_LIBXCURSOR_CPE_ID_VENDOR = x +XLIB_LIBXCURSOR_CPE_ID_PRODUCT = libxcursor +XLIB_LIBXCURSOR_DEPENDENCIES = xlib_libX11 xlib_libXfixes xlib_libXrender xorgproto +HOST_XLIB_LIBXCURSOR_DEPENDENCIES = \ + host-xlib_libX11 host-xlib_libXfixes host-xlib_libXrender \ + host-xorgproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXdamage/Config.in b/package/x11r7/xlib_libXdamage/Config.in new file mode 100644 index 00000000..d1a07dea --- /dev/null +++ b/package/x11r7/xlib_libXdamage/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXDAMAGE + bool "libXdamage" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XORGPROTO + help + X.Org Xdamage library diff --git a/package/x11r7/xlib_libXdamage/xlib_libXdamage.hash b/package/x11r7/xlib_libXdamage/xlib_libXdamage.hash new file mode 100644 index 00000000..120d3e02 --- /dev/null +++ b/package/x11r7/xlib_libXdamage/xlib_libXdamage.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002973.html +md5 e3f554267a7a04b042dc1f6352bd6d99 libXdamage-1.1.5.tar.bz2 +sha1 719ae6ab8c1b972c6386b654976c479255af5572 libXdamage-1.1.5.tar.bz2 +sha256 b734068643cac3b5f3d2c8279dd366b5bf28c7219d9e9d8717e1383995e0ea45 libXdamage-1.1.5.tar.bz2 +sha512 a3ca6cc33b1727f717a3e2aa5593f660508a81a47918a0aa949e9e8fba105e303fe5071983b48caac92feea0fe6e8e01620805e4d19b41f21f20d837b191c124 libXdamage-1.1.5.tar.bz2 +# Locally computed +sha256 33effe928634be12e668465c3935c5570ff2787b970b15d9243d69df42302c57 COPYING diff --git a/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk b/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk new file mode 100644 index 00000000..cc5493ff --- /dev/null +++ b/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libXdamage +# +################################################################################ + +XLIB_LIBXDAMAGE_VERSION = 1.1.5 +XLIB_LIBXDAMAGE_SOURCE = libXdamage-$(XLIB_LIBXDAMAGE_VERSION).tar.bz2 +XLIB_LIBXDAMAGE_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXDAMAGE_LICENSE = MIT +XLIB_LIBXDAMAGE_LICENSE_FILES = COPYING +XLIB_LIBXDAMAGE_INSTALL_STAGING = YES +XLIB_LIBXDAMAGE_DEPENDENCIES = xlib_libX11 xlib_libXfixes xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXdmcp/Config.in b/package/x11r7/xlib_libXdmcp/Config.in new file mode 100644 index 00000000..832822e9 --- /dev/null +++ b/package/x11r7/xlib_libXdmcp/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBXDMCP + bool "libXdmcp" + select BR2_PACKAGE_XUTIL_UTIL_MACROS + select BR2_PACKAGE_XORGPROTO + help + X.Org Xdmcp library diff --git a/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.hash b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.hash new file mode 100644 index 00000000..0dbea635 --- /dev/null +++ b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002974.html +md5 115c5c12ecce0e749cd91d999a5fd160 libXdmcp-1.1.3.tar.bz2 +sha1 0a8f8a274f829331efb1e8e2027c38631b204dd0 libXdmcp-1.1.3.tar.bz2 +sha256 20523b44aaa513e17c009e873ad7bbc301507a3224c232610ce2e099011c6529 libXdmcp-1.1.3.tar.bz2 +sha512 cb1d4650f97d66e73acd2465ec7d757b9b797cce2f85e301860a44997a461837eea845ec9bd5b639ec5ca34c804f8bdd870697a5ce3f4e270b687c9ef74f25ec libXdmcp-1.1.3.tar.bz2 +# Locally computed +sha256 8a3c3f35b0dbcb60a4e242b9e4394a352a65bb27deb2938ea1e2e62a626e16e9 COPYING diff --git a/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk new file mode 100644 index 00000000..51db9908 --- /dev/null +++ b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xlib_libXdmcp +# +################################################################################ + +XLIB_LIBXDMCP_VERSION = 1.1.3 +XLIB_LIBXDMCP_SOURCE = libXdmcp-$(XLIB_LIBXDMCP_VERSION).tar.bz2 +XLIB_LIBXDMCP_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXDMCP_LICENSE = MIT +XLIB_LIBXDMCP_LICENSE_FILES = COPYING +XLIB_LIBXDMCP_CPE_ID_VENDOR = x.org +XLIB_LIBXDMCP_CPE_ID_PRODUCT = libxdmcp +XLIB_LIBXDMCP_INSTALL_STAGING = YES +XLIB_LIBXDMCP_DEPENDENCIES = xutil_util-macros xorgproto host-pkgconf +HOST_XLIB_LIBXDMCP_DEPENDENCIES = host-xutil_util-macros host-xorgproto host-pkgconf + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXext/Config.in b/package/x11r7/xlib_libXext/Config.in new file mode 100644 index 00000000..58c9ce55 --- /dev/null +++ b/package/x11r7/xlib_libXext/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBXEXT + bool "libXext" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XORGPROTO + help + X.Org Xext library diff --git a/package/x11r7/xlib_libXext/xlib_libXext.hash b/package/x11r7/xlib_libXext/xlib_libXext.hash new file mode 100644 index 00000000..45810d5d --- /dev/null +++ b/package/x11r7/xlib_libXext/xlib_libXext.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002975.html +md5 f5b48bb76ba327cd2a8dc7a383532a95 libXext-1.3.4.tar.bz2 +sha1 14e2451162e8766173b5b14c73e94a22b1fcab55 libXext-1.3.4.tar.bz2 +sha256 59ad6fcce98deaecc14d39a672cf218ca37aba617c9a0f691cac3bcd28edf82b libXext-1.3.4.tar.bz2 +sha512 09146397d95f80c04701be1cc0a9c580ab5a085842ac31d17dfb6d4c2e42b4253b89cba695e54444e520be359883a76ffd02f42484c9e2ba2c33a5a40c29df4a libXext-1.3.4.tar.bz2 +# Locally computed +sha256 80767ac915f2f0f94de9efb15f0197a59b6f1e609cae85059f8703272dc3e146 COPYING diff --git a/package/x11r7/xlib_libXext/xlib_libXext.mk b/package/x11r7/xlib_libXext/xlib_libXext.mk new file mode 100644 index 00000000..6002e59e --- /dev/null +++ b/package/x11r7/xlib_libXext/xlib_libXext.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXext +# +################################################################################ + +XLIB_LIBXEXT_VERSION = 1.3.4 +XLIB_LIBXEXT_SOURCE = libXext-$(XLIB_LIBXEXT_VERSION).tar.bz2 +XLIB_LIBXEXT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXEXT_LICENSE = MIT +XLIB_LIBXEXT_LICENSE_FILES = COPYING +XLIB_LIBXEXT_CPE_ID_VENDOR = x +XLIB_LIBXEXT_CPE_ID_PRODUCT = libxext +XLIB_LIBXEXT_INSTALL_STAGING = YES +XLIB_LIBXEXT_DEPENDENCIES = xlib_libX11 xorgproto +XLIB_LIBXEXT_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXfixes/Config.in b/package/x11r7/xlib_libXfixes/Config.in new file mode 100644 index 00000000..2c3b6684 --- /dev/null +++ b/package/x11r7/xlib_libXfixes/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBXFIXES + bool "libXfixes" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XORGPROTO + help + X.Org Xfixes library diff --git a/package/x11r7/xlib_libXfixes/xlib_libXfixes.hash b/package/x11r7/xlib_libXfixes/xlib_libXfixes.hash new file mode 100644 index 00000000..d655be4f --- /dev/null +++ b/package/x11r7/xlib_libXfixes/xlib_libXfixes.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2016-October/002722.html +sha256 de1cd33aff226e08cefd0e6759341c2c8e8c9faf8ce9ac6ec38d43e287b22ad6 libXfixes-5.0.3.tar.bz2 + +# Locally calculated +sha256 d64e671ffeb483d4543f98c842788ab34c77427e27d83d6b082065a4438d4885 COPYING diff --git a/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk b/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk new file mode 100644 index 00000000..6674cccb --- /dev/null +++ b/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xlib_libXfixes +# +################################################################################ + +XLIB_LIBXFIXES_VERSION = 5.0.3 +XLIB_LIBXFIXES_SOURCE = libXfixes-$(XLIB_LIBXFIXES_VERSION).tar.bz2 +XLIB_LIBXFIXES_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXFIXES_LICENSE = MIT +XLIB_LIBXFIXES_LICENSE_FILES = COPYING +XLIB_LIBXFIXES_CPE_ID_VENDOR = x +XLIB_LIBXFIXES_CPE_ID_PRODUCT = libxfixes +XLIB_LIBXFIXES_INSTALL_STAGING = YES +XLIB_LIBXFIXES_DEPENDENCIES = xlib_libX11 xorgproto +HOST_XLIB_LIBXFIXES_DEPENDENCIES = \ + host-xlib_libX11 host-xorgproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXfont/Config.in b/package/x11r7/xlib_libXfont/Config.in new file mode 100644 index 00000000..4658027d --- /dev/null +++ b/package/x11r7/xlib_libXfont/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XLIB_LIBXFONT + bool "libXfont" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBFONTENC + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XFONT_ENCODINGS + select BR2_PACKAGE_XORGPROTO + help + X.Org Xfont library diff --git a/package/x11r7/xlib_libXfont/xlib_libXfont.hash b/package/x11r7/xlib_libXfont/xlib_libXfont.hash new file mode 100644 index 00000000..455d99ff --- /dev/null +++ b/package/x11r7/xlib_libXfont/xlib_libXfont.hash @@ -0,0 +1,8 @@ +# From https://lists.x.org/archives/xorg-announce/2017-November/002825.html +md5 16eaf156edd79b68038b6a7c44aa9e9b libXfont-1.5.4.tar.bz2 +sha1 9db050f63b9c4cb19e0dbb40575558ccb95719ca libXfont-1.5.4.tar.bz2 +sha256 1a7f7490774c87f2052d146d1e0e64518d32e6848184a18654e8d0bb57883242 libXfont-1.5.4.tar.bz2 +sha512 864edbaff45c44bd92bc4b06275c73fdf584a9b88bc523a297d4c75c01ca253f438463e929af70d753ddecfa648bb0b9bcf0ec72267db9f2b1704f7afa906cb3 libXfont-1.5.4.tar.bz2 + +# Locally calculated +sha256 97e413bb4962bbb5773085cd5405502bf1d4eadeaf98ff5be015eacacc840462 COPYING diff --git a/package/x11r7/xlib_libXfont/xlib_libXfont.mk b/package/x11r7/xlib_libXfont/xlib_libXfont.mk new file mode 100644 index 00000000..eeddfeeb --- /dev/null +++ b/package/x11r7/xlib_libXfont/xlib_libXfont.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# xlib_libXfont +# +################################################################################ + +XLIB_LIBXFONT_VERSION = 1.5.4 +XLIB_LIBXFONT_SOURCE = libXfont-$(XLIB_LIBXFONT_VERSION).tar.bz2 +XLIB_LIBXFONT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXFONT_LICENSE = MIT +XLIB_LIBXFONT_LICENSE_FILES = COPYING +XLIB_LIBXFONT_INSTALL_STAGING = YES + +XLIB_LIBXFONT_DEPENDENCIES = freetype xlib_libfontenc xlib_xtrans xorgproto + +HOST_XLIB_LIBXFONT_DEPENDENCIES = \ + host-freetype host-xlib_libfontenc host-xlib_xtrans \ + host-xorgproto + +XLIB_LIBXFONT_CONF_OPTS = --disable-devel-docs +HOST_XLIB_LIBXFONT_CONF_OPTS = --disable-devel-docs + +ifeq ($(BR2_microblaze),y) +# The microblaze toolchains don't define the __ELF__ preprocessor +# symbol even though they do use the elf format. LibXfont checks for +# this symbol to know if weak symbols are supported, and otherwise +# falls back to emulation code using dlopen - Causing linker issues +# for stuff using libXfont. +# Work around it by defining the symbol here as well. +XLIB_LIBXFONT_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D__ELF__" +endif + +XLIB_LIBXFONT_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) +XLIB_LIBXFONT_CFLAGS += -O0 +endif + +XLIB_LIBXFONT_CONF_ENV += CFLAGS="$(XLIB_LIBXFONT_CFLAGS)" + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXfont2/0001-configure-define-HAVE_LIBBSD-when-libbsd-was-found.patch b/package/x11r7/xlib_libXfont2/0001-configure-define-HAVE_LIBBSD-when-libbsd-was-found.patch new file mode 100644 index 00000000..51e7225b --- /dev/null +++ b/package/x11r7/xlib_libXfont2/0001-configure-define-HAVE_LIBBSD-when-libbsd-was-found.patch @@ -0,0 +1,30 @@ +From 5fceeeb0d1cdccdb2870f65444f2965344f3b8b9 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 19 Oct 2019 09:32:41 +0200 +Subject: [PATCH] configure: define HAVE_LIBBSD when libbsd was found + +Patch sent upstream: +https://gitlab.freedesktop.org/xorg/lib/libxfont/merge_requests/6 + +Signed-off-by: Bernd Kuhls +--- + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/configure.ac b/configure.ac +index f507c28..cc7ca91 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -53,6 +53,9 @@ AC_CHECK_HEADERS([endian.h poll.h sys/poll.h]) + # Checks for library functions. + AC_CHECK_FUNCS([poll readlink]) + AC_SEARCH_LIBS([strlcat], [bsd]) ++if test "$ac_cv_search_strlcat" = "-lbsd"; then ++ AC_DEFINE(HAVE_LIBBSD,1,[Has libbsd]) ++fi + AC_CONFIG_LIBOBJ_DIR([src/util]) + AC_REPLACE_FUNCS([reallocarray strlcat strlcpy]) + +-- +2.20.1 + diff --git a/package/x11r7/xlib_libXfont2/Config.in b/package/x11r7/xlib_libXfont2/Config.in new file mode 100644 index 00000000..fc2ebfe2 --- /dev/null +++ b/package/x11r7/xlib_libXfont2/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XLIB_LIBXFONT2 + bool "libXfont2" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBFONTENC + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XFONT_ENCODINGS + select BR2_PACKAGE_XORGPROTO + help + X.Org Xfont library diff --git a/package/x11r7/xlib_libXfont2/xlib_libXfont2.hash b/package/x11r7/xlib_libXfont2/xlib_libXfont2.hash new file mode 100644 index 00000000..634affdf --- /dev/null +++ b/package/x11r7/xlib_libXfont2/xlib_libXfont2.hash @@ -0,0 +1,8 @@ +# From https://lists.x.org/archives/xorg-announce/2019-September/003022.html +md5 00516bed7ec1453d56974560379fff2f libXfont2-2.0.4.tar.bz2 +sha1 9e00ae7589315656435efaf330128facad7c4a57 libXfont2-2.0.4.tar.bz2 +sha256 6d151b3368e5035efede4b6264c0fdc6662c1c99dbc2de425e3480cababc69e6 libXfont2-2.0.4.tar.bz2 +sha512 7cf6c58e520e48e24fc4f05fec760fcbeaaac0cedeed57dded262c855e1515cc34cd033222945a0b016f6857b83009fc2a6946c7d632c2f7bb0060f8e8a8a106 libXfont2-2.0.4.tar.bz2 + +# Locally calculated +sha256 97e413bb4962bbb5773085cd5405502bf1d4eadeaf98ff5be015eacacc840462 COPYING diff --git a/package/x11r7/xlib_libXfont2/xlib_libXfont2.mk b/package/x11r7/xlib_libXfont2/xlib_libXfont2.mk new file mode 100644 index 00000000..d2ff4ca7 --- /dev/null +++ b/package/x11r7/xlib_libXfont2/xlib_libXfont2.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# xlib_libXfont2 +# +################################################################################ + +XLIB_LIBXFONT2_VERSION = 2.0.4 +XLIB_LIBXFONT2_SOURCE = libXfont2-$(XLIB_LIBXFONT2_VERSION).tar.bz2 +XLIB_LIBXFONT2_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXFONT2_LICENSE = MIT +XLIB_LIBXFONT2_LICENSE_FILES = COPYING +XLIB_LIBXFONT2_CPE_ID_VENDOR = x +XLIB_LIBXFONT2_CPE_ID_PRODUCT = libxfont +XLIB_LIBXFONT2_INSTALL_STAGING = YES +# 0001-configure-define-HAVE_LIBBSD-when-libbsd-was-found.patch +XLIB_LIBXFONT2_AUTORECONF = YES +XLIB_LIBXFONT2_DEPENDENCIES = \ + freetype \ + xlib_libfontenc \ + xlib_xtrans \ + xorgproto \ + xfont_encodings + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +XLIB_LIBXFONT2_DEPENDENCIES += libbsd +endif + +HOST_XLIB_LIBXFONT2_DEPENDENCIES = \ + host-freetype \ + host-xlib_libfontenc \ + host-xlib_xtrans \ + host-xorgproto \ + host-xfont_encodings + +XLIB_LIBXFONT2_CONF_OPTS = --disable-devel-docs +HOST_XLIB_LIBXFONT2_CONF_OPTS = --disable-devel-docs + +XLIB_LIBXFONT2_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) +XLIB_LIBXFONT2_CFLAGS += -O0 +endif + +XLIB_LIBXFONT2_CONF_ENV = CFLAGS="$(XLIB_LIBXFONT2_CFLAGS)" + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXft/Config.in b/package/x11r7/xlib_libXft/Config.in new file mode 100644 index 00000000..84967a55 --- /dev/null +++ b/package/x11r7/xlib_libXft/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XLIB_LIBXFT + bool "libXft" + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XORGPROTO + help + X.Org Xft library diff --git a/package/x11r7/xlib_libXft/xlib_libXft.hash b/package/x11r7/xlib_libXft/xlib_libXft.hash new file mode 100644 index 00000000..bd0838b4 --- /dev/null +++ b/package/x11r7/xlib_libXft/xlib_libXft.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002976.html +md5 4a433c24627b4ff60a4dd403a0990796 libXft-2.3.3.tar.bz2 +sha1 48f543fe495f545df1794fa36a0a708558ae298c libXft-2.3.3.tar.bz2 +sha256 225c68e616dd29dbb27809e45e9eadf18e4d74c50be43020ef20015274529216 libXft-2.3.3.tar.bz2 +sha512 28fdaf3baa3b156a4a7fdd6e39c4d8026d7d21eaa9be27c9797c8d329dab691a1bc82ea6042f9d4729a9343d93787536fb7e4b606f722f33cbe608b2e79910e8 libXft-2.3.3.tar.bz2 +# Locally computed +sha256 7cda22286b1379b9b73df695f72cbad36595e65b039a5fbc5c89b69ecc44438c COPYING diff --git a/package/x11r7/xlib_libXft/xlib_libXft.mk b/package/x11r7/xlib_libXft/xlib_libXft.mk new file mode 100644 index 00000000..489cfe4c --- /dev/null +++ b/package/x11r7/xlib_libXft/xlib_libXft.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libXft +# +################################################################################ + +XLIB_LIBXFT_VERSION = 2.3.3 +XLIB_LIBXFT_SOURCE = libXft-$(XLIB_LIBXFT_VERSION).tar.bz2 +XLIB_LIBXFT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXFT_LICENSE = MIT +XLIB_LIBXFT_LICENSE_FILES = COPYING +XLIB_LIBXFT_INSTALL_STAGING = YES +XLIB_LIBXFT_DEPENDENCIES = fontconfig freetype xlib_libX11 xlib_libXext xlib_libXrender xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXi/Config.in b/package/x11r7/xlib_libXi/Config.in new file mode 100644 index 00000000..31313069 --- /dev/null +++ b/package/x11r7/xlib_libXi/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXI + bool "libXi" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XORGPROTO + help + X.Org Xi library diff --git a/package/x11r7/xlib_libXi/xlib_libXi.hash b/package/x11r7/xlib_libXi/xlib_libXi.hash new file mode 100644 index 00000000..12356313 --- /dev/null +++ b/package/x11r7/xlib_libXi/xlib_libXi.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-June/002999.html +md5 62c4af0839072024b4b1c8cbe84216c7 libXi-1.7.10.tar.bz2 +sha1 79052e50ea07ce2431f8988a60553d9091d46207 libXi-1.7.10.tar.bz2 +sha256 36a30d8f6383a72e7ce060298b4b181fd298bc3a135c8e201b7ca847f5f81061 libXi-1.7.10.tar.bz2 +sha512 591f0860bf5904897587c4990d6c852f3729a212d1ef390362d41242440e078221877c31db2232d5cc81727fe97f4e194b077f7de917e251e60641bbd06ee218 libXi-1.7.10.tar.bz2 +# Locally computed +sha256 9392174bc86e291369fd2f61f3ed325962735a5f5c585ce8d7ebd365e2a5639f COPYING diff --git a/package/x11r7/xlib_libXi/xlib_libXi.mk b/package/x11r7/xlib_libXi/xlib_libXi.mk new file mode 100644 index 00000000..ad4cf5f9 --- /dev/null +++ b/package/x11r7/xlib_libXi/xlib_libXi.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# xlib_libXi +# +################################################################################ + +XLIB_LIBXI_VERSION = 1.7.10 +XLIB_LIBXI_SOURCE = libXi-$(XLIB_LIBXI_VERSION).tar.bz2 +XLIB_LIBXI_SITE = https://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXI_LICENSE = MIT +XLIB_LIBXI_LICENSE_FILES = COPYING +XLIB_LIBXI_CPE_ID_VENDOR = x.org +XLIB_LIBXI_CPE_ID_PRODUCT = libxi +XLIB_LIBXI_INSTALL_STAGING = YES +XLIB_LIBXI_DEPENDENCIES = \ + host-pkgconf \ + xlib_libX11 \ + xlib_libXext \ + xlib_libXfixes \ + xorgproto + +XLIB_LIBXI_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXinerama/Config.in b/package/x11r7/xlib_libXinerama/Config.in new file mode 100644 index 00000000..f8ea9595 --- /dev/null +++ b/package/x11r7/xlib_libXinerama/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXINERAMA + bool "libXinerama" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XORGPROTO + help + X.Org Xinerama library diff --git a/package/x11r7/xlib_libXinerama/xlib_libXinerama.hash b/package/x11r7/xlib_libXinerama/xlib_libXinerama.hash new file mode 100644 index 00000000..995181dd --- /dev/null +++ b/package/x11r7/xlib_libXinerama/xlib_libXinerama.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-July/002905.html +md5 0d5f826a197dae74da67af4a9ef35885 libXinerama-1.1.4.tar.bz2 +sha1 34a1d9908ffbd46805d2357c6b05f5e341a8dc7c libXinerama-1.1.4.tar.bz2 +sha256 0008dbd7ecf717e1e507eed1856ab0d9cf946d03201b85d5dcf61489bb02d720 libXinerama-1.1.4.tar.bz2 +sha512 cff777ad942614fbf6bc6d8529f399e62debf3ecbf6cc0694a94e38c022bf929ffd5636fb59f55533c394d89b23af3ea51fa5128927f12a85787e16239330f14 libXinerama-1.1.4.tar.bz2 +# Locally computed +sha256 f661fd883b6e980b3b118e0fbe230fbf10eef8d4d4a35931355f29ed647ddbe3 COPYING diff --git a/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk b/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk new file mode 100644 index 00000000..48e32d55 --- /dev/null +++ b/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXinerama +# +################################################################################ + +XLIB_LIBXINERAMA_VERSION = 1.1.4 +XLIB_LIBXINERAMA_SOURCE = libXinerama-$(XLIB_LIBXINERAMA_VERSION).tar.bz2 +XLIB_LIBXINERAMA_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXINERAMA_LICENSE = MIT +XLIB_LIBXINERAMA_LICENSE_FILES = COPYING +XLIB_LIBXINERAMA_CPE_ID_VENDOR = x +XLIB_LIBXINERAMA_CPE_ID_PRODUCT = libxinerama +XLIB_LIBXINERAMA_INSTALL_STAGING = YES +XLIB_LIBXINERAMA_DEPENDENCIES = xlib_libX11 xlib_libXext xorgproto +XLIB_LIBXINERAMA_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXmu/Config.in b/package/x11r7/xlib_libXmu/Config.in new file mode 100644 index 00000000..b5889208 --- /dev/null +++ b/package/x11r7/xlib_libXmu/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXMU + bool "libXmu" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XORGPROTO + help + X.Org Xmu library diff --git a/package/x11r7/xlib_libXmu/xlib_libXmu.hash b/package/x11r7/xlib_libXmu/xlib_libXmu.hash new file mode 100644 index 00000000..8cad2389 --- /dev/null +++ b/package/x11r7/xlib_libXmu/xlib_libXmu.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002978.html +md5 ac774cff8b493f566088a255dbf91201 libXmu-1.1.3.tar.bz2 +sha1 7ff54ce38379fb795aebed38f6be404ee0dfeec6 libXmu-1.1.3.tar.bz2 +sha256 9c343225e7c3dc0904f2122b562278da5fed639b1b5e880d25111561bac5b731 libXmu-1.1.3.tar.bz2 +sha512 8c6cc65b22aa031ad870dd92736681a068a0878a425a53dbed909943da1136c4a24034d467cfd3785c3a8d78f66850b69f1ebe1eb24aaf9bc176b1d171a5c762 libXmu-1.1.3.tar.bz2 +# Locally computed +sha256 e65a4a8bbf8b0dfd2439d6bc6d86df03e2b8e693b757593b25149e099aeb8ec4 COPYING diff --git a/package/x11r7/xlib_libXmu/xlib_libXmu.mk b/package/x11r7/xlib_libXmu/xlib_libXmu.mk new file mode 100644 index 00000000..3218e0ec --- /dev/null +++ b/package/x11r7/xlib_libXmu/xlib_libXmu.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libXmu +# +################################################################################ + +XLIB_LIBXMU_VERSION = 1.1.3 +XLIB_LIBXMU_SOURCE = libXmu-$(XLIB_LIBXMU_VERSION).tar.bz2 +XLIB_LIBXMU_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXMU_LICENSE = MIT +XLIB_LIBXMU_LICENSE_FILES = COPYING +XLIB_LIBXMU_INSTALL_STAGING = YES +XLIB_LIBXMU_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXt xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXpm/Config.in b/package/x11r7/xlib_libXpm/Config.in new file mode 100644 index 00000000..9a15d77d --- /dev/null +++ b/package/x11r7/xlib_libXpm/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXPM + bool "libXpm" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XORGPROTO + help + X.Org Xpm library diff --git a/package/x11r7/xlib_libXpm/xlib_libXpm.hash b/package/x11r7/xlib_libXpm/xlib_libXpm.hash new file mode 100644 index 00000000..c3aa695c --- /dev/null +++ b/package/x11r7/xlib_libXpm/xlib_libXpm.hash @@ -0,0 +1,8 @@ +# From https://lists.x.org/archives/xorg-announce/2019-December/003034.html +md5 6f0ecf8d103d528cfc803aa475137afa libXpm-3.5.13.tar.bz2 +sha1 38b1a2728adb49f4e255aba1530f51789815ffc4 libXpm-3.5.13.tar.bz2 +sha256 9cd1da57588b6cb71450eff2273ef6b657537a9ac4d02d0014228845b935ac25 libXpm-3.5.13.tar.bz2 +sha512 3b8f6e926272f39b1d95135c2274c00f5aaee1f9fb2ef79f71628df5edeb7ba20158819ef6a778101cc4092493a3b5b613c53634fdccadcc0fc85f0605e5e9a5 libXpm-3.5.13.tar.bz2 +# Locally calculated +sha256 ed3b06bb3b75a0954bd6837a96b41a4676f60dfeee647271613aadecc0fd596e COPYING +sha256 cbe4ced0abc8a32bea471204ae01038c202758ce4e772d3d329a341ffa761e71 COPYRIGHT diff --git a/package/x11r7/xlib_libXpm/xlib_libXpm.mk b/package/x11r7/xlib_libXpm/xlib_libXpm.mk new file mode 100644 index 00000000..7b645dc9 --- /dev/null +++ b/package/x11r7/xlib_libXpm/xlib_libXpm.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# xlib_libXpm +# +################################################################################ + +XLIB_LIBXPM_VERSION = 3.5.13 +XLIB_LIBXPM_SOURCE = libXpm-$(XLIB_LIBXPM_VERSION).tar.bz2 +XLIB_LIBXPM_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXPM_LICENSE = MIT +XLIB_LIBXPM_LICENSE_FILES = COPYING COPYRIGHT +XLIB_LIBXPM_CPE_ID_VENDOR = libxpm_project +XLIB_LIBXPM_CPE_ID_PRODUCT = libxpm +XLIB_LIBXPM_INSTALL_STAGING = YES +XLIB_LIBXPM_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXt xorgproto \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) \ + $(TARGET_NLS_DEPENDENCIES) +XLIB_LIBXPM_CONF_ENV = LIBS=$(TARGET_NLS_LIBS) + +ifeq ($(BR2_SYSTEM_ENABLE_NLS),) +XLIB_LIBXPM_CONF_ENV += ac_cv_search_gettext=no +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXrandr/Config.in b/package/x11r7/xlib_libXrandr/Config.in new file mode 100644 index 00000000..e019ca5e --- /dev/null +++ b/package/x11r7/xlib_libXrandr/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXRANDR + bool "libXrandr" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XORGPROTO + help + X.Org Xrandr library diff --git a/package/x11r7/xlib_libXrandr/xlib_libXrandr.hash b/package/x11r7/xlib_libXrandr/xlib_libXrandr.hash new file mode 100644 index 00000000..ed536695 --- /dev/null +++ b/package/x11r7/xlib_libXrandr/xlib_libXrandr.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002979.html +md5 18f3b20d522f45e4dadd34afb5bea048 libXrandr-1.5.2.tar.bz2 +sha1 7a1f6df239341b76fd59ebbe101d6f180adb43bb libXrandr-1.5.2.tar.bz2 +sha256 8aea0ebe403d62330bb741ed595b53741acf45033d3bda1792f1d4cc3daee023 libXrandr-1.5.2.tar.bz2 +sha512 fcd005f9839e7ef980607128a5d76d7b671cc2f5755949e03c569c500d7e987cb3f6932750ab8bf6e2c1086ec69dde09d5831f0c2098b9f9ad46be4f56db0d87 libXrandr-1.5.2.tar.bz2 +# Locally computed +sha256 73777e5be1cef2827d843e4b186803f050c66db472cf8076d88e2b5f71696e67 COPYING diff --git a/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk b/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk new file mode 100644 index 00000000..aa276133 --- /dev/null +++ b/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXrandr +# +################################################################################ + +XLIB_LIBXRANDR_VERSION = 1.5.2 +XLIB_LIBXRANDR_SOURCE = libXrandr-$(XLIB_LIBXRANDR_VERSION).tar.bz2 +XLIB_LIBXRANDR_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXRANDR_LICENSE = MIT +XLIB_LIBXRANDR_LICENSE_FILES = COPYING +XLIB_LIBXRANDR_CPE_ID_VENDOR = x.org +XLIB_LIBXRANDR_CPE_ID_PRODUCT = libxrandr +XLIB_LIBXRANDR_INSTALL_STAGING = YES +XLIB_LIBXRANDR_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXrender xorgproto +XLIB_LIBXRANDR_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXrender/Config.in b/package/x11r7/xlib_libXrender/Config.in new file mode 100644 index 00000000..4487ef1f --- /dev/null +++ b/package/x11r7/xlib_libXrender/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBXRENDER + bool "libXrender" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XORGPROTO + help + X.Org Xrender library diff --git a/package/x11r7/xlib_libXrender/xlib_libXrender.hash b/package/x11r7/xlib_libXrender/xlib_libXrender.hash new file mode 100644 index 00000000..96981ad5 --- /dev/null +++ b/package/x11r7/xlib_libXrender/xlib_libXrender.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2016-October/002725.html +sha256 c06d5979f86e64cabbde57c223938db0b939dff49fdb5a793a1d3d0396650949 libXrender-0.9.10.tar.bz2 + +# Locally calculated +sha256 bbe1db89c48816c48248796adac91defd8fbde1141b145f01511781ab87f29a1 COPYING diff --git a/package/x11r7/xlib_libXrender/xlib_libXrender.mk b/package/x11r7/xlib_libXrender/xlib_libXrender.mk new file mode 100644 index 00000000..0ef0ec48 --- /dev/null +++ b/package/x11r7/xlib_libXrender/xlib_libXrender.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xlib_libXrender +# +################################################################################ + +XLIB_LIBXRENDER_VERSION = 0.9.10 +XLIB_LIBXRENDER_SOURCE = libXrender-$(XLIB_LIBXRENDER_VERSION).tar.bz2 +XLIB_LIBXRENDER_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXRENDER_LICENSE = MIT +XLIB_LIBXRENDER_LICENSE_FILES = COPYING +XLIB_LIBXRENDER_CPE_ID_VENDOR = x.org +XLIB_LIBXRENDER_CPE_ID_PRODUCT = libxrender +XLIB_LIBXRENDER_INSTALL_STAGING = YES +XLIB_LIBXRENDER_DEPENDENCIES = xlib_libX11 xorgproto +HOST_XLIB_LIBXRENDER_DEPENDENCIES = \ + host-xlib_libX11 host-xorgproto + +XLIB_LIBXRENDER_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXres/Config.in b/package/x11r7/xlib_libXres/Config.in new file mode 100644 index 00000000..4e135ed3 --- /dev/null +++ b/package/x11r7/xlib_libXres/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXRES + bool "libXres" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XORGPROTO + help + X.Org XRes library diff --git a/package/x11r7/xlib_libXres/xlib_libXres.hash b/package/x11r7/xlib_libXres/xlib_libXres.hash new file mode 100644 index 00000000..ee4823c1 --- /dev/null +++ b/package/x11r7/xlib_libXres/xlib_libXres.hash @@ -0,0 +1,8 @@ +# From https://lists.x.org/archives/xorg-announce/2017-October/002812.html +md5 5d6d443d1abc8e1f6fc1c57fb27729bb libXres-1.2.0.tar.bz2 +sha1 b6996ab05460a3b7311f02da23ddf117a5442fd9 libXres-1.2.0.tar.bz2 +sha256 ff75c1643488e64a7cfbced27486f0f944801319c84c18d3bd3da6bf28c812d4 libXres-1.2.0.tar.bz2 +sha512 8eb5a36b1f030eb4e27e676cc4befcc073da66a7bce2b39089314e1facb629d13b087bb53ca2c95fe5291857da7ff9f80c6ab28fb3e245eeb9e0344937900172 libXres-1.2.0.tar.bz2 + +# Locally calculated +sha256 0d7300168f85833ea2564835f66a61e036ede90b33e76c06a7b4078096fedbcc COPYING diff --git a/package/x11r7/xlib_libXres/xlib_libXres.mk b/package/x11r7/xlib_libXres/xlib_libXres.mk new file mode 100644 index 00000000..73c72f86 --- /dev/null +++ b/package/x11r7/xlib_libXres/xlib_libXres.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXres +# +################################################################################ + +XLIB_LIBXRES_VERSION = 1.2.0 +XLIB_LIBXRES_SOURCE = libXres-$(XLIB_LIBXRES_VERSION).tar.bz2 +XLIB_LIBXRES_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXRES_LICENSE = MIT +XLIB_LIBXRES_LICENSE_FILES = COPYING +XLIB_LIBXRES_CPE_ID_VENDOR = x +XLIB_LIBXRES_CPE_ID_PRODUCT = libxres +XLIB_LIBXRES_INSTALL_STAGING = YES +XLIB_LIBXRES_DEPENDENCIES = xlib_libX11 xlib_libXext xorgproto +XLIB_LIBXRES_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXt/Config.in b/package/x11r7/xlib_libXt/Config.in new file mode 100644 index 00000000..0f557808 --- /dev/null +++ b/package/x11r7/xlib_libXt/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XLIB_LIBXT + bool "libXt" + select BR2_PACKAGE_XLIB_LIBSM + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XORGPROTO + select BR2_PACKAGE_XCB_PROTO + select BR2_PACKAGE_LIBXCB + help + X.Org Xt library diff --git a/package/x11r7/xlib_libXt/xlib_libXt.hash b/package/x11r7/xlib_libXt/xlib_libXt.hash new file mode 100644 index 00000000..dcd4853d --- /dev/null +++ b/package/x11r7/xlib_libXt/xlib_libXt.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2021-January/003070.html +sha256 679cc08f1646dbd27f5e48ffe8dd49406102937109130caab02ca32c083a3d60 libXt-1.2.1.tar.bz2 +sha512 6877af61ba91eeed6b6f80471b84f354ad0ec0827249c7ee0a00c13508063fe8d2696dd400a4bdbc6ca2ff67cbe1317ad5ac24522fd96099dc56535e33ca052c libXt-1.2.1.tar.bz2 +# Locally calculated +sha256 a2866ccc0b1745149e4a2258d934314d40cbb43bd8318c6fa597f233995b0a81 COPYING diff --git a/package/x11r7/xlib_libXt/xlib_libXt.mk b/package/x11r7/xlib_libXt/xlib_libXt.mk new file mode 100644 index 00000000..9530262c --- /dev/null +++ b/package/x11r7/xlib_libXt/xlib_libXt.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXt +# +################################################################################ + +XLIB_LIBXT_VERSION = 1.2.1 +XLIB_LIBXT_SOURCE = libXt-$(XLIB_LIBXT_VERSION).tar.bz2 +XLIB_LIBXT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXT_LICENSE = MIT +XLIB_LIBXT_LICENSE_FILES = COPYING +XLIB_LIBXT_INSTALL_STAGING = YES +XLIB_LIBXT_CPE_ID_VENDOR = x +XLIB_LIBXT_CPE_ID_PRODUCT = libxt +XLIB_LIBXT_DEPENDENCIES = xlib_libSM xlib_libX11 xorgproto xcb-proto libxcb host-xorgproto +XLIB_LIBXT_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXtst/Config.in b/package/x11r7/xlib_libXtst/Config.in new file mode 100644 index 00000000..2c7db224 --- /dev/null +++ b/package/x11r7/xlib_libXtst/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXTST + bool "libXtst" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XORGPROTO + help + X.Org Xtst library diff --git a/package/x11r7/xlib_libXtst/xlib_libXtst.hash b/package/x11r7/xlib_libXtst/xlib_libXtst.hash new file mode 100644 index 00000000..f64a0185 --- /dev/null +++ b/package/x11r7/xlib_libXtst/xlib_libXtst.hash @@ -0,0 +1,4 @@ +# From https://lists.x.org/archives/xorg-announce/2016-October/002726.html +sha256 4655498a1b8e844e3d6f21f3b2c4e2b571effb5fd83199d428a6ba7ea4bf5204 libXtst-1.2.3.tar.bz2 +# Locally computed +sha256 940190489c7a0e5ae3d83fc4fcbd79e0cd1b765bf1a4efd408293c1ee0332ceb COPYING diff --git a/package/x11r7/xlib_libXtst/xlib_libXtst.mk b/package/x11r7/xlib_libXtst/xlib_libXtst.mk new file mode 100644 index 00000000..c79301e0 --- /dev/null +++ b/package/x11r7/xlib_libXtst/xlib_libXtst.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xlib_libXtst +# +################################################################################ + +XLIB_LIBXTST_VERSION = 1.2.3 +XLIB_LIBXTST_SOURCE = libXtst-$(XLIB_LIBXTST_VERSION).tar.bz2 +XLIB_LIBXTST_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXTST_LICENSE = MIT +XLIB_LIBXTST_LICENSE_FILES = COPYING +XLIB_LIBXTST_INSTALL_STAGING = YES +XLIB_LIBXTST_CPE_ID_VENDOR = x +XLIB_LIBXTST_CPE_ID_PRODUCT = libxtst + +XLIB_LIBXTST_DEPENDENCIES = \ + xlib_libX11 \ + xlib_libXext \ + xlib_libXi \ + xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXv/Config.in b/package/x11r7/xlib_libXv/Config.in new file mode 100644 index 00000000..d3e57445 --- /dev/null +++ b/package/x11r7/xlib_libXv/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXV + bool "libXv" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XORGPROTO + help + X.Org Xv library diff --git a/package/x11r7/xlib_libXv/xlib_libXv.hash b/package/x11r7/xlib_libXv/xlib_libXv.hash new file mode 100644 index 00000000..ccc67270 --- /dev/null +++ b/package/x11r7/xlib_libXv/xlib_libXv.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2016-October/002727.html +sha256 d26c13eac99ac4504c532e8e76a1c8e4bd526471eb8a0a4ff2a88db60cb0b088 libXv-1.0.11.tar.bz2 + +# Locally calculated +sha256 4fac4d581d00f11c459d68b7cb970f3d4e5a5bbfb53784d85f59a90076280301 COPYING diff --git a/package/x11r7/xlib_libXv/xlib_libXv.mk b/package/x11r7/xlib_libXv/xlib_libXv.mk new file mode 100644 index 00000000..1105b592 --- /dev/null +++ b/package/x11r7/xlib_libXv/xlib_libXv.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXv +# +################################################################################ + +XLIB_LIBXV_VERSION = 1.0.11 +XLIB_LIBXV_SOURCE = libXv-$(XLIB_LIBXV_VERSION).tar.bz2 +XLIB_LIBXV_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXV_LICENSE = ISC-like +XLIB_LIBXV_LICENSE_FILES = COPYING +XLIB_LIBXV_CPE_ID_VENDOR = x.org +XLIB_LIBXV_CPE_ID_PRODUCT = libxv +XLIB_LIBXV_INSTALL_STAGING = YES +XLIB_LIBXV_DEPENDENCIES = xlib_libX11 xlib_libXext xorgproto +XLIB_LIBXV_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXvMC/Config.in b/package/x11r7/xlib_libXvMC/Config.in new file mode 100644 index 00000000..5cc6ec76 --- /dev/null +++ b/package/x11r7/xlib_libXvMC/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXVMC + bool "libXvMC" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXV + select BR2_PACKAGE_XORGPROTO + help + X.Org XvMC library diff --git a/package/x11r7/xlib_libXvMC/xlib_libXvMC.hash b/package/x11r7/xlib_libXvMC/xlib_libXvMC.hash new file mode 100644 index 00000000..be4ba751 --- /dev/null +++ b/package/x11r7/xlib_libXvMC/xlib_libXvMC.hash @@ -0,0 +1,8 @@ +# From https://lists.x.org/archives/xorg-announce/2019-September/003023.html +md5 3569ff7f3e26864d986d6a21147eaa58 libXvMC-1.0.12.tar.bz2 +sha1 4871f92a83faa86aff5c630a2d6016c67bf11b97 libXvMC-1.0.12.tar.bz2 +sha256 6b3da7977b3f7eaf4f0ac6470ab1e562298d82c4e79077765787963ab7966dcd libXvMC-1.0.12.tar.bz2 +sha512 62cb9a72b20af3b081d2d555a253b0e2b8b26b31f4fad10bd3e53bbf96e1663b61bd8df2b78b16f18218cd37cce0c9e6809ae16ded226b37a8b199e41b223955 libXvMC-1.0.12.tar.bz2 + +# Locally computed +sha256 b7c709df281675a07eb60a71c5fa2599d1ef538eb79ae7ad6e774b10e4a804c4 COPYING diff --git a/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk b/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk new file mode 100644 index 00000000..7980f174 --- /dev/null +++ b/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXvMC +# +################################################################################ + +XLIB_LIBXVMC_VERSION = 1.0.12 +XLIB_LIBXVMC_SOURCE = libXvMC-$(XLIB_LIBXVMC_VERSION).tar.bz2 +XLIB_LIBXVMC_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXVMC_LICENSE = MIT +XLIB_LIBXVMC_LICENSE_FILES = COPYING +XLIB_LIBXVMC_CPE_ID_VENDOR = x.org +XLIB_LIBXVMC_CPE_ID_PRODUCT = libxvmc +XLIB_LIBXVMC_INSTALL_STAGING = YES +XLIB_LIBXVMC_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXv xorgproto +XLIB_LIBXVMC_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXxf86dga/Config.in b/package/x11r7/xlib_libXxf86dga/Config.in new file mode 100644 index 00000000..918ea0f1 --- /dev/null +++ b/package/x11r7/xlib_libXxf86dga/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXXF86DGA + bool "libXxf86dga" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XORGPROTO + help + X.Org Xxf86dga library diff --git a/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.hash b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.hash new file mode 100644 index 00000000..f0172c34 --- /dev/null +++ b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002982.html +md5 0ddeafc13b33086357cfa96fae41ee8e libXxf86dga-1.1.5.tar.bz2 +sha1 332ba80d1b3d06473f7bbfe1612e7c5b58fbdf69 libXxf86dga-1.1.5.tar.bz2 +sha256 2b98bc5f506c6140d4eddd3990842d30f5dae733b64f198a504f07461bdb7203 libXxf86dga-1.1.5.tar.bz2 +sha512 0e77c4003aeba737b10c17d55aeefa935fc57c4ba9e8f79a834f3f8c690d6a1d98f69ad707eded784346c1cf40c41829719d257283b5eae3207147fb4c79ed89 libXxf86dga-1.1.5.tar.bz2 +# Locally computed +sha256 dd27933ebc5c063128b158b085e4c442a36b0e6f704cf753116da119610191da COPYING diff --git a/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk new file mode 100644 index 00000000..a5173fbc --- /dev/null +++ b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXxf86dga +# +################################################################################ + +XLIB_LIBXXF86DGA_VERSION = 1.1.5 +XLIB_LIBXXF86DGA_SOURCE = libXxf86dga-$(XLIB_LIBXXF86DGA_VERSION).tar.bz2 +XLIB_LIBXXF86DGA_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXXF86DGA_LICENSE = MIT +XLIB_LIBXXF86DGA_LICENSE_FILES = COPYING +XLIB_LIBXXF86DGA_CPE_ID_VENDOR = x +XLIB_LIBXXF86DGA_CPE_ID_PRODUCT = libxxf86dga +XLIB_LIBXXF86DGA_INSTALL_STAGING = YES +XLIB_LIBXXF86DGA_DEPENDENCIES = xlib_libX11 xlib_libXext xorgproto +XLIB_LIBXXF86DGA_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXxf86vm/Config.in b/package/x11r7/xlib_libXxf86vm/Config.in new file mode 100644 index 00000000..c3b11f42 --- /dev/null +++ b/package/x11r7/xlib_libXxf86vm/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXXF86VM + bool "libXxf86vm" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XORGPROTO + help + X.Org Xxf86vm library diff --git a/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.hash b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.hash new file mode 100644 index 00000000..b55c55c8 --- /dev/null +++ b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.hash @@ -0,0 +1,6 @@ +# From http://lists.x.org/archives/xorg-announce/2015-February/002539.html +sha1 78ef18ca2be157131899e01c62679e247409a13f libXxf86vm-1.1.4.tar.bz2 +sha256 afee27f93c5f31c0ad582852c0fb36d50e4de7cd585fcf655e278a633d85cd57 libXxf86vm-1.1.4.tar.bz2 + +# Locally calculated +sha256 f3da8eaed19e27e4f67e6f076d4ebdb8d649e15a8ad33a415fb65a23de1b6689 COPYING diff --git a/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk new file mode 100644 index 00000000..8871bd50 --- /dev/null +++ b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXxf86vm +# +################################################################################ + +XLIB_LIBXXF86VM_VERSION = 1.1.4 +XLIB_LIBXXF86VM_SOURCE = libXxf86vm-$(XLIB_LIBXXF86VM_VERSION).tar.bz2 +XLIB_LIBXXF86VM_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXXF86VM_LICENSE = MIT +XLIB_LIBXXF86VM_LICENSE_FILES = COPYING +XLIB_LIBXXF86VM_CPE_ID_VENDOR = x +XLIB_LIBXXF86VM_CPE_ID_PRODUCT = libxxf86vm +XLIB_LIBXXF86VM_INSTALL_STAGING = YES +XLIB_LIBXXF86VM_DEPENDENCIES = xlib_libX11 xlib_libXext xorgproto +XLIB_LIBXXF86VM_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libdmx/Config.in b/package/x11r7/xlib_libdmx/Config.in new file mode 100644 index 00000000..99cddb63 --- /dev/null +++ b/package/x11r7/xlib_libdmx/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBDMX + bool "libdmx" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XORGPROTO + help + X.Org dmx library diff --git a/package/x11r7/xlib_libdmx/xlib_libdmx.hash b/package/x11r7/xlib_libdmx/xlib_libdmx.hash new file mode 100644 index 00000000..1090e3c2 --- /dev/null +++ b/package/x11r7/xlib_libdmx/xlib_libdmx.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-May/002894.html +md5 d2f1f0ec68ac3932dd7f1d9aa0a7a11c libdmx-1.1.4.tar.bz2 +sha1 499e2540ca0e94ca858037865243c3c60908fd94 libdmx-1.1.4.tar.bz2 +sha256 253f90005d134fa7a209fbcbc5a3024335367c930adf0f3203e754cf32747243 libdmx-1.1.4.tar.bz2 +sha512 77aba6cadfd17db0cc7e1bc26f14d908223a0fdb135d46f86c3be34e3bc7e2f843f08d4d0ef773357e83b17122bffe56a0442d12908378c05a22177b10ae10e9 libdmx-1.1.4.tar.bz2 +# Locally computed +sha256 819e8dcd3dd2a44850c350331aa492230f86bccb0983dd739dec5ba36d7d2b8e COPYING diff --git a/package/x11r7/xlib_libdmx/xlib_libdmx.mk b/package/x11r7/xlib_libdmx/xlib_libdmx.mk new file mode 100644 index 00000000..429595b5 --- /dev/null +++ b/package/x11r7/xlib_libdmx/xlib_libdmx.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libdmx +# +################################################################################ + +XLIB_LIBDMX_VERSION = 1.1.4 +XLIB_LIBDMX_SOURCE = libdmx-$(XLIB_LIBDMX_VERSION).tar.bz2 +XLIB_LIBDMX_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBDMX_LICENSE = MIT +XLIB_LIBDMX_LICENSE_FILES = COPYING +XLIB_LIBDMX_CPE_ID_VENDOR = x +XLIB_LIBDMX_CPE_ID_PRODUCT = libdmx +XLIB_LIBDMX_INSTALL_STAGING = YES +XLIB_LIBDMX_DEPENDENCIES = xlib_libX11 xlib_libXext xorgproto +XLIB_LIBDMX_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libfontenc/Config.in b/package/x11r7/xlib_libfontenc/Config.in new file mode 100644 index 00000000..38cb8333 --- /dev/null +++ b/package/x11r7/xlib_libfontenc/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBFONTENC + bool "libfontenc" + select BR2_PACKAGE_XORGPROTO + select BR2_PACKAGE_ZLIB + help + X.Org fontenc library diff --git a/package/x11r7/xlib_libfontenc/xlib_libfontenc.hash b/package/x11r7/xlib_libfontenc/xlib_libfontenc.hash new file mode 100644 index 00000000..de05fd27 --- /dev/null +++ b/package/x11r7/xlib_libfontenc/xlib_libfontenc.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-February/002956.html +md5 6447db6a689fb530c218f0f8328c3abc libfontenc-1.1.4.tar.bz2 +sha1 d4f232b0b07487b984e13422ce4130b61a8b9edb libfontenc-1.1.4.tar.bz2 +sha256 2cfcce810ddd48f2e5dc658d28c1808e86dcf303eaff16728b9aa3dbc0092079 libfontenc-1.1.4.tar.bz2 +sha512 76fa851d00113241f15fdd5b5bb7e927b8d8b9a82ce3fcb0678b8c7e32cb5e8d898c4bda1d60dafb7748145049d3240627ac34a2360c64e98a7a912ea7c30582 libfontenc-1.1.4.tar.bz2 +# Locally computed +sha256 a4dda7a643b517794bfa23dc9605da030055df38ac8a5b9e1905e690975a59c4 COPYING diff --git a/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk b/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk new file mode 100644 index 00000000..a55b90d6 --- /dev/null +++ b/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xlib_libfontenc +# +################################################################################ + +XLIB_LIBFONTENC_VERSION = 1.1.4 +XLIB_LIBFONTENC_SOURCE = libfontenc-$(XLIB_LIBFONTENC_VERSION).tar.bz2 +XLIB_LIBFONTENC_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBFONTENC_LICENSE = MIT +XLIB_LIBFONTENC_LICENSE_FILES = COPYING +XLIB_LIBFONTENC_INSTALL_STAGING = YES +XLIB_LIBFONTENC_DEPENDENCIES = zlib xorgproto host-pkgconf +HOST_XLIB_LIBFONTENC_DEPENDENCIES = host-zlib host-xorgproto host-pkgconf + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libxkbfile/Config.in b/package/x11r7/xlib_libxkbfile/Config.in new file mode 100644 index 00000000..0d7e4660 --- /dev/null +++ b/package/x11r7/xlib_libxkbfile/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBXKBFILE + bool "libxkbfile" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XORGPROTO + help + X.Org xkbfile library diff --git a/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.hash b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.hash new file mode 100644 index 00000000..03e61bdc --- /dev/null +++ b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002977.html +md5 dd7e1e946def674e78c0efbc5c7d5b3b libxkbfile-1.1.0.tar.bz2 +sha1 487f314b6dbc17e93d0fe1e3741392156a9ca895 libxkbfile-1.1.0.tar.bz2 +sha256 758dbdaa20add2db4902df0b1b7c936564b7376c02a0acd1f2a331bd334b38c7 libxkbfile-1.1.0.tar.bz2 +sha512 1c6a57564e916ccdc3df3c49b9f3589f701df0cec55112c12ddc35ac3ed556608c28fe98e5ba0ac1962e9a65ed1e90eb7e6169b564951bf55a7cf3499b745826 libxkbfile-1.1.0.tar.bz2 +# Locally computed +sha256 e1b3fdad8037ab3f986ef9caaa7c8da47d8d55875e680c7d6011f6c07363ea7c COPYING diff --git a/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk new file mode 100644 index 00000000..6b684966 --- /dev/null +++ b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xlib_libxkbfile +# +################################################################################ + +XLIB_LIBXKBFILE_VERSION = 1.1.0 +XLIB_LIBXKBFILE_SOURCE = libxkbfile-$(XLIB_LIBXKBFILE_VERSION).tar.bz2 +XLIB_LIBXKBFILE_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXKBFILE_LICENSE = MIT +XLIB_LIBXKBFILE_LICENSE_FILES = COPYING +XLIB_LIBXKBFILE_INSTALL_STAGING = YES +XLIB_LIBXKBFILE_DEPENDENCIES = xlib_libX11 xorgproto +HOST_XLIB_LIBXKBFILE_DEPENDENCIES = host-xlib_libX11 host-xorgproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libxshmfence/Config.in b/package/x11r7/xlib_libxshmfence/Config.in new file mode 100644 index 00000000..7823bda7 --- /dev/null +++ b/package/x11r7/xlib_libxshmfence/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XLIB_LIBXSHMFENCE + bool "libxshmfence" + # Due to use of SYS_futex - can be enabled again when upstream + # adds SYS_futex64 as an alternative + depends on !BR2_RISCV_32 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_XORGPROTO + help + X.Org shmfence library diff --git a/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.hash b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.hash new file mode 100644 index 00000000..afdffb82 --- /dev/null +++ b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2018-February/002840.html +md5 42dda8016943dc12aff2c03a036e0937 libxshmfence-1.3.tar.bz2 +sha1 3472218fc0e8ee8183533d22dbcd4bbe90bf3ab8 libxshmfence-1.3.tar.bz2 +sha256 b884300d26a14961a076fbebc762a39831cb75f92bed5ccf9836345b459220c7 libxshmfence-1.3.tar.bz2 +sha512 c446e055f8fac62b9aa266132289a4cfc030282147974c45ce96d1768a98d1afb997470e58e4a68513174c404cbf373bdde2f0cd4b34abdbce1d89dd0b6fe2b7 libxshmfence-1.3.tar.bz2 +# Locally computed +sha256 64a579d1a0b3347301d87c94698a58ea7933d0ae6ca7e8fdd702fde2ea376301 COPYING diff --git a/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk new file mode 100644 index 00000000..605408ff --- /dev/null +++ b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libxshmfence +# +################################################################################ + +XLIB_LIBXSHMFENCE_VERSION = 1.3 +XLIB_LIBXSHMFENCE_SOURCE = libxshmfence-$(XLIB_LIBXSHMFENCE_VERSION).tar.bz2 +XLIB_LIBXSHMFENCE_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXSHMFENCE_LICENSE = MIT +XLIB_LIBXSHMFENCE_LICENSE_FILES = COPYING +XLIB_LIBXSHMFENCE_INSTALL_STAGING = YES +XLIB_LIBXSHMFENCE_DEPENDENCIES = host-pkgconf xorgproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_xtrans/Config.in b/package/x11r7/xlib_xtrans/Config.in new file mode 100644 index 00000000..7c8bae79 --- /dev/null +++ b/package/x11r7/xlib_xtrans/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XLIB_XTRANS + bool "xtrans" + help + X.Org xtrans library diff --git a/package/x11r7/xlib_xtrans/xlib_xtrans.hash b/package/x11r7/xlib_xtrans/xlib_xtrans.hash new file mode 100644 index 00000000..4e212c0f --- /dev/null +++ b/package/x11r7/xlib_xtrans/xlib_xtrans.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002980.html +md5 ce2fb8100c6647ee81451ebe388b17ad xtrans-1.4.0.tar.bz2 +sha1 7c490026efb450798e02b040c05eba5212291c08 xtrans-1.4.0.tar.bz2 +sha256 377c4491593c417946efcd2c7600d1e62639f7a8bbca391887e2c4679807d773 xtrans-1.4.0.tar.bz2 +sha512 4fea89a3455c0e13321cbefa43340016dbb59bdd0dbdb5b796c1a6d2a6b1fd63cf1327b769ab426286b9c54b32ec764a50cd2b46228e4e43b841bda6b94de214 xtrans-1.4.0.tar.bz2 +# Locally computed +sha256 a9c96c832e00774266b492d4d41556f12a64f039ba3ef645c4b8c6010fcb8f2a COPYING diff --git a/package/x11r7/xlib_xtrans/xlib_xtrans.mk b/package/x11r7/xlib_xtrans/xlib_xtrans.mk new file mode 100644 index 00000000..88c9b57a --- /dev/null +++ b/package/x11r7/xlib_xtrans/xlib_xtrans.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_xtrans +# +################################################################################ + +XLIB_XTRANS_VERSION = 1.4.0 +XLIB_XTRANS_SOURCE = xtrans-$(XLIB_XTRANS_VERSION).tar.bz2 +XLIB_XTRANS_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_XTRANS_LICENSE = MIT +XLIB_XTRANS_LICENSE_FILES = COPYING +XLIB_XTRANS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xorgproto/Config.in b/package/x11r7/xorgproto/Config.in new file mode 100644 index 00000000..af38eb43 --- /dev/null +++ b/package/x11r7/xorgproto/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XORGPROTO + bool "xorgproto" + help + This package combines the protocol headers, which were + formerly scattered in individual packages. diff --git a/package/x11r7/xorgproto/xorgproto.hash b/package/x11r7/xorgproto/xorgproto.hash new file mode 100644 index 00000000..fda42ac8 --- /dev/null +++ b/package/x11r7/xorgproto/xorgproto.hash @@ -0,0 +1,42 @@ +# From https://lists.x.org/archives/xorg-announce/2020-April/003042.html +md5 c29f4fa78f53b52b3efdc71ebd9506b6 xorgproto-2020.1.tar.bz2 +sha1 1cdab4e9ab796760ddb9582071328469a8eca08a xorgproto-2020.1.tar.bz2 +sha256 54a153f139035a376c075845dd058049177212da94d7a9707cf9468367b699d2 xorgproto-2020.1.tar.bz2 +sha512 2d10533e54987f293e1c8578aa742c38cf2fac8551db1d317cf5ee4a6a9600eced50f59c57c38b35dd210fe02d350294c967512f04cb9876d6c0c1f7e89cb199 xorgproto-2020.1.tar.bz2 +# Locally computed +sha256 aacd931f191b610902aee1e526090c2858aabc07969441fa2537ffd3e7049555 COPYING-applewmproto +sha256 dabc025f93129a0eb2d17f37c719dbe5ecbcb5bc8f7bc7f4ce89fe04576cc0c2 COPYING-bigreqsproto +sha256 ab587ca94282c1e60797ffe4a77aea195418387db20ec7e0c24cedf2c844f8c1 COPYING-compositeproto +sha256 f67a18cb46c4c203c5122b4a901cfcc3178b2a62f83f31ca5fef5bdca3966094 COPYING-damageproto +sha256 819e8dcd3dd2a44850c350331aa492230f86bccb0983dd739dec5ba36d7d2b8e COPYING-dmxproto +sha256 0c306691492c4d7a8cda1ec3847668b797887dddcd7e986b4c166ae27619af7d COPYING-dri2proto +sha256 64a579d1a0b3347301d87c94698a58ea7933d0ae6ca7e8fdd702fde2ea376301 COPYING-dri3proto +sha256 0aa43d03da3cedbd9882c0ded621b0d855353eb9e551f9eed940d75c8a0b03c1 COPYING-evieproto +sha256 65cb0b867b00fb27f066a37353713b265645b3301146562570d7638ed2ddd548 COPYING-fixesproto +sha256 1ab381e978bff63d68be2e4f235d51935f3f16f3ba3bebf83afa99a70c0484a2 COPYING-fontcacheproto +sha256 f4af05774b02ae149357cc26f7bf5ef1116c2e09373c2492081a3a1892c58417 COPYING-fontsproto +sha256 823deb4673d3f26aa8c90e704888299648f00be3262f9363eaeecedcd65b936d COPYING-glproto +sha256 5e083a2ace0215a6084c877c023a6079952ba803d692488203ba4269196debe3 COPYING-inputproto +sha256 d397a67d4b28e897bc5fce79b2b917df9905b54f961fc3ad1f49c7fe3803f92c COPYING-kbproto +sha256 7a5dd5d4c989c167da50f15879959f42bbda960e06d0a0aea7197f61fe1dc846 COPYING-lg3dproto +sha256 8442b5f22f2fb13017a4302a906e7dedc899267b41f613558970941120170128 COPYING-pmproto +sha256 64a579d1a0b3347301d87c94698a58ea7933d0ae6ca7e8fdd702fde2ea376301 COPYING-presentproto +sha256 6b890b118261694865988378dbba876bcd9caa1a421c5c0d626116948bc0ae35 COPYING-printproto +sha256 41c13dcd09147ed2440286f2fb8151df8ebee06deee4ed78ddf094601c216d3d COPYING-randrproto +sha256 ee10aee0f1697ffdbe870a39f037361d4f7136f2976bb7919a41b3f66407caee COPYING-recordproto +sha256 9e48921a94da36d7a69fe71809223ee0bb46370db9842dccdeeb55b5a9946872 COPYING-renderproto +sha256 403e7be948674530ad40669b1e3a31adeddb656502f3b0ef810d5d3cc35d0b52 COPYING-resourceproto +sha256 fcbd3c628bf4d28ee3e6032054bf44bbe58f3b1a944dad856a8d3eb6b37ea412 COPYING-scrnsaverproto +sha256 d6d3513f5a7099748dc387f54498d799380b45f8a444f13aa98aa45a860ae55b COPYING-trapproto +sha256 f8f49bbad61967ebc890fb79fff5bfb7cfc1c341aa8f8dee13eb3fb534040b47 COPYING-videoproto +sha256 eb183a00c61bb47992f096b6993ed7ec17518bea9c285fe87efff7f622cc6c12 COPYING-windowswmproto +sha256 da4a28570230228b9bd80a701c5d8752f8609394de2e0d46d26d978bd07610db COPYING-x11proto +sha256 5531d18cfcc944dab39991f63f182cbbce3fe493ba0c7cf08a25c0d01ee84482 COPYING-xcmiscproto +sha256 fb42146c6c06a200a9b121220eb692ff9101ba0fbd0b224b9e16a016c59ae86a COPYING-xextproto +sha256 3591964e01a9cdfc9cc4149a847a431a3f3d98328cc9e5864c7a7831b29c4058 COPYING-xf86bigfontproto +sha256 3591964e01a9cdfc9cc4149a847a431a3f3d98328cc9e5864c7a7831b29c4058 COPYING-xf86dgaproto +sha256 4a05d06752388d9db71ee1006f371d4fb2c316a821fc2fc272db90b3ef978334 COPYING-xf86driproto +sha256 3591964e01a9cdfc9cc4149a847a431a3f3d98328cc9e5864c7a7831b29c4058 COPYING-xf86miscproto +sha256 3591964e01a9cdfc9cc4149a847a431a3f3d98328cc9e5864c7a7831b29c4058 COPYING-xf86rushproto +sha256 942bb46a3503a708948491699171b00b9e0dfb47818d9268b160bccc5f51a4b9 COPYING-xf86vidmodeproto +sha256 b2d8cda803e900915ce10f0ba735ff2c033b39c7cc5a8a436667ca583d4066fa COPYING-xineramaproto diff --git a/package/x11r7/xorgproto/xorgproto.mk b/package/x11r7/xorgproto/xorgproto.mk new file mode 100644 index 00000000..1c9f320e --- /dev/null +++ b/package/x11r7/xorgproto/xorgproto.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# xorgproto +# +################################################################################ + +XORGPROTO_VERSION = 2020.1 +XORGPROTO_SOURCE = xorgproto-$(XORGPROTO_VERSION).tar.bz2 +XORGPROTO_SITE = https://xorg.freedesktop.org/archive/individual/proto +XORGPROTO_LICENSE = MIT +XORGPROTO_LICENSE_FILES = \ + COPYING-applewmproto \ + COPYING-bigreqsproto \ + COPYING-compositeproto \ + COPYING-damageproto \ + COPYING-dmxproto \ + COPYING-dri2proto \ + COPYING-dri3proto \ + COPYING-evieproto \ + COPYING-fixesproto \ + COPYING-fontcacheproto \ + COPYING-fontsproto \ + COPYING-glproto \ + COPYING-inputproto \ + COPYING-kbproto \ + COPYING-lg3dproto \ + COPYING-pmproto \ + COPYING-presentproto \ + COPYING-printproto \ + COPYING-randrproto \ + COPYING-recordproto \ + COPYING-renderproto \ + COPYING-resourceproto \ + COPYING-scrnsaverproto \ + COPYING-trapproto \ + COPYING-videoproto \ + COPYING-windowswmproto \ + COPYING-x11proto \ + COPYING-xcmiscproto \ + COPYING-xextproto \ + COPYING-xf86bigfontproto \ + COPYING-xf86dgaproto \ + COPYING-xf86driproto \ + COPYING-xf86miscproto \ + COPYING-xf86rushproto \ + COPYING-xf86vidmodeproto \ + COPYING-xineramaproto +XORGPROTO_INSTALL_STAGING = YES +XORGPROTO_INSTALL_TARGET = NO +# xproxymngproto is needed by xfindproxy +XORGPROTO_CONF_OPTS += --enable-legacy + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xserver_xorg-server/0001-modesettings-needs-dri2.patch b/package/x11r7/xserver_xorg-server/0001-modesettings-needs-dri2.patch new file mode 100644 index 00000000..74917720 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/0001-modesettings-needs-dri2.patch @@ -0,0 +1,20 @@ +Kernel modesettings support also depends on dri2, see +http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/Makefile.am#n46 + +Patch sent upstream: https://gitlab.freedesktop.org/xorg/xserver/issues/479 + +[rebased for version 1.20.0] +Signed-off-by: Bernd Kuhls + +diff -uNr xorg-server-1.17.2.org/configure.ac xorg-server-1.17.2/configure.ac +--- xorg-server-1.17.2.org/configure.ac 2015-06-16 17:42:40.000000000 +0200 ++++ xorg-server-1.17.2/configure.ac 2015-08-08 10:44:59.702382624 +0200 +@@ -1962,7 +1962,7 @@ + XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" + fi + +- if test "x$DRM" = xyes; then ++ if test "x$DRM" = xyes -a "x$DRI2" = xyes; then + XORG_DRIVER_MODESETTING=yes + fi + diff --git a/package/x11r7/xserver_xorg-server/0002-include-misc.h-fix-uClibc-build.patch b/package/x11r7/xserver_xorg-server/0002-include-misc.h-fix-uClibc-build.patch new file mode 100644 index 00000000..562aa79f --- /dev/null +++ b/package/x11r7/xserver_xorg-server/0002-include-misc.h-fix-uClibc-build.patch @@ -0,0 +1,31 @@ +From 2e8fca00f5bdb02f2f59aaa428d1e9d808ab0e86 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 16 Jun 2018 19:20:16 +0200 +Subject: [PATCH] include/misc.h: fix uClibc build + +A similar fix was used for Dovecot: +https://www.dovecot.org/list/dovecot/2017-November/110019.html + +Signed-off-by: Bernd Kuhls +--- + include/misc.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/include/misc.h b/include/misc.h +index 14920c3c3..390e52b60 100644 +--- a/include/misc.h ++++ b/include/misc.h +@@ -185,6 +185,10 @@ typedef struct _xReq *xReqPtr; + #endif + #endif + ++#undef bswap_16 ++#undef bswap_32 ++#undef bswap_64 ++ + /** + * Calculate the number of bytes needed to hold bits. + * @param bits The minimum number of bits needed. +-- +2.17.1 + diff --git a/package/x11r7/xserver_xorg-server/0003-hw-xwayland-Makefile.am-fix-build-without-glx.patch b/package/x11r7/xserver_xorg-server/0003-hw-xwayland-Makefile.am-fix-build-without-glx.patch new file mode 100644 index 00000000..5f19a26d --- /dev/null +++ b/package/x11r7/xserver_xorg-server/0003-hw-xwayland-Makefile.am-fix-build-without-glx.patch @@ -0,0 +1,45 @@ +From b1d2a82d644518c1a75775244ac63be738aaf062 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 19 Apr 2019 10:19:50 +0200 +Subject: [PATCH] hw/xwayland/Makefile.am: fix build without glx + +Commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b added libglxvnd.la to +Xwayland_LDFLAGS but GLX can be disabled through --disable-glx. +In this case, build fails on: + +make[3]: *** No rule to make target '../../glx/libglxvnd.la', needed by 'Xwayland'. Stop. +make[3]: *** Waiting for unfinished jobs.... + +Fixes: + - http://autobuild.buildroot.org/results/397f8098c57fc6c88aa12dc8d35ebb1b933d52ef + +Signed-off-by: Fabrice Fontaine +[Upstream status: +https://gitlab.freedesktop.org/xorg/xserver/merge_requests/173] +--- + hw/xwayland/Makefile.am | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am +index bc1cb8506..502879e2a 100644 +--- a/hw/xwayland/Makefile.am ++++ b/hw/xwayland/Makefile.am +@@ -21,10 +21,14 @@ Xwayland_SOURCES = \ + $(top_srcdir)/Xi/stubs.c \ + $(top_srcdir)/mi/miinitext.c + ++if GLX ++GLXVND_LIB = $(top_builddir)/glx/libglxvnd.la ++endif ++ + Xwayland_LDADD = \ + $(glamor_lib) \ + $(XWAYLAND_LIBS) \ +- $(top_builddir)/glx/libglxvnd.la \ ++ $(GLXVND_LIB) \ + $(XWAYLAND_SYS_LIBS) \ + $(top_builddir)/Xext/libXvidmode.la \ + $(XSERVER_SYS_LIBS) +-- +2.20.1 + diff --git a/package/x11r7/xserver_xorg-server/0004-hw-xfree86-common-xf86Init.c-fix-build-without-glx.patch b/package/x11r7/xserver_xorg-server/0004-hw-xfree86-common-xf86Init.c-fix-build-without-glx.patch new file mode 100644 index 00000000..de086fb6 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/0004-hw-xfree86-common-xf86Init.c-fix-build-without-glx.patch @@ -0,0 +1,45 @@ +From 49456e0a37fac7bc9d1f01bc1519fb0d699956db Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 27 Dec 2019 23:33:37 +0100 +Subject: [PATCH] hw/xfree86/common/xf86Init.c: fix build without glx + +Since commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b, an include on +glxvndabi.h has been added to hw/xfree86/common/xf86Init.c + +However, if glx is disabled through --disable-glx and GLX headers are +not installed in the build's environment, build fails on: + +In file included from xf86Init.c:81: +../../../include/glxvndabi.h:64:10: fatal error: GL/glxproto.h: No such file or directory + 64 | #include + | ^~~~~~~~~~~~~~~ + +Fix this failure by removing this include which does not seem to be +needed (an other option would have been to keep it under an ifdef GLXEXT +block) + +Fixes: + - http://autobuild.buildroot.org/results/de838a843f97673d1381a55fd4e9b07164693913 + +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://gitlab.freedesktop.org/xorg/xserver/commit/49456e0a37fac7bc9d1f01bc1519fb0d699956db] +--- + hw/xfree86/common/xf86Init.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c +index 0631c7237..e6fb11398 100644 +--- a/hw/xfree86/common/xf86Init.c ++++ b/hw/xfree86/common/xf86Init.c +@@ -78,7 +78,6 @@ + #include "xf86InPriv.h" + #include "picturestr.h" + #include "randrstr.h" +-#include "glxvndabi.h" + #include "xf86Bus.h" + #ifdef XSERVER_LIBPCIACCESS + #include "xf86VGAarbiter.h" +-- +2.24.1 + diff --git a/package/x11r7/xserver_xorg-server/0005-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch b/package/x11r7/xserver_xorg-server/0005-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch new file mode 100644 index 00000000..7802fd96 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/0005-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch @@ -0,0 +1,33 @@ +From e50c85f4ebf559a3bac4817b41074c43d4691779 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 26 Oct 2018 17:47:30 -0700 +Subject: [PATCH] Fix segfault on probing a non-PCI platform device on a system + with PCI. + +Some Broadcom set-top-box boards have PCI busses, but the GPU is still +probed through DT. We would dereference a null busid here in that +case. + +Signed-off-by: Eric Anholt +Backported from: e50c85f4ebf559a3bac4817b41074c43d4691779 +Signed-off-by: Joseph Kogut +--- + hw/xfree86/common/xf86platformBus.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c +index cef47da03..dadbac6c8 100644 +--- a/hw/xfree86/common/xf86platformBus.c ++++ b/hw/xfree86/common/xf86platformBus.c +@@ -289,7 +289,7 @@ xf86platformProbe(void) + for (i = 0; i < xf86_num_platform_devices; i++) { + char *busid = xf86_platform_odev_attributes(i)->busid; + +- if (pci && (strncmp(busid, "pci:", 4) == 0)) { ++ if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) { + platform_find_pci_info(&xf86_platform_devices[i], busid); + } + +-- +2.24.1 + diff --git a/package/x11r7/xserver_xorg-server/Config.in b/package/x11r7/xserver_xorg-server/Config.in new file mode 100644 index 00000000..4dc15435 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/Config.in @@ -0,0 +1,85 @@ +comment "xorg-server needs a glibc or uClibc toolchain" + depends on BR2_arm && BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_XSERVER_XORG_SERVER + bool "xorg-server" + depends on BR2_USE_MMU # fork() + # xserver uses inb/outb on arm, which aren't available with musl + depends on !(BR2_arm && BR2_TOOLCHAIN_USES_MUSL) + # We need a SHA1 implementation. If either openssl or + # libgcrypt are already part of the build, we'll use one of + # them, otherwise, use the small libsha1 library. + select BR2_PACKAGE_LIBSHA1 if (!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT) + select BR2_PACKAGE_MCOOKIE + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_XFONT_FONT_ALIAS if !BR2_PACKAGE_XSERVER_XORG_SERVER_BUILTIN_FONTS + select BR2_PACKAGE_XFONT_FONT_MISC_MISC if !BR2_PACKAGE_XSERVER_XORG_SERVER_BUILTIN_FONTS + select BR2_PACKAGE_XFONT_FONT_CURSOR_MISC if !BR2_PACKAGE_XSERVER_XORG_SERVER_BUILTIN_FONTS + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAU + select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XLIB_LIBXDAMAGE + select BR2_PACKAGE_XLIB_LIBXDMCP + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXFONT2 + select BR2_PACKAGE_XLIB_LIBXFT + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXRES + select BR2_PACKAGE_XLIB_LIBXXF86VM + select BR2_PACKAGE_XLIB_LIBXKBFILE + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XDATA_XBITMAPS + select BR2_PACKAGE_XORGPROTO + select BR2_PACKAGE_XUTIL_UTIL_MACROS + select BR2_PACKAGE_XKEYBOARD_CONFIG + help + X.Org X server + + http://xorg.freedesktop.org + +if BR2_PACKAGE_XSERVER_XORG_SERVER + +choice + prompt "X Window System server type" + help + Select the X Window System server to use + +config BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + bool "Modular X.org" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBPCIACCESS + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ + (BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_RISCV_32) + help + This variant of the X.org server is the full-blown variant, + as used by desktop GNU/Linux distributions. The drivers (for + input and graphics) are built separately from the X.org + server (see the xdriver* packages). + +comment "Modular X.org needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE + bool "KDrive / TinyX" + help + This variant of the X.org server is a lightweight version + intended for embedded systems. The drivers (for input and + graphics) are built into the server. It is generally used + directly on top of the Linux framebuffer without DRM or + video card specific drivers. + +endchoice + +comment "Optional Servers" + +config BR2_PACKAGE_XSERVER_XORG_SERVER_XVFB + bool "Xvfb server" + help + Virtual frame buffer X server. + +endif diff --git a/package/x11r7/xserver_xorg-server/S40xorg b/package/x11r7/xserver_xorg-server/S40xorg new file mode 100644 index 00000000..215c0b7a --- /dev/null +++ b/package/x11r7/xserver_xorg-server/S40xorg @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Starts Xorg +# + +BIN=/usr/bin/Xorg +PIDFILE=/var/run/xorg.pid + +# ":0.0 vt01" makes sure Xorg finds the correct terminal. +# -allowMouseOpenFail allows the server to start up even if the mouse device +# can't be opened or initialised. +# -noreset prevents a server reset when the last client connection is closed. +XORG_ARGS=":0.0 vt01 -s 0 -noreset -allowMouseOpenFail" + +start() { + printf "Starting Xorg: " + start-stop-daemon -S -q -b -m -p $PIDFILE --exec $BIN -- $XORG_ARGS + [ $? = 0 ] && sleep 3 && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping Xorg: " + start-stop-daemon -K -q -p $PIDFILE + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + sleep 2 + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/x11r7/xserver_xorg-server/xorg.service b/package/x11r7/xserver_xorg-server/xorg.service new file mode 100644 index 00000000..553d8b25 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xorg.service @@ -0,0 +1,11 @@ +[Unit] +Description=Xorg server +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/Xorg :0.0 vt01 -s 0 -noreset -allowMouseOpenFail +Restart=always + +[Install] +WantedBy=graphical.target diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.hash b/package/x11r7/xserver_xorg-server/xserver_xorg-server.hash new file mode 100644 index 00000000..8eb56ba0 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.hash @@ -0,0 +1,6 @@ +# From https://lists.x.org/archives/xorg-announce/2021-July/003100.html +sha256 40aa4e96a56a81a301f15a9b10e06a22700f12b42d9e0e453c7f11d354386300 xorg-server-1.20.13.tar.xz +sha512 4e0b7bd4e070dc52cb2c51c2056feb133de2c0487d359392ed63abba9702910cd2e2983e9415973d8d6e9672eac78be6f39202687fc56610877914ce722554b3 xorg-server-1.20.13.tar.xz + +# Locally calculated +sha256 4cc0447a22635c7b2f1a93fec4aa94f1970fadeb72a063de006b51cf4963a06f COPYING diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk new file mode 100644 index 00000000..c326230b --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk @@ -0,0 +1,198 @@ +################################################################################ +# +# xserver_xorg-server +# +################################################################################ + +XSERVER_XORG_SERVER_VERSION = 1.20.13 +XSERVER_XORG_SERVER_SOURCE = xorg-server-$(XSERVER_XORG_SERVER_VERSION).tar.xz +XSERVER_XORG_SERVER_SITE = https://xorg.freedesktop.org/archive/individual/xserver +XSERVER_XORG_SERVER_LICENSE = MIT +XSERVER_XORG_SERVER_LICENSE_FILES = COPYING +XSERVER_XORG_SERVER_INSTALL_STAGING = YES +# xfont_font-util is needed only for autoreconf +XSERVER_XORG_SERVER_AUTORECONF = YES +XSERVER_XORG_SERVER_DEPENDENCIES = \ + xfont_font-util \ + xutil_util-macros \ + xlib_libX11 \ + xlib_libXau \ + xlib_libXdmcp \ + xlib_libXext \ + xlib_libXfixes \ + xlib_libXfont2 \ + xlib_libXi \ + xlib_libXrender \ + xlib_libXres \ + xlib_libXft \ + xlib_libXcursor \ + xlib_libXinerama \ + xlib_libXrandr \ + xlib_libXdamage \ + xlib_libXxf86vm \ + xlib_libxkbfile \ + xlib_xtrans \ + xdata_xbitmaps \ + xorgproto \ + xkeyboard-config \ + pixman \ + mcookie \ + host-pkgconf + +# We force -O2 regardless of the optimization level chosen by the +# user, as the X.org server is known to trigger some compiler bugs at +# -Os on several architectures. +XSERVER_XORG_SERVER_CONF_OPTS = \ + --disable-config-hal \ + --enable-record \ + --disable-xnest \ + --disable-xephyr \ + --disable-dmx \ + --disable-unit-tests \ + --with-builder-addr=buildroot@buildroot.org \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/pixman-1 -O2" \ + --with-fontrootdir=/usr/share/fonts/X11/ \ + --$(if $(BR2_PACKAGE_XSERVER_XORG_SERVER_XVFB),en,dis)able-xvfb + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +XSERVER_XORG_SERVER_CONF_OPTS += \ + --with-systemd-daemon \ + --enable-systemd-logind +XSERVER_XORG_SERVER_DEPENDENCIES += \ + systemd +else +XSERVER_XORG_SERVER_CONF_OPTS += \ + --without-systemd-daemon \ + --disable-systemd-logind +endif + +# Xwayland support needs libdrm, libepoxy, wayland and libxcomposite +ifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_LIBEPOXY)$(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_WAYLAND_PROTOCOLS)$(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),yyyyy) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-xwayland +XSERVER_XORG_SERVER_DEPENDENCIES += libdrm libepoxy wayland wayland-protocols xlib_libXcomposite +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-xwayland +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-xorg +XSERVER_XORG_SERVER_DEPENDENCIES += libpciaccess +ifeq ($(BR2_PACKAGE_LIBDRM),y) +XSERVER_XORG_SERVER_DEPENDENCIES += libdrm +XSERVER_XORG_SERVER_CONF_OPTS += --enable-libdrm +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-libdrm +endif +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-xorg +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE),y) +XSERVER_XORG_SERVER_CONF_OPTS += \ + --enable-kdrive \ + --disable-glx \ + --disable-dri + +else # modular +XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri --enable-glx +XSERVER_XORG_SERVER_DEPENDENCIES += libgl +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri --disable-glx +endif + +# Optional packages +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XSERVER_XORG_SERVER_DEPENDENCIES += udev +XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev +# udev kms support depends on libdrm and dri2 +ifeq ($(BR2_PACKAGE_LIBDRM),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev-kms +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-config-udev-kms +endif +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +XSERVER_XORG_SERVER_DEPENDENCIES += dbus +XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-dbus +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +XSERVER_XORG_SERVER_DEPENDENCIES += freetype +endif + +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +XSERVER_XORG_SERVER_DEPENDENCIES += libunwind +XSERVER_XORG_SERVER_CONF_OPTS += --enable-libunwind +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-libunwind +endif + +ifneq ($(BR2_PACKAGE_XLIB_LIBXVMC),y) +XSERVER_XORG_SERVER_CONF_OPTS += --disable-xvmc +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y) +XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXcomposite +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-composite +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri2 +ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) +XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libxshmfence +XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri3 +ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGL)$(BR2_PACKAGE_LIBEPOXY),yyy) +XSERVER_XORG_SERVER_DEPENDENCIES += libepoxy +XSERVER_XORG_SERVER_CONF_OPTS += --enable-glamor +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-glamor +endif +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri3 --disable-glamor +endif +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri2 --disable-dri3 --disable-glamor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),y) +XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXScrnSaver +XSERVER_XORG_SERVER_CONF_OPTS += --enable-screensaver +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-screensaver +endif + +ifneq ($(BR2_PACKAGE_XLIB_LIBDMX),y) +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dmx +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libcrypto +XSERVER_XORG_SERVER_DEPENDENCIES += openssl +else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libgcrypt +XSERVER_XORG_SERVER_DEPENDENCIES += libgcrypt +else +XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libsha1 +XSERVER_XORG_SERVER_DEPENDENCIES += libsha1 +endif + +define XSERVER_XORG_SERVER_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/x11r7/xserver_xorg-server/xorg.service \ + $(TARGET_DIR)/usr/lib/systemd/system/xorg.service +endef + +# init script conflicts with S90nodm +ifneq ($(BR2_PACKAGE_NODM),y) +define XSERVER_XORG_SERVER_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/x11r7/xserver_xorg-server/S40xorg \ + $(TARGET_DIR)/etc/init.d/S40xorg +endef +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xutil_makedepend/Config.in b/package/x11r7/xutil_makedepend/Config.in new file mode 100644 index 00000000..fdf2fb92 --- /dev/null +++ b/package/x11r7/xutil_makedepend/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XUTIL_MAKEDEPEND + bool "makedepend" + select BR2_PACKAGE_XORGPROTO + help + No description available diff --git a/package/x11r7/xutil_makedepend/xutil_makedepend.hash b/package/x11r7/xutil_makedepend/xutil_makedepend.hash new file mode 100644 index 00000000..17986061 --- /dev/null +++ b/package/x11r7/xutil_makedepend/xutil_makedepend.hash @@ -0,0 +1,7 @@ +# From https://lists.x.org/archives/xorg-announce/2019-March/002985.html +md5 b2ca7f2f21f1c04a88b6a254c19c9b68 makedepend-1.0.6.tar.bz2 +sha1 3f321f7b570ec98f1fabc441267d29347a2e1456 makedepend-1.0.6.tar.bz2 +sha256 d558a52e8017d984ee59596a9582c8d699a1962391b632bec3bb6804bf4d501c makedepend-1.0.6.tar.bz2 +sha512 eb0e8ee8ab7515806d7d98a060cdcd392ec38e4225e5e05db26daa6651f185d0b764aab403edeea904d4d23211b1f7db20daeee6eafce8abe65225784ed0aa42 makedepend-1.0.6.tar.bz2 +# Locally computed +sha256 0530078db78c47ae978dc2bd77f4f427e6cd97df868672c95b1ef284113c8cb7 COPYING diff --git a/package/x11r7/xutil_makedepend/xutil_makedepend.mk b/package/x11r7/xutil_makedepend/xutil_makedepend.mk new file mode 100644 index 00000000..18f8eb1f --- /dev/null +++ b/package/x11r7/xutil_makedepend/xutil_makedepend.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xutil_makedepend +# +################################################################################ + +XUTIL_MAKEDEPEND_VERSION = 1.0.6 +XUTIL_MAKEDEPEND_SOURCE = makedepend-$(XUTIL_MAKEDEPEND_VERSION).tar.bz2 +XUTIL_MAKEDEPEND_SITE = http://xorg.freedesktop.org/releases/individual/util +XUTIL_MAKEDEPEND_LICENSE = MIT +XUTIL_MAKEDEPEND_LICENSE_FILES = COPYING + +XUTIL_MAKEDEPEND_DEPENDENCIES = xorgproto host-pkgconf +HOST_XUTIL_MAKEDEPEND_DEPENDENCIES = host-xorgproto host-pkgconf + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11vnc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/package/x11vnc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file mode 100644 index 00000000..87dc3c99 --- /dev/null +++ b/package/x11vnc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -0,0 +1,109 @@ +From daecf59cc8b294265666482a4766aaa3148c308b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 30 Nov 2019 11:43:32 -0800 +Subject: [PATCH] Fix build on 32bit arches with 64bit time_t + +time element is deprecated on new input_event structure in kernel's +input.h [1] + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f + +[Retrieved from: +https://github.com/LibVNC/x11vnc/commit/daecf59cc8b294265666482a4766aaa3148c308b] +Signed-off-by: Fabrice Fontaine +--- + src/uinput.c | 25 +++++++++++++++++++++---- + 1 file changed, 21 insertions(+), 4 deletions(-) + +diff --git a/src/uinput.c b/src/uinput.c +index 28fbad3..d71bcde 100644 +--- a/src/uinput.c ++++ b/src/uinput.c +@@ -54,6 +54,11 @@ so, delete this exception statement from your version. + #include + #include + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + #if !defined(EV_SYN) || !defined(SYN_REPORT) + #undef UINPUT_OK + #endif +@@ -710,6 +715,7 @@ void parse_uinput_str(char *in) { + static void ptr_move(int dx, int dy) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tval; + int d = direct_rel_fd < 0 ? fd : direct_rel_fd; + + if (injectable && strchr(injectable, 'M') == NULL) { +@@ -720,7 +726,9 @@ static void ptr_move(int dx, int dy) { + + if (db) fprintf(stderr, "ptr_move(%d, %d) fd=%d\n", dx, dy, d); + +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tval, NULL); ++ ev.input_event_sec = tval.tv_sec; ++ ev.input_event_usec = tval.tv_usec; + ev.type = EV_REL; + ev.code = REL_Y; + ev.value = dy; +@@ -755,6 +763,7 @@ static void apply_tslib(int *x, int *y) { + static void ptr_abs(int x, int y, int p) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tval; + int x0, y0; + int d = direct_abs_fd < 0 ? fd : direct_abs_fd; + +@@ -773,7 +782,9 @@ static void ptr_abs(int x, int y, int p) { + + if (db) fprintf(stderr, "ptr_abs(%d, %d => %d %d, p=%d) fd=%d\n", x0, y0, x, y, p, d); + +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tval, NULL); ++ ev.input_event_sec = tval.tv_sec; ++ ev.input_event_usec = tval.tv_usec; + ev.type = EV_ABS; + ev.code = ABS_Y; + ev.value = y; +@@ -950,6 +961,7 @@ if (0) {usleep(100*1000) ;} + static void button_click(int down, int btn) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tval; + int d = direct_btn_fd < 0 ? fd : direct_btn_fd; + + if (injectable && strchr(injectable, 'B') == NULL) { +@@ -959,7 +971,9 @@ static void button_click(int down, int btn) { + if (db) fprintf(stderr, "button_click: btn %d %s fd=%d\n", btn, down ? "down" : "up", d); + + memset(&ev, 0, sizeof(ev)); +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tval, NULL); ++ ev.input_event_sec = tval.tv_sec; ++ ev.input_event_usec = tval.tv_usec; + ev.type = EV_KEY; + ev.value = down; + +@@ -1230,6 +1244,7 @@ void uinput_pointer_command(int mask, int x, int y, rfbClientPtr client) { + void uinput_key_command(int down, int keysym, rfbClientPtr client) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tval; + int scancode; + allowed_input_t input; + int d = direct_key_fd < 0 ? fd : direct_key_fd; +@@ -1253,7 +1268,9 @@ void uinput_key_command(int down, int keysym, rfbClientPtr client) { + if (db) fprintf(stderr, "uinput_key_command: %d -> %d %s fd=%d\n", keysym, scancode, down ? "down" : "up", d); + + memset(&ev, 0, sizeof(ev)); +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tval, NULL); ++ ev.input_event_sec = tval.tv_sec; ++ ev.input_event_usec = tval.tv_usec; + ev.type = EV_KEY; + ev.code = (unsigned char) scancode; + ev.value = down; diff --git a/package/x11vnc/0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch b/package/x11vnc/0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch new file mode 100644 index 00000000..e4dbdf18 --- /dev/null +++ b/package/x11vnc/0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch @@ -0,0 +1,25 @@ +From 69eeb9f7baa14ca03b16c9de821f9876def7a36a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Gu=C3=A9nal=20DAVALAN?= +Date: Wed, 18 Nov 2020 08:40:45 +0100 +Subject: [PATCH] scan: limit access to shared memory segments to current user + +[Retrieved from: +https://github.com/LibVNC/x11vnc/commit/69eeb9f7baa14ca03b16c9de821f9876def7a36a] +Signed-off-by: Fabrice Fontaine +--- + src/scan.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/scan.c b/src/scan.c +index 43e00d2..12994d5 100644 +--- a/src/scan.c ++++ b/src/scan.c +@@ -320,7 +320,7 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h, + + #if HAVE_XSHM + shm->shmid = shmget(IPC_PRIVATE, +- xim->bytes_per_line * xim->height, IPC_CREAT | 0777); ++ xim->bytes_per_line * xim->height, IPC_CREAT | 0600); + + if (shm->shmid == -1) { + rfbErr("shmget(%s) failed.\n", name); diff --git a/package/x11vnc/Config.in b/package/x11vnc/Config.in new file mode 100644 index 00000000..9e91a11a --- /dev/null +++ b/package/x11vnc/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_X11VNC + bool "x11vnc" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + depends on !BR2_nios2 # libvncserver + select BR2_PACKAGE_LIBVNCSERVER + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXTST + help + VNC server for X11 display + + http://www.karlrunge.com/x11vnc/ diff --git a/package/x11vnc/x11vnc.hash b/package/x11vnc/x11vnc.hash new file mode 100644 index 00000000..ca0b4896 --- /dev/null +++ b/package/x11vnc/x11vnc.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 885e5b5f5f25eec6f9e4a1e8be3d0ac71a686331ee1cfb442dba391111bd32bd x11vnc-0.9.16.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/x11vnc/x11vnc.mk b/package/x11vnc/x11vnc.mk new file mode 100644 index 00000000..1eda717c --- /dev/null +++ b/package/x11vnc/x11vnc.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# x11vnc +# +################################################################################ + +X11VNC_VERSION = 0.9.16 +X11VNC_SITE = $(call github,LibVNC,x11vnc,$(X11VNC_VERSION)) +# sdl support is not used in x11vnc, but host include / library search paths +# leak in if host has sdl-config +X11VNC_CONF_OPTS = --without-sdl +X11VNC_DEPENDENCIES = xlib_libXt xlib_libXext xlib_libXtst libvncserver +X11VNC_LICENSE = GPL-2.0+ +X11VNC_LICENSE_FILES = COPYING +X11VNC_CPE_ID_VENDOR = x11vnc_project +# 0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch +X11VNC_IGNORE_CVES += CVE-2020-29074 + +# Source coming from github, no configure included +X11VNC_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy) +X11VNC_DEPENDENCIES += avahi dbus +else +X11VNC_CONF_OPTS += --without-avahi +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +X11VNC_DEPENDENCIES += jpeg +else +X11VNC_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +X11VNC_DEPENDENCIES += openssl +else +X11VNC_CONF_OPTS += --without-ssl --without-crypto +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +X11VNC_DEPENDENCIES += xlib_libXinerama +else +X11VNC_CONF_OPTS += --without-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +X11VNC_DEPENDENCIES += xlib_libXrandr +else +X11VNC_CONF_OPTS += --without-xrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +X11VNC_DEPENDENCIES += xlib_libXfixes +else +X11VNC_CONF_OPTS += --without-xfixes +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y) +X11VNC_DEPENDENCIES += xlib_libXdamage +else +X11VNC_CONF_OPTS += --without-xdamage +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +X11VNC_DEPENDENCIES += zlib +else +X11VNC_CONF_OPTS += --without-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/x264/Config.in b/package/x264/Config.in new file mode 100644 index 00000000..be3ab3f3 --- /dev/null +++ b/package/x264/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_X264 + bool "x264" + help + x264 is a free software library and application for + encoding video streams into the H.264/MPEG-4 AVC + compression format, and is released under the terms + of the GNU GPL. + + https://www.videolan.org/developers/x264.html + +if BR2_PACKAGE_X264 + +config BR2_PACKAGE_X264_CLI + bool "CLI" + help + Command-line tool to encode video streams into the + H.264/MPEG-4 AVC compression format. + +endif diff --git a/package/x264/x264.hash b/package/x264/x264.hash new file mode 100644 index 00000000..62f2409e --- /dev/null +++ b/package/x264/x264.hash @@ -0,0 +1,4 @@ +# Locally computed +sha256 0bb67d095513391e637b3b47e8efc3ba4603c3844f1b4c2690f4d36da7763055 x264-snapshot-20191217-2245.tar.bz2 +sha256 323f3552b6dc2658ae5a2001a9546f3dbd1ae389f61b814c9adc7e372b43330b x264-0.155.2917+git0a84d98.tar.gz +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING diff --git a/package/x264/x264.mk b/package/x264/x264.mk new file mode 100644 index 00000000..2a1f9f8c --- /dev/null +++ b/package/x264/x264.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# x264 +# +################################################################################ + +X264_VERSION = 0.155.2917+git0a84d98 +X264_SITE = ftp://10.120.1.5/tmp/others +X264_SOURCE = x264-$(X264_VERSION).tar.gz +X264_LICENSE = GPL-2.0+ +X264_DEPENDENCIES = host-pkgconf +#X264_LICENSE_FILES = COPYING +X264_INSTALL_STAGING = YES +X264_CONF_OPTS = --disable-avs --disable-lavf --disable-swscale + +ifeq ($(BR2_i386)$(BR2_x86_64),y) +# nasm needed for assembly files +X264_DEPENDENCIES += host-nasm +X264_CONF_ENV += AS="$(HOST_DIR)/bin/nasm" +else ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_aarch64),y) +# We need to pass gcc as AS, because the ARM assembly files have to be +# preprocessed +X264_CONF_ENV += AS="$(TARGET_CC)" +else +X264_CONF_OPTS += --disable-asm +endif + +ifeq ($(BR2_STATIC_LIBS),) +X264_CONF_OPTS += --enable-pic --enable-shared +endif + +ifeq ($(BR2_PACKAGE_X264_CLI),) +X264_CONF_OPTS += --disable-cli +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +X264_CONF_OPTS += --disable-thread +endif + +# Even though the configure script is not generated by autoconf, x264 +# uses config.sub/config.guess, so we want up-to-date versions of +# them. +X264_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK + +# the configure script is not generated by autoconf +define X264_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) $(X264_CONF_ENV) ./configure \ + --prefix=/usr \ + --host="$(GNU_TARGET_NAME)" \ + --cross-prefix="$(TARGET_CROSS)" \ + --disable-ffms \ + --enable-static \ + --disable-opencl \ + $(X264_CONF_OPTS) \ + ) +endef + +define X264_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define X264_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install +endef + +define X264_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/x265/0001-fix-gcc-options.patch b/package/x265/0001-fix-gcc-options.patch new file mode 100644 index 00000000..81518212 --- /dev/null +++ b/package/x265/0001-fix-gcc-options.patch @@ -0,0 +1,52 @@ +# HG changeset patch +# User Bertrand Jacquin +# Date 1444431941 -3600 +# Node ID 5c6d2a6f2f9a0534933cc999b3845be4344e1af0 +# Parent b6156a08b1def3584647f26096866c1a0c11e54a +build: Disable -march selection from CMakeLists.txt + +x32 arch as defined on https://sites.google.com/site/x32abi is neither +X86 nor X64, then forcing -march=i686 leads to build failure as wrong +-march is used. + +Forcing -march, -mfloat-abi and -mfpu for ARM is also wrong + +As a global sanity sake, disable all forced -march in CMakeLists + +Backported from upstream pull request: +https://bitbucket.org/multicoreware/x265/pull-requests/21 + +Signed-off-by: Bernd Kuhls + +diff -r 58dddcf01b7d source/CMakeLists.txt +--- a/source/CMakeLists.txt Mon Jan 23 09:50:33 2017 +0530 ++++ b/source/CMakeLists.txt Mon Jan 23 21:03:10 2017 +0100 +@@ -194,28 +194,6 @@ + if(NATIVE_BUILD) + if(INTEL_CXX) + add_definitions(-xhost) +- else() +- add_definitions(-march=native) +- endif() +- elseif(X86 AND NOT X64) +- string(FIND "${CMAKE_CXX_FLAGS}" "-march" marchPos) +- if(marchPos LESS "0") +- add_definitions(-march=i686) +- if(WIN32 AND NOT INTEL_CXX AND NOT CLANG AND +- CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) +- add_definitions(-mpreferred-stack-boundary=2) +- endif() +- endif() +- endif() +- if(ARM AND CROSS_COMPILE_ARM) +- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC) +- elseif(ARM) +- find_package(Neon) +- if(CPU_HAS_NEON) +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC) +- add_definitions(-DHAVE_NEON) +- else() +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm) + endif() + endif() + add_definitions(${ARM_ARGS}) diff --git a/package/x265/0002-arm-asm-primitives.patch b/package/x265/0002-arm-asm-primitives.patch new file mode 100644 index 00000000..e5004434 --- /dev/null +++ b/package/x265/0002-arm-asm-primitives.patch @@ -0,0 +1,354 @@ +Fixes "arm assembly fail to compile on 1.8" + +Downloaded from upstream bug report: +https://bitbucket.org/multicoreware/x265/issues/406 + +Signed-off-by: Bernd Kuhls + +--- ./source/common/arm/asm-primitives.cpp.orig 2018-05-21 02:33:10.000000000 -0600 ++++ ./source/common/arm/asm-primitives.cpp 2018-05-28 20:38:37.302378303 -0600 +@@ -48,77 +48,77 @@ void setupAssemblyPrimitives(EncoderPrim + p.ssim_4x4x2_core = PFX(ssim_4x4x2_core_neon); + + // addAvg +- p.pu[LUMA_4x4].addAvg = PFX(addAvg_4x4_neon); +- p.pu[LUMA_4x8].addAvg = PFX(addAvg_4x8_neon); +- p.pu[LUMA_4x16].addAvg = PFX(addAvg_4x16_neon); +- p.pu[LUMA_8x4].addAvg = PFX(addAvg_8x4_neon); +- p.pu[LUMA_8x8].addAvg = PFX(addAvg_8x8_neon); +- p.pu[LUMA_8x16].addAvg = PFX(addAvg_8x16_neon); +- p.pu[LUMA_8x32].addAvg = PFX(addAvg_8x32_neon); +- p.pu[LUMA_12x16].addAvg = PFX(addAvg_12x16_neon); +- p.pu[LUMA_16x4].addAvg = PFX(addAvg_16x4_neon); +- p.pu[LUMA_16x8].addAvg = PFX(addAvg_16x8_neon); +- p.pu[LUMA_16x12].addAvg = PFX(addAvg_16x12_neon); +- p.pu[LUMA_16x16].addAvg = PFX(addAvg_16x16_neon); +- p.pu[LUMA_16x32].addAvg = PFX(addAvg_16x32_neon); +- p.pu[LUMA_16x64].addAvg = PFX(addAvg_16x64_neon); +- p.pu[LUMA_24x32].addAvg = PFX(addAvg_24x32_neon); +- p.pu[LUMA_32x8].addAvg = PFX(addAvg_32x8_neon); +- p.pu[LUMA_32x16].addAvg = PFX(addAvg_32x16_neon); +- p.pu[LUMA_32x24].addAvg = PFX(addAvg_32x24_neon); +- p.pu[LUMA_32x32].addAvg = PFX(addAvg_32x32_neon); +- p.pu[LUMA_32x64].addAvg = PFX(addAvg_32x64_neon); +- p.pu[LUMA_48x64].addAvg = PFX(addAvg_48x64_neon); +- p.pu[LUMA_64x16].addAvg = PFX(addAvg_64x16_neon); +- p.pu[LUMA_64x32].addAvg = PFX(addAvg_64x32_neon); +- p.pu[LUMA_64x48].addAvg = PFX(addAvg_64x48_neon); +- p.pu[LUMA_64x64].addAvg = PFX(addAvg_64x64_neon); ++ p.pu[LUMA_4x4].addAvg[ALIGNED] = PFX(addAvg_4x4_neon); ++ p.pu[LUMA_4x8].addAvg[ALIGNED] = PFX(addAvg_4x8_neon); ++ p.pu[LUMA_4x16].addAvg[ALIGNED] = PFX(addAvg_4x16_neon); ++ p.pu[LUMA_8x4].addAvg[ALIGNED] = PFX(addAvg_8x4_neon); ++ p.pu[LUMA_8x8].addAvg[ALIGNED] = PFX(addAvg_8x8_neon); ++ p.pu[LUMA_8x16].addAvg[ALIGNED] = PFX(addAvg_8x16_neon); ++ p.pu[LUMA_8x32].addAvg[ALIGNED] = PFX(addAvg_8x32_neon); ++ p.pu[LUMA_12x16].addAvg[ALIGNED] = PFX(addAvg_12x16_neon); ++ p.pu[LUMA_16x4].addAvg[ALIGNED] = PFX(addAvg_16x4_neon); ++ p.pu[LUMA_16x8].addAvg[ALIGNED] = PFX(addAvg_16x8_neon); ++ p.pu[LUMA_16x12].addAvg[ALIGNED] = PFX(addAvg_16x12_neon); ++ p.pu[LUMA_16x16].addAvg[ALIGNED] = PFX(addAvg_16x16_neon); ++ p.pu[LUMA_16x32].addAvg[ALIGNED] = PFX(addAvg_16x32_neon); ++ p.pu[LUMA_16x64].addAvg[ALIGNED] = PFX(addAvg_16x64_neon); ++ p.pu[LUMA_24x32].addAvg[ALIGNED] = PFX(addAvg_24x32_neon); ++ p.pu[LUMA_32x8].addAvg[ALIGNED] = PFX(addAvg_32x8_neon); ++ p.pu[LUMA_32x16].addAvg[ALIGNED] = PFX(addAvg_32x16_neon); ++ p.pu[LUMA_32x24].addAvg[ALIGNED] = PFX(addAvg_32x24_neon); ++ p.pu[LUMA_32x32].addAvg[ALIGNED] = PFX(addAvg_32x32_neon); ++ p.pu[LUMA_32x64].addAvg[ALIGNED] = PFX(addAvg_32x64_neon); ++ p.pu[LUMA_48x64].addAvg[ALIGNED] = PFX(addAvg_48x64_neon); ++ p.pu[LUMA_64x16].addAvg[ALIGNED] = PFX(addAvg_64x16_neon); ++ p.pu[LUMA_64x32].addAvg[ALIGNED] = PFX(addAvg_64x32_neon); ++ p.pu[LUMA_64x48].addAvg[ALIGNED] = PFX(addAvg_64x48_neon); ++ p.pu[LUMA_64x64].addAvg[ALIGNED] = PFX(addAvg_64x64_neon); + + // chroma addAvg +- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x2].addAvg = PFX(addAvg_4x2_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x4].addAvg = PFX(addAvg_4x4_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x8].addAvg = PFX(addAvg_4x8_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x16].addAvg = PFX(addAvg_4x16_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_6x8].addAvg = PFX(addAvg_6x8_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x2].addAvg = PFX(addAvg_8x2_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x4].addAvg = PFX(addAvg_8x4_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x6].addAvg = PFX(addAvg_8x6_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x8].addAvg = PFX(addAvg_8x8_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x16].addAvg = PFX(addAvg_8x16_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x32].addAvg = PFX(addAvg_8x32_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_12x16].addAvg = PFX(addAvg_12x16_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].addAvg = PFX(addAvg_16x4_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x8].addAvg = PFX(addAvg_16x8_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x12].addAvg = PFX(addAvg_16x12_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x16].addAvg = PFX(addAvg_16x16_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x32].addAvg = PFX(addAvg_16x32_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].addAvg = PFX(addAvg_24x32_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x8].addAvg = PFX(addAvg_32x8_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x16].addAvg = PFX(addAvg_32x16_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x24].addAvg = PFX(addAvg_32x24_neon); +- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x32].addAvg = PFX(addAvg_32x32_neon); +- +- p.chroma[X265_CSP_I422].pu[CHROMA_422_4x8].addAvg = PFX(addAvg_4x8_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_4x16].addAvg = PFX(addAvg_4x16_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_4x32].addAvg = PFX(addAvg_4x32_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_6x16].addAvg = PFX(addAvg_6x16_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x4].addAvg = PFX(addAvg_8x4_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x8].addAvg = PFX(addAvg_8x8_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x12].addAvg = PFX(addAvg_8x12_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x16].addAvg = PFX(addAvg_8x16_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x32].addAvg = PFX(addAvg_8x32_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x64].addAvg = PFX(addAvg_8x64_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_12x32].addAvg = PFX(addAvg_12x32_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x8].addAvg = PFX(addAvg_16x8_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x16].addAvg = PFX(addAvg_16x16_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x24].addAvg = PFX(addAvg_16x24_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x32].addAvg = PFX(addAvg_16x32_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x64].addAvg = PFX(addAvg_16x64_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_24x64].addAvg = PFX(addAvg_24x64_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x16].addAvg = PFX(addAvg_32x16_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x32].addAvg = PFX(addAvg_32x32_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x48].addAvg = PFX(addAvg_32x48_neon); +- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x64].addAvg = PFX(addAvg_32x64_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x2].addAvg[ALIGNED] = PFX(addAvg_4x2_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x4].addAvg[ALIGNED] = PFX(addAvg_4x4_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x8].addAvg[ALIGNED] = PFX(addAvg_4x8_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x16].addAvg[ALIGNED] = PFX(addAvg_4x16_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_6x8].addAvg[ALIGNED] = PFX(addAvg_6x8_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x2].addAvg[ALIGNED] = PFX(addAvg_8x2_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x4].addAvg[ALIGNED] = PFX(addAvg_8x4_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x6].addAvg[ALIGNED] = PFX(addAvg_8x6_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x8].addAvg[ALIGNED] = PFX(addAvg_8x8_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x16].addAvg[ALIGNED] = PFX(addAvg_8x16_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x32].addAvg[ALIGNED] = PFX(addAvg_8x32_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_12x16].addAvg[ALIGNED] = PFX(addAvg_12x16_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].addAvg[ALIGNED] = PFX(addAvg_16x4_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x8].addAvg[ALIGNED] = PFX(addAvg_16x8_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x12].addAvg[ALIGNED] = PFX(addAvg_16x12_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x16].addAvg[ALIGNED] = PFX(addAvg_16x16_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x32].addAvg[ALIGNED] = PFX(addAvg_16x32_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].addAvg[ALIGNED] = PFX(addAvg_24x32_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x8].addAvg[ALIGNED] = PFX(addAvg_32x8_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x16].addAvg[ALIGNED] = PFX(addAvg_32x16_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x24].addAvg[ALIGNED] = PFX(addAvg_32x24_neon); ++ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x32].addAvg[ALIGNED] = PFX(addAvg_32x32_neon); ++ ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_4x8].addAvg[ALIGNED] = PFX(addAvg_4x8_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_4x16].addAvg[ALIGNED] = PFX(addAvg_4x16_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_4x32].addAvg[ALIGNED] = PFX(addAvg_4x32_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_6x16].addAvg[ALIGNED] = PFX(addAvg_6x16_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x4].addAvg[ALIGNED] = PFX(addAvg_8x4_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x8].addAvg[ALIGNED] = PFX(addAvg_8x8_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x12].addAvg[ALIGNED] = PFX(addAvg_8x12_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x16].addAvg[ALIGNED] = PFX(addAvg_8x16_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x32].addAvg[ALIGNED] = PFX(addAvg_8x32_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x64].addAvg[ALIGNED] = PFX(addAvg_8x64_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_12x32].addAvg[ALIGNED] = PFX(addAvg_12x32_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x8].addAvg[ALIGNED] = PFX(addAvg_16x8_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x16].addAvg[ALIGNED] = PFX(addAvg_16x16_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x24].addAvg[ALIGNED] = PFX(addAvg_16x24_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x32].addAvg[ALIGNED] = PFX(addAvg_16x32_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x64].addAvg[ALIGNED] = PFX(addAvg_16x64_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_24x64].addAvg[ALIGNED] = PFX(addAvg_24x64_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x16].addAvg[ALIGNED] = PFX(addAvg_32x16_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x32].addAvg[ALIGNED] = PFX(addAvg_32x32_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x48].addAvg[ALIGNED] = PFX(addAvg_32x48_neon); ++ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x64].addAvg[ALIGNED] = PFX(addAvg_32x64_neon); + + // quant + p.quant = PFX(quant_neon); +@@ -402,7 +402,7 @@ void setupAssemblyPrimitives(EncoderPrim + p.scale2D_64to32 = PFX(scale2D_64to32_neon); + + // scale1D_128to64 +- p.scale1D_128to64 = PFX(scale1D_128to64_neon); ++ p.scale1D_128to64[ALIGNED] = PFX(scale1D_128to64_neon); + + // copy_count + p.cu[BLOCK_4x4].copy_cnt = PFX(copy_cnt_4_neon); +@@ -411,37 +411,37 @@ void setupAssemblyPrimitives(EncoderPrim + p.cu[BLOCK_32x32].copy_cnt = PFX(copy_cnt_32_neon); + + // filterPixelToShort +- p.pu[LUMA_4x4].convert_p2s = PFX(filterPixelToShort_4x4_neon); +- p.pu[LUMA_4x8].convert_p2s = PFX(filterPixelToShort_4x8_neon); +- p.pu[LUMA_4x16].convert_p2s = PFX(filterPixelToShort_4x16_neon); +- p.pu[LUMA_8x4].convert_p2s = PFX(filterPixelToShort_8x4_neon); +- p.pu[LUMA_8x8].convert_p2s = PFX(filterPixelToShort_8x8_neon); +- p.pu[LUMA_8x16].convert_p2s = PFX(filterPixelToShort_8x16_neon); +- p.pu[LUMA_8x32].convert_p2s = PFX(filterPixelToShort_8x32_neon); +- p.pu[LUMA_12x16].convert_p2s = PFX(filterPixelToShort_12x16_neon); +- p.pu[LUMA_16x4].convert_p2s = PFX(filterPixelToShort_16x4_neon); +- p.pu[LUMA_16x8].convert_p2s = PFX(filterPixelToShort_16x8_neon); +- p.pu[LUMA_16x12].convert_p2s = PFX(filterPixelToShort_16x12_neon); +- p.pu[LUMA_16x16].convert_p2s = PFX(filterPixelToShort_16x16_neon); +- p.pu[LUMA_16x32].convert_p2s = PFX(filterPixelToShort_16x32_neon); +- p.pu[LUMA_16x64].convert_p2s = PFX(filterPixelToShort_16x64_neon); +- p.pu[LUMA_24x32].convert_p2s = PFX(filterPixelToShort_24x32_neon); +- p.pu[LUMA_32x8].convert_p2s = PFX(filterPixelToShort_32x8_neon); +- p.pu[LUMA_32x16].convert_p2s = PFX(filterPixelToShort_32x16_neon); +- p.pu[LUMA_32x24].convert_p2s = PFX(filterPixelToShort_32x24_neon); +- p.pu[LUMA_32x32].convert_p2s = PFX(filterPixelToShort_32x32_neon); +- p.pu[LUMA_32x64].convert_p2s = PFX(filterPixelToShort_32x64_neon); +- p.pu[LUMA_48x64].convert_p2s = PFX(filterPixelToShort_48x64_neon); +- p.pu[LUMA_64x16].convert_p2s = PFX(filterPixelToShort_64x16_neon); +- p.pu[LUMA_64x32].convert_p2s = PFX(filterPixelToShort_64x32_neon); +- p.pu[LUMA_64x48].convert_p2s = PFX(filterPixelToShort_64x48_neon); +- p.pu[LUMA_64x64].convert_p2s = PFX(filterPixelToShort_64x64_neon); ++ p.pu[LUMA_4x4].convert_p2s[ALIGNED] = PFX(filterPixelToShort_4x4_neon); ++ p.pu[LUMA_4x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_4x8_neon); ++ p.pu[LUMA_4x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_4x16_neon); ++ p.pu[LUMA_8x4].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x4_neon); ++ p.pu[LUMA_8x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x8_neon); ++ p.pu[LUMA_8x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x16_neon); ++ p.pu[LUMA_8x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x32_neon); ++ p.pu[LUMA_12x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_12x16_neon); ++ p.pu[LUMA_16x4].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x4_neon); ++ p.pu[LUMA_16x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x8_neon); ++ p.pu[LUMA_16x12].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x12_neon); ++ p.pu[LUMA_16x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x16_neon); ++ p.pu[LUMA_16x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x32_neon); ++ p.pu[LUMA_16x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x64_neon); ++ p.pu[LUMA_24x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_24x32_neon); ++ p.pu[LUMA_32x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x8_neon); ++ p.pu[LUMA_32x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x16_neon); ++ p.pu[LUMA_32x24].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x24_neon); ++ p.pu[LUMA_32x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x32_neon); ++ p.pu[LUMA_32x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x64_neon); ++ p.pu[LUMA_48x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_48x64_neon); ++ p.pu[LUMA_64x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x16_neon); ++ p.pu[LUMA_64x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x32_neon); ++ p.pu[LUMA_64x48].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x48_neon); ++ p.pu[LUMA_64x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x64_neon); + + // Block_fill +- p.cu[BLOCK_4x4].blockfill_s = PFX(blockfill_s_4x4_neon); +- p.cu[BLOCK_8x8].blockfill_s = PFX(blockfill_s_8x8_neon); +- p.cu[BLOCK_16x16].blockfill_s = PFX(blockfill_s_16x16_neon); +- p.cu[BLOCK_32x32].blockfill_s = PFX(blockfill_s_32x32_neon); ++ p.cu[BLOCK_4x4].blockfill_s[ALIGNED] = PFX(blockfill_s_4x4_neon); ++ p.cu[BLOCK_8x8].blockfill_s[ALIGNED] = PFX(blockfill_s_8x8_neon); ++ p.cu[BLOCK_16x16].blockfill_s[ALIGNED] = PFX(blockfill_s_16x16_neon); ++ p.cu[BLOCK_32x32].blockfill_s[ALIGNED] = PFX(blockfill_s_32x32_neon); + + // Blockcopy_ss + p.cu[BLOCK_4x4].copy_ss = PFX(blockcopy_ss_4x4_neon); +@@ -495,21 +495,21 @@ void setupAssemblyPrimitives(EncoderPrim + p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].copy_sp = PFX(blockcopy_sp_32x64_neon); + + // pixel_add_ps +- p.cu[BLOCK_4x4].add_ps = PFX(pixel_add_ps_4x4_neon); +- p.cu[BLOCK_8x8].add_ps = PFX(pixel_add_ps_8x8_neon); +- p.cu[BLOCK_16x16].add_ps = PFX(pixel_add_ps_16x16_neon); +- p.cu[BLOCK_32x32].add_ps = PFX(pixel_add_ps_32x32_neon); +- p.cu[BLOCK_64x64].add_ps = PFX(pixel_add_ps_64x64_neon); ++ p.cu[BLOCK_4x4].add_ps[ALIGNED] = PFX(pixel_add_ps_4x4_neon); ++ p.cu[BLOCK_8x8].add_ps[ALIGNED] = PFX(pixel_add_ps_8x8_neon); ++ p.cu[BLOCK_16x16].add_ps[ALIGNED] = PFX(pixel_add_ps_16x16_neon); ++ p.cu[BLOCK_32x32].add_ps[ALIGNED] = PFX(pixel_add_ps_32x32_neon); ++ p.cu[BLOCK_64x64].add_ps[ALIGNED] = PFX(pixel_add_ps_64x64_neon); + + // chroma add_ps +- p.chroma[X265_CSP_I420].cu[BLOCK_420_4x4].add_ps = PFX(pixel_add_ps_4x4_neon); +- p.chroma[X265_CSP_I420].cu[BLOCK_420_8x8].add_ps = PFX(pixel_add_ps_8x8_neon); +- p.chroma[X265_CSP_I420].cu[BLOCK_420_16x16].add_ps = PFX(pixel_add_ps_16x16_neon); +- p.chroma[X265_CSP_I420].cu[BLOCK_420_32x32].add_ps = PFX(pixel_add_ps_32x32_neon); +- p.chroma[X265_CSP_I422].cu[BLOCK_422_4x8].add_ps = PFX(pixel_add_ps_4x8_neon); +- p.chroma[X265_CSP_I422].cu[BLOCK_422_8x16].add_ps = PFX(pixel_add_ps_8x16_neon); +- p.chroma[X265_CSP_I422].cu[BLOCK_422_16x32].add_ps = PFX(pixel_add_ps_16x32_neon); +- p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].add_ps = PFX(pixel_add_ps_32x64_neon); ++ p.chroma[X265_CSP_I420].cu[BLOCK_420_4x4].add_ps[ALIGNED] = PFX(pixel_add_ps_4x4_neon); ++ p.chroma[X265_CSP_I420].cu[BLOCK_420_8x8].add_ps[ALIGNED] = PFX(pixel_add_ps_8x8_neon); ++ p.chroma[X265_CSP_I420].cu[BLOCK_420_16x16].add_ps[ALIGNED] = PFX(pixel_add_ps_16x16_neon); ++ p.chroma[X265_CSP_I420].cu[BLOCK_420_32x32].add_ps[ALIGNED] = PFX(pixel_add_ps_32x32_neon); ++ p.chroma[X265_CSP_I422].cu[BLOCK_422_4x8].add_ps[ALIGNED] = PFX(pixel_add_ps_4x8_neon); ++ p.chroma[X265_CSP_I422].cu[BLOCK_422_8x16].add_ps[ALIGNED] = PFX(pixel_add_ps_8x16_neon); ++ p.chroma[X265_CSP_I422].cu[BLOCK_422_16x32].add_ps[ALIGNED] = PFX(pixel_add_ps_16x32_neon); ++ p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].add_ps[ALIGNED] = PFX(pixel_add_ps_32x64_neon); + + // cpy2Dto1D_shr + p.cu[BLOCK_4x4].cpy2Dto1D_shr = PFX(cpy2Dto1D_shr_4x4_neon); +@@ -518,10 +518,10 @@ void setupAssemblyPrimitives(EncoderPrim + p.cu[BLOCK_32x32].cpy2Dto1D_shr = PFX(cpy2Dto1D_shr_32x32_neon); + + // ssd_s +- p.cu[BLOCK_4x4].ssd_s = PFX(pixel_ssd_s_4x4_neon); +- p.cu[BLOCK_8x8].ssd_s = PFX(pixel_ssd_s_8x8_neon); +- p.cu[BLOCK_16x16].ssd_s = PFX(pixel_ssd_s_16x16_neon); +- p.cu[BLOCK_32x32].ssd_s = PFX(pixel_ssd_s_32x32_neon); ++ p.cu[BLOCK_4x4].ssd_s[ALIGNED] = PFX(pixel_ssd_s_4x4_neon); ++ p.cu[BLOCK_8x8].ssd_s[ALIGNED] = PFX(pixel_ssd_s_8x8_neon); ++ p.cu[BLOCK_16x16].ssd_s[ALIGNED] = PFX(pixel_ssd_s_16x16_neon); ++ p.cu[BLOCK_32x32].ssd_s[ALIGNED] = PFX(pixel_ssd_s_32x32_neon); + + // sse_ss + p.cu[BLOCK_4x4].sse_ss = PFX(pixel_sse_ss_4x4_neon); +@@ -548,10 +548,10 @@ void setupAssemblyPrimitives(EncoderPrim + p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].sub_ps = PFX(pixel_sub_ps_32x64_neon); + + // calc_Residual +- p.cu[BLOCK_4x4].calcresidual = PFX(getResidual4_neon); +- p.cu[BLOCK_8x8].calcresidual = PFX(getResidual8_neon); +- p.cu[BLOCK_16x16].calcresidual = PFX(getResidual16_neon); +- p.cu[BLOCK_32x32].calcresidual = PFX(getResidual32_neon); ++ p.cu[BLOCK_4x4].calcresidual[ALIGNED] = PFX(getResidual4_neon); ++ p.cu[BLOCK_8x8].calcresidual[ALIGNED] = PFX(getResidual8_neon); ++ p.cu[BLOCK_16x16].calcresidual[ALIGNED] = PFX(getResidual16_neon); ++ p.cu[BLOCK_32x32].calcresidual[ALIGNED] = PFX(getResidual32_neon); + + // sse_pp + p.cu[BLOCK_4x4].sse_pp = PFX(pixel_sse_pp_4x4_neon); +@@ -722,31 +722,31 @@ void setupAssemblyPrimitives(EncoderPrim + p.pu[LUMA_64x64].sad_x4 = PFX(sad_x4_64x64_neon); + + // pixel_avg_pp +- p.pu[LUMA_4x4].pixelavg_pp = PFX(pixel_avg_pp_4x4_neon); +- p.pu[LUMA_4x8].pixelavg_pp = PFX(pixel_avg_pp_4x8_neon); +- p.pu[LUMA_4x16].pixelavg_pp = PFX(pixel_avg_pp_4x16_neon); +- p.pu[LUMA_8x4].pixelavg_pp = PFX(pixel_avg_pp_8x4_neon); +- p.pu[LUMA_8x8].pixelavg_pp = PFX(pixel_avg_pp_8x8_neon); +- p.pu[LUMA_8x16].pixelavg_pp = PFX(pixel_avg_pp_8x16_neon); +- p.pu[LUMA_8x32].pixelavg_pp = PFX(pixel_avg_pp_8x32_neon); +- p.pu[LUMA_12x16].pixelavg_pp = PFX(pixel_avg_pp_12x16_neon); +- p.pu[LUMA_16x4].pixelavg_pp = PFX(pixel_avg_pp_16x4_neon); +- p.pu[LUMA_16x8].pixelavg_pp = PFX(pixel_avg_pp_16x8_neon); +- p.pu[LUMA_16x12].pixelavg_pp = PFX(pixel_avg_pp_16x12_neon); +- p.pu[LUMA_16x16].pixelavg_pp = PFX(pixel_avg_pp_16x16_neon); +- p.pu[LUMA_16x32].pixelavg_pp = PFX(pixel_avg_pp_16x32_neon); +- p.pu[LUMA_16x64].pixelavg_pp = PFX(pixel_avg_pp_16x64_neon); +- p.pu[LUMA_24x32].pixelavg_pp = PFX(pixel_avg_pp_24x32_neon); +- p.pu[LUMA_32x8].pixelavg_pp = PFX(pixel_avg_pp_32x8_neon); +- p.pu[LUMA_32x16].pixelavg_pp = PFX(pixel_avg_pp_32x16_neon); +- p.pu[LUMA_32x24].pixelavg_pp = PFX(pixel_avg_pp_32x24_neon); +- p.pu[LUMA_32x32].pixelavg_pp = PFX(pixel_avg_pp_32x32_neon); +- p.pu[LUMA_32x64].pixelavg_pp = PFX(pixel_avg_pp_32x64_neon); +- p.pu[LUMA_48x64].pixelavg_pp = PFX(pixel_avg_pp_48x64_neon); +- p.pu[LUMA_64x16].pixelavg_pp = PFX(pixel_avg_pp_64x16_neon); +- p.pu[LUMA_64x32].pixelavg_pp = PFX(pixel_avg_pp_64x32_neon); +- p.pu[LUMA_64x48].pixelavg_pp = PFX(pixel_avg_pp_64x48_neon); +- p.pu[LUMA_64x64].pixelavg_pp = PFX(pixel_avg_pp_64x64_neon); ++ p.pu[LUMA_4x4].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_4x4_neon); ++ p.pu[LUMA_4x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_4x8_neon); ++ p.pu[LUMA_4x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_4x16_neon); ++ p.pu[LUMA_8x4].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x4_neon); ++ p.pu[LUMA_8x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x8_neon); ++ p.pu[LUMA_8x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x16_neon); ++ p.pu[LUMA_8x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x32_neon); ++ p.pu[LUMA_12x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_12x16_neon); ++ p.pu[LUMA_16x4].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x4_neon); ++ p.pu[LUMA_16x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x8_neon); ++ p.pu[LUMA_16x12].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x12_neon); ++ p.pu[LUMA_16x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x16_neon); ++ p.pu[LUMA_16x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x32_neon); ++ p.pu[LUMA_16x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x64_neon); ++ p.pu[LUMA_24x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_24x32_neon); ++ p.pu[LUMA_32x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x8_neon); ++ p.pu[LUMA_32x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x16_neon); ++ p.pu[LUMA_32x24].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x24_neon); ++ p.pu[LUMA_32x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x32_neon); ++ p.pu[LUMA_32x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x64_neon); ++ p.pu[LUMA_48x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_48x64_neon); ++ p.pu[LUMA_64x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x16_neon); ++ p.pu[LUMA_64x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x32_neon); ++ p.pu[LUMA_64x48].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x48_neon); ++ p.pu[LUMA_64x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x64_neon); + + // planecopy + p.planecopy_cp = PFX(pixel_planecopy_cp_neon); diff --git a/package/x265/Config.in b/package/x265/Config.in new file mode 100644 index 00000000..180931db --- /dev/null +++ b/package/x265/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_X265 + bool "x265" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # dlfcn + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + help + x265 is an open source free software and library for + encoding video using the High Efficiency Video Coding + (HEVC/H.265) standard. x265 is offered under either the GNU + General Public License (GPL) 2 license or a commercial + license, similar to the x264 project. + + https://bitbucket.org/multicoreware/x265/wiki/Home + +if BR2_PACKAGE_X265 + +config BR2_PACKAGE_X265_CLI + bool "CLI" + help + Command-line tool to encode video streams into the + H.265/HEVC compression format. + +endif + +comment "x265 needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 diff --git a/package/x265/x265.hash b/package/x265/x265.hash new file mode 100644 index 00000000..3d70ac0c --- /dev/null +++ b/package/x265/x265.hash @@ -0,0 +1,5 @@ +# From https://mailman.videolan.org/pipermail/x265-devel/2020-February/012880.html +md5 0c8c747b59b5411dea8cf557554636c1 x265_3.3.tar.gz +# Locally generated +sha256 f26e148ed1f4dfb33fd1eb3ff5e60e08078d1b2017e88bcbb045b3fb58300b9c x265_3.3.tar.gz +sha256 d8afb1bcc7a2cfc603683b168d6987ef0a48e59e0da3693bf55c5d33b67e2b49 COPYING diff --git a/package/x265/x265.mk b/package/x265/x265.mk new file mode 100644 index 00000000..872753ee --- /dev/null +++ b/package/x265/x265.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# x265 +# +################################################################################ + +X265_VERSION = 3.3 +X265_SOURCE = x265_$(X265_VERSION).tar.gz +X265_SITE = https://bitbucket.org/multicoreware/x265/downloads +X265_LICENSE = GPL-2.0+ +X265_LICENSE_FILES = COPYING +X265_CPE_ID_VENDOR = multicorewareinc +X265_SUBDIR = source +X265_INSTALL_STAGING = YES +X265_MAKE = $(MAKE1) + +ifeq ($(BR2_i386)$(BR2_x86_64),y) +X265_DEPENDENCIES += host-nasm +endif + +# disable altivec, it has build issues +# https://bitbucket.org/multicoreware/x265/issues/320/ +ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y) +X265_CONF_OPTS += -DENABLE_ALTIVEC=OFF +endif + +ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +X265_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_PIC=ON +else +X265_CONF_OPTS += -DENABLE_SHARED=OFF +endif + +ifeq ($(BR2_PACKAGE_X265_CLI),y) +X265_CONF_OPTS += -DENABLE_CLI=ON +else +X265_CONF_OPTS += -DENABLE_CLI=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/xapian/Config.in b/package/xapian/Config.in new file mode 100644 index 00000000..5d54ed3a --- /dev/null +++ b/package/xapian/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_XAPIAN + bool "xapian" + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_ZLIB + help + Xapian is an open Source search engine Library + It is a highly adaptable toolkit which allows developers + to easily add advanced indexing and search facilities to + their own applications. + It has built-in support for several families of weighting + models and supports a rich set of boolean query operators. + + https://xapian.org/ + +comment "xapian needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/xapian/xapian.hash b/package/xapian/xapian.hash new file mode 100644 index 00000000..192032e6 --- /dev/null +++ b/package/xapian/xapian.hash @@ -0,0 +1,5 @@ +# From https://lists.xapian.org/pipermail/xapian-discuss/2021-January/009856.html +sha256 196ddbb4ad10450100f0991a599e4ed944cbad92e4a6fe813be6dce160244b77 xapian-core-1.4.18.tar.xz + +# locally computed +sha256 c38aee9e3c8c4d5d594ff548a1be05453023016d6286931f6512db215ec1fd42 COPYING diff --git a/package/xapian/xapian.mk b/package/xapian/xapian.mk new file mode 100644 index 00000000..4f40babc --- /dev/null +++ b/package/xapian/xapian.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xapian +# +################################################################################ + +XAPIAN_VERSION = 1.4.18 +XAPIAN_SOURCE = xapian-core-$(XAPIAN_VERSION).tar.xz +XAPIAN_SITE = https://oligarchy.co.uk/xapian/$(XAPIAN_VERSION) +XAPIAN_LICENSE = GPL-2.0+ +XAPIAN_LICENSE_FILES = COPYING +XAPIAN_CPE_ID_VENDOR = xapian +XAPIAN_CPE_ID_PRODUCT = xapian-core +XAPIAN_INSTALL_STAGING = YES +XAPIAN_DEPENDENCIES = zlib + +$(eval $(autotools-package)) diff --git a/package/xavante/Config.in b/package/xavante/Config.in new file mode 100644 index 00000000..209ec2d2 --- /dev/null +++ b/package/xavante/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_XAVANTE + bool "xavante" + select BR2_PACKAGE_COPAS # runtime + select BR2_PACKAGE_LUAFILESYSTEM # runtime + select BR2_PACKAGE_LUASOCKET # runtime + help + Xavante is a Lua HTTP 1.1 Web server that uses a modular + architecture based on URI mapped handlers. Xavante currently + offers a file handler, a redirect handler and a WSAPI handler. + Those are used for general files, URI remapping and WSAPI + applications respectively. + + http://keplerproject.github.io/xavante diff --git a/package/xavante/xavante.hash b/package/xavante/xavante.hash new file mode 100644 index 00000000..b2e8633b --- /dev/null +++ b/package/xavante/xavante.hash @@ -0,0 +1,3 @@ +# computed by luarocks/buildroot +sha256 67c738f981e7d65d18c717f3acac59a37f95d5139c00fb0de5d3167262025273 xavante-2.4.0-1.src.rock +sha256 57b2c50f08bf500c969fe13500f217adb36582e4d8e75c9e2ed04191cb4a045c xavante-2.4.0/doc/us/license.html diff --git a/package/xavante/xavante.mk b/package/xavante/xavante.mk new file mode 100644 index 00000000..d962e7bc --- /dev/null +++ b/package/xavante/xavante.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# xavante +# +################################################################################ + +XAVANTE_VERSION = 2.4.0-1 +XAVANTE_LICENSE = MIT +XAVANTE_LICENSE_FILES = $(XAVANTE_SUBDIR)/doc/us/license.html + +$(eval $(luarocks-package)) diff --git a/package/xdg-dbus-proxy/0001-Fix-musl-compilation-by-adding-TEMP_FAILURE_RETRY.patch b/package/xdg-dbus-proxy/0001-Fix-musl-compilation-by-adding-TEMP_FAILURE_RETRY.patch new file mode 100644 index 00000000..e531f589 --- /dev/null +++ b/package/xdg-dbus-proxy/0001-Fix-musl-compilation-by-adding-TEMP_FAILURE_RETRY.patch @@ -0,0 +1,36 @@ +From 645c45f0334bb1d6e31b5927cece5e446f129cbb Mon Sep 17 00:00:00 2001 +From: Danilo Spinella +Date: Sat, 7 Dec 2019 00:05:21 +0100 +Subject: [PATCH] Fix musl compilation by adding TEMP_FAILURE_RETRY + +Fetch from: https://github.com/flatpak/xdg-dbus-proxy/pull/13 +Upstream-Status: Accepted +Signed-off-by: Adrian Perez de Castro + +--- + dbus-proxy.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/dbus-proxy.c b/dbus-proxy.c +index 163df21..4b07931 100644 +--- a/dbus-proxy.c ++++ b/dbus-proxy.c +@@ -30,6 +30,15 @@ + #include + + #include "flatpak-proxy.h" ++// Taken from glibc unistd.h ++#ifndef TEMP_FAILURE_RETRY ++# define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif + + static const char *argv0; + static GList *proxies; +-- +2.24.1 + diff --git a/package/xdg-dbus-proxy/Config.in b/package/xdg-dbus-proxy/Config.in new file mode 100644 index 00000000..94c144fa --- /dev/null +++ b/package/xdg-dbus-proxy/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XDG_DBUS_PROXY + bool "xdg-dbus-proxy" + depends on BR2_USE_WCHAR # libglib2 -> gettext + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_LIBGLIB2 + help + Filtering proxy for D-Bus connections. + + https://github.com/flatpak/xdg-dbus-proxy + +comment "xdg-dbus-proxy needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/xdg-dbus-proxy/xdg-dbus-proxy.hash b/package/xdg-dbus-proxy/xdg-dbus-proxy.hash new file mode 100644 index 00000000..37bda784 --- /dev/null +++ b/package/xdg-dbus-proxy/xdg-dbus-proxy.hash @@ -0,0 +1,5 @@ +# From https://github.com/flatpak/xdg-dbus-proxy/releases/tag/0.1.2 +sha256 1749d6f9f46dcc9edc87725641cf56cf91dcad1b01707891ea0850c1000c520f xdg-dbus-proxy-0.1.2.tar.xz + +# Hash for license files: +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING diff --git a/package/xdg-dbus-proxy/xdg-dbus-proxy.mk b/package/xdg-dbus-proxy/xdg-dbus-proxy.mk new file mode 100644 index 00000000..1b056c36 --- /dev/null +++ b/package/xdg-dbus-proxy/xdg-dbus-proxy.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# bubblewrap +# +################################################################################ + +XDG_DBUS_PROXY_VERSION = 0.1.2 +XDG_DBUS_PROXY_SITE = https://github.com/flatpak/xdg-dbus-proxy/releases/download/$(XDG_DBUS_PROXY_VERSION) +XDG_DBUS_PROXY_SOURCE = xdg-dbus-proxy-$(XDG_DBUS_PROXY_VERSION).tar.xz +XDG_DBUS_PROXY_DEPENDENCIES = host-pkgconf libglib2 + +XDG_DBUS_PROXY_LICENSE = LGPL-2.1+ +XDG_DBUS_PROXY_LICENSE_FILES = COPYING + +XDG_DBUS_PROXY_CONF_OPTS = --disable-man + +$(eval $(autotools-package)) diff --git a/package/xdotool/Config.in b/package/xdotool/Config.in new file mode 100644 index 00000000..4fb8a495 --- /dev/null +++ b/package/xdotool/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_XDOTOOL + bool "xdotool" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXTST + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_XLIB_LIBX11 + help + Command-line X11 automation tool + + http://www.semicomplete.com/projects/xdotool diff --git a/package/xdotool/xdotool.hash b/package/xdotool/xdotool.hash new file mode 100644 index 00000000..b0d5a758 --- /dev/null +++ b/package/xdotool/xdotool.hash @@ -0,0 +1,3 @@ +# locally computed hash +sha256 ddafca1239075c203769c17a5a184587731e56fbe0438c09d08f8af1704e117a xdotool-3.20160805.1.tar.gz +sha256 129d156c35b1cb19350f3716129173c8c89e019c0497d9df073db5b801becef2 COPYRIGHT diff --git a/package/xdotool/xdotool.mk b/package/xdotool/xdotool.mk new file mode 100644 index 00000000..5c5603bd --- /dev/null +++ b/package/xdotool/xdotool.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# xdotool +# +################################################################################ + +XDOTOOL_VERSION = 3.20160805.1 +XDOTOOL_SITE = $(call github,jordansissel,xdotool,v$(XDOTOOL_VERSION)) +XDOTOOL_LICENSE = BSD-3-Clause +XDOTOOL_LICENSE_FILES = COPYRIGHT +XDOTOOL_DEPENDENCIES = xlib_libXtst xlib_libXinerama libxkbcommon xlib_libX11 + +define XDOTOOL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +# Avoid 'install' target to skip 'post-install' which runs ldconfig on host +define XDOTOOL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + pre-install installlib installprog installheader \ + PREFIX="$(TARGET_DIR)/usr" +endef + +$(eval $(generic-package)) diff --git a/package/xen/0001-9pfs-include-linux-limits.h-for-XATTR_SIZE_MAX.patch b/package/xen/0001-9pfs-include-linux-limits.h-for-XATTR_SIZE_MAX.patch new file mode 100644 index 00000000..b681b941 --- /dev/null +++ b/package/xen/0001-9pfs-include-linux-limits.h-for-XATTR_SIZE_MAX.patch @@ -0,0 +1,43 @@ +Message-Id: <07010a2ad79559c412949f0005dbe3cb03d8416e.1498504812.git.ps@pks.im> +From: Patrick Steinhardt +Date: Mon, 26 Jun 2017 21:20:45 +0200 +Subject: [PATCH] 9pfs: include for XATTR_SIZE_MAX + +The function `v9fs_xattrcreate` makes use of the define `XATTR_SIZE_MAX` +to reject attempts of creating xattrs with an invalid size, which is +defined in . On glibc-based systems, this header is +indirectly included via , , +, but on other platforms this is not guaranteed due +to not being part of the POSIX standard. One examples are systems based +on musl libc, which do not include the indirectly, +which leads to `XATTR_SIZE_MAX` being undefined. + +Fix this error by directly include . As the 9P fs code +is being Linux-based either way, we can simply do so without breaking +other platforms. This enables building 9pfs on musl-based systems. + +Signed-off-by: Patrick Steinhardt +[ Changes by AF + - Apply to the QEMU tree inside of Xen +] +Signed-off-by: Alistair Francis +--- +Upstream Status: Pending review and acceptance + + tools/qemu-xen/hw/9pfs/9p.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/qemu-xen/hw/9pfs/9p.c b/tools/qemu-xen/hw/9pfs/9p.c +index 96d2683348..48cd558e96 100644 +--- a/tools/qemu-xen/hw/9pfs/9p.c ++++ b/tools/qemu-xen/hw/9pfs/9p.c +@@ -13,6 +13,7 @@ + + #include "qemu/osdep.h" + #include ++#include + #include "hw/virtio/virtio.h" + #include "qapi/error.h" + #include "qemu/error-report.h" +-- +2.13.2 diff --git a/package/xen/Config.in b/package/xen/Config.in new file mode 100644 index 00000000..af6acd35 --- /dev/null +++ b/package/xen/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_XEN + bool "xen" + # needs "dmb" on ARM, so ARM >= v7 + depends on BR2_ARM_CPU_ARMV7A || BR2_aarch64 + select BR2_PACKAGE_XEN_HYPERVISOR if !BR2_PACKAGE_XEN_TOOLS + help + This package builds the Xen hypervisor and toolstack. + + http://www.xenproject.org/ + +if BR2_PACKAGE_XEN + +config BR2_PACKAGE_XEN_HYPERVISOR + bool "Xen hypervisor" + help + The Xen binaries are avaliable in /usr/lib/xen/ See + http://wiki.xenproject.org/wiki/Getting_Started for using + the Xen hypervisor. + +config BR2_PACKAGE_XEN_TOOLS + bool "Xen tools" + depends on !BR2_STATIC_LIBS # dtc (libfdt) + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_WCHAR # libglib2 + select BR2_PACKAGE_DTC + select BR2_PACKAGE_LIBAIO + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_SLIRP + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_YAJL + select BR2_PACKAGE_ARGP_STANDALONE if !BR2_TOOLCHAIN_USES_GLIBC + help + The Xen tools can be accessed by the xl command. + +comment "xen tools need a toolchain w/ wchar, threads, dynamic library" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS + +endif diff --git a/package/xen/xen.hash b/package/xen/xen.hash new file mode 100644 index 00000000..fd0310c9 --- /dev/null +++ b/package/xen/xen.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 e35099a963070e3c9f425d1e36cbb1c40b7874ef449bfafd6688343783cb25ad xen-4.14.2.tar.gz +sha256 ecca9538e9d3f7e3c2bff827502f4495e2ef9e22c451298696ea08886b176c2c COPYING diff --git a/package/xen/xen.mk b/package/xen/xen.mk new file mode 100644 index 00000000..b84214ed --- /dev/null +++ b/package/xen/xen.mk @@ -0,0 +1,65 @@ +################################################################################ +# +# Xen +# +################################################################################ + +XEN_VERSION = 4.14.2 +XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION) +XEN_LICENSE = GPL-2.0 +XEN_LICENSE_FILES = COPYING +XEN_CPE_ID_VENDOR = xen +XEN_CPE_ID_PREFIX = cpe:2.3:o +XEN_DEPENDENCIES = host-acpica host-python3 + +# Calculate XEN_ARCH +ifeq ($(ARCH),aarch64) +XEN_ARCH = arm64 +else ifeq ($(ARCH),arm) +XEN_ARCH = arm32 +endif + +XEN_CONF_OPTS = \ + --disable-golang \ + --disable-ocamltools \ + --with-initddir=/etc/init.d + +XEN_CONF_ENV = PYTHON=$(HOST_DIR)/bin/python3 +XEN_MAKE_ENV = \ + XEN_TARGET_ARCH=$(XEN_ARCH) \ + CROSS_COMPILE=$(TARGET_CROSS) \ + HOST_EXTRACFLAGS="-Wno-error" \ + XEN_HAS_CHECKPOLICY=n \ + $(TARGET_CONFIGURE_OPTS) + +ifeq ($(BR2_PACKAGE_XEN_HYPERVISOR),y) +XEN_MAKE_OPTS += dist-xen +XEN_INSTALL_IMAGES = YES +define XEN_INSTALL_IMAGES_CMDS + cp $(@D)/xen/xen $(BINARIES_DIR) +endef +else +XEN_CONF_OPTS += --disable-xen +endif + +ifeq ($(BR2_PACKAGE_XEN_TOOLS),y) +XEN_DEPENDENCIES += \ + dtc libaio libglib2 ncurses openssl pixman slirp util-linux yajl +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y) +XEN_DEPENDENCIES += argp-standalone +endif +XEN_INSTALL_TARGET_OPTS += DESTDIR=$(TARGET_DIR) install-tools +XEN_MAKE_OPTS += dist-tools +XEN_CONF_OPTS += --with-extra-qemuu-configure-args="--disable-sdl --disable-opengl" + +define XEN_INSTALL_INIT_SYSV + mv $(TARGET_DIR)/etc/init.d/xencommons $(TARGET_DIR)/etc/init.d/S50xencommons + mv $(TARGET_DIR)/etc/init.d/xen-watchdog $(TARGET_DIR)/etc/init.d/S50xen-watchdog + mv $(TARGET_DIR)/etc/init.d/xendomains $(TARGET_DIR)/etc/init.d/S60xendomains +endef +else +XEN_INSTALL_TARGET = NO +XEN_CONF_OPTS += --disable-tools +endif + +$(eval $(autotools-package)) diff --git a/package/xenomai/3.0.10/0001-lib-boilerplate-iniparser-Allow-building-with-GCC-10-2-2020101.patch b/package/xenomai/3.0.10/0001-lib-boilerplate-iniparser-Allow-building-with-GCC-10-2-2020101.patch new file mode 100644 index 00000000..e4addea8 --- /dev/null +++ b/package/xenomai/3.0.10/0001-lib-boilerplate-iniparser-Allow-building-with-GCC-10-2-2020101.patch @@ -0,0 +1,1721 @@ +From 8acdbd718b7828b5d8903a6254b2fa198b866491 Mon Sep 17 00:00:00 2001 +From: Florian Bezdeka +Date: Thu, 12 Nov 2020 11:45:28 +0000 +Subject: [PATCH] lib/boilerplate/iniparser: Allow building with GCC 10.2 + 2020101 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Updating to upstream revision f858275f7f307eecba84c2f5429483f9f28007f8. +Upstream repository is located at [1]. + +The reason for updating was the following compiler error when trying +to compile with GCC 10.2 10.2.1 20201016. As it turned out the problem +was already addressed upstream: + +iniparser/iniparser.c: In function ‘iniparser_load’: +iniparser/iniparser.c:616:13: error: ‘sprintf’ arguments 3, 4 may +overlap destination object ‘buf’ [-Werror=restrict] + 616 | sprintf(tmp, "%s:%s", section, key); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +I reviewed especially the API changes. Most of them are cleanups only +but two things should be pointed out: + + - The type of the size field of struct _dictionary_ changed from int + to ssize_t. The only user of this struct is + lib/analogy/calibration.c which uses this structure for internal + things only. It is never exposed to any public API so updating is + OK and fully backward compatible. + + - dictionary_new changed its signature + from dictionary_new(int size) + to dictionary_new(size_t size). + This function is not part of any public API. So updating does not + break backward compatibility. + +[1] https://github.com/ndevilla/iniparser + +Signed-off-by: Florian Bezdeka +Signed-off-by: Jan Kiszka + +[Retrieved from: +https://gitlab.denx.de/Xenomai/xenomai/-/commit/8acdbd718b7828b5d8903a6254b2fa198b866491] +Signed-off-by: Fabrice Fontaine +--- + lib/boilerplate/iniparser/dictionary.c | 409 ++++++++++---------- + lib/boilerplate/iniparser/dictionary.h | 43 ++- + lib/boilerplate/iniparser/iniparser.c | 491 +++++++++++++++++-------- + lib/boilerplate/iniparser/iniparser.h | 131 +++++-- + 4 files changed, 646 insertions(+), 428 deletions(-) + +diff --git a/lib/boilerplate/iniparser/dictionary.c b/lib/boilerplate/iniparser/dictionary.c +index 5299b77ed..cb7ccd49e 100644 +--- a/lib/boilerplate/iniparser/dictionary.c ++++ b/lib/boilerplate/iniparser/dictionary.c +@@ -1,10 +1,8 @@ + /*-------------------------------------------------------------------------*/ + /** +- @file dictionary.c +- @author N. Devillard +- @date Sep 2007 +- @version $Revision: 1.27 $ +- @brief Implements a dictionary for string variables. ++ @file dictionary.c ++ @author N. Devillard ++ @brief Implements a dictionary for string variables. + + This module implements a simple dictionary object, i.e. a list + of string/string associations. This object is useful to store e.g. +@@ -12,12 +10,8 @@ + */ + /*--------------------------------------------------------------------------*/ + +-/* +- $Id: dictionary.c,v 1.27 2007-11-23 21:39:18 ndevilla Exp $ +- $Revision: 1.27 $ +-*/ + /*--------------------------------------------------------------------------- +- Includes ++ Includes + ---------------------------------------------------------------------------*/ + #include "dictionary.h" + +@@ -27,33 +21,18 @@ + #include + + /** Maximum value size for integers and doubles. */ +-#define MAXVALSZ 1024 ++#define MAXVALSZ 1024 + + /** Minimal allocated number of entries in a dictionary */ +-#define DICTMINSZ 128 ++#define DICTMINSZ 128 + + /** Invalid key token */ + #define DICT_INVALID_KEY ((char*)-1) + + /*--------------------------------------------------------------------------- +- Private functions ++ Private functions + ---------------------------------------------------------------------------*/ + +-/* Doubles the allocated size associated to a pointer */ +-/* 'size' is the current allocated size. */ +-static void * mem_double(void * ptr, int size) +-{ +- void * newptr ; +- +- newptr = calloc(2*size, 1); +- if (newptr==NULL) { +- return NULL ; +- } +- memcpy(newptr, ptr, size); +- free(ptr); +- return newptr ; +-} +- + /*-------------------------------------------------------------------------*/ + /** + @brief Duplicate a string +@@ -67,23 +46,68 @@ static void * mem_double(void * ptr, int size) + static char * xstrdup(const char * s) + { + char * t ; ++ size_t len ; + if (!s) + return NULL ; +- t = malloc(strlen(s)+1) ; ++ ++ len = strlen(s) + 1 ; ++ t = (char*) malloc(len) ; + if (t) { +- strcpy(t,s); ++ memcpy(t, s, len) ; + } + return t ; + } + ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Double the size of the dictionary ++ @param d Dictionary to grow ++ @return This function returns non-zero in case of failure ++ */ ++/*--------------------------------------------------------------------------*/ ++static int dictionary_grow(dictionary * d) ++{ ++ char ** new_val ; ++ char ** new_key ; ++ unsigned * new_hash ; ++ ++ new_val = (char**) calloc(d->size * 2, sizeof *d->val); ++ new_key = (char**) calloc(d->size * 2, sizeof *d->key); ++ new_hash = (unsigned*) calloc(d->size * 2, sizeof *d->hash); ++ if (!new_val || !new_key || !new_hash) { ++ /* An allocation failed, leave the dictionary unchanged */ ++ if (new_val) ++ free(new_val); ++ if (new_key) ++ free(new_key); ++ if (new_hash) ++ free(new_hash); ++ return -1 ; ++ } ++ /* Initialize the newly allocated space */ ++ memcpy(new_val, d->val, d->size * sizeof(char *)); ++ memcpy(new_key, d->key, d->size * sizeof(char *)); ++ memcpy(new_hash, d->hash, d->size * sizeof(unsigned)); ++ /* Delete previous data */ ++ free(d->val); ++ free(d->key); ++ free(d->hash); ++ /* Actually update the dictionary */ ++ d->size *= 2 ; ++ d->val = new_val; ++ d->key = new_key; ++ d->hash = new_hash; ++ return 0 ; ++} ++ + /*--------------------------------------------------------------------------- +- Function codes ++ Function codes + ---------------------------------------------------------------------------*/ + /*-------------------------------------------------------------------------*/ + /** +- @brief Compute the hash key for a string. +- @param key Character string to use for key. +- @return 1 unsigned int on at least 32 bits. ++ @brief Compute the hash key for a string. ++ @param key Character string to use for key. ++ @return 1 unsigned int on at least 32 bits. + + This hash function has been taken from an Article in Dr Dobbs Journal. + This is normally a collision-free function, distributing keys evenly. +@@ -93,84 +117,88 @@ static char * xstrdup(const char * s) + /*--------------------------------------------------------------------------*/ + unsigned dictionary_hash(const char * key) + { +- int len ; +- unsigned hash ; +- int i ; +- +- len = strlen(key); +- for (hash=0, i=0 ; i>6) ; +- } +- hash += (hash <<3); +- hash ^= (hash >>11); +- hash += (hash <<15); +- return hash ; ++ size_t len ; ++ unsigned hash ; ++ size_t i ; ++ ++ if (!key) ++ return 0 ; ++ ++ len = strlen(key); ++ for (hash=0, i=0 ; i>6) ; ++ } ++ hash += (hash <<3); ++ hash ^= (hash >>11); ++ hash += (hash <<15); ++ return hash ; + } + + /*-------------------------------------------------------------------------*/ + /** +- @brief Create a new dictionary object. +- @param size Optional initial size of the dictionary. +- @return 1 newly allocated dictionary objet. ++ @brief Create a new dictionary object. ++ @param size Optional initial size of the dictionary. ++ @return 1 newly allocated dictionary objet. + + This function allocates a new dictionary object of given size and returns + it. If you do not know in advance (roughly) the number of entries in the + dictionary, give size=0. + */ +-/*--------------------------------------------------------------------------*/ +-dictionary * dictionary_new(int size) ++/*-------------------------------------------------------------------------*/ ++dictionary * dictionary_new(size_t size) + { +- dictionary * d ; +- +- /* If no size was specified, allocate space for DICTMINSZ */ +- if (sizesize = size ; +- d->val = (char **)calloc(size, sizeof(char*)); +- d->key = (char **)calloc(size, sizeof(char*)); +- d->hash = (unsigned int *)calloc(size, sizeof(unsigned)); +- return d ; ++ dictionary * d ; ++ ++ /* If no size was specified, allocate space for DICTMINSZ */ ++ if (sizesize = size ; ++ d->val = (char**) calloc(size, sizeof *d->val); ++ d->key = (char**) calloc(size, sizeof *d->key); ++ d->hash = (unsigned*) calloc(size, sizeof *d->hash); ++ } ++ return d ; + } + + /*-------------------------------------------------------------------------*/ + /** +- @brief Delete a dictionary object +- @param d dictionary object to deallocate. +- @return void ++ @brief Delete a dictionary object ++ @param d dictionary object to deallocate. ++ @return void + + Deallocate a dictionary object and all memory associated to it. + */ + /*--------------------------------------------------------------------------*/ + void dictionary_del(dictionary * d) + { +- int i ; +- +- if (d==NULL) return ; +- for (i=0 ; isize ; i++) { +- if (d->key[i]!=NULL) +- free(d->key[i]); +- if (d->val[i]!=NULL) +- free(d->val[i]); +- } +- free(d->val); +- free(d->key); +- free(d->hash); +- free(d); +- return ; ++ ssize_t i ; ++ ++ if (d==NULL) return ; ++ for (i=0 ; isize ; i++) { ++ if (d->key[i]!=NULL) ++ free(d->key[i]); ++ if (d->val[i]!=NULL) ++ free(d->val[i]); ++ } ++ free(d->val); ++ free(d->key); ++ free(d->hash); ++ free(d); ++ return ; + } + + /*-------------------------------------------------------------------------*/ + /** +- @brief Get a value from a dictionary. +- @param d dictionary object to search. +- @param key Key to look for in the dictionary. ++ @brief Get a value from a dictionary. ++ @param d dictionary object to search. ++ @param key Key to look for in the dictionary. + @param def Default value to return if key not found. +- @return 1 pointer to internally allocated character string. ++ @return 1 pointer to internally allocated character string. + + This function locates a key in a dictionary and returns a pointer to its + value, or the passed 'def' pointer if no such key can be found in +@@ -178,24 +206,24 @@ void dictionary_del(dictionary * d) + dictionary object, you should not try to free it or modify it. + */ + /*--------------------------------------------------------------------------*/ +-const char * dictionary_get(dictionary * d, const char * key, const char * def) ++const char * dictionary_get(const dictionary * d, const char * key, const char * def) + { +- unsigned hash ; +- int i ; ++ unsigned hash ; ++ ssize_t i ; + +- hash = dictionary_hash(key); +- for (i=0 ; isize ; i++) { ++ hash = dictionary_hash(key); ++ for (i=0 ; isize ; i++) { + if (d->key[i]==NULL) + continue ; + /* Compare hash */ +- if (hash==d->hash[i]) { ++ if (hash==d->hash[i]) { + /* Compare string, to avoid hash collisions */ + if (!strcmp(key, d->key[i])) { +- return d->val[i] ; +- } +- } +- } +- return def ; ++ return d->val[i] ; ++ } ++ } ++ } ++ return def ; + } + + /*-------------------------------------------------------------------------*/ +@@ -226,66 +254,57 @@ const char * dictionary_get(dictionary * d, const char * key, const char * def) + /*--------------------------------------------------------------------------*/ + int dictionary_set(dictionary * d, const char * key, const char * val) + { +- int i ; +- unsigned hash ; +- +- if (d==NULL || key==NULL) return -1 ; +- +- /* Compute hash for this key */ +- hash = dictionary_hash(key) ; +- /* Find if value is already in dictionary */ +- if (d->n>0) { +- for (i=0 ; isize ; i++) { ++ ssize_t i ; ++ unsigned hash ; ++ ++ if (d==NULL || key==NULL) return -1 ; ++ ++ /* Compute hash for this key */ ++ hash = dictionary_hash(key) ; ++ /* Find if value is already in dictionary */ ++ if (d->n>0) { ++ for (i=0 ; isize ; i++) { + if (d->key[i]==NULL) + continue ; +- if (hash==d->hash[i]) { /* Same hash value */ +- if (!strcmp(key, d->key[i])) { /* Same key */ +- /* Found a value: modify and return */ +- if (d->val[i]!=NULL) +- free(d->val[i]); +- d->val[i] = val ? xstrdup(val) : NULL ; ++ if (hash==d->hash[i]) { /* Same hash value */ ++ if (!strcmp(key, d->key[i])) { /* Same key */ ++ /* Found a value: modify and return */ ++ if (d->val[i]!=NULL) ++ free(d->val[i]); ++ d->val[i] = (val ? xstrdup(val) : NULL); + /* Value has been modified: return */ +- return 0 ; +- } +- } +- } +- } +- /* Add a new value */ +- /* See if dictionary needs to grow */ +- if (d->n==d->size) { +- +- /* Reached maximum size: reallocate dictionary */ +- d->val = (char **)mem_double(d->val, d->size * sizeof(char*)) ; +- d->key = (char **)mem_double(d->key, d->size * sizeof(char*)) ; +- d->hash = (unsigned int *)mem_double(d->hash, d->size * sizeof(unsigned)) ; +- if ((d->val==NULL) || (d->key==NULL) || (d->hash==NULL)) { +- /* Cannot grow dictionary */ +- return -1 ; ++ return 0 ; ++ } ++ } + } +- /* Double size */ +- d->size *= 2 ; +- } ++ } ++ /* Add a new value */ ++ /* See if dictionary needs to grow */ ++ if (d->n==d->size) { ++ /* Reached maximum size: reallocate dictionary */ ++ if (dictionary_grow(d) != 0) ++ return -1; ++ } + +- /* Insert key in the first empty slot */ +- for (i=0 ; isize ; i++) { +- if (d->key[i]==NULL) { +- /* Add key here */ +- break ; +- } ++ /* Insert key in the first empty slot. Start at d->n and wrap at ++ d->size. Because d->n < d->size this will necessarily ++ terminate. */ ++ for (i=d->n ; d->key[i] ; ) { ++ if(++i == d->size) i = 0; + } +- /* Copy key */ +- d->key[i] = xstrdup(key); +- d->val[i] = val ? xstrdup(val) : NULL ; +- d->hash[i] = hash; +- d->n ++ ; +- return 0 ; ++ /* Copy key */ ++ d->key[i] = xstrdup(key); ++ d->val[i] = (val ? xstrdup(val) : NULL) ; ++ d->hash[i] = hash; ++ d->n ++ ; ++ return 0 ; + } + + /*-------------------------------------------------------------------------*/ + /** +- @brief Delete a key in a dictionary +- @param d dictionary object to modify. +- @param key Key to remove. ++ @brief Delete a key in a dictionary ++ @param d dictionary object to modify. ++ @param key Key to remove. + @return void + + This function deletes a key in a dictionary. Nothing is done if the +@@ -294,26 +313,26 @@ int dictionary_set(dictionary * d, const char * key, const char * val) + /*--------------------------------------------------------------------------*/ + void dictionary_unset(dictionary * d, const char * key) + { +- unsigned hash ; +- int i ; ++ unsigned hash ; ++ ssize_t i ; + +- if (key == NULL) { +- return; +- } ++ if (key == NULL || d == NULL) { ++ return; ++ } + +- hash = dictionary_hash(key); +- for (i=0 ; isize ; i++) { ++ hash = dictionary_hash(key); ++ for (i=0 ; isize ; i++) { + if (d->key[i]==NULL) + continue ; + /* Compare hash */ +- if (hash==d->hash[i]) { ++ if (hash==d->hash[i]) { + /* Compare string, to avoid hash collisions */ + if (!strcmp(key, d->key[i])) { + /* Found key */ + break ; +- } +- } +- } ++ } ++ } ++ } + if (i>=d->size) + /* Key not found */ + return ; +@@ -331,75 +350,31 @@ void dictionary_unset(dictionary * d, const char * key) + + /*-------------------------------------------------------------------------*/ + /** +- @brief Dump a dictionary to an opened file pointer. +- @param d Dictionary to dump +- @param out Opened file pointer. +- @return void ++ @brief Dump a dictionary to an opened file pointer. ++ @param d Dictionary to dump ++ @param f Opened file pointer. ++ @return void + + Dumps a dictionary onto an opened file pointer. Key pairs are printed out + as @c [Key]=[Value], one per line. It is Ok to provide stdout or stderr as + output file pointers. + */ + /*--------------------------------------------------------------------------*/ +-void dictionary_dump(dictionary * d, FILE * out) ++void dictionary_dump(const dictionary * d, FILE * out) + { +- int i ; +- +- if (d==NULL || out==NULL) return ; +- if (d->n<1) { +- fprintf(out, "empty dictionary\n"); +- return ; +- } +- for (i=0 ; isize ; i++) { ++ ssize_t i ; ++ ++ if (d==NULL || out==NULL) return ; ++ if (d->n<1) { ++ fprintf(out, "empty dictionary\n"); ++ return ; ++ } ++ for (i=0 ; isize ; i++) { + if (d->key[i]) { + fprintf(out, "%20s\t[%s]\n", + d->key[i], + d->val[i] ? d->val[i] : "UNDEF"); + } +- } +- return ; +-} +- +- +-/* Test code */ +-#ifdef TESTDIC +-#define NVALS 20000 +-int main(int argc, char *argv[]) +-{ +- dictionary * d ; +- char * val ; +- int i ; +- char cval[90] ; +- +- /* Allocate dictionary */ +- printf("allocating...\n"); +- d = dictionary_new(0); +- +- /* Set values in dictionary */ +- printf("setting %d values...\n", NVALS); +- for (i=0 ; in != 0) { +- printf("error deleting values\n"); + } +- printf("deallocating...\n"); +- dictionary_del(d); +- return 0 ; ++ return ; + } +-#endif +-/* vim: set ts=4 et sw=4 tw=75 */ +diff --git a/lib/boilerplate/iniparser/dictionary.h b/lib/boilerplate/iniparser/dictionary.h +index fa4dcb727..d04b6ce71 100644 +--- a/lib/boilerplate/iniparser/dictionary.h ++++ b/lib/boilerplate/iniparser/dictionary.h +@@ -3,8 +3,6 @@ + /** + @file dictionary.h + @author N. Devillard +- @date Sep 2007 +- @version $Revision: 1.12 $ + @brief Implements a dictionary for string variables. + + This module implements a simple dictionary object, i.e. a list +@@ -13,18 +11,11 @@ + */ + /*--------------------------------------------------------------------------*/ + +-/* +- $Id: dictionary.h,v 1.12 2007-11-23 21:37:00 ndevilla Exp $ +- $Author: ndevilla $ +- $Date: 2007-11-23 21:37:00 $ +- $Revision: 1.12 $ +-*/ +- + #ifndef _DICTIONARY_H_ + #define _DICTIONARY_H_ + + /*--------------------------------------------------------------------------- +- Includes ++ Includes + ---------------------------------------------------------------------------*/ + + #include +@@ -32,14 +23,18 @@ + #include + #include + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + /*--------------------------------------------------------------------------- +- New types ++ New types + ---------------------------------------------------------------------------*/ + + + /*-------------------------------------------------------------------------*/ + /** +- @brief Dictionary object ++ @brief Dictionary object + + This object contains a list of string/string associations. Each + association is identified by a unique string key. Looking up values +@@ -48,16 +43,16 @@ + */ + /*-------------------------------------------------------------------------*/ + typedef struct _dictionary_ { +- int n ; /** Number of entries in dictionary */ +- int size ; /** Storage size */ +- char ** val ; /** List of string values */ +- char ** key ; /** List of string keys */ +- unsigned * hash ; /** List of hash values for keys */ ++ int n ; /** Number of entries in dictionary */ ++ ssize_t size ; /** Storage size */ ++ char ** val ; /** List of string values */ ++ char ** key ; /** List of string keys */ ++ unsigned * hash ; /** List of hash values for keys */ + } dictionary ; + + + /*--------------------------------------------------------------------------- +- Function prototypes ++ Function prototypes + ---------------------------------------------------------------------------*/ + + /*-------------------------------------------------------------------------*/ +@@ -85,7 +80,7 @@ unsigned dictionary_hash(const char * key); + dictionary, give size=0. + */ + /*--------------------------------------------------------------------------*/ +-dictionary * dictionary_new(int size); ++dictionary * dictionary_new(size_t size); + + /*-------------------------------------------------------------------------*/ + /** +@@ -112,7 +107,7 @@ void dictionary_del(dictionary * vd); + dictionary object, you should not try to free it or modify it. + */ + /*--------------------------------------------------------------------------*/ +-const char * dictionary_get(dictionary * d, const char * key, const char * def); ++const char * dictionary_get(const dictionary * d, const char * key, const char * def); + + + /*-------------------------------------------------------------------------*/ +@@ -161,7 +156,7 @@ void dictionary_unset(dictionary * d, const char * key); + /** + @brief Dump a dictionary to an opened file pointer. + @param d Dictionary to dump +- @param out Opened file pointer. ++ @param f Opened file pointer. + @return void + + Dumps a dictionary onto an opened file pointer. Key pairs are printed out +@@ -169,6 +164,10 @@ void dictionary_unset(dictionary * d, const char * key); + output file pointers. + */ + /*--------------------------------------------------------------------------*/ +-void dictionary_dump(dictionary * d, FILE * out); ++void dictionary_dump(const dictionary * d, FILE * out); ++ ++#ifdef __cplusplus ++} ++#endif + + #endif +diff --git a/lib/boilerplate/iniparser/iniparser.c b/lib/boilerplate/iniparser/iniparser.c +index 5b2094a00..f1d165896 100644 +--- a/lib/boilerplate/iniparser/iniparser.c ++++ b/lib/boilerplate/iniparser/iniparser.c +@@ -3,19 +3,12 @@ + /** + @file iniparser.c + @author N. Devillard +- @date Sep 2007 +- @version 3.0 + @brief Parser for ini files. + */ + /*--------------------------------------------------------------------------*/ +-/* +- $Id: iniparser.c,v 2.18 2008-01-03 18:35:39 ndevilla Exp $ +- $Revision: 2.18 $ +- $Date: 2008-01-03 18:35:39 $ +-*/ + /*---------------------------- Includes ------------------------------------*/ + #include +-#include ++#include + #include "iniparser.h" + + /*---------------------------- Defines -------------------------------------*/ +@@ -39,65 +32,115 @@ typedef enum _line_status_ { + + /*-------------------------------------------------------------------------*/ + /** +- @brief Convert a string to lowercase. +- @param s String to convert. +- @return ptr to statically allocated string. +- +- This function returns a pointer to a statically allocated string +- containing a lowercased version of the input string. Do not free +- or modify the returned string! Since the returned string is statically +- allocated, it will be modified at each function call (not re-entrant). ++ @brief Convert a string to lowercase. ++ @param in String to convert. ++ @param out Output buffer. ++ @param len Size of the out buffer. ++ @return ptr to the out buffer or NULL if an error occured. ++ ++ This function convert a string into lowercase. ++ At most len - 1 elements of the input string will be converted. + */ + /*--------------------------------------------------------------------------*/ +- +-static char strbuf[ASCIILINESZ+1]; +- +-static char * strlwc(const char * s) ++static const char * strlwc(const char * in, char *out, unsigned len) + { +- int i ; ++ unsigned i ; + +- if (s==NULL) return NULL ; +- memset(strbuf, 0, ASCIILINESZ+1); ++ if (in==NULL || out == NULL || len==0) return NULL ; + i=0 ; +- while (s[i] && i s) { ++ if (!isspace((int)*(last-1))) ++ break ; ++ last -- ; ++ } ++ *last = (char)0; ++ ++ memmove(dest,s,last - s + 1); ++ return last - s; ++} ++ ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Default error callback for iniparser: wraps `fprintf(stderr, ...)`. ++ */ ++/*--------------------------------------------------------------------------*/ ++static int default_error_callback(const char *format, ...) ++{ ++ int ret; ++ va_list argptr; ++ va_start(argptr, format); ++ ret = vfprintf(stderr, format, argptr); ++ va_end(argptr); ++ return ret; + } + ++static int (*iniparser_error_callback)(const char*, ...) = default_error_callback; ++ + /*-------------------------------------------------------------------------*/ + /** +- @brief Remove blanks at the beginning and the end of a string. +- @param s String to parse. +- @return ptr to statically allocated string. +- +- This function returns a pointer to a statically allocated string, +- which is identical to the input string, except that all blank +- characters at the end and the beg. of the string have been removed. +- Do not free or modify the returned string! Since the returned string +- is statically allocated, it will be modified at each function call +- (not re-entrant). ++ @brief Configure a function to receive the error messages. ++ @param errback Function to call. ++ ++ By default, the error will be printed on stderr. If a null pointer is passed ++ as errback the error callback will be switched back to default. + */ + /*--------------------------------------------------------------------------*/ +-static char * strstrip(const char * s) ++void iniparser_set_error_callback(int (*errback)(const char *, ...)) + { +- char * last ; +- +- if (s==NULL) return NULL ; +- +- while (isspace((int)*s) && *s) s++; +- memset(strbuf, 0, ASCIILINESZ+1); +- strcpy(strbuf, s); +- last = strbuf + strlen(strbuf); +- while (last > strbuf) { +- if (!isspace((int)*(last-1))) +- break ; +- last -- ; +- } +- *last = (char)0; +- return (char*)strbuf ; ++ if (errback) { ++ iniparser_error_callback = errback; ++ } else { ++ iniparser_error_callback = default_error_callback; ++ } + } + + /*-------------------------------------------------------------------------*/ +@@ -118,7 +161,7 @@ static char * strstrip(const char * s) + This function returns -1 in case of error. + */ + /*--------------------------------------------------------------------------*/ +-int iniparser_getnsec(dictionary * d) ++int iniparser_getnsec(const dictionary * d) + { + int i ; + int nsec ; +@@ -149,7 +192,7 @@ int iniparser_getnsec(dictionary * d) + This function returns NULL in case of error. + */ + /*--------------------------------------------------------------------------*/ +-const char * iniparser_getsecname(dictionary * d, int n) ++const char * iniparser_getsecname(const dictionary * d, int n) + { + int i ; + int foundsec ; +@@ -184,7 +227,7 @@ const char * iniparser_getsecname(dictionary * d, int n) + purposes mostly. + */ + /*--------------------------------------------------------------------------*/ +-void iniparser_dump(dictionary * d, FILE * f) ++void iniparser_dump(const dictionary * d, FILE * f) + { + int i ; + +@@ -212,13 +255,11 @@ void iniparser_dump(dictionary * d, FILE * f) + It is Ok to specify @c stderr or @c stdout as output files. + */ + /*--------------------------------------------------------------------------*/ +-void iniparser_dump_ini(dictionary * d, FILE * f) ++void iniparser_dump_ini(const dictionary * d, FILE * f) + { +- int i, j ; +- char keym[ASCIILINESZ+1]; +- int nsec ; +- const char * secname ; +- int seclen ; ++ int i ; ++ int nsec ; ++ const char * secname ; + + if (d==NULL || f==NULL) return ; + +@@ -234,24 +275,126 @@ void iniparser_dump_ini(dictionary * d, FILE * f) + } + for (i=0 ; isize ; j++) { +- if (d->key[j]==NULL) +- continue ; +- if (!strncmp(d->key[j], keym, seclen+1)) { +- fprintf(f, +- "%-30s = %s\n", +- d->key[j]+seclen+1, +- d->val[j] ? d->val[j] : ""); +- } ++ iniparser_dumpsection_ini(d, secname, f); ++ } ++ fprintf(f, "\n"); ++ return ; ++} ++ ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Save a dictionary section to a loadable ini file ++ @param d Dictionary to dump ++ @param s Section name of dictionary to dump ++ @param f Opened file pointer to dump to ++ @return void ++ ++ This function dumps a given section of a given dictionary into a loadable ini ++ file. It is Ok to specify @c stderr or @c stdout as output files. ++ */ ++/*--------------------------------------------------------------------------*/ ++void iniparser_dumpsection_ini(const dictionary * d, const char * s, FILE * f) ++{ ++ int j ; ++ char keym[ASCIILINESZ+1]; ++ int seclen ; ++ ++ if (d==NULL || f==NULL) return ; ++ if (! iniparser_find_entry(d, s)) return ; ++ ++ seclen = (int)strlen(s); ++ fprintf(f, "\n[%s]\n", s); ++ sprintf(keym, "%s:", s); ++ for (j=0 ; jsize ; j++) { ++ if (d->key[j]==NULL) ++ continue ; ++ if (!strncmp(d->key[j], keym, seclen+1)) { ++ fprintf(f, ++ "%-30s = %s\n", ++ d->key[j]+seclen+1, ++ d->val[j] ? d->val[j] : ""); + } + } + fprintf(f, "\n"); + return ; + } + ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Get the number of keys in a section of a dictionary. ++ @param d Dictionary to examine ++ @param s Section name of dictionary to examine ++ @return Number of keys in section ++ */ ++/*--------------------------------------------------------------------------*/ ++int iniparser_getsecnkeys(const dictionary * d, const char * s) ++{ ++ int seclen, nkeys ; ++ char keym[ASCIILINESZ+1]; ++ int j ; ++ ++ nkeys = 0; ++ ++ if (d==NULL) return nkeys; ++ if (! iniparser_find_entry(d, s)) return nkeys; ++ ++ seclen = (int)strlen(s); ++ strlwc(s, keym, sizeof(keym)); ++ keym[seclen] = ':'; ++ ++ for (j=0 ; jsize ; j++) { ++ if (d->key[j]==NULL) ++ continue ; ++ if (!strncmp(d->key[j], keym, seclen+1)) ++ nkeys++; ++ } ++ ++ return nkeys; ++ ++} ++ ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Get the number of keys in a section of a dictionary. ++ @param d Dictionary to examine ++ @param s Section name of dictionary to examine ++ @param keys Already allocated array to store the keys in ++ @return The pointer passed as `keys` argument or NULL in case of error ++ ++ This function queries a dictionary and finds all keys in a given section. ++ The keys argument should be an array of pointers which size has been ++ determined by calling `iniparser_getsecnkeys` function prior to this one. ++ ++ Each pointer in the returned char pointer-to-pointer is pointing to ++ a string allocated in the dictionary; do not free or modify them. ++ */ ++/*--------------------------------------------------------------------------*/ ++const char ** iniparser_getseckeys(const dictionary * d, const char * s, const char ** keys) ++{ ++ int i, j, seclen ; ++ char keym[ASCIILINESZ+1]; ++ ++ if (d==NULL || keys==NULL) return NULL; ++ if (! iniparser_find_entry(d, s)) return NULL; ++ ++ seclen = (int)strlen(s); ++ strlwc(s, keym, sizeof(keym)); ++ keym[seclen] = ':'; ++ ++ i = 0; ++ ++ for (j=0 ; jsize ; j++) { ++ if (d->key[j]==NULL) ++ continue ; ++ if (!strncmp(d->key[j], keym, seclen+1)) { ++ keys[i] = d->key[j]; ++ i++; ++ } ++ } ++ ++ return keys; ++} ++ + /*-------------------------------------------------------------------------*/ + /** + @brief Get the string associated to a key +@@ -267,24 +410,27 @@ void iniparser_dump_ini(dictionary * d, FILE * f) + the dictionary, do not free or modify it. + */ + /*--------------------------------------------------------------------------*/ +-const char * iniparser_getstring(dictionary * d, const char * key, const char * def) ++const char * iniparser_getstring(const dictionary * d, const char * key, const char * def) + { +- char * lc_key ; ++ const char * lc_key ; ++ const char * sval ; ++ char tmp_str[ASCIILINESZ+1]; + + if (d==NULL || key==NULL) + return def ; + +- lc_key = strlwc(key); +- return dictionary_get(d, lc_key, def); ++ lc_key = strlwc(key, tmp_str, sizeof(tmp_str)); ++ sval = dictionary_get(d, lc_key, def); ++ return sval ; + } + + /*-------------------------------------------------------------------------*/ + /** +- @brief Get the string associated to a key, convert to an int ++ @brief Get the string associated to a key, convert to an long int + @param d Dictionary to search + @param key Key string to look for + @param notfound Value to return in case of error +- @return integer ++ @return long integer + + This function queries a dictionary for a key. A key as read from an + ini file is given as "section:key". If the key cannot be found, +@@ -305,13 +451,46 @@ const char * iniparser_getstring(dictionary * d, const char * key, const char * + Credits: Thanks to A. Becker for suggesting strtol() + */ + /*--------------------------------------------------------------------------*/ +-int iniparser_getint(dictionary * d, const char * key, int notfound) ++long int iniparser_getlongint(const dictionary * d, const char * key, long int notfound) + { +- const char * str ; ++ const char * str ; + + str = iniparser_getstring(d, key, INI_INVALID_KEY); + if (str==INI_INVALID_KEY) return notfound ; +- return (int)strtol(str, NULL, 0); ++ return strtol(str, NULL, 0); ++} ++ ++ ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Get the string associated to a key, convert to an int ++ @param d Dictionary to search ++ @param key Key string to look for ++ @param notfound Value to return in case of error ++ @return integer ++ ++ This function queries a dictionary for a key. A key as read from an ++ ini file is given as "section:key". If the key cannot be found, ++ the notfound value is returned. ++ ++ Supported values for integers include the usual C notation ++ so decimal, octal (starting with 0) and hexadecimal (starting with 0x) ++ are supported. Examples: ++ ++ "42" -> 42 ++ "042" -> 34 (octal -> decimal) ++ "0x42" -> 66 (hexa -> decimal) ++ ++ Warning: the conversion may overflow in various ways. Conversion is ++ totally outsourced to strtol(), see the associated man page for overflow ++ handling. ++ ++ Credits: Thanks to A. Becker for suggesting strtol() ++ */ ++/*--------------------------------------------------------------------------*/ ++int iniparser_getint(const dictionary * d, const char * key, int notfound) ++{ ++ return (int)iniparser_getlongint(d, key, notfound); + } + + /*-------------------------------------------------------------------------*/ +@@ -327,9 +506,9 @@ int iniparser_getint(dictionary * d, const char * key, int notfound) + the notfound value is returned. + */ + /*--------------------------------------------------------------------------*/ +-double iniparser_getdouble(dictionary * d, const char * key, double notfound) ++double iniparser_getdouble(const dictionary * d, const char * key, double notfound) + { +- const char * str ; ++ const char * str ; + + str = iniparser_getstring(d, key, INI_INVALID_KEY); + if (str==INI_INVALID_KEY) return notfound ; +@@ -368,10 +547,10 @@ double iniparser_getdouble(dictionary * d, const char * key, double notfound) + necessarily have to be 0 or 1. + */ + /*--------------------------------------------------------------------------*/ +-int iniparser_getboolean(dictionary * d, const char * key, int notfound) ++int iniparser_getboolean(const dictionary * d, const char * key, int notfound) + { +- const char * c ; +- int ret ; ++ int ret ; ++ const char * c ; + + c = iniparser_getstring(d, key, INI_INVALID_KEY); + if (c==INI_INVALID_KEY) return notfound ; +@@ -397,10 +576,7 @@ int iniparser_getboolean(dictionary * d, const char * key, int notfound) + of querying for the presence of sections in a dictionary. + */ + /*--------------------------------------------------------------------------*/ +-int iniparser_find_entry( +- dictionary * ini, +- const char * entry +-) ++int iniparser_find_entry(const dictionary * ini, const char * entry) + { + int found=0 ; + if (iniparser_getstring(ini, entry, INI_INVALID_KEY)!=INI_INVALID_KEY) { +@@ -418,13 +594,14 @@ int iniparser_find_entry( + @return int 0 if Ok, -1 otherwise. + + If the given entry can be found in the dictionary, it is modified to +- contain the provided value. If it cannot be found, -1 is returned. ++ contain the provided value. If it cannot be found, the entry is created. + It is Ok to set val to NULL. + */ + /*--------------------------------------------------------------------------*/ + int iniparser_set(dictionary * ini, const char * entry, const char * val) + { +- return dictionary_set(ini, strlwc(entry), val) ; ++ char tmp_str[ASCIILINESZ+1]; ++ return dictionary_set(ini, strlwc(entry, tmp_str, sizeof(tmp_str)), val) ; + } + + /*-------------------------------------------------------------------------*/ +@@ -439,12 +616,13 @@ int iniparser_set(dictionary * ini, const char * entry, const char * val) + /*--------------------------------------------------------------------------*/ + void iniparser_unset(dictionary * ini, const char * entry) + { +- dictionary_unset(ini, strlwc(entry)); ++ char tmp_str[ASCIILINESZ+1]; ++ dictionary_unset(ini, strlwc(entry, tmp_str, sizeof(tmp_str))); + } + + /*-------------------------------------------------------------------------*/ + /** +- @brief Load a single line from an INI file ++ @brief Load a single line from an INI file + @param input_line Input line, may be concatenated multi-line input + @param section Output space to store section + @param key Output space to store key +@@ -457,34 +635,39 @@ static line_status iniparser_line( + char * section, + char * key, + char * value) +-{ ++{ + line_status sta ; +- char line[ASCIILINESZ+1]; +- int len ; ++ char * line = NULL; ++ size_t len ; + +- strcpy(line, strstrip(input_line)); +- len = (int)strlen(line); ++ line = xstrdup(input_line); ++ len = strstrip(line); + + sta = LINE_UNPROCESSED ; + if (len<1) { + /* Empty line */ + sta = LINE_EMPTY ; +- } else if (line[0]=='#') { ++ } else if (line[0]=='#' || line[0]==';') { + /* Comment line */ +- sta = LINE_COMMENT ; ++ sta = LINE_COMMENT ; + } else if (line[0]=='[' && line[len-1]==']') { + /* Section name */ + sscanf(line, "[%[^]]", section); +- strcpy(section, strstrip(section)); +- strcpy(section, strlwc(section)); ++ strstrip(section); ++ strlwc(section, section, len); + sta = LINE_SECTION ; + } else if (sscanf (line, "%[^=] = \"%[^\"]\"", key, value) == 2 +- || sscanf (line, "%[^=] = '%[^\']'", key, value) == 2 +- || sscanf (line, "%[^=] = %[^;#]", key, value) == 2) { +- /* Usual key=value, with or without comments */ +- strcpy(key, strstrip(key)); +- strcpy(key, strlwc(key)); +- strcpy(value, strstrip(value)); ++ || sscanf (line, "%[^=] = '%[^\']'", key, value) == 2) { ++ /* Usual key=value with quotes, with or without comments */ ++ strstrip(key); ++ strlwc(key, key, len); ++ /* Don't strip spaces from values surrounded with quotes */ ++ sta = LINE_VALUE ; ++ } else if (sscanf (line, "%[^=] = %[^;#]", key, value) == 2) { ++ /* Usual key=value without quotes, with or without comments */ ++ strstrip(key); ++ strlwc(key, key, len); ++ strstrip(value); + /* + * sscanf cannot handle '' or "" as empty values + * this is done here +@@ -501,14 +684,16 @@ static line_status iniparser_line( + * key=; + * key=# + */ +- strcpy(key, strstrip(key)); +- strcpy(key, strlwc(key)); ++ strstrip(key); ++ strlwc(key, key, len); + value[0]=0 ; + sta = LINE_VALUE ; + } else { + /* Generate syntax error */ + sta = LINE_ERROR ; + } ++ ++ free(line); + return sta ; + } + +@@ -528,44 +713,33 @@ static line_status iniparser_line( + /*--------------------------------------------------------------------------*/ + dictionary * iniparser_load(const char * ininame) + { +- char *buf; + FILE * in ; + +- char *line; +- char *section; +- char *key; +- char *tmp; +- char *val; ++ char line [ASCIILINESZ+1] ; ++ char section [ASCIILINESZ+1] ; ++ char key [ASCIILINESZ+1] ; ++ char tmp [(ASCIILINESZ * 2) + 2] ; ++ char val [ASCIILINESZ+1] ; + + int last=0 ; + int len ; + int lineno=0 ; + int errs=0; +- int ret; ++ int mem_err=0; + + dictionary * dict ; + +- if ((in=fopen(ininame, "r"))==NULL) ++ if ((in=fopen(ininame, "r"))==NULL) { ++ iniparser_error_callback("iniparser: cannot open %s\n", ininame); + return NULL ; ++ } + + dict = dictionary_new(0) ; + if (!dict) { + fclose(in); +- errno = ENOMEM; + return NULL ; + } + +- buf = malloc((ASCIILINESZ+1) * 5); +- if (buf == NULL) { +- errno = -ENOMEM; +- return NULL; +- } +- line = buf; +- section = line + ASCIILINESZ + 1; +- key = section + ASCIILINESZ + 1; +- tmp = key + ASCIILINESZ + 1; +- val = tmp + ASCIILINESZ + 1; +- + memset(line, 0, ASCIILINESZ); + memset(section, 0, ASCIILINESZ); + memset(key, 0, ASCIILINESZ); +@@ -575,18 +749,16 @@ dictionary * iniparser_load(const char * ininame) + while (fgets(line+last, ASCIILINESZ-last, in)!=NULL) { + lineno++ ; + len = (int)strlen(line)-1; ++ if (len<=0) ++ continue; + /* Safety check against buffer overflows */ +- if (last > 0 && line[len]!='\n') { +-#if 0 +- warning(anon_scope, +- "iniparser: input line too long in %s (%d)\n", +- ininame, +- lineno); +-#endif ++ if (line[len]!='\n' && !feof(in)) { ++ iniparser_error_callback( ++ "iniparser: input line too long in %s (%d)\n", ++ ininame, ++ lineno); + dictionary_del(dict); + fclose(in); +- free(buf); +- errno = EINVAL; + return NULL ; + } + /* Get rid of \n and spaces at end of line */ +@@ -595,8 +767,11 @@ dictionary * iniparser_load(const char * ininame) + line[len]=0 ; + len-- ; + } ++ if (len < 0) { /* Line was entirely \n and/or spaces */ ++ len = 0; ++ } + /* Detect multi-line */ +- if (len >= 0 && line[len]=='\\') { ++ if (line[len]=='\\') { + /* Multi-line value */ + last=len ; + continue ; +@@ -609,24 +784,20 @@ dictionary * iniparser_load(const char * ininame) + break ; + + case LINE_SECTION: +- errs = dictionary_set(dict, section, NULL); ++ mem_err = dictionary_set(dict, section, NULL); + break ; + + case LINE_VALUE: + sprintf(tmp, "%s:%s", section, key); +- errs = dictionary_set(dict, tmp, val) ; ++ mem_err = dictionary_set(dict, tmp, val); + break ; + +- case LINE_ERROR: +-#if 0 +- printf("iniparser: syntax error in %s (%d):\n", +- ininame, +- lineno); +- printf( "-> %s\n", line); +- +-#endif +- +- ret = EINVAL; ++ case LINE_ERROR: ++ iniparser_error_callback( ++ "iniparser: syntax error in %s (%d):\n-> %s\n", ++ ininame, ++ lineno, ++ line); + errs++ ; + break; + +@@ -635,18 +806,16 @@ dictionary * iniparser_load(const char * ininame) + } + memset(line, 0, ASCIILINESZ); + last=0; +- if (errs<0) { +- ret = ENOMEM; ++ if (mem_err<0) { ++ iniparser_error_callback("iniparser: memory allocation failure\n"); + break ; + } + } +- fclose(in); +- free(buf); + if (errs) { + dictionary_del(dict); + dict = NULL ; +- errno = ret; + } ++ fclose(in); + return dict ; + } + +@@ -665,5 +834,3 @@ void iniparser_freedict(dictionary * d) + { + dictionary_del(d); + } +- +-/* vim: set ts=4 et sw=4 tw=75 */ +diff --git a/lib/boilerplate/iniparser/iniparser.h b/lib/boilerplate/iniparser/iniparser.h +index d454cef34..37ff7b71b 100644 +--- a/lib/boilerplate/iniparser/iniparser.h ++++ b/lib/boilerplate/iniparser/iniparser.h +@@ -3,22 +3,15 @@ + /** + @file iniparser.h + @author N. Devillard +- @date Sep 2007 +- @version 3.0 + @brief Parser for ini files. + */ + /*--------------------------------------------------------------------------*/ + +-/* +- $Id: iniparser.h,v 1.24 2007-11-23 21:38:19 ndevilla Exp $ +- $Revision: 1.24 $ +-*/ +- + #ifndef _INIPARSER_H_ + #define _INIPARSER_H_ + + /*--------------------------------------------------------------------------- +- Includes ++ Includes + ---------------------------------------------------------------------------*/ + + #include +@@ -34,12 +27,21 @@ + + #include "dictionary.h" + +-/*--------------------------------------------------------------------------- +- Macros +- ---------------------------------------------------------------------------*/ +-/** For backwards compatibility only */ +-#define iniparser_getstr(d, k) iniparser_getstring(d, k, NULL) +-#define iniparser_setstr iniparser_setstring ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Configure a function to receive the error messages. ++ @param errback Function to call. ++ ++ By default, the error will be printed on stderr. If a null pointer is passed ++ as errback the error callback will be switched back to default. ++ */ ++/*--------------------------------------------------------------------------*/ ++ ++void iniparser_set_error_callback(int (*errback)(const char *, ...)); + + /*-------------------------------------------------------------------------*/ + /** +@@ -60,7 +62,7 @@ + */ + /*--------------------------------------------------------------------------*/ + +-int iniparser_getnsec(dictionary * d); ++int iniparser_getnsec(const dictionary * d); + + + /*-------------------------------------------------------------------------*/ +@@ -78,7 +80,7 @@ int iniparser_getnsec(dictionary * d); + */ + /*--------------------------------------------------------------------------*/ + +-const char * iniparser_getsecname(dictionary * d, int n); ++const char * iniparser_getsecname(const dictionary * d, int n); + + + /*-------------------------------------------------------------------------*/ +@@ -93,7 +95,22 @@ const char * iniparser_getsecname(dictionary * d, int n); + */ + /*--------------------------------------------------------------------------*/ + +-void iniparser_dump_ini(dictionary * d, FILE * f); ++void iniparser_dump_ini(const dictionary * d, FILE * f); ++ ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Save a dictionary section to a loadable ini file ++ @param d Dictionary to dump ++ @param s Section name of dictionary to dump ++ @param f Opened file pointer to dump to ++ @return void ++ ++ This function dumps a given section of a given dictionary into a loadable ini ++ file. It is Ok to specify @c stderr or @c stdout as output files. ++ */ ++/*--------------------------------------------------------------------------*/ ++ ++void iniparser_dumpsection_ini(const dictionary * d, const char * s, FILE * f); + + /*-------------------------------------------------------------------------*/ + /** +@@ -108,7 +125,36 @@ void iniparser_dump_ini(dictionary * d, FILE * f); + purposes mostly. + */ + /*--------------------------------------------------------------------------*/ +-void iniparser_dump(dictionary * d, FILE * f); ++void iniparser_dump(const dictionary * d, FILE * f); ++ ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Get the number of keys in a section of a dictionary. ++ @param d Dictionary to examine ++ @param s Section name of dictionary to examine ++ @return Number of keys in section ++ */ ++/*--------------------------------------------------------------------------*/ ++int iniparser_getsecnkeys(const dictionary * d, const char * s); ++ ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Get the number of keys in a section of a dictionary. ++ @param d Dictionary to examine ++ @param s Section name of dictionary to examine ++ @param keys Already allocated array to store the keys in ++ @return The pointer passed as `keys` argument or NULL in case of error ++ ++ This function queries a dictionary and finds all keys in a given section. ++ The keys argument should be an array of pointers which size has been ++ determined by calling `iniparser_getsecnkeys` function prior to this one. ++ ++ Each pointer in the returned char pointer-to-pointer is pointing to ++ a string allocated in the dictionary; do not free or modify them. ++ */ ++/*--------------------------------------------------------------------------*/ ++const char ** iniparser_getseckeys(const dictionary * d, const char * s, const char ** keys); ++ + + /*-------------------------------------------------------------------------*/ + /** +@@ -125,7 +171,7 @@ void iniparser_dump(dictionary * d, FILE * f); + the dictionary, do not free or modify it. + */ + /*--------------------------------------------------------------------------*/ +-const char * iniparser_getstring(dictionary * d, const char * key, const char * def); ++const char * iniparser_getstring(const dictionary * d, const char * key, const char * def); + + /*-------------------------------------------------------------------------*/ + /** +@@ -154,7 +200,35 @@ const char * iniparser_getstring(dictionary * d, const char * key, const char * + Credits: Thanks to A. Becker for suggesting strtol() + */ + /*--------------------------------------------------------------------------*/ +-int iniparser_getint(dictionary * d, const char * key, int notfound); ++int iniparser_getint(const dictionary * d, const char * key, int notfound); ++ ++/*-------------------------------------------------------------------------*/ ++/** ++ @brief Get the string associated to a key, convert to an long int ++ @param d Dictionary to search ++ @param key Key string to look for ++ @param notfound Value to return in case of error ++ @return integer ++ ++ This function queries a dictionary for a key. A key as read from an ++ ini file is given as "section:key". If the key cannot be found, ++ the notfound value is returned. ++ ++ Supported values for integers include the usual C notation ++ so decimal, octal (starting with 0) and hexadecimal (starting with 0x) ++ are supported. Examples: ++ ++ - "42" -> 42 ++ - "042" -> 34 (octal -> decimal) ++ - "0x42" -> 66 (hexa -> decimal) ++ ++ Warning: the conversion may overflow in various ways. Conversion is ++ totally outsourced to strtol(), see the associated man page for overflow ++ handling. ++ */ ++/*--------------------------------------------------------------------------*/ ++long int iniparser_getlongint(const dictionary * d, const char * key, long int notfound); ++ + + /*-------------------------------------------------------------------------*/ + /** +@@ -169,7 +243,7 @@ int iniparser_getint(dictionary * d, const char * key, int notfound); + the notfound value is returned. + */ + /*--------------------------------------------------------------------------*/ +-double iniparser_getdouble(dictionary * d, const char * key, double notfound); ++double iniparser_getdouble(const dictionary * d, const char * key, double notfound); + + /*-------------------------------------------------------------------------*/ + /** +@@ -203,7 +277,7 @@ double iniparser_getdouble(dictionary * d, const char * key, double notfound); + necessarily have to be 0 or 1. + */ + /*--------------------------------------------------------------------------*/ +-int iniparser_getboolean(dictionary * d, const char * key, int notfound); ++int iniparser_getboolean(const dictionary * d, const char * key, int notfound); + + + /*-------------------------------------------------------------------------*/ +@@ -212,17 +286,16 @@ int iniparser_getboolean(dictionary * d, const char * key, int notfound); + @param ini Dictionary to modify. + @param entry Entry to modify (entry name) + @param val New value to associate to the entry. +- @return int 0 if Ok, -1 otherwise. ++ @return int 0 if Ok, -1 otherwise. + + If the given entry can be found in the dictionary, it is modified to +- contain the provided value. If it cannot be found, -1 is returned. ++ contain the provided value. If it cannot be found, the entry is created. + It is Ok to set val to NULL. + */ + /*--------------------------------------------------------------------------*/ +-int iniparser_setstring(dictionary * ini, const char * entry, const char * val); +- + int iniparser_set(dictionary * ini, const char * entry, const char * val); + ++ + /*-------------------------------------------------------------------------*/ + /** + @brief Delete an entry in a dictionary +@@ -247,7 +320,7 @@ void iniparser_unset(dictionary * ini, const char * entry); + of querying for the presence of sections in a dictionary. + */ + /*--------------------------------------------------------------------------*/ +-int iniparser_find_entry(dictionary * ini, const char * entry) ; ++int iniparser_find_entry(const dictionary * ini, const char * entry) ; + + /*-------------------------------------------------------------------------*/ + /** +@@ -278,4 +351,8 @@ dictionary * iniparser_load(const char * ininame); + /*--------------------------------------------------------------------------*/ + void iniparser_freedict(dictionary * d); + ++#ifdef __cplusplus ++} ++#endif ++ + #endif +-- +GitLab + diff --git a/package/xenomai/Config.in b/package/xenomai/Config.in new file mode 100644 index 00000000..ec6d9e5d --- /dev/null +++ b/package/xenomai/Config.in @@ -0,0 +1,219 @@ +config BR2_PACKAGE_XENOMAI_COBALT_ARCH_SUPPORTS + bool + default y if BR2_i386 + default y if BR2_x86_64 + default y if BR2_powerpc + default y if BR2_arm && !BR2_ARM_CPU_ARMV7M && !BR2_ARM_CPU_ARMV8A + +comment "xenomai needs a glibc or uClibc toolchain w/ threads" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_XENOMAI + bool "Xenomai Userspace" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_TOOLCHAIN_HAS_THREADS + # uses , __WORDSIZE and bits/local_lim.h + depends on !BR2_TOOLCHAIN_USES_MUSL + help + Real-Time Framework for Linux + http://www.xenomai.org + + Xenomai is split in two parts: a kernel part and an + userspace part. + + This package contains the userspace part, which consists + mainly in libraries to write userspace real-time programs + that interact with the in-kernel Xenomai real-time core. + + For those libraries to work, you need a Xenomai-enabled + kernel. This is possible in two ways: + - if you compile your kernel with Buildroot, you need to go + to Linux Kernel -> Linux Kernel Extensions to enable the + Xenomai extension. + - if you compile your kernel outside of Buildroot, you need + to make sure that it is Xenomai-enabled. + + Finally, if you are using a static /dev, make sure to + uncomment the Xenomai entries listed in + target/generic/device_table_dev.txt. + +if BR2_PACKAGE_XENOMAI + +choice + bool "Xenomai version" + help + Make sure that the selected version has a patch for your + selected Linux kernel. If it does not, download and select a + patch manually with BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH, + in the Linux Kernel -> Linux Kernel Extensions menu. + +config BR2_PACKAGE_XENOMAI_LATEST_VERSION + bool "Latest version (3.0.10)" + +config BR2_PACKAGE_XENOMAI_CUSTOM_VERSION + bool "Custom version" + +config BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL + bool "Custom tarball" + +config BR2_PACKAGE_XENOMAI_CUSTOM_GIT + bool "Custom Git repository" + +endchoice + +config BR2_PACKAGE_XENOMAI_REPOSITORY + string "URL of custom repository" + default "https://gitlab.denx.de/Xenomai/xenomai.git" + depends on BR2_PACKAGE_XENOMAI_CUSTOM_GIT + +config BR2_PACKAGE_XENOMAI_VERSION + string "Custom Xenomai version" if \ + !BR2_PACKAGE_XENOMAI_LATEST_VERSION && \ + !BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL + default "3.0.10" if BR2_PACKAGE_XENOMAI_LATEST_VERSION + default "custom" if BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL + +config BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL + string "URL of custom tarball" + depends on BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL + +choice + prompt "Xenomai core" + default BR2_PACKAGE_XENOMAI_MERCURY + help + Select the Xenomai core: dual kernel (Cobalt) + or native Linux Kernel (Mercury). + +config BR2_PACKAGE_XENOMAI_MERCURY + bool "Mercury" + depends on !BR2_LINUX_KERNEL_EXT_XENOMAI + help + Select Mercury core for the Xenomai userspace. + You want to use it if you have the native Linux Kernel. + +config BR2_PACKAGE_XENOMAI_COBALT + bool "Cobalt" + depends on BR2_PACKAGE_XENOMAI_COBALT_ARCH_SUPPORTS + help + Select Cobalt core (dual kernel) for the Xenomai + userspace. Use this if you use a Xenomai-patched + Linux kernel. + + If you want to use Cobalt core, your kernel must have + the Adeos and Xenomai patches applied to it. You can + add these through the BR2_LINUX_KERNEL_EXT_XENOMAI option + in the Linux Kernel Extensions menu. +endchoice + +config BR2_PACKAGE_XENOMAI_ENABLE_SMP + bool "Enable SMP support" + default y + # SMP not supported below armv6 + depends on !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 + help + This option enables SMP support in Xenomai userspace. + + If this option is turned on while no SMP support is enabled + in the kernel, things will still work. However, if SMP is + enabled in the kernel but this option is not turned on, + Xenomai applications will complain with: + + feature mismatch: missing="smp/nosmp" + + Please refer to this troubleshooting guide for more + information: + + http://xenomai.org/troubleshooting-a-dual-kernel-configuration/#feature_mismatch_missing8221smpnosmp8221 + +config BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY + bool "Enable registry" + depends on !BR2_STATIC_LIBS # libfuse + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse + depends on BR2_USE_MMU # libfuse + select BR2_PACKAGE_LIBFUSE + help + Xenomai APIs can export their internal state through a + pseudo-filesystem, whose files may be read to obtain + information about the existing real-time objects, such as + tasks, semaphores, message queues and so on. + +comment "registry needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH + string "Custom registry root path" + depends on BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY + help + Specify the root path of the registry here. + To use the Xenomai default (currently: /var/run/xenomai), + leave this option empty. + +config BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS + string "Additional configure options" + help + Specify any additional options to pass to the configure + script here. See Xenomai documentation for details. + +config BR2_PACKAGE_XENOMAI_TESTSUITE + bool "Install testsuite" + help + This option allows to install the Xenomai test programs. + +config BR2_PACKAGE_XENOMAI_RTCAN + bool "RTCan utilities" + help + This option allows to install the Xenomai RT-CAN utilities. + +config BR2_PACKAGE_XENOMAI_ANALOGY + bool "Analogy libs and utils" + help + This option allows to install the Xenomai Analogy utilities + and libraries + +menu "Skin selection" + +config BR2_PACKAGE_XENOMAI_NATIVE_SKIN + bool "Alchemy (native) skin" + default y + help + This option allows to install the Alchemy Xenomai skin, + previously called 'native' + +config BR2_PACKAGE_XENOMAI_POSIX_SKIN + bool "POSIX skin" + default y + help + This option allows to install the POSIX Xenomai skin + +config BR2_PACKAGE_XENOMAI_PSOS_SKIN + bool "pSOS skin" + help + This option allows to install the pSOS Xenomai skin + +config BR2_PACKAGE_XENOMAI_RTAI_SKIN + bool "RTAI skin" + help + This option allows to install the RTAI Xenomai skin + +config BR2_PACKAGE_XENOMAI_UITRON_SKIN + bool "uITRON skin" + help + This option allows to install the uITRON Xenomai skin + +config BR2_PACKAGE_XENOMAI_VRTX_SKIN + bool "VRTX skin" + help + This option allows to install the VRTX Xenomai skin + +config BR2_PACKAGE_XENOMAI_VXWORKS_SKIN + bool "VxWorks skin" + help + This option allows to install the VxWorks Xenomai skin + +endmenu + +endif diff --git a/package/xenomai/xenomai.hash b/package/xenomai/xenomai.hash new file mode 100644 index 00000000..7a07f061 --- /dev/null +++ b/package/xenomai/xenomai.hash @@ -0,0 +1,17 @@ +# Locally computed; +sha256 080f893d6ab8e3065285fbb482695477a0502b9490dccd1f744cebaac94691e5 xenomai-3.0.10.tar.bz2 +sha256 d37ebe86bf618942dad958927c44403f9b02fbebb3071a4a08408ccbdab5290f debian/copyright +sha256 f3380321da72ff509bf6939aa80e6d02fd22268f5c705137b34c205b39bc63a0 include/COPYING +sha256 d6b6d8ed1b12309085caf1cf775ea4acdad3288c7f7d993c2502bd19c87e4764 kernel/cobalt/COPYING +sha256 d6b6d8ed1b12309085caf1cf775ea4acdad3288c7f7d993c2502bd19c87e4764 kernel/cobalt/posix/COPYING +sha256 9c90501baa30534ffed6b39eef413bd1727170ef691fd9768dc8644c3042df54 kernel/cobalt/rtdm/COPYING +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 lib/alchemy/COPYING +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 lib/analogy/COPYING +sha256 0519083691511d71408f8c9a2794fa2f6ad13a5eec00717f4572b54d18d6f9da lib/boilerplate/iniparser/LICENSE +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 lib/boilerplate/COPYING +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 lib/cobalt/COPYING +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 lib/copperplate/COPYING +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 lib/psos/COPYING +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 lib/smokey/COPYING +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 lib/trank/COPYING +sha256 eea173a556abac0370461e57e12aab266894ea6be3874c2be05fd87871f75449 lib/vxworks/COPYING diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk new file mode 100644 index 00000000..7e3b1300 --- /dev/null +++ b/package/xenomai/xenomai.mk @@ -0,0 +1,161 @@ +################################################################################ +# +# xenomai +# +################################################################################ + +XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION)) +ifeq ($(BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL),y) +XENOMAI_TARBALL = $(call qstrip,$(BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL)) +XENOMAI_SOURCE = $(notdir $(XENOMAI_TARBALL)) +XENOMAI_SITE = $(patsubst %/,%,$(dir $(XENOMAI_TARBALL))) +else ifeq ($(BR2_PACKAGE_XENOMAI_CUSTOM_GIT),y) +XENOMAI_SITE = $(call qstrip,$(BR2_PACKAGE_XENOMAI_REPOSITORY)) +XENOMAI_SITE_METHOD = git +else +XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2 +XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable +endif + +# Exclude all from the hash check, but the latest version. +ifeq ($(BR2_PACKAGE_XENOMAI)$(BR2_PACKAGE_XENOMAI_LATEST_VERSION),y) +BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE) +endif + +XENOMAI_LICENSE = GPL-2.0+ with exception (headers), LGPL-2.1+ (libraries), GPL-2.0+ (kernel), GFDL-1.2+ (docs), GPL-2.0 (ipipe patch, can driver) +# GFDL is not included but refers to gnu.org +XENOMAI_LICENSE_FILES = debian/copyright include/COPYING kernel/cobalt/COPYING \ + kernel/cobalt/posix/COPYING kernel/cobalt/rtdm/COPYING \ + lib/alchemy/COPYING lib/analogy/COPYING \ + lib/boilerplate/iniparser/LICENSE lib/boilerplate/COPYING \ + lib/cobalt/COPYING lib/copperplate/COPYING lib/psos/COPYING \ + lib/smokey/COPYING lib/trank/COPYING lib/vxworks/COPYING + +XENOMAI_DEPENDENCIES = host-pkgconf + +XENOMAI_INSTALL_STAGING = YES +XENOMAI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-user +XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user + +XENOMAI_CONF_OPTS += --includedir=/usr/include/xenomai/ + +ifeq ($(BR2_PACKAGE_XENOMAI_MERCURY),y) +XENOMAI_CONF_OPTS += --with-core=mercury +else +XENOMAI_CONF_OPTS += --with-core=cobalt +endif + +ifeq ($(BR2_PACKAGE_XENOMAI_ENABLE_SMP),y) +XENOMAI_CONF_OPTS += --enable-smp +else +XENOMAI_CONF_OPTS += --disable-smp +endif + +ifeq ($(BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY),y) +XENOMAI_DEPENDENCIES += libfuse +XENOMAI_REGISTRY_PATH = $(call qstrip,$(BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH)) +ifeq ($(XENOMAI_REGISTRY_PATH),) +XENOMAI_CONF_OPTS += --enable-registry +else +XENOMAI_CONF_OPTS += --enable-registry=$(XENOMAI_REGISTRY_PATH) +endif +else +XENOMAI_CONF_OPTS += --disable-registry +endif + +XENOMAI_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS)) + +# Some of these files may be desired by some users -- at that point specific +# config options need to be added to keep a particular set. +define XENOMAI_REMOVE_UNNEEDED_FILES + for i in xeno xeno-config xeno-info wrap-link.sh ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done + for i in cobalt modechk ; do \ + rm -f $(TARGET_DIR)/usr/lib/$$i.wrappers ; \ + done + for i in autotune corectl hdb rtnet nomaccfg rtcfg rtifconfig \ + rtiwconfig rtping rtroute tdmacfg rtps slackspot version; do \ + rm -f $(TARGET_DIR)/usr/sbin/$$i ; \ + done +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_UNNEEDED_FILES + +ifeq ($(BR2_PACKAGE_XENOMAI_TESTSUITE),) +define XENOMAI_REMOVE_TESTSUITE + rm -rf $(TARGET_DIR)/usr/share/xenomai/ + for i in clocktest gpiotest latency smokey spitest switchtest \ + xeno-test-run-wrapper dohell xeno-test-run xeno-test ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done + rm -rf $(TARGET_DIR)/usr/demo/ +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_TESTSUITE +endif + +ifeq ($(BR2_PACKAGE_XENOMAI_RTCAN),) +define XENOMAI_REMOVE_RTCAN_PROGS + for i in rtcanrecv rtcansend ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done + rm -f $(TARGET_DIR)/usr/sbin/rtcanconfig +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_RTCAN_PROGS +endif + +ifeq ($(BR2_PACKAGE_XENOMAI_ANALOGY),) +define XENOMAI_REMOVE_ANALOGY + for i in cmd_read cmd_write cmd_bits insn_read insn_write insn_bits \ + wf_generate ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done + for i in analogy_config analogy_calibrate ; do \ + rm -f $(TARGET_DIR)/usr/sbin/$$i ; \ + done + rm -f $(TARGET_DIR)/usr/lib/libanalogy.* +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_ANALOGY +endif + +XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_NATIVE_SKIN),,alchemy) +XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_POSIX_SKIN),,posix) +XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_PSOS_SKIN),,psos) +XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_RTAI_SKIN),,rtai) +XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_TESTSUITE),,smokey) +XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_UITRON_SKIN),,uitron) +XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_VXWORKS_SKIN),,vxworks) +XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_VRTX_SKIN),,vrtx) + +define XENOMAI_REMOVE_LIBS + for i in $(XENOMAI_REMOVE_LIBS_LIST) ; do \ + rm -f $(TARGET_DIR)/usr/lib/lib$$i.* ; \ + done +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_LIBS + +define XENOMAI_DEVICES + /dev/rtheap c 666 0 0 10 254 0 0 - + /dev/rtscope c 666 0 0 10 253 0 0 - + /dev/rtp c 666 0 0 150 0 0 1 32 +endef + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XENOMAI_DEPENDENCIES += udev + +define XENOMAI_INSTALL_UDEV_RULES + if test -d $(TARGET_DIR)/etc/udev/rules.d ; then \ + for f in $(@D)/kernel/cobalt/udev/*.rules ; do \ + cp $$f $(TARGET_DIR)/etc/udev/rules.d/ || exit 1 ; \ + done ; \ + fi; +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_INSTALL_UDEV_RULES +endif # udev + +$(eval $(autotools-package)) diff --git a/package/xerces/0001-fix-static-linking-with-curl.patch b/package/xerces/0001-fix-static-linking-with-curl.patch new file mode 100644 index 00000000..db38de79 --- /dev/null +++ b/package/xerces/0001-fix-static-linking-with-curl.patch @@ -0,0 +1,39 @@ +From 26e3f1440bbc75c704fc93ff43a2abbfbe4c0203 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Thu, 11 Oct 2018 22:56:50 +0200 +Subject: [PATCH] fix static linking with curl + +When curl is statically built with openssl support, xerces needs to +link with openssl libraries so use pkg_check_modules to get any +needed dependencies + +Fixes: + - http://autobuild.buildroot.org/results/29ca90fff2c8e38f2edf7240eca3aa3fe7397c45 + +Signed-off-by: Fabrice Fontaine +--- + cmake/XercesNetAccessorSelection.cmake | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/cmake/XercesNetAccessorSelection.cmake b/cmake/XercesNetAccessorSelection.cmake +index 7a63f1f6b..e90fcf034 100644 +--- a/cmake/XercesNetAccessorSelection.cmake ++++ b/cmake/XercesNetAccessorSelection.cmake +@@ -31,7 +31,13 @@ if(network) + + # Requires select() which is UNIX only + if(UNIX) +- find_package(CURL) ++ find_package(PkgConfig) ++ if (PkgConfig_FOUND) ++ pkg_check_modules(CURL libcurl) ++ if (NOT CURL_FOUND) ++ find_package(CURL) ++ endif() ++ endif() + if(CURL_FOUND) + list(APPEND netaccessors curl) + endif() +-- +2.17.1 + diff --git a/package/xerces/Config.in b/package/xerces/Config.in new file mode 100644 index 00000000..828b5dd2 --- /dev/null +++ b/package/xerces/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_XERCES + bool "xerces-c++" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + Xerces-C++ is a validating XML parser written in portable C++. + + http://xerces.apache.org/xerces-c/ + +if BR2_PACKAGE_XERCES + +config BR2_PACKAGE_XERCES_ENABLE_NETWORK + bool "Enable network support" + default y + help + Enable network support in xerces + +endif + +comment "xerces-c++ needs a toolchain w/ C++, wchar" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) diff --git a/package/xerces/xerces.hash b/package/xerces/xerces.hash new file mode 100644 index 00000000..c75ce860 --- /dev/null +++ b/package/xerces/xerces.hash @@ -0,0 +1,5 @@ +# From http://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.2.3.tar.xz.sha256 +sha256 12fc99a9fc1d1a79bd0e927b8b5637a576d6656f45b0d5e70ee3694d379cc149 xerces-c-3.2.3.tar.xz + +# Hash for license file +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/package/xerces/xerces.mk b/package/xerces/xerces.mk new file mode 100644 index 00000000..a3e5361b --- /dev/null +++ b/package/xerces/xerces.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# xerces +# +################################################################################ + +XERCES_VERSION = 3.2.3 +XERCES_SOURCE = xerces-c-$(XERCES_VERSION).tar.xz +XERCES_SITE = http://archive.apache.org/dist/xerces/c/3/sources +XERCES_LICENSE = Apache-2.0 +XERCES_LICENSE_FILES = LICENSE +XERCES_CPE_ID_VENDOR = apache +XERCES_CPE_ID_PRODUCT = xerces-c\+\+ +XERCES_INSTALL_STAGING = YES + +define XERCES_DISABLE_SAMPLES + $(SED) 's/add_subdirectory(samples)//' $(@D)/CMakeLists.txt +endef + +XERCES_POST_PATCH_HOOKS += XERCES_DISABLE_SAMPLES + +ifeq ($(BR2_PACKAGE_ICU),y) +XERCES_DEPENDENCIES += icu +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +XERCES_CONF_ENV += LIBS=-liconv +XERCES_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_XERCES_ENABLE_NETWORK),y) +ifeq ($(BR2_PACKAGE_LIBCURL),y) +XERCES_CONF_OPTS += -Dnetwork-accessor=curl +XERCES_DEPENDENCIES += libcurl +else +XERCES_CONF_OPTS += -Dnetwork-accessor=socket +endif +else +XERCES_CONF_OPTS += -Dnetwork=OFF +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +XERCES_CONF_OPTS += -Dthreads=ON +else +XERCES_CONF_OPTS += -Dthreads=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/xfsprogs/0001-mdrestore-do-not-do-dynamic-linking-of-libtool-libra.patch b/package/xfsprogs/0001-mdrestore-do-not-do-dynamic-linking-of-libtool-libra.patch new file mode 100644 index 00000000..9030a2aa --- /dev/null +++ b/package/xfsprogs/0001-mdrestore-do-not-do-dynamic-linking-of-libtool-libra.patch @@ -0,0 +1,52 @@ +From d5cbb4f43cc9c30100fbf18a3e0d1fb95e1c1b0a Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 25 Nov 2015 10:50:00 +0000 +Subject: [PATCH] mdrestore, scrub: do not do dynamic linking of libtool + libraries + +As explained in commit ece49daeff1a3cad765e106d678c608925c9d768, use +-static-libtool-libs instead of -static to allow fallback to the dynamic +linking for libuuid only. Otherwise the build will fail like this: + +ld: attempted static link of dynamic object `/usr/lib/libuuid.so' + +Signed-off-by: Vicente Olivert Riera +[Sent upstream: https://www.spinics.net/lists/xfs/msg36149.html] +[baruch: update for v4.15.1; extend to include scrub] +Signed-off-by: Baruch Siach +[matt: update for v4.16.1; adjusted libunistring -> libicu] +Signed-off-by: Matt Weber +--- + mdrestore/Makefile | 2 +- + scrub/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mdrestore/Makefile b/mdrestore/Makefile +index 136ae716d691..75ff1bad78e9 100644 +--- a/mdrestore/Makefile ++++ b/mdrestore/Makefile +@@ -10,7 +10,7 @@ CFILES = xfs_mdrestore.c + + LLDLIBS = $(LIBXFS) $(LIBFROG) $(LIBRT) $(LIBPTHREAD) $(LIBUUID) + LTDEPENDENCIES = $(LIBXFS) $(LIBFROG) +-LLDFLAGS = -static ++LLDFLAGS = -static-libtool-libs + + default: depend $(LTCOMMAND) + +diff --git a/scrub/Makefile b/scrub/Makefile +index 063279400262..949f6fd8ba94 100644 +--- a/scrub/Makefile ++++ b/scrub/Makefile +@@ -70,7 +70,7 @@ xfs_scrub.c + + LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBICU_LIBS) $(LIBRT) + LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG) +-LLDFLAGS = -static ++LLDFLAGS = -static-libtool-libs + + ifeq ($(HAVE_MALLINFO),yes) + LCFLAGS += -DHAVE_MALLINFO +-- +2.16.2 + diff --git a/package/xfsprogs/0002-libxfs-do-not-try-to-run-the-crc32selftest.patch b/package/xfsprogs/0002-libxfs-do-not-try-to-run-the-crc32selftest.patch new file mode 100644 index 00000000..6778d069 --- /dev/null +++ b/package/xfsprogs/0002-libxfs-do-not-try-to-run-the-crc32selftest.patch @@ -0,0 +1,44 @@ +From 3a77dfc54271059dcac305384bf6ace34fe1f3d3 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 18 Dec 2016 15:37:27 +0100 +Subject: [PATCH] libxfs: do not try to run the crc32selftest + +Even though the crc32selftest is natively compiled (because it is to be +executed), it fails in cross-compilation as the host may lack the +required headers, like uuid/uuid.h (e.g. in a minimal environment). + +Moreover, running the crc32selftest natively is completely wrong, +because it passing on the host does not mean it would still pass n the +target (because endianness or bitness or alignment differences). + +So, just disable running the crc32selftest altogether. + +Note that there's a remaining bug-in-hiding, because the crc32 table +generator is natively built, but with the target CFLAGS. + +Signed-off-by: "Yann E. MORIN" +Signed-off-by: "Fabrice Fontaine" +[Update for 4.18.0: crc32 has been moved from libxfs to libfrog] +--- + libxfs/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libfrog/Makefile b/libxfs/Makefile +index 62608bd..e021625 100644 +--- a/libfrog/Makefile ++++ b/libfrog/Makefile +@@ -112,9 +112,9 @@ LTLIBS = $(LIBPTHREAD) $(LIBRT) + # don't try linking xfs_repair with a debug libxfs. + DEBUG = -DNDEBUG + +-LDIRT = gen_crc32table crc32table.h crc32selftest ++LDIRT = gen_crc32table crc32table.h + +-default: crc32selftest ltdepend $(LTLIBRARY) ++default: ltdepend $(LTLIBRARY) + + crc32table.h: gen_crc32table.c + @echo " [CC] gen_crc32table" +-- +2.7.4 + diff --git a/package/xfsprogs/Config.in b/package/xfsprogs/Config.in new file mode 100644 index 00000000..b8e07cc8 --- /dev/null +++ b/package/xfsprogs/Config.in @@ -0,0 +1,16 @@ +comment "xfsprogs needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_XFSPROGS + bool "xfsprogs" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_INIH + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + help + The XFS file system utilities and libraries + + http://xfs.org diff --git a/package/xfsprogs/xfsprogs.hash b/package/xfsprogs/xfsprogs.hash new file mode 100644 index 00000000..b379839e --- /dev/null +++ b/package/xfsprogs/xfsprogs.hash @@ -0,0 +1,6 @@ +# From https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/sha256sums.asc +sha256 e04017e46d43e4d54b9a560fd7cea922520f8f6ef882404969d20cd4e5c790e9 xfsprogs-5.10.0.tar.xz + +# Hash for license files +sha256 f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79 LICENSES/GPL-2.0 +sha256 0b9a4febcdee6de55872501d5c1a8f5d8b0d1650cd4d5351995ceb22e889f8ca LICENSES/LGPL-2.1 diff --git a/package/xfsprogs/xfsprogs.mk b/package/xfsprogs/xfsprogs.mk new file mode 100644 index 00000000..71d02278 --- /dev/null +++ b/package/xfsprogs/xfsprogs.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# xfsprogs +# +################################################################################ + +XFSPROGS_VERSION = 5.10.0 +XFSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/fs/xfs/xfsprogs +XFSPROGS_SOURCE = xfsprogs-$(XFSPROGS_VERSION).tar.xz +XFSPROGS_LICENSE = GPL-2.0, GPL-2.0+, LGPL-2.1 (libhandle, few headers) +XFSPROGS_LICENSE_FILES = LICENSES/GPL-2.0 LICENSES/LGPL-2.1 + +XFSPROGS_DEPENDENCIES = inih util-linux + +XFSPROGS_CONF_ENV = ac_cv_header_aio_h=yes ac_cv_lib_rt_lio_listio=yes PLATFORM="linux" +XFSPROGS_CONF_OPTS = \ + --enable-lib64=no \ + --enable-gettext=no \ + INSTALL_USER=root \ + INSTALL_GROUP=root \ + --enable-static + +ifeq ($(BR2_PACKAGE_ICU),y) +XFSPROGS_DEPENDENCIES += icu +XFSPROGS_CONF_OPTS += --enable-libicu +else +XFSPROGS_CONF_OPTS += --disable-libicu +endif + +XFSPROGS_INSTALL_TARGET_OPTS = DIST_ROOT=$(TARGET_DIR) install + +$(eval $(autotools-package)) diff --git a/package/xinetd/0001-ar.patch b/package/xinetd/0001-ar.patch new file mode 100644 index 00000000..566f2f75 --- /dev/null +++ b/package/xinetd/0001-ar.patch @@ -0,0 +1,74 @@ +This patch changes all of the hard-coded invocations of "ar" to $(AR), to +support a cross-compilation toolchain. + +The content of this patch was copied from the OpenWrt project: +https://dev.openwrt.org/browser/packages/net/xinetd/patches/001-ar.patch + +Signed-off-by: Danomi Manchego + +--- a/libs/src/misc/Makefile.in ++++ b/libs/src/misc/Makefile.in +@@ -62,7 +62,7 @@ + + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/portable/Makefile.in ++++ b/libs/src/portable/Makefile.in +@@ -57,7 +57,7 @@ + + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/pset/Makefile.in ++++ b/libs/src/pset/Makefile.in +@@ -53,7 +53,7 @@ + mv $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/sio/Makefile.in ++++ b/libs/src/sio/Makefile.in +@@ -52,7 +52,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/str/Makefile.in ++++ b/libs/src/str/Makefile.in +@@ -63,7 +63,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + LINT_IGNORE=possible pointer alignment|RCSid unused +--- a/libs/src/xlog/Makefile.in ++++ b/libs/src/xlog/Makefile.in +@@ -58,7 +58,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) diff --git a/package/xinetd/0002-destdir.patch b/package/xinetd/0002-destdir.patch new file mode 100644 index 00000000..7a323eb6 --- /dev/null +++ b/package/xinetd/0002-destdir.patch @@ -0,0 +1,55 @@ +This patch adds $(DESTDIR) to xinetd's installation paths, to support +installation to a cross-compiled RFS area. + +The content of this patch was inspired by the OpenWrt project: +https://dev.openwrt.org/browser/packages/net/xinetd/patches/002-destdir.patch + +Signed-off-by: Danomi Manchego + +diff -urN xinetd-2.3.15.ORIG/Makefile.in xinetd-2.3.15/Makefile.in +--- xinetd-2.3.15.ORIG/Makefile.in 2007-09-20 13:01:52.000000000 -0400 ++++ xinetd-2.3.15/Makefile.in 2012-06-18 10:20:00.540864388 -0400 +@@ -75,27 +75,27 @@ + + install: build + for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \ +- test -d $$i || mkdir -p $$i ; done +- $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR) +- $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) +- $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 ++ test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done ++ $(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8 + @echo "You must put your xinetd.conf in /etc/xinetd.conf" + @echo "There is a sample config file in xinetd/sample.conf and you can" + @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format" + + uninstall: +- rm -f $(DAEMONDIR)/xinetd +- rm -f $(DAEMONDIR)/itox +- rm -f $(DAEMONDIR)/xconv.pl +- rm -f $(MANDIR)/man5/xinetd.conf.5 +- rm -f $(MANDIR)/man8/xinetd.log.8 +- rm -f $(MANDIR)/man8/xinetd.8 +- rm -f $(MANDIR)/man8/itox.8 ++ rm -f $(DESTDIR)$(DAEMONDIR)/xinetd ++ rm -f $(DESTDIR)$(DAEMONDIR)/itox ++ rm -f $(DESTDIR)$(DAEMONDIR)/xconv.pl ++ rm -f $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5 ++ rm -f $(DESTDIR)$(MANDIR)/man8/xinetd.log.8 ++ rm -f $(DESTDIR)$(MANDIR)/man8/xinetd.8 ++ rm -f $(DESTDIR)$(MANDIR)/man8/itox.8 + + distclean: clean + rm -f config.cache config.log Makefile config.status xinetd/itox diff --git a/package/xinetd/0003-rpc-fix.patch b/package/xinetd/0003-rpc-fix.patch new file mode 100644 index 00000000..6c32b729 --- /dev/null +++ b/package/xinetd/0003-rpc-fix.patch @@ -0,0 +1,26 @@ +This patch fixes compiling xinetd without RPC support. + +The content of this patch was copied from the OpenWrt project: +https://dev.openwrt.org/browser/packages/net/xinetd/patches/003-rpc_fix.patch + +Signed-off-by: Danomi Manchego + +--- a/xinetd/confparse.c ++++ b/xinetd/confparse.c +@@ -745,7 +745,7 @@ static status_e check_entry( struct serv + } + } + +-/* #ifndef NO_RPC */ ++#ifndef NO_RPC + #if defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H) + if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) ) + { +@@ -759,6 +759,7 @@ static status_e check_entry( struct serv + SC_RPCDATA( scp )->rd_program_number = rep->r_number ; + } + else ++#endif + #endif /* ! NO_RPC */ + { + if ( !SC_IS_UNLISTED( scp ) ) diff --git a/package/xinetd/0004-configure-rlim_t.patch b/package/xinetd/0004-configure-rlim_t.patch new file mode 100644 index 00000000..e1cb48ac --- /dev/null +++ b/package/xinetd/0004-configure-rlim_t.patch @@ -0,0 +1,18 @@ +Have the configure script look for rlim_t in + +That's where POSIX says it should be. Some libcs will include its +definition via as well, but musl doesn't. + +Signed-off-by: Maarten ter Huurne + +--- xinetd-2.3.15.orig/configure 2007-09-20 16:58:27.000000000 +0200 ++++ xinetd-2.3.15/configure 2014-09-16 17:20:22.787665449 +0200 +@@ -7909,7 +7909,7 @@ + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#include ++#include + #if STDC_HEADERS + #include + #endif diff --git a/package/xinetd/0005-CVE-2013-4342-xinetd-ignores-user-and-group-directiv.patch b/package/xinetd/0005-CVE-2013-4342-xinetd-ignores-user-and-group-directiv.patch new file mode 100644 index 00000000..bb2ee1fc --- /dev/null +++ b/package/xinetd/0005-CVE-2013-4342-xinetd-ignores-user-and-group-directiv.patch @@ -0,0 +1,29 @@ +From 91e2401a219121eae15244a6b25d2e79c1af5864 Mon Sep 17 00:00:00 2001 +From: Thomas Swan +Date: Wed, 2 Oct 2013 23:17:17 -0500 +Subject: [PATCH] CVE-2013-4342: xinetd: ignores user and group directives for + TCPMUX services + +Originally reported to Debian in 2005 and rediscovered , xinetd would execute TCPMUX services without dropping privilege to match the service configuration allowing the service to run with same privilege as the xinetd process (root). + +Signed-off-by: Peter Korsgaard +--- + xinetd/builtins.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xinetd/builtins.c b/xinetd/builtins.c +index 3b85579..34a5bac 100644 +--- a/xinetd/builtins.c ++++ b/xinetd/builtins.c +@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp ) + if( SC_IS_INTERNAL( scp ) ) { + SC_INTERNAL(scp, nserp); + } else { +- exec_server(nserp); ++ child_process(nserp); + } + } + +-- +2.20.1 + diff --git a/package/xinetd/Config.in b/package/xinetd/Config.in new file mode 100644 index 00000000..3bf3043d --- /dev/null +++ b/package/xinetd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XINETD + bool "xinetd" + depends on BR2_USE_MMU # fork() + help + xinetd is a secure replacement for inetd. It was originally + written by panos@cs.colorado.edu. + + http://www.xinetd.org diff --git a/package/xinetd/xinetd.hash b/package/xinetd/xinetd.hash new file mode 100644 index 00000000..ce5a93f5 --- /dev/null +++ b/package/xinetd/xinetd.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 620b25f4ab4d72fdf32b13797156ea40df2049f1c07e640177e5fec544e9a94c xinetd-2.3.15.tar.gz +sha256 2f3dd19831b1837f7360f80a7700a130c04a59e387d4359299d6df712308bbed COPYRIGHT diff --git a/package/xinetd/xinetd.mk b/package/xinetd/xinetd.mk new file mode 100644 index 00000000..f58c26f0 --- /dev/null +++ b/package/xinetd/xinetd.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# xinetd +# +################################################################################ + +XINETD_VERSION = 2.3.15 +XINETD_SITE = \ + $(call github,xinetd-org,xinetd,xinetd-$(subst .,-,$(XINETD_VERSION))) +XINETD_LICENSE = xinetd license +XINETD_LICENSE_FILES = COPYRIGHT +XINETD_CPE_ID_VENDOR = xinetd + +# 0005-CVE-2013-4342-xinetd-ignores-user-and-group-directiv.patch +XINETD_IGNORE_CVES += CVE-2013-4342 + +XINETD_CFLAGS = $(TARGET_CFLAGS) + +# Three cases here: +# 1. We have libtirpc, use it by passing special flags +# 2. We have native RPC support, use it, no need to pass special +# flags (so this case 2 is implicit and not visible below) +# 3. We don't have RPC support, pass -DNO_RPC to disable it +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +XINETD_DEPENDENCIES += libtirpc host-pkgconf +XINETD_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" +XINETD_LIBS += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`" +else ifeq ($(BR2_TOOLCHAIN_HAS_NATIVE_RPC),) +XINETD_CFLAGS += -DNO_RPC +endif + +XINETD_CONF_ENV += \ + CFLAGS="$(XINETD_CFLAGS)" \ + LIBS="$(XINETD_LIBS)" + +XINETD_MAKE_OPTS = AR="$(TARGET_AR)" + +$(eval $(autotools-package)) diff --git a/package/xl2tp/Config.in b/package/xl2tp/Config.in new file mode 100644 index 00000000..7e2d2f6e --- /dev/null +++ b/package/xl2tp/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_XL2TP + bool "xl2tp" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBPCAP + help + Layer 2 Tunnelling Protocol (RFC2661). + + xl2tpd is an open source implementation of the L2TP tunneling + protocol. xl2tpd is forked from l2tpd and is maintained by + Xelerance Corporation. + + http://www.xelerance.com/software/xl2tpd/ diff --git a/package/xl2tp/xl2tp.hash b/package/xl2tp/xl2tp.hash new file mode 100644 index 00000000..471657f0 --- /dev/null +++ b/package/xl2tp/xl2tp.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 c28608b315adb25c8bf9579c1d6ab52ab47c4c43b68a5ab63c5d039196fd180f xl2tp-1.3.16.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE diff --git a/package/xl2tp/xl2tp.mk b/package/xl2tp/xl2tp.mk new file mode 100644 index 00000000..89ca65a7 --- /dev/null +++ b/package/xl2tp/xl2tp.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# xl2tp +# +################################################################################ + +XL2TP_VERSION = 1.3.16 +XL2TP_SITE = $(call github,xelerance,xl2tpd,v$(XL2TP_VERSION)) +XL2TP_DEPENDENCIES = libpcap +XL2TP_LICENSE = GPL-2.0 +XL2TP_LICENSE_FILES = LICENSE + +ifeq ($(BR2_STATIC_LIBS),y) +XL2TP_LDLIBS = LDLIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`" +endif + +define XL2TP_BUILD_CMDS + $(SED) 's/ -O2 //' $(@D)/Makefile + $(TARGET_CONFIGURE_OPTS) $(MAKE) $(XL2TP_LDLIBS) -C $(@D) +endef + +define XL2TP_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/xl2tp/xl2tpd b/package/xl2tp/xl2tpd new file mode 100755 index 00000000..36c12a23 --- /dev/null +++ b/package/xl2tp/xl2tpd @@ -0,0 +1,27 @@ +#!/bin/sh +# +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/xl2tpd +PIDFILE=/var/run/xl2tpd.pid + +test -f $DAEMON || exit 0 + +case "$1" in + start) + start-stop-daemon -S -p $PIDFILE -x $DAEMON -- -D & + ;; + stop) + start-stop-daemon -K -p $PIDFILE -x $DAEMON + ;; + restart|force-reload) + start-stop-daemon -K -p $PIDFILE -x $DAEMON + sleep 1 + start-stop-daemon -S -p $PIDFILE -x $DAEMON + ;; + *) + echo "Usage: /etc/init.d/xl2tdp {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/package/xmlstarlet/Config.in b/package/xmlstarlet/Config.in new file mode 100644 index 00000000..99762b87 --- /dev/null +++ b/package/xmlstarlet/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XMLSTARLET + bool "xmlstarlet" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Command Line XML Toolkit + + http://xmlstar.sourceforge.net/ diff --git a/package/xmlstarlet/xmlstarlet.hash b/package/xmlstarlet/xmlstarlet.hash new file mode 100644 index 00000000..71911509 --- /dev/null +++ b/package/xmlstarlet/xmlstarlet.hash @@ -0,0 +1,5 @@ +# From https://sourceforge.net/projects/xmlstar/files/xmlstarlet/1.6.1/ +sha1 87bb104f546caca71b9540807c5b2738944cb219 xmlstarlet-1.6.1.tar.gz +md5 f3c5dfa3b1a2ee06cd57c255cc8b70a0 xmlstarlet-1.6.1.tar.gz +# Locally computed +sha256 6641cc5b00c1651fa22175f34efd01695e64a348b1ba07048538276f44866862 COPYING diff --git a/package/xmlstarlet/xmlstarlet.mk b/package/xmlstarlet/xmlstarlet.mk new file mode 100644 index 00000000..b79c3f56 --- /dev/null +++ b/package/xmlstarlet/xmlstarlet.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# xmlstarlet +# +################################################################################ + +XMLSTARLET_VERSION = 1.6.1 +XMLSTARLET_SITE = http://downloads.sourceforge.net/project/xmlstar/xmlstarlet/$(XMLSTARLET_VERSION) +XMLSTARLET_LICENSE = MIT +XMLSTARLET_LICENSE_FILES = COPYING + +XMLSTARLET_DEPENDENCIES += libxml2 libxslt \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +XMLSTARLET_CONF_OPTS += \ + --with-libxml-prefix=$(STAGING_DIR)/usr \ + --with-libxslt-prefix=$(STAGING_DIR)/usr \ + --with-libiconv-prefix=$(STAGING_DIR)/usr + +ifeq ($(BR2_STATIC_LIBS),y) +XMLSTARLET_CONF_OPTS += --enable-static-libs +XMLSTARLET_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libxml-2.0 libexslt`" +else +XMLSTARLET_CONF_OPTS += --disable-static-libs +endif + +HOST_XMLSTARLET_DEPENDENCIES += host-libxml2 host-libxslt + +HOST_XMLSTARLET_CONF_OPTS += \ + --with-libxml-prefix=$(HOST_DIR) \ + --with-libxslt-prefix=$(HOST_DIR) + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/xorcurses/Config.in b/package/xorcurses/Config.in new file mode 100644 index 00000000..6a94a2ee --- /dev/null +++ b/package/xorcurses/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XORCURSES + bool "xorcurses" + select BR2_PACKAGE_NCURSES + help + XorCurses is a game remake of the 8-bit game 'Xor'. Your task + is to roam around a series of mazes where you have to collect + all blue masks before finding the exit. Note that the game + needs a terminal with colors, i.e. make sure that the TERM + environment variable is set to "linux" ("vt100" won't work). + + https://github.com/jwm-art-net/XorCurses/ diff --git a/package/xorcurses/xorcurses.hash b/package/xorcurses/xorcurses.hash new file mode 100644 index 00000000..549b5adf --- /dev/null +++ b/package/xorcurses/xorcurses.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 6c60a41b9a74ecd5f6ded337b9982e81eaf7b31a654a4a32b219e3a2ff638ae3 xorcurses-04b664826c5bd30dd483f6a5c8c189ef97e255da.tar.gz +sha256 8632a67e5a76be4cdf7fd0fc6509e21bd6c647183bd9d2325310d5098c652a3a README diff --git a/package/xorcurses/xorcurses.mk b/package/xorcurses/xorcurses.mk new file mode 100644 index 00000000..10b746f2 --- /dev/null +++ b/package/xorcurses/xorcurses.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# xorcurses +# +################################################################################ + +XORCURSES_VERSION = 04b664826c5bd30dd483f6a5c8c189ef97e255da +XORCURSES_SITE = $(call github,jwm-art-net,XorCurses,$(XORCURSES_VERSION)) +XORCURSES_DEPENDENCIES = ncurses +XORCURSES_LICENSE = GPL-3.0 +XORCURSES_LICENSE_FILES = README + +define XORCURSES_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99 \ + -DDATADIR='\"/usr/share/xorcurses\"' \ + -DVERSION='\"$(XORCURSES_VERSION)\"'" +endef + +define XORCURSES_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/xorcurses $(TARGET_DIR)/usr/bin/xorcurses + mkdir -p $(TARGET_DIR)/usr/share/xorcurses/maps + $(INSTALL) -D -m 0644 $(@D)/maps/*.xcm \ + $(TARGET_DIR)/usr/share/xorcurses/maps/ +endef + +$(eval $(generic-package)) diff --git a/package/xorriso/Config.in b/package/xorriso/Config.in new file mode 100644 index 00000000..60b2642d --- /dev/null +++ b/package/xorriso/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_XORRISO + bool "xorriso" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + xorriso copies file objects from POSIX compliant + filesystems into Rock Ridge enhanced ISO 9660 filesystems + and allows session-wise manipulation of such filesystems. + It can load the management information of existing ISO + images and it writes the session results to optical media + or to filesystem objects. + + Vice versa xorriso is able to copy file objects out of ISO + 9660 filesystems. + + https://www.gnu.org/software/xorriso + +comment "xorriso needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/xorriso/Config.in.host b/package/xorriso/Config.in.host new file mode 100644 index 00000000..2baa0437 --- /dev/null +++ b/package/xorriso/Config.in.host @@ -0,0 +1,14 @@ +config BR2_PACKAGE_HOST_XORRISO + bool "host xorriso" + help + xorriso copies file objects from POSIX compliant + filesystems into Rock Ridge enhanced ISO 9660 filesystems + and allows session-wise manipulation of such filesystems. + It can load the management information of existing ISO + images and it writes the session results to optical media + or to filesystem objects. + + Vice versa xorriso is able to copy file objects out of ISO + 9660 filesystems. + + https://www.gnu.org/software/xorriso diff --git a/package/xorriso/xorriso.hash b/package/xorriso/xorriso.hash new file mode 100644 index 00000000..faaeab5f --- /dev/null +++ b/package/xorriso/xorriso.hash @@ -0,0 +1,4 @@ +# Locally computed +sha256 3b69f5c93ae7c40c5bbe4a847fa3963f5efc9c565551622f77121c5792fc17e7 xorriso-1.5.2.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING +sha256 72e99e72cd68f226415e5d898f3b38e24ae7991ed038ed72d789fff5b060f028 COPYRIGHT diff --git a/package/xorriso/xorriso.mk b/package/xorriso/xorriso.mk new file mode 100644 index 00000000..7b38f268 --- /dev/null +++ b/package/xorriso/xorriso.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# xorriso +# +################################################################################ + +XORRISO_VERSION = 1.5.2 +XORRISO_SITE = $(BR2_GNU_MIRROR)/xorriso +XORRISO_LICENSE = GPL-3.0+ +XORRISO_LICENSE_FILES = COPYING COPYRIGHT + +# Disable everything until we actually need those features, and add the correct +# host libraries +HOST_XORRISO_CONF_OPTS = \ + --disable-xattr-h-pref-attr \ + --disable-zlib \ + --disable-libbz2 \ + --disable-libcdio \ + --disable-libreadline \ + --disable-libedit \ + --disable-libacl + +# libcdio doesn't make sense for Linux +# http://lists.gnu.org/archive/html/bug-xorriso/2017-04/msg00004.html +XORRISO_CONF_OPTS = --disable-libcdio + +# we need sys/xattr.h +XORRISO_CONF_OPTS += \ + --disable-xattr-h-pref-attr + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +XORRISO_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +XORRISO_DEPENDENCIES += readline +XORRISO_CONF_OPTS += --enable-libreadline +else +XORRISO_CONF_OPTS += --disable-libreadline +endif + +ifeq ($(BR2_PACKAGE_ACL),y) +XORRISO_DEPENDENCIES += acl +XORRISO_CONF_OPTS += --enable-libacl +else +XORRISO_CONF_OPTS += --disable-libacl +endif + +ifeq ($(BR2_PACKAGE_ATTR),y) +XORRISO_DEPENDENCIES += attr +XORRISO_CONF_OPTS += --enable-xattr +else +XORRISO_CONF_OPTS += --disable-xattr +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +XORRISO_DEPENDENCIES += zlib +XORRISO_CONF_OPTS += --enable-zlib +else +XORRISO_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +XORRISO_DEPENDENCIES += bzip2 +XORRISO_CONF_OPTS += --enable-libbz2 +else +XORRISO_CONF_OPTS += --disable-libbz2 +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +XORRISO_CONF_OPTS += --enable-jtethreads +else +XORRISO_CONF_OPTS += --disable-jtethreads +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/xr819-xradio/Config.in b/package/xr819-xradio/Config.in new file mode 100644 index 00000000..9d7fa4b0 --- /dev/null +++ b/package/xr819-xradio/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XR819_XRADIO + bool "xr819-xradio" + depends on BR2_LINUX_KERNEL + help + Wireless driver for SDIO WiFi chip XR819 + + https://github.com/fifteenhex/xradio + +comment "xr819-xradio driver needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/package/xr819-xradio/xr819-xradio.hash b/package/xr819-xradio/xr819-xradio.hash new file mode 100644 index 00000000..efff92ab --- /dev/null +++ b/package/xr819-xradio/xr819-xradio.hash @@ -0,0 +1,4 @@ +# Locally computed +sha256 5900821a777b9008d7cf9b8128e0cb75a4623ecb608b45438e17c7a056cde1bf xr819-xradio-6bf0e2e21c80456e2a3d4ad1267caecde7165871.tar.gz +# Locally computed +sha256 db296f2f7f35bca3a174efb0eb392b3b17bd94b341851429a3dff411b1c2fc73 LICENSE diff --git a/package/xr819-xradio/xr819-xradio.mk b/package/xr819-xradio/xr819-xradio.mk new file mode 100644 index 00000000..c1fe3295 --- /dev/null +++ b/package/xr819-xradio/xr819-xradio.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# xr819-xradio +# +################################################################################ + +XR819_XRADIO_VERSION = 6bf0e2e21c80456e2a3d4ad1267caecde7165871 +XR819_XRADIO_SITE = $(call github,fifteenhex,xradio,$(XR819_XRADIO_VERSION)) +XR819_XRADIO_LICENSE = GPL-2.0 +XR819_XRADIO_LICENSE_FILES = LICENSE + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/xscreensaver/Config.in b/package/xscreensaver/Config.in new file mode 100644 index 00000000..d773c699 --- /dev/null +++ b/package/xscreensaver/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_XSCREENSAVER + bool "xscreensaver" + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2 -> pango + depends on BR2_TOOLCHAIN_HAS_THREADS # gdk-pixbuf, libgtk2 -> glib2 + depends on BR2_USE_WCHAR # gdk-pixbuf, libgtk2 -> glib2 + depends on BR2_USE_MMU # gdk-pixbuf, libgtk2 -> glib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 -> pango -> harfbuzz + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # libgtk2 -> pango -> harfbuzz + select BR2_PACKAGE_GDK_PIXBUF + select BR2_PACKAGE_LIBGLU if BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXT + help + XScreenSaver is the standard screen saver collection shipped + on most Linux and Unix systems running the X11 Window + System. + + On X11 systems, XScreenSaver is two things: it is both a + large collection of screen savers; and it is also the + framework for blanking and locking the screen. + + http://www.jwz.org/xscreensaver/ + +comment "xscreensaver needs a toolchain w/ wchar, C++, threads, gcc >= 4.8" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \ + !BR2_USE_WCHAR diff --git a/package/xscreensaver/xscreensaver.hash b/package/xscreensaver/xscreensaver.hash new file mode 100644 index 00000000..26ecd8bb --- /dev/null +++ b/package/xscreensaver/xscreensaver.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 7016df6736ba0126a68c1f35abcf411a695fe93bc01a18ebd9df46c9a9f4d50d xscreensaver-5.45.tar.gz +sha256 8a03451ba5c4c9af669b53e47e50c38c149b9e152d3d627809b962da7b760bbd hacks/screenhack.h +sha256 56db580415bb313a4a82c5e08f106304904d15d42faf8e6ab14b34e14e2087a5 hacks/glx/chessmodels.h diff --git a/package/xscreensaver/xscreensaver.mk b/package/xscreensaver/xscreensaver.mk new file mode 100644 index 00000000..c3c9ec89 --- /dev/null +++ b/package/xscreensaver/xscreensaver.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# xscreensaver +# +################################################################################ + +XSCREENSAVER_VERSION = 5.45 +XSCREENSAVER_SITE = https://www.jwz.org/xscreensaver + +# N.B. GPL-2.0+ code (in the hacks/glx subdirectory) is not currently built. +XSCREENSAVER_LICENSE = MIT-like, GPL-2.0+ +XSCREENSAVER_LICENSE_FILES = hacks/screenhack.h hacks/glx/chessmodels.h +XSCREENSAVER_CPE_ID_VENDOR = xscreensaver_project + +XSCREENSAVER_DEPENDENCIES = \ + gdk-pixbuf \ + jpeg \ + libgtk2 \ + libxml2 \ + xlib_libX11 \ + xlib_libXt \ + $(TARGET_NLS_DEPENDENCIES) \ + host-intltool + +# otherwise we end up with host include/library dirs passed to the +# compiler/linker +XSCREENSAVER_CONF_OPTS = \ + --includedir=$(STAGING_DIR)/usr/include \ + --libdir=$(STAGING_DIR)/usr/lib + +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +XSCREENSAVER_CONF_OPTS += --with-gl=yes +XSCREENSAVER_DEPENDENCIES += libgl libglu +else +XSCREENSAVER_CONF_OPTS += --with-gl=no +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +XSCREENSAVER_CONF_OPTS += --with-png=yes +XSCREENSAVER_DEPENDENCIES += libpng +else +XSCREENSAVER_CONF_OPTS += --with-png=no +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +XSCREENSAVER_CONF_OPTS += --with-systemd=yes +XSCREENSAVER_DEPENDENCIES += systemd +else +XSCREENSAVER_CONF_OPTS += --with-systemd=no +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y) +XSCREENSAVER_CONF_OPTS += --with-xft=yes +XSCREENSAVER_DEPENDENCIES += xlib_libXft +else +XSCREENSAVER_CONF_OPTS += --with-xft=no +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) +XSCREENSAVER_CONF_OPTS += --with-xinput-ext=yes +XSCREENSAVER_DEPENDENCIES += xlib_libXi +else +XSCREENSAVER_CONF_OPTS += --with-xinput-ext=no +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +XSCREENSAVER_CONF_OPTS += --with-xinerama-ext=yes +XSCREENSAVER_DEPENDENCIES += xlib_libXinerama +else +XSCREENSAVER_CONF_OPTS += --with-xinerama-ext=no +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +XSCREENSAVER_CONF_OPTS += --with-randr-ext=yes +XSCREENSAVER_DEPENDENCIES += xlib_libXrandr +else +XSCREENSAVER_CONF_OPTS += --with-randr-ext=no +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y) +XSCREENSAVER_CONF_OPTS += --with-xf86vmode-ext=yes +XSCREENSAVER_DEPENDENCIES += xlib_libXxf86vm +else +XSCREENSAVER_CONF_OPTS += --with-xf86vmode-ext=no +endif + +XSCREENSAVER_INSTALL_TARGET_OPTS = install_prefix="$(TARGET_DIR)" install + +$(eval $(autotools-package)) diff --git a/package/xtables-addons/Config.in b/package/xtables-addons/Config.in new file mode 100644 index 00000000..36a42c7e --- /dev/null +++ b/package/xtables-addons/Config.in @@ -0,0 +1,19 @@ +comment "xtables-addons needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +comment "xtables-addons needs a toolchain w/ dynamic library, threads" + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_XTABLES_ADDONS + bool "xtables-addons" + depends on BR2_LINUX_KERNEL + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # extensions are .so + select BR2_PACKAGE_IPTABLES + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + Xtables-addons is the successor to patch-o-matic(-ng). + Likewise, it contains extensions that were not, or are not + yet, accepted in the main kernel/iptables packages. + + https://inai.de/projects/xtables-addons/ diff --git a/package/xtables-addons/xtables-addons.hash b/package/xtables-addons/xtables-addons.hash new file mode 100644 index 00000000..2cfb9117 --- /dev/null +++ b/package/xtables-addons/xtables-addons.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 893c0c4ea09759cda1ab7e68f1281d125e59270f7b59e446204ce686c6a76d65 xtables-addons-3.13.tar.xz +sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE diff --git a/package/xtables-addons/xtables-addons.mk b/package/xtables-addons/xtables-addons.mk new file mode 100644 index 00000000..55e1a5d0 --- /dev/null +++ b/package/xtables-addons/xtables-addons.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# xtables-addons +# +################################################################################ + +XTABLES_ADDONS_VERSION = 3.13 +XTABLES_ADDONS_SOURCE = xtables-addons-$(XTABLES_ADDONS_VERSION).tar.xz +XTABLES_ADDONS_SITE = https://inai.de/files/xtables-addons +XTABLES_ADDONS_DEPENDENCIES = iptables linux host-pkgconf +XTABLES_ADDONS_LICENSE = GPL-2.0+ +XTABLES_ADDONS_LICENSE_FILES = LICENSE + +XTABLES_ADDONS_CONF_OPTS = \ + --with-kbuild="$(LINUX_DIR)" \ + --with-xtables="$(STAGING_DIR)/usr" \ + --with-xtlibdir="/usr/lib/xtables" + +# geoip helpers need perl with modules and unzip so disable +define XTABLES_DISABLE_GEOIP_HELPERS + $(SED) 's/ geoip//' $(@D)/Makefile.in +endef +XTABLES_ADDONS_POST_PATCH_HOOKS += XTABLES_DISABLE_GEOIP_HELPERS + +define XTABLES_ADDONS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) +endef + +define XTABLES_ADDONS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) DESTDIR="$(TARGET_DIR)" install +endef + +define XTABLES_ADDONS_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED) + $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK) + $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_MARK) + $(call KCONFIG_ENABLE_OPT,CONFIG_NF_NAT) +endef + +$(eval $(autotools-package)) diff --git a/package/xterm/Config.in b/package/xterm/Config.in new file mode 100644 index 00000000..eaa756a4 --- /dev/null +++ b/package/xterm/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XTERM + bool "xterm" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_XLIB_LIBXAW + help + xterm terminal emulator + + http://invisible-island.net/xterm/ diff --git a/package/xterm/xterm.hash b/package/xterm/xterm.hash new file mode 100644 index 00000000..d6d80ad9 --- /dev/null +++ b/package/xterm/xterm.hash @@ -0,0 +1,4 @@ +# Locally calculated after checking pgp signature +sha256 27f1a8b1c756e269fd5684e60802b545f0be9b36b8b5d6bdbc840c6b000dc51f xterm-367.tgz +# Locally calculated +sha256 dfb668cc977e24649500f3cc54de3e2b793928d210715a445ab1227930b07ba6 COPYING diff --git a/package/xterm/xterm.mk b/package/xterm/xterm.mk new file mode 100644 index 00000000..e09d350a --- /dev/null +++ b/package/xterm/xterm.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# xterm +# +################################################################################ + +XTERM_VERSION = 367 +XTERM_SOURCE = xterm-$(XTERM_VERSION).tgz +XTERM_SITE = http://invisible-mirror.net/archives/xterm +XTERM_DEPENDENCIES = ncurses xlib_libXaw host-pkgconf +XTERM_LICENSE = MIT +XTERM_LICENSE_FILES = COPYING +XTERM_CPE_ID_VENDOR = invisible-island +XTERM_CONF_OPTS = --enable-256-color \ + --x-includes=$(STAGING_DIR)/usr/include \ + --x-libraries=$(STAGING_DIR)/usr/lib + +# Avoid freetype2 path poisoning by imake +XTERM_CONF_ENV = ac_cv_path_IMAKE="" + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y) +XTERM_DEPENDENCIES += xlib_libXft +XTERM_CONF_OPTS += --enable-freetype \ + --with-freetype-config=auto +else +XTERM_CONF_OPTS += --disable-freetype +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +XTERM_DEPENDENCIES += xlib_libXinerama +XTERM_CONF_OPTS += --with-xinerama +else +XTERM_CONF_OPTS += --without-xinerama +endif + +$(eval $(autotools-package)) diff --git a/package/xutil_util-macros/Config.in b/package/xutil_util-macros/Config.in new file mode 100644 index 00000000..10b1a59a --- /dev/null +++ b/package/xutil_util-macros/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XUTIL_UTIL_MACROS + bool "util-macros" + help + No description available diff --git a/package/xutil_util-macros/xutil_util-macros.hash b/package/xutil_util-macros/xutil_util-macros.hash new file mode 100644 index 00000000..3f28743e --- /dev/null +++ b/package/xutil_util-macros/xutil_util-macros.hash @@ -0,0 +1,5 @@ +# From https://lists.x.org/archives/xorg-announce/2021-January/003069.html +sha256 0f812e6e9d2786ba8f54b960ee563c0663ddbe2434bf24ff193f5feab1f31971 util-macros-1.19.3.tar.bz2 +sha512 b9c7398a912c688a782eab5b1e0f6da2df11a430775c5c98fc3269f73a665de6eeb60d300a849e38d345714a6e51f74e9334cb6039767304cca4b93d823a53a2 util-macros-1.19.3.tar.bz2 +# Locally computed +sha256 489b630a75e3255485732eae3d50ff4d29d3feb66760bb3acb04f897e4d9e375 COPYING diff --git a/package/xutil_util-macros/xutil_util-macros.mk b/package/xutil_util-macros/xutil_util-macros.mk new file mode 100644 index 00000000..b0ce14ee --- /dev/null +++ b/package/xutil_util-macros/xutil_util-macros.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xutil_util-macros +# +################################################################################ + +XUTIL_UTIL_MACROS_VERSION = 1.19.3 +XUTIL_UTIL_MACROS_SOURCE = util-macros-$(XUTIL_UTIL_MACROS_VERSION).tar.bz2 +XUTIL_UTIL_MACROS_SITE = http://xorg.freedesktop.org/releases/individual/util +XUTIL_UTIL_MACROS_LICENSE = MIT +XUTIL_UTIL_MACROS_LICENSE_FILES = COPYING + +XUTIL_UTIL_MACROS_INSTALL_STAGING = YES +XUTIL_UTIL_MACROS_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/xvisor/0001-fix-build-with-gcc-10.patch b/package/xvisor/0001-fix-build-with-gcc-10.patch new file mode 100644 index 00000000..a538558d --- /dev/null +++ b/package/xvisor/0001-fix-build-with-gcc-10.patch @@ -0,0 +1,64 @@ +From 8458abb357cd981f55d730ec2d74459a3042e571 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 6 Oct 2020 21:52:20 +0200 +Subject: [PATCH] fix build with gcc 10 + +Define variables in header files as extern to avoid the following build failure +with gcc 10 (which defaults to -fno-common): + +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/arm-buildroot-linux-gnueabihf-ld: +/home/giuliobenetti/autobuild/run/instance-3/output-1/build/xvisor-0.3.0/build/drivers/mmc/core/mmc.o:/home/giuliobenetti/autobuild/run/instance-3/output-1/build/xvisor-0.3.0/drivers/mmc/core/core.h:67: +multiple definition of `sdio_func_type'; +/home/giuliobenetti/autobuild/run/instance-3/output-1/build/xvisor-0.3.0/build/drivers/mmc/core/core.o:/home/giuliobenetti/autobuild/run/instance-3/output-1/build/xvisor-0.3.0/drivers/mmc/core/core.h:67: +first defined here + +Fixes: + - http://autobuild.buildroot.org/results/b6070c0721b33824e71833ce53423979980aa598 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/xvisor/xvisor/pull/125] +--- + drivers/mmc/core/core.h | 2 +- + emulators/display/drawfn.h | 10 +++++----- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h +index d75d135a..e2ca3141 100644 +--- a/drivers/mmc/core/core.h ++++ b/drivers/mmc/core/core.h +@@ -64,7 +64,7 @@ int mmc_go_idle(struct mmc_host *host); + * Note: Must be called with host->lock held. + */ + extern struct vmm_bus sdio_bus_type; +-struct vmm_device_type sdio_func_type; ++extern struct vmm_device_type sdio_func_type; + + int __sdio_attach(struct mmc_host *host); + +diff --git a/emulators/display/drawfn.h b/emulators/display/drawfn.h +index f9163cff..385deaf6 100644 +--- a/emulators/display/drawfn.h ++++ b/emulators/display/drawfn.h +@@ -69,14 +69,14 @@ typedef void (*drawfn)(struct vmm_surface *, + DRAWFN_ORDER_MAX * \ + DRAWFN_FORMAT_MAX) + +-drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_8[DRAWFN_FNTABLE_SIZE]; + +-drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_15[DRAWFN_FNTABLE_SIZE]; + +-drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_16[DRAWFN_FNTABLE_SIZE]; + +-drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_24[DRAWFN_FNTABLE_SIZE]; + +-drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE]; ++extern drawfn drawfn_surface_fntable_32[DRAWFN_FNTABLE_SIZE]; + + #endif +-- +2.28.0 + diff --git a/package/xvisor/Config.in b/package/xvisor/Config.in new file mode 100644 index 00000000..eb7475b8 --- /dev/null +++ b/package/xvisor/Config.in @@ -0,0 +1,68 @@ +config BR2_PACKAGE_XVISOR_ARCH_SUPPORTS + bool + default y + depends on BR2_USE_MMU + depends on BR2_arm || BR2_aarch64 || BR2_x86_64 + depends on !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV7M + +menuconfig BR2_PACKAGE_XVISOR + bool "xvisor" + depends on BR2_PACKAGE_XVISOR_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Xvisor is an open-source type-1 hypervisor, which aims at + providing a monolithic, light-weight, portable, and flexible + virtualization solution. + + http://www.xhypervisor.org/ + +if BR2_PACKAGE_XVISOR + +choice + prompt "Xvisor configuration" + default BR2_PACKAGE_XVISOR_USE_DEFCONFIG + +config BR2_PACKAGE_XVISOR_USE_DEFCONFIG + bool "Using an in-tree defconfig file" + +config BR2_PACKAGE_XVISOR_USE_CUSTOM_CONFIG + bool "Using a custom (def)config file" + +endchoice + +config BR2_PACKAGE_XVISOR_DEFCONFIG + string "Defconfig name" + default "generic-v5" if BR2_ARM_CPU_ARMV5 + default "generic-v6" if BR2_ARM_CPU_ARMV6 + default "generic-v7" if BR2_ARM_CPU_ARMV7A + default "generic-v8" if BR2_aarch64 + default "x86_64_generic" if BR2_x86_64 + depends on BR2_PACKAGE_XVISOR_USE_DEFCONFIG + help + Name of the Xvisor defconfig file to use, without the + trailing -defconfig. The defconfig is located in + arch//configs in the source tree. + +config BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_PACKAGE_XVISOR_USE_CUSTOM_CONFIG + help + Path to the Xvisor configuration file + +config BR2_PACKAGE_XVISOR_CREATE_UBOOT_IMAGE + bool "Create U-Boot image of Xvisor" + depends on BR2_arm + select BR2_PACKAGE_HOST_UBOOT_TOOLS + help + Create an image file of Xvisor loadable from Das U-Boot. + +config BR2_PACKAGE_XVISOR_BUILD_TEST_DTB + bool "Build test device-tree blobs" + help + Build test device-tree blobs for popular boards. + +endif + +comment "xvisor needs a toolchain w/ gcc >= 4.9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + depends on BR2_PACKAGE_XVISOR_ARCH_SUPPORTS diff --git a/package/xvisor/xvisor.hash b/package/xvisor/xvisor.hash new file mode 100644 index 00000000..6938e20e --- /dev/null +++ b/package/xvisor/xvisor.hash @@ -0,0 +1,3 @@ +# Locally generated +sha256 81660d26a0bc63979ba40872f10511df777185712eba2d0e19e816438388de05 xvisor-0.3.0.tar.xz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/xvisor/xvisor.mk b/package/xvisor/xvisor.mk new file mode 100644 index 00000000..394ff7c8 --- /dev/null +++ b/package/xvisor/xvisor.mk @@ -0,0 +1,86 @@ +################################################################################ +# +# xvisor +# +################################################################################ + +XVISOR_VERSION = 0.3.0 +XVISOR_SOURCE = xvisor-$(XVISOR_VERSION).tar.xz +XVISOR_SITE = http://www.xhypervisor.org/tarball +XVISOR_LICENSE = GPL-2.0+ +XVISOR_LICENSE_FILES = COPYING +XVISOR_INSTALL_IMAGES = YES +XVISOR_INSTALL_TARGET = NO +XVISOR_DEPENDENCIES = host-bison host-dtc host-flex + +XVISOR_MAKE_TARGETS = all + +ifeq ($(BR2_PACKAGE_XVISOR_BUILD_TEST_DTB),y) +XVISOR_MAKE_TARGETS += dtbs +endif + +XVISOR_KCONFIG_DOTCONFIG = build/openconf/.config + +ifeq ($(BR2_PACKAGE_XVISOR_USE_DEFCONFIG),y) +XVISOR_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_PACKAGE_XVISOR_DEFCONFIG))-defconfig +else ifeq ($(BR2_PACKAGE_XVISOR_USE_CUSTOM_CONFIG),y) +XVISOR_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE)) +endif +XVISOR_KCONFIG_EDITORS = menuconfig + +ifeq ($(BR2_x86_64),y) +XVISOR_ARCH = x86 +else ifeq ($(BR2_arm)$(BR2_aarch64),y) +XVISOR_ARCH = arm +endif + +ifeq ($(BR2_PACKAGE_XVISOR)$(BR_BUILDING),yy) +ifeq ($(XVISOR_ARCH),) +$(error "Architecture not supported by XVisor") +endif +endif + +XVISOR_MAKE_ENV = \ + ARCH=$(XVISOR_ARCH) \ + CROSS_COMPILE=$(TARGET_CROSS) + +XVISOR_MAKE_OPTS = $(if $(VERBOSE),VERBOSE=1) + +define XVISOR_BUILD_CMDS + $(TARGET_MAKE_ENV) $(XVISOR_MAKE_ENV) $(MAKE) $(XVISOR_MAKE_OPTS) \ + -C $(@D) $(XVISOR_MAKE_TARGETS) +endef + +define XVISOR_INSTALL_IMAGES_CMDS + $(INSTALL) -m 0644 -D $(@D)/build/vmm.bin $(BINARIES_DIR)/vmm.bin +endef + +ifeq ($(BR2_PACKAGE_XVISOR_CREATE_UBOOT_IMAGE),y) +XVISOR_DEPENDENCIES += host-uboot-tools +define XVISOR_CREATE_UBOOT_IMAGE + $(MKIMAGE) -A $(MKIMAGE_ARCH) -O linux -T kernel -C none \ + -a 0x00008000 -e 0x00008000 \ + -n Xvisor -d $(BINARIES_DIR)/vmm.bin $(BINARIES_DIR)/uvmm.bin +endef +endif + +XVISOR_POST_INSTALL_IMAGES_HOOKS += XVISOR_CREATE_UBOOT_IMAGE + +# Checks to give errors that the user can understand +ifeq ($(BR_BUILDING),y) + +ifeq ($(BR2_PACKAGE_XVISOR_USE_DEFCONFIG),y) +ifeq ($(call qstrip,$(BR2_PACKAGE_XVISOR_DEFCONFIG)),) +$(error No Xvisor defconfig name specified, check your BR2_PACKAGE_XVISOR_DEFCONFIG setting) +endif +endif + +ifeq ($(BR2_PACKAGE_XVISOR_USE_CUSTOM_CONFIG),y) +ifeq ($(BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE),) +$(error No Xvisor configuration file specified, check your BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE setting) +endif +endif + +endif + +$(eval $(kconfig-package)) diff --git a/package/xvkbd/Config.in b/package/xvkbd/Config.in new file mode 100644 index 00000000..464a6ef7 --- /dev/null +++ b/package/xvkbd/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_XVKBD + bool "xvkbd" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_LIBSM + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXPM + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXTST + help + on-screen keyboard for X + + http://t-sato.in.coocan.jp/xvkbd diff --git a/package/xvkbd/xvkbd.hash b/package/xvkbd/xvkbd.hash new file mode 100644 index 00000000..8f13ab7c --- /dev/null +++ b/package/xvkbd/xvkbd.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 952d07df0fe1e45286520b7c98b4fd00fd60dbf3e3e8ff61e12c259f76a3bef4 xvkbd-4.1.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 5dada320d6b4fb7c76ef110a027b019feaf1149576acf7ac5cacf0d0dcdc3671 README diff --git a/package/xvkbd/xvkbd.mk b/package/xvkbd/xvkbd.mk new file mode 100644 index 00000000..f65c02bc --- /dev/null +++ b/package/xvkbd/xvkbd.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# xvkbd +# +################################################################################ + +XVKBD_VERSION = 4.1 +XVKBD_SITE = http://t-sato.in.coocan.jp/xvkbd +XVKBD_LICENSE = GPL-2.0+ +XVKBD_LICENSE_FILES = COPYING README + +XVKBD_DEPENDENCIES = \ + xlib_libICE \ + xlib_libSM \ + xlib_libX11 \ + xlib_libXaw \ + xlib_libXext \ + xlib_libXmu \ + xlib_libXpm \ + xlib_libXt \ + xlib_libXtst + +$(eval $(autotools-package)) diff --git a/package/xxhash/Config.in b/package/xxhash/Config.in new file mode 100644 index 00000000..f2cccda2 --- /dev/null +++ b/package/xxhash/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XXHASH + bool "xxhash" + help + xxHash is an extremely fast hash algorithm, running at RAM + speed limits. + + https://github.com/Cyan4973/xxHash diff --git a/package/xxhash/xxhash.hash b/package/xxhash/xxhash.hash new file mode 100644 index 00000000..feb50008 --- /dev/null +++ b/package/xxhash/xxhash.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 7054c3ebd169c97b64a92d7b994ab63c70dd53a06974f1f630ab782c28db0f4f xxhash-0.8.0.tar.gz +sha256 9da63520e9293d82c4b1613be5c84058cadb82b02f5972179bad13731d589910 LICENSE diff --git a/package/xxhash/xxhash.mk b/package/xxhash/xxhash.mk new file mode 100644 index 00000000..c2ddbbd6 --- /dev/null +++ b/package/xxhash/xxhash.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xxhash +# +################################################################################ + +XXHASH_VERSION = 0.8.0 +XXHASH_SITE = $(call github,Cyan4973,xxHash,v$(XXHASH_VERSION)) +XXHASH_LICENSE = BSD-2-Clause (library), GPL-2.0+ (xxhsum) +XXHASH_LICENSE_FILES = LICENSE + +define XXHASH_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) xxhsum +endef + +define XXHASH_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/xxhsum $(TARGET_DIR)/usr/bin/xxhsum +endef + +$(eval $(generic-package)) diff --git a/package/xz/Config.in b/package/xz/Config.in new file mode 100644 index 00000000..687bd554 --- /dev/null +++ b/package/xz/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_XZ + bool "xz-utils" + help + XZ is the successor to the Lempel-Ziv/Markov-chain Algorithm + compression format, which provides memory-hungry but + powerful compression (often better than bzip2) and fast, + easy decompression. + + This package provides the command line tools for working + with XZ compression, including xz, unxz, xzcat, xzgrep, and + so on. They can also handle the older LZMA format, and if + invoked via appropriate symlinks will emulate the behavior + of the commands in the lzma package. + + https://tukaani.org/xz/ diff --git a/package/xz/xz.hash b/package/xz/xz.hash new file mode 100644 index 00000000..3dd0cbe4 --- /dev/null +++ b/package/xz/xz.hash @@ -0,0 +1,8 @@ +# Locally calculated after checking pgp signature +sha256 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df xz-5.2.5.tar.bz2 + +# Hash for license files +sha256 bcb02973ef6e87ea73d331b3a80df7748407f17efdb784b61b47e0e610d3bb5c COPYING +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING.GPLv2 +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING.GPLv3 +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LGPLv2.1 diff --git a/package/xz/xz.mk b/package/xz/xz.mk new file mode 100644 index 00000000..ffbae4c8 --- /dev/null +++ b/package/xz/xz.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# xz +# +################################################################################ + +XZ_VERSION = 5.2.5 +XZ_SOURCE = xz-$(XZ_VERSION).tar.bz2 +XZ_SITE = https://tukaani.org/xz +XZ_INSTALL_STAGING = YES +XZ_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +XZ_LICENSE = Public Domain, GPL-2.0+, GPL-3.0+, LGPL-2.1+ +XZ_LICENSE_FILES = COPYING COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 +XZ_CPE_ID_VENDOR = tukaani + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +XZ_CONF_OPTS = --enable-threads +else +XZ_CONF_OPTS = --disable-threads +endif + +# we are built before ccache +HOST_XZ_CONF_ENV = \ + CC="$(HOSTCC_NOCCACHE)" \ + CXX="$(HOSTCXX_NOCCACHE)" + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/yad/Config.in b/package/yad/Config.in new file mode 100644 index 00000000..300525ee --- /dev/null +++ b/package/yad/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_YAD + bool "yad" + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_LIBGTK2 || BR2_PACKAGE_LIBGTK3_X11 + help + YAD (yet another dialog) is a tool for create graphical + dialogs from shell scripts. + + http://sourceforge.net/projects/yad-dialog/ + +comment "yad needs libgtk2 or libgtk3 w/ X11 backend" + depends on BR2_PACKAGE_XORG7 + depends on !BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3_X11 diff --git a/package/yad/yad.hash b/package/yad/yad.hash new file mode 100644 index 00000000..1eee499c --- /dev/null +++ b/package/yad/yad.hash @@ -0,0 +1,6 @@ +# From http://sourceforge.net/projects/yad-dialog/files/ +md5 82d458a2e1695dd0709f71ad26109812 yad-0.40.0.tar.xz +sha1 4376eb42f8e38972124dc81e534cbdc9088109fb yad-0.40.0.tar.xz + +# Hash for license file +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/yad/yad.mk b/package/yad/yad.mk new file mode 100644 index 00000000..15788efa --- /dev/null +++ b/package/yad/yad.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# yad +# +################################################################################ + +YAD_VERSION = 0.40.0 +YAD_SOURCE = yad-$(YAD_VERSION).tar.xz +YAD_SITE = http://sourceforge.net/projects/yad-dialog/files +YAD_LICENSE = GPL-3.0 +YAD_LICENSE_FILES = COPYING +YAD_DEPENDENCIES = host-intltool host-pkgconf $(TARGET_NLS_DEPENDENCIES) +YAD_CONF_ENV = LIBS=$(TARGET_NLS_LIBS) +YAD_CONF_OPTS = --enable-html=no + +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +YAD_DEPENDENCIES += libgtk3 +YAD_CONF_OPTS += --with-gtk=gtk3 +else +YAD_DEPENDENCIES += libgtk2 +YAD_CONF_OPTS += --with-gtk=gtk2 +endif + +$(eval $(autotools-package)) diff --git a/package/yaffs2utils/yaffs2utils.hash b/package/yaffs2utils/yaffs2utils.hash new file mode 100644 index 00000000..547b55c5 --- /dev/null +++ b/package/yaffs2utils/yaffs2utils.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 9b0912bf683eb839b6e57c9255c83894c3b700d16489a49d319c54c1abf8f6d7 0.2.9.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/yaffs2utils/yaffs2utils.mk b/package/yaffs2utils/yaffs2utils.mk new file mode 100644 index 00000000..bcd5d6d6 --- /dev/null +++ b/package/yaffs2utils/yaffs2utils.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# yaffs2utils +# +################################################################################ + +YAFFS2UTILS_VERSION = 0.2.9 +YAFFS2UTILS_SOURCE = $(YAFFS2UTILS_VERSION).tar.gz +YAFFS2UTILS_SITE = https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/yaffs2utils +YAFFS2UTILS_LICENSE = GPL-2.0 +YAFFS2UTILS_LICENSE_FILES = COPYING + +define HOST_YAFFS2UTILS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_YAFFS2UTILS_INSTALL_CMDS + mkdir -p $(HOST_DIR)/bin + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) INSTALLDIR=$(HOST_DIR)/bin install +endef + +$(eval $(host-generic-package)) diff --git a/package/yajl/0001-Let-the-shared-and-the-static-library-have-the-same-.patch b/package/yajl/0001-Let-the-shared-and-the-static-library-have-the-same-.patch new file mode 100644 index 00000000..0023a1da --- /dev/null +++ b/package/yajl/0001-Let-the-shared-and-the-static-library-have-the-same-.patch @@ -0,0 +1,34 @@ +From b08fe001e3d3f3564ef298e62342f07080807f7a Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 28 Oct 2015 15:45:10 +0000 +Subject: [PATCH] Let the shared and the static library have the same name +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The will be differentiated by the extension (.so or .a). + +Fetched from: +https://github.com/vriera/yajl/commit/6d09f11b8fd358cab0e31b965327e64a599f9ce9 + +Signed-off-by: Vicente Olivert Riera +Signed-off-by: Jörg Krause +--- + src/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 99cf9e9..1a900d3 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -36,6 +36,7 @@ SET (shareDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/share/pkgconfig) + SET(LIBRARY_OUTPUT_PATH ${libDir}) + + ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS}) ++SET_TARGET_PROPERTIES(yajl_s PROPERTIES OUTPUT_NAME yajl) + + ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS}) + +-- +2.8.0 + diff --git a/package/yajl/0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch b/package/yajl/0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch new file mode 100644 index 00000000..53decca6 --- /dev/null +++ b/package/yajl/0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch @@ -0,0 +1,49 @@ +From b3cddf92adacfe5ca40574afb3e323cc7cdebc5c Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Tue, 2 Feb 2016 15:46:09 +0100 +Subject: [PATCH] cmake: Add shared library conditonnal build + +When BUILD_SHARED_LIBS is off, you don't want to build the shared +library. + +Signed-off-by: Samuel Martin +--- + src/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 99cf9e9..9e9c77d 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -37,6 +37,7 @@ SET(LIBRARY_OUTPUT_PATH ${libDir}) + + ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS}) + ++IF(BUILD_SHARED_LIBS) + ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS}) + + #### setup shared library version number +@@ -51,6 +52,7 @@ IF(APPLE) + SET_TARGET_PROPERTIES(yajl PROPERTIES + INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib") + ENDIF(APPLE) ++ENDIF(BUILD_SHARED_LIBS) + + #### build up an sdk as a post build step + +@@ -77,10 +79,12 @@ INCLUDE_DIRECTORIES(${incDir}/..) + + # at build time you may specify the cmake variable LIB_SUFFIX to handle + # 64-bit systems which use 'lib64' ++IF(BUILD_SHARED_LIBS) + INSTALL(TARGETS yajl + RUNTIME DESTINATION lib${LIB_SUFFIX} + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ENDIF(BUILD_SHARED_LIBS) + INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl) + INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl) +-- +2.7.0 + diff --git a/package/yajl/0003-Link-with-shared-libyajl-in-a-shared-build.patch b/package/yajl/0003-Link-with-shared-libyajl-in-a-shared-build.patch new file mode 100644 index 00000000..d3c91f2b --- /dev/null +++ b/package/yajl/0003-Link-with-shared-libyajl-in-a-shared-build.patch @@ -0,0 +1,127 @@ +From 425b25993ef58d07aa18c5d4938876a90e22c47a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sat, 9 Apr 2016 23:24:27 +0200 +Subject: [PATCH] Link with shared libyajl in a shared build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building yajl in a static context fails in a parallel build: + +[ 21%] Linking C executable gen-extra-close +[ 26%] Building C object src/CMakeFiles/yajl_s.dir/yajl_buf.c.o +/home/test/autobuild/instance-3/output/host/opt/ext-toolchain/bfin-uclinux/bfin-uclinux/bin/ld.real: cannot find -lyajl + +Fix this issue by linking against the shared libyail in a shared build. Apply +this fix also to all other build targets who are linking against the library. + +Upstream status: Pending +https://github.com/lloyd/yajl/pull/187 + +[Update: align with commit 302563539dacb284576a443401cdfd061eb2e1e8 and remove + linking with libm from test/api/CMakeLists.txt] +Signed-off-by: Jörg Krause +--- + example/CMakeLists.txt | 7 ++++++- + perf/CMakeLists.txt | 6 +++++- + reformatter/CMakeLists.txt | 6 +++++- + test/api/CMakeLists.txt | 6 +++++- + test/parsing/CMakeLists.txt | 6 +++++- + verify/CMakeLists.txt | 6 +++++- + 6 files changed, 31 insertions(+), 6 deletions(-) + +diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt +index 0a7f622..8cfcef8 100644 +--- a/example/CMakeLists.txt ++++ b/example/CMakeLists.txt +@@ -20,4 +20,9 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(parse_config ${SRCS}) + +-TARGET_LINK_LIBRARIES(parse_config yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(parse_config yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(parse_config yajl_s) ++ENDIF() ++ +diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt +index b438d7a..40ba363 100644 +--- a/perf/CMakeLists.txt ++++ b/perf/CMakeLists.txt +@@ -20,4 +20,8 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(perftest ${SRCS}) + +-TARGET_LINK_LIBRARIES(perftest yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(perftest yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(perftest yajl_s) ++ENDIF() +diff --git a/reformatter/CMakeLists.txt b/reformatter/CMakeLists.txt +index 52a9bee..7629094 100644 +--- a/reformatter/CMakeLists.txt ++++ b/reformatter/CMakeLists.txt +@@ -26,7 +26,11 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(json_reformat ${SRCS}) + +-TARGET_LINK_LIBRARIES(json_reformat yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(json_reformat yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(json_reformat yajl_s) ++ENDIF() + + # In some environments, we must explicitly link libm (like qnx, + # thanks @shahbag) +diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt +index cd65a54..0c9debf 100644 +--- a/test/api/CMakeLists.txt ++++ b/test/api/CMakeLists.txt +@@ -21,5 +21,9 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/lib) + FOREACH (test ${TESTS}) + GET_FILENAME_COMPONENT(testProg ${test} NAME_WE) + ADD_EXECUTABLE(${testProg} ${test}) +- TARGET_LINK_LIBRARIES(${testProg} yajl) ++ IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(${testProg} yajl) ++ ELSE() ++ TARGET_LINK_LIBRARIES(${testProg} yajl_s) ++ ENDIF() + ENDFOREACH() +diff --git a/test/parsing/CMakeLists.txt b/test/parsing/CMakeLists.txt +index c22a388..285f048 100644 +--- a/test/parsing/CMakeLists.txt ++++ b/test/parsing/CMakeLists.txt +@@ -20,4 +20,8 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(yajl_test ${SRCS}) + +-TARGET_LINK_LIBRARIES(yajl_test yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(yajl_test yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(yajl_test yajl_s) ++ENDIF() +diff --git a/verify/CMakeLists.txt b/verify/CMakeLists.txt +index 967fca1..06cb2dc 100644 +--- a/verify/CMakeLists.txt ++++ b/verify/CMakeLists.txt +@@ -26,7 +26,11 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(json_verify ${SRCS}) + +-TARGET_LINK_LIBRARIES(json_verify yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(json_verify yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(json_verify yajl_s) ++ENDIF() + + # copy in the binary + GET_TARGET_PROPERTY(binPath json_verify LOCATION) +-- +2.8.0 + diff --git a/package/yajl/0004-Link-libyajl-_s-with-libm-when-isnan-is-not-brought-.patch b/package/yajl/0004-Link-libyajl-_s-with-libm-when-isnan-is-not-brought-.patch new file mode 100644 index 00000000..71cf2958 --- /dev/null +++ b/package/yajl/0004-Link-libyajl-_s-with-libm-when-isnan-is-not-brought-.patch @@ -0,0 +1,64 @@ +From b47f6a50925efb8c8707b1faed5561a4b66ffdb1 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 24 Apr 2016 18:45:27 +0200 +Subject: [PATCH] Link libyajl{,_s} with libm when isnan is not brought by the + libc + +Check whether isnan is provided by the libc library, otherwise make sure +yajl libraries are link against libm. + +Note that setting libm as PUBLIC link libraries enable the transitivity +[1, 2]; therefore it will be automatically passed to target linking +against libyajl{,_s}. + +This patch also makes sure the link libraries will appear in the yajl.pc +file. + +[1] https://cmake.org/cmake/help/v3.5/command/target_link_libraries.html +[2] https://cmake.org/cmake/help/v3.5/manual/cmake-buildsystem.7.html#target-usage-requirements + +Signed-off-by: Samuel Martin +--- + src/CMakeLists.txt | 10 ++++++++++ + src/yajl.pc.cmake | 2 +- + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b487bfd..a88698f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -35,11 +35,21 @@ SET (shareDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/share/pkgconfig) + # set the output path for libraries + SET(LIBRARY_OUTPUT_PATH ${libDir}) + ++SET(yajl_lib_link) ++INCLUDE(CheckLibraryExists) ++CHECK_LIBRARY_EXISTS(c isnan "" HAVE_LIBC_ISNAN) ++ ++IF(NOT HAVE_LIBC_ISNAN) ++ LIST(APPEND yajl_lib_link "-lm") ++ENDIF(NOT HAVE_LIBC_ISNAN) ++ + ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS}) + SET_TARGET_PROPERTIES(yajl_s PROPERTIES OUTPUT_NAME yajl) ++TARGET_LINK_LIBRARIES(yajl_s PUBLIC ${yajl_lib_link}) + + IF(BUILD_SHARED_LIBS) + ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS}) ++TARGET_LINK_LIBRARIES(yajl PUBLIC ${yajl_lib_link}) + + #### setup shared library version number + SET_TARGET_PROPERTIES(yajl PROPERTIES +diff --git a/src/yajl.pc.cmake b/src/yajl.pc.cmake +index 6eaca14..4681dd4 100644 +--- a/src/yajl.pc.cmake ++++ b/src/yajl.pc.cmake +@@ -6,4 +6,4 @@ Name: Yet Another JSON Library + Description: A Portable JSON parsing and serialization library in ANSI C + Version: ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO} + Cflags: -I${dollar}{includedir} +-Libs: -L${dollar}{libdir} -lyajl ++Libs: -L${dollar}{libdir} -lyajl ${yajl_lib_link} +-- +2.8.0 + diff --git a/package/yajl/Config.in b/package/yajl/Config.in new file mode 100644 index 00000000..be2c133f --- /dev/null +++ b/package/yajl/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_YAJL + bool "yajl" + help + Yet Another JSON Library. YAJL is a small event-driven + (SAX-style) JSON parser written in ANSI C, and a small + validating JSON generator. + + http://lloyd.github.com/yajl/ diff --git a/package/yajl/yajl.hash b/package/yajl/yajl.hash new file mode 100644 index 00000000..47b0986c --- /dev/null +++ b/package/yajl/yajl.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 3fb73364a5a30efe615046d07e6db9d09fd2b41c763c5f7d3bfb121cd5c5ac5a yajl-2.1.0.tar.gz +sha256 054bf2c11686c5442850b1da58ad592e3d1d2a236a362e67279b957f8e662f5a COPYING diff --git a/package/yajl/yajl.mk b/package/yajl/yajl.mk new file mode 100644 index 00000000..1fb16f50 --- /dev/null +++ b/package/yajl/yajl.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# yajl +# +################################################################################ + +YAJL_VERSION = 2.1.0 +YAJL_SITE = $(call github,lloyd,yajl,$(YAJL_VERSION)) +YAJL_INSTALL_STAGING = YES +YAJL_LICENSE = ISC +YAJL_LICENSE_FILES = COPYING + +$(eval $(cmake-package)) diff --git a/package/yaml-cpp/Config.in b/package/yaml-cpp/Config.in new file mode 100644 index 00000000..e02b85df --- /dev/null +++ b/package/yaml-cpp/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_YAML_CPP + bool "yaml-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 + help + yaml-cpp is a YAML parser and emitter in C++ matching + the YAML 1.2 spec. + + https://github.com/jbeder/yaml-cpp + +comment "yaml-cpp needs a toolchain w/ C++, gcc >= 4.7" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 diff --git a/package/yaml-cpp/yaml-cpp.hash b/package/yaml-cpp/yaml-cpp.hash new file mode 100644 index 00000000..2f7a6fc6 --- /dev/null +++ b/package/yaml-cpp/yaml-cpp.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed yaml-cpp-0.6.3.tar.gz +sha256 aa6fcc27be034e41e21dd832f9175bfe694a48491d9e14ff0fa278e19ad14f1b LICENSE diff --git a/package/yaml-cpp/yaml-cpp.mk b/package/yaml-cpp/yaml-cpp.mk new file mode 100644 index 00000000..895072ec --- /dev/null +++ b/package/yaml-cpp/yaml-cpp.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# yaml-cpp +# +################################################################################ + +YAML_CPP_VERSION = 0.6.3 +YAML_CPP_SITE = $(call github,jbeder,yaml-cpp,yaml-cpp-$(YAML_CPP_VERSION)) +YAML_CPP_INSTALL_STAGING = YES +YAML_CPP_LICENSE = MIT +YAML_CPP_LICENSE_FILES = LICENSE +YAML_CPP_CPE_ID_VENDOR = yaml-cpp_project + +# Disable testing and parse tools +YAML_CPP_CONF_OPTS += \ + -DYAML_CPP_BUILD_TESTS=OFF \ + -DYAML_CPP_BUILD_TOOLS=OFF + +ifeq ($(BR2_STATIC_LIBS),y) +YAML_CPP_CONF_OPTS += -DYAML_BUILD_SHARED_LIBS=OFF +else +YAML_CPP_CONF_OPTS += -DYAML_BUILD_SHARED_LIBS=ON +endif + +$(eval $(cmake-package)) diff --git a/package/yasm/Config.in b/package/yasm/Config.in new file mode 100644 index 00000000..2dc25aad --- /dev/null +++ b/package/yasm/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_YASM + bool "yasm" + depends on BR2_i386 || BR2_x86_64 + help + Yasm is a complete rewrite of the NASM-2.10.01 assembler. + It supports the x86 and AMD64 instruction sets, accepts NASM + and GAS assembler syntaxes and outputs binary, ELF32 and ELF64 + object formats. + + http://www.tortall.net/projects/yasm/ diff --git a/package/yasm/yasm.hash b/package/yasm/yasm.hash new file mode 100644 index 00000000..c343d32d --- /dev/null +++ b/package/yasm/yasm.hash @@ -0,0 +1,7 @@ +# Locally computed: +sha256 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f yasm-1.3.0.tar.gz +sha256 795f8d76eade6130129b680ac72ea81cb3e143467a65ea1f5f64946151d7fa20 COPYING +sha256 a84b45f23040624681ca6974ff48d8ef6b477a1cb51e4a1c842e49d00c231e0d BSD.txt +sha256 b7fd9b73ea99602016a326e0b62e6646060d18febdd065ceca8bb482208c3d88 Artistic.txt +sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 GNU_GPL-2.0 +sha256 1faefae1fe8838a2e48864df7d1376e421a50c551c5ae2f60c9f2093206e18a9 GNU_LGPL-2.0 diff --git a/package/yasm/yasm.mk b/package/yasm/yasm.mk new file mode 100644 index 00000000..b294bd3a --- /dev/null +++ b/package/yasm/yasm.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# yasm +# +################################################################################ + +YASM_VERSION = 1.3.0 +YASM_SITE = http://www.tortall.net/projects/yasm/releases +YASM_LICENSE = BSD-2-Clause, BSD-3-Clause, Artistic, GPL-2.0, LGPL-2.0 +YASM_LICENSE_FILES = COPYING BSD.txt Artistic.txt GNU_GPL-2.0 GNU_LGPL-2.0 + +# This sed prevents it compiling 2 programs (vsyasm and ytasm) +# that are only of use on Microsoft Windows. +define YASM_PRE_CONFIGURE_FIXUP + $(SED) 's#) ytasm.*#)#' $(@D)/Makefile.in +endef + +YASM_PRE_CONFIGURE_HOOKS += YASM_PRE_CONFIGURE_FIXUP +HOST_YASM_PRE_CONFIGURE_HOOKS += YASM_PRE_CONFIGURE_FIXUP + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/yavta/Config.in b/package/yavta/Config.in new file mode 100644 index 00000000..6a42a944 --- /dev/null +++ b/package/yavta/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_YAVTA + bool "yavta" + help + Yet Another V4L2 Test Application + + http://git.ideasonboard.org/yavta.git diff --git a/package/yavta/yavta.mk b/package/yavta/yavta.mk new file mode 100644 index 00000000..4e3d76e3 --- /dev/null +++ b/package/yavta/yavta.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# yavta +# +################################################################################ + +YAVTA_VERSION = 82ff2efdb9787737b9f21b6f4759f077c827b238 +YAVTA_SITE = git://git.ideasonboard.org/yavta.git +YAVTA_LICENSE = GPL-2.0+ +YAVTA_LICENSE_FILES = COPYING.GPL + +define YAVTA_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define YAVTA_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/yavta $(TARGET_DIR)/usr/bin/yavta +endef + +$(eval $(generic-package)) diff --git a/package/ympd/0001-only-c-language.patch b/package/ympd/0001-only-c-language.patch new file mode 100644 index 00000000..df5734c3 --- /dev/null +++ b/package/ympd/0001-only-c-language.patch @@ -0,0 +1,21 @@ +ympd is implemented only in C + +By default, CMake assumes that the project is using both C and C++. By +explicitly passing 'C' as argument of the project() macro, we tell +CMake that only C is used, which prevents CMake from checking if a C++ +compiler exists. + +Signed-off-by: Thomas Petazzoni + +Index: b/CMakeLists.txt +=================================================================== +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 2.6) + +-project (ympd) ++project (ympd C) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/") + set(CPACK_PACKAGE_VERSION_MAJOR "1") + set(CPACK_PACKAGE_VERSION_MINOR "2") diff --git a/package/ympd/0002-added-forward-declarations.patch b/package/ympd/0002-added-forward-declarations.patch new file mode 100644 index 00000000..90ee1eae --- /dev/null +++ b/package/ympd/0002-added-forward-declarations.patch @@ -0,0 +1,43 @@ +From 2268e0f0f372a61827b912155a1796490968b3ff Mon Sep 17 00:00:00 2001 +From: SuperBFG7 +Date: Tue, 2 Jun 2020 12:41:52 +0200 +Subject: [PATCH] added forward declarations + + +[Retrieved (and slightly updated to remove update of dirble_api_token) +from: +https://github.com/notandy/ympd/pull/191/commits/2268e0f0f372a61827b912155a1796490968b3ff] +Signed-off-by: Fabrice Fontaine +--- + src/mpd_client.c | 2 ++ + src/mpd_client.h | 6 ++++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/mpd_client.c b/src/mpd_client.c +index 2911e461..9f003ab0 100644 +--- a/src/mpd_client.c ++++ b/src/mpd_client.c +@@ -30,6 +30,8 @@ + + /* forward declaration */ + static int mpd_notify_callback(struct mg_connection *c, enum mg_event ev); ++char dirble_api_token[28]; ++struct t_mpd mpd; + + const char * mpd_cmd_strs[] = { + MPD_CMDS(GEN_STR) +diff --git a/src/mpd_client.h b/src/mpd_client.h +index 447dd563..9342c550 100644 +--- a/src/mpd_client.h ++++ b/src/mpd_client.h +@@ -96,6 +96,8 @@ struct t_mpd { + + int song_id; + unsigned queue_version; +-} mpd; ++}; ++ ++extern struct t_mpd mpd; + + struct t_mpd_client_session { + int song_id; diff --git a/package/ympd/Config.in b/package/ympd/Config.in new file mode 100644 index 00000000..0a1c2b2f --- /dev/null +++ b/package/ympd/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_YMPD + bool "ympd" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBMPDCLIENT + help + ympd, a standalone MPD Web GUI written in C, utilizing + Websockets and Bootstrap/JS + + https://www.ympd.org/ + +comment "ympd needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/ympd/ympd.hash b/package/ympd/ympd.hash new file mode 100644 index 00000000..1157267c --- /dev/null +++ b/package/ympd/ympd.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 d9f68920cd93d1cfa971e1d7b9162a2b1724909bc9753c1338cecb3688d234d5 ympd-1.3.0.tar.gz +sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 LICENSE diff --git a/package/ympd/ympd.mk b/package/ympd/ympd.mk new file mode 100644 index 00000000..027dc1ca --- /dev/null +++ b/package/ympd/ympd.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# ympd +# +################################################################################ + +YMPD_VERSION = 1.3.0 +YMPD_SITE = $(call github,notandy,ympd,v$(YMPD_VERSION)) +YMPD_LICENSE = GPL-2.0 +YMPD_LICENSE_FILES = LICENSE +YMPD_DEPENDENCIES = libmpdclient + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +YMPD_DEPENDENCIES += openssl +YMPD_CONF_OPTS += -DWITH_SSL=ON +else +YMPD_CONF_OPTS += -DWITH_SSL=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/ytree/0001-fix-musl.patch b/package/ytree/0001-fix-musl.patch new file mode 100644 index 00000000..0a247446 --- /dev/null +++ b/package/ytree/0001-fix-musl.patch @@ -0,0 +1,26 @@ +Fix musl build + +Fixes + + match.c.text+0x9c): undefined reference to `re_comp' + match.c.text+0xca): undefined reference to `re_exec' + +by forcing to use the 'modern' regex methods implementation instead of +the obsolete re_comp/re_exec ([1]) one? + +[1] http://man7.org/linux/man-pages/man3/re_comp.3.html + +Signed-off-by: Bernd Kuhls + +diff -uNr ytree-1.99pl2.orig/match.c ytree-1.99pl2/match.c +--- ytree-1.99pl2.orig/match.c 2019-09-29 12:37:57.000000000 +0200 ++++ ytree-1.99pl2/match.c 2019-10-01 19:46:56.193815327 +0200 +@@ -10,7 +10,7 @@ + #include "ytree.h" + + #if defined( sun ) || defined( linux ) || defined( __NeXT__ ) || defined( OSF1 ) || defined( __OpenBSD__ ) || defined(__NetBSD__) || defined( __FreeBSD__ ) || defined( __GNU__ ) +-#define HAS_REGEX ++#define HAS_REGCOMP + #endif + + #ifdef linux diff --git a/package/ytree/Config.in b/package/ytree/Config.in new file mode 100644 index 00000000..3ac9283a --- /dev/null +++ b/package/ytree/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_YTREE + bool "ytree" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + Ytree - a (curses-based) file manager similar to DOS Xtree(tm) + + https://www.han.de/~werner/ytree.html diff --git a/package/ytree/ytree.hash b/package/ytree/ytree.hash new file mode 100644 index 00000000..17d0d24c --- /dev/null +++ b/package/ytree/ytree.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 583aa71552d1347e0eabe39a236fa5a174bf67dde98871853b9fe2a233bcaef1 ytree-2.03.tar.gz +sha256 eb6bf7204569b4fe8eaf9d4dffc57e44047c5efb5deba1b2d99069ddbc99d031 COPYING diff --git a/package/ytree/ytree.mk b/package/ytree/ytree.mk new file mode 100644 index 00000000..fdecc0b1 --- /dev/null +++ b/package/ytree/ytree.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# ytree +# +################################################################################ + +YTREE_VERSION = 2.03 +YTREE_SITE = https://www.han.de/~werner +YTREE_LICENSE = GPL-2.0+ +YTREE_LICENSE_FILES = COPYING +YTREE_DEPENDENCIES = ncurses + +YTREE_CFLAGS = -DCOLOR_SUPPORT $(TARGET_CFLAGS) +YTREE_LDFLAGS = -lncurses $(TARGET_LDFLAGS) + +ifeq ($(BR2_PACKAGE_READLINE),y) +YTREE_DEPENDENCIES += host-pkgconf readline +YTREE_CFLAGS += -DREADLINE_SUPPORT +YTREE_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --libs readline` +endif + +define YTREE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(YTREE_CFLAGS)" LDFLAGS="$(YTREE_LDFLAGS)" +endef + +define YTREE_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)/usr" install +endef + +$(eval $(generic-package)) diff --git a/package/zbar/0001-zbarcam-zbarimg-get-rid-of-gettext-h.patch b/package/zbar/0001-zbarcam-zbarimg-get-rid-of-gettext-h.patch new file mode 100644 index 00000000..009fd5f9 --- /dev/null +++ b/package/zbar/0001-zbarcam-zbarimg-get-rid-of-gettext-h.patch @@ -0,0 +1,45 @@ +From a133aea7880bbb56d75535e534716d0e16a3b61a Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Tue, 28 Jul 2020 09:47:03 +0200 +Subject: [PATCH] zbarcam, zbarimg: get rid of gettext.h + +This doesn't seem to be needed at all for translations to +work. Also, gettext.h uses a different license. So, let's get +rid of it. + +Signed-off-by: Mauro Carvalho Chehab +[Retrieved (and updated to remove gettext.h which is not in the +tarball): +https://github.com/mchehab/zbar/commit/a133aea7880bbb56d75535e534716d0e16a3b61a] +Signed-off-by: Fabrice Fontaine +--- + zbar/gettext.h | 294 ---------------------------------------------- + zbarcam/zbarcam.c | 1 - + zbarimg/zbarimg.c | 1 - + 3 files changed, 296 deletions(-) + delete mode 100644 zbar/gettext.h + +diff --git a/zbarcam/zbarcam.c b/zbarcam/zbarcam.c +index f7ea281..ad30101 100644 +--- a/zbarcam/zbarcam.c ++++ b/zbarcam/zbarcam.c +@@ -35,7 +35,6 @@ + #include + + #ifdef ENABLE_NLS +-#include "../zbar/gettext.h" + # include + # define _(string) gettext(string) + #else +diff --git a/zbarimg/zbarimg.c b/zbarimg/zbarimg.c +index 0796fd8..d05d832 100644 +--- a/zbarimg/zbarimg.c ++++ b/zbarimg/zbarimg.c +@@ -40,7 +40,6 @@ + #include + + #ifdef ENABLE_NLS +-#include "../zbar/gettext.h" + # include + # define _(string) gettext(string) + #else diff --git a/package/zbar/0002-zbarcam-zbar-cam-img-.c-fix-build-with-musl.patch b/package/zbar/0002-zbarcam-zbar-cam-img-.c-fix-build-with-musl.patch new file mode 100644 index 00000000..fe62c164 --- /dev/null +++ b/package/zbar/0002-zbarcam-zbar-cam-img-.c-fix-build-with-musl.patch @@ -0,0 +1,55 @@ +From ecf90fcff066c06eda1fb931d08fadf5989ecb36 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 29 Aug 2020 14:23:04 +0200 +Subject: [PATCH] zbarcam/zbar{cam,img}.c: fix build with musl + +setlocale is used since version 0.23.1 and +https://git.linuxtv.org/zbar.git/commit/id=d05911f8d5fb8c1e064bd93ed9ec9f038c5da096 + +Include locale.h to avoid the following build failure on musl: + +zbarcam/zbarcam.c:168:5: warning: implicit declaration of function 'setlocale'; did you mean 'setstate'? [-Wimplicit-function-declaration] + setlocale (LC_ALL, ""); + ^~~~~~~~~ + setstate +zbarcam/zbarcam.c:168:16: error: 'LC_ALL' undeclared (first use in this function) + setlocale (LC_ALL, ""); + ^~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/b93ce5430bf22ddda94ee30882a883348617f5b1 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/mchehab/zbar/pull/115] +--- + zbarcam/zbarcam.c | 1 + + zbarimg/zbarimg.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/zbarcam/zbarcam.c b/zbarcam/zbarcam.c +index 6e13c8c..b8bc732 100644 +--- a/zbarcam/zbarcam.c ++++ b/zbarcam/zbarcam.c +@@ -36,6 +36,7 @@ + + #ifdef ENABLE_NLS + # include ++# include + # define _(string) gettext(string) + #else + # define _(string) string +diff --git a/zbarimg/zbarimg.c b/zbarimg/zbarimg.c +index d05d832..52502b2 100644 +--- a/zbarimg/zbarimg.c ++++ b/zbarimg/zbarimg.c +@@ -41,6 +41,7 @@ + + #ifdef ENABLE_NLS + # include ++# include + # define _(string) gettext(string) + #else + # define _(string) string +-- +2.28.0 + diff --git a/package/zbar/Config.in b/package/zbar/Config.in new file mode 100644 index 00000000..0f4d1157 --- /dev/null +++ b/package/zbar/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_ZBAR + bool "zbar" + depends on BR2_TOOLCHAIN_HAS_THREADS # libv4l + depends on BR2_USE_MMU # libv4l + depends on BR2_INSTALL_LIBSTDCPP # libv4l + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # libv4l + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBV4L + help + QR and barcode scanner + + https://git.linuxtv.org/zbar.git/about/ + +comment "zbar needs a toolchain w/ threads, C++ and headers >= 3.0" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/zbar/zbar.hash b/package/zbar/zbar.hash new file mode 100644 index 00000000..42770918 --- /dev/null +++ b/package/zbar/zbar.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 dad260b47ef887a639e840a89e5e6e132217b6bba2a8473565d1f459bcb97c1f zbar-0.23.1.tar.bz2 +sha256 44260f9252c7fe38ba8dfb645330504f4a375e3a5e9dd7d5d6b9f04adb4952f1 LICENSE.md diff --git a/package/zbar/zbar.mk b/package/zbar/zbar.mk new file mode 100644 index 00000000..f75741de --- /dev/null +++ b/package/zbar/zbar.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# zbar +# +################################################################################ + +ZBAR_VERSION = 0.23.1 +ZBAR_SOURCE = zbar-$(ZBAR_VERSION).tar.bz2 +ZBAR_SITE = https://www.linuxtv.org/downloads/zbar +ZBAR_LICENSE = LGPL-2.1+ +ZBAR_LICENSE_FILES = LICENSE.md +ZBAR_INSTALL_STAGING = YES +ZBAR_DEPENDENCIES = libv4l jpeg $(TARGET_NLS_DEPENDENCIES) +# uses C99 features +ZBAR_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \ + LIBS=$(TARGET_NLS_LIBS) +ZBAR_CONF_OPTS = \ + --disable-doc \ + --without-imagemagick \ + --without-qt \ + --without-qt5 \ + --without-gtk \ + --without-python \ + --without-x \ + --without-java + +ifeq ($(BR2_PACKAGE_DBUS),y) +ZBAR_DEPENDENCIES += dbus +ZBAR_CONF_OPTS += --with-dbus +else +ZBAR_CONF_OPTS += --without-dbus +endif + +$(eval $(autotools-package)) diff --git a/package/zd1211-firmware/Config.in b/package/zd1211-firmware/Config.in new file mode 100644 index 00000000..807c26f5 --- /dev/null +++ b/package/zd1211-firmware/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_ZD1211_FIRMWARE + bool "zd1211-firmware" + help + Firmware for the ZyDAS ZD1211 / Atheros AR5007UG wifi devices. + + https://sourceforge.net/projects/zd1211/ diff --git a/package/zd1211-firmware/zd1211-firmware.hash b/package/zd1211-firmware/zd1211-firmware.hash new file mode 100644 index 00000000..14e2c710 --- /dev/null +++ b/package/zd1211-firmware/zd1211-firmware.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 f11d3810d7f72833997f634584a586dcced71a353f965abf81062ec431d02b12 zd1211-firmware-1.5.tar.bz2 +sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 COPYING diff --git a/package/zd1211-firmware/zd1211-firmware.mk b/package/zd1211-firmware/zd1211-firmware.mk new file mode 100644 index 00000000..1836a9f7 --- /dev/null +++ b/package/zd1211-firmware/zd1211-firmware.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# zd1211-firmware +# +################################################################################ + +ZD1211_FIRMWARE_VERSION = 1.5 +ZD1211_FIRMWARE_SITE = http://downloads.sourceforge.net/project/zd1211/zd1211-firmware/$(ZD1211_FIRMWARE_VERSION) +ZD1211_FIRMWARE_SOURCE = zd1211-firmware-$(ZD1211_FIRMWARE_VERSION).tar.bz2 +ZD1211_FIRMWARE_LICENSE = GPL-2.0 +ZD1211_FIRMWARE_LICENSE_FILES = COPYING + +# Not all of the firmware files are used +define ZD1211_FIRMWARE_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/lib/firmware/zd1211/ + cp -dpf $(@D)/zd1211*{ub,uphr,ur} $(TARGET_DIR)/lib/firmware/zd1211 +endef + +$(eval $(generic-package)) diff --git a/package/zeromq/Config.in b/package/zeromq/Config.in new file mode 100644 index 00000000..cf5c644c --- /dev/null +++ b/package/zeromq/Config.in @@ -0,0 +1,67 @@ +comment "zeromq needs a toolchain w/ C++, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) + +config BR2_PACKAGE_ZEROMQ + bool "zeromq" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + ØMQ (ZeroMQ, 0MQ, zmq) looks like an embeddable networking + library but acts like a concurrency framework. It gives you + sockets that carry whole messages across various transports + like in-process, inter- process, TCP, and multicast. You can + connect sockets N-to-N with patterns like fanout, pub-sub, + task distribution, and request-reply. It's fast enough to + be the fabric for clustered products. Its asynchronous I/O + model gives you scalable multicore applications, built as + asynchronous message-processing tasks. It has a score of + language APIs and runs on most operating systems. + + ØMQ is from iMatix and is LGPL open source. + + http://www.zeromq.org/ + +if BR2_PACKAGE_ZEROMQ + +comment "norm support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_ZEROMQ_NORM + bool "NORM support" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_NORM + help + Add support for NACK-Oriented Reliable Multicast (RFC 5740) + protocol. + +comment "PGM/EPGM support needs a toolchain w/ wchar" + depends on BR2_TOOLCHAIN_HAS_SYNC_2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_ZEROMQ_PGM + bool "PGM/EPGM support" + depends on BR2_TOOLCHAIN_HAS_SYNC_2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_USE_WCHAR # openpgm + select BR2_PACKAGE_OPENPGM + help + Add support for Pragmatic General Multicast protocol (RFC + 3208) implemented either over raw IP packets or UDP + datagrams (encapsulated PGM). + +config BR2_PACKAGE_ZEROMQ_DRAFTS + bool "Draft APIs support" + help + Enable unstable draft ZeroMQ APIs + + https://pyzmq.readthedocs.io/en/latest/draft.html + +config BR2_PACKAGE_ZEROMQ_WEBSOCKET + bool "WebSocket support" + help + Enable WebSocket transport + +endif diff --git a/package/zeromq/zeromq.hash b/package/zeromq/zeromq.hash new file mode 100644 index 00000000..5085fbca --- /dev/null +++ b/package/zeromq/zeromq.hash @@ -0,0 +1,7 @@ +# From https://github.com/zeromq/libzmq/releases +md5 c897d4005a3f0b8276b00b7921412379 zeromq-4.3.4.tar.gz +sha1 47277a64749049123d1401600e8cfbab10a3ae28 zeromq-4.3.4.tar.gz +# Locally computed +sha256 c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5 zeromq-4.3.4.tar.gz +sha256 4fd86507c9b486764343065a9e035222869a27b5789efeb4fd93edc85412d7a3 COPYING +sha256 83f32abe61ee58ffb1b007412c08415168c052501dbf56d7a47aaaac52b03ef6 COPYING.LESSER diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk new file mode 100644 index 00000000..18269940 --- /dev/null +++ b/package/zeromq/zeromq.mk @@ -0,0 +1,100 @@ +################################################################################ +# +# zeromq +# +################################################################################ + +ZEROMQ_VERSION = 4.3.4 +ZEROMQ_SITE = https://github.com/zeromq/libzmq/releases/download/v$(ZEROMQ_VERSION) +ZEROMQ_INSTALL_STAGING = YES +ZEROMQ_DEPENDENCIES = util-linux +ZEROMQ_CONF_OPTS = --disable-Werror --without-documentation +ZEROMQ_LICENSE = LGPL-3.0+ with exceptions +ZEROMQ_LICENSE_FILES = COPYING COPYING.LESSER +ZEROMQ_CPE_ID_VENDOR = zeromq +ZEROMQ_CPE_ID_PRODUCT = libzmq + +# Assume these flags are always available. It is true, at least for +# SOCK_CLOEXEC, since linux v2.6.27. +# Note: the flag TCP_KEEPALIVE is NOT available so we do not include it. +ZEROMQ_CONF_ENV = libzmq_cv_sock_cloexec=yes \ + libzmq_cv_so_keepalive=yes \ + libzmq_cv_tcp_keepcnt=yes \ + libzmq_cv_tcp_keepidle=yes \ + libzmq_cv_tcp_keepintvl=yes + +# Internal error, aborting at dwarf2cfi.c:2752 in connect_traces +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58864 +ifeq ($(BR2_m68k_cf),y) +ZEROMQ_CONF_OPTS += CXXFLAGS="$(TARGET_CXXFLAGS) -fno-defer-pop" +endif + +# Only tools/curve_keygen.c needs this, but it doesn't hurt to pass it +# for the rest of the build as well (which automatically includes stdc++). +ifeq ($(BR2_STATIC_LIBS),y) +ZEROMQ_CONF_OPTS += LIBS=-lstdc++ +endif + +ifeq ($(BR2_PACKAGE_ZEROMQ_NORM),y) +ZEROMQ_CONF_OPTS += --with-norm +ZEROMQ_DEPENDENCIES += norm +else +ZEROMQ_CONF_OPTS += --without-norm +endif + +ifeq ($(BR2_PACKAGE_ZEROMQ_PGM),y) +ZEROMQ_DEPENDENCIES += host-pkgconf openpgm +ZEROMQ_CONF_OPTS += --with-pgm +else +ZEROMQ_CONF_OPTS += --without-pgm +endif + +ifeq ($(BR2_PACKAGE_ZEROMQ_DRAFTS),y) +ZEROMQ_CONF_OPTS += --enable-drafts +else +ZEROMQ_CONF_OPTS += --disable-drafts +endif + +ifeq ($(BR2_PACKAGE_ZEROMQ_WEBSOCKET),y) +ZEROMQ_CONF_OPTS += --enable-ws +else +ZEROMQ_CONF_OPTS += --disable-ws +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +ZEROMQ_DEPENDENCIES += host-pkgconf gnutls +ZEROMQ_CONF_OPTS += --with-tls +else +ZEROMQ_CONF_OPTS += --without-tls +endif + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +ZEROMQ_DEPENDENCIES += host-pkgconf libbsd +ZEROMQ_CONF_OPTS += --enable-libbsd +else +ZEROMQ_CONF_OPTS += --disable-libbsd +endif + +ifeq ($(BR2_PACKAGE_LIBNSS),y) +ZEROMQ_DEPENDENCIES += host-pkgconf libnss +ZEROMQ_CONF_OPTS += --with-nss +else +ZEROMQ_CONF_OPTS += --without-nss +endif + +# ZeroMQ uses libsodium if it's available. +ifeq ($(BR2_PACKAGE_LIBSODIUM),y) +ZEROMQ_DEPENDENCIES += libsodium +ZEROMQ_CONF_OPTS += --with-libsodium="$(STAGING_DIR)/usr" +else +ZEROMQ_CONF_OPTS += --without-libsodium +endif + +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +ZEROMQ_DEPENDENCIES += libunwind +ZEROMQ_CONF_OPTS += --enable-libunwind +else +ZEROMQ_CONF_OPTS += --disable-libunwind +endif + +$(eval $(autotools-package)) diff --git a/package/zic/0001-remove-dependency-check-on-version-file.patch b/package/zic/0001-remove-dependency-check-on-version-file.patch new file mode 100644 index 00000000..193c2630 --- /dev/null +++ b/package/zic/0001-remove-dependency-check-on-version-file.patch @@ -0,0 +1,32 @@ +From 4ad8932f93c490d15586b1def3863e9580e6eceb Mon Sep 17 00:00:00 2001 +From: Martin Bark +Date: Sat, 3 Dec 2016 13:51:50 +0000 +Subject: [PATCH] remove dependency check on version file + +$(VERSION_DEPS) includes dependencies from tzdata meaning applications +such as zic can't build from tzcode on their own. Remove the dependency +to $(VERSION_DEPS) since it is not necessary to check for version updates +in released code. This solves building zic from tzcode without needing +tzdata. + +Signed-off-by: Martin Bark +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 1b714a8..00d2c09 100644 +--- a/Makefile ++++ b/Makefile +@@ -587,7 +587,7 @@ INSTALL: ALL install date.1 + # Otherwise, use $(VERSION) unless it is "unknown" and there is already + # a 'version' file, in which case reuse the existing 'version' contents + # and append "-dirty" if the contents do not already end in "-dirty". +-version: $(VERSION_DEPS) ++version: + { (type git) >/dev/null 2>&1 && \ + V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty` || \ +-- +2.7.4 + diff --git a/package/zic/zic.hash b/package/zic/zic.hash new file mode 100644 index 00000000..3cee80bc --- /dev/null +++ b/package/zic/zic.hash @@ -0,0 +1,4 @@ +# From https://mm.icann.org/pipermail/tz-announce/2020-December/000064.html +sha512 5f6bf1b508434842eb9dacacc744b5f3375c35b88e401ef372b5fde80ad2f523484fe52a6e99460e402230406ebf6a9261a97efde45a610f8e8085893d55c4ed tzcode2020f.tar.gz +# Locally computed: +sha256 0613408568889f5739e5ae252b722a2659c02002839ad970a63dc5e9174b27cf LICENSE diff --git a/package/zic/zic.mk b/package/zic/zic.mk new file mode 100644 index 00000000..7529b682 --- /dev/null +++ b/package/zic/zic.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# zic +# +################################################################################ + +ZIC_VERSION = 2020f +ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz +ZIC_SITE = https://www.iana.org/time-zones/repository/releases +ZIC_STRIP_COMPONENTS = 0 +ZIC_LICENSE = Public domain +ZIC_LICENSE_FILES = LICENSE + +define HOST_ZIC_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) zic +endef + +define HOST_ZIC_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/zic $(HOST_DIR)/sbin/zic + $(INSTALL) -D -m 644 $(@D)/tzfile.h $(HOST_DIR)/include/tzfile.h +endef + +$(eval $(host-generic-package)) + +ZIC = $(HOST_DIR)/sbin/zic diff --git a/package/zip/0001-configure-Remove-Check-C-compiler-type-optimization-.patch b/package/zip/0001-configure-Remove-Check-C-compiler-type-optimization-.patch new file mode 100644 index 00000000..591b178a --- /dev/null +++ b/package/zip/0001-configure-Remove-Check-C-compiler-type-optimization-.patch @@ -0,0 +1,130 @@ +From 0f5e1658c05746b17f05a1bade263cad19b37e79 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 22 Jan 2015 15:20:25 +0100 +Subject: [PATCH 1/6] configure: Remove "Check C compiler type (optimization + options)" + +This test force optimization to -O3 +while it is already set in CFLAGS + +Signed-off-by: Romain Naour +--- + unix/configure | 98 ---------------------------------------------------------- + 1 file changed, 98 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 73ba803..4185fee 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -22,108 +22,10 @@ LFLAGS1='' + LFLAGS2='' + LN="ln -s" + +-CFLAGS_OPT='' +- + # bzip2 + IZ_BZIP2=${3-} + CFLAGS_BZ='' + +- +-echo 'Check C compiler type (optimization options)' +-# Sun C? +-cat > conftest.c << _EOF_ +-int main() +-{ +-#ifndef __SUNPRO_C +- bad code +-#endif +- return 0; +-} +-_EOF_ +-$CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null +-if test $? -eq 0; then +- CFLAGS_OPT='-xO3' +- echo " Sun C ($CFLAGS_OPT)" +-else +- # Tru64 DEC/Compaq/HP C? +- cat > conftest.c << _EOF_ +-int main() +-{ +-#ifndef __DECC +- bad code +-#endif +- return 0; +-} +-_EOF_ +- $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null +- if test $? -eq 0; then +- CFLAGS_OPT='-O3' +- echo " DEC C ($CFLAGS_OPT)" +- else +- # HP-UX HP C? +- cat > conftest.c << _EOF_ +-int main() +-{ +-#ifdef __GNUC__ +- bad code +-#endif +-#ifndef __hpux +- bad code +-#endif +- return 0; +-} +-_EOF_ +- $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null +- if test $? -eq 0; then +- # HP-UX, not GCC. Lame bundled or real ANSI compiler? +- CFLAGS_OPT_TRY="+O3 +Onolimit" +- $CC $CFLAGS $CFLAGS_OPT_TRY -c conftest.c 2>&1 | \ +- grep '(Bundled)' > /dev/null +- if test $? -ne 0; then +- CFLAGS_OPT="$CFLAGS_OPT_TRY" +- echo " HP-UX ANSI C ($CFLAGS_OPT)" +- else +- echo ' HP-UX Bundled C (no opt)' +- fi +- else +- # GNU C? +- cat > conftest.c << _EOF_ +-int main() +-{ +-#ifndef __GNUC__ +- bad code +-#endif +- return 0; +-} +-_EOF_ +- $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null +- if test $? -eq 0; then +- CFLAGS_OPT='-O3' +- echo " GNU C ($CFLAGS_OPT)" +- # Special Mac OS X shared library "ld" option? +- if test ` uname -s 2> /dev/null ` = 'Darwin'; then +- lf='-Wl,-search_paths_first' +- $CC $CFLAGS $lf conftest.c > /dev/null 2>/dev/null +- if test $? -eq 0; then +- LFLAGS2="${LFLAGS2} ${lf}" +- fi +- rm -f conftest +- fi +- else +- CFLAGS_OPT='-O' +- echo " Other-unknown C ($CFLAGS_OPT)" +- fi +- fi +- fi +-fi +- +-# optimization flags +-if test -n "${CFLAGS_OPT}"; then +- CFLAGS="${CFLAGS} ${CFLAGS_OPT}" +- CFLAGS_BZ="${CFLAGS_BZ} ${CFLAGS_OPT}" +-fi +- +- + # bzip2 + + echo "Check bzip2 support" +-- +1.9.3 + diff --git a/package/zip/0002-configure-Don-t-use-host-CPP.patch b/package/zip/0002-configure-Don-t-use-host-CPP.patch new file mode 100644 index 00000000..85049127 --- /dev/null +++ b/package/zip/0002-configure-Don-t-use-host-CPP.patch @@ -0,0 +1,37 @@ +From fc5c889131ff6270e1028cc7edd87e7f10a7da6d Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 22 Jan 2015 15:21:31 +0100 +Subject: [PATCH 2/6] configure: Don't use host CPP + +CPP is redefined if a cpp binary (/lib/cpp) is found on the host. + +Use the CPP="${CC} -E" allows to pass the following checks: +Check if we can use asm code (for -DASMV) +Check if compiler generates underlines (for -DASM_CRC) + +Signed-off-by: Romain Naour +--- + unix/configure | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 4185fee..489009f 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -122,13 +122,6 @@ fi + echo Check for the C preprocessor + # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp. + CPP="${CC} -E" +-# solaris as(1) needs -P, maybe others as well ? +-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P" +-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp +-[ -f /lib/cpp ] && CPP=/lib/cpp +-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp +-[ -f /xenix ] && CPP="${CC} -E" +-[ -f /lynx.os ] && CPP="${CC} -E" + + echo "#include " > conftest.c + $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E" +-- +1.9.3 + diff --git a/package/zip/0003-Makefile-Use-CFLAGS-from-command-line.patch b/package/zip/0003-Makefile-Use-CFLAGS-from-command-line.patch new file mode 100644 index 00000000..104b7e8d --- /dev/null +++ b/package/zip/0003-Makefile-Use-CFLAGS-from-command-line.patch @@ -0,0 +1,30 @@ +From 93189390de7322da78bc5b807f4cadaff46393c9 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 22 Jan 2015 22:45:30 +0100 +Subject: [PATCH 3/6] Makefile: Use CFLAGS from command line + +Replace CFLAGS_NOOPT by CFLAGS when calling unix/configure script +to create 'flags' file which contains all variables used to build +zip binary. + +Signed-off-by: Romain Naour +--- + unix/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/unix/Makefile b/unix/Makefile +index abd0c44..db62368 100644 +--- a/unix/Makefile ++++ b/unix/Makefile +@@ -177,7 +177,7 @@ uninstall: + + + flags: unix/configure +- sh unix/configure "${CC}" "${CFLAGS_NOOPT}" "${IZ_BZIP2}" ++ sh unix/configure "${CC}" "${CFLAGS}" "${IZ_BZIP2}" + + # These symbols, when #defined using -D have these effects on compilation: + # ZMEM - includes C language versions of memset(), memcpy(), +-- +1.9.3 + diff --git a/package/zip/0004-configure-use-LDFLAGS-from-command-line.patch b/package/zip/0004-configure-use-LDFLAGS-from-command-line.patch new file mode 100644 index 00000000..35d38602 --- /dev/null +++ b/package/zip/0004-configure-use-LDFLAGS-from-command-line.patch @@ -0,0 +1,35 @@ +From 5c58b8737dc9ccf9407f6725f6f07b764d6abb22 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 22 Jan 2015 23:47:55 +0100 +Subject: [PATCH 4/6] configure: use LDFLAGS from command line + +The bzip2 support may not enabled due to a build error +during the checking for bzip2 library. +The library path (-L) to bzip2 library is missing. + +Signed-off-by: Romain Naour +--- + unix/configure | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 489009f..de9fd68 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -106,11 +106,11 @@ int main() + return 0; + } + _EOF_ +- $CC $CFLAGS -o conftest conftest.c -lbz2 > /dev/null 2>/dev/null ++ $CC $CFLAGS $LDFLAGS -o conftest conftest.c -lbz2 > /dev/null 2>/dev/null + if test $? -eq 0; then + echo "-- OS supports bzip2 - linking in bzip2" + CFLAGS="${CFLAGS} -DBZIP2_SUPPORT" +- LFLAGS2="${LFLAGS2} -lbz2" ++ LFLAGS2="${LFLAGS2} ${LDFLAGS} -lbz2" + else + echo "-- Either bzlib.h or libbz2.a not found - no bzip2" + fi +-- +1.9.3 + diff --git a/package/zip/0005-unix-configure-remove-GID-UID-size-check.patch b/package/zip/0005-unix-configure-remove-GID-UID-size-check.patch new file mode 100644 index 00000000..38d8d730 --- /dev/null +++ b/package/zip/0005-unix-configure-remove-GID-UID-size-check.patch @@ -0,0 +1,85 @@ +From d8da4e5f0ebed000f880e60b6cca7c575f7ed1c7 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 23 Jan 2015 22:13:14 +0100 +Subject: [PATCH 5/6] unix/configure: remove GID/UID size check + +This check can't work for cross-compilation since it +try to run a target's binary on the host system. + +Reported-by: Richard Genoud +Signed-off-by: Romain Naour +--- + unix/configure | 57 --------------------------------------------------------- + 1 file changed, 57 deletions(-) + +diff --git a/unix/configure b/unix/configure +index de9fd68..7bfc9eb 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -237,63 +237,6 @@ _EOF_ + $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_OFF_T" + +- +-echo Check size of UIDs and GIDs +-echo "(Now zip stores variable size UIDs/GIDs using a new extra field. This" +-echo " tests if this OS uses 16-bit UIDs/GIDs and so if the old 16-bit storage" +-echo " should also be used for backward compatibility.)" +-# Added 2008-04-15 CS +-cat > conftest.c << _EOF_ +-# define _LARGEFILE_SOURCE /* some OSes need this for fseeko */ +-# define _LARGEFILE64_SOURCE +-# define _FILE_OFFSET_BITS 64 /* select default interface as 64 bit */ +-# define _LARGE_FILES /* some OSes need this for 64-bit off_t */ +-#include +-#include +-#include +-#include +-int main() +-{ +- struct stat s; +- +- printf(" s.st_uid is %u bytes\n", sizeof(s.st_uid)); +- printf(" s.st_gid is %u bytes\n", sizeof(s.st_gid)); +- +- /* see if have 16-bit UID */ +- if (sizeof(s.st_uid) != 2) { +- return 1; +- } +- /* see if have 16-bit GID */ +- if (sizeof(s.st_gid) != 2) { +- return 2; +- } +- return 3; +-} +-_EOF_ +-# compile it +-$CC -o conftest conftest.c >/dev/null 2>/dev/null +-if [ $? -ne 0 ]; then +- echo -- UID/GID test failed on compile - disabling old 16-bit UID/GID support +- CFLAGS="${CFLAGS} -DUIDGID_NOT_16BIT" +-else +-# run it +- ./conftest +- r=$? +- if [ $r -eq 1 ]; then +- echo -- UID not 2 bytes - disabling old 16-bit UID/GID support +- CFLAGS="${CFLAGS} -DUIDGID_NOT_16BIT" +- elif [ $r -eq 2 ]; then +- echo -- GID not 2 bytes - disabling old 16-bit UID/GID support +- CFLAGS="${CFLAGS} -DUIDGID_NOT_16BIT" +- elif [ $r -eq 3 ]; then +- echo -- 16-bit UIDs and GIDs - keeping old 16-bit UID/GID support +- else +- echo -- test failed - conftest returned $r - disabling old 16-bit UID/GID support +- CFLAGS="${CFLAGS} -DUIDGID_NOT_16BIT" +- fi +-fi +- +- + # Now we set the 64-bit file environment and check the size of off_t + # Added 11/4/2003 EG + # Revised 8/12/2004 EG +-- +1.9.3 + diff --git a/package/zip/0006-unix-configure-borrow-the-LFS-test-from-autotools.patch b/package/zip/0006-unix-configure-borrow-the-LFS-test-from-autotools.patch new file mode 100644 index 00000000..a4e99dbc --- /dev/null +++ b/package/zip/0006-unix-configure-borrow-the-LFS-test-from-autotools.patch @@ -0,0 +1,101 @@ +From fc392c939b9a18959482f588aff0afc29dd6d30a Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 23 Jan 2015 22:20:18 +0100 +Subject: [PATCH 6/6] unix/configure: borrow the LFS test from autotools. + +Infozip's LFS check can't work for cross-compilation +since it try to run a target's binary on the host system. + +Instead, use to LFS test used by autotools which is a +compilation test. +(see autotools/lib/autoconf/specific.m4) + +Reported-by: Richard Genoud +Signed-off-by: Romain Naour +--- + unix/configure | 51 ++++++++++++++++++--------------------------------- + 1 file changed, 18 insertions(+), 33 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 7bfc9eb..588f269 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -237,9 +237,8 @@ _EOF_ + $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_OFF_T" + +-# Now we set the 64-bit file environment and check the size of off_t +-# Added 11/4/2003 EG +-# Revised 8/12/2004 EG ++# LFS check borrowed from autotools sources ++# lib/autoconf/specific.m4 + + echo Check for Large File Support + cat > conftest.c << _EOF_ +@@ -247,24 +246,22 @@ cat > conftest.c << _EOF_ + # define _LARGEFILE64_SOURCE + # define _FILE_OFFSET_BITS 64 /* select default interface as 64 bit */ + # define _LARGE_FILES /* some OSes need this for 64-bit off_t */ ++ + #include +-#include +-#include +-#include +-int main() ++ /* Check that off_t can represent 2**63 - 1 correctly. ++ We can't simply define LARGE_OFF_T to be 9223372036854775807, ++ since some C++ compilers masquerading as C compilers ++ incorrectly reject 9223372036854775807. */ ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) ++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 ++ && LARGE_OFF_T % 2147483647 == 1) ++ ? 1 : -1]; ++int ++main () + { +- off_t offset; +- struct stat s; +- /* see if have 64-bit off_t */ +- if (sizeof(offset) < 8) +- return 1; +- printf(" off_t is %d bytes\n", sizeof(off_t)); +- /* see if have 64-bit stat */ +- if (sizeof(s.st_size) < 8) { +- printf(" s.st_size is %d bytes\n", sizeof(s.st_size)); +- return 2; +- } +- return 3; ++ ++ ; ++ return 0; + } + _EOF_ + # compile it +@@ -272,22 +269,10 @@ $CC -o conftest conftest.c >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + echo -- no Large File Support + else +-# run it +- ./conftest +- r=$? +- if [ $r -eq 1 ]; then +- echo -- no Large File Support - no 64-bit off_t +- elif [ $r -eq 2 ]; then +- echo -- no Large File Support - no 64-bit stat +- elif [ $r -eq 3 ]; then +- echo -- yes we have Large File Support! +- CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT" +- else +- echo -- no Large File Support - conftest returned $r +- fi ++ echo -- yes we have Large File Support! ++ CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT" + fi + +- + # Check for wide char for Unicode support + # Added 11/24/2005 EG + +-- +1.9.3 + diff --git a/package/zip/0007-timezone.c-needs-time.h-fixes-musl-compile.patch b/package/zip/0007-timezone.c-needs-time.h-fixes-musl-compile.patch new file mode 100644 index 00000000..bdaa638f --- /dev/null +++ b/package/zip/0007-timezone.c-needs-time.h-fixes-musl-compile.patch @@ -0,0 +1,38 @@ +From 68abba9fb2ed114ac35712756b1f7700a865c498 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Tue, 17 Dec 2019 21:25:01 +0100 +Subject: [PATCH] timezone.c: needs time.h (fixes musl compile) + +Fixes: + + In file included from util.c:28: + timezone.c: In function 'mktime': + timezone.c:644:18: error: dereferencing pointer to incomplete type 'struct tm' + save_isdst = tm->tm_isdst; + + timezone.c:661:11: warning: implicit declaration of function 'localtime'; did you mean 'dostime'? [-Wimplicit-function-declaration] + ltm = localtime(&then); + + timezone.c:661:9: warning: assignment to 'struct tm *' from 'int' makes pointer from integer without a cast [-Wint-conversion] + ltm = localtime(&then); + +Signed-off-by: Peter Seiderer +--- + timezone.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/timezone.c b/timezone.c +index 485ec02..18aecbd 100644 +--- a/timezone.c ++++ b/timezone.c +@@ -41,6 +41,7 @@ + #include "timezone.h" + #include + #include ++#include + + #ifdef IZTZ_DEFINESTDGLOBALS + long timezone = 0; +-- +2.24.0 + diff --git a/package/zip/Config.in b/package/zip/Config.in new file mode 100644 index 00000000..4b6360a4 --- /dev/null +++ b/package/zip/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_ZIP + bool "zip" + help + Zip is a compression and file packaging/archive utility. + Although highly compatible both with PKWARE's PKZIP and + PKUNZIP utilities for MS-DOS and with Info-ZIP's own UnZip, + our primary objectives have been portability and + other-than-MSDOS functionality. + + http://infozip.sourceforge.net/Zip.html diff --git a/package/zip/Config.in.host b/package/zip/Config.in.host new file mode 100644 index 00000000..b14ce55d --- /dev/null +++ b/package/zip/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_ZIP + bool "host zip" + help + Zip is a compression and file packaging/archive utility. + Although highly compatible both with PKWARE's PKZIP and + PKUNZIP utilities for MS-DOS and with Info-ZIP's own UnZip, + our primary objectives have been portability and + other-than-MSDOS functionality. + + http://infozip.sourceforge.net/Zip.html diff --git a/package/zip/zip.hash b/package/zip/zip.hash new file mode 100644 index 00000000..5e1b3353 --- /dev/null +++ b/package/zip/zip.hash @@ -0,0 +1,3 @@ +# Locally calculated from download (no sig, hash) +sha256 f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 zip30.tgz +sha256 8ecd6c1bab449127eb665cef1561e73a8bce52e217375f6f466939e137b1e110 LICENSE diff --git a/package/zip/zip.mk b/package/zip/zip.mk new file mode 100644 index 00000000..2d11e1c7 --- /dev/null +++ b/package/zip/zip.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# zip +# +################################################################################ + +ZIP_VERSION = 3.0 +# The version is really 3.0, but the tarball is named zip30.tgz +ZIP_SOURCE = zip$(subst .,,$(ZIP_VERSION)).tgz +ZIP_SITE = ftp://ftp.info-zip.org/pub/infozip/src +ZIP_LICENSE = Info-ZIP +ZIP_LICENSE_FILES = LICENSE +ZIP_CPE_ID_VENDOR = info-zip_project +ZIP_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_BZIP2),y) +ZIP_DEPENDENCIES += bzip2 +endif + +# Infozip's default CFLAGS. +ZIP_CFLAGS = -I. -DUNIX + +# Disable the support of 16-bit UIDs/GIDs, the test in unix/configure was +# removed since it can't work for cross-compilation. +ZIP_CFLAGS += -DUIDGID_NOT_16BIT + +# infozip already defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE when +# necessary, redefining it on the command line causes some warnings. +ZIP_TARGET_CFLAGS = \ + $(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS)) + +define ZIP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + CFLAGS="$(ZIP_TARGET_CFLAGS) $(ZIP_CFLAGS)" \ + AS="$(TARGET_CC) -c" \ + -f unix/Makefile generic +endef + +define ZIP_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \ + prefix=$(TARGET_DIR)/usr +endef + +define ZIP_INSTALLING_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \ + prefix=$(STAGING_DIR)/usr +endef + +define HOST_ZIP_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \ + CFLAGS="$(HOST_CFLAGS) $(ZIP_CFLAGS)" \ + AS="$(HOSTCC) -c" \ + -f unix/Makefile generic +endef + +define HOST_ZIP_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \ + prefix=$(HOST_DIR) +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/zisofs-tools/zisofs-tools.hash b/package/zisofs-tools/zisofs-tools.hash new file mode 100644 index 00000000..d2f594c7 --- /dev/null +++ b/package/zisofs-tools/zisofs-tools.hash @@ -0,0 +1,5 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cdrkit/cdrkit_1.1.11-3.dsc +sha256 d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da cdrkit_1.1.11.orig.tar.gz + +# Locally computed +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 3rd-party/zisofs_tools/COPYING diff --git a/package/zisofs-tools/zisofs-tools.mk b/package/zisofs-tools/zisofs-tools.mk new file mode 100644 index 00000000..fd8c371f --- /dev/null +++ b/package/zisofs-tools/zisofs-tools.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# zisofs-tools +# +################################################################################ + +ZISOFS_TOOLS_VERSION = 1.1.11 +ZISOFS_TOOLS_SOURCE = cdrkit_$(ZISOFS_TOOLS_VERSION).orig.tar.gz +ZISOFS_TOOLS_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cdrkit +ZISOFS_TOOLS_LICENSE = GPL-2.0+ +ZISOFS_TOOLS_LICENSE_FILES = 3rd-party/zisofs_tools/COPYING +ZISOFS_TOOLS_SUBDIR = 3rd-party/zisofs_tools +HOST_ZISOFS_TOOLS_DEPENDENCIES = host-zlib + +$(eval $(host-autotools-package)) diff --git a/package/zlib-ng/zlib-ng.hash b/package/zlib-ng/zlib-ng.hash new file mode 100644 index 00000000..3e1dba35 --- /dev/null +++ b/package/zlib-ng/zlib-ng.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 379723c0c954679a50d1d7df43084e2194dc51ecbc9987c889cb129d1f6734bc zlib-ng-1.9.9-b1.tar.gz +sha256 d3c80be055d94d798eaa786116e84fa0b010bc11420b5d2060d978ea77845436 LICENSE.md diff --git a/package/zlib-ng/zlib-ng.mk b/package/zlib-ng/zlib-ng.mk new file mode 100644 index 00000000..c56fa72d --- /dev/null +++ b/package/zlib-ng/zlib-ng.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# zlib-ng +# +################################################################################ + +ZLIB_NG_VERSION = 1.9.9-b1 +ZLIB_NG_SITE = $(call github,zlib-ng,zlib-ng,$(ZLIB_NG_VERSION)) +ZLIB_NG_LICENSE = Zlib +ZLIB_NG_LICENSE_FILES = LICENSE.md +ZLIB_NG_INSTALL_STAGING = YES +ZLIB_NG_PROVIDES = zlib + +# Build with zlib compatible API, gzFile support and optimizations on +ZLIB_NG_CONF_OPTS += \ + -DWITH_GZFILEOP=1 \ + -DWITH_OPTIM=1 \ + -DZLIB_COMPAT=1 \ + -DZLIB_ENABLE_TESTS=OFF + +# Enable NEON and ACLE on ARM +ifeq ($(BR2_arm),y) +ZLIB_NG_CONF_OPTS += -DWITH_ACLE=1 -DWITH_NEON=1 +endif + +$(eval $(cmake-package)) diff --git a/package/zlib/Config.in b/package/zlib/Config.in new file mode 100644 index 00000000..550c2efa --- /dev/null +++ b/package/zlib/Config.in @@ -0,0 +1,57 @@ +config BR2_PACKAGE_ZLIB_NG_ARCH_SUPPORTS + bool + default y if BR2_arm + default y if BR2_aarch64 + default y if BR2_i386 + default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + default y if BR2_s390x + default y if BR2_x86_64 + +config BR2_PACKAGE_ZLIB + bool "zlib support" + help + Select the desired Zlib library provider. + +if BR2_PACKAGE_ZLIB + +choice + prompt "zlib variant" + default BR2_PACKAGE_LIBZLIB + help + Select the desired Zlib library provider. + +config BR2_PACKAGE_LIBZLIB + bool "zlib" + select BR2_PACKAGE_HAS_ZLIB + help + Standard (de)compression library. Used by things like + gzip and libpng. + + http://www.zlib.net + +config BR2_PACKAGE_ZLIB_NG + bool "zlib-ng" + depends on BR2_PACKAGE_ZLIB_NG_ARCH_SUPPORTS + select BR2_PACKAGE_HAS_ZLIB + help + Zlib replacement with optimizations for + "next generation" systems. + + https://github.com/zlib-ng/zlib-ng + +endchoice + +config BR2_PACKAGE_HAS_ZLIB + bool + +config BR2_PACKAGE_PROVIDES_ZLIB + string + default "libzlib" if BR2_PACKAGE_LIBZLIB + default "zlib-ng" if BR2_PACKAGE_ZLIB_NG + +endif + +# ensure libzlib is used for the host variant +config BR2_PACKAGE_PROVIDES_HOST_ZLIB + string + default "host-libzlib" diff --git a/package/zlib/zlib.mk b/package/zlib/zlib.mk new file mode 100644 index 00000000..78f48ff0 --- /dev/null +++ b/package/zlib/zlib.mk @@ -0,0 +1,8 @@ +################################################################################ +# +# zlib +# +################################################################################ + +$(eval $(virtual-package)) +$(eval $(host-virtual-package)) diff --git a/package/zlog/Config.in b/package/zlog/Config.in new file mode 100644 index 00000000..cf86a261 --- /dev/null +++ b/package/zlog/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_ZLOG + bool "zlog" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + zlog is a reliable, high-performance, thread safe, flexible, + clear-model, pure C logging library. + + https://github.com/HardySimpson/zlog + +comment "zlog needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/zlog/zlog.hash b/package/zlog/zlog.hash new file mode 100644 index 00000000..c39505b2 --- /dev/null +++ b/package/zlog/zlog.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 00037ab8d52772a95d645f1dcfd2c292b7cea326b54e63e219a5b7fdcb7e6508 zlog-1.2.15.tar.gz +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING diff --git a/package/zlog/zlog.mk b/package/zlog/zlog.mk new file mode 100644 index 00000000..e2410d36 --- /dev/null +++ b/package/zlog/zlog.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# zlog +# +################################################################################ + +ZLOG_VERSION = 1.2.15 +ZLOG_SITE = $(call github,HardySimpson,zlog,$(ZLOG_VERSION)) +ZLOG_LICENSE = LGPL-2.1 +ZLOG_LICENSE_FILES = COPYING +ZLOG_INSTALL_STAGING = YES + +define ZLOG_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + -C $(@D) all +endef + +define ZLOG_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) PREFIX=$(STAGING_DIR)/usr -C $(@D) install +endef + +define ZLOG_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/zmqpp/0001-Allow-building-shared-or-static-library-only.patch b/package/zmqpp/0001-Allow-building-shared-or-static-library-only.patch new file mode 100644 index 00000000..04fad80f --- /dev/null +++ b/package/zmqpp/0001-Allow-building-shared-or-static-library-only.patch @@ -0,0 +1,92 @@ +From 93005632eca13d8eda409f6e9496fd5dd69e75b0 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 4 May 2018 18:38:31 +0200 +Subject: [PATCH] Allow building shared or static library only +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Patchs retrieved from: + - https://git.buildroot.net/buildroot/tree/package/zmqpp/0001-Allow-building-shared-or-static-library-only.patch + - https://git.buildroot.net/buildroot/tree/package/zmqpp/0002-Install-static-library-for-static-builds.patch + +Both patches have been merged in a single one and slightly updated to +keep default behavior of building and installing static library +(BUILD_STATIC is set to yes by default) + +[Upstream status: merged (https://github.com/zeromq/zmqpp/pull/218)] +Signed-off-by: Jörg Krause +Signed-off-by: Gustavo Zacarias +Signed-off-by: Fabrice Fontaine +--- + Makefile | 24 ++++++++++++++++++++---- + 1 file changed, 20 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 689acaa..e43054c 100644 +--- a/Makefile ++++ b/Makefile +@@ -81,6 +81,9 @@ ifeq ($(UNAME_S),Darwin) + endif + + ++BUILD_SHARED ?= yes ++BUILD_STATIC ?= yes ++ + CONFIG_FLAGS = + ifeq ($(CONFIG),debug) + CONFIG_FLAGS = -g -fno-inline -ftemplate-depth-1000 +@@ -95,13 +98,22 @@ ifneq (,$(findstring $(CONFIG),release loadtest)) + CONFIG_FLAGS = -O3 -funroll-loops -ffast-math -finline-functions -fomit-frame-pointer -DNO_DEBUG_LOG -DNO_TRACE_LOG -DNDEBUG + endif + +-COMMON_FLAGS = -MMD -std=c++11 -pipe -Wall -fPIC \ ++COMMON_FLAGS = -MMD -std=c++11 -pipe -Wall \ + -DBUILD_ENV=$(CONFIG) \ + -DBUILD_DATESTAMP='$(APP_DATESTAMP)' \ + -DBUILD_LIBRARY_NAME='"$(LIBRARY_NAME)"' \ + -DBUILD_CLIENT_NAME='"$(CLIENT_TARGET)"' \ + -I$(SRC_PATH) $(CUSTOM_INCLUDE_PATH) + ++ifeq ($(BUILD_SHARED),yes) ++COMMON_FLAGS += -fPIC ++LIBRARY_TARGETS += $(LIBRARY_SHARED) ++endif ++ ++ifeq ($(BUILD_STATIC),yes) ++LIBRARY_TARGETS += $(LIBRARY_ARCHIVE) ++endif ++ + COMMON_LIBS = -lzmq + + LIBRARY_LIBS = +@@ -150,11 +162,15 @@ install: + mkdir -p $(LIBDIR) + mkdir -p $(PKGCONFIGDIR) + install -m 644 $(ALL_LIBRARY_INCLUDES) $(INCLUDEDIR)/$(LIBRARY_DIR) +- install -m 755 $(BUILD_PATH)/$(LIBRARY_VERSION_SHARED) $(LIBDIR)/$(LIBRARY_FULL_VERSION_SHARED) +- install -m 755 $(BUILD_PATH)/$(LIBRARY_ARCHIVE) $(LIBDIR)/$(LIBRARY_ARCHIVE) + install -m 755 $(BUILD_PATH)/$(PKGCONFIG_FILE) $(PKGCONFIGDIR)/$(PKGCONFIG_FILE) ++ifeq ($(BUILD_SHARED),yes) ++ install -m 755 $(BUILD_PATH)/$(LIBRARY_VERSION_SHARED) $(LIBDIR)/$(LIBRARY_FULL_VERSION_SHARED) + ln -sf $(LIBRARY_FULL_VERSION_SHARED) $(LIBDIR)/$(LIBRARY_VERSION_SHARED) + ln -sf $(LIBRARY_FULL_VERSION_SHARED) $(LIBDIR)/$(LIBRARY_SHARED) ++endif ++ifeq ($(BUILD_STATIC),yes) ++ install -m 755 $(BUILD_PATH)/$(LIBRARY_ARCHIVE) $(LIBDIR)/$(LIBRARY_ARCHIVE) ++endif + if [ -f $(BUILD_PATH)/$(CLIENT_TARGET) ]; then install -m 755 $(BUILD_PATH)/$(CLIENT_TARGET) $(BINDIR); fi + $(LDCONFIG) + @echo "use make installcheck to test the install" +@@ -176,7 +192,7 @@ clean: + + client: $(CLIENT_TARGET) + +-library: $(LIBRARY_SHARED) $(LIBRARY_ARCHIVE) ++library: $(LIBRARY_TARGETS) + + # + # BUILD Targets +-- +2.14.1 + diff --git a/package/zmqpp/Config.in b/package/zmqpp/Config.in new file mode 100644 index 00000000..2c80e288 --- /dev/null +++ b/package/zmqpp/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_ZMQPP + bool "zmqpp" + # c++1x support + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr + select BR2_PACKAGE_ZEROMQ + help + C++ binding for zeromq (ZeroMQ, 0MQ, zmq). + + This C++ binding is a 'high-level' library that hides most + of the C-style interface core zeromq provides. + + http://github.com/benjamg/zmqpp + +comment "zmqpp needs a toolchain w/ C++, threads, gcc >= 4.7" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +comment "zmqpp needs exception_ptr" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 + +if BR2_PACKAGE_ZMQPP + +config BR2_PACKAGE_ZMQPP_CLIENT + bool "zmqpp client" + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS # boost + depends on BR2_USE_WCHAR # boost + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + help + Build and install the zmqpp client, a command line tool that + can be used to listen or send to zeromq sockets. + +comment "zmqpp client needs a toolchain w/ dynamic library, threads, wchar" + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_USE_WCHAR + +endif diff --git a/package/zmqpp/zmqpp.hash b/package/zmqpp/zmqpp.hash new file mode 100644 index 00000000..c440b2ac --- /dev/null +++ b/package/zmqpp/zmqpp.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 c1d4587df3562f73849d9e5f8c932ca7dcfc7d8bec31f62d7f35073ef81f4d29 zmqpp-4.2.0.tar.gz +sha256 fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85 LICENSE diff --git a/package/zmqpp/zmqpp.mk b/package/zmqpp/zmqpp.mk new file mode 100644 index 00000000..3cd19d64 --- /dev/null +++ b/package/zmqpp/zmqpp.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# zmqpp +# +################################################################################ + +ZMQPP_VERSION = 4.2.0 +ZMQPP_SITE = $(call github,zeromq,zmqpp,$(ZMQPP_VERSION)) +ZMQPP_INSTALL_STAGING = YES +ZMQPP_DEPENDENCIES = zeromq +ZMQPP_LICENSE = MPL-2.0 +ZMQPP_LICENSE_FILES = LICENSE +ZMQPP_MAKE_OPTS = LD="$(TARGET_CXX)" BUILD_PATH=./build PREFIX=/usr +ZMQPP_LDFLAGS = $(TARGET_LDFLAGS) -lpthread + +# gcc bug internal compiler error: in merge_overlapping_regs, at +# regrename.c:304. This bug is fixed since gcc 6. +# By setting CONFIG to empty, all optimizations such as -funroll-loops +# -ffast-math -finline-functions -fomit-frame-pointer are disabled, +# so only set CONFIG for the non-affected cases. +ifneq ($(BR2_or1k):$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),y:) +ZMQPP_CONFIG = $(if $(BR2_ENABLE_DEBUG),debug,release) +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +ZMQPP_LDFLAGS += -latomic +endif + +ifeq ($(BR2_PACKAGE_ZMQPP_CLIENT),y) +ZMQPP_DEPENDENCIES += boost +endif + +ifeq ($(BR2_STATIC_LIBS),y) +ZMQPP_MAKE_OPTS += BUILD_STATIC=yes BUILD_SHARED=no +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +ZMQPP_MAKE_OPTS += BUILD_STATIC=yes BUILD_SHARED=yes +else ifeq ($(BR2_SHARED_LIBS),y) +ZMQPP_MAKE_OPTS += BUILD_STATIC=no BUILD_SHARED=yes +endif + +define ZMQPP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CONFIG=$(ZMQPP_CONFIG) LDFLAGS="$(ZMQPP_LDFLAGS)" \ + $(ZMQPP_MAKE_OPTS) $(if $(BR2_PACKAGE_ZMQPP_CLIENT),client,library) -C $(@D) +endef + +define ZMQPP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/include/zmqpp + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(ZMQPP_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install -C $(@D) +endef + +define ZMQPP_INSTALL_STAGING_CMDS + $(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/include/zmqpp + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(ZMQPP_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/znc/Config.in b/package/znc/Config.in new file mode 100644 index 00000000..4fc7bbb9 --- /dev/null +++ b/package/znc/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_ZNC + bool "znc" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Advanced IRC bouncer + + http://www.znc.in + +comment "znc needs a toolchain w/ C++, dynamic library, gcc >= 4.8, threads" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/znc/znc.hash b/package/znc/znc.hash new file mode 100644 index 00000000..e86171ba --- /dev/null +++ b/package/znc/znc.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 ff238aae3f2ae0e44e683c4aee17dc8e4fdd261ca9379d83b48a7d422488de0d znc-1.8.2.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/package/znc/znc.mk b/package/znc/znc.mk new file mode 100644 index 00000000..07fced84 --- /dev/null +++ b/package/znc/znc.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# znc +# +################################################################################ + +ZNC_VERSION = 1.8.2 +ZNC_SITE = http://znc.in/releases/archive +ZNC_LICENSE = Apache-2.0 +ZNC_LICENSE_FILES = LICENSE +ZNC_CPE_ID_VENDOR = znc +ZNC_DEPENDENCIES = host-pkgconf +ZNC_CONF_OPTS = -DWANT_CYRUS=OFF -DWANT_I18N=OFF -DWANT_PERL=OFF + +ifeq ($(BR2_PACKAGE_ICU),y) +ZNC_DEPENDENCIES += icu +ZNC_CONF_OPTS += -DWANT_ICU=ON +else +ZNC_CONF_OPTS += -DWANT_ICU=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +ZNC_DEPENDENCIES += openssl +ZNC_CONF_OPTS += -DWANT_OPENSSL=ON +else +ZNC_CONF_OPTS += -DWANT_OPENSSL=OFF +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +ZNC_DEPENDENCIES += zlib +ZNC_CONF_OPTS += -DWANT_ZLIB=ON +else +ZNC_CONF_OPTS += -DWANT_ZLIB=OFF +endif + +# python support depends on icu +ifeq ($(BR2_PACKAGE_ICU)$(BR2_PACKAGE_PYTHON3),yy) +ZNC_DEPENDENCIES += python3 host-swig +ZNC_CONF_OPTS += \ + -DWANT_PYTHON=ON \ + -DWANT_PYTHON_VERSION=python3 \ + -DWANT_SWIG=ON +else +ZNC_CONF_OPTS += \ + -DWANT_PYTHON=OFF \ + -DWANT_SWIG=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/zsh/Config.in b/package/zsh/Config.in new file mode 100644 index 00000000..23194779 --- /dev/null +++ b/package/zsh/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_ZSH + bool "zsh" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + zsh is a shell designed for interactive use, although it is + also a powerful scripting language. Many of the useful + features of bash, ksh, and tcsh were incorporated into zsh; + many original features were added. + + http://www.zsh.org/ diff --git a/package/zsh/zsh.hash b/package/zsh/zsh.hash new file mode 100644 index 00000000..2df409c9 --- /dev/null +++ b/package/zsh/zsh.hash @@ -0,0 +1,7 @@ +# From http://www.zsh.org/pub/MD5SUM +md5 e02a5428620b3dd268800c7843b3dd4d zsh-5.8.tar.xz +# Calculated based on the hash above and after checking signature +# http://www.zsh.org/pub/zsh-5.8.tar.xz.asc +sha256 dcc4b54cc5565670a65581760261c163d720991f0d06486da61f8d839b52de27 zsh-5.8.tar.xz +# Locally calculated +sha256 d06fdf3ef9b1ec69d6b9e170b0a9516fbad3523261ff1668bde3bfea6e0ef5f5 LICENCE diff --git a/package/zsh/zsh.mk b/package/zsh/zsh.mk new file mode 100644 index 00000000..1a048332 --- /dev/null +++ b/package/zsh/zsh.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# zsh +# +################################################################################ + +ZSH_VERSION = 5.8 +ZSH_SITE = http://www.zsh.org/pub +ZSH_SOURCE = zsh-$(ZSH_VERSION).tar.xz +ZSH_DEPENDENCIES = ncurses +ZSH_CONF_OPTS = --bindir=/bin +ZSH_CONF_ENV = zsh_cv_sys_nis=no zsh_cv_sys_nis_plus=no +ZSH_LICENSE = MIT-like +ZSH_LICENSE_FILES = LICENCE +ZSH_CPE_ID_VENDOR = zsh + +ifeq ($(BR2_PACKAGE_GDBM),y) +ZSH_CONF_OPTS += --enable-gdbm +ZSH_DEPENDENCIES += gdbm +else +ZSH_CONF_OPTS += --disable-gdbm +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +ZSH_CONF_OPTS += --enable-cap +ZSH_DEPENDENCIES += libcap +else +ZSH_CONF_OPTS += --disable-cap +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +ZSH_CONF_OPTS += --enable-pcre +ZSH_CONF_ENV += ac_cv_prog_PCRECONF=$(STAGING_DIR)/usr/bin/pcre-config +ZSH_DEPENDENCIES += pcre +else +ZSH_CONF_OPTS += --disable-pcre +endif + +# Add /bin/zsh to /etc/shells otherwise some login tools like dropbear +# can reject the user connection. See man shells. +define ZSH_ADD_ZSH_TO_SHELLS + grep -qsE '^/bin/zsh$$' $(TARGET_DIR)/etc/shells \ + || echo "/bin/zsh" >> $(TARGET_DIR)/etc/shells +endef +ZSH_TARGET_FINALIZE_HOOKS += ZSH_ADD_ZSH_TO_SHELLS + +# Remove versioned zsh-x.y.z binary taking up space +define ZSH_TARGET_INSTALL_FIXUPS + rm -f $(TARGET_DIR)/bin/zsh-$(ZSH_VERSION) +endef +ZSH_POST_INSTALL_TARGET_HOOKS += ZSH_TARGET_INSTALL_FIXUPS + +$(eval $(autotools-package)) diff --git a/package/zstd/Config.in b/package/zstd/Config.in new file mode 100644 index 00000000..9fa70c65 --- /dev/null +++ b/package/zstd/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_ZSTD + bool "zstd" + help + Zstandard, or zstd as short version, is a fast lossless + compression algorithm, targeting real-time compression + scenarios at zlib-level and better compression ratios + + The selection of other packages will enable some features: + xz, lz4 and/or zlib will enable support for corresponding + compression formats + + https://facebook.github.io/zstd diff --git a/package/zstd/Config.in.host b/package/zstd/Config.in.host new file mode 100644 index 00000000..05751f8f --- /dev/null +++ b/package/zstd/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_ZSTD + bool "host zstd" + help + Zstandard, or zstd as short version, is a fast lossless + compression algorithm, targeting real-time compression + scenarios at zlib-level and better compression ratios + + https://facebook.github.io/zstd diff --git a/package/zstd/zstd.hash b/package/zstd/zstd.hash new file mode 100644 index 00000000..a979501e --- /dev/null +++ b/package/zstd/zstd.hash @@ -0,0 +1,6 @@ +# From https://github.com/facebook/zstd/releases/download/v1.4.9/zstd-1.4.9.tar.gz.sha256 +sha256 29ac74e19ea28659017361976240c4b5c5c24db3b89338731a6feb97c038d293 zstd-1.4.9.tar.gz + +# License files (locally computed) +sha256 2c1a7fa704df8f3a606f6fc010b8b5aaebf403f3aeec339a12048f1ba7331a0b LICENSE +sha256 f9c375a1be4a41f7b70301dd83c91cb89e41567478859b77eef375a52d782505 COPYING diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk new file mode 100644 index 00000000..63ea8b1b --- /dev/null +++ b/package/zstd/zstd.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# zstd +# +################################################################################ + +ZSTD_VERSION = 1.4.9 +ZSTD_SITE = https://github.com/facebook/zstd/releases/download/v$(ZSTD_VERSION) +ZSTD_INSTALL_STAGING = YES +ZSTD_LICENSE = BSD-3-Clause or GPL-2.0 +ZSTD_LICENSE_FILES = LICENSE COPYING +ZSTD_CPE_ID_VENDOR = facebook +ZSTD_CPE_ID_PRODUCT = zstandard + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +ZSTD_OPTS += HAVE_THREAD=1 +else +ZSTD_OPTS += HAVE_THREAD=0 +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +ZSTD_DEPENDENCIES += zlib +ZSTD_OPTS += HAVE_ZLIB=1 +else +ZSTD_OPTS += HAVE_ZLIB=0 +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +ZSTD_DEPENDENCIES += xz +ZSTD_OPTS += HAVE_LZMA=1 +else +ZSTD_OPTS += HAVE_LZMA=0 +endif + +ifeq ($(BR2_PACKAGE_LZ4),y) +ZSTD_DEPENDENCIES += lz4 +ZSTD_OPTS += HAVE_LZ4=1 +else +ZSTD_OPTS += HAVE_LZ4=0 +endif + +ifeq ($(BR2_STATIC_LIBS),y) +ZSTD_BUILD_LIBS = libzstd.a +ZSTD_INSTALL_LIBS = install-static +else ifeq ($(BR2_SHARED_LIBS),y) +ZSTD_BUILD_LIBS = libzstd +ZSTD_INSTALL_LIBS = install-shared +else +ZSTD_BUILD_LIBS = libzstd.a libzstd +ZSTD_INSTALL_LIBS = install-static install-shared +endif + +# The HAVE_THREAD flag is read by the 'programs' makefile but not by the 'lib' +# one. Building a multi-threaded binary with a library (which defaults to +# single-threaded) gives a runtime error when compressing files. +# The 'lib' makefile provides specific '%-mt' targets for this purpose. +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +ZSTD_BUILD_LIBS := $(addsuffix -mt,$(ZSTD_BUILD_LIBS)) +endif + +define ZSTD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ + -C $(@D)/lib $(ZSTD_BUILD_LIBS) + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ + -C $(@D) zstd +endef + +define ZSTD_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ + DESTDIR=$(STAGING_DIR) PREFIX=/usr -C $(@D)/lib \ + install-pc install-includes $(ZSTD_INSTALL_LIBS) +endef + +define ZSTD_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ + DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \ + DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib $(ZSTD_INSTALL_LIBS) +endef + +# note: only limited 'HAVE_...' options for host library build only +HOST_ZSTD_OPTS = HAVE_THREAD=1 + +define HOST_ZSTD_BUILD_CMDS + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \ + -C $(@D)/lib libzstd.a-mt libzstd-mt + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \ + -C $(@D) zstd +endef + +define HOST_ZSTD_INSTALL_CMDS + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \ + DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \ + DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/programs install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/zxing-cpp/0001-Link-library-with-OpenCV-make-libs-private-not-exported-to-the-users.patch b/package/zxing-cpp/0001-Link-library-with-OpenCV-make-libs-private-not-exported-to-the-users.patch new file mode 100644 index 00000000..90b23203 --- /dev/null +++ b/package/zxing-cpp/0001-Link-library-with-OpenCV-make-libs-private-not-exported-to-the-users.patch @@ -0,0 +1,43 @@ +From 9e5dfa57f3b998bc3049bfa893b20e81dea656df Mon Sep 17 00:00:00 2001 +From: Yuri +Date: Sat, 20 Apr 2019 07:28:26 -0700 +Subject: [PATCH] Link library with OpenCV, not only the executable, make libs + PRIVATE. + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/glassechidna/zxing-cpp/pull/86] +--- + CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 738f4e1..efe3aee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,10 +60,12 @@ include_directories(core/src) + add_library(libzxing ${LIBZXING_FILES}) + set_target_properties(libzxing PROPERTIES PREFIX "") + ++set(libzxing_LIBS "") ++ + find_package(Iconv) + if(ICONV_FOUND) + include_directories(${ICONV_INCLUDE_DIR}) +- target_link_libraries(libzxing ${ICONV_LIBRARIES}) ++ set(libzxing_LIBS ${libzxing_LIBS} ${ICONV_LIBRARIES}) + else() + add_definitions(-DNO_ICONV=1) + endif() +@@ -75,9 +77,12 @@ if(OpenCV_FOUND) + "./opencv-cli/src/*.h" + ) + add_executable(zxing-cv ${OPENCV_ZXING_FILES}) ++ set(libzxing_LIBS ${libzxing_LIBS} ${OpenCV_LIBRARIES}) + target_link_libraries(zxing-cv libzxing ${OpenCV_LIBRARIES}) + endif() + ++target_link_libraries(libzxing PRIVATE ${libzxing_LIBS}) ++ + # Add cli executable. + file(GLOB_RECURSE ZXING_FILES + "./cli/src/*.cpp" diff --git a/package/zxing-cpp/0002-CMakeLists-txt-add-BUILD_OPENCV-option.patch b/package/zxing-cpp/0002-CMakeLists-txt-add-BUILD_OPENCV-option.patch new file mode 100644 index 00000000..31753d7c --- /dev/null +++ b/package/zxing-cpp/0002-CMakeLists-txt-add-BUILD_OPENCV-option.patch @@ -0,0 +1,39 @@ +From fe740316af970f57ec511cdeafb512510e4842a9 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 9 Nov 2019 17:21:13 +0100 +Subject: [PATCH] CMakeLists.txt: add BUILD_OPENCV option + +Add BUILD_OPENCV option to allow the user to disable OpenCV. It is +especially useful as opencv library can be built without highgui support + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/glassechidna/zxing-cpp/pull/90] +--- + CMakeLists.txt | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 738f4e1..12913cd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.0) + project(zxing) + + option(BUILD_TESTING "Enable generation of test targets" OFF) ++option(BUILD_OPENCV "Enable OpenCV classes and OpenCV cli executable" ON) + + set(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH}) + +@@ -44,8 +45,10 @@ else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() + +-# OpenCV classes +-find_package(OpenCV) ++if (BUILD_OPENCV) ++ # OpenCV classes ++ find_package(OpenCV) ++endif() + if(OpenCV_FOUND) + list(APPEND LIBZXING_FILES + opencv/src/zxing/MatSource.cpp diff --git a/package/zxing-cpp/Config.in b/package/zxing-cpp/Config.in new file mode 100644 index 00000000..c1109219 --- /dev/null +++ b/package/zxing-cpp/Config.in @@ -0,0 +1,14 @@ +comment "zxing-cpp needs a toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS + +config BR2_PACKAGE_ZXING_CPP + bool "zxing-cpp" + depends on !BR2_STATIC_LIBS + depends on BR2_INSTALL_LIBSTDCPP + help + ZXing-cpp (pronounced "zebra crossing") is an open-source, + multi-format 1D/2D barcode image processing library + implemented in Java, with ports to other languages. This + compiles the C++ port. + + https://github.com/glassechidna/zxing-cpp diff --git a/package/zxing-cpp/zxing-cpp.hash b/package/zxing-cpp/zxing-cpp.hash new file mode 100644 index 00000000..f12349bb --- /dev/null +++ b/package/zxing-cpp/zxing-cpp.hash @@ -0,0 +1,5 @@ +# Locally calculated +sha256 4c2b8601d0e3377143c1a0bbab220146af9fa5a5e29e8fbef42862fe3d38f8e6 zxing-cpp-e0e40ddec63f38405aca5c8c1ff60b85ec8b1f10.tar.gz + +# License files +sha256 c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 COPYING diff --git a/package/zxing-cpp/zxing-cpp.mk b/package/zxing-cpp/zxing-cpp.mk new file mode 100644 index 00000000..e9c80b44 --- /dev/null +++ b/package/zxing-cpp/zxing-cpp.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# zxing-cpp +# +################################################################################ + +ZXING_CPP_VERSION = e0e40ddec63f38405aca5c8c1ff60b85ec8b1f10 +ZXING_CPP_SITE = $(call github,glassechidna,zxing-cpp,$(ZXING_CPP_VERSION)) +ZXING_CPP_LICENSE = Apache-2.0 +ZXING_CPP_LICENSE_FILES = COPYING +ZXING_CPP_INSTALL_STAGING = YES +ZXING_CPP_SUPPORTS_IN_SOURCE_BUILD = NO +ZXING_CPP_CONF_OPTS = -DBUILD_TESTING=OFF + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +ZXING_CPP_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_LIB_HIGHGUI),y) +ZXING_CPP_DEPENDENCIES += opencv3 +ZXING_CPP_CONF_OPTS += -DBUILD_OPENCV=ON +else +ZXING_CPP_CONF_OPTS += -DBUILD_OPENCV=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/zynq-boot-bin/zynq-boot-bin.hash b/package/zynq-boot-bin/zynq-boot-bin.hash new file mode 100644 index 00000000..0bc23de1 --- /dev/null +++ b/package/zynq-boot-bin/zynq-boot-bin.hash @@ -0,0 +1,2 @@ +# From https://raw.githubusercontent.com/Xilinx/u-boot-xlnx +sha1 940331ee02b0007099effa61e382fe7ea4174054 zynq-boot-bin.py diff --git a/package/zynq-boot-bin/zynq-boot-bin.mk b/package/zynq-boot-bin/zynq-boot-bin.mk new file mode 100644 index 00000000..deba5f40 --- /dev/null +++ b/package/zynq-boot-bin/zynq-boot-bin.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# zynq-boot-bin +# +################################################################################ + +ZYNQ_BOOT_BIN_VERSION = 2015.1 +ZYNQ_BOOT_BIN_SOURCE = zynq-boot-bin.py +ZYNQ_BOOT_BIN_SITE = https://raw.githubusercontent.com/Xilinx/u-boot-xlnx/xilinx-v$(ZYNQ_BOOT_BIN_VERSION)/tools +ZYNQ_BOOT_BIN_LICENSE = GPL-3.0+ + +HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = host-python + +define HOST_ZYNQ_BOOT_BIN_EXTRACT_CMDS + cp $(HOST_ZYNQ_BOOT_BIN_DL_DIR)/$(ZYNQ_BOOT_BIN_SOURCE) $(@D) +endef + +define HOST_ZYNQ_BOOT_BIN_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/$(ZYNQ_BOOT_BIN_SOURCE) $(HOST_DIR)/bin/$(ZYNQ_BOOT_BIN_SOURCE) +endef + +$(eval $(host-generic-package)) diff --git a/package/zyre/Config.in b/package/zyre/Config.in new file mode 100644 index 00000000..21a0884e --- /dev/null +++ b/package/zyre/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_ZYRE + bool "zyre" + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + depends on BR2_USE_MMU # czmq + select BR2_PACKAGE_CZMQ + select BR2_PACKAGE_ZEROMQ + help + An open-source framework for proximity-based peer-to-peer + applications. + + http://zyre.org + +comment "zyre needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/zyre/zyre.hash b/package/zyre/zyre.hash new file mode 100644 index 00000000..289341f4 --- /dev/null +++ b/package/zyre/zyre.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 b978a999947ddb6722d956db2427869b313225e50518c4fbbf960a68109e3e91 zyre-2.0.0.tar.gz +sha256 1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5 LICENSE diff --git a/package/zyre/zyre.mk b/package/zyre/zyre.mk new file mode 100644 index 00000000..21224d6b --- /dev/null +++ b/package/zyre/zyre.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# zyre +# +################################################################################ + +ZYRE_VERSION = 2.0.0 +ZYRE_SITE = $(call github,zeromq,zyre,v$(ZYRE_VERSION)) +ZYRE_LICENSE = MPL-2.0 +ZYRE_LICENSE_FILES = LICENSE +ZYRE_INSTALL_STAGING = YES +ZYRE_DEPENDENCIES = czmq zeromq host-pkgconf +ZYRE_AUTORECONF = YES +ZYRE_CONF_OPTS = --without-docs + +define ZYRE_CREATE_CONFIG_DIR + mkdir -p $(@D)/config +endef + +ZYRE_POST_PATCH_HOOKS += ZYRE_CREATE_CONFIG_DIR + +$(eval $(autotools-package)) diff --git a/package/zziplib/Config.in b/package/zziplib/Config.in new file mode 100644 index 00000000..6b55572a --- /dev/null +++ b/package/zziplib/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_ZZIPLIB + bool "zziplib" + select BR2_PACKAGE_ZLIB + help + The zziplib provides read access to zipped files in a + zip-archive, using compression based solely on free algorithms + provided by zlib. It also provides a functionality to overlay + the archive filesystem with the filesystem of the operating + system environment. + + http://zziplib.sourceforge.net diff --git a/package/zziplib/zziplib.hash b/package/zziplib/zziplib.hash new file mode 100644 index 00000000..b6a75ae0 --- /dev/null +++ b/package/zziplib/zziplib.hash @@ -0,0 +1,5 @@ +# sha256 locally computed +sha256 93ef44bf1f1ea24fc66080426a469df82fa631d13ca3b2e4abaeab89538518dc zziplib-0.13.72.tar.gz +sha256 94b03f1a60a7fd5007149530626a895a6ef5a8b9342abfd56860c5f3956f5d23 docs/COPYING.LIB +sha256 c2aa7d58cebd24cb877bbf11d6b13a4bb7cd08b9d7db5d3037ca06c46bf4cfd8 docs/COPYING.MPL +sha256 1c6da11efe8c43ee853fe5b21501dd72b81831ae84d58ea376bddc0620a5c361 docs/copying.htm diff --git a/package/zziplib/zziplib.mk b/package/zziplib/zziplib.mk new file mode 100644 index 00000000..6b7b64ca --- /dev/null +++ b/package/zziplib/zziplib.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# zziplib +# +################################################################################ + +ZZIPLIB_VERSION = 0.13.72 +ZZIPLIB_SITE = $(call github,gdraheim,zziplib,v$(ZZIPLIB_VERSION)) +ZZIPLIB_LICENSE = LGPL-2.0+ or MPL-1.1 +ZZIPLIB_LICENSE_FILES = docs/COPYING.LIB docs/COPYING.MPL docs/copying.htm +ZZIPLIB_CPE_ID_VENDOR = zziplib_project +ZZIPLIB_INSTALL_STAGING = YES +ZZIPLIB_CONF_OPTS += \ + -DZZIPDOCS=OFF \ + -DZZIPTEST=OFF +ZZIPLIB_DEPENDENCIES = host-pkgconf zlib + +define ZZIPLIB_POST_EXTRACT_FIXUP + rm $(@D)/GNUmakefile +endef +ZZIPLIB_POST_EXTRACT_HOOKS += ZZIPLIB_POST_EXTRACT_FIXUP + +ifeq ($(BR2_PACKAGE_SDL2),y) +ZZIPLIB_CONF_OPTS += -DZZIPSDL=ON +ZZIPLIB_DEPENDENCIES += sdl2 +else +ZZIPLIB_CONF_OPTS += -DZZIPSDL=OFF +endif + +$(eval $(cmake-package)) diff --git a/support/config-fragments/autobuild/andes-nds32.config b/support/config-fragments/autobuild/andes-nds32.config new file mode 100644 index 00000000..541677e0 --- /dev/null +++ b/support/config-fragments/autobuild/andes-nds32.config @@ -0,0 +1,3 @@ +BR2_nds32=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32=y diff --git a/support/config-fragments/autobuild/arm-aarch64.config b/support/config-fragments/autobuild/arm-aarch64.config new file mode 100644 index 00000000..bed08dcb --- /dev/null +++ b/support/config-fragments/autobuild/arm-aarch64.config @@ -0,0 +1,4 @@ +BR2_aarch64=y +BR2_cortex_a72=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y diff --git a/support/config-fragments/autobuild/bootlin-aarch64-glibc.config b/support/config-fragments/autobuild/bootlin-aarch64-glibc.config new file mode 100644 index 00000000..fe167e23 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-aarch64-glibc.config @@ -0,0 +1,4 @@ +BR2_aarch64=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-arcle-hs38-uclibc.config b/support/config-fragments/autobuild/bootlin-arcle-hs38-uclibc.config new file mode 100644 index 00000000..c9e1d19e --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-arcle-hs38-uclibc.config @@ -0,0 +1,5 @@ +BR2_arcle=y +BR2_archs38=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-armv5-uclibc.config b/support/config-fragments/autobuild/bootlin-armv5-uclibc.config new file mode 100644 index 00000000..c179c75d --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-armv5-uclibc.config @@ -0,0 +1,4 @@ +BR2_arm=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-armv7-glibc.config b/support/config-fragments/autobuild/bootlin-armv7-glibc.config new file mode 100644 index 00000000..11ae28ff --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-armv7-glibc.config @@ -0,0 +1,6 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_VFP=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_BLEEDING_EDGE=y diff --git a/support/config-fragments/autobuild/bootlin-armv7-musl.config b/support/config-fragments/autobuild/bootlin-armv7-musl.config new file mode 100644 index 00000000..7ae72b21 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-armv7-musl.config @@ -0,0 +1,6 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_VFP=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-armv7m-uclibc.config b/support/config-fragments/autobuild/bootlin-armv7m-uclibc.config new file mode 100644 index 00000000..8d054096 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-armv7m-uclibc.config @@ -0,0 +1,4 @@ +BR2_arm=y +BR2_cortex_m4=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7M_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-m68k-5208-uclibc.config b/support/config-fragments/autobuild/bootlin-m68k-5208-uclibc.config new file mode 100644 index 00000000..c6000beb --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-m68k-5208-uclibc.config @@ -0,0 +1,4 @@ +BR2_m68k=y +BR2_m68k_cf5208=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_COLDFIRE_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-m68k-68040-uclibc.config b/support/config-fragments/autobuild/bootlin-m68k-68040-uclibc.config new file mode 100644 index 00000000..f2c59e9d --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-m68k-68040-uclibc.config @@ -0,0 +1,4 @@ +BR2_m68k=y +BR2_m68k_68040=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_68XXX_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-microblazeel-uclibc.config b/support/config-fragments/autobuild/bootlin-microblazeel-uclibc.config new file mode 100644 index 00000000..206fb777 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-microblazeel-uclibc.config @@ -0,0 +1,3 @@ +BR2_microblazeel=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-mipsel-uclibc.config b/support/config-fragments/autobuild/bootlin-mipsel-uclibc.config new file mode 100644 index 00000000..ff523b25 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-mipsel-uclibc.config @@ -0,0 +1,4 @@ +BR2_mipsel=y +# BR2_MIPS_SOFT_FLOAT is not set +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-mipsel32r6-glibc.config b/support/config-fragments/autobuild/bootlin-mipsel32r6-glibc.config new file mode 100644 index 00000000..58a50121 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-mipsel32r6-glibc.config @@ -0,0 +1,6 @@ +BR2_mipsel=y +BR2_mips_32r6=y +# BR2_MIPS_SOFT_FLOAT is not set +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_GLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-nios2-glibc.config b/support/config-fragments/autobuild/bootlin-nios2-glibc.config new file mode 100644 index 00000000..575a1b30 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-nios2-glibc.config @@ -0,0 +1,4 @@ +BR2_nios2=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_NIOS2_GLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-openrisc-uclibc.config b/support/config-fragments/autobuild/bootlin-openrisc-uclibc.config new file mode 100644 index 00000000..bad08627 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-openrisc-uclibc.config @@ -0,0 +1,3 @@ +BR2_or1k=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-powerpc-e500mc-uclibc.config b/support/config-fragments/autobuild/bootlin-powerpc-e500mc-uclibc.config new file mode 100644 index 00000000..96461856 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-powerpc-e500mc-uclibc.config @@ -0,0 +1,4 @@ +BR2_powerpc=y +BR2_powerpc_e500mc=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-powerpc64le-power8-glibc.config b/support/config-fragments/autobuild/bootlin-powerpc64le-power8-glibc.config new file mode 100644 index 00000000..44f00963 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-powerpc64le-power8-glibc.config @@ -0,0 +1,4 @@ +BR2_powerpc64le=y +BR2_powerpc_power8=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_GLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-riscv32-glibc.config b/support/config-fragments/autobuild/bootlin-riscv32-glibc.config new file mode 100644 index 00000000..cc45d018 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-riscv32-glibc.config @@ -0,0 +1,5 @@ +BR2_riscv=y +BR2_RISCV_32=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV32_ILP32D_GLIBC_BLEEDING_EDGE=y diff --git a/support/config-fragments/autobuild/bootlin-riscv64-glibc.config b/support/config-fragments/autobuild/bootlin-riscv64-glibc.config new file mode 100644 index 00000000..f6c6fcaa --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-riscv64-glibc.config @@ -0,0 +1,5 @@ +BR2_riscv=y +BR2_RISCV_ABI_LP64=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_GLIBC_BLEEDING_EDGE=y diff --git a/support/config-fragments/autobuild/bootlin-riscv64-musl.config b/support/config-fragments/autobuild/bootlin-riscv64-musl.config new file mode 100644 index 00000000..2b6a6e56 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-riscv64-musl.config @@ -0,0 +1,4 @@ +BR2_riscv=y +BR2_RISCV_ABI_LP64=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_MUSL_BLEEDING_EDGE=y diff --git a/support/config-fragments/autobuild/bootlin-sh4-uclibc.config b/support/config-fragments/autobuild/bootlin-sh4-uclibc.config new file mode 100644 index 00000000..8b4d40b5 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-sh4-uclibc.config @@ -0,0 +1,3 @@ +BR2_sh=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-sparc-uclibc.config b/support/config-fragments/autobuild/bootlin-sparc-uclibc.config new file mode 100644 index 00000000..cbe72240 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-sparc-uclibc.config @@ -0,0 +1,3 @@ +BR2_sparc=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARCV8_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-sparc64-glibc.config b/support/config-fragments/autobuild/bootlin-sparc64-glibc.config new file mode 100644 index 00000000..4f851d10 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-sparc64-glibc.config @@ -0,0 +1,3 @@ +BR2_sparc64=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARC64_GLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-x86-64-glibc.config b/support/config-fragments/autobuild/bootlin-x86-64-glibc.config new file mode 100644 index 00000000..815eb658 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-x86-64-glibc.config @@ -0,0 +1,5 @@ +BR2_x86_64=y +BR2_x86_corei7=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_GLIBC_BLEEDING_EDGE=y diff --git a/support/config-fragments/autobuild/bootlin-x86-64-musl.config b/support/config-fragments/autobuild/bootlin-x86-64-musl.config new file mode 100644 index 00000000..9763d8a6 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-x86-64-musl.config @@ -0,0 +1,4 @@ +BR2_x86_64=y +BR2_x86_corei7=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_MUSL_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-x86-64-uclibc.config b/support/config-fragments/autobuild/bootlin-x86-64-uclibc.config new file mode 100644 index 00000000..70b940f1 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-x86-64-uclibc.config @@ -0,0 +1,4 @@ +BR2_x86_64=y +BR2_x86_corei7=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/bootlin-xtensa-uclibc.config b/support/config-fragments/autobuild/bootlin-xtensa-uclibc.config new file mode 100644 index 00000000..c44525b2 --- /dev/null +++ b/support/config-fragments/autobuild/bootlin-xtensa-uclibc.config @@ -0,0 +1,5 @@ +BR2_xtensa=y +BR2_XTENSA_CUSTOM=y +BR2_XTENSA_LITTLE_ENDIAN=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_XTENSA_LX60_UCLIBC_STABLE=y diff --git a/support/config-fragments/autobuild/br-arc-full-internal.config b/support/config-fragments/autobuild/br-arc-full-internal.config new file mode 100644 index 00000000..4755c9e4 --- /dev/null +++ b/support/config-fragments/autobuild/br-arc-full-internal.config @@ -0,0 +1,3 @@ +BR2_arcle=y +BR2_TOOLCHAIN_BUILDROOT_LOCALE=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y diff --git a/support/config-fragments/autobuild/br-arc-internal-glibc.config b/support/config-fragments/autobuild/br-arc-internal-glibc.config new file mode 100644 index 00000000..b9d68572 --- /dev/null +++ b/support/config-fragments/autobuild/br-arc-internal-glibc.config @@ -0,0 +1,4 @@ +BR2_arcle=y +BR2_archs38=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y diff --git a/support/config-fragments/autobuild/br-arm-basic.config b/support/config-fragments/autobuild/br-arm-basic.config new file mode 100644 index 00000000..fbbeaaa7 --- /dev/null +++ b/support/config-fragments/autobuild/br-arm-basic.config @@ -0,0 +1,8 @@ +BR2_arm=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-basic-2020.11.2.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_GCC_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y +# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set diff --git a/support/config-fragments/autobuild/br-arm-full-nothread.config b/support/config-fragments/autobuild/br-arm-full-nothread.config new file mode 100644 index 00000000..71592d68 --- /dev/null +++ b/support/config-fragments/autobuild/br-arm-full-nothread.config @@ -0,0 +1,11 @@ +BR2_arm=y +BR2_arm1176jzf_s=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm11-full-nothread-2020.11.2.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_GCC_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y +BR2_TOOLCHAIN_EXTERNAL_LOCALE=y +# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS is not set +BR2_TOOLCHAIN_EXTERNAL_CXX=y diff --git a/support/config-fragments/autobuild/br-arm-full-static.config b/support/config-fragments/autobuild/br-arm-full-static.config new file mode 100644 index 00000000..f3a4d91f --- /dev/null +++ b/support/config-fragments/autobuild/br-arm-full-static.config @@ -0,0 +1,11 @@ +BR2_arm=y +BR2_STATIC_LIBS=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-static-2020.11.2.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_GCC_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y +BR2_TOOLCHAIN_EXTERNAL_LOCALE=y +# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set +BR2_TOOLCHAIN_EXTERNAL_CXX=y diff --git a/support/config-fragments/autobuild/br-arm-internal-full.config b/support/config-fragments/autobuild/br-arm-internal-full.config new file mode 100644 index 00000000..b5f10069 --- /dev/null +++ b/support/config-fragments/autobuild/br-arm-internal-full.config @@ -0,0 +1,5 @@ +BR2_arm=y +BR2_ARM_EABI=y +BR2_TOOLCHAIN_BUILDROOT_LOCALE=y +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y diff --git a/support/config-fragments/autobuild/br-arm-internal-glibc.config b/support/config-fragments/autobuild/br-arm-internal-glibc.config new file mode 100644 index 00000000..ea6df7fb --- /dev/null +++ b/support/config-fragments/autobuild/br-arm-internal-glibc.config @@ -0,0 +1,6 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_BINUTILS_VERSION_2_34_X=y +BR2_GCC_VERSION_10_X=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y diff --git a/support/config-fragments/autobuild/br-arm-internal-musl.config b/support/config-fragments/autobuild/br-arm-internal-musl.config new file mode 100644 index 00000000..92788626 --- /dev/null +++ b/support/config-fragments/autobuild/br-arm-internal-musl.config @@ -0,0 +1,4 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_TOOLCHAIN_BUILDROOT_MUSL=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y diff --git a/support/config-fragments/autobuild/br-i386-pentium-mmx-musl.config b/support/config-fragments/autobuild/br-i386-pentium-mmx-musl.config new file mode 100644 index 00000000..1b3c45fe --- /dev/null +++ b/support/config-fragments/autobuild/br-i386-pentium-mmx-musl.config @@ -0,0 +1,10 @@ +BR2_x86_pentium_mmx=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.net/toolchains/tarballs/br-i386-pentium-mmx-musl-2020.11.2.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_GCC_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y +# BR2_TOOLCHAIN_EXTERNAL_HAS_SSP is not set +BR2_TOOLCHAIN_EXTERNAL_CXX=y diff --git a/support/config-fragments/autobuild/br-i386-pentium4-full.config b/support/config-fragments/autobuild/br-i386-pentium4-full.config new file mode 100644 index 00000000..c6806992 --- /dev/null +++ b/support/config-fragments/autobuild/br-i386-pentium4-full.config @@ -0,0 +1,10 @@ +BR2_x86_pentium4=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-i386-pentium4-full-2020.11.2.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_GCC_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y +BR2_TOOLCHAIN_EXTERNAL_LOCALE=y +# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set +BR2_TOOLCHAIN_EXTERNAL_CXX=y diff --git a/support/config-fragments/autobuild/br-microblazeel-full-internal.config b/support/config-fragments/autobuild/br-microblazeel-full-internal.config new file mode 100644 index 00000000..0d2d7df8 --- /dev/null +++ b/support/config-fragments/autobuild/br-microblazeel-full-internal.config @@ -0,0 +1 @@ +BR2_microblazeel=y diff --git a/support/config-fragments/autobuild/br-mips64-n64-full.config b/support/config-fragments/autobuild/br-mips64-n64-full.config new file mode 100644 index 00000000..b89b74e7 --- /dev/null +++ b/support/config-fragments/autobuild/br-mips64-n64-full.config @@ -0,0 +1,10 @@ +BR2_mips64el=y +BR2_MIPS_NABI64=y +# BR2_MIPS_SOFT_FLOAT is not set +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-mips64-n64-full-2020.11.2.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_GCC_8=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y +BR2_TOOLCHAIN_EXTERNAL_LOCALE=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y diff --git a/support/config-fragments/autobuild/br-mips64r6-el-hf-glibc.config b/support/config-fragments/autobuild/br-mips64r6-el-hf-glibc.config new file mode 100644 index 00000000..edf04c35 --- /dev/null +++ b/support/config-fragments/autobuild/br-mips64r6-el-hf-glibc.config @@ -0,0 +1,12 @@ +BR2_mips64el=y +BR2_mips_64r6=y +BR2_MIPS_NABI64=y +# BR2_MIPS_SOFT_FLOAT is not set +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-mips64r6-n64-el-hf-2020.11.2.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_GCC_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y diff --git a/support/config-fragments/autobuild/br-powerpc-603e-basic-cpp.config b/support/config-fragments/autobuild/br-powerpc-603e-basic-cpp.config new file mode 100644 index 00000000..045428c1 --- /dev/null +++ b/support/config-fragments/autobuild/br-powerpc-603e-basic-cpp.config @@ -0,0 +1,10 @@ +BR2_powerpc=y +BR2_powerpc_603e=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-powerpc-603e-basic-cpp-2020.11.2.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_GCC_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y +# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set +BR2_TOOLCHAIN_EXTERNAL_CXX=y diff --git a/support/config-fragments/autobuild/br-powerpc-internal-full.config b/support/config-fragments/autobuild/br-powerpc-internal-full.config new file mode 100644 index 00000000..61b3e7a9 --- /dev/null +++ b/support/config-fragments/autobuild/br-powerpc-internal-full.config @@ -0,0 +1,4 @@ +BR2_powerpc=y +BR2_TOOLCHAIN_BUILDROOT_LOCALE=y +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y diff --git a/support/config-fragments/autobuild/br-powerpc64-power7-glibc.config b/support/config-fragments/autobuild/br-powerpc64-power7-glibc.config new file mode 100644 index 00000000..a80047ea --- /dev/null +++ b/support/config-fragments/autobuild/br-powerpc64-power7-glibc.config @@ -0,0 +1,9 @@ +BR2_powerpc64=y +BR2_powerpc_power7=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.net/toolchains/tarballs/br-powerpc64-power7-glibc-2020.11.2.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_GCC_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y diff --git a/support/config-fragments/autobuild/br-riscv64-full-internal.config b/support/config-fragments/autobuild/br-riscv64-full-internal.config new file mode 100644 index 00000000..5c1dfc47 --- /dev/null +++ b/support/config-fragments/autobuild/br-riscv64-full-internal.config @@ -0,0 +1,4 @@ +BR2_riscv=y +BR2_TOOLCHAIN_BUILDROOT_LOCALE=y +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y diff --git a/support/config-fragments/autobuild/br-s390x-z13-internal-glibc.config b/support/config-fragments/autobuild/br-s390x-z13-internal-glibc.config new file mode 100644 index 00000000..56af5fb1 --- /dev/null +++ b/support/config-fragments/autobuild/br-s390x-z13-internal-glibc.config @@ -0,0 +1,4 @@ +BR2_s390x=y +BR2_s390x_z13=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y diff --git a/support/config-fragments/autobuild/br-xtensa-full-internal.config b/support/config-fragments/autobuild/br-xtensa-full-internal.config new file mode 100644 index 00000000..89e81d4c --- /dev/null +++ b/support/config-fragments/autobuild/br-xtensa-full-internal.config @@ -0,0 +1,3 @@ +BR2_xtensa=y +BR2_TOOLCHAIN_BUILDROOT_LOCALE=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y diff --git a/support/config-fragments/autobuild/linaro-aarch64-be.config b/support/config-fragments/autobuild/linaro-aarch64-be.config new file mode 100644 index 00000000..e075fe7e --- /dev/null +++ b/support/config-fragments/autobuild/linaro-aarch64-be.config @@ -0,0 +1,3 @@ +BR2_aarch64_be=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE=y diff --git a/support/config-fragments/autobuild/linaro-aarch64.config b/support/config-fragments/autobuild/linaro-aarch64.config new file mode 100644 index 00000000..f65f78a3 --- /dev/null +++ b/support/config-fragments/autobuild/linaro-aarch64.config @@ -0,0 +1,3 @@ +BR2_aarch64=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64=y diff --git a/support/config-fragments/autobuild/linaro-arm.config b/support/config-fragments/autobuild/linaro-arm.config new file mode 100644 index 00000000..d72e19b3 --- /dev/null +++ b/support/config-fragments/autobuild/linaro-arm.config @@ -0,0 +1,5 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_ARM_EABIHF=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM=y diff --git a/support/config-fragments/autobuild/sourcery-arm-armv4t.config b/support/config-fragments/autobuild/sourcery-arm-armv4t.config new file mode 100644 index 00000000..4c0e01fe --- /dev/null +++ b/support/config-fragments/autobuild/sourcery-arm-armv4t.config @@ -0,0 +1,4 @@ +BR2_arm=y +BR2_arm920t=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y diff --git a/support/config-fragments/autobuild/sourcery-arm-thumb2.config b/support/config-fragments/autobuild/sourcery-arm-thumb2.config new file mode 100644 index 00000000..e726757a --- /dev/null +++ b/support/config-fragments/autobuild/sourcery-arm-thumb2.config @@ -0,0 +1,7 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_ARM_EABI=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y +BR2_TARGET_OPTIMIZATION="" diff --git a/support/config-fragments/autobuild/sourcery-arm.config b/support/config-fragments/autobuild/sourcery-arm.config new file mode 100644 index 00000000..8ade4647 --- /dev/null +++ b/support/config-fragments/autobuild/sourcery-arm.config @@ -0,0 +1,3 @@ +BR2_arm=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM=y diff --git a/support/config-fragments/autobuild/sourcery-mips.config b/support/config-fragments/autobuild/sourcery-mips.config new file mode 100644 index 00000000..103e20bf --- /dev/null +++ b/support/config-fragments/autobuild/sourcery-mips.config @@ -0,0 +1,4 @@ +BR2_mips=y +BR2_mips_32r2=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS=y diff --git a/support/config-fragments/autobuild/sourcery-mips64.config b/support/config-fragments/autobuild/sourcery-mips64.config new file mode 100644 index 00000000..77e3a853 --- /dev/null +++ b/support/config-fragments/autobuild/sourcery-mips64.config @@ -0,0 +1,5 @@ +BR2_mips64el=y +BR2_mips_64r2=y +BR2_MIPS_NABI64=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS=y diff --git a/support/config-fragments/autobuild/sourcery-nios2.config b/support/config-fragments/autobuild/sourcery-nios2.config new file mode 100644 index 00000000..d58407d5 --- /dev/null +++ b/support/config-fragments/autobuild/sourcery-nios2.config @@ -0,0 +1,3 @@ +BR2_nios2=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII=y diff --git a/support/config-fragments/autobuild/toolchain-configs.csv b/support/config-fragments/autobuild/toolchain-configs.csv new file mode 100644 index 00000000..f5e9bd8c --- /dev/null +++ b/support/config-fragments/autobuild/toolchain-configs.csv @@ -0,0 +1,73 @@ +# This file is sorted by "importance" of toolchains, so that by +# default test-pkg tests a useful subset of toolchains + +# Toolchains used by default by test-pkg: + +# Test a regular uClibc toolchain +support/config-fragments/autobuild/bootlin-armv5-uclibc.config,x86_64 + +# Test a toolchain with glibc and a very recent gcc version +support/config-fragments/autobuild/bootlin-armv7-glibc.config,x86_64 + +# Test a noMMU toolchain with no dynamic library support +support/config-fragments/autobuild/bootlin-armv7m-uclibc.config,x86_64 + +# Test a musl toolchain +support/config-fragments/autobuild/bootlin-x86-64-musl.config,x86_64 + +# Test a MMU toolchain without dynamic library support +support/config-fragments/autobuild/br-arm-full-static.config,x86_64 + +# Test a toolchain with an old gcc version (gcc 4.8) +support/config-fragments/autobuild/sourcery-arm.config,x86 + +# Toolchains used by test-pkg only when the '-a' option is passed: +support/config-fragments/autobuild/andes-nds32.config,x86 +support/config-fragments/autobuild/arm-aarch64.config,x86_64 +support/config-fragments/autobuild/bootlin-aarch64-glibc.config,x86_64 +support/config-fragments/autobuild/bootlin-arcle-hs38-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-armv7-musl.config,x86_64 +support/config-fragments/autobuild/bootlin-m68k-68040-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-m68k-5208-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-microblazeel-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-mipsel-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-mipsel32r6-glibc.config,x86_64 +support/config-fragments/autobuild/bootlin-nios2-glibc.config,x86_64 +support/config-fragments/autobuild/bootlin-openrisc-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-powerpc64le-power8-glibc.config,x86_64 +support/config-fragments/autobuild/bootlin-powerpc-e500mc-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-riscv32-glibc.config,x86_64 +support/config-fragments/autobuild/bootlin-riscv64-glibc.config,x86_64 +support/config-fragments/autobuild/bootlin-riscv64-musl.config,x86_64 +support/config-fragments/autobuild/bootlin-sh4-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-sparc-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-sparc64-glibc.config,x86_64 +support/config-fragments/autobuild/bootlin-x86-64-glibc.config,x86_64 +support/config-fragments/autobuild/bootlin-x86-64-uclibc.config,x86_64 +support/config-fragments/autobuild/bootlin-xtensa-uclibc.config,x86_64 +support/config-fragments/autobuild/br-arc-full-internal.config,any +support/config-fragments/autobuild/br-arc-internal-glibc.config,any +support/config-fragments/autobuild/br-arm-basic.config,x86_64 +support/config-fragments/autobuild/br-arm-full-nothread.config,x86_64 +support/config-fragments/autobuild/br-arm-internal-full.config,any +support/config-fragments/autobuild/br-arm-internal-glibc.config,any +support/config-fragments/autobuild/br-arm-internal-musl.config,any +support/config-fragments/autobuild/br-i386-pentium4-full.config,x86_64 +support/config-fragments/autobuild/br-i386-pentium-mmx-musl.config,x86_64 +support/config-fragments/autobuild/br-microblazeel-full-internal.config,any +support/config-fragments/autobuild/br-mips64-n64-full.config,x86_64 +support/config-fragments/autobuild/br-mips64r6-el-hf-glibc.config,x86_64 +support/config-fragments/autobuild/br-powerpc-603e-basic-cpp.config,x86_64 +support/config-fragments/autobuild/br-powerpc64-power7-glibc.config,x86_64 +support/config-fragments/autobuild/br-powerpc-internal-full.config,any +support/config-fragments/autobuild/br-riscv64-full-internal.config,any +support/config-fragments/autobuild/br-s390x-z13-internal-glibc.config,any +support/config-fragments/autobuild/br-xtensa-full-internal.config,any +support/config-fragments/autobuild/linaro-aarch64.config,x86 +support/config-fragments/autobuild/linaro-aarch64-be.config,x86 +support/config-fragments/autobuild/linaro-arm.config,x86 +support/config-fragments/autobuild/sourcery-arm-armv4t.config,x86 +support/config-fragments/autobuild/sourcery-arm-thumb2.config,x86 +support/config-fragments/autobuild/sourcery-mips64.config,x86 +support/config-fragments/autobuild/sourcery-mips.config,x86 +support/config-fragments/autobuild/sourcery-nios2.config,x86 diff --git a/support/config-fragments/minimal.config b/support/config-fragments/minimal.config new file mode 100644 index 00000000..71344e2c --- /dev/null +++ b/support/config-fragments/minimal.config @@ -0,0 +1,8 @@ +# This config fragment disables Buildroot options that are turned on by +# default, in order to arrive at minimal build time. +BR2_INIT_NONE=y +BR2_SYSTEM_BIN_SH_NONE=y +# BR2_PACKAGE_BUSYBOX is not set +# BR2_TARGET_ROOTFS_TAR is not set +BR2_COMPILER_PARANOID_UNSAFE_PATH=y +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y diff --git a/support/dependencies/check-host-asciidoc.sh b/support/dependencies/check-host-asciidoc.sh new file mode 100755 index 00000000..fc5fcba4 --- /dev/null +++ b/support/dependencies/check-host-asciidoc.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +candidate="$1" #ignored + +asciidoc=`which asciidoc` +if [ ! -x "$asciidoc" ]; then + # echo nothing: no suitable asciidoc found + exit 1 +fi + +# Output of 'asciidoc --version' examples: +# asciidoc 8.6.7 +version=`$asciidoc --version | cut -d\ -f2` +major=`echo "$version" | cut -d. -f1` +minor=`echo "$version" | cut -d. -f2` +bugfix=`echo "$version" | cut -d. -f3` + +# To generate the manual, we need asciidoc >= 8.6.3 +major_min=8 +minor_min=6 +bugfix_min=3 +if [ $major -gt $major_min ]; then + echo $asciidoc +else + if [ $major -eq $major_min -a $minor -ge $minor_min ]; then + echo $asciidoc + else + if [ $major -eq $major_min -a $minor -eq $minor_min \ + -a $bugfix -ge $bugfix_min ]; then + echo $asciidoc + else + # echo nothing: no suitable asciidoc found + exit 1 + fi + fi +fi diff --git a/support/dependencies/check-host-bison-flex.mk b/support/dependencies/check-host-bison-flex.mk new file mode 100644 index 00000000..14a232fd --- /dev/null +++ b/support/dependencies/check-host-bison-flex.mk @@ -0,0 +1,14 @@ +# If the system lacks bison or flex, add +# dependencies to suitable host packages +# +# BR2_{BISON,FLES}_HOST_DEPENDENCY should only be used to build code +# that runs on host, e.g. Kconfig. To build code for target use plain +# host-{bison,flex}. + +ifeq ($(shell which bison 2>/dev/null),) +BR2_BISON_HOST_DEPENDENCY = host-bison +endif + +ifeq ($(shell which flex 2>/dev/null),) +BR2_FLEX_HOST_DEPENDENCY = host-flex +endif diff --git a/support/dependencies/check-host-cmake.mk b/support/dependencies/check-host-cmake.mk new file mode 100644 index 00000000..e1bbcd62 --- /dev/null +++ b/support/dependencies/check-host-cmake.mk @@ -0,0 +1,14 @@ +# Set this to either 3.15 or higher, depending on the highest minimum +# version required by any of the packages bundled in Buildroot. If a +# package is bumped or a new one added, and it requires a higher +# version, our cmake infra will catch it and build its own. +# +BR2_CMAKE_VERSION_MIN = 3.15 + +BR2_CMAKE_CANDIDATES ?= cmake cmake3 +BR2_CMAKE ?= $(call suitable-host-package,cmake,\ + $(BR2_CMAKE_VERSION_MIN) $(BR2_CMAKE_CANDIDATES)) +ifeq ($(BR2_CMAKE),) +BR2_CMAKE = $(HOST_DIR)/bin/cmake +BR2_CMAKE_HOST_DEPENDENCY = host-cmake +endif diff --git a/support/dependencies/check-host-cmake.sh b/support/dependencies/check-host-cmake.sh new file mode 100755 index 00000000..fadeae9f --- /dev/null +++ b/support/dependencies/check-host-cmake.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +# prevent shift error +[ $# -lt 2 ] && exit 1 + +major_min="${1%.*}" +minor_min="${1#*.}" + +shift + +for candidate; do + + # Try to locate the candidate. Discard it if not located. + cmake=`which "${candidate}" 2>/dev/null` + [ -n "${cmake}" ] || continue + + # Extract version X.Y from versions in the form X.Y or X.Y.Z + # with X, Y and Z numbers with one or more digits each, e.g. + # 3.2 -> 3.2 + # 3.2.3 -> 3.2 + # 3.2.42 -> 3.2 + # 3.10 -> 3.10 + # 3.10.4 -> 3.10 + # 3.10.42 -> 3.10 + # Discard the candidate if no version can be obtained + version="$(${cmake} --version \ + |sed -r -e '/.* ([[:digit:]]+\.[[:digit:]]+).*$/!d;' \ + -e 's//\1/' + )" + [ -n "${version}" ] || continue + + major="${version%.*}" + minor="${version#*.}" + + if [ ${major} -gt ${major_min} ]; then + echo "${cmake}" + exit + elif [ ${major} -eq ${major_min} -a ${minor} -ge ${minor_min} ]; then + echo "${cmake}" + exit + fi +done + +# echo nothing: no suitable cmake found +exit 1 diff --git a/support/dependencies/check-host-coreutils.mk b/support/dependencies/check-host-coreutils.mk new file mode 100644 index 00000000..87a3f446 --- /dev/null +++ b/support/dependencies/check-host-coreutils.mk @@ -0,0 +1,6 @@ +# Check whether the host's coreutils are up to date enough +# to provide 'ln --relative' and 'realpath'. + +ifeq (,$(call suitable-host-package,coreutils)) +BR2_COREUTILS_HOST_DEPENDENCY = host-coreutils +endif diff --git a/support/dependencies/check-host-coreutils.sh b/support/dependencies/check-host-coreutils.sh new file mode 100755 index 00000000..4d36d749 --- /dev/null +++ b/support/dependencies/check-host-coreutils.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Exit on the first error +set -e + +# Does ln supports the --relative/-r option? +ln --relative --help >/dev/null 2>&1 + +# Does realpath exist? +realpath --help >/dev/null 2>&1 + +echo OK diff --git a/support/dependencies/check-host-gzip.mk b/support/dependencies/check-host-gzip.mk new file mode 100644 index 00000000..bf9a369a --- /dev/null +++ b/support/dependencies/check-host-gzip.mk @@ -0,0 +1,3 @@ +ifeq (,$(call suitable-host-package,gzip)) +BR2_GZIP_HOST_DEPENDENCY = host-gzip +endif diff --git a/support/dependencies/check-host-gzip.sh b/support/dependencies/check-host-gzip.sh new file mode 100755 index 00000000..5f344c5f --- /dev/null +++ b/support/dependencies/check-host-gzip.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +candidate="$1" # ignored + +gzip="$(which gzip)" +if [ ! -x "${gzip}" ]; then + # echo nothing: no suitable gzip found + exit 1 +fi + +# gzip displays its version string on stdout +# pigz displays its version string on stderr +version="$("${gzip}" --version 2>&1)" +case "${version}" in + (*pigz*) + # echo nothing: no suitable gzip found + exit 1 + ;; +esac + +printf "%s" "${gzip}" diff --git a/support/dependencies/check-host-lzip.mk b/support/dependencies/check-host-lzip.mk new file mode 100644 index 00000000..98a4f423 --- /dev/null +++ b/support/dependencies/check-host-lzip.mk @@ -0,0 +1,4 @@ +ifeq (,$(call suitable-host-package,lzip,$(LZCAT))) +BR2_LZIP_HOST_DEPENDENCY = host-lzip +LZCAT = $(HOST_DIR)/bin/lzip -d -c +endif diff --git a/support/dependencies/check-host-lzip.sh b/support/dependencies/check-host-lzip.sh new file mode 100755 index 00000000..4f8a2ba3 --- /dev/null +++ b/support/dependencies/check-host-lzip.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +candidate="$1" + +lzip=`which $candidate 2>/dev/null` +if [ ! -x "$lzip" ]; then + lzip=`which lzip 2>/dev/null` + if [ ! -x "$lzip" ]; then + # echo nothing: no suitable lzip found + exit 1 + fi +fi + +echo $lzip diff --git a/support/dependencies/check-host-make.mk b/support/dependencies/check-host-make.mk new file mode 100644 index 00000000..66560ee8 --- /dev/null +++ b/support/dependencies/check-host-make.mk @@ -0,0 +1,21 @@ +# Since version 2.28, glibc requires GNU Make >= 4.0 +# https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html +# +# Set this to either 4.0 or higher, depending on the highest minimum +# version required by any of the packages bundled in Buildroot. If a +# package is bumped or a new one added, and it requires a higher +# version, our package infra will catch it and whine. +# +BR2_MAKE_VERSION_MIN = 4.0 + +BR2_MAKE ?= $(call suitable-host-package,make,\ + $(BR2_MAKE_VERSION_MIN) $(MAKE)) + +ifeq ($(BR2_MAKE),) +BR2_MAKE = $(HOST_DIR)/bin/host-make -j$(PARALLEL_JOBS) +BR2_MAKE1 = $(HOST_DIR)/bin/host-make -j1 +BR2_MAKE_HOST_DEPENDENCY = host-make +else +BR2_MAKE = $(MAKE) +BR2_MAKE1 = $(MAKE1) +endif diff --git a/support/dependencies/check-host-make.sh b/support/dependencies/check-host-make.sh new file mode 100755 index 00000000..0de7e9f6 --- /dev/null +++ b/support/dependencies/check-host-make.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +# prevent shift error +[ $# -lt 2 ] && exit 1 + +major_min="${1%.*}" +minor_min="${1#*.}" + +shift + +# The host make program is already checked by dependencies.sh but we +# want to check the version number even if Buildroot is able to use +# GNU make >= 3.81 but some packages may require a more recent version. +make="$1" + +# Output of 'make --version' examples: +# GNU Make 4.2.1 +# GNU Make 4.0 +# GNU Make 3.81 +version=`$make --version 2>&1 | sed -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ +].*//g' -e '1q'` + +major=`echo "$version" | cut -d. -f1` +minor=`echo "$version" | cut -d. -f2` + +if [ $major -lt $major_min ]; then + # echo nothing: no suitable make found + exit 1 +fi + +if [ $major -eq $major_min -a $minor -lt $minor_min ]; then + # echo nothing: no suitable make found + exit 1 +fi + +# valid +echo $make diff --git a/support/dependencies/check-host-python3.mk b/support/dependencies/check-host-python3.mk new file mode 100644 index 00000000..50ed933a --- /dev/null +++ b/support/dependencies/check-host-python3.mk @@ -0,0 +1,8 @@ +# Since version 2.29, glibc requires python 3.4 or later to build the GNU C Library. +# https://www.sourceware.org/ml/libc-alpha/2019-01/msg00723.html + +BR2_PYTHON3_VERSION_MIN = 3.4 + +ifeq (,$(call suitable-host-package,python3,$(BR2_PYTHON3_VERSION_MIN) python3 python)) +BR2_PYTHON3_HOST_DEPENDENCY = host-python3 +endif diff --git a/support/dependencies/check-host-python3.sh b/support/dependencies/check-host-python3.sh new file mode 100755 index 00000000..17cafd28 --- /dev/null +++ b/support/dependencies/check-host-python3.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# prevent shift error +[ $# -lt 2 ] && exit 1 + +version_min="$(echo ${1} | awk '{ split($1, v, "."); print v[1] v[2] }')" + +shift + +# The host python interpreter is already checked by dependencies.sh but +# it only check if the version is at least 2.7. +# We want to check the version number of the python3 interpreter even +# if Buildroot is able to use any version but some packages may require +# a more recent version. + +for candidate in "${@}" ; do + python3=`which $candidate 2>/dev/null` + if [ ! -x "$python3" ]; then + continue + fi + version=`$python3 -V 2>&1 | awk '{ split($2, v, "."); print v[1] v[2] }'` + + if [ $version -lt $version_min ]; then + # no suitable python3 found + continue + fi + + # suitable python3 found + echo $python3 + break +done diff --git a/support/dependencies/check-host-tar.mk b/support/dependencies/check-host-tar.mk new file mode 100644 index 00000000..07d02fd1 --- /dev/null +++ b/support/dependencies/check-host-tar.mk @@ -0,0 +1,6 @@ +TAR ?= tar + +ifeq (,$(call suitable-host-package,tar,$(TAR))) +TAR = $(HOST_DIR)/bin/tar +BR2_TAR_HOST_DEPENDENCY = host-tar +endif diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh new file mode 100755 index 00000000..b7d607a4 --- /dev/null +++ b/support/dependencies/check-host-tar.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +candidate="$1" + +tar=`which $candidate` +if [ ! -x "$tar" ]; then + tar=`which tar` + if [ ! -x "$tar" ]; then + # echo nothing: no suitable tar found + exit 1 + fi +fi + +# Output of 'tar --version' examples: +# tar (GNU tar) 1.15.1 +# tar (GNU tar) 1.25 +# bsdtar 2.8.3 - libarchive 2.8.3 +version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'` +major=`echo "$version" | cut -d. -f1` +minor=`echo "$version" | cut -d. -f2` +bugfix=`echo "$version" | cut -d. -f3` +version_bsd=`$tar --version | grep 'bsdtar'` + +# BSD tar does not have all the command-line options +if [ -n "${version_bsd}" ] ; then + # echo nothing: no suitable tar found + exit 1 +fi + +# Minimal version = 1.27 (previous versions do not correctly unpack archives +# containing hard-links if the --strip-components option is used or create +# different gnu long link headers for path elements > 100 characters). +major_min=1 +minor_min=27 + +if [ $major -lt $major_min ]; then + # echo nothing: no suitable tar found + exit 1 +fi + +if [ $major -eq $major_min -a $minor -lt $minor_min ]; then + # echo nothing: no suitable tar found + exit 1 +fi + +# valid +echo $tar diff --git a/support/dependencies/check-host-xzcat.mk b/support/dependencies/check-host-xzcat.mk new file mode 100644 index 00000000..9a78a8f3 --- /dev/null +++ b/support/dependencies/check-host-xzcat.mk @@ -0,0 +1,7 @@ +# XZCAT is taken from BR2_XZCAT (defaults to 'xzcat') (see Makefile) +# If it is not present, build our own host-xzcat + +ifeq (,$(call suitable-host-package,xzcat,$(XZCAT))) +BR2_XZCAT_HOST_DEPENDENCY = host-xz +XZCAT = $(HOST_DIR)/bin/xzcat +endif diff --git a/support/dependencies/check-host-xzcat.sh b/support/dependencies/check-host-xzcat.sh new file mode 100755 index 00000000..10f1c456 --- /dev/null +++ b/support/dependencies/check-host-xzcat.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +candidate="$1" + +xzcat=`which $candidate 2>/dev/null` +if [ ! -x "$xzcat" ]; then + xzcat=`which xzcat 2>/dev/null` + if [ ! -x "$xzcat" ]; then + # echo nothing: no suitable xzcat found + exit 1 + fi +fi + +echo $xzcat diff --git a/support/dependencies/dependencies.mk b/support/dependencies/dependencies.mk new file mode 100644 index 00000000..4fac5c73 --- /dev/null +++ b/support/dependencies/dependencies.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# Check buildroot dependencies and bail out if the user's +# system is judged to be lacking.... +# +################################################################################ + +ifeq ($(BR2_FORCE_HOST_BUILD),y) +# ignore all available host packages +define suitable-host-package +endef +else +# suitable-host-pkg: calls check-host-$(1).sh shell script. Parameter (2) +# can be the candidate to be checked. If not present, the check-host-$(1).sh +# script should use 'which' to find a candidate. The script should return +# the path to the suitable host tool, or nothing if no suitable tool was found. +define suitable-host-package +$(shell support/dependencies/check-host-$(1).sh $(2)) +endef +endif +# host utilities needs host-tar to extract the source code tarballs, so +# ensure check-host-tar.mk is included before the rest +include support/dependencies/check-host-tar.mk +-include $(sort $(filter-out %-tar.mk,$(wildcard support/dependencies/check-host-*.mk))) + +dependencies: + @MAKE="$(MAKE)" DL_TOOLS="$(sort $(DL_TOOLS_DEPENDENCIES))" \ + $(TOPDIR)/support/dependencies/dependencies.sh + +################################################################################ +# +# Toplevel Makefile options +# +################################################################################ +.PHONY: dependencies diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh new file mode 100755 index 00000000..1954f038 --- /dev/null +++ b/support/dependencies/dependencies.sh @@ -0,0 +1,298 @@ +#!/bin/sh +# vi: set sw=4 ts=4: + +export LC_ALL=C +TAB="$(printf '\t')" +NL=" +" + +# Verify that grep works +echo "WORKS" | grep "WORKS" >/dev/null 2>&1 +if test $? != 0 ; then + echo + echo "grep doesn't work" + exit 1 +fi + +# Sanity check for CWD in LD_LIBRARY_PATH +case ":${LD_LIBRARY_PATH:-unset}:" in +(*::*|*:.:*) + echo + echo "You seem to have the current working directory in your" + echo "LD_LIBRARY_PATH environment variable. This doesn't work." + exit 1 + ;; +esac + +# Sanity check for CWD in PATH. Having the current working directory +# in the PATH makes various packages (e.g. toolchain, coreutils...) +# build process break. +# PATH should not contain a newline, otherwise it fails in spectacular +# ways as soon as PATH is referenced in a package rule +# An empty PATH is technically possible, but in practice we would not +# even arrive here if that was the case. +case ":${PATH:-unset}:" in +(*::*|*:.:*) + echo + echo "You seem to have the current working directory in your" + echo "PATH environment variable. This doesn't work." + exit 1 + ;; +(*" "*|*"${TAB}"*|*"${NL}"*) + printf "\n" + printf "Your PATH contains spaces, TABs, and/or newline (\\\n) characters.\n" + printf "This doesn't work. Fix you PATH.\n" + exit 1 + ;; +esac + +if test -n "$PERL_MM_OPT" ; then + echo + echo "You have PERL_MM_OPT defined because Perl local::lib" + echo "is installed on your system. Please unset this variable" + echo "before starting Buildroot, otherwise the compilation of" + echo "Perl related packages will fail" + exit 1 +fi + +check_prog_host() +{ + prog="$1" + if ! which $prog > /dev/null ; then + echo >&2 + echo "You must install '$prog' on your build machine" >&2 + exit 1 + fi +} + +# Verify that which is installed +check_prog_host "which" +# Verify that sed is installed +check_prog_host "sed" + +# 'file' must be present and must be exactly /usr/bin/file, +# otherwise libtool fails in incomprehensible ways. +check_prog_host "/usr/bin/file" + +# Check make +MAKE=$(which make 2> /dev/null) +if [ -z "$MAKE" ] ; then + echo + echo "You must install 'make' on your build machine"; + exit 1; +fi; +MAKE_VERSION=$($MAKE --version 2>&1 | sed -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') +if [ -z "$MAKE_VERSION" ] ; then + echo + echo "You must install 'make' on your build machine"; + exit 1; +fi; +MAKE_MAJOR=$(echo $MAKE_VERSION | sed -e "s/\..*//g") +MAKE_MINOR=$(echo $MAKE_VERSION | sed -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g") +if [ $MAKE_MAJOR -lt 3 ] || [ $MAKE_MAJOR -eq 3 -a $MAKE_MINOR -lt 81 ] ; then + echo + echo "You have make '$MAKE_VERSION' installed. GNU make >=3.81 is required" + exit 1; +fi; + +# Check host gcc +COMPILER=$(which $HOSTCC_NOCCACHE 2> /dev/null) +if [ -z "$COMPILER" ] ; then + COMPILER=$(which cc 2> /dev/null) +fi; +if [ -z "$COMPILER" ] ; then + echo + echo "You must install 'gcc' on your build machine"; + exit 1; +fi; + +COMPILER_VERSION=$($COMPILER -v 2>&1 | sed -n '/^gcc version/p' | + sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') +if [ -z "$COMPILER_VERSION" ] ; then + echo + echo "You must install 'gcc' on your build machine"; + exit 1; +fi; +COMPILER_MAJOR=$(echo $COMPILER_VERSION | sed -e "s/\..*//g") +COMPILER_MINOR=$(echo $COMPILER_VERSION | sed -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g") +if [ $COMPILER_MAJOR -lt 4 -o $COMPILER_MAJOR -eq 4 -a $COMPILER_MINOR -lt 8 ] ; then + echo + echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 4.8 is required" + exit 1; +fi; + +# check for host CXX +CXXCOMPILER=$(which $HOSTCXX_NOCCACHE 2> /dev/null) +if [ -z "$CXXCOMPILER" ] ; then + CXXCOMPILER=$(which c++ 2> /dev/null) +fi + +if [ -z "$CXXCOMPILER" ] ; then + echo + echo "You may have to install 'g++' on your build machine" +fi +if [ ! -z "$CXXCOMPILER" ] ; then + CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' | + sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') + if [ -z "$CXXCOMPILER_VERSION" ] ; then + echo + echo "You may have to install 'g++' on your build machine" + fi +fi + +if [ -n "$CXXCOMPILER_VERSION" ] ; then + CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g") + CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g") + if [ $CXXCOMPILER_MAJOR -lt 4 -o $CXXCOMPILER_MAJOR -eq 4 -a $CXXCOMPILER_MINOR -lt 8 ] ; then + echo + echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 4.8 is required" + exit 1 + fi +fi + +# Check bash +# We only check bash is available, setting SHELL appropriately is done +# in the top-level Makefile, and we mimick the same sequence here +if [ -n "${BASH}" ]; then : +elif [ -x /bin/bash ]; then : +elif [ -z "$( sh -c 'echo $BASH' )" ]; then + echo + echo "You must install 'bash' on your build machine" + exit 1 +fi + +# Check that a few mandatory programs are installed +missing_progs="no" +for prog in patch perl tar wget cpio unzip rsync bc ${DL_TOOLS} ; do + if ! which $prog > /dev/null ; then + echo "You must install '$prog' on your build machine"; + missing_progs="yes" + if test $prog = "svn" ; then + echo " svn is usually part of the subversion package in your distribution" + elif test $prog = "hg" ; then + echo " hg is usually part of the mercurial package in your distribution" + elif test $prog = "zcat" ; then + echo " zcat is usually part of the gzip package in your distribution" + elif test $prog = "bzcat" ; then + echo " bzcat is usually part of the bzip2 package in your distribution" + fi + fi +done + +if test "${missing_progs}" = "yes" ; then + exit 1 +fi + +# apply-patches.sh needs patch with --no-backup-if-mismatch support (GNU, busybox w/DESKTOP) +if ! patch --no-backup-if-mismatch /dev/null; then + echo "Your patch program does not support the --no-backup-if-mismatch option. Install GNU patch" + exit 1 +fi + +if grep ^BR2_NEEDS_HOST_UTF8_LOCALE=y $BR2_CONFIG > /dev/null; then + if ! which locale > /dev/null ; then + echo + echo "You need locale support on your build machine to build a toolchain supporting locales" + exit 1 ; + fi + if ! locale -a | grep -q -i -E 'utf-?8$' ; then + echo + echo "You need at least one UTF8 locale to build a toolchain supporting locales" + exit 1 ; + fi +fi + +if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then + check_prog_host "java" + JAVA_GCJ=$(java -version 2>&1 | grep gcj) + if [ ! -z "$JAVA_GCJ" ] ; then + echo + echo "$JAVA_GCJ is not sufficient to compile your package selection." + echo "Please install an OpenJDK/IcedTea/Oracle Java." + exit 1 ; + fi +fi + +if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then + if test ! -f /lib/ld-linux.so.2 ; then + echo + echo "Your Buildroot configuration uses pre-built tools for the x86 architecture," + echo "but your build machine uses the x86-64 architecture without the 32 bits compatibility" + echo "library." + echo "If you're running a Debian/Ubuntu distribution, install the libc6-i386," + echo "lib32stdc++6, and lib32z1 packages (or alternatively libc6:i386," + echo "libstdc++6:i386, and zlib1g:i386)." + echo "If you're running a RedHat/Fedora distribution, install the glibc.i686 and" + echo "zlib.i686 packages." + echo "If you're running an ArchLinux distribution, install lib32-glibc." + echo "For other distributions, refer to the documentation on how to install the 32 bits" + echo "compatibility libraries." + exit 1 + fi +fi + +if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then + if ! echo "int main(void) {}" | gcc -m32 -x c - -o /dev/null 2>/dev/null; then + echo + echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries." + echo "If you're running a Debian/Ubuntu distribution, install the gcc-multilib package." + echo "For other distributions, refer to their documentation." + exit 1 + fi + + if ! echo "int main(void) {}" | g++ -m32 -x c++ - -o /dev/null 2>/dev/null; then + echo + echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries." + echo "If you're running a Debian/Ubuntu distribution, install the g++-multilib package." + echo "For other distributions, refer to their documentation." + exit 1 + fi +fi + +if grep ^BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT=y $BR2_CONFIG ; then + if ! echo "#include " | $HOSTCXX_NOCCACHE -I$($HOSTCXX_NOCCACHE -print-file-name=plugin)/include -x c++ -c - -o /dev/null ; then + echo + echo "Your Buildroot configuration needs a host compiler capable of building gcc plugins." + echo "If you're running a Debian/Ubuntu distribution, install gcc-X-plugin-dev package." + echo "For other distributions, refer to their documentation." + exit 1 ; + fi +fi + +# Check that the Perl installation is complete enough for Buildroot. +required_perl_modules="Data::Dumper" # Needed to build host-autoconf +required_perl_modules="$required_perl_modules ExtUtils::MakeMaker" # Used by host-libxml-parser-perl +required_perl_modules="$required_perl_modules Thread::Queue" # Used by host-automake + +if grep -q ^BR2_PACKAGE_MPV=y $BR2_CONFIG ; then + required_perl_modules="$required_perl_modules Math::BigInt" + required_perl_modules="$required_perl_modules Math::BigRat" +fi + +if grep -q ^BR2_PACKAGE_WHOIS=y $BR2_CONFIG ; then + required_perl_modules="$required_perl_modules autodie" +fi + +if grep -q -E '^BR2_PACKAGE_(WEBKITGTK|WPEWEBKIT)=y' $BR2_CONFIG ; then + required_perl_modules="${required_perl_modules} JSON::PP" +fi + +# This variable will keep the modules that are missing in your system. +missing_perl_modules="" + +for pm in $required_perl_modules ; do + if ! perl -e "require $pm" > /dev/null 2>&1 ; then + missing_perl_modules="$missing_perl_modules $pm" + fi +done + +if [ -n "$missing_perl_modules" ] ; then + echo "Your Perl installation is not complete enough; at least the following" + echo "modules are missing:" + echo + for pm in $missing_perl_modules ; do + printf "\t $pm\n" + done + echo + exit 1 +fi diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile new file mode 100644 index 00000000..a9bacca3 --- /dev/null +++ b/support/docker/Dockerfile @@ -0,0 +1,63 @@ +# This Dockerfile generates the docker image that gets used by Gitlab CI +# To build it (YYYYMMDD.HHMM is the current date and time in UTC): +# sudo docker build -t buildroot/base:YYYYMMDD.HHMM support/docker +# sudo docker push buildroot/base:YYYYMMDD.HHMM + +# We use a specific tag for the base image *and* the corresponding date +# for the repository., so do not forget to update the apt-sources.list +# file that is shipped next to this Dockerfile. +FROM debian:stretch-20171210 + +LABEL maintainer="Buildroot mailing list " \ + vendor="Buildroot" \ +description="Container with everything needed to run Buildroot" + +# Setup environment +ENV DEBIAN_FRONTEND noninteractive + +# This repository can be a bit slow at times. Don't panic... +COPY apt-sources.list /etc/apt/sources.list + +# The container has no package lists, so need to update first +RUN dpkg --add-architecture i386 && \ + apt-get update -y +RUN apt-get install -y --no-install-recommends \ + bc \ + build-essential \ + bzr \ + ca-certificates \ + cmake \ + cpio \ + cvs \ + file \ + g++-multilib \ + git \ + libc6:i386 \ + libncurses5-dev \ + locales \ + mercurial \ + python3 \ + python3-flake8 \ + python3-nose2 \ + python3-pexpect \ + qemu-system-arm \ + qemu-system-x86 \ + rsync \ + subversion \ + unzip \ + wget \ + && \ + apt-get -y autoremove && \ + apt-get -y clean + +# To be able to generate a toolchain with locales, enable one UTF-8 locale +RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \ + /usr/sbin/locale-gen + +RUN useradd -ms /bin/bash br-user && \ + chown -R br-user:br-user /home/br-user + +USER br-user +WORKDIR /home/br-user +ENV HOME /home/br-user +ENV LC_ALL en_US.UTF-8 diff --git a/support/docker/apt-sources.list b/support/docker/apt-sources.list new file mode 100644 index 00000000..789fb8fc --- /dev/null +++ b/support/docker/apt-sources.list @@ -0,0 +1,4 @@ +# Latest just before 20171210T000000Z: +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20171209T220346Z/ stretch main +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20171209T220346Z/ stretch-updates main +deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20171209T224618Z/ stretch/updates main diff --git a/support/download/bzr b/support/download/bzr new file mode 100755 index 00000000..5289a421 --- /dev/null +++ b/support/download/bzr @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for bzr, to be called from the download wrapper script +# +# Options: +# -q Be quiet +# -o FILE Generate archive in FILE. +# -u URI Clone from repository at URI. +# -c CSET Use changeset (or revision) CSET. +# -n NAME Use basename NAME. +# +# Environment: +# BZR : the bzr command to call + + +verbose= +while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do + case "${OPT}" in + q) verbose=-q;; + o) output="${OPTARG}";; + u) uri="${OPTARG}";; + c) cset="${OPTARG}";; + n) basename="${OPTARG}";; + :) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done + +shift $((OPTIND-1)) # Get rid of our options + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_bzr() { + eval ${BZR} "${@}" +} + +# --per-file-timestamps comes with bzr-2.2 (released August 2010), +# so only pass it if bzr is recent enough. We compute versions as: +# major*1000 + minor +bzr_min_version=2002 +bzr_version=$(($(bzr --version | + sed -r -n 's/^Bazaar \(bzr\) ([[:digit:]]+)\.([[:digit:]]+)\..*$/\1*1000+\2/p') + )) + +# If the version is recent enough, we can generate reproducible +# archives; otherwise, we just hope for the best (as it would +# be downloaded from the BR mirror if what we generate here does +# not match the hash we have for it). +if [ ${bzr_version} -ge ${bzr_min_version} ]; then + timestamp_opt="--per-file-timestamps" +fi + +_bzr export ${verbose} --root="'${basename}/'" --format=tgz \ + ${timestamp_opt} - "${@}" "'${uri}'" -r "'${cset}'" \ + >"${output}" diff --git a/support/download/check-hash b/support/download/check-hash new file mode 100755 index 00000000..fe9c1057 --- /dev/null +++ b/support/download/check-hash @@ -0,0 +1,111 @@ +#!/usr/bin/env bash +set -e + +# Helper to check a file matches its known hash +# Call it with: +# $1: the path of the file containing all the expected hashes +# $2: the full path to the temporary file that was downloaded, and +# that is to be checked +# $3: the final basename of the file, to which it will be ultimately +# saved as, to be able to match it to the corresponding hashes +# in the .hash file +# +# Exit codes: +# 0: the hash file exists and the file to check matches all its hashes, +# or the hash file does not exist +# 1: unknown command-line option +# 2: the hash file exists and the file to check does not match at least +# one of its hashes +# 3: the hash file exists and there was no hash to check the file against +# 4: the hash file exists and at least one hash type is unknown + +while getopts :q OPT; do + case "${OPT}" in + q) exec >/dev/null;; + \?) exit 1;; + esac +done +shift $((OPTIND-1)) + +h_file="${1}" +file="${2}" +base="${3}" + +# Bail early if no hash to check +if [ -z "${h_file}" ]; then + exit 0 +fi +# Does the hash-file exist? +if [ ! -f "${h_file}" ]; then + printf "WARNING: no hash file for %s\n" "${base}" >&2 + exit 0 +fi + +# Check one hash for a file +# $1: algo hash +# $2: known hash +# $3: file (full path) +check_one_hash() { + _h="${1}" + _known="${2}" + _file="${3}" + + # Note: md5 is supported, but undocumented on purpose. + # Note: sha3 is not supported, since there is currently no implementation + # (the NIST has yet to publish the parameters). + # Note: 'none' means there is explicitly no hash for that file. + case "${_h}" in + none) + return 0 + ;; + md5|sha1) ;; + sha224|sha256|sha384|sha512) ;; + *) # Unknown hash, exit with error + printf "ERROR: unknown hash '%s' for '%s'\n" \ + "${_h}" "${base}" >&2 + exit 4 + ;; + esac + + # Do the hashes match? + _hash=$( ${_h}sum "${_file}" |cut -d ' ' -f 1 ) + if [ "${_hash}" = "${_known}" ]; then + printf "%s: OK (%s: %s)\n" "${base}" "${_h}" "${_hash}" + return 0 + fi + + printf "ERROR: %s has wrong %s hash:\n" "${base}" "${_h}" >&2 + printf "ERROR: expected: %s\n" "${_known}" >&2 + printf "ERROR: got : %s\n" "${_hash}" >&2 + printf "ERROR: Incomplete download, or man-in-the-middle (MITM) attack\n" >&2 + + exit 2 +} + +# Do we know one or more hashes for that file? +nb_checks=0 +while read t h f; do + case "${t}" in + ''|'#'*) + # Skip comments and empty lines + continue + ;; + *) + if [ "${f}" = "${base}" ]; then + check_one_hash "${t}" "${h}" "${file}" + : $((nb_checks++)) + fi + ;; + esac +done <"${h_file}" + +if [ ${nb_checks} -eq 0 ]; then + case " ${BR_NO_CHECK_HASH_FOR} " in + *" ${base} "*) + # File explicitly has no hash + exit 0 + ;; + esac + printf "ERROR: No hash found for %s\n" "${base}" >&2 + exit 3 +fi diff --git a/support/download/cvs b/support/download/cvs new file mode 100755 index 00000000..9d0dc3cb --- /dev/null +++ b/support/download/cvs @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for cvs, to be called from the download wrapper script +# +# Options: +# -q Be quiet +# -o FILE Generate archive in FILE. +# -u URI Checkout from repository at URI. +# -c REV Use revision REV. +# -N RAWNAME Use rawname (aka module name) RAWNAME. +# -n NAME Use basename NAME. +# +# Environment: +# CVS : the cvs command to call + +verbose= +while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do + case "${OPT}" in + q) verbose=-Q;; + o) output="${OPTARG}";; + u) uri="${OPTARG#*://}";; + c) rev="${OPTARG}";; + N) rawname="${OPTARG}";; + n) basename="${OPTARG}";; + :) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done + +shift $((OPTIND-1)) # Get rid of our options + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them). +# If the CVS server is deadlocked, the client will never return (cfr. +# http://autobuild.buildroot.net/results/23d/23d1034b33d0354de15de2ec4a8ccd0603e8db78/build-end.log +# ). Since nobody sane will put large code bases in CVS, a timeout of +# 10 minutes should do the trick. +_cvs() { + eval timeout 10m ${CVS} "${@}" +} + +if [[ ${rev} =~ ^[0-9] ]]; then + # Date, because a tag or a branch cannot begin with a number + select="-D" +else + # Tag or branch + select="-r" +fi + +# The absence of an initial : on ${uri} means access method undefined +if [[ ! "${uri}" =~ ^: ]]; then + # defaults to anonymous pserver + uri=":pserver:anonymous@${uri}" +fi + +export TZ=UTC +_cvs ${verbose} -z3 -d"'${uri}'" \ + co "${@}" -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'" + +tar czf "${output}" "${basename}" diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper new file mode 100755 index 00000000..3315bd41 --- /dev/null +++ b/support/download/dl-wrapper @@ -0,0 +1,219 @@ +#!/usr/bin/env bash + +# This script is a wrapper to the other download backends. +# Its role is to ensure atomicity when saving downloaded files +# back to BR2_DL_DIR, and not clutter BR2_DL_DIR with partial, +# failed downloads. + +# To avoid cluttering BR2_DL_DIR, we download to a trashable +# location, namely in $(BUILD_DIR). +# Then, we move the downloaded file to a temporary file in the +# same directory as the final output file. +# This allows us to finally atomically rename it to its final +# name. +# If anything goes wrong, we just remove all the temporaries +# created so far. + +# We want to catch any unexpected failure, and exit immediately. +set -e + +export BR_BACKEND_DL_GETOPTS=":hc:d:o:n:N:H:ru:qf:e" + +main() { + local OPT OPTARG + local backend output hfile recurse quiet rc + local -a uris + + # Parse our options; anything after '--' is for the backend + while getopts ":c:d:D:o:n:N:H:rf:u:q" OPT; do + case "${OPT}" in + c) cset="${OPTARG}";; + d) dl_dir="${OPTARG}";; + D) old_dl_dir="${OPTARG}";; + o) output="${OPTARG}";; + n) raw_base_name="${OPTARG}";; + N) base_name="${OPTARG}";; + H) hfile="${OPTARG}";; + r) recurse="-r";; + f) filename="${OPTARG}";; + u) uris+=( "${OPTARG}" );; + q) quiet="-q";; + :) error "option '%s' expects a mandatory argument\n" "${OPTARG}";; + \?) error "unknown option '%s'\n" "${OPTARG}";; + esac + done + + # Forget our options, and keep only those for the backend + shift $((OPTIND-1)) + + if [ -z "${output}" ]; then + error "no output specified, use -o\n" + fi + + # Legacy handling: check if the file already exists in the global + # download directory. If it does, hard-link it. If it turns out it + # was an incorrect download, we'd still check it below anyway. + # If we can neither link nor copy, fallback to doing a download. + # NOTE! This is not atomic, is subject to TOCTTOU, but the whole + # dl-wrapper runs under an flock, so we're safe. + if [ ! -e "${output}" -a -e "${old_dl_dir}/${filename}" ]; then + ln "${old_dl_dir}/${filename}" "${output}" || \ + cp "${old_dl_dir}/${filename}" "${output}" || \ + true + fi + + # If the output file already exists and: + # - there's no .hash file: do not download it again and exit promptly + # - matches all its hashes: do not download it again and exit promptly + # - fails at least one of its hashes: force a re-download + # - there's no hash (but a .hash file): consider it a hard error + if [ -e "${output}" ]; then + if support/download/check-hash ${quiet} "${hfile}" "${output}" "${output##*/}"; then + exit 0 + elif [ ${?} -ne 2 ]; then + # Do not remove the file, otherwise it might get re-downloaded + # from a later location (i.e. primary -> upstream -> mirror). + # Do not print a message, check-hash already did. + exit 1 + fi + rm -f "${output}" + warn "Re-downloading '%s'...\n" "${output##*/}" + fi + + # Look through all the uris that we were given to download the package + # source + download_and_check=0 + rc=1 + for uri in "${uris[@]}"; do + backend_urlencode="${uri%%+*}" + backend="${backend_urlencode%|*}" + case "${backend}" in + git|svn|cvs|bzr|file|scp|hg) ;; + *) backend="wget" ;; + esac + uri=${uri#*+} + + urlencode=${backend_urlencode#*|} + # urlencode must be "urlencode" + [ "${urlencode}" != "urlencode" ] && urlencode="" + + # tmpd is a temporary directory in which backends may store + # intermediate by-products of the download. + # tmpf is the file in which the backends should put the downloaded + # content. + # tmpd is located in $(BUILD_DIR), so as not to clutter the (precious) + # $(BR2_DL_DIR) + # We let the backends create tmpf, so they are able to set whatever + # permission bits they want (although we're only really interested in + # the executable bit.) + tmpd="$(mktemp -d "${BUILD_DIR}/.${output##*/}.XXXXXX")" + tmpf="${tmpd}/output" + + # Helpers expect to run in a directory that is *really* trashable, so + # they are free to create whatever files and/or sub-dirs they might need. + # Doing the 'cd' here rather than in all backends is easier. + cd "${tmpd}" + + # If the backend fails, we can just remove the content of the temporary + # directory to remove all the cruft it may have left behind, and try + # the next URI until it succeeds. Once out of URI to try, we need to + # cleanup and exit. + if ! "${OLDPWD}/support/download/${backend}" \ + $([ -n "${urlencode}" ] && printf %s '-e') \ + -c "${cset}" \ + -d "${dl_dir}" \ + -n "${raw_base_name}" \ + -N "${base_name}" \ + -f "${filename}" \ + -u "${uri}" \ + -o "${tmpf}" \ + ${quiet} ${recurse} -- "${@}" + then + # cd back to keep path coherence + cd "${OLDPWD}" + rm -rf "${tmpd}" + continue + fi + + # cd back to free the temp-dir, so we can remove it later + cd "${OLDPWD}" + + # Check if the downloaded file is sane, and matches the stored hashes + # for that file + if support/download/check-hash ${quiet} "${hfile}" "${tmpf}" "${output##*/}"; then + rc=0 + else + if [ ${?} -ne 3 ]; then + rm -rf "${tmpd}" + continue + fi + + # the hash file exists and there was no hash to check the file + # against + rc=1 + fi + download_and_check=1 + break + done + + # We tried every URI possible, none seems to work or to check against the + # available hash. *ABORT MISSION* + if [ "${download_and_check}" -eq 0 ]; then + rm -rf "${tmpd}" + exit 1 + fi + + # tmp_output is in the same directory as the final output, so we can + # later move it atomically. + tmp_output="$(mktemp "${output}.XXXXXX")" + + # 'mktemp' creates files with 'go=-rwx', so the files are not accessible + # to users other than the one doing the download (and root, of course). + # This can be problematic when a shared BR2_DL_DIR is used by different + # users (e.g. on a build server), where all users may write to the shared + # location, since other users would not be allowed to read the files + # another user downloaded. + # So, we restore the 'go' access rights to a more sensible value, while + # still abiding by the current user's umask. We must do that before the + # final 'mv', so just do it now. + # Some backends (cp and scp) may create executable files, so we need to + # carry the executable bit if needed. + [ -x "${tmpf}" ] && new_mode=755 || new_mode=644 + new_mode=$(printf "%04o" $((0${new_mode} & ~0$(umask)))) + chmod ${new_mode} "${tmp_output}" + + # We must *not* unlink tmp_output, otherwise there is a small window + # during which another download process may create the same tmp_output + # name (very, very unlikely; but not impossible.) + # Using 'cp' is not reliable, since 'cp' may unlink the destination file + # if it is unable to open it with O_WRONLY|O_TRUNC; see: + # http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html + # Since the destination filesystem can be anything, it might not support + # O_TRUNC, so 'cp' would unlink it first. + # Use 'cat' and append-redirection '>>' to save to the final location, + # since that is the only way we can be 100% sure of the behaviour. + if ! cat "${tmpf}" >>"${tmp_output}"; then + rm -rf "${tmpd}" "${tmp_output}" + exit 1 + fi + rm -rf "${tmpd}" + + # tmp_output and output are on the same filesystem, so POSIX guarantees + # that 'mv' is atomic, because it then uses rename() that POSIX mandates + # to be atomic, see: + # http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html + if ! mv -f "${tmp_output}" "${output}"; then + rm -f "${tmp_output}" + exit 1 + fi + + return ${rc} +} + +trace() { local msg="${1}"; shift; printf "%s: ${msg}" "${my_name}" "${@}"; } +warn() { trace "${@}" >&2; } +errorN() { local ret="${1}"; shift; warn "${@}"; exit ${ret}; } +error() { errorN 1 "${@}"; } + +my_name="${0##*/}" +main "${@}" diff --git a/support/download/file b/support/download/file new file mode 100755 index 00000000..e52fcf2c --- /dev/null +++ b/support/download/file @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for cp, to be called from the download wrapper script +# +# Options: +# -q Be quiet. +# -o FILE Copy to file FILE. +# -f FILE Copy from basename file FILE. +# -u DIR Copy from FILE in DIR. +# +# Environment: +# LOCALFILES: the cp command to call + +# 'cp' usually does not print anything on its stdout, whereas the +# other download backends, even if not verbose, at least print some +# progress information. +# Make 'cp' verbose by default, so it behaves a bit like the others. +verbose=-v + +while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do + case "${OPT}" in + q) verbose=;; + o) output="${OPTARG}";; + f) file="${OPTARG}";; + u) dir="${OPTARG}";; + :) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done + +shift $((OPTIND-1)) # Get rid of our options + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_localfiles() { + eval ${LOCALFILES} "${@}" +} + +_localfiles ${verbose} "'${dir##file://}/${file}'" "'${output}'" diff --git a/support/download/git b/support/download/git new file mode 100755 index 00000000..fa98198f --- /dev/null +++ b/support/download/git @@ -0,0 +1,209 @@ +#!/usr/bin/env bash + +# NOTE: if the output of this backend has to change (e.g. we change what gets +# included in the archive (e.g. LFS), or we change the format of the archive +# (e.g. tar options, compression ratio or method)), we MUST update the format +# version in the variable BR_FMT_VERSION_git, in package/pkg-download.mk. + +# We want to catch any unexpected failure, and exit immediately +set -E + +# Download helper for git, to be called from the download wrapper script +# +# Options: +# -q Be quiet. +# -r Clone and archive sub-modules. +# -o FILE Generate archive in FILE. +# -u URI Clone from repository at URI. +# -c CSET Use changeset CSET. +# -n NAME Use basename NAME. +# +# Environment: +# GIT : the git command to call + +. "${0%/*}/helpers" + +# Save our path and options in case we need to call ourselves again +myname="${0}" +declare -a OPTS=("${@}") + +# This function is called when an error occurs. Its job is to attempt a +# clone from scratch (only once!) in case the git tree is borked, or in +# case an unexpected and unsupported situation arises with submodules +# or uncommitted stuff (e.g. if the user manually mucked around in the +# git cache). +_on_error() { + local ret=${?} + + printf "Detected a corrupted git cache.\n" >&2 + if ${BR_GIT_BACKEND_FIRST_FAULT:-false}; then + printf "This is the second time in a row; bailing out\n" >&2 + exit ${ret} + fi + export BR_GIT_BACKEND_FIRST_FAULT=true + + printf "Removing it and starting afresh.\n" >&2 + + popd >/dev/null + rm -rf "${git_cache}" + + exec "${myname}" "${OPTS[@]}" || exit ${ret} +} + +verbose= +recurse=0 +while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do + case "${OPT}" in + q) verbose=-q; exec >/dev/null;; + r) recurse=1;; + o) output="${OPTARG}";; + u) uri="${OPTARG}";; + c) cset="${OPTARG}";; + d) dl_dir="${OPTARG}";; + n) basename="${OPTARG}";; + :) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done + +shift $((OPTIND-1)) # Get rid of our options + +# Create and cd into the directory that will contain the local git cache +git_cache="${dl_dir}/git" +mkdir -p "${git_cache}" +pushd "${git_cache}" >/dev/null + +# Any error now should try to recover +trap _on_error ERR + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_git() { + eval GIT_DIR="${git_cache}/.git" ${GIT} "${@}" +} + +# Create a warning file, that the user should not use the git cache. +# It's ours. Our precious. +cat <<-_EOF_ >"${dl_dir}/git.readme" + IMPORTANT NOTE! + + The git tree located in this directory is for the exclusive use + by Buildroot, which uses it as a local cache to reduce bandwidth + usage. + + Buildroot *will* trash any changes in that tree whenever it needs + to use it. Buildroot may even remove it in case it detects the + repository may have been damaged or corrupted. + + Do *not* work in that directory; your changes will eventually get + lost. Do *not* even use it as a remote, or as the source for new + worktrees; your commits will eventually get lost. +_EOF_ + +# Initialise a repository in the git cache. If the repository already +# existed, this is a noop, unless the repository was broken, in which +# case this magically restores it to working conditions. In the latter +# case, we might be missing blobs, but that's not a problem: we'll +# fetch what we need later anyway. +# +# We can still go through the wrapper, because 'init' does not use the +# path pointed to by GIT_DIR, but really uses the directory passed as +# argument. +_git init . + +# Ensure the repo has an origin (in case a previous run was killed). +if ! _git remote |grep -q -E '^origin$'; then + _git remote add origin "'${uri}'" +fi + +_git remote set-url origin "'${uri}'" + +printf "Fetching all references\n" +_git fetch origin +_git fetch origin -t + +# Try to get the special refs exposed by some forges (pull-requests for +# github, changes for gerrit...). There is no easy way to know whether +# the cset the user passed us is such a special ref or a tag or a sha1 +# or whatever else. We'll eventually fail at checking out that cset, +# below, if there is an issue anyway. Since most of the cset we're gonna +# have to clone are not such special refs, consign the output to oblivion +# so as not to alarm unsuspecting users, but still trace it as a warning. +if ! _git fetch origin "'${cset}:${cset}'" >/dev/null 2>&1; then + printf "Could not fetch special ref '%s'; assuming it is not special.\n" "${cset}" +fi + +# Check that the changeset does exist. If it does not, re-cloning from +# scratch won't help, so we don't want to trash the repository for a +# missing commit. We just exit without going through the ERR trap. +if ! _git rev-parse --quiet --verify "'${cset}^{commit}'" >/dev/null 2>&1; then + printf "Commit '%s' does not exist in this repository.\n" "${cset}" + exit 1 +fi + +# The new cset we want to checkout might have different submodules, or +# have sub-dirs converted to/from a submodule. So we would need to +# deregister _current_ submodules before we checkout. +# +# Using "git submodule deinit --all" would remove all the files for +# all submodules, including the corresponding .git files or directories. +# However, it was only introduced with git-1.8.3, which is too recent +# for some enterprise-grade distros. +# +# So, we fall-back to just removing all submodules directories. We do +# not need to be recursive, as removing a submodule will de-facto remove +# its own submodules. +# +# For recent git versions, the repository for submodules is stored +# inside the repository of the super repository, so the following will +# only remove the working copies of submodules, effectively caching the +# submodules. +# +# For older versions however, the repository is stored in the .git/ of +# the submodule directory, so the following will effectively remove the +# the working copy as well as the repository, which means submodules +# will not be cached for older versions. +# +cmd='printf "Deregistering submodule \"%s\"\n" "${path}" && cd .. && rm -rf "${path##*/}"' +_git submodule --quiet foreach "'${cmd}'" + +# Checkout the required changeset, so that we can update the required +# submodules. +_git checkout -f -q "'${cset}'" + +# Get rid of now-untracked directories (in case a git operation was +# interrupted in a previous run, or to get rid of empty directories +# that were parents of submodules removed above). +_git clean -ffdx + +# Get date of commit to generate a reproducible archive. +# %ci is ISO 8601, so it's fully qualified, with TZ and all. +date="$( _git log -1 --pretty=format:%ci )" + +# There might be submodules, so fetch them. +if [ ${recurse} -eq 1 ]; then + _git submodule update --init --recursive + + # Older versions of git will store the absolute path of the git tree + # in the .git of submodules, while newer versions just use relative + # paths. Detect and fix the older variants to use relative paths, so + # that the archives are reproducible across a wider range of git + # versions. However, we can't do that if git is too old and uses + # full repositories for submodules. + cmd='printf "%s\n" "${path}/"' + for module_dir in $( _git submodule --quiet foreach "'${cmd}'" ); do + [ -f "${module_dir}/.git" ] || continue + relative_dir="$( sed -r -e 's,/+,/,g; s,[^/]+/,../,g' <<<"${module_dir}" )" + sed -r -i -e "s:^gitdir\: $(pwd)/:gitdir\: "${relative_dir}":" "${module_dir}/.git" + done +fi + +popd >/dev/null + +# Generate the archive. +# We do not want the .git dir; we keep other .git files, in case they are the +# only files in their directory. +# The .git dir would generate non reproducible tarballs as it depends on +# the state of the remote server. It also would generate large tarballs +# (gigabytes for some linux trees) when a full clone took place. +mk_tar_gz "${git_cache}" "${basename}" "${date}" "${output}" ".git/*" diff --git a/support/download/helpers b/support/download/helpers new file mode 100755 index 00000000..40d5eea5 --- /dev/null +++ b/support/download/helpers @@ -0,0 +1,76 @@ +# Generate a reproducible archive from the content of a directory +# +# $1 : input directory +# $2 : leading component in archive +# $3 : ISO8601 date: YYYY-MM-DDThh:mm:ssZZ +# $4 : output file +# $5... : globs of filenames to exclude from the archive, suitable for +# find's -path option, and relative to the input directory $1 +# +# Notes : +# - the timestamp is internally rounded to the highest entire second +# less than or equal to the timestamp (i.e. any sub-second fractional +# part is ignored) +# - must not be called with CWD as, or below, the input directory +# - some temporary files are created in CWD, and removed at the end +# +# Example: +# $ find /path/to/temp/dir +# /path/to/temp/dir/ +# /path/to/temp/dir/some-file +# /path/to/temp/dir/some-dir/ +# /path/to/temp/dir/some-dir/some-other-file +# +# $ mk_tar_gz /path/to/some/dir \ +# foo_bar-1.2.3 \ +# 1970-01-01T00:00:00Z \ +# /path/to/foo.tar.gz \ +# '.git/*' '.svn/*' +# +# $ tar tzf /path/to/foo.tar.gz +# foo_bar-1.2.3/some-file +# foo_bar-1.2.3/some-dir/some-other-file +# +mk_tar_gz() { + local in_dir="${1}" + local base_dir="${2}" + local date="${3}" + local out="${4}" + shift 4 + local glob tmp pax_options + local -a find_opts + + for glob; do + find_opts+=( -or -path "./${glob#./}" ) + done + + # Drop sub-second precision to play nice with GNU tar's valid_timespec check + date="$(date -d "${date}" -u +%Y-%m-%dT%H:%M:%S+00:00)" + + pax_options="delete=atime,delete=ctime,delete=mtime" + pax_options+=",exthdr.name=%d/PaxHeaders/%f,exthdr.mtime={${date}}" + + tmp="$(mktemp --tmpdir="$(pwd)")" + pushd "${in_dir}" >/dev/null + + # Establish list + find . -not -type d -and -not \( -false "${find_opts[@]}" \) >"${tmp}.list" + # Sort list for reproducibility + LC_ALL=C sort <"${tmp}.list" >"${tmp}.sorted" + + # Create POSIX tarballs, since that's the format the most reproducible + tar cf - --transform="s#^\./#${base_dir}/#S" \ + --numeric-owner --owner=0 --group=0 --mtime="${date}" \ + --format=posix --pax-option="${pax_options}" \ + -T "${tmp}.sorted" >"${tmp}.tar" + + # Compress the archive + gzip -6 -n <"${tmp}.tar" >"${out}" + + rm -f "${tmp}"{.list,.sorted,.tar} + + popd >/dev/null +} + +# Keep this line and the following as last lines in this file. +# vim: ft=bash diff --git a/support/download/hg b/support/download/hg new file mode 100755 index 00000000..efb515fc --- /dev/null +++ b/support/download/hg @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for hg, to be called from the download wrapper script +# +# Options: +# -q Be quiet. +# -o FILE Generate archive in FILE. +# -u URI Clone from repository at URI. +# -c CSET Use changeset (or revision) CSET. +# -n NAME Use basename NAME. +# +# Environment: +# HG : the hg command to call + +verbose= +while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do + case "${OPT}" in + q) verbose=-q;; + o) output="${OPTARG}";; + u) uri="${OPTARG}";; + c) cset="${OPTARG}";; + n) basename="${OPTARG}";; + :) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done + +shift $((OPTIND-1)) # Get rid of our options + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_hg() { + eval ${HG} "${@}" +} + +_hg clone ${verbose} "${@}" --noupdate "'${uri}'" "'${basename}'" + +_hg archive ${verbose} --repository "'${basename}'" --type tgz \ + --prefix "'${basename}'" --rev "'${cset}'" \ + - >"${output}" diff --git a/support/download/scp b/support/download/scp new file mode 100755 index 00000000..80cf495c --- /dev/null +++ b/support/download/scp @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for scp, to be called from the download wrapper script +# +# Options: +# -q Be quiet. +# -o FILE Copy to local file FILE. +# -f FILE Copy from remote file FILE. +# -u URI Download file at URI. +# +# Environment: +# SCP : the scp command to call + +verbose= +while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do + case "${OPT}" in + q) verbose=-q;; + o) output="${OPTARG}";; + f) filename="${OPTARG}";; + u) uri="${OPTARG}";; + :) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done + +shift $((OPTIND-1)) # Get rid of our options + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_scp() { + eval ${SCP} "${@}" +} + +# Remove any scheme prefix +uri="${uri##scp://}" + +_scp ${verbose} "${@}" "'${uri}/${filename}'" "'${output}'" diff --git a/support/download/svn b/support/download/svn new file mode 100755 index 00000000..75bf9ab3 --- /dev/null +++ b/support/download/svn @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# NOTE: if the output of this backend has to change (e.g. we change what gets +# included in the archive, or we change the format of the archive (e.g. tar +# options, compression ratio or method)), we MUST update the format version +# in the variable BR_FTM_VERSION_svn, in package/pkg-download.mk. + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for svn, to be called from the download wrapper script +# +# Options: +# -q Be quiet. +# -o FILE Generate archive in FILE. +# -u URI Checkout from repository at URI. +# -c REV Use revision REV. +# -n NAME Use basename NAME. +# +# Environment: +# SVN : the svn command to call + +. "${0%/*}/helpers" + +verbose= +while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do + case "${OPT}" in + q) verbose=-q;; + o) output="${OPTARG}";; + u) uri="${OPTARG}";; + c) rev="${OPTARG}";; + n) basename="${OPTARG}";; + :) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done + +shift $((OPTIND-1)) # Get rid of our options + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_svn() { + eval ${SVN} "${@}" +} + +_svn export --ignore-keywords ${verbose} "${@}" "'${uri}@${rev}'" "'${basename}'" + +# Get the date of the revision, to generate reproducible archives. +# The output format is YYYY-MM-DDTHH:MM:SS.mmmuuuZ (i.e. always in the +# UTC timezone), which we can feed as-is to the --mtime option for tar. +# In case there is a redirection (e.g. http -> https), just keep the +# last line (svn outputs everything on stdout) +date="$( _svn info "'${uri}@${rev}'" \ + |sed -r -e '/^Last Changed Date: /!d; s///' + )" + +# Generate the archive. +# We did a 'svn export' above, so it's not a working copy (there is no .svn +# directory or file to ignore). +mk_tar_gz "${basename}" "${basename}" "${date}" "${output}" diff --git a/support/download/wget b/support/download/wget new file mode 100755 index 00000000..c69e6071 --- /dev/null +++ b/support/download/wget @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for wget, to be called from the download wrapper script +# +# Options: +# -q Be quiet. +# -o FILE Save into file FILE. +# -f FILENAME The filename of the tarball to get at URL +# -u URL Download file at URL. +# -e ENCODE Tell wget to urlencode the filename passed to it +# +# Environment: +# WGET : the wget command to call + +verbose= +while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do + case "${OPT}" in + q) verbose=-q;; + o) output="${OPTARG}";; + f) filename="${OPTARG}";; + u) url="${OPTARG}";; + e) encode="-e";; + :) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done + +shift $((OPTIND-1)) # Get rid of our options + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_wget() { + eval ${WGET} "${@}" +} + +# Replace every '?' with '%3F' in the filename; only for the PRIMARY and BACKUP +# mirror +[ -n "${encode}" ] && filename=${filename//\?/%3F} + +_wget ${verbose} "${@}" -O "'${output}'" "'${url}/${filename}'" diff --git a/support/gnuconfig/README.buildroot b/support/gnuconfig/README.buildroot new file mode 100644 index 00000000..952eea8b --- /dev/null +++ b/support/gnuconfig/README.buildroot @@ -0,0 +1,21 @@ +--- HOWTO --- +If your package uses config.guess and/or config.sub, then it probably +relies on the autotools as its build system. In this case, you should +use the autotools-package infrastructure, which will take care of updating +the config.guess and/or config.sub files appropriately. See the +Buildroot documentation for details about the autotools-package +infrastructure. + +If for some reason your package does not use the autotools-package +infrastructure, you can request the config.guess and/or config.sub +files of your package to be updated by using: + +_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK + +--- UPDATE --- +Run the script 'update' in this directory, and commit the result. + +The current Buildroot version is based on this commit of the config.git +repository (leave alone on its own line, the script updates it): + +d7a4dee7cc25e332b990d0a6d9f0ddd42cb33cf5 diff --git a/support/gnuconfig/config.guess b/support/gnuconfig/config.guess new file mode 100755 index 00000000..70806849 --- /dev/null +++ b/support/gnuconfig/config.guess @@ -0,0 +1,1483 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-02-24' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > "$dummy.c" ; + for c in cc gcc c89 c99 ; do + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval "$set_cc_for_build" + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval "$set_cc_for_build" + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + then + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ "$HP_ARCH" = hppa2.0w ] + then + eval "$set_cc_for_build" + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + i*86:Minix:*:*) + echo "$UNAME_MACHINE"-pc-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + eval "$set_cc_for_build" + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval "$set_cc_for_build" + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; +esac + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-functions 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/support/gnuconfig/config.sub b/support/gnuconfig/config.sub new file mode 100755 index 00000000..682f5976 --- /dev/null +++ b/support/gnuconfig/config.sub @@ -0,0 +1,1803 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-02-22' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze* | loongson) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | loongarch32 | loongarch64 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | loongarch32-* | loongarch64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-pc + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2*) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + x64) + basic_machine=x86_64-pc + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4*) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; + -nacl*) + ;; + -ios) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + pru-*) + os=-elf + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` + ;; +esac + +echo "$basic_machine$os" +exit + +# Local variables: +# eval: (add-hook 'write-file-functions 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/support/gnuconfig/update b/support/gnuconfig/update new file mode 100755 index 00000000..c8728ead --- /dev/null +++ b/support/gnuconfig/update @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e + +cd "${0%/*}" + +git clone https://git.savannah.gnu.org/git/config.git +sha="$(cd config; git log -1 --pretty=tformat:%H)" +sed -r -i -e "\$s/.*/${sha}/" README.buildroot +cp config/config.* . +for p in $(ls patches/*.patch 2>/dev/null); do + patch -p1 < "${p}" +done +rm -rf config diff --git a/support/kconfig/.gitignore b/support/kconfig/.gitignore new file mode 100644 index 00000000..2694c9a2 --- /dev/null +++ b/support/kconfig/.gitignore @@ -0,0 +1,4 @@ +# +# Quilt is being used to handle the patch series +# +.pc diff --git a/support/kconfig/Makefile b/support/kconfig/Makefile new file mode 100644 index 00000000..b0bcc262 --- /dev/null +++ b/support/kconfig/Makefile @@ -0,0 +1,342 @@ +# SPDX-License-Identifier: GPL-2.0 +# =========================================================================== +# Kernel configuration targets +# These targets are used from top-level makefile + +PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \ + localmodconfig localyesconfig + +# Easy method for doing a status message + kecho := : + quiet_kecho := echo +silent_kecho := : +kecho := $($(quiet)kecho) + +ifdef KBUILD_KCONFIG +Kconfig := $(KBUILD_KCONFIG) +else +Kconfig := Kconfig +endif + +ifeq ($(quiet),silent_) +silent := -s +endif + +# We need this, in case the user has it in its environment +unexport CONFIG_ + +xconfig: $(obj)/qconf + $< $(silent) $(Kconfig) + +gconfig: $(obj)/gconf + $< $(silent) $(Kconfig) + +menuconfig: $(obj)/mconf + $< $(silent) $(Kconfig) + +config: $(obj)/conf + $< $(silent) --oldaskconfig $(Kconfig) + +nconfig: $(obj)/nconf + $< $(silent) $(Kconfig) + +# This has become an internal implementation detail and is now deprecated +# for external use. +syncconfig: $(obj)/conf + $(Q)mkdir -p include/config include/generated + $< $(silent) --$@ $(Kconfig) + +localyesconfig localmodconfig: $(obj)/conf + $(Q)mkdir -p include/config include/generated + $(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config + $(Q)if [ -f .config ]; then \ + cmp -s .tmp.config .config || \ + (mv -f .config .config.old.1; \ + mv -f .tmp.config .config; \ + $< $(silent) --oldconfig $(Kconfig); \ + mv -f .config.old.1 .config.old) \ + else \ + mv -f .tmp.config .config; \ + $< $(silent) --oldconfig $(Kconfig); \ + fi + $(Q)rm -f .tmp.config + +# Create new linux.pot file +# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files +update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h + $(Q)$(kecho) " GEN config.pot" + $(Q)xgettext --default-domain=linux \ + --add-comments --keyword=_ --keyword=N_ \ + --from-code=UTF-8 \ + --files-from=$(srctree)/scripts/kconfig/POTFILES.in \ + --directory=$(srctree) --directory=$(objtree) \ + --output $(obj)/config.pot + $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot + $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \ + $(srctree)/arch/*/um/Kconfig`; \ + do \ + $(kecho) " GEN $$i"; \ + $(obj)/kxgettext $$i \ + >> $(obj)/config.pot; \ + done ) + $(Q)$(kecho) " GEN linux.pot" + $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ + --output $(obj)/linux.pot + $(Q)rm -f $(obj)/config.pot + +# These targets map 1:1 to the commandline options of 'conf' +simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ + alldefconfig randconfig listnewconfig olddefconfig +PHONY += $(simple-targets) + +$(simple-targets): $(obj)/conf + $< $(silent) --$@ $(Kconfig) + +PHONY += oldnoconfig silentoldconfig savedefconfig defconfig + +# oldnoconfig is an alias of olddefconfig, because people already are dependent +# on its behavior (sets new symbols to their default value but not 'n') with the +# counter-intuitive name. +oldnoconfig: olddefconfig + @echo " WARNING: \"oldnoconfig\" target will be removed after Linux 4.19" + @echo " Please use \"olddefconfig\" instead, which is an alias." + +# We do not expect manual invokcation of "silentoldcofig" (or "syncconfig"). +silentoldconfig: syncconfig + @echo " WARNING: \"silentoldconfig\" has been renamed to \"syncconfig\"" + @echo " and is now an internal implementation detail." + @echo " What you want is probably \"oldconfig\"." + @echo " \"silentoldconfig\" will be removed after Linux 4.19" + +savedefconfig: $(obj)/conf + $< $(silent) --$@=defconfig $(Kconfig) + +defconfig: $(obj)/conf +ifeq ($(KBUILD_DEFCONFIG),) + $< $(silent) --defconfig $(Kconfig) +else +ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) + @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" + $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) +else + @$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'" + $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) +endif +endif + +%_defconfig: $(obj)/conf + $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) + +configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@) + +%.config: $(obj)/conf + $(if $(call configfiles),, $(error No configuration exists for this target on this architecture)) + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles) + +$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig + +PHONY += kvmconfig +kvmconfig: kvm_guest.config + @: + +PHONY += xenconfig +xenconfig: xen.config + @: + +PHONY += tinyconfig +tinyconfig: + $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config + +# CHECK: -o cache_dir= working? +PHONY += testconfig +testconfig: $(obj)/conf + $(PYTHON3) -B -m pytest $(srctree)/$(src)/tests \ + -o cache_dir=$(abspath $(obj)/tests/.cache) \ + $(if $(findstring 1,$(KBUILD_VERBOSE)),--capture=no) +clean-dirs += tests/.cache + +# Help text used by make help +help: + @echo ' config - Update current config utilising a line-oriented program' + @echo ' nconfig - Update current config utilising a ncurses menu based' + @echo ' program' + @echo ' menuconfig - Update current config utilising a menu based program' + @echo ' xconfig - Update current config utilising a Qt based front-end' + @echo ' gconfig - Update current config utilising a GTK+ based front-end' + @echo ' oldconfig - Update current config utilising a provided .config as base' + @echo ' localmodconfig - Update current config disabling modules not loaded' + @echo ' localyesconfig - Update current config converting local mods to core' + @echo ' defconfig - New config with default from ARCH supplied defconfig' + @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' + @echo ' allnoconfig - New config where all options are answered with no' + @echo ' allyesconfig - New config where all options are accepted with yes' + @echo ' allmodconfig - New config selecting modules when possible' + @echo ' alldefconfig - New config with all symbols set to default' + @echo ' randconfig - New config with random answer to all options' + @echo ' listnewconfig - List new options' + @echo ' olddefconfig - Same as oldconfig but sets new symbols to their' + @echo ' default value without prompting' + @echo ' kvmconfig - Enable additional options for kvm guest kernel support' + @echo ' xenconfig - Enable additional options for xen dom0 and guest kernel support' + @echo ' tinyconfig - Configure the tiniest possible kernel' + +# lxdialog stuff +check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh + +# Use recursively expanded variables so we do not call gcc unless +# we really need to do so. (Do not call gcc as part of make mrproper) +HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \ + -DLOCALE + +# =========================================================================== +# Shared Makefile for the various kconfig executables: +# conf: Used for defconfig, oldconfig and related targets +# nconf: Used for the nconfig target. +# Utilizes ncurses +# mconf: Used for the menuconfig target +# Utilizes the lxdialog package +# qconf: Used for the xconfig target +# Based on Qt which needs to be installed to compile it +# gconf: Used for the gconfig target +# Based on GTK+ which needs to be installed to compile it +# object files used by all kconfig flavours + +lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o +lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o + +conf-objs := conf.o zconf.tab.o +mconf-objs := mconf.o zconf.tab.o $(lxdialog) +nconf-objs := nconf.o zconf.tab.o nconf.gui.o +kxgettext-objs := kxgettext.o zconf.tab.o +qconf-cxxobjs := qconf.o +qconf-objs := zconf.tab.o +gconf-objs := gconf.o zconf.tab.o + +hostprogs-y := conf + +ifeq ($(MAKECMDGOALS),nconf) + hostprogs-y += nconf +endif + +ifeq ($(MAKECMDGOALS),mconf) + hostprogs-y += mconf +endif + +ifeq ($(MAKECMDGOALS),update-po-config) + hostprogs-y += kxgettext +endif + +ifeq ($(MAKECMDGOALS),qconf) + qconf-target := 1 +endif + +ifeq ($(MAKECMDGOALS),gconf) + gconf-target := 1 +endif + +ifeq ($(qconf-target),1) + hostprogs-y += qconf +endif + +ifeq ($(gconf-target),1) + hostprogs-y += gconf +endif + +targets += zconf.lex.c +clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck +clean-files += gconf.glade.h +clean-files += config.pot linux.pot + +# Check that we have the required ncurses stuff installed for lxdialog (menuconfig) +PHONY += $(obj)/dochecklxdialog +$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/dochecklxdialog +$(obj)/dochecklxdialog: + $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf) + +always := dochecklxdialog + +# Add environment specific flags +HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) +HOST_EXTRACXXFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCXX) $(HOSTCXXFLAGS)) + +# generated files seem to need this to find local include files +HOSTCFLAGS_zconf.lex.o := -I$(src) +HOSTCFLAGS_zconf.tab.o := -I$(src) + +HOSTLOADLIBES_qconf = $(KC_QT_LIBS) +HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) + +HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` +HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ + -Wno-missing-prototypes + +HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) + +HOSTLOADLIBES_nconf = $(shell \ + pkg-config --libs menuw panelw ncursesw 2>/dev/null \ + || pkg-config --libs menu panel ncurses 2>/dev/null \ + || echo "-lmenu -lpanel -lncurses" ) +$(obj)/qconf.o: $(obj)/.tmp_qtcheck + +ifeq ($(MAKECMDGOALS),qconf) +$(obj)/.tmp_qtcheck: $(src)/Makefile +-include $(obj)/.tmp_qtcheck + +# Qt needs some extra effort... +$(obj)/.tmp_qtcheck: + @set -e; $(kecho) " CHECK qt"; \ + if pkg-config --exists Qt5Core; then \ + cflags="-std=c++11 -fPIC `pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets`"; \ + libs=`pkg-config --libs Qt5Core Qt5Gui Qt5Widgets`; \ + moc=`pkg-config --variable=host_bins Qt5Core`/moc; \ + elif pkg-config --exists QtCore; then \ + cflags=`pkg-config --cflags QtCore QtGui`; \ + libs=`pkg-config --libs QtCore QtGui`; \ + moc=`pkg-config --variable=moc_location QtCore`; \ + else \ + echo >&2 "*"; \ + echo >&2 "* Could not find Qt via pkg-config."; \ + echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \ + echo >&2 "*"; \ + exit 1; \ + fi; \ + echo "KC_QT_CFLAGS=$$cflags" > $@; \ + echo "KC_QT_LIBS=$$libs" >> $@; \ + echo "KC_QT_MOC=$$moc" >> $@ +endif + +ifeq ($(MAKECMDGOALS),gconf) +$(obj)/gconf.o: $(obj)/.tmp_gtkcheck +-include $(obj)/.tmp_gtkcheck + +# GTK+ needs some extra effort, too... +$(obj)/.tmp_gtkcheck: + @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ + if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ + touch $@; \ + else \ + echo >&2 "*"; \ + echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \ + echo >&2 "*"; \ + false; \ + fi \ + else \ + echo >&2 "*"; \ + echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \ + echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \ + echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ + echo >&2 "*"; \ + false; \ + fi +endif + +$(obj)/zconf.tab.o: $(obj)/zconf.lex.c + +$(obj)/qconf.o: $(obj)/qconf.moc + +$(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck + $(KC_QT_MOC) -i $< -o $@ + +# Extract gconf menu items for i18n support +$(obj)/gconf.glade.h: $(obj)/gconf.glade + $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ + $(obj)/gconf.glade diff --git a/support/kconfig/Makefile.br b/support/kconfig/Makefile.br new file mode 100644 index 00000000..41c5ce16 --- /dev/null +++ b/support/kconfig/Makefile.br @@ -0,0 +1,53 @@ +src := . +top_srcdir=../../ +top_builddir=../../ +srctree := . +obj ?= . + +include Makefile +#HOSTCFLAGS+=-Dinline="" -include foo.h +-include $(obj)/.depend +$(obj)/.depend: $(wildcard *.h *.c) + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || : + +__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) +host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) +host-cmulti := $(foreach m,$(__hostprogs),\ + $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) +host-cxxmulti := $(foreach m,$(__hostprogs),\ + $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),))) +host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs)))) +host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))) + +HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\" + +$(host-csingle): %: %.c + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@ + +$(host-cmulti): %: $(host-cobjs) $(host-cshlib) + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ + +$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) + $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ + +$(obj)/%.o: %.c + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ + +$(obj)/%.o: $(obj)/%.c + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ + +$(obj)/%.o: %.cc + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@ + +$(obj)/%:: $(src)/%_shipped + $(Q)cat $< > $@ + +clean: + $(Q)rm -f $(addprefix $(obj)/,$(clean-files)) +distclean: clean + $(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \ + $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \ + mconf .depend) + +FORCE: +.PHONY: FORCE clean distclean diff --git a/support/kconfig/POTFILES.in b/support/kconfig/POTFILES.in new file mode 100644 index 00000000..96745739 --- /dev/null +++ b/support/kconfig/POTFILES.in @@ -0,0 +1,12 @@ +scripts/kconfig/lxdialog/checklist.c +scripts/kconfig/lxdialog/inputbox.c +scripts/kconfig/lxdialog/menubox.c +scripts/kconfig/lxdialog/textbox.c +scripts/kconfig/lxdialog/util.c +scripts/kconfig/lxdialog/yesno.c +scripts/kconfig/mconf.c +scripts/kconfig/conf.c +scripts/kconfig/confdata.c +scripts/kconfig/gconf.c +scripts/kconfig/gconf.glade.h +scripts/kconfig/qconf.cc diff --git a/support/kconfig/README.buildroot b/support/kconfig/README.buildroot new file mode 100644 index 00000000..76808f85 --- /dev/null +++ b/support/kconfig/README.buildroot @@ -0,0 +1,25 @@ +This is a copy of the kconfig code in the kernel (currently 4.17-rc2) tweaked +to suit Buildroot. + +To update: + cp -r /usr/src/linux/scripts/kconfig support/kconfig.new + cd support/kconfig.new + # zconf.lex.c and zconf.tab.c needs to be generated by 'make menuconfig' + mv zconf.lex.c zconf.lex.c_shipped + mv zconf.tab.c zconf.tab.c_shipped + rm -rf tests/ + cp -a ../kconfig/patches ../kconfig/README.buildroot ../kconfig/.gitignore . + quilt push -a + # Fix any conflict + cd .. + rm -rf kconfig + mv kconfig.new kconfig + +Then verify the toplevel targets work: + config + defconfig + menuconfig + nconfig + xconfig + gconfig + oldconfig diff --git a/support/kconfig/check.sh b/support/kconfig/check.sh new file mode 100755 index 00000000..97f0fee7 --- /dev/null +++ b/support/kconfig/check.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Needed for systems without gettext +$* -x c -o /dev/null - > /dev/null 2>&1 << EOF +#include +int main() +{ + gettext(""); + return 0; +} +EOF +if [ ! "$?" -eq "0" ]; then + echo -DKBUILD_NO_NLS; +fi diff --git a/support/kconfig/conf.c b/support/kconfig/conf.c new file mode 100644 index 00000000..2d7a7ac4 --- /dev/null +++ b/support/kconfig/conf.c @@ -0,0 +1,716 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lkc.h" + +static void conf(struct menu *menu); +static void check_conf(struct menu *menu); + +enum input_mode { + oldaskconfig, + syncconfig, + oldconfig, + allnoconfig, + allyesconfig, + allmodconfig, + alldefconfig, + randconfig, + defconfig, + savedefconfig, + listnewconfig, + olddefconfig, +}; +static enum input_mode input_mode = oldaskconfig; + +static int indent = 1; +static int tty_stdio; +static int sync_kconfig; +static int conf_cnt; +static char line[PATH_MAX]; +static struct menu *rootEntry; + +static void print_help(struct menu *menu) +{ + struct gstr help = str_new(); + + menu_get_ext_help(menu, &help); + + printf("\n%s\n", str_get(&help)); + str_free(&help); +} + +static void strip(char *str) +{ + char *p = str; + int l; + + while ((isspace(*p))) + p++; + l = strlen(p); + if (p != str) + memmove(str, p, l + 1); + if (!l) + return; + p = str + l - 1; + while ((isspace(*p))) + *p-- = 0; +} + +/* Helper function to facilitate fgets() by Jean Sacren. */ +static void xfgets(char *str, int size, FILE *in) +{ + if (!fgets(str, size, in)) + fprintf(stderr, "\nError in reading or end of file.\n"); + + if (!tty_stdio) + printf("%s", str); +} + +static int conf_askvalue(struct symbol *sym, const char *def) +{ + enum symbol_type type = sym_get_type(sym); + + if (!sym_has_value(sym)) + printf(_("(NEW) ")); + + line[0] = '\n'; + line[1] = 0; + + if (!sym_is_changable(sym)) { + printf("%s\n", def); + line[0] = '\n'; + line[1] = 0; + return 0; + } + + switch (input_mode) { + case oldconfig: + case syncconfig: + if (sym_has_value(sym)) { + printf("%s\n", def); + return 0; + } + /* fall through */ + case oldaskconfig: + fflush(stdout); + xfgets(line, sizeof(line), stdin); + return 1; + default: + break; + } + + switch (type) { + case S_INT: + case S_HEX: + case S_STRING: + printf("%s\n", def); + return 1; + default: + ; + } + printf("%s", line); + return 1; +} + +static int conf_string(struct menu *menu) +{ + struct symbol *sym = menu->sym; + const char *def; + + while (1) { + printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); + printf("(%s) ", sym->name); + def = sym_get_string_value(sym); + if (sym_get_string_value(sym)) + printf("[%s] ", def); + if (!conf_askvalue(sym, def)) + return 0; + switch (line[0]) { + case '\n': + break; + case '?': + /* print help */ + if (line[1] == '\n') { + print_help(menu); + def = NULL; + break; + } + /* fall through */ + default: + line[strlen(line)-1] = 0; + def = line; + } + if (def && sym_set_string_value(sym, def)) + return 0; + } +} + +static int conf_sym(struct menu *menu) +{ + struct symbol *sym = menu->sym; + tristate oldval, newval; + + while (1) { + printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); + if (sym->name) + printf("(%s) ", sym->name); + putchar('['); + oldval = sym_get_tristate_value(sym); + switch (oldval) { + case no: + putchar('N'); + break; + case mod: + putchar('M'); + break; + case yes: + putchar('Y'); + break; + } + if (oldval != no && sym_tristate_within_range(sym, no)) + printf("/n"); + if (oldval != mod && sym_tristate_within_range(sym, mod)) + printf("/m"); + if (oldval != yes && sym_tristate_within_range(sym, yes)) + printf("/y"); + printf("/?] "); + if (!conf_askvalue(sym, sym_get_string_value(sym))) + return 0; + strip(line); + + switch (line[0]) { + case 'n': + case 'N': + newval = no; + if (!line[1] || !strcmp(&line[1], "o")) + break; + continue; + case 'm': + case 'M': + newval = mod; + if (!line[1]) + break; + continue; + case 'y': + case 'Y': + newval = yes; + if (!line[1] || !strcmp(&line[1], "es")) + break; + continue; + case 0: + newval = oldval; + break; + case '?': + goto help; + default: + continue; + } + if (sym_set_tristate_value(sym, newval)) + return 0; +help: + print_help(menu); + } +} + +static int conf_choice(struct menu *menu) +{ + struct symbol *sym, *def_sym; + struct menu *child; + bool is_new; + + sym = menu->sym; + is_new = !sym_has_value(sym); + if (sym_is_changable(sym)) { + conf_sym(menu); + sym_calc_value(sym); + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + return 0; + case yes: + break; + } + } else { + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); + return 0; + case yes: + break; + } + } + + while (1) { + int cnt, def; + + printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); + def_sym = sym_get_choice_value(sym); + cnt = def = 0; + line[0] = 0; + for (child = menu->list; child; child = child->next) { + if (!menu_is_visible(child)) + continue; + if (!child->sym) { + printf("%*c %s\n", indent, '*', _(menu_get_prompt(child))); + continue; + } + cnt++; + if (child->sym == def_sym) { + def = cnt; + printf("%*c", indent, '>'); + } else + printf("%*c", indent, ' '); + printf(" %d. %s", cnt, _(menu_get_prompt(child))); + if (child->sym->name) + printf(" (%s)", child->sym->name); + if (!sym_has_value(child->sym)) + printf(_(" (NEW)")); + printf("\n"); + } + printf(_("%*schoice"), indent - 1, ""); + if (cnt == 1) { + printf("[1]: 1\n"); + goto conf_childs; + } + printf("[1-%d?]: ", cnt); + switch (input_mode) { + case oldconfig: + case syncconfig: + if (!is_new) { + cnt = def; + printf("%d\n", cnt); + break; + } + /* fall through */ + case oldaskconfig: + fflush(stdout); + xfgets(line, sizeof(line), stdin); + strip(line); + if (line[0] == '?') { + print_help(menu); + continue; + } + if (!line[0]) + cnt = def; + else if (isdigit(line[0])) + cnt = atoi(line); + else + continue; + break; + default: + break; + } + + conf_childs: + for (child = menu->list; child; child = child->next) { + if (!child->sym || !menu_is_visible(child)) + continue; + if (!--cnt) + break; + } + if (!child) + continue; + if (line[0] && line[strlen(line) - 1] == '?') { + print_help(child); + continue; + } + sym_set_choice_value(sym, child->sym); + for (child = child->list; child; child = child->next) { + indent += 2; + conf(child); + indent -= 2; + } + return 1; + } +} + +static void conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + prop = menu->prompt; + if (prop) { + const char *prompt; + + switch (prop->type) { + case P_MENU: + /* + * Except in oldaskconfig mode, we show only menus that + * contain new symbols. + */ + if (input_mode != oldaskconfig && rootEntry != menu) { + check_conf(menu); + return; + } + /* fall through */ + case P_COMMENT: + prompt = menu_get_prompt(menu); + if (prompt) + printf("%*c\n%*c %s\n%*c\n", + indent, '*', + indent, '*', _(prompt), + indent, '*'); + default: + ; + } + } + + if (!sym) + goto conf_childs; + + if (sym_is_choice(sym)) { + conf_choice(menu); + if (sym->curr.tri != mod) + return; + goto conf_childs; + } + + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + conf_string(menu); + break; + default: + conf_sym(menu); + break; + } + +conf_childs: + if (sym) + indent += 2; + for (child = menu->list; child; child = child->next) + conf(child); + if (sym) + indent -= 2; +} + +static void check_conf(struct menu *menu) +{ + struct symbol *sym; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + if (sym && !sym_has_value(sym)) { + if (sym_is_changable(sym) || + (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { + if (input_mode == listnewconfig) { + if (sym->name) { + const char *str; + + if (sym->type == S_STRING) { + str = sym_get_string_value(sym); + str = sym_escape_string_value(str); + printf("%s%s=%s\n", CONFIG_, sym->name, str); + free((void *)str); + } else { + str = sym_get_string_value(sym); + printf("%s%s=%s\n", CONFIG_, sym->name, str); + } + } + } else { + if (!conf_cnt++) + printf(_("*\n* Restart config...\n*\n")); + rootEntry = menu_get_parent_menu(menu); + conf(rootEntry); + } + } + } + + for (child = menu->list; child; child = child->next) + check_conf(child); +} + +static struct option long_opts[] = { + {"oldaskconfig", no_argument, NULL, oldaskconfig}, + {"oldconfig", no_argument, NULL, oldconfig}, + {"syncconfig", no_argument, NULL, syncconfig}, + {"defconfig", optional_argument, NULL, defconfig}, + {"savedefconfig", required_argument, NULL, savedefconfig}, + {"allnoconfig", no_argument, NULL, allnoconfig}, + {"allyesconfig", no_argument, NULL, allyesconfig}, + {"allmodconfig", no_argument, NULL, allmodconfig}, + {"alldefconfig", no_argument, NULL, alldefconfig}, + {"randconfig", no_argument, NULL, randconfig}, + {"listnewconfig", no_argument, NULL, listnewconfig}, + {"olddefconfig", no_argument, NULL, olddefconfig}, + /* + * oldnoconfig is an alias of olddefconfig, because people already + * are dependent on its behavior(sets new symbols to their default + * value but not 'n') with the counter-intuitive name. + */ + {"oldnoconfig", no_argument, NULL, olddefconfig}, + {NULL, 0, NULL, 0} +}; + +static void conf_usage(const char *progname) +{ + + printf("Usage: %s [-s] [option] \n", progname); + printf("[option] is _one_ of the following:\n"); + printf(" --listnewconfig List new options\n"); + printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); + printf(" --oldconfig Update a configuration using a provided .config as base\n"); + printf(" --syncconfig Similar to oldconfig but generates configuration in\n" + " include/{generated/,config/}\n"); + printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"); + printf(" --oldnoconfig An alias of olddefconfig\n"); + printf(" --defconfig New config with default defined in \n"); + printf(" --savedefconfig Save the minimal current configuration to \n"); + printf(" --allnoconfig New config where all options are answered with no\n"); + printf(" --allyesconfig New config where all options are answered with yes\n"); + printf(" --allmodconfig New config where all options are answered with mod\n"); + printf(" --alldefconfig New config with all symbols set to default\n"); + printf(" --randconfig New config with random answer to all options\n"); +} + +int main(int ac, char **av) +{ + const char *progname = av[0]; + int opt; + const char *name, *defconfig_file = NULL /* gcc uninit */; + struct stat tmpstat; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + tty_stdio = isatty(0) && isatty(1); + + while ((opt = getopt_long(ac, av, "s", long_opts, NULL)) != -1) { + if (opt == 's') { + conf_set_message_callback(NULL); + continue; + } + input_mode = (enum input_mode)opt; + switch (opt) { + case syncconfig: + sync_kconfig = 1; + break; + case defconfig: + case savedefconfig: + defconfig_file = optarg; + break; + case randconfig: + { + struct timeval now; + unsigned int seed; + char *seed_env; + + /* + * Use microseconds derived seed, + * compensate for systems where it may be zero + */ + gettimeofday(&now, NULL); + seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); + + seed_env = getenv("KCONFIG_SEED"); + if( seed_env && *seed_env ) { + char *endp; + int tmp = (int)strtol(seed_env, &endp, 0); + if (*endp == '\0') { + seed = tmp; + } + } + fprintf( stderr, "KCONFIG_SEED=0x%X\n", seed ); + srand(seed); + break; + } + case oldaskconfig: + case oldconfig: + case allnoconfig: + case allyesconfig: + case allmodconfig: + case alldefconfig: + case listnewconfig: + case olddefconfig: + break; + case '?': + conf_usage(progname); + exit(1); + break; + } + } + if (ac == optind) { + fprintf(stderr, _("%s: Kconfig file missing\n"), av[0]); + conf_usage(progname); + exit(1); + } + name = av[optind]; + conf_parse(name); + if (sync_kconfig) { + name = conf_get_configname(); + if (stat(name, &tmpstat)) { + fprintf(stderr, _("***\n" + "*** Configuration file \"%s\" not found!\n" + "***\n" + "*** Please run some configurator (e.g. \"make oldconfig\" or\n" + "*** \"make menuconfig\" or \"make xconfig\").\n" + "***\n"), name); + exit(1); + } + } + + switch (input_mode) { + case defconfig: + if (!defconfig_file) + defconfig_file = conf_get_default_confname(); + if (conf_read(defconfig_file)) { + fprintf(stderr, + _("***\n" + "*** Can't find default configuration \"%s\"!\n" + "***\n"), + defconfig_file); + exit(1); + } + break; + case savedefconfig: + case syncconfig: + case oldaskconfig: + case oldconfig: + case listnewconfig: + case olddefconfig: + conf_read(NULL); + break; + case allnoconfig: + case allyesconfig: + case allmodconfig: + case alldefconfig: + case randconfig: + name = getenv("KCONFIG_ALLCONFIG"); + if (!name) + break; + if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { + if (conf_read_simple(name, S_DEF_USER)) { + fprintf(stderr, + _("*** Can't read seed configuration \"%s\"!\n"), + name); + exit(1); + } + break; + } + switch (input_mode) { + case allnoconfig: name = "allno.config"; break; + case allyesconfig: name = "allyes.config"; break; + case allmodconfig: name = "allmod.config"; break; + case alldefconfig: name = "alldef.config"; break; + case randconfig: name = "allrandom.config"; break; + default: break; + } + if (conf_read_simple(name, S_DEF_USER) && + conf_read_simple("all.config", S_DEF_USER)) { + fprintf(stderr, + _("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"), + name); + exit(1); + } + break; + default: + break; + } + + if (sync_kconfig) { + if (conf_get_changed()) { + name = getenv("KCONFIG_NOSILENTUPDATE"); + if (name && *name) { + fprintf(stderr, + _("\n*** The configuration requires explicit update.\n\n")); + return 1; + } + } + } + + switch (input_mode) { + case allnoconfig: + conf_set_all_new_symbols(def_no); + break; + case allyesconfig: + conf_set_all_new_symbols(def_yes); + break; + case allmodconfig: + conf_set_all_new_symbols(def_mod); + break; + case alldefconfig: + conf_set_all_new_symbols(def_default); + break; + case randconfig: + /* Really nothing to do in this loop */ + while (conf_set_all_new_symbols(def_random)) ; + break; + case defconfig: + conf_set_all_new_symbols(def_default); + break; + case savedefconfig: + break; + case oldaskconfig: + rootEntry = &rootmenu; + conf(&rootmenu); + input_mode = oldconfig; + /* fall through */ + case oldconfig: + case listnewconfig: + case syncconfig: + /* Update until a loop caused no more changes */ + do { + conf_cnt = 0; + check_conf(&rootmenu); + } while (conf_cnt); + break; + case olddefconfig: + default: + break; + } + + if (sync_kconfig) { + /* syncconfig is used during the build so we shall update autoconf. + * All other commands are only used to generate a config. + */ + if (conf_get_changed() && conf_write(NULL)) { + fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); + exit(1); + } + if (conf_write_autoconf()) { + fprintf(stderr, _("\n*** Error during update of the configuration.\n\n")); + return 1; + } + } else if (input_mode == savedefconfig) { + if (conf_write_defconfig(defconfig_file)) { + fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"), + defconfig_file); + return 1; + } + } else if (input_mode != listnewconfig) { + if (conf_write(NULL)) { + fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); + exit(1); + } + } + return 0; +} diff --git a/support/kconfig/confdata.c b/support/kconfig/confdata.c new file mode 100644 index 00000000..892da74f --- /dev/null +++ b/support/kconfig/confdata.c @@ -0,0 +1,1282 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lkc.h" + +struct conf_printer { + void (*print_symbol)(FILE *, struct symbol *, const char *, void *); + void (*print_comment)(FILE *, const char *, void *); +}; + +static void conf_warning(const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); + +static void conf_message(const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); + +static const char *conf_filename; +static int conf_lineno, conf_warnings; + +const char conf_defname[] = ".defconfig"; + +static void conf_warning(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", conf_filename, conf_lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); + conf_warnings++; +} + +static void conf_default_message_callback(const char *fmt, va_list ap) +{ + printf("#\n# "); + vprintf(fmt, ap); + printf("\n#\n"); +} + +static void (*conf_message_callback) (const char *fmt, va_list ap) = + conf_default_message_callback; +void conf_set_message_callback(void (*fn) (const char *fmt, va_list ap)) +{ + conf_message_callback = fn; +} + +static void conf_message(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + if (conf_message_callback) + conf_message_callback(fmt, ap); + va_end(ap); +} + +const char *conf_get_configname(void) +{ + char *name = getenv("BR2_CONFIG"); + + return name ? name : ".config"; +} + +const char *conf_get_autoconfig_name(void) +{ + return getenv("KCONFIG_AUTOCONFIG"); +} + +static char *conf_expand_value(const char *in) +{ + struct symbol *sym; + const char *src; + static char res_value[SYMBOL_MAXLENGTH]; + char *dst, name[SYMBOL_MAXLENGTH]; + + res_value[0] = 0; + dst = name; + while ((src = strchr(in, '$'))) { + strncat(res_value, in, src - in); + src++; + dst = name; + while (isalnum(*src) || *src == '_') + *dst++ = *src++; + *dst = 0; + sym = sym_lookup(name, 0); + sym_calc_value(sym); + strcat(res_value, sym_get_string_value(sym)); + in = src; + } + strcat(res_value, in); + + return res_value; +} + +char *conf_get_default_confname(void) +{ + struct stat buf; + static char fullname[PATH_MAX+1]; + char *env, *name; + + name = conf_expand_value(conf_defname); + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + if (!stat(fullname, &buf)) + return fullname; + } + return name; +} + +static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) +{ + char *p2; + + switch (sym->type) { + case S_TRISTATE: + if (p[0] == 'm') { + sym->def[def].tri = mod; + sym->flags |= def_flags; + break; + } + /* fall through */ + case S_BOOLEAN: + if (p[0] == 'y') { + sym->def[def].tri = yes; + sym->flags |= def_flags; + break; + } + if (p[0] == 'n') { + sym->def[def].tri = no; + sym->flags |= def_flags; + break; + } + if (def != S_DEF_AUTO) + conf_warning("symbol value '%s' invalid for %s", + p, sym->name); + return 1; + case S_OTHER: + if (*p != '"') { + for (p2 = p; *p2 && !isspace(*p2); p2++) + ; + sym->type = S_STRING; + goto done; + } + /* fall through */ + case S_STRING: + if (*p++ != '"') + break; + for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { + if (*p2 == '"') { + *p2 = 0; + break; + } + memmove(p2, p2 + 1, strlen(p2)); + } + if (!p2) { + if (def != S_DEF_AUTO) + conf_warning("invalid string found"); + return 1; + } + /* fall through */ + case S_INT: + case S_HEX: + done: + if (sym_string_valid(sym, p)) { + sym->def[def].val = xstrdup(p); + sym->flags |= def_flags; + } else { + if (def != S_DEF_AUTO) + conf_warning("symbol value '%s' invalid for %s", + p, sym->name); + return 1; + } + break; + default: + ; + } + return 0; +} + +#define LINE_GROWTH 16 +static int add_byte(int c, char **lineptr, size_t slen, size_t *n) +{ + char *nline; + size_t new_size = slen + 1; + if (new_size > *n) { + new_size += LINE_GROWTH - 1; + new_size *= 2; + nline = xrealloc(*lineptr, new_size); + if (!nline) + return -1; + + *lineptr = nline; + *n = new_size; + } + + (*lineptr)[slen] = c; + + return 0; +} + +static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream) +{ + char *line = *lineptr; + size_t slen = 0; + + for (;;) { + int c = getc(stream); + + switch (c) { + case '\n': + if (add_byte(c, &line, slen, n) < 0) + goto e_out; + slen++; + /* fall through */ + case EOF: + if (add_byte('\0', &line, slen, n) < 0) + goto e_out; + *lineptr = line; + if (slen == 0) + return -1; + return slen; + default: + if (add_byte(c, &line, slen, n) < 0) + goto e_out; + slen++; + } + } + +e_out: + line[slen-1] = '\0'; + *lineptr = line; + return -1; +} + +int conf_read_simple(const char *name, int def) +{ + FILE *in = NULL; + char *line = NULL; + size_t line_asize = 0; + char *p, *p2; + struct symbol *sym; + int i, def_flags; + + if (name) { + in = zconf_fopen(name); + } else { + struct property *prop; + + name = conf_get_configname(); + in = zconf_fopen(name); + if (in) + goto load; + sym_add_change_count(1); + if (!sym_defconfig_list) + return 1; + + for_all_defaults(sym_defconfig_list, prop) { + if (expr_calc_value(prop->visible.expr) == no || + prop->expr->type != E_SYMBOL) + continue; + name = conf_expand_value(prop->expr->left.sym->name); + in = zconf_fopen(name); + if (in) { + conf_message(_("using defaults found in %s"), + name); + goto load; + } + } + } + if (!in) + return 1; + +load: + conf_filename = name; + conf_lineno = 0; + conf_warnings = 0; + + def_flags = SYMBOL_DEF << def; + for_all_symbols(i, sym) { + sym->flags |= SYMBOL_CHANGED; + sym->flags &= ~(def_flags|SYMBOL_VALID); + if (sym_is_choice(sym)) + sym->flags |= def_flags; + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + if (sym->def[def].val) + free(sym->def[def].val); + /* fall through */ + default: + sym->def[def].val = NULL; + sym->def[def].tri = no; + } + } + + while (compat_getline(&line, &line_asize, in) != -1) { + conf_lineno++; + sym = NULL; + if (line[0] == '#') { + if (memcmp(line + 2, CONFIG_, strlen(CONFIG_))) + continue; + p = strchr(line + 2 + strlen(CONFIG_), ' '); + if (!p) + continue; + *p++ = 0; + if (strncmp(p, "is not set", 10)) + continue; + if (def == S_DEF_USER) { + sym = sym_find(line + 2 + strlen(CONFIG_)); + if (!sym) { + sym_add_change_count(1); + goto setsym; + } + } else { + sym = sym_lookup(line + 2 + strlen(CONFIG_), 0); + if (sym->type == S_UNKNOWN) + sym->type = S_BOOLEAN; + } + if (sym->flags & def_flags) { + conf_warning("override: reassigning to symbol %s", sym->name); + } + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + sym->def[def].tri = no; + sym->flags |= def_flags; + break; + default: + ; + } + } else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) { + p = strchr(line + strlen(CONFIG_), '='); + if (!p) + continue; + *p++ = 0; + p2 = strchr(p, '\n'); + if (p2) { + *p2-- = 0; + if (*p2 == '\r') + *p2 = 0; + } + if (def == S_DEF_USER) { + sym = sym_find(line + strlen(CONFIG_)); + if (!sym) { + sym_add_change_count(1); + goto setsym; + } + } else { + sym = sym_lookup(line + strlen(CONFIG_), 0); + if (sym->type == S_UNKNOWN) + sym->type = S_OTHER; + } + if (sym->flags & def_flags) { + conf_warning("override: reassigning to symbol %s", sym->name); + } + if (conf_set_sym_val(sym, def, def_flags, p)) + continue; + } else { + if (line[0] != '\r' && line[0] != '\n') + conf_warning("unexpected data: %.*s", + (int)strcspn(line, "\r\n"), line); + + continue; + } +setsym: + if (sym && sym_is_choice_value(sym)) { + struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); + switch (sym->def[def].tri) { + case no: + break; + case mod: + if (cs->def[def].tri == yes) { + conf_warning("%s creates inconsistent choice state", sym->name); + cs->flags &= ~def_flags; + } + break; + case yes: + if (cs->def[def].tri != no) + conf_warning("override: %s changes choice state", sym->name); + cs->def[def].val = sym; + break; + } + cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); + } + } + free(line); + fclose(in); + return 0; +} + +int conf_read(const char *name) +{ + struct symbol *sym; + int conf_unsaved = 0; + int i; + + sym_set_change_count(0); + + if (conf_read_simple(name, S_DEF_USER)) { + sym_calc_value(modules_sym); + return 1; + } + + sym_calc_value(modules_sym); + + for_all_symbols(i, sym) { + sym_calc_value(sym); + if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO)) + continue; + if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { + /* check that calculated value agrees with saved value */ + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym)) + break; + if (!sym_is_choice(sym)) + continue; + /* fall through */ + default: + if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) + continue; + break; + } + } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE)) + /* no previous value and not saved */ + continue; + conf_unsaved++; + /* maybe print value in verbose mode... */ + } + + for_all_symbols(i, sym) { + if (sym_has_value(sym) && !sym_is_choice_value(sym)) { + /* Reset values of generates values, so they'll appear + * as new, if they should become visible, but that + * doesn't quite work if the Kconfig and the saved + * configuration disagree. + */ + if (sym->visible == no && !conf_unsaved) + sym->flags &= ~SYMBOL_DEF_USER; + switch (sym->type) { + case S_STRING: + case S_INT: + case S_HEX: + /* Reset a string value if it's out of range */ + if (sym_string_within_range(sym, sym->def[S_DEF_USER].val)) + break; + sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER); + conf_unsaved++; + break; + default: + break; + } + } + } + + sym_add_change_count(conf_warnings || conf_unsaved); + + return 0; +} + +/* + * Kconfig configuration printer + * + * This printer is used when generating the resulting configuration after + * kconfig invocation and `defconfig' files. Unset symbol might be omitted by + * passing a non-NULL argument to the printer. + * + */ +static void +kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +{ + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (*value == 'n') { + bool skip_unset = (arg != NULL); + + if (!skip_unset) + fprintf(fp, "# %s%s is not set\n", + CONFIG_, sym->name); + return; + } + break; + default: + break; + } + + fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, value); +} + +static void +kconfig_print_comment(FILE *fp, const char *value, void *arg) +{ + const char *p = value; + size_t l; + + for (;;) { + l = strcspn(p, "\n"); + fprintf(fp, "#"); + if (l) { + fprintf(fp, " "); + xfwrite(p, l, 1, fp); + p += l; + } + fprintf(fp, "\n"); + if (*p++ == '\0') + break; + } +} + +static struct conf_printer kconfig_printer_cb = +{ + .print_symbol = kconfig_print_symbol, + .print_comment = kconfig_print_comment, +}; + +/* + * Header printer + * + * This printer is used when generating the `include/generated/autoconf.h' file. + */ +static void +header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +{ + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: { + const char *suffix = ""; + + switch (*value) { + case 'n': + break; + case 'm': + suffix = "_MODULE"; + /* fall through */ + default: + fprintf(fp, "#define %s%s%s 1\n", + CONFIG_, sym->name, suffix); + } + break; + } + case S_HEX: { + const char *prefix = ""; + + if (value[0] != '0' || (value[1] != 'x' && value[1] != 'X')) + prefix = "0x"; + fprintf(fp, "#define %s%s %s%s\n", + CONFIG_, sym->name, prefix, value); + break; + } + case S_STRING: + case S_INT: + fprintf(fp, "#define %s%s %s\n", + CONFIG_, sym->name, value); + break; + default: + break; + } + +} + +static void +header_print_comment(FILE *fp, const char *value, void *arg) +{ + const char *p = value; + size_t l; + + fprintf(fp, "/*\n"); + for (;;) { + l = strcspn(p, "\n"); + fprintf(fp, " *"); + if (l) { + fprintf(fp, " "); + xfwrite(p, l, 1, fp); + p += l; + } + fprintf(fp, "\n"); + if (*p++ == '\0') + break; + } + fprintf(fp, " */\n"); +} + +static struct conf_printer header_printer_cb = +{ + .print_symbol = header_print_symbol, + .print_comment = header_print_comment, +}; + +/* + * Tristate printer + * + * This printer is used when generating the `include/config/tristate.conf' file. + */ +static void +tristate_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +{ + + if (sym->type == S_TRISTATE && *value != 'n') + fprintf(fp, "%s%s=%c\n", CONFIG_, sym->name, (char)toupper(*value)); +} + +static struct conf_printer tristate_printer_cb = +{ + .print_symbol = tristate_print_symbol, + .print_comment = kconfig_print_comment, +}; + +static void conf_write_symbol(FILE *fp, struct symbol *sym, + struct conf_printer *printer, void *printer_arg) +{ + const char *str; + + switch (sym->type) { + case S_OTHER: + case S_UNKNOWN: + break; + case S_STRING: + str = sym_get_string_value(sym); + str = sym_escape_string_value(str); + printer->print_symbol(fp, sym, str, printer_arg); + free((void *)str); + break; + default: + str = sym_get_string_value(sym); + printer->print_symbol(fp, sym, str, printer_arg); + } +} + +static void +conf_write_heading(FILE *fp, struct conf_printer *printer, void *printer_arg) +{ + char buf[256]; + + snprintf(buf, sizeof(buf), + "\n" + "Automatically generated file; DO NOT EDIT.\n" + "%s\n", + rootmenu.prompt->text); + + printer->print_comment(fp, buf, printer_arg); +} + +/* + * Write out a minimal config. + * All values that has default values are skipped as this is redundant. + */ +int conf_write_defconfig(const char *filename) +{ + struct symbol *sym; + struct menu *menu; + FILE *out; + + out = fopen(filename, "w"); + if (!out) + return 1; + + sym_clear_all_valid(); + + /* Traverse all menus to find all relevant symbols */ + menu = rootmenu.list; + + while (menu != NULL) + { + sym = menu->sym; + if (sym == NULL) { + if (!menu_is_visible(menu)) + goto next_menu; + } else if (!sym_is_choice(sym)) { + sym_calc_value(sym); + if (!(sym->flags & SYMBOL_WRITE)) + goto next_menu; + sym->flags &= ~SYMBOL_WRITE; + /* If we cannot change the symbol - skip */ + if (!sym_is_changable(sym)) + goto next_menu; + /* If symbol equals to default value - skip */ + if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0) + goto next_menu; + + /* + * If symbol is a choice value and equals to the + * default for a choice - skip. + * But only if value is bool and equal to "y" and + * choice is not "optional". + * (If choice is "optional" then all values can be "n") + */ + if (sym_is_choice_value(sym)) { + struct symbol *cs; + struct symbol *ds; + + cs = prop_get_symbol(sym_get_choice_prop(sym)); + ds = sym_choice_default(cs); + if (!sym_is_optional(cs) && sym == ds) { + if ((sym->type == S_BOOLEAN) && + sym_get_tristate_value(sym) == yes) + goto next_menu; + } + } + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); + } +next_menu: + if (menu->list != NULL) { + menu = menu->list; + } + else if (menu->next != NULL) { + menu = menu->next; + } else { + while ((menu = menu->parent)) { + if (menu->next != NULL) { + menu = menu->next; + break; + } + } + } + } + fclose(out); + return 0; +} + +int conf_write(const char *name) +{ + FILE *out; + struct symbol *sym; + struct menu *menu; + const char *basename; + const char *str; + char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; + char *env; + + if (!name) + name = conf_get_configname(); + + dirname[0] = 0; + if (name && name[0]) { + struct stat st; + char *slash; + + if (!stat(name, &st) && S_ISDIR(st.st_mode)) { + strcpy(dirname, name); + strcat(dirname, "/"); + basename = conf_get_configname(); + } else if ((slash = strrchr(name, '/'))) { + int size = slash - name + 1; + memcpy(dirname, name, size); + dirname[size] = 0; + if (slash[1]) + basename = slash + 1; + else + basename = conf_get_configname(); + } else + basename = name; + } else + basename = conf_get_configname(); + + sprintf(newname, "%s%s", dirname, basename); + env = getenv("KCONFIG_OVERWRITECONFIG"); + if (!env || !*env) { + sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); + out = fopen(tmpname, "w"); + } else { + *tmpname = 0; + out = fopen(newname, "w"); + } + if (!out) + return 1; + + conf_write_heading(out, &kconfig_printer_cb, NULL); + + if (!conf_get_changed()) + sym_clear_all_valid(); + + menu = rootmenu.list; + while (menu) { + sym = menu->sym; + if (!sym) { + if (!menu_is_visible(menu)) + goto next; + str = menu_get_prompt(menu); + fprintf(out, "\n" + "#\n" + "# %s\n" + "#\n", str); + } else if (!(sym->flags & SYMBOL_CHOICE)) { + sym_calc_value(sym); + if (!(sym->flags & SYMBOL_WRITE)) + goto next; + sym->flags &= ~SYMBOL_WRITE; + + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); + } + +next: + if (menu->list) { + menu = menu->list; + continue; + } + if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->next) { + menu = menu->next; + break; + } + } + } + fclose(out); + + if (*tmpname) { + strcat(dirname, basename); + strcat(dirname, ".old"); + rename(newname, dirname); + if (rename(tmpname, newname)) + return 1; + } + + conf_message(_("configuration written to %s"), newname); + + sym_set_change_count(0); + + return 0; +} + +static int conf_split_config(void) +{ + const char *name; + char path[PATH_MAX+1]; + char *opwd, *dir, *_name; + char *s, *d, c; + struct symbol *sym; + struct stat sb; + int res, i, fd; + + name = conf_get_autoconfig_name(); + conf_read_simple(name, S_DEF_AUTO); + sym_calc_value(modules_sym); + + opwd = malloc(256); + _name = strdup(name); + if (opwd == NULL || _name == NULL) + return 1; + opwd = getcwd(opwd, 256); + dir = dirname(_name); + if (dir == NULL) { + res = 1; + goto err; + } + if (chdir(dir)) { + res = 1; + goto err; + } + + res = 0; + for_all_symbols(i, sym) { + sym_calc_value(sym); + if ((sym->flags & SYMBOL_AUTO) || !sym->name) + continue; + if (sym->flags & SYMBOL_WRITE) { + if (sym->flags & SYMBOL_DEF_AUTO) { + /* + * symbol has old and new value, + * so compare them... + */ + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym_get_tristate_value(sym) == + sym->def[S_DEF_AUTO].tri) + continue; + break; + case S_STRING: + case S_HEX: + case S_INT: + if (!strcmp(sym_get_string_value(sym), + sym->def[S_DEF_AUTO].val)) + continue; + break; + default: + break; + } + } else { + /* + * If there is no old value, only 'no' (unset) + * is allowed as new value. + */ + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym_get_tristate_value(sym) == no) + continue; + break; + default: + break; + } + } + } else if (!(sym->flags & SYMBOL_DEF_AUTO)) + /* There is neither an old nor a new value. */ + continue; + /* else + * There is an old value, but no new value ('no' (unset) + * isn't saved in auto.conf, so the old value is always + * different from 'no'). + */ + + /* Replace all '_' and append ".h" */ + s = sym->name; + d = path; + while ((c = *s++)) { + c = tolower(c); + *d++ = (c == '_') ? '/' : c; + } + strcpy(d, ".h"); + + /* Assume directory path already exists. */ + fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd == -1) { + if (errno != ENOENT) { + res = 1; + break; + } + /* + * Create directory components, + * unless they exist already. + */ + d = path; + while ((d = strchr(d, '/'))) { + *d = 0; + if (stat(path, &sb) && mkdir(path, 0755)) { + res = 1; + goto out; + } + *d++ = '/'; + } + /* Try it again. */ + fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd == -1) { + res = 1; + break; + } + } + close(fd); + } +out: + if (chdir(opwd)) + res = 1; +err: + free(opwd); + free(_name); + return res; +} + +int conf_write_autoconf(void) +{ + struct symbol *sym; + const char *name; + FILE *out, *tristate, *out_h; + int i; + char dir[PATH_MAX+1], buf[PATH_MAX+1]; + char *s; + + strcpy(dir, conf_get_configname()); + s = strrchr(dir, '/'); + if (s) + s[1] = 0; + else + dir[0] = 0; + + sym_clear_all_valid(); + + sprintf(buf, "%s.config.cmd", dir); + file_write_dep(buf); + + if (conf_split_config()) + return 1; + + sprintf(buf, "%s.tmpconfig", dir); + out = fopen(buf, "w"); + if (!out) + return 1; + + sprintf(buf, "%s.tmpconfig_tristate", dir); + tristate = fopen(buf, "w"); + if (!tristate) { + fclose(out); + return 1; + } + + sprintf(buf, "%s.tmpconfig.h", dir); + out_h = fopen(buf, "w"); + if (!out_h) { + fclose(out); + fclose(tristate); + return 1; + } + + conf_write_heading(out, &kconfig_printer_cb, NULL); + + conf_write_heading(tristate, &tristate_printer_cb, NULL); + + conf_write_heading(out_h, &header_printer_cb, NULL); + + for_all_symbols(i, sym) { + sym_calc_value(sym); + if (!(sym->flags & SYMBOL_WRITE) || !sym->name) + continue; + + /* write symbol to auto.conf, tristate and header files */ + conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); + + conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); + + conf_write_symbol(out_h, sym, &header_printer_cb, NULL); + } + fclose(out); + fclose(tristate); + fclose(out_h); + + name = getenv("KCONFIG_AUTOHEADER"); + if (!name) + name = "include/generated/autoconf.h"; + sprintf(buf, "%s.tmpconfig.h", dir); + if (rename(buf, name)) + return 1; + name = getenv("KCONFIG_TRISTATE"); + if (!name) + name = "include/config/tristate.conf"; + sprintf(buf, "%s.tmpconfig_tristate", dir); + if (rename(buf, name)) + return 1; + name = conf_get_autoconfig_name(); + /* + * This must be the last step, kbuild has a dependency on auto.conf + * and this marks the successful completion of the previous steps. + */ + sprintf(buf, "%s.tmpconfig", dir); + if (rename(buf, name)) + return 1; + + return 0; +} + +static int sym_change_count; +static void (*conf_changed_callback)(void); + +void sym_set_change_count(int count) +{ + int _sym_change_count = sym_change_count; + sym_change_count = count; + if (conf_changed_callback && + (bool)_sym_change_count != (bool)count) + conf_changed_callback(); +} + +void sym_add_change_count(int count) +{ + sym_set_change_count(count + sym_change_count); +} + +bool conf_get_changed(void) +{ + return sym_change_count; +} + +void conf_set_changed_callback(void (*fn)(void)) +{ + conf_changed_callback = fn; +} + +static bool randomize_choice_values(struct symbol *csym) +{ + struct property *prop; + struct symbol *sym; + struct expr *e; + int cnt, def; + + /* + * If choice is mod then we may have more items selected + * and if no then no-one. + * In both cases stop. + */ + if (csym->curr.tri != yes) + return false; + + prop = sym_get_choice_prop(csym); + + /* count entries in choice block */ + cnt = 0; + expr_list_for_each_sym(prop->expr, e, sym) + cnt++; + + /* + * find a random value and set it to yes, + * set the rest to no so we have only one set + */ + def = (rand() % cnt); + + cnt = 0; + expr_list_for_each_sym(prop->expr, e, sym) { + if (def == cnt++) { + sym->def[S_DEF_USER].tri = yes; + csym->def[S_DEF_USER].val = sym; + } + else { + sym->def[S_DEF_USER].tri = no; + } + sym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + sym->flags &= ~SYMBOL_VALID; + } + csym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + csym->flags &= ~(SYMBOL_VALID); + + return true; +} + +void set_all_choice_values(struct symbol *csym) +{ + struct property *prop; + struct symbol *sym; + struct expr *e; + + prop = sym_get_choice_prop(csym); + + /* + * Set all non-assinged choice values to no + */ + expr_list_for_each_sym(prop->expr, e, sym) { + if (!sym_has_value(sym)) + sym->def[S_DEF_USER].tri = no; + } + csym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + csym->flags &= ~(SYMBOL_VALID | SYMBOL_NEED_SET_CHOICE_VALUES); +} + +bool conf_set_all_new_symbols(enum conf_def_mode mode) +{ + struct symbol *sym, *csym; + int i, cnt, pby, pty, ptm; /* pby: probability of bool = y + * pty: probability of tristate = y + * ptm: probability of tristate = m + */ + + pby = 50; pty = ptm = 33; /* can't go as the default in switch-case + * below, otherwise gcc whines about + * -Wmaybe-uninitialized */ + if (mode == def_random) { + int n, p[3]; + char *env = getenv("KCONFIG_PROBABILITY"); + n = 0; + while( env && *env ) { + char *endp; + int tmp = strtol( env, &endp, 10 ); + if( tmp >= 0 && tmp <= 100 ) { + p[n++] = tmp; + } else { + errno = ERANGE; + perror( "KCONFIG_PROBABILITY" ); + exit( 1 ); + } + env = (*endp == ':') ? endp+1 : endp; + if( n >=3 ) { + break; + } + } + switch( n ) { + case 1: + pby = p[0]; ptm = pby/2; pty = pby-ptm; + break; + case 2: + pty = p[0]; ptm = p[1]; pby = pty + ptm; + break; + case 3: + pby = p[0]; pty = p[1]; ptm = p[2]; + break; + } + + if( pty+ptm > 100 ) { + errno = ERANGE; + perror( "KCONFIG_PROBABILITY" ); + exit( 1 ); + } + } + bool has_changed = false; + + for_all_symbols(i, sym) { + if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID)) + continue; + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: + has_changed = true; + switch (mode) { + case def_yes: + sym->def[S_DEF_USER].tri = yes; + break; + case def_mod: + sym->def[S_DEF_USER].tri = mod; + break; + case def_no: + if (sym->flags & SYMBOL_ALLNOCONFIG_Y) + sym->def[S_DEF_USER].tri = yes; + else + sym->def[S_DEF_USER].tri = no; + break; + case def_random: + sym->def[S_DEF_USER].tri = no; + cnt = rand() % 100; + if (sym->type == S_TRISTATE) { + if (cnt < pty) + sym->def[S_DEF_USER].tri = yes; + else if (cnt < (pty+ptm)) + sym->def[S_DEF_USER].tri = mod; + } else if (cnt < pby) + sym->def[S_DEF_USER].tri = yes; + break; + default: + continue; + } + if (!(sym_is_choice(sym) && mode == def_random)) + sym->flags |= SYMBOL_DEF_USER; + break; + default: + break; + } + + } + + sym_clear_all_valid(); + + /* + * We have different type of choice blocks. + * If curr.tri equals to mod then we can select several + * choice symbols in one block. + * In this case we do nothing. + * If curr.tri equals yes then only one symbol can be + * selected in a choice block and we set it to yes, + * and the rest to no. + */ + if (mode != def_random) { + for_all_symbols(i, csym) { + if ((sym_is_choice(csym) && !sym_has_value(csym)) || + sym_is_choice_value(csym)) + csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES; + } + } + + for_all_symbols(i, csym) { + if (sym_has_value(csym) || !sym_is_choice(csym)) + continue; + + sym_calc_value(csym); + if (mode == def_random) + has_changed = randomize_choice_values(csym); + else { + set_all_choice_values(csym); + has_changed = true; + } + } + + return has_changed; +} diff --git a/support/kconfig/expr.c b/support/kconfig/expr.c new file mode 100644 index 00000000..e1a39e90 --- /dev/null +++ b/support/kconfig/expr.c @@ -0,0 +1,1305 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include + +#include "lkc.h" + +#define DEBUG_EXPR 0 + +static int expr_eq(struct expr *e1, struct expr *e2); +static struct expr *expr_eliminate_yn(struct expr *e); + +struct expr *expr_alloc_symbol(struct symbol *sym) +{ + struct expr *e = xcalloc(1, sizeof(*e)); + e->type = E_SYMBOL; + e->left.sym = sym; + return e; +} + +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) +{ + struct expr *e = xcalloc(1, sizeof(*e)); + e->type = type; + e->left.expr = ce; + return e; +} + +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) +{ + struct expr *e = xcalloc(1, sizeof(*e)); + e->type = type; + e->left.expr = e1; + e->right.expr = e2; + return e; +} + +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2) +{ + struct expr *e = xcalloc(1, sizeof(*e)); + e->type = type; + e->left.sym = s1; + e->right.sym = s2; + return e; +} + +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2) +{ + if (!e1) + return e2; + return e2 ? expr_alloc_two(E_AND, e1, e2) : e1; +} + +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2) +{ + if (!e1) + return e2; + return e2 ? expr_alloc_two(E_OR, e1, e2) : e1; +} + +struct expr *expr_copy(const struct expr *org) +{ + struct expr *e; + + if (!org) + return NULL; + + e = xmalloc(sizeof(*org)); + memcpy(e, org, sizeof(*org)); + switch (org->type) { + case E_SYMBOL: + e->left = org->left; + break; + case E_NOT: + e->left.expr = expr_copy(org->left.expr); + break; + case E_EQUAL: + case E_GEQ: + case E_GTH: + case E_LEQ: + case E_LTH: + case E_UNEQUAL: + e->left.sym = org->left.sym; + e->right.sym = org->right.sym; + break; + case E_AND: + case E_OR: + case E_LIST: + e->left.expr = expr_copy(org->left.expr); + e->right.expr = expr_copy(org->right.expr); + break; + default: + fprintf(stderr, "can't copy type %d\n", e->type); + free(e); + e = NULL; + break; + } + + return e; +} + +void expr_free(struct expr *e) +{ + if (!e) + return; + + switch (e->type) { + case E_SYMBOL: + break; + case E_NOT: + expr_free(e->left.expr); + break; + case E_EQUAL: + case E_GEQ: + case E_GTH: + case E_LEQ: + case E_LTH: + case E_UNEQUAL: + break; + case E_OR: + case E_AND: + expr_free(e->left.expr); + expr_free(e->right.expr); + break; + default: + fprintf(stderr, "how to free type %d?\n", e->type); + break; + } + free(e); +} + +static int trans_count; + +#define e1 (*ep1) +#define e2 (*ep2) + +/* + * expr_eliminate_eq() helper. + * + * Walks the two expression trees given in 'ep1' and 'ep2'. Any node that does + * not have type 'type' (E_OR/E_AND) is considered a leaf, and is compared + * against all other leaves. Two equal leaves are both replaced with either 'y' + * or 'n' as appropriate for 'type', to be eliminated later. + */ +static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ + /* Recurse down to leaves */ + + if (e1->type == type) { + __expr_eliminate_eq(type, &e1->left.expr, &e2); + __expr_eliminate_eq(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + __expr_eliminate_eq(type, &e1, &e2->left.expr); + __expr_eliminate_eq(type, &e1, &e2->right.expr); + return; + } + + /* e1 and e2 are leaves. Compare them. */ + + if (e1->type == E_SYMBOL && e2->type == E_SYMBOL && + e1->left.sym == e2->left.sym && + (e1->left.sym == &symbol_yes || e1->left.sym == &symbol_no)) + return; + if (!expr_eq(e1, e2)) + return; + + /* e1 and e2 are equal leaves. Prepare them for elimination. */ + + trans_count++; + expr_free(e1); expr_free(e2); + switch (type) { + case E_OR: + e1 = expr_alloc_symbol(&symbol_no); + e2 = expr_alloc_symbol(&symbol_no); + break; + case E_AND: + e1 = expr_alloc_symbol(&symbol_yes); + e2 = expr_alloc_symbol(&symbol_yes); + break; + default: + ; + } +} + +/* + * Rewrites the expressions 'ep1' and 'ep2' to remove operands common to both. + * Example reductions: + * + * ep1: A && B -> ep1: y + * ep2: A && B && C -> ep2: C + * + * ep1: A || B -> ep1: n + * ep2: A || B || C -> ep2: C + * + * ep1: A && (B && FOO) -> ep1: FOO + * ep2: (BAR && B) && A -> ep2: BAR + * + * ep1: A && (B || C) -> ep1: y + * ep2: (C || B) && A -> ep2: y + * + * Comparisons are done between all operands at the same "level" of && or ||. + * For example, in the expression 'e1 && (e2 || e3) && (e4 || e5)', the + * following operands will be compared: + * + * - 'e1', 'e2 || e3', and 'e4 || e5', against each other + * - e2 against e3 + * - e4 against e5 + * + * Parentheses are irrelevant within a single level. 'e1 && (e2 && e3)' and + * '(e1 && e2) && e3' are both a single level. + * + * See __expr_eliminate_eq() as well. + */ +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2) +{ + if (!e1 || !e2) + return; + switch (e1->type) { + case E_OR: + case E_AND: + __expr_eliminate_eq(e1->type, ep1, ep2); + default: + ; + } + if (e1->type != e2->type) switch (e2->type) { + case E_OR: + case E_AND: + __expr_eliminate_eq(e2->type, ep1, ep2); + default: + ; + } + e1 = expr_eliminate_yn(e1); + e2 = expr_eliminate_yn(e2); +} + +#undef e1 +#undef e2 + +/* + * Returns true if 'e1' and 'e2' are equal, after minor simplification. Two + * &&/|| expressions are considered equal if every operand in one expression + * equals some operand in the other (operands do not need to appear in the same + * order), recursively. + */ +static int expr_eq(struct expr *e1, struct expr *e2) +{ + int res, old_count; + + if (e1->type != e2->type) + return 0; + switch (e1->type) { + case E_EQUAL: + case E_GEQ: + case E_GTH: + case E_LEQ: + case E_LTH: + case E_UNEQUAL: + return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym; + case E_SYMBOL: + return e1->left.sym == e2->left.sym; + case E_NOT: + return expr_eq(e1->left.expr, e2->left.expr); + case E_AND: + case E_OR: + e1 = expr_copy(e1); + e2 = expr_copy(e2); + old_count = trans_count; + expr_eliminate_eq(&e1, &e2); + res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL && + e1->left.sym == e2->left.sym); + expr_free(e1); + expr_free(e2); + trans_count = old_count; + return res; + case E_LIST: + case E_RANGE: + case E_NONE: + /* panic */; + } + + if (DEBUG_EXPR) { + expr_fprint(e1, stdout); + printf(" = "); + expr_fprint(e2, stdout); + printf(" ?\n"); + } + + return 0; +} + +/* + * Recursively performs the following simplifications in-place (as well as the + * corresponding simplifications with swapped operands): + * + * expr && n -> n + * expr && y -> expr + * expr || n -> expr + * expr || y -> y + * + * Returns the optimized expression. + */ +static struct expr *expr_eliminate_yn(struct expr *e) +{ + struct expr *tmp; + + if (e) switch (e->type) { + case E_AND: + e->left.expr = expr_eliminate_yn(e->left.expr); + e->right.expr = expr_eliminate_yn(e->right.expr); + if (e->left.expr->type == E_SYMBOL) { + if (e->left.expr->left.sym == &symbol_no) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.expr = NULL; + return e; + } else if (e->left.expr->left.sym == &symbol_yes) { + free(e->left.expr); + tmp = e->right.expr; + *e = *(e->right.expr); + free(tmp); + return e; + } + } + if (e->right.expr->type == E_SYMBOL) { + if (e->right.expr->left.sym == &symbol_no) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.expr = NULL; + return e; + } else if (e->right.expr->left.sym == &symbol_yes) { + free(e->right.expr); + tmp = e->left.expr; + *e = *(e->left.expr); + free(tmp); + return e; + } + } + break; + case E_OR: + e->left.expr = expr_eliminate_yn(e->left.expr); + e->right.expr = expr_eliminate_yn(e->right.expr); + if (e->left.expr->type == E_SYMBOL) { + if (e->left.expr->left.sym == &symbol_no) { + free(e->left.expr); + tmp = e->right.expr; + *e = *(e->right.expr); + free(tmp); + return e; + } else if (e->left.expr->left.sym == &symbol_yes) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.expr = NULL; + return e; + } + } + if (e->right.expr->type == E_SYMBOL) { + if (e->right.expr->left.sym == &symbol_no) { + free(e->right.expr); + tmp = e->left.expr; + *e = *(e->left.expr); + free(tmp); + return e; + } else if (e->right.expr->left.sym == &symbol_yes) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.expr = NULL; + return e; + } + } + break; + default: + ; + } + return e; +} + +/* + * bool FOO!=n => FOO + */ +struct expr *expr_trans_bool(struct expr *e) +{ + if (!e) + return NULL; + switch (e->type) { + case E_AND: + case E_OR: + case E_NOT: + e->left.expr = expr_trans_bool(e->left.expr); + e->right.expr = expr_trans_bool(e->right.expr); + break; + case E_UNEQUAL: + // FOO!=n -> FOO + if (e->left.sym->type == S_TRISTATE) { + if (e->right.sym == &symbol_no) { + e->type = E_SYMBOL; + e->right.sym = NULL; + } + } + break; + default: + ; + } + return e; +} + +/* + * e1 || e2 -> ? + */ +static struct expr *expr_join_or(struct expr *e1, struct expr *e2) +{ + struct expr *tmp; + struct symbol *sym1, *sym2; + + if (expr_eq(e1, e2)) + return expr_copy(e1); + if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) + return NULL; + if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) + return NULL; + if (e1->type == E_NOT) { + tmp = e1->left.expr; + if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) + return NULL; + sym1 = tmp->left.sym; + } else + sym1 = e1->left.sym; + if (e2->type == E_NOT) { + if (e2->left.expr->type != E_SYMBOL) + return NULL; + sym2 = e2->left.expr->left.sym; + } else + sym2 = e2->left.sym; + if (sym1 != sym2) + return NULL; + if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) + return NULL; + if (sym1->type == S_TRISTATE) { + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) { + // (a='y') || (a='m') -> (a!='n') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no); + } + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) { + // (a='y') || (a='n') -> (a!='m') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod); + } + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) { + // (a='m') || (a='n') -> (a!='y') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes); + } + } + if (sym1->type == S_BOOLEAN && sym1 == sym2) { + if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) || + (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL)) + return expr_alloc_symbol(&symbol_yes); + } + + if (DEBUG_EXPR) { + printf("optimize ("); + expr_fprint(e1, stdout); + printf(") || ("); + expr_fprint(e2, stdout); + printf(")?\n"); + } + return NULL; +} + +static struct expr *expr_join_and(struct expr *e1, struct expr *e2) +{ + struct expr *tmp; + struct symbol *sym1, *sym2; + + if (expr_eq(e1, e2)) + return expr_copy(e1); + if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) + return NULL; + if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) + return NULL; + if (e1->type == E_NOT) { + tmp = e1->left.expr; + if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) + return NULL; + sym1 = tmp->left.sym; + } else + sym1 = e1->left.sym; + if (e2->type == E_NOT) { + if (e2->left.expr->type != E_SYMBOL) + return NULL; + sym2 = e2->left.expr->left.sym; + } else + sym2 = e2->left.sym; + if (sym1 != sym2) + return NULL; + if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) + return NULL; + + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) || + (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes)) + // (a) && (a='y') -> (a='y') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no)) + // (a) && (a!='n') -> (a) + return expr_alloc_symbol(sym1); + + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod)) + // (a) && (a!='m') -> (a='y') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if (sym1->type == S_TRISTATE) { + if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) { + // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' + sym2 = e1->right.sym; + if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) + return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) + : expr_alloc_symbol(&symbol_no); + } + if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) { + // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' + sym2 = e2->right.sym; + if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) + return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) + : expr_alloc_symbol(&symbol_no); + } + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) + // (a!='y') && (a!='n') -> (a='m') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod); + + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) + // (a!='y') && (a!='m') -> (a='n') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_no); + + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) + // (a!='m') && (a!='n') -> (a='m') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) || + (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) || + (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes)) + return NULL; + } + + if (DEBUG_EXPR) { + printf("optimize ("); + expr_fprint(e1, stdout); + printf(") && ("); + expr_fprint(e2, stdout); + printf(")?\n"); + } + return NULL; +} + +/* + * expr_eliminate_dups() helper. + * + * Walks the two expression trees given in 'ep1' and 'ep2'. Any node that does + * not have type 'type' (E_OR/E_AND) is considered a leaf, and is compared + * against all other leaves to look for simplifications. + */ +static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + struct expr *tmp; + + /* Recurse down to leaves */ + + if (e1->type == type) { + expr_eliminate_dups1(type, &e1->left.expr, &e2); + expr_eliminate_dups1(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_eliminate_dups1(type, &e1, &e2->left.expr); + expr_eliminate_dups1(type, &e1, &e2->right.expr); + return; + } + + /* e1 and e2 are leaves. Compare and process them. */ + + if (e1 == e2) + return; + + switch (e1->type) { + case E_OR: case E_AND: + expr_eliminate_dups1(e1->type, &e1, &e1); + default: + ; + } + + switch (type) { + case E_OR: + tmp = expr_join_or(e1, e2); + if (tmp) { + expr_free(e1); expr_free(e2); + e1 = expr_alloc_symbol(&symbol_no); + e2 = tmp; + trans_count++; + } + break; + case E_AND: + tmp = expr_join_and(e1, e2); + if (tmp) { + expr_free(e1); expr_free(e2); + e1 = expr_alloc_symbol(&symbol_yes); + e2 = tmp; + trans_count++; + } + break; + default: + ; + } +#undef e1 +#undef e2 +} + +/* + * Rewrites 'e' in-place to remove ("join") duplicate and other redundant + * operands. + * + * Example simplifications: + * + * A || B || A -> A || B + * A && B && A=y -> A=y && B + * + * Returns the deduplicated expression. + */ +struct expr *expr_eliminate_dups(struct expr *e) +{ + int oldcount; + if (!e) + return e; + + oldcount = trans_count; + while (1) { + trans_count = 0; + switch (e->type) { + case E_OR: case E_AND: + expr_eliminate_dups1(e->type, &e, &e); + default: + ; + } + if (!trans_count) + /* No simplifications done in this pass. We're done */ + break; + e = expr_eliminate_yn(e); + } + trans_count = oldcount; + return e; +} + +/* + * Performs various simplifications involving logical operators and + * comparisons. + * + * Allocates and returns a new expression. + */ +struct expr *expr_transform(struct expr *e) +{ + struct expr *tmp; + + if (!e) + return NULL; + switch (e->type) { + case E_EQUAL: + case E_GEQ: + case E_GTH: + case E_LEQ: + case E_LTH: + case E_UNEQUAL: + case E_SYMBOL: + case E_LIST: + break; + default: + e->left.expr = expr_transform(e->left.expr); + e->right.expr = expr_transform(e->right.expr); + } + + switch (e->type) { + case E_EQUAL: + if (e->left.sym->type != S_BOOLEAN) + break; + if (e->right.sym == &symbol_no) { + e->type = E_NOT; + e->left.expr = expr_alloc_symbol(e->left.sym); + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_mod) { + printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_yes) { + e->type = E_SYMBOL; + e->right.sym = NULL; + break; + } + break; + case E_UNEQUAL: + if (e->left.sym->type != S_BOOLEAN) + break; + if (e->right.sym == &symbol_no) { + e->type = E_SYMBOL; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_mod) { + printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_yes) { + e->type = E_NOT; + e->left.expr = expr_alloc_symbol(e->left.sym); + e->right.sym = NULL; + break; + } + break; + case E_NOT: + switch (e->left.expr->type) { + case E_NOT: + // !!a -> a + tmp = e->left.expr->left.expr; + free(e->left.expr); + free(e); + e = tmp; + e = expr_transform(e); + break; + case E_EQUAL: + case E_UNEQUAL: + // !a='x' -> a!='x' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL; + break; + case E_LEQ: + case E_GEQ: + // !a<='x' -> a>'x' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = e->type == E_LEQ ? E_GTH : E_LTH; + break; + case E_LTH: + case E_GTH: + // !a<'x' -> a>='x' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = e->type == E_LTH ? E_GEQ : E_LEQ; + break; + case E_OR: + // !(a || b) -> !a && !b + tmp = e->left.expr; + e->type = E_AND; + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); + tmp->type = E_NOT; + tmp->right.expr = NULL; + e = expr_transform(e); + break; + case E_AND: + // !(a && b) -> !a || !b + tmp = e->left.expr; + e->type = E_OR; + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); + tmp->type = E_NOT; + tmp->right.expr = NULL; + e = expr_transform(e); + break; + case E_SYMBOL: + if (e->left.expr->left.sym == &symbol_yes) { + // !'y' -> 'n' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + break; + } + if (e->left.expr->left.sym == &symbol_mod) { + // !'m' -> 'm' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_mod; + break; + } + if (e->left.expr->left.sym == &symbol_no) { + // !'n' -> 'y' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + break; + } + break; + default: + ; + } + break; + default: + ; + } + return e; +} + +int expr_contains_symbol(struct expr *dep, struct symbol *sym) +{ + if (!dep) + return 0; + + switch (dep->type) { + case E_AND: + case E_OR: + return expr_contains_symbol(dep->left.expr, sym) || + expr_contains_symbol(dep->right.expr, sym); + case E_SYMBOL: + return dep->left.sym == sym; + case E_EQUAL: + case E_GEQ: + case E_GTH: + case E_LEQ: + case E_LTH: + case E_UNEQUAL: + return dep->left.sym == sym || + dep->right.sym == sym; + case E_NOT: + return expr_contains_symbol(dep->left.expr, sym); + default: + ; + } + return 0; +} + +bool expr_depends_symbol(struct expr *dep, struct symbol *sym) +{ + if (!dep) + return false; + + switch (dep->type) { + case E_AND: + return expr_depends_symbol(dep->left.expr, sym) || + expr_depends_symbol(dep->right.expr, sym); + case E_SYMBOL: + return dep->left.sym == sym; + case E_EQUAL: + if (dep->left.sym == sym) { + if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod) + return true; + } + break; + case E_UNEQUAL: + if (dep->left.sym == sym) { + if (dep->right.sym == &symbol_no) + return true; + } + break; + default: + ; + } + return false; +} + +/* + * Inserts explicit comparisons of type 'type' to symbol 'sym' into the + * expression 'e'. + * + * Examples transformations for type == E_UNEQUAL, sym == &symbol_no: + * + * A -> A!=n + * !A -> A=n + * A && B -> !(A=n || B=n) + * A || B -> !(A=n && B=n) + * A && (B || C) -> !(A=n || (B=n && C=n)) + * + * Allocates and returns a new expression. + */ +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym) +{ + struct expr *e1, *e2; + + if (!e) { + e = expr_alloc_symbol(sym); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + } + switch (e->type) { + case E_AND: + e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); + e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); + if (sym == &symbol_yes) + e = expr_alloc_two(E_AND, e1, e2); + if (sym == &symbol_no) + e = expr_alloc_two(E_OR, e1, e2); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + case E_OR: + e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); + e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); + if (sym == &symbol_yes) + e = expr_alloc_two(E_OR, e1, e2); + if (sym == &symbol_no) + e = expr_alloc_two(E_AND, e1, e2); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + case E_NOT: + return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym); + case E_UNEQUAL: + case E_LTH: + case E_LEQ: + case E_GTH: + case E_GEQ: + case E_EQUAL: + if (type == E_EQUAL) { + if (sym == &symbol_yes) + return expr_copy(e); + if (sym == &symbol_mod) + return expr_alloc_symbol(&symbol_no); + if (sym == &symbol_no) + return expr_alloc_one(E_NOT, expr_copy(e)); + } else { + if (sym == &symbol_yes) + return expr_alloc_one(E_NOT, expr_copy(e)); + if (sym == &symbol_mod) + return expr_alloc_symbol(&symbol_yes); + if (sym == &symbol_no) + return expr_copy(e); + } + break; + case E_SYMBOL: + return expr_alloc_comp(type, e->left.sym, sym); + case E_LIST: + case E_RANGE: + case E_NONE: + /* panic */; + } + return NULL; +} + +enum string_value_kind { + k_string, + k_signed, + k_unsigned, + k_invalid +}; + +union string_value { + unsigned long long u; + signed long long s; +}; + +static enum string_value_kind expr_parse_string(const char *str, + enum symbol_type type, + union string_value *val) +{ + char *tail; + enum string_value_kind kind; + + errno = 0; + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + val->s = !strcmp(str, "n") ? 0 : + !strcmp(str, "m") ? 1 : + !strcmp(str, "y") ? 2 : -1; + return k_signed; + case S_INT: + val->s = strtoll(str, &tail, 10); + kind = k_signed; + break; + case S_HEX: + val->u = strtoull(str, &tail, 16); + kind = k_unsigned; + break; + case S_STRING: + case S_UNKNOWN: + val->s = strtoll(str, &tail, 0); + kind = k_signed; + break; + default: + return k_invalid; + } + return !errno && !*tail && tail > str && isxdigit(tail[-1]) + ? kind : k_string; +} + +tristate expr_calc_value(struct expr *e) +{ + tristate val1, val2; + const char *str1, *str2; + enum string_value_kind k1 = k_string, k2 = k_string; + union string_value lval = {}, rval = {}; + int res; + + if (!e) + return yes; + + switch (e->type) { + case E_SYMBOL: + sym_calc_value(e->left.sym); + return e->left.sym->curr.tri; + case E_AND: + val1 = expr_calc_value(e->left.expr); + val2 = expr_calc_value(e->right.expr); + return EXPR_AND(val1, val2); + case E_OR: + val1 = expr_calc_value(e->left.expr); + val2 = expr_calc_value(e->right.expr); + return EXPR_OR(val1, val2); + case E_NOT: + val1 = expr_calc_value(e->left.expr); + return EXPR_NOT(val1); + case E_EQUAL: + case E_GEQ: + case E_GTH: + case E_LEQ: + case E_LTH: + case E_UNEQUAL: + break; + default: + printf("expr_calc_value: %d?\n", e->type); + return no; + } + + sym_calc_value(e->left.sym); + sym_calc_value(e->right.sym); + str1 = sym_get_string_value(e->left.sym); + str2 = sym_get_string_value(e->right.sym); + + if (e->left.sym->type != S_STRING || e->right.sym->type != S_STRING) { + k1 = expr_parse_string(str1, e->left.sym->type, &lval); + k2 = expr_parse_string(str2, e->right.sym->type, &rval); + } + + if (k1 == k_string || k2 == k_string) + res = strcmp(str1, str2); + else if (k1 == k_invalid || k2 == k_invalid) { + if (e->type != E_EQUAL && e->type != E_UNEQUAL) { + printf("Cannot compare \"%s\" and \"%s\"\n", str1, str2); + return no; + } + res = strcmp(str1, str2); + } else if (k1 == k_unsigned || k2 == k_unsigned) + res = (lval.u > rval.u) - (lval.u < rval.u); + else /* if (k1 == k_signed && k2 == k_signed) */ + res = (lval.s > rval.s) - (lval.s < rval.s); + + switch(e->type) { + case E_EQUAL: + return res ? no : yes; + case E_GEQ: + return res >= 0 ? yes : no; + case E_GTH: + return res > 0 ? yes : no; + case E_LEQ: + return res <= 0 ? yes : no; + case E_LTH: + return res < 0 ? yes : no; + case E_UNEQUAL: + return res ? yes : no; + default: + printf("expr_calc_value: relation %d?\n", e->type); + return no; + } +} + +static int expr_compare_type(enum expr_type t1, enum expr_type t2) +{ + if (t1 == t2) + return 0; + switch (t1) { + case E_LEQ: + case E_LTH: + case E_GEQ: + case E_GTH: + if (t2 == E_EQUAL || t2 == E_UNEQUAL) + return 1; + case E_EQUAL: + case E_UNEQUAL: + if (t2 == E_NOT) + return 1; + case E_NOT: + if (t2 == E_AND) + return 1; + case E_AND: + if (t2 == E_OR) + return 1; + case E_OR: + if (t2 == E_LIST) + return 1; + case E_LIST: + if (t2 == 0) + return 1; + default: + return -1; + } + printf("[%dgt%d?]", t1, t2); + return 0; +} + +void expr_print(struct expr *e, + void (*fn)(void *, struct symbol *, const char *), + void *data, int prevtoken) +{ + if (!e) { + fn(data, NULL, "y"); + return; + } + + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, NULL, "("); + switch (e->type) { + case E_SYMBOL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, ""); + break; + case E_NOT: + fn(data, NULL, "!"); + expr_print(e->left.expr, fn, data, E_NOT); + break; + case E_EQUAL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, ""); + fn(data, NULL, "="); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_LEQ: + case E_LTH: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, ""); + fn(data, NULL, e->type == E_LEQ ? "<=" : "<"); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_GEQ: + case E_GTH: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, ""); + fn(data, NULL, e->type == E_GEQ ? ">=" : ">"); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_UNEQUAL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, ""); + fn(data, NULL, "!="); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_OR: + expr_print(e->left.expr, fn, data, E_OR); + fn(data, NULL, " || "); + expr_print(e->right.expr, fn, data, E_OR); + break; + case E_AND: + expr_print(e->left.expr, fn, data, E_AND); + fn(data, NULL, " && "); + expr_print(e->right.expr, fn, data, E_AND); + break; + case E_LIST: + fn(data, e->right.sym, e->right.sym->name); + if (e->left.expr) { + fn(data, NULL, " ^ "); + expr_print(e->left.expr, fn, data, E_LIST); + } + break; + case E_RANGE: + fn(data, NULL, "["); + fn(data, e->left.sym, e->left.sym->name); + fn(data, NULL, " "); + fn(data, e->right.sym, e->right.sym->name); + fn(data, NULL, "]"); + break; + default: + { + char buf[32]; + sprintf(buf, "", e->type); + fn(data, NULL, buf); + break; + } + } + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, NULL, ")"); +} + +static void expr_print_file_helper(void *data, struct symbol *sym, const char *str) +{ + xfwrite(str, strlen(str), 1, data); +} + +void expr_fprint(struct expr *e, FILE *out) +{ + expr_print(e, expr_print_file_helper, out, E_NONE); +} + +static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str) +{ + struct gstr *gs = (struct gstr*)data; + const char *sym_str = NULL; + + if (sym) + sym_str = sym_get_string_value(sym); + + if (gs->max_width) { + unsigned extra_length = strlen(str); + const char *last_cr = strrchr(gs->s, '\n'); + unsigned last_line_length; + + if (sym_str) + extra_length += 4 + strlen(sym_str); + + if (!last_cr) + last_cr = gs->s; + + last_line_length = strlen(gs->s) - (last_cr - gs->s); + + if ((last_line_length + extra_length) > gs->max_width) + str_append(gs, "\\\n"); + } + + str_append(gs, str); + if (sym && sym->type != S_UNKNOWN) + str_printf(gs, " [=%s]", sym_str); +} + +void expr_gstr_print(struct expr *e, struct gstr *gs) +{ + expr_print(e, expr_print_gstr_helper, gs, E_NONE); +} + +/* + * Transform the top level "||" tokens into newlines and prepend each + * line with a minus. This makes expressions much easier to read. + * Suitable for reverse dependency expressions. + */ +static void expr_print_revdep(struct expr *e, + void (*fn)(void *, struct symbol *, const char *), + void *data, tristate pr_type, const char **title) +{ + if (e->type == E_OR) { + expr_print_revdep(e->left.expr, fn, data, pr_type, title); + expr_print_revdep(e->right.expr, fn, data, pr_type, title); + } else if (expr_calc_value(e) == pr_type) { + if (*title) { + fn(data, NULL, *title); + *title = NULL; + } + + fn(data, NULL, " - "); + expr_print(e, fn, data, E_NONE); + fn(data, NULL, "\n"); + } +} + +void expr_gstr_print_revdep(struct expr *e, struct gstr *gs, + tristate pr_type, const char *title) +{ + expr_print_revdep(e, expr_print_gstr_helper, gs, pr_type, &title); +} diff --git a/support/kconfig/expr.h b/support/kconfig/expr.h new file mode 100644 index 00000000..94a383b2 --- /dev/null +++ b/support/kconfig/expr.h @@ -0,0 +1,329 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#ifndef EXPR_H +#define EXPR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include "list.h" +#ifndef __cplusplus +#include +#endif + +struct file { + struct file *next; + struct file *parent; + const char *name; + int lineno; +}; + +typedef enum tristate { + no, mod, yes +} tristate; + +enum expr_type { + E_NONE, E_OR, E_AND, E_NOT, + E_EQUAL, E_UNEQUAL, E_LTH, E_LEQ, E_GTH, E_GEQ, + E_LIST, E_SYMBOL, E_RANGE +}; + +union expr_data { + struct expr *expr; + struct symbol *sym; +}; + +struct expr { + enum expr_type type; + union expr_data left, right; +}; + +#define EXPR_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2)) +#define EXPR_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2)) +#define EXPR_NOT(dep) (2-(dep)) + +#define expr_list_for_each_sym(l, e, s) \ + for (e = (l); e && (s = e->right.sym); e = e->left.expr) + +struct expr_value { + struct expr *expr; + tristate tri; +}; + +struct symbol_value { + void *val; + tristate tri; +}; + +enum symbol_type { + S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER +}; + +/* enum values are used as index to symbol.def[] */ +enum { + S_DEF_USER, /* main user value */ + S_DEF_AUTO, /* values read from auto.conf */ + S_DEF_DEF3, /* Reserved for UI usage */ + S_DEF_DEF4, /* Reserved for UI usage */ + S_DEF_COUNT +}; + +/* + * Represents a configuration symbol. + * + * Choices are represented as a special kind of symbol and have the + * SYMBOL_CHOICE bit set in 'flags'. + */ +struct symbol { + /* The next symbol in the same bucket in the symbol hash table */ + struct symbol *next; + + /* The name of the symbol, e.g. "FOO" for 'config FOO' */ + char *name; + + /* S_BOOLEAN, S_TRISTATE, ... */ + enum symbol_type type; + + /* + * The calculated value of the symbol. The SYMBOL_VALID bit is set in + * 'flags' when this is up to date. Note that this value might differ + * from the user value set in e.g. a .config file, due to visibility. + */ + struct symbol_value curr; + + /* + * Values for the symbol provided from outside. def[S_DEF_USER] holds + * the .config value. + */ + struct symbol_value def[S_DEF_COUNT]; + + /* + * An upper bound on the tristate value the user can set for the symbol + * if it is a boolean or tristate. Calculated from prompt dependencies, + * which also inherit dependencies from enclosing menus, choices, and + * ifs. If 'n', the user value will be ignored. + * + * Symbols lacking prompts always have visibility 'n'. + */ + tristate visible; + + /* SYMBOL_* flags */ + int flags; + + /* List of properties. See prop_type. */ + struct property *prop; + + /* Dependencies from enclosing menus, choices, and ifs */ + struct expr_value dir_dep; + + /* Reverse dependencies through being selected by other symbols */ + struct expr_value rev_dep; + + /* + * "Weak" reverse dependencies through being implied by other symbols + */ + struct expr_value implied; +}; + +#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) + +#define SYMBOL_CONST 0x0001 /* symbol is const */ +#define SYMBOL_CHECK 0x0008 /* used during dependency checking */ +#define SYMBOL_CHOICE 0x0010 /* start of a choice block (null name) */ +#define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */ +#define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */ +#define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */ +#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */ +#define SYMBOL_CHANGED 0x0400 /* ? */ +#define SYMBOL_AUTO 0x1000 /* value from environment variable */ +#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */ +#define SYMBOL_WARNED 0x8000 /* warning has been issued */ + +/* Set when symbol.def[] is used */ +#define SYMBOL_DEF 0x10000 /* First bit of SYMBOL_DEF */ +#define SYMBOL_DEF_USER 0x10000 /* symbol.def[S_DEF_USER] is valid */ +#define SYMBOL_DEF_AUTO 0x20000 /* symbol.def[S_DEF_AUTO] is valid */ +#define SYMBOL_DEF3 0x40000 /* symbol.def[S_DEF_3] is valid */ +#define SYMBOL_DEF4 0x80000 /* symbol.def[S_DEF_4] is valid */ + +/* choice values need to be set before calculating this symbol value */ +#define SYMBOL_NEED_SET_CHOICE_VALUES 0x100000 + +/* Set symbol to y if allnoconfig; used for symbols that hide others */ +#define SYMBOL_ALLNOCONFIG_Y 0x200000 + +#define SYMBOL_MAXLENGTH 256 +#define SYMBOL_HASHSIZE 9973 + +/* A property represent the config options that can be associated + * with a config "symbol". + * Sample: + * config FOO + * default y + * prompt "foo prompt" + * select BAR + * config BAZ + * int "BAZ Value" + * range 1..255 + */ +enum prop_type { + P_UNKNOWN, + P_PROMPT, /* prompt "foo prompt" or "BAZ Value" */ + P_COMMENT, /* text associated with a comment */ + P_MENU, /* prompt associated with a menu or menuconfig symbol */ + P_DEFAULT, /* default y */ + P_CHOICE, /* choice value */ + P_SELECT, /* select BAR */ + P_IMPLY, /* imply BAR */ + P_RANGE, /* range 7..100 (for a symbol) */ + P_ENV, /* value from environment variable */ + P_SYMBOL, /* where a symbol is defined */ +}; + +struct property { + struct property *next; /* next property - null if last */ + struct symbol *sym; /* the symbol for which the property is associated */ + enum prop_type type; /* type of property */ + const char *text; /* the prompt value - P_PROMPT, P_MENU, P_COMMENT */ + struct expr_value visible; + struct expr *expr; /* the optional conditional part of the property */ + struct menu *menu; /* the menu the property are associated with + * valid for: P_SELECT, P_RANGE, P_CHOICE, + * P_PROMPT, P_DEFAULT, P_MENU, P_COMMENT */ + struct file *file; /* what file was this property defined */ + int lineno; /* what lineno was this property defined */ +}; + +#define for_all_properties(sym, st, tok) \ + for (st = sym->prop; st; st = st->next) \ + if (st->type == (tok)) +#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT) +#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE) +#define for_all_prompts(sym, st) \ + for (st = sym->prop; st; st = st->next) \ + if (st->text) + +/* + * Represents a node in the menu tree, as seen in e.g. menuconfig (though used + * for all front ends). Each symbol, menu, etc. defined in the Kconfig files + * gets a node. A symbol defined in multiple locations gets one node at each + * location. + */ +struct menu { + /* The next menu node at the same level */ + struct menu *next; + + /* The parent menu node, corresponding to e.g. a menu or choice */ + struct menu *parent; + + /* The first child menu node, for e.g. menus and choices */ + struct menu *list; + + /* + * The symbol associated with the menu node. Choices are implemented as + * a special kind of symbol. NULL for menus, comments, and ifs. + */ + struct symbol *sym; + + /* + * The prompt associated with the node. This holds the prompt for a + * symbol as well as the text for a menu or comment, along with the + * type (P_PROMPT, P_MENU, etc.) + */ + struct property *prompt; + + /* + * 'visible if' dependencies. If more than one is given, they will be + * ANDed together. + */ + struct expr *visibility; + + /* + * Ordinary dependencies from e.g. 'depends on' and 'if', ANDed + * together + */ + struct expr *dep; + + /* MENU_* flags */ + unsigned int flags; + + /* Any help text associated with the node */ + char *help; + + /* The location where the menu node appears in the Kconfig files */ + struct file *file; + int lineno; + + /* For use by front ends that need to store auxiliary data */ + void *data; +}; + +/* + * Set on a menu node when the corresponding symbol changes state in some way. + * Can be checked by front ends. + */ +#define MENU_CHANGED 0x0001 + +#define MENU_ROOT 0x0002 + +struct jump_key { + struct list_head entries; + size_t offset; + struct menu *target; + int index; +}; + +#define JUMP_NB 9 + +extern struct file *file_list; +extern struct file *current_file; +struct file *lookup_file(const char *name); + +extern struct symbol symbol_yes, symbol_no, symbol_mod; +extern struct symbol *modules_sym; +extern struct symbol *sym_defconfig_list; +extern int cdebug; +struct expr *expr_alloc_symbol(struct symbol *sym); +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce); +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2); +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2); +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2); +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); +struct expr *expr_copy(const struct expr *org); +void expr_free(struct expr *e); +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); +tristate expr_calc_value(struct expr *e); +struct expr *expr_trans_bool(struct expr *e); +struct expr *expr_eliminate_dups(struct expr *e); +struct expr *expr_transform(struct expr *e); +int expr_contains_symbol(struct expr *dep, struct symbol *sym); +bool expr_depends_symbol(struct expr *dep, struct symbol *sym); +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym); + +void expr_fprint(struct expr *e, FILE *out); +struct gstr; /* forward */ +void expr_gstr_print(struct expr *e, struct gstr *gs); +void expr_gstr_print_revdep(struct expr *e, struct gstr *gs, + tristate pr_type, const char *title); + +static inline int expr_is_yes(struct expr *e) +{ + return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes); +} + +static inline int expr_is_no(struct expr *e) +{ + return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no); +} + +#ifdef __cplusplus +} +#endif + +#endif /* EXPR_H */ diff --git a/support/kconfig/foo.h b/support/kconfig/foo.h new file mode 100644 index 00000000..b9cfdf83 --- /dev/null +++ b/support/kconfig/foo.h @@ -0,0 +1,12 @@ +#ifndef __KCONFIG_FOO_H +#define __KCONFIG_FOO_H + +#ifndef __APPLE__ +#include +#endif +#include + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif +#endif /* __KCONFIG_FOO_H */ diff --git a/support/kconfig/gconf.c b/support/kconfig/gconf.c new file mode 100644 index 00000000..0c2d1c18 --- /dev/null +++ b/support/kconfig/gconf.c @@ -0,0 +1,1521 @@ +/* Hey EMACS -*- linux-c -*- */ +/* + * + * Copyright (C) 2002-2003 Romain Lievin + * Released under the terms of the GNU GPL v2.0. + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "lkc.h" +#include "images.c" + +#include +#include +#include +#include + +#include +#include +#include +#include + +//#define DEBUG + +enum { + SINGLE_VIEW, SPLIT_VIEW, FULL_VIEW +}; + +enum { + OPT_NORMAL, OPT_ALL, OPT_PROMPT +}; + +static gint view_mode = FULL_VIEW; +static gboolean show_name = TRUE; +static gboolean show_range = TRUE; +static gboolean show_value = TRUE; +static gboolean resizeable = FALSE; +static int opt_mode = OPT_NORMAL; + +GtkWidget *main_wnd = NULL; +GtkWidget *tree1_w = NULL; // left frame +GtkWidget *tree2_w = NULL; // right frame +GtkWidget *text_w = NULL; +GtkWidget *hpaned = NULL; +GtkWidget *vpaned = NULL; +GtkWidget *back_btn = NULL; +GtkWidget *save_btn = NULL; +GtkWidget *save_menu_item = NULL; + +GtkTextTag *tag1, *tag2; +GdkColor color; + +GtkTreeStore *tree1, *tree2, *tree; +GtkTreeModel *model1, *model2; +static GtkTreeIter *parents[256]; +static gint indent; + +static struct menu *current; // current node for SINGLE view +static struct menu *browsed; // browsed node for SPLIT view + +enum { + COL_OPTION, COL_NAME, COL_NO, COL_MOD, COL_YES, COL_VALUE, + COL_MENU, COL_COLOR, COL_EDIT, COL_PIXBUF, + COL_PIXVIS, COL_BTNVIS, COL_BTNACT, COL_BTNINC, COL_BTNRAD, + COL_NUMBER +}; + +static void display_list(void); +static void display_tree(struct menu *menu); +static void display_tree_part(void); +static void update_tree(struct menu *src, GtkTreeIter * dst); +static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row); +static gchar **fill_row(struct menu *menu); +static void conf_changed(void); + +/* Helping/Debugging Functions */ + +const char *dbg_sym_flags(int val) +{ + static char buf[256]; + + bzero(buf, 256); + + if (val & SYMBOL_CONST) + strcat(buf, "const/"); + if (val & SYMBOL_CHECK) + strcat(buf, "check/"); + if (val & SYMBOL_CHOICE) + strcat(buf, "choice/"); + if (val & SYMBOL_CHOICEVAL) + strcat(buf, "choiceval/"); + if (val & SYMBOL_VALID) + strcat(buf, "valid/"); + if (val & SYMBOL_OPTIONAL) + strcat(buf, "optional/"); + if (val & SYMBOL_WRITE) + strcat(buf, "write/"); + if (val & SYMBOL_CHANGED) + strcat(buf, "changed/"); + if (val & SYMBOL_AUTO) + strcat(buf, "auto/"); + + buf[strlen(buf) - 1] = '\0'; + + return buf; +} + +void replace_button_icon(GladeXML * xml, GdkDrawable * window, + GtkStyle * style, gchar * btn_name, gchar ** xpm) +{ + GdkPixmap *pixmap; + GdkBitmap *mask; + GtkToolButton *button; + GtkWidget *image; + + pixmap = gdk_pixmap_create_from_xpm_d(window, &mask, + &style->bg[GTK_STATE_NORMAL], + xpm); + + button = GTK_TOOL_BUTTON(glade_xml_get_widget(xml, btn_name)); + image = gtk_image_new_from_pixmap(pixmap, mask); + gtk_widget_show(image); + gtk_tool_button_set_icon_widget(button, image); +} + +/* Main Window Initialization */ +void init_main_window(const gchar * glade_file) +{ + GladeXML *xml; + GtkWidget *widget; + GtkTextBuffer *txtbuf; + GtkStyle *style; + + xml = glade_xml_new(glade_file, "window1", NULL); + if (!xml) + g_error(_("GUI loading failed !\n")); + glade_xml_signal_autoconnect(xml); + + main_wnd = glade_xml_get_widget(xml, "window1"); + hpaned = glade_xml_get_widget(xml, "hpaned1"); + vpaned = glade_xml_get_widget(xml, "vpaned1"); + tree1_w = glade_xml_get_widget(xml, "treeview1"); + tree2_w = glade_xml_get_widget(xml, "treeview2"); + text_w = glade_xml_get_widget(xml, "textview3"); + + back_btn = glade_xml_get_widget(xml, "button1"); + gtk_widget_set_sensitive(back_btn, FALSE); + + widget = glade_xml_get_widget(xml, "show_name1"); + gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, + show_name); + + widget = glade_xml_get_widget(xml, "show_range1"); + gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, + show_range); + + widget = glade_xml_get_widget(xml, "show_data1"); + gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, + show_value); + + save_btn = glade_xml_get_widget(xml, "button3"); + save_menu_item = glade_xml_get_widget(xml, "save1"); + conf_set_changed_callback(conf_changed); + + style = gtk_widget_get_style(main_wnd); + widget = glade_xml_get_widget(xml, "toolbar1"); + + replace_button_icon(xml, main_wnd->window, style, + "button4", (gchar **) xpm_single_view); + replace_button_icon(xml, main_wnd->window, style, + "button5", (gchar **) xpm_split_view); + replace_button_icon(xml, main_wnd->window, style, + "button6", (gchar **) xpm_tree_view); + + txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); + tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1", + "foreground", "red", + "weight", PANGO_WEIGHT_BOLD, + NULL); + tag2 = gtk_text_buffer_create_tag(txtbuf, "mytag2", + /*"style", PANGO_STYLE_OBLIQUE, */ + NULL); + + gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text); + + gtk_widget_show(main_wnd); +} + +void init_tree_model(void) +{ + gint i; + + tree = tree2 = gtk_tree_store_new(COL_NUMBER, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_POINTER, GDK_TYPE_COLOR, + G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN); + model2 = GTK_TREE_MODEL(tree2); + + for (parents[0] = NULL, i = 1; i < 256; i++) + parents[i] = (GtkTreeIter *) g_malloc(sizeof(GtkTreeIter)); + + tree1 = gtk_tree_store_new(COL_NUMBER, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_POINTER, GDK_TYPE_COLOR, + G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN); + model1 = GTK_TREE_MODEL(tree1); +} + +void init_left_tree(void) +{ + GtkTreeView *view = GTK_TREE_VIEW(tree1_w); + GtkCellRenderer *renderer; + GtkTreeSelection *sel; + GtkTreeViewColumn *column; + + gtk_tree_view_set_model(view, model1); + gtk_tree_view_set_headers_visible(view, TRUE); + gtk_tree_view_set_rules_hint(view, TRUE); + + column = gtk_tree_view_column_new(); + gtk_tree_view_append_column(view, column); + gtk_tree_view_column_set_title(column, _("Options")); + + renderer = gtk_cell_renderer_toggle_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "active", COL_BTNACT, + "inconsistent", COL_BTNINC, + "visible", COL_BTNVIS, + "radio", COL_BTNRAD, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "text", COL_OPTION, + "foreground-gdk", + COL_COLOR, NULL); + + sel = gtk_tree_view_get_selection(view); + gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); + gtk_widget_realize(tree1_w); +} + +static void renderer_edited(GtkCellRendererText * cell, + const gchar * path_string, + const gchar * new_text, gpointer user_data); + +void init_right_tree(void) +{ + GtkTreeView *view = GTK_TREE_VIEW(tree2_w); + GtkCellRenderer *renderer; + GtkTreeSelection *sel; + GtkTreeViewColumn *column; + gint i; + + gtk_tree_view_set_model(view, model2); + gtk_tree_view_set_headers_visible(view, TRUE); + gtk_tree_view_set_rules_hint(view, TRUE); + + column = gtk_tree_view_column_new(); + gtk_tree_view_append_column(view, column); + gtk_tree_view_column_set_title(column, _("Options")); + + renderer = gtk_cell_renderer_pixbuf_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "pixbuf", COL_PIXBUF, + "visible", COL_PIXVIS, NULL); + renderer = gtk_cell_renderer_toggle_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "active", COL_BTNACT, + "inconsistent", COL_BTNINC, + "visible", COL_BTNVIS, + "radio", COL_BTNRAD, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "text", COL_OPTION, + "foreground-gdk", + COL_COLOR, NULL); + + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + _("Name"), renderer, + "text", COL_NAME, + "foreground-gdk", + COL_COLOR, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + "N", renderer, + "text", COL_NO, + "foreground-gdk", + COL_COLOR, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + "M", renderer, + "text", COL_MOD, + "foreground-gdk", + COL_COLOR, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + "Y", renderer, + "text", COL_YES, + "foreground-gdk", + COL_COLOR, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + _("Value"), renderer, + "text", COL_VALUE, + "editable", + COL_EDIT, + "foreground-gdk", + COL_COLOR, NULL); + g_signal_connect(G_OBJECT(renderer), "edited", + G_CALLBACK(renderer_edited), NULL); + + column = gtk_tree_view_get_column(view, COL_NAME); + gtk_tree_view_column_set_visible(column, show_name); + column = gtk_tree_view_get_column(view, COL_NO); + gtk_tree_view_column_set_visible(column, show_range); + column = gtk_tree_view_get_column(view, COL_MOD); + gtk_tree_view_column_set_visible(column, show_range); + column = gtk_tree_view_get_column(view, COL_YES); + gtk_tree_view_column_set_visible(column, show_range); + column = gtk_tree_view_get_column(view, COL_VALUE); + gtk_tree_view_column_set_visible(column, show_value); + + if (resizeable) { + for (i = 0; i < COL_VALUE; i++) { + column = gtk_tree_view_get_column(view, i); + gtk_tree_view_column_set_resizable(column, TRUE); + } + } + + sel = gtk_tree_view_get_selection(view); + gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); +} + + +/* Utility Functions */ + + +static void text_insert_help(struct menu *menu) +{ + GtkTextBuffer *buffer; + GtkTextIter start, end; + const char *prompt = _(menu_get_prompt(menu)); + struct gstr help = str_new(); + + menu_get_ext_help(menu, &help); + + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); + gtk_text_buffer_get_bounds(buffer, &start, &end); + gtk_text_buffer_delete(buffer, &start, &end); + gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15); + + gtk_text_buffer_get_end_iter(buffer, &end); + gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1, + NULL); + gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); + gtk_text_buffer_get_end_iter(buffer, &end); + gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2, + NULL); + str_free(&help); +} + + +static void text_insert_msg(const char *title, const char *message) +{ + GtkTextBuffer *buffer; + GtkTextIter start, end; + const char *msg = message; + + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); + gtk_text_buffer_get_bounds(buffer, &start, &end); + gtk_text_buffer_delete(buffer, &start, &end); + gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15); + + gtk_text_buffer_get_end_iter(buffer, &end); + gtk_text_buffer_insert_with_tags(buffer, &end, title, -1, tag1, + NULL); + gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); + gtk_text_buffer_get_end_iter(buffer, &end); + gtk_text_buffer_insert_with_tags(buffer, &end, msg, -1, tag2, + NULL); +} + + +/* Main Windows Callbacks */ + +void on_save_activate(GtkMenuItem * menuitem, gpointer user_data); +gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event, + gpointer user_data) +{ + GtkWidget *dialog, *label; + gint result; + + if (!conf_get_changed()) + return FALSE; + + dialog = gtk_dialog_new_with_buttons(_("Warning !"), + GTK_WINDOW(main_wnd), + (GtkDialogFlags) + (GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT), + GTK_STOCK_OK, + GTK_RESPONSE_YES, + GTK_STOCK_NO, + GTK_RESPONSE_NO, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, NULL); + gtk_dialog_set_default_response(GTK_DIALOG(dialog), + GTK_RESPONSE_CANCEL); + + label = gtk_label_new(_("\nSave configuration ?\n")); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); + gtk_widget_show(label); + + result = gtk_dialog_run(GTK_DIALOG(dialog)); + switch (result) { + case GTK_RESPONSE_YES: + on_save_activate(NULL, NULL); + return FALSE; + case GTK_RESPONSE_NO: + return FALSE; + case GTK_RESPONSE_CANCEL: + case GTK_RESPONSE_DELETE_EVENT: + default: + gtk_widget_destroy(dialog); + return TRUE; + } + + return FALSE; +} + + +void on_window1_destroy(GtkObject * object, gpointer user_data) +{ + gtk_main_quit(); +} + + +void +on_window1_size_request(GtkWidget * widget, + GtkRequisition * requisition, gpointer user_data) +{ + static gint old_h; + gint w, h; + + if (widget->window == NULL) + gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h); + else + gdk_window_get_size(widget->window, &w, &h); + + if (h == old_h) + return; + old_h = h; + + gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3); +} + + +/* Menu & Toolbar Callbacks */ + + +static void +load_filename(GtkFileSelection * file_selector, gpointer user_data) +{ + const gchar *fn; + + fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION + (user_data)); + + if (conf_read(fn)) + text_insert_msg(_("Error"), _("Unable to load configuration !")); + else + display_tree(&rootmenu); +} + +void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *fs; + + fs = gtk_file_selection_new(_("Load file...")); + g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), + "clicked", + G_CALLBACK(load_filename), (gpointer) fs); + g_signal_connect_swapped(GTK_OBJECT + (GTK_FILE_SELECTION(fs)->ok_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer) fs); + g_signal_connect_swapped(GTK_OBJECT + (GTK_FILE_SELECTION(fs)->cancel_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer) fs); + gtk_widget_show(fs); +} + + +void on_save_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + if (conf_write(NULL)) + text_insert_msg(_("Error"), _("Unable to save configuration !")); +} + + +static void +store_filename(GtkFileSelection * file_selector, gpointer user_data) +{ + const gchar *fn; + + fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION + (user_data)); + + if (conf_write(fn)) + text_insert_msg(_("Error"), _("Unable to save configuration !")); + + gtk_widget_destroy(GTK_WIDGET(user_data)); +} + +void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *fs; + + fs = gtk_file_selection_new(_("Save file as...")); + g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), + "clicked", + G_CALLBACK(store_filename), (gpointer) fs); + g_signal_connect_swapped(GTK_OBJECT + (GTK_FILE_SELECTION(fs)->ok_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer) fs); + g_signal_connect_swapped(GTK_OBJECT + (GTK_FILE_SELECTION(fs)->cancel_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer) fs); + gtk_widget_show(fs); +} + + +void on_quit1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + if (!on_window1_delete_event(NULL, NULL, NULL)) + gtk_widget_destroy(GTK_WIDGET(main_wnd)); +} + + +void on_show_name1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkTreeViewColumn *col; + + show_name = GTK_CHECK_MENU_ITEM(menuitem)->active; + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_NAME); + if (col) + gtk_tree_view_column_set_visible(col, show_name); +} + + +void on_show_range1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkTreeViewColumn *col; + + show_range = GTK_CHECK_MENU_ITEM(menuitem)->active; + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_NO); + if (col) + gtk_tree_view_column_set_visible(col, show_range); + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_MOD); + if (col) + gtk_tree_view_column_set_visible(col, show_range); + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_YES); + if (col) + gtk_tree_view_column_set_visible(col, show_range); + +} + + +void on_show_data1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkTreeViewColumn *col; + + show_value = GTK_CHECK_MENU_ITEM(menuitem)->active; + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_VALUE); + if (col) + gtk_tree_view_column_set_visible(col, show_value); +} + + +void +on_set_option_mode1_activate(GtkMenuItem *menuitem, gpointer user_data) +{ + opt_mode = OPT_NORMAL; + gtk_tree_store_clear(tree2); + display_tree(&rootmenu); /* instead of update_tree to speed-up */ +} + + +void +on_set_option_mode2_activate(GtkMenuItem *menuitem, gpointer user_data) +{ + opt_mode = OPT_ALL; + gtk_tree_store_clear(tree2); + display_tree(&rootmenu); /* instead of update_tree to speed-up */ +} + + +void +on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data) +{ + opt_mode = OPT_PROMPT; + gtk_tree_store_clear(tree2); + display_tree(&rootmenu); /* instead of update_tree to speed-up */ +} + + +void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *dialog; + const gchar *intro_text = _( + "Welcome to gkc, the GTK+ graphical configuration tool\n" + "For each option, a blank box indicates the feature is disabled, a\n" + "check indicates it is enabled, and a dot indicates that it is to\n" + "be compiled as a module. Clicking on the box will cycle through the three states.\n" + "\n" + "If you do not see an option (e.g., a device driver) that you\n" + "believe should be present, try turning on Show All Options\n" + "under the Options menu.\n" + "Although there is no cross reference yet to help you figure out\n" + "what other options must be enabled to support the option you\n" + "are interested in, you can still view the help of a grayed-out\n" + "option.\n" + "\n" + "Toggling Show Debug Info under the Options menu will show \n" + "the dependencies, which you can then match by examining other options."); + + dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, "%s", intro_text); + g_signal_connect_swapped(GTK_OBJECT(dialog), "response", + G_CALLBACK(gtk_widget_destroy), + GTK_OBJECT(dialog)); + gtk_widget_show_all(dialog); +} + + +void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *dialog; + const gchar *about_text = + _("gkc is copyright (c) 2002 Romain Lievin .\n" + "Based on the source code from Roman Zippel.\n"); + + dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, "%s", about_text); + g_signal_connect_swapped(GTK_OBJECT(dialog), "response", + G_CALLBACK(gtk_widget_destroy), + GTK_OBJECT(dialog)); + gtk_widget_show_all(dialog); +} + + +void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *dialog; + const gchar *license_text = + _("gkc is released under the terms of the GNU GPL v2.\n" + "For more information, please see the source code or\n" + "visit http://www.fsf.org/licenses/licenses.html\n"); + + dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, "%s", license_text); + g_signal_connect_swapped(GTK_OBJECT(dialog), "response", + G_CALLBACK(gtk_widget_destroy), + GTK_OBJECT(dialog)); + gtk_widget_show_all(dialog); +} + + +void on_back_clicked(GtkButton * button, gpointer user_data) +{ + enum prop_type ptype; + + current = current->parent; + ptype = current->prompt ? current->prompt->type : P_UNKNOWN; + if (ptype != P_MENU) + current = current->parent; + display_tree_part(); + + if (current == &rootmenu) + gtk_widget_set_sensitive(back_btn, FALSE); +} + + +void on_load_clicked(GtkButton * button, gpointer user_data) +{ + on_load1_activate(NULL, user_data); +} + + +void on_single_clicked(GtkButton * button, gpointer user_data) +{ + view_mode = SINGLE_VIEW; + gtk_widget_hide(tree1_w); + current = &rootmenu; + display_tree_part(); +} + + +void on_split_clicked(GtkButton * button, gpointer user_data) +{ + gint w, h; + view_mode = SPLIT_VIEW; + gtk_widget_show(tree1_w); + gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h); + gtk_paned_set_position(GTK_PANED(hpaned), w / 2); + if (tree2) + gtk_tree_store_clear(tree2); + display_list(); + + /* Disable back btn, like in full mode. */ + gtk_widget_set_sensitive(back_btn, FALSE); +} + + +void on_full_clicked(GtkButton * button, gpointer user_data) +{ + view_mode = FULL_VIEW; + gtk_widget_hide(tree1_w); + if (tree2) + gtk_tree_store_clear(tree2); + display_tree(&rootmenu); + gtk_widget_set_sensitive(back_btn, FALSE); +} + + +void on_collapse_clicked(GtkButton * button, gpointer user_data) +{ + gtk_tree_view_collapse_all(GTK_TREE_VIEW(tree2_w)); +} + + +void on_expand_clicked(GtkButton * button, gpointer user_data) +{ + gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w)); +} + + +/* CTree Callbacks */ + +/* Change hex/int/string value in the cell */ +static void renderer_edited(GtkCellRendererText * cell, + const gchar * path_string, + const gchar * new_text, gpointer user_data) +{ + GtkTreePath *path = gtk_tree_path_new_from_string(path_string); + GtkTreeIter iter; + const char *old_def, *new_def; + struct menu *menu; + struct symbol *sym; + + if (!gtk_tree_model_get_iter(model2, &iter, path)) + return; + + gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); + sym = menu->sym; + + gtk_tree_model_get(model2, &iter, COL_VALUE, &old_def, -1); + new_def = new_text; + + sym_set_string_value(sym, new_def); + + update_tree(&rootmenu, NULL); + + gtk_tree_path_free(path); +} + +/* Change the value of a symbol and update the tree */ +static void change_sym_value(struct menu *menu, gint col) +{ + struct symbol *sym = menu->sym; + tristate newval; + + if (!sym) + return; + + if (col == COL_NO) + newval = no; + else if (col == COL_MOD) + newval = mod; + else if (col == COL_YES) + newval = yes; + else + return; + + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: + if (!sym_tristate_within_range(sym, newval)) + newval = yes; + sym_set_tristate_value(sym, newval); + if (view_mode == FULL_VIEW) + update_tree(&rootmenu, NULL); + else if (view_mode == SPLIT_VIEW) { + update_tree(browsed, NULL); + display_list(); + } + else if (view_mode == SINGLE_VIEW) + display_tree_part(); //fixme: keep exp/coll + break; + case S_INT: + case S_HEX: + case S_STRING: + default: + break; + } +} + +static void toggle_sym_value(struct menu *menu) +{ + if (!menu->sym) + return; + + sym_toggle_tristate_value(menu->sym); + if (view_mode == FULL_VIEW) + update_tree(&rootmenu, NULL); + else if (view_mode == SPLIT_VIEW) { + update_tree(browsed, NULL); + display_list(); + } + else if (view_mode == SINGLE_VIEW) + display_tree_part(); //fixme: keep exp/coll +} + +static gint column2index(GtkTreeViewColumn * column) +{ + gint i; + + for (i = 0; i < COL_NUMBER; i++) { + GtkTreeViewColumn *col; + + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), i); + if (col == column) + return i; + } + + return -1; +} + + +/* User click: update choice (full) or goes down (single) */ +gboolean +on_treeview2_button_press_event(GtkWidget * widget, + GdkEventButton * event, gpointer user_data) +{ + GtkTreeView *view = GTK_TREE_VIEW(widget); + GtkTreePath *path; + GtkTreeViewColumn *column; + GtkTreeIter iter; + struct menu *menu; + gint col; + +#if GTK_CHECK_VERSION(2,1,4) // bug in ctree with earlier version of GTK + gint tx = (gint) event->x; + gint ty = (gint) event->y; + gint cx, cy; + + gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, + &cy); +#else + gtk_tree_view_get_cursor(view, &path, &column); +#endif + if (path == NULL) + return FALSE; + + if (!gtk_tree_model_get_iter(model2, &iter, path)) + return FALSE; + gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); + + col = column2index(column); + if (event->type == GDK_2BUTTON_PRESS) { + enum prop_type ptype; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + + if (ptype == P_MENU && view_mode != FULL_VIEW && col == COL_OPTION) { + // goes down into menu + current = menu; + display_tree_part(); + gtk_widget_set_sensitive(back_btn, TRUE); + } else if (col == COL_OPTION) { + toggle_sym_value(menu); + gtk_tree_view_expand_row(view, path, TRUE); + } + } else { + if (col == COL_VALUE) { + toggle_sym_value(menu); + gtk_tree_view_expand_row(view, path, TRUE); + } else if (col == COL_NO || col == COL_MOD + || col == COL_YES) { + change_sym_value(menu, col); + gtk_tree_view_expand_row(view, path, TRUE); + } + } + + return FALSE; +} + +/* Key pressed: update choice */ +gboolean +on_treeview2_key_press_event(GtkWidget * widget, + GdkEventKey * event, gpointer user_data) +{ + GtkTreeView *view = GTK_TREE_VIEW(widget); + GtkTreePath *path; + GtkTreeViewColumn *column; + GtkTreeIter iter; + struct menu *menu; + gint col; + + gtk_tree_view_get_cursor(view, &path, &column); + if (path == NULL) + return FALSE; + + if (event->keyval == GDK_space) { + if (gtk_tree_view_row_expanded(view, path)) + gtk_tree_view_collapse_row(view, path); + else + gtk_tree_view_expand_row(view, path, FALSE); + return TRUE; + } + if (event->keyval == GDK_KP_Enter) { + } + if (widget == tree1_w) + return FALSE; + + gtk_tree_model_get_iter(model2, &iter, path); + gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); + + if (!strcasecmp(event->string, "n")) + col = COL_NO; + else if (!strcasecmp(event->string, "m")) + col = COL_MOD; + else if (!strcasecmp(event->string, "y")) + col = COL_YES; + else + col = -1; + change_sym_value(menu, col); + + return FALSE; +} + + +/* Row selection changed: update help */ +void +on_treeview2_cursor_changed(GtkTreeView * treeview, gpointer user_data) +{ + GtkTreeSelection *selection; + GtkTreeIter iter; + struct menu *menu; + + selection = gtk_tree_view_get_selection(treeview); + if (gtk_tree_selection_get_selected(selection, &model2, &iter)) { + gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); + text_insert_help(menu); + } +} + + +/* User click: display sub-tree in the right frame. */ +gboolean +on_treeview1_button_press_event(GtkWidget * widget, + GdkEventButton * event, gpointer user_data) +{ + GtkTreeView *view = GTK_TREE_VIEW(widget); + GtkTreePath *path; + GtkTreeViewColumn *column; + GtkTreeIter iter; + struct menu *menu; + + gint tx = (gint) event->x; + gint ty = (gint) event->y; + gint cx, cy; + + gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, + &cy); + if (path == NULL) + return FALSE; + + gtk_tree_model_get_iter(model1, &iter, path); + gtk_tree_model_get(model1, &iter, COL_MENU, &menu, -1); + + if (event->type == GDK_2BUTTON_PRESS) { + toggle_sym_value(menu); + current = menu; + display_tree_part(); + } else { + browsed = menu; + display_tree_part(); + } + + gtk_widget_realize(tree2_w); + gtk_tree_view_set_cursor(view, path, NULL, FALSE); + gtk_widget_grab_focus(tree2_w); + + return FALSE; +} + + +/* Fill a row of strings */ +static gchar **fill_row(struct menu *menu) +{ + static gchar *row[COL_NUMBER]; + struct symbol *sym = menu->sym; + const char *def; + int stype; + tristate val; + enum prop_type ptype; + int i; + + for (i = COL_OPTION; i <= COL_COLOR; i++) + g_free(row[i]); + bzero(row, sizeof(row)); + + row[COL_OPTION] = + g_strdup_printf("%s %s", _(menu_get_prompt(menu)), + sym && !sym_has_value(sym) ? "(NEW)" : ""); + + if (opt_mode == OPT_ALL && !menu_is_visible(menu)) + row[COL_COLOR] = g_strdup("DarkGray"); + else if (opt_mode == OPT_PROMPT && + menu_has_prompt(menu) && !menu_is_visible(menu)) + row[COL_COLOR] = g_strdup("DarkGray"); + else + row[COL_COLOR] = g_strdup("Black"); + + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + switch (ptype) { + case P_MENU: + row[COL_PIXBUF] = (gchar *) xpm_menu; + if (view_mode == SINGLE_VIEW) + row[COL_PIXVIS] = GINT_TO_POINTER(TRUE); + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); + break; + case P_COMMENT: + row[COL_PIXBUF] = (gchar *) xpm_void; + row[COL_PIXVIS] = GINT_TO_POINTER(FALSE); + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); + break; + default: + row[COL_PIXBUF] = (gchar *) xpm_void; + row[COL_PIXVIS] = GINT_TO_POINTER(FALSE); + row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); + break; + } + + if (!sym) + return row; + row[COL_NAME] = g_strdup(sym->name); + + sym_calc_value(sym); + sym->flags &= ~SYMBOL_CHANGED; + + if (sym_is_choice(sym)) { // parse childs for getting final value + struct menu *child; + struct symbol *def_sym = sym_get_choice_value(sym); + struct menu *def_menu = NULL; + + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); + + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child) + && child->sym == def_sym) + def_menu = child; + } + + if (def_menu) + row[COL_VALUE] = + g_strdup(_(menu_get_prompt(def_menu))); + } + if (sym->flags & SYMBOL_CHOICEVAL) + row[COL_BTNRAD] = GINT_TO_POINTER(TRUE); + + stype = sym_get_type(sym); + switch (stype) { + case S_BOOLEAN: + if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE) + row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); + if (sym_is_choice(sym)) + break; + /* fall through */ + case S_TRISTATE: + val = sym_get_tristate_value(sym); + switch (val) { + case no: + row[COL_NO] = g_strdup("N"); + row[COL_VALUE] = g_strdup("N"); + row[COL_BTNACT] = GINT_TO_POINTER(FALSE); + row[COL_BTNINC] = GINT_TO_POINTER(FALSE); + break; + case mod: + row[COL_MOD] = g_strdup("M"); + row[COL_VALUE] = g_strdup("M"); + row[COL_BTNINC] = GINT_TO_POINTER(TRUE); + break; + case yes: + row[COL_YES] = g_strdup("Y"); + row[COL_VALUE] = g_strdup("Y"); + row[COL_BTNACT] = GINT_TO_POINTER(TRUE); + row[COL_BTNINC] = GINT_TO_POINTER(FALSE); + break; + } + + if (val != no && sym_tristate_within_range(sym, no)) + row[COL_NO] = g_strdup("_"); + if (val != mod && sym_tristate_within_range(sym, mod)) + row[COL_MOD] = g_strdup("_"); + if (val != yes && sym_tristate_within_range(sym, yes)) + row[COL_YES] = g_strdup("_"); + break; + case S_INT: + case S_HEX: + case S_STRING: + def = sym_get_string_value(sym); + row[COL_VALUE] = g_strdup(def); + row[COL_EDIT] = GINT_TO_POINTER(TRUE); + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); + break; + } + + return row; +} + + +/* Set the node content with a row of strings */ +static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row) +{ + GdkColor color; + gboolean success; + GdkPixbuf *pix; + + pix = gdk_pixbuf_new_from_xpm_data((const char **) + row[COL_PIXBUF]); + + gdk_color_parse(row[COL_COLOR], &color); + gdk_colormap_alloc_colors(gdk_colormap_get_system(), &color, 1, + FALSE, FALSE, &success); + + gtk_tree_store_set(tree, node, + COL_OPTION, row[COL_OPTION], + COL_NAME, row[COL_NAME], + COL_NO, row[COL_NO], + COL_MOD, row[COL_MOD], + COL_YES, row[COL_YES], + COL_VALUE, row[COL_VALUE], + COL_MENU, (gpointer) menu, + COL_COLOR, &color, + COL_EDIT, GPOINTER_TO_INT(row[COL_EDIT]), + COL_PIXBUF, pix, + COL_PIXVIS, GPOINTER_TO_INT(row[COL_PIXVIS]), + COL_BTNVIS, GPOINTER_TO_INT(row[COL_BTNVIS]), + COL_BTNACT, GPOINTER_TO_INT(row[COL_BTNACT]), + COL_BTNINC, GPOINTER_TO_INT(row[COL_BTNINC]), + COL_BTNRAD, GPOINTER_TO_INT(row[COL_BTNRAD]), + -1); + + g_object_unref(pix); +} + + +/* Add a node to the tree */ +static void place_node(struct menu *menu, char **row) +{ + GtkTreeIter *parent = parents[indent - 1]; + GtkTreeIter *node = parents[indent]; + + gtk_tree_store_append(tree, node, parent); + set_node(node, menu, row); +} + + +/* Find a node in the GTK+ tree */ +static GtkTreeIter found; + +/* + * Find a menu in the GtkTree starting at parent. + */ +GtkTreeIter *gtktree_iter_find_node(GtkTreeIter * parent, + struct menu *tofind) +{ + GtkTreeIter iter; + GtkTreeIter *child = &iter; + gboolean valid; + GtkTreeIter *ret; + + valid = gtk_tree_model_iter_children(model2, child, parent); + while (valid) { + struct menu *menu; + + gtk_tree_model_get(model2, child, 6, &menu, -1); + + if (menu == tofind) { + memcpy(&found, child, sizeof(GtkTreeIter)); + return &found; + } + + ret = gtktree_iter_find_node(child, tofind); + if (ret) + return ret; + + valid = gtk_tree_model_iter_next(model2, child); + } + + return NULL; +} + + +/* + * Update the tree by adding/removing entries + * Does not change other nodes + */ +static void update_tree(struct menu *src, GtkTreeIter * dst) +{ + struct menu *child1; + GtkTreeIter iter, tmp; + GtkTreeIter *child2 = &iter; + gboolean valid; + GtkTreeIter *sibling; + struct symbol *sym; + struct menu *menu1, *menu2; + + if (src == &rootmenu) + indent = 1; + + valid = gtk_tree_model_iter_children(model2, child2, dst); + for (child1 = src->list; child1; child1 = child1->next) { + + sym = child1->sym; + + reparse: + menu1 = child1; + if (valid) + gtk_tree_model_get(model2, child2, COL_MENU, + &menu2, -1); + else + menu2 = NULL; // force adding of a first child + +#ifdef DEBUG + printf("%*c%s | %s\n", indent, ' ', + menu1 ? menu_get_prompt(menu1) : "nil", + menu2 ? menu_get_prompt(menu2) : "nil"); +#endif + + if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) || + (opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) || + (opt_mode == OPT_ALL && !menu_get_prompt(child1))) { + + /* remove node */ + if (gtktree_iter_find_node(dst, menu1) != NULL) { + memcpy(&tmp, child2, sizeof(GtkTreeIter)); + valid = gtk_tree_model_iter_next(model2, + child2); + gtk_tree_store_remove(tree2, &tmp); + if (!valid) + return; /* next parent */ + else + goto reparse; /* next child */ + } else + continue; + } + + if (menu1 != menu2) { + if (gtktree_iter_find_node(dst, menu1) == NULL) { // add node + if (!valid && !menu2) + sibling = NULL; + else + sibling = child2; + gtk_tree_store_insert_before(tree2, + child2, + dst, sibling); + set_node(child2, menu1, fill_row(menu1)); + if (menu2 == NULL) + valid = TRUE; + } else { // remove node + memcpy(&tmp, child2, sizeof(GtkTreeIter)); + valid = gtk_tree_model_iter_next(model2, + child2); + gtk_tree_store_remove(tree2, &tmp); + if (!valid) + return; // next parent + else + goto reparse; // next child + } + } else if (sym && (sym->flags & SYMBOL_CHANGED)) { + set_node(child2, menu1, fill_row(menu1)); + } + + indent++; + update_tree(child1, child2); + indent--; + + valid = gtk_tree_model_iter_next(model2, child2); + } +} + + +/* Display the whole tree (single/split/full view) */ +static void display_tree(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + enum prop_type ptype; + + if (menu == &rootmenu) { + indent = 1; + current = &rootmenu; + } + + for (child = menu->list; child; child = child->next) { + prop = child->prompt; + sym = child->sym; + ptype = prop ? prop->type : P_UNKNOWN; + + if (sym) + sym->flags &= ~SYMBOL_CHANGED; + + if ((view_mode == SPLIT_VIEW) + && !(child->flags & MENU_ROOT) && (tree == tree1)) + continue; + + if ((view_mode == SPLIT_VIEW) && (child->flags & MENU_ROOT) + && (tree == tree2)) + continue; + + if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) || + (opt_mode == OPT_PROMPT && menu_has_prompt(child)) || + (opt_mode == OPT_ALL && menu_get_prompt(child))) + place_node(child, fill_row(child)); +#ifdef DEBUG + printf("%*c%s: ", indent, ' ', menu_get_prompt(child)); + printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : ""); + printf("%s", prop_get_type_name(ptype)); + printf(" | "); + if (sym) { + printf("%s", sym_type_name(sym->type)); + printf(" | "); + printf("%s", dbg_sym_flags(sym->flags)); + printf("\n"); + } else + printf("\n"); +#endif + if ((view_mode != FULL_VIEW) && (ptype == P_MENU) + && (tree == tree2)) + continue; +/* + if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) + || (view_mode == FULL_VIEW) + || (view_mode == SPLIT_VIEW))*/ + + /* Change paned position if the view is not in 'split mode' */ + if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) { + gtk_paned_set_position(GTK_PANED(hpaned), 0); + } + + if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) + || (view_mode == FULL_VIEW) + || (view_mode == SPLIT_VIEW)) { + indent++; + display_tree(child); + indent--; + } + } +} + +/* Display a part of the tree starting at current node (single/split view) */ +static void display_tree_part(void) +{ + if (tree2) + gtk_tree_store_clear(tree2); + if (view_mode == SINGLE_VIEW) + display_tree(current); + else if (view_mode == SPLIT_VIEW) + display_tree(browsed); + gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w)); +} + +/* Display the list in the left frame (split view) */ +static void display_list(void) +{ + if (tree1) + gtk_tree_store_clear(tree1); + + tree = tree1; + display_tree(&rootmenu); + gtk_tree_view_expand_all(GTK_TREE_VIEW(tree1_w)); + tree = tree2; +} + +void fixup_rootmenu(struct menu *menu) +{ + struct menu *child; + static int menu_cnt = 0; + + menu->flags |= MENU_ROOT; + for (child = menu->list; child; child = child->next) { + if (child->prompt && child->prompt->type == P_MENU) { + menu_cnt++; + fixup_rootmenu(child); + menu_cnt--; + } else if (!menu_cnt) + fixup_rootmenu(child); + } +} + + +/* Main */ +int main(int ac, char *av[]) +{ + const char *name; + char *env; + gchar *glade_file; + + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + textdomain(PACKAGE); + + /* GTK stuffs */ + gtk_set_locale(); + gtk_init(&ac, &av); + glade_init(); + + //add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps"); + //add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps"); + + /* Determine GUI path */ + env = getenv(SRCTREE); + if (env) + glade_file = g_strconcat(env, "/support/kconfig/gconf.glade", NULL); + else if (av[0][0] == '/') + glade_file = g_strconcat(av[0], ".glade", NULL); + else + glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL); + + /* Conf stuffs */ + if (ac > 1 && av[1][0] == '-') { + switch (av[1][1]) { + case 'a': + //showAll = 1; + break; + case 's': + conf_set_message_callback(NULL); + break; + case 'h': + case '?': + printf("%s [-s] \n", av[0]); + exit(0); + } + name = av[2]; + } else + name = av[1]; + + conf_parse(name); + fixup_rootmenu(&rootmenu); + conf_read(NULL); + + /* Load the interface and connect signals */ + init_main_window(glade_file); + init_tree_model(); + init_left_tree(); + init_right_tree(); + + switch (view_mode) { + case SINGLE_VIEW: + display_tree_part(); + break; + case SPLIT_VIEW: + display_list(); + break; + case FULL_VIEW: + display_tree(&rootmenu); + break; + } + + gtk_main(); + + return 0; +} + +static void conf_changed(void) +{ + bool changed = conf_get_changed(); + gtk_widget_set_sensitive(save_btn, changed); + gtk_widget_set_sensitive(save_menu_item, changed); +} diff --git a/support/kconfig/gconf.glade b/support/kconfig/gconf.glade new file mode 100644 index 00000000..6cbc1bb4 --- /dev/null +++ b/support/kconfig/gconf.glade @@ -0,0 +1,661 @@ + + + + + + True + Gtk Buildroot Configurator + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 640 + 480 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + + + True + False + 0 + + + + True + + + + True + _File + True + + + + + + + True + Load a config file + _Load + True + + + + + + True + gtk-open + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Save the config in .config + _Save + True + + + + + + True + gtk-save + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Save the config in a file + Save _as + True + + + + + True + gtk-save-as + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + + + + + + True + _Quit + True + + + + + + True + gtk-quit + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + + True + _Options + True + + + + + + + True + Show name + Show _name + True + False + + + + + + + True + Show range (Y/M/N) + Show _range + True + False + + + + + + + True + Show value of the option + Show _data + True + False + + + + + + + True + + + + + + True + Show normal options + Show normal options + True + True + + + + + + + True + Show all options + Show all _options + True + False + set_option_mode1 + + + + + + + True + Show all options with prompts + Show all prompt options + True + False + set_option_mode1 + + + + + + + + + + + + True + _Help + True + + + + + + + True + _Introduction + True + + + + + + True + gtk-dialog-question + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + _About + True + + + + + + True + gtk-properties + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + _License + True + + + + + True + gtk-justify-fill + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + 0 + False + False + + + + + + True + GTK_SHADOW_OUT + GTK_POS_LEFT + GTK_POS_TOP + + + + True + GTK_ORIENTATION_HORIZONTAL + GTK_TOOLBAR_BOTH + True + True + + + + True + Goes up of one level (single view) + Back + True + gtk-undo + True + True + False + + + + False + True + + + + + + True + True + True + False + + + + True + + + + + False + False + + + + + + True + Load a config file + Load + True + gtk-open + True + True + False + + + + False + True + + + + + + True + Save a config file + Save + True + gtk-save + True + True + False + + + + False + True + + + + + + True + True + True + False + + + + True + + + + + False + False + + + + + + True + Single view + Single + True + gtk-missing-image + True + True + False + + + + False + True + + + + + + True + Split view + Split + True + gtk-missing-image + True + True + False + + + + False + True + + + + + + True + Full view + Full + True + gtk-missing-image + True + True + False + + + + False + True + + + + + + True + True + True + False + + + + True + + + + + False + False + + + + + + True + Collapse the whole tree in the right frame + Collapse + True + gtk-remove + True + True + False + + + + False + True + + + + + + True + Expand the whole tree in the right frame + Expand + True + gtk-add + True + True + False + + + + False + True + + + + + + + 0 + False + False + + + + + + 1 + True + True + 0 + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + False + + + + + + + + True + False + + + + + + True + True + 0 + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + True + False + False + False + + + + + + + + True + False + + + + + + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + False + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True + 0 + 0 + 0 + 0 + 0 + 0 + Sorry, no help available for this option yet. + + + + + True + True + + + + + True + True + + + + + 0 + True + True + + + + + + + diff --git a/support/kconfig/images.c b/support/kconfig/images.c new file mode 100644 index 00000000..d4f84bd4 --- /dev/null +++ b/support/kconfig/images.c @@ -0,0 +1,326 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +static const char *xpm_load[] = { +"22 22 5 1", +". c None", +"# c #000000", +"c c #838100", +"a c #ffff00", +"b c #ffffff", +"......................", +"......................", +"......................", +"............####....#.", +"...........#....##.##.", +"..................###.", +".................####.", +".####...........#####.", +"#abab##########.......", +"#babababababab#.......", +"#ababababababa#.......", +"#babababababab#.......", +"#ababab###############", +"#babab##cccccccccccc##", +"#abab##cccccccccccc##.", +"#bab##cccccccccccc##..", +"#ab##cccccccccccc##...", +"#b##cccccccccccc##....", +"###cccccccccccc##.....", +"##cccccccccccc##......", +"###############.......", +"......................"}; + +static const char *xpm_save[] = { +"22 22 5 1", +". c None", +"# c #000000", +"a c #838100", +"b c #c5c2c5", +"c c #cdb6d5", +"......................", +".####################.", +".#aa#bbbbbbbbbbbb#bb#.", +".#aa#bbbbbbbbbbbb#bb#.", +".#aa#bbbbbbbbbcbb####.", +".#aa#bbbccbbbbbbb#aa#.", +".#aa#bbbccbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aaa############aaa#.", +".#aaaaaaaaaaaaaaaaaa#.", +".#aaaaaaaaaaaaaaaaaa#.", +".#aaa#############aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +"..##################..", +"......................"}; + +static const char *xpm_back[] = { +"22 22 3 1", +". c None", +"# c #000083", +"a c #838183", +"......................", +"......................", +"......................", +"......................", +"......................", +"...........######a....", +"..#......##########...", +"..##...####......##a..", +"..###.###.........##..", +"..######..........##..", +"..#####...........##..", +"..######..........##..", +"..#######.........##..", +"..########.......##a..", +"...............a###...", +"...............###....", +"......................", +"......................", +"......................", +"......................", +"......................", +"......................"}; + +static const char *xpm_tree_view[] = { +"22 22 2 1", +". c None", +"# c #000000", +"......................", +"......................", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......########........", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......########........", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......########........", +"......................", +"......................"}; + +static const char *xpm_single_view[] = { +"22 22 2 1", +". c None", +"# c #000000", +"......................", +"......................", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"......................", +"......................"}; + +static const char *xpm_split_view[] = { +"22 22 2 1", +". c None", +"# c #000000", +"......................", +"......................", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......................", +"......................"}; + +static const char *xpm_symbol_no[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_symbol_mod[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . . ", +" . .. . ", +" . .... . ", +" . .... . ", +" . .. . ", +" . . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_symbol_yes[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . . ", +" . . . ", +" . .. . ", +" . . .. . ", +" . .... . ", +" . .. . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_choice_no[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .... ", +" .. .. ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" .. .. ", +" .... ", +" "}; + +static const char *xpm_choice_yes[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .... ", +" .. .. ", +" . . ", +" . .. . ", +" . .... . ", +" . .... . ", +" . .. . ", +" . . ", +" .. .. ", +" .... ", +" "}; + +static const char *xpm_menu[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . .. . ", +" . .... . ", +" . ...... . ", +" . ...... . ", +" . .... . ", +" . .. . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_menu_inv[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" .......... ", +" .. ...... ", +" .. .... ", +" .. .. ", +" .. .. ", +" .. .... ", +" .. ...... ", +" .......... ", +" .......... ", +" "}; + +static const char *xpm_menuback[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . .. . ", +" . .... . ", +" . ...... . ", +" . ...... . ", +" . .... . ", +" . .. . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_void[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/support/kconfig/kconf_id.c b/support/kconfig/kconf_id.c new file mode 100644 index 00000000..3ea9c5f9 --- /dev/null +++ b/support/kconfig/kconf_id.c @@ -0,0 +1,53 @@ + +static struct kconf_id kconf_id_array[] = { + { "mainmenu", T_MAINMENU, TF_COMMAND }, + { "menu", T_MENU, TF_COMMAND }, + { "endmenu", T_ENDMENU, TF_COMMAND }, + { "source", T_SOURCE, TF_COMMAND }, + { "choice", T_CHOICE, TF_COMMAND }, + { "endchoice", T_ENDCHOICE, TF_COMMAND }, + { "comment", T_COMMENT, TF_COMMAND }, + { "config", T_CONFIG, TF_COMMAND }, + { "menuconfig", T_MENUCONFIG, TF_COMMAND }, + { "help", T_HELP, TF_COMMAND }, + { "---help---", T_HELP, TF_COMMAND }, + { "if", T_IF, TF_COMMAND|TF_PARAM }, + { "endif", T_ENDIF, TF_COMMAND }, + { "depends", T_DEPENDS, TF_COMMAND }, + { "optional", T_OPTIONAL, TF_COMMAND }, + { "default", T_DEFAULT, TF_COMMAND, S_UNKNOWN }, + { "prompt", T_PROMPT, TF_COMMAND }, + { "tristate", T_TYPE, TF_COMMAND, S_TRISTATE }, + { "def_tristate", T_DEFAULT, TF_COMMAND, S_TRISTATE }, + { "bool", T_TYPE, TF_COMMAND, S_BOOLEAN }, + { "def_bool", T_DEFAULT, TF_COMMAND, S_BOOLEAN }, + { "int", T_TYPE, TF_COMMAND, S_INT }, + { "hex", T_TYPE, TF_COMMAND, S_HEX }, + { "string", T_TYPE, TF_COMMAND, S_STRING }, + { "select", T_SELECT, TF_COMMAND }, + { "imply", T_IMPLY, TF_COMMAND }, + { "range", T_RANGE, TF_COMMAND }, + { "visible", T_VISIBLE, TF_COMMAND }, + { "option", T_OPTION, TF_COMMAND }, + { "on", T_ON, TF_PARAM }, + { "modules", T_OPT_MODULES, TF_OPTION }, + { "defconfig_list", T_OPT_DEFCONFIG_LIST, TF_OPTION }, + { "env", T_OPT_ENV, TF_OPTION }, + { "allnoconfig_y", T_OPT_ALLNOCONFIG_Y, TF_OPTION }, +}; + +#define KCONF_ID_ARRAY_SIZE (sizeof(kconf_id_array)/sizeof(struct kconf_id)) + +static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len) +{ + int i; + + for (i = 0; i < KCONF_ID_ARRAY_SIZE; i++) { + struct kconf_id *id = kconf_id_array+i; + int l = strlen(id->name); + + if (len == l && !memcmp(str, id->name, len)) + return id; + } + return NULL; +} diff --git a/support/kconfig/kxgettext.c b/support/kconfig/kxgettext.c new file mode 100644 index 00000000..240880a8 --- /dev/null +++ b/support/kconfig/kxgettext.c @@ -0,0 +1,235 @@ +/* + * Arnaldo Carvalho de Melo , 2005 + * + * Released under the terms of the GNU GPL v2.0 + */ + +#include +#include + +#include "lkc.h" + +static char *escape(const char* text, char *bf, int len) +{ + char *bfp = bf; + int multiline = strchr(text, '\n') != NULL; + int eol = 0; + int textlen = strlen(text); + + if ((textlen > 0) && (text[textlen-1] == '\n')) + eol = 1; + + *bfp++ = '"'; + --len; + + if (multiline) { + *bfp++ = '"'; + *bfp++ = '\n'; + *bfp++ = '"'; + len -= 3; + } + + while (*text != '\0' && len > 1) { + if (*text == '"') + *bfp++ = '\\'; + else if (*text == '\n') { + *bfp++ = '\\'; + *bfp++ = 'n'; + *bfp++ = '"'; + *bfp++ = '\n'; + *bfp++ = '"'; + len -= 5; + ++text; + goto next; + } + else if (*text == '\\') { + *bfp++ = '\\'; + len--; + } + *bfp++ = *text++; +next: + --len; + } + + if (multiline && eol) + bfp -= 3; + + *bfp++ = '"'; + *bfp = '\0'; + + return bf; +} + +struct file_line { + struct file_line *next; + const char *file; + int lineno; +}; + +static struct file_line *file_line__new(const char *file, int lineno) +{ + struct file_line *self = malloc(sizeof(*self)); + + if (self == NULL) + goto out; + + self->file = file; + self->lineno = lineno; + self->next = NULL; +out: + return self; +} + +struct message { + const char *msg; + const char *option; + struct message *next; + struct file_line *files; +}; + +static struct message *message__list; + +static struct message *message__new(const char *msg, char *option, + const char *file, int lineno) +{ + struct message *self = malloc(sizeof(*self)); + + if (self == NULL) + goto out; + + self->files = file_line__new(file, lineno); + if (self->files == NULL) + goto out_fail; + + self->msg = xstrdup(msg); + if (self->msg == NULL) + goto out_fail_msg; + + self->option = option; + self->next = NULL; +out: + return self; +out_fail_msg: + free(self->files); +out_fail: + free(self); + self = NULL; + goto out; +} + +static struct message *mesage__find(const char *msg) +{ + struct message *m = message__list; + + while (m != NULL) { + if (strcmp(m->msg, msg) == 0) + break; + m = m->next; + } + + return m; +} + +static int message__add_file_line(struct message *self, const char *file, + int lineno) +{ + int rc = -1; + struct file_line *fl = file_line__new(file, lineno); + + if (fl == NULL) + goto out; + + fl->next = self->files; + self->files = fl; + rc = 0; +out: + return rc; +} + +static int message__add(const char *msg, char *option, const char *file, + int lineno) +{ + int rc = 0; + char bf[16384]; + char *escaped = escape(msg, bf, sizeof(bf)); + struct message *m = mesage__find(escaped); + + if (m != NULL) + rc = message__add_file_line(m, file, lineno); + else { + m = message__new(escaped, option, file, lineno); + + if (m != NULL) { + m->next = message__list; + message__list = m; + } else + rc = -1; + } + return rc; +} + +static void menu_build_message_list(struct menu *menu) +{ + struct menu *child; + + message__add(menu_get_prompt(menu), NULL, + menu->file == NULL ? "Root Menu" : menu->file->name, + menu->lineno); + + if (menu->sym != NULL && menu_has_help(menu)) + message__add(menu_get_help(menu), menu->sym->name, + menu->file == NULL ? "Root Menu" : menu->file->name, + menu->lineno); + + for (child = menu->list; child != NULL; child = child->next) + if (child->prompt != NULL) + menu_build_message_list(child); +} + +static void message__print_file_lineno(struct message *self) +{ + struct file_line *fl = self->files; + + putchar('\n'); + if (self->option != NULL) + printf("# %s:00000\n", self->option); + + printf("#: %s:%d", fl->file, fl->lineno); + fl = fl->next; + + while (fl != NULL) { + printf(", %s:%d", fl->file, fl->lineno); + fl = fl->next; + } + + putchar('\n'); +} + +static void message__print_gettext_msgid_msgstr(struct message *self) +{ + message__print_file_lineno(self); + + printf("msgid %s\n" + "msgstr \"\"\n", self->msg); +} + +static void menu__xgettext(void) +{ + struct message *m = message__list; + + while (m != NULL) { + /* skip empty lines ("") */ + if (strlen(m->msg) > sizeof("\"\"")) + message__print_gettext_msgid_msgstr(m); + m = m->next; + } +} + +int main(int ac, char **av) +{ + conf_parse(av[1]); + + menu_build_message_list(menu_get_root_menu(NULL)); + menu__xgettext(); + return 0; +} diff --git a/support/kconfig/list.h b/support/kconfig/list.h new file mode 100644 index 00000000..45cb237a --- /dev/null +++ b/support/kconfig/list.h @@ -0,0 +1,132 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef LIST_H +#define LIST_H + +/* + * Copied from include/linux/... + */ + +#undef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +/** + * container_of - cast a member of a structure out to the containing structure + * @ptr: the pointer to the member. + * @type: the type of the container struct this is embedded in. + * @member: the name of the member within the struct. + * + */ +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + + +struct list_head { + struct list_head *next, *prev; +}; + + +#define LIST_HEAD_INIT(name) { &(name), &(name) } + +#define LIST_HEAD(name) \ + struct list_head name = LIST_HEAD_INIT(name) + +/** + * list_entry - get the struct for this entry + * @ptr: the &struct list_head pointer. + * @type: the type of the struct this is embedded in. + * @member: the name of the list_head within the struct. + */ +#define list_entry(ptr, type, member) \ + container_of(ptr, type, member) + +/** + * list_for_each_entry - iterate over list of given type + * @pos: the type * to use as a loop cursor. + * @head: the head for your list. + * @member: the name of the list_head within the struct. + */ +#define list_for_each_entry(pos, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member)) + +/** + * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry + * @pos: the type * to use as a loop cursor. + * @n: another type * to use as temporary storage + * @head: the head for your list. + * @member: the name of the list_head within the struct. + */ +#define list_for_each_entry_safe(pos, n, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member), \ + n = list_entry(pos->member.next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, typeof(*n), member)) + +/** + * list_empty - tests whether a list is empty + * @head: the list to test. + */ +static inline int list_empty(const struct list_head *head) +{ + return head->next == head; +} + +/* + * Insert a new entry between two known consecutive entries. + * + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ +static inline void __list_add(struct list_head *_new, + struct list_head *prev, + struct list_head *next) +{ + next->prev = _new; + _new->next = next; + _new->prev = prev; + prev->next = _new; +} + +/** + * list_add_tail - add a new entry + * @new: new entry to be added + * @head: list head to add it before + * + * Insert a new entry before the specified head. + * This is useful for implementing queues. + */ +static inline void list_add_tail(struct list_head *_new, struct list_head *head) +{ + __list_add(_new, head->prev, head); +} + +/* + * Delete a list entry by making the prev/next entries + * point to each other. + * + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ +static inline void __list_del(struct list_head *prev, struct list_head *next) +{ + next->prev = prev; + prev->next = next; +} + +#define LIST_POISON1 ((void *) 0x00100100) +#define LIST_POISON2 ((void *) 0x00200200) +/** + * list_del - deletes entry from list. + * @entry: the element to delete from the list. + * Note: list_empty() on entry does not return true after this, the entry is + * in an undefined state. + */ +static inline void list_del(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + entry->next = (struct list_head*)LIST_POISON1; + entry->prev = (struct list_head*)LIST_POISON2; +} +#endif diff --git a/support/kconfig/lkc.h b/support/kconfig/lkc.h new file mode 100644 index 00000000..f4394af6 --- /dev/null +++ b/support/kconfig/lkc.h @@ -0,0 +1,188 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#ifndef LKC_H +#define LKC_H + +#include "expr.h" + +#ifndef KBUILD_NO_NLS +# include +#else +static inline const char *gettext(const char *txt) { return txt; } +static inline void textdomain(const char *domainname) {} +static inline void bindtextdomain(const char *name, const char *dir) {} +static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; } +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#include "lkc_proto.h" + +#define SRCTREE "srctree" + +#ifndef PACKAGE +#define PACKAGE "linux" +#endif + +#define LOCALEDIR "/usr/share/locale" + +#define _(text) gettext(text) +#define N_(text) (text) + +#ifndef CONFIG_ +#define CONFIG_ "CONFIG_" +#endif +static inline const char *CONFIG_prefix(void) +{ + return getenv( "CONFIG_" ) ?: CONFIG_; +} +#undef CONFIG_ +#define CONFIG_ CONFIG_prefix() + +#define TF_COMMAND 0x0001 +#define TF_PARAM 0x0002 +#define TF_OPTION 0x0004 + +enum conf_def_mode { + def_default, + def_yes, + def_mod, + def_no, + def_random +}; + +#define T_OPT_MODULES 1 +#define T_OPT_DEFCONFIG_LIST 2 +#define T_OPT_ENV 3 +#define T_OPT_ALLNOCONFIG_Y 4 + +struct kconf_id { + const char *name; + int token; + unsigned int flags; + enum symbol_type stype; +}; + +extern int yylineno; +void zconfdump(FILE *out); +void zconf_starthelp(void); +FILE *zconf_fopen(const char *name); +void zconf_initscan(const char *name); +void zconf_nextfile(const char *name); +int zconf_lineno(void); +const char *zconf_curname(void); + +/* confdata.c */ +const char *conf_get_configname(void); +const char *conf_get_autoconfig_name(void); +char *conf_get_default_confname(void); +void sym_set_change_count(int count); +void sym_add_change_count(int count); +bool conf_set_all_new_symbols(enum conf_def_mode mode); +void set_all_choice_values(struct symbol *csym); + +/* confdata.c and expr.c */ +static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) +{ + assert(len != 0); + + if (fwrite(str, len, count, out) != count) + fprintf(stderr, "Error in writing or end of file.\n"); +} + +/* menu.c */ +void _menu_init(void); +void menu_warn(struct menu *menu, const char *fmt, ...); +struct menu *menu_add_menu(void); +void menu_end_menu(void); +void menu_add_entry(struct symbol *sym); +void menu_add_dep(struct expr *dep); +void menu_add_visibility(struct expr *dep); +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); +void menu_add_option(int token, char *arg); +void menu_finalize(struct menu *parent); +void menu_set_type(int type); + +/* util.c */ +struct file *file_lookup(const char *name); +int file_write_dep(const char *name); +void *xmalloc(size_t size); +void *xcalloc(size_t nmemb, size_t size); +void *xrealloc(void *p, size_t size); +char *xstrdup(const char *s); + +struct gstr { + size_t len; + char *s; + /* + * when max_width is not zero long lines in string s (if any) get + * wrapped not to exceed the max_width value + */ + int max_width; +}; +struct gstr str_new(void); +void str_free(struct gstr *gs); +void str_append(struct gstr *gs, const char *s); +void str_printf(struct gstr *gs, const char *fmt, ...); +const char *str_get(struct gstr *gs); + +/* symbol.c */ +extern struct expr *sym_env_list; + +void sym_init(void); +void sym_clear_all_valid(void); +struct symbol *sym_choice_default(struct symbol *sym); +const char *sym_get_string_default(struct symbol *sym); +struct symbol *sym_check_deps(struct symbol *sym); +struct property *prop_alloc(enum prop_type type, struct symbol *sym); +struct symbol *prop_get_symbol(struct property *prop); +struct property *sym_get_env_prop(struct symbol *sym); + +static inline tristate sym_get_tristate_value(struct symbol *sym) +{ + return sym->curr.tri; +} + + +static inline struct symbol *sym_get_choice_value(struct symbol *sym) +{ + return (struct symbol *)sym->curr.val; +} + +static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval) +{ + return sym_set_tristate_value(chval, yes); +} + +static inline bool sym_is_choice(struct symbol *sym) +{ + return sym->flags & SYMBOL_CHOICE ? true : false; +} + +static inline bool sym_is_choice_value(struct symbol *sym) +{ + return sym->flags & SYMBOL_CHOICEVAL ? true : false; +} + +static inline bool sym_is_optional(struct symbol *sym) +{ + return sym->flags & SYMBOL_OPTIONAL ? true : false; +} + +static inline bool sym_has_value(struct symbol *sym) +{ + return sym->flags & SYMBOL_DEF_USER ? true : false; +} + +#ifdef __cplusplus +} +#endif + +#endif /* LKC_H */ diff --git a/support/kconfig/lkc_proto.h b/support/kconfig/lkc_proto.h new file mode 100644 index 00000000..9dc8abfb --- /dev/null +++ b/support/kconfig/lkc_proto.h @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include + +/* confdata.c */ +void conf_parse(const char *name); +int conf_read(const char *name); +int conf_read_simple(const char *name, int); +int conf_write_defconfig(const char *name); +int conf_write(const char *name); +int conf_write_autoconf(void); +bool conf_get_changed(void); +void conf_set_changed_callback(void (*fn)(void)); +void conf_set_message_callback(void (*fn)(const char *fmt, va_list ap)); + +/* menu.c */ +extern struct menu rootmenu; + +bool menu_is_empty(struct menu *menu); +bool menu_is_visible(struct menu *menu); +bool menu_has_prompt(struct menu *menu); +const char * menu_get_prompt(struct menu *menu); +struct menu * menu_get_root_menu(struct menu *menu); +struct menu * menu_get_parent_menu(struct menu *menu); +bool menu_has_help(struct menu *menu); +const char * menu_get_help(struct menu *menu); +struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head); +void menu_get_ext_help(struct menu *menu, struct gstr *help); + +/* symbol.c */ +extern struct symbol * symbol_hash[SYMBOL_HASHSIZE]; + +struct symbol * sym_lookup(const char *name, int flags); +struct symbol * sym_find(const char *name); +char *sym_expand_string_value(const char *in); +const char * sym_escape_string_value(const char *in); +struct symbol ** sym_re_search(const char *pattern); +const char * sym_type_name(enum symbol_type type); +void sym_calc_value(struct symbol *sym); +enum symbol_type sym_get_type(struct symbol *sym); +bool sym_tristate_within_range(struct symbol *sym,tristate tri); +bool sym_set_tristate_value(struct symbol *sym,tristate tri); +tristate sym_toggle_tristate_value(struct symbol *sym); +bool sym_string_valid(struct symbol *sym, const char *newval); +bool sym_string_within_range(struct symbol *sym, const char *str); +bool sym_set_string_value(struct symbol *sym, const char *newval); +bool sym_is_changable(struct symbol *sym); +struct property * sym_get_choice_prop(struct symbol *sym); +const char * sym_get_string_value(struct symbol *sym); + +const char * prop_get_type_name(enum prop_type type); + +/* expr.c */ +void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken); diff --git a/support/kconfig/lxdialog/.gitignore b/support/kconfig/lxdialog/.gitignore new file mode 100644 index 00000000..90b08ff0 --- /dev/null +++ b/support/kconfig/lxdialog/.gitignore @@ -0,0 +1,4 @@ +# +# Generated files +# +lxdialog diff --git a/support/kconfig/lxdialog/BIG.FAT.WARNING b/support/kconfig/lxdialog/BIG.FAT.WARNING new file mode 100644 index 00000000..a8999d82 --- /dev/null +++ b/support/kconfig/lxdialog/BIG.FAT.WARNING @@ -0,0 +1,4 @@ +This is NOT the official version of dialog. This version has been +significantly modified from the original. It is for use by the Linux +kernel configuration script. Please do not bother Savio Lam with +questions about this program. diff --git a/support/kconfig/lxdialog/check-lxdialog.sh b/support/kconfig/lxdialog/check-lxdialog.sh new file mode 100755 index 00000000..16cd9a31 --- /dev/null +++ b/support/kconfig/lxdialog/check-lxdialog.sh @@ -0,0 +1,93 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Check ncurses compatibility + +# What library to link +ldflags() +{ + pkg-config --libs ncursesw 2>/dev/null && exit + pkg-config --libs ncurses 2>/dev/null && exit + for ext in so a dll.a dylib ; do + for lib in ncursesw ncurses curses ; do + $cc -print-file-name=lib${lib}.${ext} | grep -q / + if [ $? -eq 0 ]; then + echo "-l${lib}" + exit + fi + done + done + exit 1 +} + +# Where is ncurses.h? +ccflags() +{ + if pkg-config --cflags ncursesw 2>/dev/null; then + echo '-DCURSES_LOC="" -DNCURSES_WIDECHAR=1' + elif pkg-config --cflags ncurses 2>/dev/null; then + echo '-DCURSES_LOC=""' + elif [ -f /usr/include/ncursesw/curses.h ]; then + echo '-I/usr/include/ncursesw -DCURSES_LOC=""' + echo ' -DNCURSES_WIDECHAR=1' + elif [ -f /usr/include/ncurses/ncurses.h ]; then + echo '-I/usr/include/ncurses -DCURSES_LOC=""' + elif [ -f /usr/include/ncurses/curses.h ]; then + echo '-I/usr/include/ncurses -DCURSES_LOC=""' + elif [ -f /usr/include/ncurses.h ]; then + echo '-DCURSES_LOC=""' + else + echo '-DCURSES_LOC=""' + fi +} + +# Temp file, try to clean up after us +tmp=$(mktemp) +trap "rm -f $tmp" 0 1 2 3 15 + +# Check if we can link to ncurses +check() { + $cc -x c - -o $tmp 2>/dev/null <<'EOF' +#include CURSES_LOC +main() {} +EOF + if [ $? != 0 ]; then + echo " *** Unable to find the ncurses libraries or the" 1>&2 + echo " *** required header files." 1>&2 + echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2 + echo " *** " 1>&2 + echo " *** Install ncurses (ncurses-devel or libncurses-dev " 1>&2 + echo " *** depending on your distribution) and try again." 1>&2 + echo " *** " 1>&2 + exit 1 + fi +} + +usage() { + printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n" +} + +if [ $# -eq 0 ]; then + usage + exit 1 +fi + +cc="" +case "$1" in + "-check") + shift + cc="$@" + check + ;; + "-ccflags") + ccflags + ;; + "-ldflags") + shift + cc="$@" + ldflags + ;; + "*") + usage + exit 1 + ;; +esac diff --git a/support/kconfig/lxdialog/checklist.c b/support/kconfig/lxdialog/checklist.c new file mode 100644 index 00000000..8d016faa --- /dev/null +++ b/support/kconfig/lxdialog/checklist.c @@ -0,0 +1,332 @@ +/* + * checklist.c -- implements the checklist box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * Stuart Herbert - S.Herbert@sheffield.ac.uk: radiolist extension + * Alessandro Rubini - rubini@ipvvis.unipv.it: merged the two + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static int list_width, check_x, item_x; + +/* + * Print list item + */ +static void print_item(WINDOW * win, int choice, int selected) +{ + int i; + char *list_item = malloc(list_width + 1); + + strncpy(list_item, item_str(), list_width - item_x); + list_item[list_width - item_x] = '\0'; + + /* Clear 'residue' of last item */ + wattrset(win, dlg.menubox.atr); + wmove(win, choice, 0); + for (i = 0; i < list_width; i++) + waddch(win, ' '); + + wmove(win, choice, check_x); + wattrset(win, selected ? dlg.check_selected.atr + : dlg.check.atr); + if (!item_is_tag(':')) + wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' '); + + wattrset(win, selected ? dlg.tag_selected.atr : dlg.tag.atr); + mvwaddch(win, choice, item_x, list_item[0]); + wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr); + waddstr(win, list_item + 1); + if (selected) { + wmove(win, choice, check_x + 1); + wrefresh(win); + } + free(list_item); +} + +/* + * Print the scroll indicators. + */ +static void print_arrows(WINDOW * win, int choice, int item_no, int scroll, + int y, int x, int height) +{ + wmove(win, y, x); + + if (scroll > 0) { + wattrset(win, dlg.uarrow.atr); + waddch(win, ACS_UARROW); + waddstr(win, "(-)"); + } else { + wattrset(win, dlg.menubox.atr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } + + y = y + height + 1; + wmove(win, y, x); + + if ((height < item_no) && (scroll + choice < item_no - 1)) { + wattrset(win, dlg.darrow.atr); + waddch(win, ACS_DARROW); + waddstr(win, "(+)"); + } else { + wattrset(win, dlg.menubox_border.atr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } +} + +/* + * Display the termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 11; + int y = height - 2; + + print_button(dialog, gettext("Select"), y, x, selected == 0); + print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); + + wmove(dialog, y, x + 1 + 14 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box with a list of options that can be turned on or off + * in the style of radiolist (only one option turned on at a time). + */ +int dialog_checklist(const char *title, const char *prompt, int height, + int width, int list_height) +{ + int i, x, y, box_x, box_y; + int key = 0, button = 0, choice = 0, scroll = 0, max_choice; + WINDOW *dialog, *list; + + /* which item to highlight */ + item_foreach() { + if (item_is_tag('X')) + choice = item_n(); + if (item_is_selected()) { + choice = item_n(); + break; + } + } + +do_resize: + if (getmaxy(stdscr) < (height + CHECKLIST_HEIGTH_MIN)) + return -ERRDISPLAYTOOSMALL; + if (getmaxx(stdscr) < (width + CHECKLIST_WIDTH_MIN)) + return -ERRDISPLAYTOOSMALL; + + max_choice = MIN(list_height, item_count()); + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dlg.dialog.atr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + list_width = width - 6; + box_y = height - list_height - 5; + box_x = (width - list_width) / 2 - 1; + + /* create new window for the list */ + list = subwin(dialog, list_height, list_width, y + box_y + 1, + x + box_x + 1); + + keypad(list, TRUE); + + /* draw a box around the list items */ + draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2, + dlg.menubox_border.atr, dlg.menubox.atr); + + /* Find length of longest item in order to center checklist */ + check_x = 0; + item_foreach() + check_x = MAX(check_x, strlen(item_str()) + 4); + check_x = MIN(check_x, list_width); + + check_x = (list_width - check_x) / 2; + item_x = check_x + 4; + + if (choice >= list_height) { + scroll = choice - list_height + 1; + choice -= scroll; + } + + /* Print the list */ + for (i = 0; i < max_choice; i++) { + item_set(scroll + i); + print_item(list, i, i == choice); + } + + print_arrows(dialog, choice, item_count(), scroll, + box_y, box_x + check_x + 5, list_height); + + print_buttons(dialog, height, width, 0); + + wnoutrefresh(dialog); + wnoutrefresh(list); + doupdate(); + + while (key != KEY_ESC) { + key = wgetch(dialog); + + for (i = 0; i < max_choice; i++) { + item_set(i + scroll); + if (toupper(key) == toupper(item_str()[0])) + break; + } + + if (i < max_choice || key == KEY_UP || key == KEY_DOWN || + key == '+' || key == '-') { + if (key == KEY_UP || key == '-') { + if (!choice) { + if (!scroll) + continue; + /* Scroll list down */ + if (list_height > 1) { + /* De-highlight current first item */ + item_set(scroll); + print_item(list, 0, FALSE); + scrollok(list, TRUE); + wscrl(list, -1); + scrollok(list, FALSE); + } + scroll--; + item_set(scroll); + print_item(list, 0, TRUE); + print_arrows(dialog, choice, item_count(), + scroll, box_y, box_x + check_x + 5, list_height); + + wnoutrefresh(dialog); + wrefresh(list); + + continue; /* wait for another key press */ + } else + i = choice - 1; + } else if (key == KEY_DOWN || key == '+') { + if (choice == max_choice - 1) { + if (scroll + choice >= item_count() - 1) + continue; + /* Scroll list up */ + if (list_height > 1) { + /* De-highlight current last item before scrolling up */ + item_set(scroll + max_choice - 1); + print_item(list, + max_choice - 1, + FALSE); + scrollok(list, TRUE); + wscrl(list, 1); + scrollok(list, FALSE); + } + scroll++; + item_set(scroll + max_choice - 1); + print_item(list, max_choice - 1, TRUE); + + print_arrows(dialog, choice, item_count(), + scroll, box_y, box_x + check_x + 5, list_height); + + wnoutrefresh(dialog); + wrefresh(list); + + continue; /* wait for another key press */ + } else + i = choice + 1; + } + if (i != choice) { + /* De-highlight current item */ + item_set(scroll + choice); + print_item(list, choice, FALSE); + /* Highlight new item */ + choice = i; + item_set(scroll + choice); + print_item(list, choice, TRUE); + wnoutrefresh(dialog); + wrefresh(list); + } + continue; /* wait for another key press */ + } + switch (key) { + case 'H': + case 'h': + case '?': + button = 1; + /* fall-through */ + case 'S': + case 's': + case ' ': + case '\n': + item_foreach() + item_set_selected(0); + item_set(scroll + choice); + item_set_selected(1); + delwin(list); + delwin(dialog); + return button; + case TAB: + case KEY_LEFT: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) + ? 1 : (button > 1 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh(dialog); + break; + case 'X': + case 'x': + key = KEY_ESC; + break; + case KEY_ESC: + key = on_key_esc(dialog); + break; + case KEY_RESIZE: + delwin(list); + delwin(dialog); + on_key_resize(); + goto do_resize; + } + + /* Now, update everything... */ + doupdate(); + } + delwin(list); + delwin(dialog); + return key; /* ESC pressed */ +} diff --git a/support/kconfig/lxdialog/dialog.h b/support/kconfig/lxdialog/dialog.h new file mode 100644 index 00000000..fcffd5b4 --- /dev/null +++ b/support/kconfig/lxdialog/dialog.h @@ -0,0 +1,257 @@ +/* + * dialog.h -- common declarations for all dialog modules + * + * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#ifndef KBUILD_NO_NLS +# include +#else +# define gettext(Msgid) ((const char *) (Msgid)) +#endif + +#ifdef __sun__ +#define CURS_MACROS +#endif +#include CURSES_LOC + +/* + * Colors in ncurses 1.9.9e do not work properly since foreground and + * background colors are OR'd rather than separately masked. This version + * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible + * with standard curses. The simplest fix (to make this work with standard + * curses) uses the wbkgdset() function, not used in the original hack. + * Turn it off if we're building with 1.9.9e, since it just confuses things. + */ +#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE) +#define OLD_NCURSES 1 +#undef wbkgdset +#define wbkgdset(w,p) /*nothing */ +#else +#define OLD_NCURSES 0 +#endif + +#define TR(params) _tracef params + +#define KEY_ESC 27 +#define TAB 9 +#define MAX_LEN 2048 +#define BUF_SIZE (10*1024) +#define MIN(x,y) (x < y ? x : y) +#define MAX(x,y) (x > y ? x : y) + +#ifndef ACS_ULCORNER +#define ACS_ULCORNER '+' +#endif +#ifndef ACS_LLCORNER +#define ACS_LLCORNER '+' +#endif +#ifndef ACS_URCORNER +#define ACS_URCORNER '+' +#endif +#ifndef ACS_LRCORNER +#define ACS_LRCORNER '+' +#endif +#ifndef ACS_HLINE +#define ACS_HLINE '-' +#endif +#ifndef ACS_VLINE +#define ACS_VLINE '|' +#endif +#ifndef ACS_LTEE +#define ACS_LTEE '+' +#endif +#ifndef ACS_RTEE +#define ACS_RTEE '+' +#endif +#ifndef ACS_UARROW +#define ACS_UARROW '^' +#endif +#ifndef ACS_DARROW +#define ACS_DARROW 'v' +#endif + +/* error return codes */ +#define ERRDISPLAYTOOSMALL (KEY_MAX + 1) + +/* + * Color definitions + */ +struct dialog_color { + chtype atr; /* Color attribute */ + int fg; /* foreground */ + int bg; /* background */ + int hl; /* highlight this item */ +}; + +struct subtitle_list { + struct subtitle_list *next; + const char *text; +}; + +struct dialog_info { + const char *backtitle; + struct subtitle_list *subtitles; + struct dialog_color screen; + struct dialog_color shadow; + struct dialog_color dialog; + struct dialog_color title; + struct dialog_color border; + struct dialog_color button_active; + struct dialog_color button_inactive; + struct dialog_color button_key_active; + struct dialog_color button_key_inactive; + struct dialog_color button_label_active; + struct dialog_color button_label_inactive; + struct dialog_color inputbox; + struct dialog_color inputbox_border; + struct dialog_color searchbox; + struct dialog_color searchbox_title; + struct dialog_color searchbox_border; + struct dialog_color position_indicator; + struct dialog_color menubox; + struct dialog_color menubox_border; + struct dialog_color item; + struct dialog_color item_selected; + struct dialog_color tag; + struct dialog_color tag_selected; + struct dialog_color tag_key; + struct dialog_color tag_key_selected; + struct dialog_color check; + struct dialog_color check_selected; + struct dialog_color uarrow; + struct dialog_color darrow; +}; + +/* + * Global variables + */ +extern struct dialog_info dlg; +extern char dialog_input_result[]; +extern int saved_x, saved_y; /* Needed in signal handler in mconf.c */ + +/* + * Function prototypes + */ + +/* item list as used by checklist and menubox */ +void item_reset(void); +void item_make(const char *fmt, ...); +void item_add_str(const char *fmt, ...); +void item_set_tag(char tag); +void item_set_data(void *p); +void item_set_selected(int val); +int item_activate_selected(void); +void *item_data(void); +char item_tag(void); + +/* item list manipulation for lxdialog use */ +#define MAXITEMSTR 200 +struct dialog_item { + char str[MAXITEMSTR]; /* prompt displayed */ + char tag; + void *data; /* pointer to menu item - used by menubox+checklist */ + int selected; /* Set to 1 by dialog_*() function if selected. */ +}; + +/* list of lialog_items */ +struct dialog_list { + struct dialog_item node; + struct dialog_list *next; +}; + +extern struct dialog_list *item_cur; +extern struct dialog_list item_nil; +extern struct dialog_list *item_head; + +int item_count(void); +void item_set(int n); +int item_n(void); +const char *item_str(void); +int item_is_selected(void); +int item_is_tag(char tag); +#define item_foreach() \ + for (item_cur = item_head ? item_head: item_cur; \ + item_cur && (item_cur != &item_nil); item_cur = item_cur->next) + +/* generic key handlers */ +int on_key_esc(WINDOW *win); +int on_key_resize(void); + +/* minimum (re)size values */ +#define CHECKLIST_HEIGTH_MIN 6 /* For dialog_checklist() */ +#define CHECKLIST_WIDTH_MIN 6 +#define INPUTBOX_HEIGTH_MIN 2 /* For dialog_inputbox() */ +#define INPUTBOX_WIDTH_MIN 2 +#define MENUBOX_HEIGTH_MIN 15 /* For dialog_menu() */ +#define MENUBOX_WIDTH_MIN 65 +#define TEXTBOX_HEIGTH_MIN 8 /* For dialog_textbox() */ +#define TEXTBOX_WIDTH_MIN 8 +#define YESNO_HEIGTH_MIN 4 /* For dialog_yesno() */ +#define YESNO_WIDTH_MIN 4 +#define WINDOW_HEIGTH_MIN 19 /* For init_dialog() */ +#define WINDOW_WIDTH_MIN 80 + +int init_dialog(const char *backtitle); +void set_dialog_backtitle(const char *backtitle); +void set_dialog_subtitles(struct subtitle_list *subtitles); +void end_dialog(int x, int y); +void attr_clear(WINDOW * win, int height, int width, chtype attr); +void dialog_clear(void); +void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x); +void print_button(WINDOW * win, const char *label, int y, int x, int selected); +void print_title(WINDOW *dialog, const char *title, int width); +void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box, + chtype border); +void draw_shadow(WINDOW * win, int y, int x, int height, int width); + +int first_alpha(const char *string, const char *exempt); +int dialog_yesno(const char *title, const char *prompt, int height, int width); +int dialog_msgbox(const char *title, const char *prompt, int height, + int width, int pause); + + +typedef void (*update_text_fn)(char *buf, size_t start, size_t end, void + *_data); +int dialog_textbox(const char *title, char *tbuf, int initial_height, + int initial_width, int *keys, int *_vscroll, int *_hscroll, + update_text_fn update_text, void *data); +int dialog_menu(const char *title, const char *prompt, + const void *selected, int *s_scroll); +int dialog_checklist(const char *title, const char *prompt, int height, + int width, int list_height); +int dialog_inputbox(const char *title, const char *prompt, int height, + int width, const char *init); + +/* + * This is the base for fictitious keys, which activate + * the buttons. + * + * Mouse-generated keys are the following: + * -- the first 32 are used as numbers, in addition to '0'-'9' + * -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o') + * -- uppercase chars are used to invoke the button (M_EVENT + 'O') + */ +#define M_EVENT (KEY_MAX+1) diff --git a/support/kconfig/lxdialog/inputbox.c b/support/kconfig/lxdialog/inputbox.c new file mode 100644 index 00000000..d58de1dc --- /dev/null +++ b/support/kconfig/lxdialog/inputbox.c @@ -0,0 +1,301 @@ +/* + * inputbox.c -- implements the input box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +char dialog_input_result[MAX_LEN + 1]; + +/* + * Print the termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 11; + int y = height - 2; + + print_button(dialog, gettext(" Ok "), y, x, selected == 0); + print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); + + wmove(dialog, y, x + 1 + 14 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box for inputing a string + */ +int dialog_inputbox(const char *title, const char *prompt, int height, int width, + const char *init) +{ + int i, x, y, box_y, box_x, box_width; + int input_x = 0, key = 0, button = -1; + int show_x, len, pos; + char *instr = dialog_input_result; + WINDOW *dialog; + + if (!init) + instr[0] = '\0'; + else + strcpy(instr, init); + +do_resize: + if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGTH_MIN)) + return -ERRDISPLAYTOOSMALL; + if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN)) + return -ERRDISPLAYTOOSMALL; + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dlg.dialog.atr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + /* Draw the input field box */ + box_width = width - 6; + getyx(dialog, y, x); + box_y = y + 2; + box_x = (width - box_width) / 2; + draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2, + dlg.dialog.atr, dlg.border.atr); + + print_buttons(dialog, height, width, 0); + + /* Set up the initial value */ + wmove(dialog, box_y, box_x); + wattrset(dialog, dlg.inputbox.atr); + + len = strlen(instr); + pos = len; + + if (len >= box_width) { + show_x = len - box_width + 1; + input_x = box_width - 1; + for (i = 0; i < box_width - 1; i++) + waddch(dialog, instr[show_x + i]); + } else { + show_x = 0; + input_x = len; + waddstr(dialog, instr); + } + + wmove(dialog, box_y, box_x + input_x); + + wrefresh(dialog); + + while (key != KEY_ESC) { + key = wgetch(dialog); + + if (button == -1) { /* Input box selected */ + switch (key) { + case TAB: + case KEY_UP: + case KEY_DOWN: + break; + case KEY_BACKSPACE: + case 127: + if (pos) { + wattrset(dialog, dlg.inputbox.atr); + if (input_x == 0) { + show_x--; + } else + input_x--; + + if (pos < len) { + for (i = pos - 1; i < len; i++) { + instr[i] = instr[i+1]; + } + } + + pos--; + len--; + instr[len] = '\0'; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, input_x + box_x); + wrefresh(dialog); + } + continue; + case KEY_LEFT: + if (pos > 0) { + if (input_x > 0) { + wmove(dialog, box_y, --input_x + box_x); + } else if (input_x == 0) { + show_x--; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, box_x); + } + pos--; + } + continue; + case KEY_RIGHT: + if (pos < len) { + if (input_x < box_width - 1) { + wmove(dialog, box_y, ++input_x + box_x); + } else if (input_x == box_width - 1) { + show_x++; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, input_x + box_x); + } + pos++; + } + continue; + default: + if (key < 0x100 && isprint(key)) { + if (len < MAX_LEN) { + wattrset(dialog, dlg.inputbox.atr); + if (pos < len) { + for (i = len; i > pos; i--) + instr[i] = instr[i-1]; + instr[pos] = key; + } else { + instr[len] = key; + } + pos++; + len++; + instr[len] = '\0'; + + if (input_x == box_width - 1) { + show_x++; + } else { + input_x++; + } + + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, input_x + box_x); + wrefresh(dialog); + } else + flash(); /* Alarm user about overflow */ + continue; + } + } + } + switch (key) { + case 'O': + case 'o': + delwin(dialog); + return 0; + case 'H': + case 'h': + delwin(dialog); + return 1; + case KEY_UP: + case KEY_LEFT: + switch (button) { + case -1: + button = 1; /* Indicates "Help" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 0: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove(dialog, box_y, box_x + input_x); + wrefresh(dialog); + break; + case 1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + } + break; + case TAB: + case KEY_DOWN: + case KEY_RIGHT: + switch (button) { + case -1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + case 0: + button = 1; /* Indicates "Help" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 1: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove(dialog, box_y, box_x + input_x); + wrefresh(dialog); + break; + } + break; + case ' ': + case '\n': + delwin(dialog); + return (button == -1 ? 0 : button); + case 'X': + case 'x': + key = KEY_ESC; + break; + case KEY_ESC: + key = on_key_esc(dialog); + break; + case KEY_RESIZE: + delwin(dialog); + on_key_resize(); + goto do_resize; + } + } + + delwin(dialog); + return KEY_ESC; /* ESC pressed */ +} diff --git a/support/kconfig/lxdialog/menubox.c b/support/kconfig/lxdialog/menubox.c new file mode 100644 index 00000000..18552490 --- /dev/null +++ b/support/kconfig/lxdialog/menubox.c @@ -0,0 +1,437 @@ +/* + * menubox.c -- implements the menu box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * Changes by Clifford Wolf (god@clifford.at) + * + * [ 1998-06-13 ] + * + * *) A bugfix for the Page-Down problem + * + * *) Formerly when I used Page Down and Page Up, the cursor would be set + * to the first position in the menu box. Now lxdialog is a bit + * smarter and works more like other menu systems (just have a look at + * it). + * + * *) Formerly if I selected something my scrolling would be broken because + * lxdialog is re-invoked by the Menuconfig shell script, can't + * remember the last scrolling position, and just sets it so that the + * cursor is at the bottom of the box. Now it writes the temporary file + * lxdialog.scrltmp which contains this information. The file is + * deleted by lxdialog if the user leaves a submenu or enters a new + * one, but it would be nice if Menuconfig could make another "rm -f" + * just to be sure. Just try it out - you will recognise a difference! + * + * [ 1998-06-14 ] + * + * *) Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files + * and menus change their size on the fly. + * + * *) If for some reason the last scrolling position is not saved by + * lxdialog, it sets the scrolling so that the selected item is in the + * middle of the menu box, not at the bottom. + * + * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net) + * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus. + * This fixes a bug in Menuconfig where using ' ' to descend into menus + * would leave mis-synchronized lxdialog.scrltmp files lying around, + * fscanf would read in 'scroll', and eventually that value would get used. + */ + +#include "dialog.h" + +static int menu_width, item_x; + +/* + * Print menu item + */ +static void do_print_item(WINDOW * win, const char *item, int line_y, + int selected, int hotkey) +{ + int j; + char *menu_item = malloc(menu_width + 1); + + strncpy(menu_item, item, menu_width - item_x); + menu_item[menu_width - item_x] = '\0'; + j = first_alpha(menu_item, "YyNnMmHh"); + + /* Clear 'residue' of last item */ + wattrset(win, dlg.menubox.atr); + wmove(win, line_y, 0); +#if OLD_NCURSES + { + int i; + for (i = 0; i < menu_width; i++) + waddch(win, ' '); + } +#else + wclrtoeol(win); +#endif + wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr); + mvwaddstr(win, line_y, item_x, menu_item); + if (hotkey) { + wattrset(win, selected ? dlg.tag_key_selected.atr + : dlg.tag_key.atr); + mvwaddch(win, line_y, item_x + j, menu_item[j]); + } + if (selected) { + wmove(win, line_y, item_x + 1); + } + free(menu_item); + wrefresh(win); +} + +#define print_item(index, choice, selected) \ +do { \ + item_set(index); \ + do_print_item(menu, item_str(), choice, selected, !item_is_tag(':')); \ +} while (0) + +/* + * Print the scroll indicators. + */ +static void print_arrows(WINDOW * win, int item_no, int scroll, int y, int x, + int height) +{ + int cur_y, cur_x; + + getyx(win, cur_y, cur_x); + + wmove(win, y, x); + + if (scroll > 0) { + wattrset(win, dlg.uarrow.atr); + waddch(win, ACS_UARROW); + waddstr(win, "(-)"); + } else { + wattrset(win, dlg.menubox.atr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } + + y = y + height + 1; + wmove(win, y, x); + wrefresh(win); + + if ((height < item_no) && (scroll + height < item_no)) { + wattrset(win, dlg.darrow.atr); + waddch(win, ACS_DARROW); + waddstr(win, "(+)"); + } else { + wattrset(win, dlg.menubox_border.atr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } + + wmove(win, cur_y, cur_x); + wrefresh(win); +} + +/* + * Display the termination buttons. + */ +static void print_buttons(WINDOW * win, int height, int width, int selected) +{ + int x = width / 2 - 28; + int y = height - 2; + + print_button(win, gettext("Select"), y, x, selected == 0); + print_button(win, gettext(" Exit "), y, x + 12, selected == 1); + print_button(win, gettext(" Help "), y, x + 24, selected == 2); + print_button(win, gettext(" Save "), y, x + 36, selected == 3); + print_button(win, gettext(" Load "), y, x + 48, selected == 4); + + wmove(win, y, x + 1 + 12 * selected); + wrefresh(win); +} + +/* scroll up n lines (n may be negative) */ +static void do_scroll(WINDOW *win, int *scroll, int n) +{ + /* Scroll menu up */ + scrollok(win, TRUE); + wscrl(win, n); + scrollok(win, FALSE); + *scroll = *scroll + n; + wrefresh(win); +} + +/* + * Display a menu for choosing among a number of options + */ +int dialog_menu(const char *title, const char *prompt, + const void *selected, int *s_scroll) +{ + int i, j, x, y, box_x, box_y; + int height, width, menu_height; + int key = 0, button = 0, scroll = 0, choice = 0; + int first_item = 0, max_choice; + WINDOW *dialog, *menu; + +do_resize: + height = getmaxy(stdscr); + width = getmaxx(stdscr); + if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN) + return -ERRDISPLAYTOOSMALL; + + height -= 4; + width -= 5; + menu_height = height - 10; + + max_choice = MIN(menu_height, item_count()); + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + wbkgdset(dialog, dlg.dialog.atr & A_COLOR); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dlg.dialog.atr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + menu_width = width - 6; + box_y = height - menu_height - 5; + box_x = (width - menu_width) / 2 - 1; + + /* create new window for the menu */ + menu = subwin(dialog, menu_height, menu_width, + y + box_y + 1, x + box_x + 1); + keypad(menu, TRUE); + + /* draw a box around the menu items */ + draw_box(dialog, box_y, box_x, menu_height + 2, menu_width + 2, + dlg.menubox_border.atr, dlg.menubox.atr); + + if (menu_width >= 80) + item_x = (menu_width - 70) / 2; + else + item_x = 4; + + /* Set choice to default item */ + item_foreach() + if (selected && (selected == item_data())) + choice = item_n(); + /* get the saved scroll info */ + scroll = *s_scroll; + if ((scroll <= choice) && (scroll + max_choice > choice) && + (scroll >= 0) && (scroll + max_choice <= item_count())) { + first_item = scroll; + choice = choice - scroll; + } else { + scroll = 0; + } + if ((choice >= max_choice)) { + if (choice >= item_count() - max_choice / 2) + scroll = first_item = item_count() - max_choice; + else + scroll = first_item = choice - max_choice / 2; + choice = choice - scroll; + } + + /* Print the menu */ + for (i = 0; i < max_choice; i++) { + print_item(first_item + i, i, i == choice); + } + + wnoutrefresh(menu); + + print_arrows(dialog, item_count(), scroll, + box_y, box_x + item_x + 1, menu_height); + + print_buttons(dialog, height, width, 0); + wmove(menu, choice, item_x + 1); + wrefresh(menu); + + while (key != KEY_ESC) { + key = wgetch(menu); + + if (key < 256 && isalpha(key)) + key = tolower(key); + + if (strchr("ynmh ", key)) + i = max_choice; + else { + for (i = choice + 1; i < max_choice; i++) { + item_set(scroll + i); + j = first_alpha(item_str(), "YyNnMmHh"); + if (key == tolower(item_str()[j])) + break; + } + if (i == max_choice) + for (i = 0; i < max_choice; i++) { + item_set(scroll + i); + j = first_alpha(item_str(), "YyNnMmHh"); + if (key == tolower(item_str()[j])) + break; + } + } + + if (item_count() != 0 && + (i < max_choice || + key == KEY_UP || key == KEY_DOWN || + key == '-' || key == '+' || + key == KEY_PPAGE || key == KEY_NPAGE)) { + /* Remove highligt of current item */ + print_item(scroll + choice, choice, FALSE); + + if (key == KEY_UP || key == '-') { + if (choice < 2 && scroll) { + /* Scroll menu down */ + do_scroll(menu, &scroll, -1); + + print_item(scroll, 0, FALSE); + } else + choice = MAX(choice - 1, 0); + + } else if (key == KEY_DOWN || key == '+') { + print_item(scroll+choice, choice, FALSE); + + if ((choice > max_choice - 3) && + (scroll + max_choice < item_count())) { + /* Scroll menu up */ + do_scroll(menu, &scroll, 1); + + print_item(scroll+max_choice - 1, + max_choice - 1, FALSE); + } else + choice = MIN(choice + 1, max_choice - 1); + + } else if (key == KEY_PPAGE) { + scrollok(menu, TRUE); + for (i = 0; (i < max_choice); i++) { + if (scroll > 0) { + do_scroll(menu, &scroll, -1); + print_item(scroll, 0, FALSE); + } else { + if (choice > 0) + choice--; + } + } + + } else if (key == KEY_NPAGE) { + for (i = 0; (i < max_choice); i++) { + if (scroll + max_choice < item_count()) { + do_scroll(menu, &scroll, 1); + print_item(scroll+max_choice-1, + max_choice - 1, FALSE); + } else { + if (choice + 1 < max_choice) + choice++; + } + } + } else + choice = i; + + print_item(scroll + choice, choice, TRUE); + + print_arrows(dialog, item_count(), scroll, + box_y, box_x + item_x + 1, menu_height); + + wnoutrefresh(dialog); + wrefresh(menu); + + continue; /* wait for another key press */ + } + + switch (key) { + case KEY_LEFT: + case TAB: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) + ? 4 : (button > 4 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh(menu); + break; + case ' ': + case 's': + case 'y': + case 'n': + case 'm': + case '/': + case 'h': + case '?': + case 'z': + case '\n': + /* save scroll info */ + *s_scroll = scroll; + delwin(menu); + delwin(dialog); + item_set(scroll + choice); + item_set_selected(1); + switch (key) { + case 'h': + case '?': + return 2; + case 's': + case 'y': + return 5; + case 'n': + return 6; + case 'm': + return 7; + case ' ': + return 8; + case '/': + return 9; + case 'z': + return 10; + case '\n': + return button; + } + return 0; + case 'e': + case 'x': + key = KEY_ESC; + break; + case KEY_ESC: + key = on_key_esc(menu); + break; + case KEY_RESIZE: + on_key_resize(); + delwin(menu); + delwin(dialog); + goto do_resize; + } + } + delwin(menu); + delwin(dialog); + return key; /* ESC pressed */ +} diff --git a/support/kconfig/lxdialog/textbox.c b/support/kconfig/lxdialog/textbox.c new file mode 100644 index 00000000..1773319b --- /dev/null +++ b/support/kconfig/lxdialog/textbox.c @@ -0,0 +1,408 @@ +/* + * textbox.c -- implements the text box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static void back_lines(int n); +static void print_page(WINDOW *win, int height, int width, update_text_fn + update_text, void *data); +static void print_line(WINDOW *win, int row, int width); +static char *get_line(void); +static void print_position(WINDOW * win); + +static int hscroll; +static int begin_reached, end_reached, page_length; +static char *buf; +static char *page; + +/* + * refresh window content + */ +static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw, + int cur_y, int cur_x, update_text_fn update_text, + void *data) +{ + print_page(box, boxh, boxw, update_text, data); + print_position(dialog); + wmove(dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh(dialog); +} + + +/* + * Display text from a file in a dialog box. + * + * keys is a null-terminated array + * update_text() may not add or remove any '\n' or '\0' in tbuf + */ +int dialog_textbox(const char *title, char *tbuf, int initial_height, + int initial_width, int *keys, int *_vscroll, int *_hscroll, + update_text_fn update_text, void *data) +{ + int i, x, y, cur_x, cur_y, key = 0; + int height, width, boxh, boxw; + WINDOW *dialog, *box; + bool done = false; + + begin_reached = 1; + end_reached = 0; + page_length = 0; + hscroll = 0; + buf = tbuf; + page = buf; /* page is pointer to start of page to be displayed */ + + if (_vscroll && *_vscroll) { + begin_reached = 0; + + for (i = 0; i < *_vscroll; i++) + get_line(); + } + if (_hscroll) + hscroll = *_hscroll; + +do_resize: + getmaxyx(stdscr, height, width); + if (height < TEXTBOX_HEIGTH_MIN || width < TEXTBOX_WIDTH_MIN) + return -ERRDISPLAYTOOSMALL; + if (initial_height != 0) + height = initial_height; + else + if (height > 4) + height -= 4; + else + height = 0; + if (initial_width != 0) + width = initial_width; + else + if (width > 5) + width -= 5; + else + width = 0; + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + /* Create window for box region, used for scrolling text */ + boxh = height - 4; + boxw = width - 2; + box = subwin(dialog, boxh, boxw, y + 1, x + 1); + wattrset(box, dlg.dialog.atr); + wbkgdset(box, dlg.dialog.atr & A_COLOR); + + keypad(box, TRUE); + + /* register the new window, along with its borders */ + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + wbkgdset(dialog, dlg.dialog.atr & A_COLOR); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + print_button(dialog, gettext(" Exit "), height - 2, width / 2 - 4, TRUE); + wnoutrefresh(dialog); + getyx(dialog, cur_y, cur_x); /* Save cursor position */ + + /* Print first page of text */ + attr_clear(box, boxh, boxw, dlg.dialog.atr); + refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x, update_text, + data); + + while (!done) { + key = wgetch(dialog); + switch (key) { + case 'E': /* Exit */ + case 'e': + case 'X': + case 'x': + case 'q': + case '\n': + done = true; + break; + case 'g': /* First page */ + case KEY_HOME: + if (!begin_reached) { + begin_reached = 1; + page = buf; + refresh_text_box(dialog, box, boxh, boxw, + cur_y, cur_x, update_text, + data); + } + break; + case 'G': /* Last page */ + case KEY_END: + + end_reached = 1; + /* point to last char in buf */ + page = buf + strlen(buf); + back_lines(boxh); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'K': /* Previous line */ + case 'k': + case KEY_UP: + if (begin_reached) + break; + + back_lines(page_length + 1); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'B': /* Previous page */ + case 'b': + case 'u': + case KEY_PPAGE: + if (begin_reached) + break; + back_lines(page_length + boxh); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'J': /* Next line */ + case 'j': + case KEY_DOWN: + if (end_reached) + break; + + back_lines(page_length - 1); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case KEY_NPAGE: /* Next page */ + case ' ': + case 'd': + if (end_reached) + break; + + begin_reached = 0; + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case '0': /* Beginning of line */ + case 'H': /* Scroll left */ + case 'h': + case KEY_LEFT: + if (hscroll <= 0) + break; + + if (key == '0') + hscroll = 0; + else + hscroll--; + /* Reprint current page to scroll horizontally */ + back_lines(page_length); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'L': /* Scroll right */ + case 'l': + case KEY_RIGHT: + if (hscroll >= MAX_LEN) + break; + hscroll++; + /* Reprint current page to scroll horizontally */ + back_lines(page_length); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case KEY_ESC: + if (on_key_esc(dialog) == KEY_ESC) + done = true; + break; + case KEY_RESIZE: + back_lines(height); + delwin(box); + delwin(dialog); + on_key_resize(); + goto do_resize; + default: + for (i = 0; keys[i]; i++) { + if (key == keys[i]) { + done = true; + break; + } + } + } + } + delwin(box); + delwin(dialog); + if (_vscroll) { + const char *s; + + s = buf; + *_vscroll = 0; + back_lines(page_length); + while (s < page && (s = strchr(s, '\n'))) { + (*_vscroll)++; + s++; + } + } + if (_hscroll) + *_hscroll = hscroll; + return key; +} + +/* + * Go back 'n' lines in text. Called by dialog_textbox(). + * 'page' will be updated to point to the desired line in 'buf'. + */ +static void back_lines(int n) +{ + int i; + + begin_reached = 0; + /* Go back 'n' lines */ + for (i = 0; i < n; i++) { + if (*page == '\0') { + if (end_reached) { + end_reached = 0; + continue; + } + } + if (page == buf) { + begin_reached = 1; + return; + } + page--; + do { + if (page == buf) { + begin_reached = 1; + return; + } + page--; + } while (*page != '\n'); + page++; + } +} + +/* + * Print a new page of text. + */ +static void print_page(WINDOW *win, int height, int width, update_text_fn + update_text, void *data) +{ + int i, passed_end = 0; + + if (update_text) { + char *end; + + for (i = 0; i < height; i++) + get_line(); + end = page; + back_lines(height); + update_text(buf, page - buf, end - buf, data); + } + + page_length = 0; + for (i = 0; i < height; i++) { + print_line(win, i, width); + if (!passed_end) + page_length++; + if (end_reached && !passed_end) + passed_end = 1; + } + wnoutrefresh(win); +} + +/* + * Print a new line of text. + */ +static void print_line(WINDOW * win, int row, int width) +{ + char *line; + + line = get_line(); + line += MIN(strlen(line), hscroll); /* Scroll horizontally */ + wmove(win, row, 0); /* move cursor to correct line */ + waddch(win, ' '); + waddnstr(win, line, MIN(strlen(line), width - 2)); + + /* Clear 'residue' of previous line */ +#if OLD_NCURSES + { + int x = getcurx(win); + int i; + for (i = 0; i < width - x; i++) + waddch(win, ' '); + } +#else + wclrtoeol(win); +#endif +} + +/* + * Return current line of text. Called by dialog_textbox() and print_line(). + * 'page' should point to start of current line before calling, and will be + * updated to point to start of next line. + */ +static char *get_line(void) +{ + int i = 0; + static char line[MAX_LEN + 1]; + + end_reached = 0; + while (*page != '\n') { + if (*page == '\0') { + end_reached = 1; + break; + } else if (i < MAX_LEN) + line[i++] = *(page++); + else { + /* Truncate lines longer than MAX_LEN characters */ + if (i == MAX_LEN) + line[i++] = '\0'; + page++; + } + } + if (i <= MAX_LEN) + line[i] = '\0'; + if (!end_reached) + page++; /* move past '\n' */ + + return line; +} + +/* + * Print current position + */ +static void print_position(WINDOW * win) +{ + int percent; + + wattrset(win, dlg.position_indicator.atr); + wbkgdset(win, dlg.position_indicator.atr & A_COLOR); + percent = (page - buf) * 100 / strlen(buf); + wmove(win, getmaxy(win) - 3, getmaxx(win) - 9); + wprintw(win, "(%3d%%)", percent); +} diff --git a/support/kconfig/lxdialog/util.c b/support/kconfig/lxdialog/util.c new file mode 100644 index 00000000..f7abdeb9 --- /dev/null +++ b/support/kconfig/lxdialog/util.c @@ -0,0 +1,713 @@ +/* + * util.c + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include + +#include "dialog.h" + +/* Needed in signal handler in mconf.c */ +int saved_x, saved_y; + +struct dialog_info dlg; + +static void set_mono_theme(void) +{ + dlg.screen.atr = A_NORMAL; + dlg.shadow.atr = A_NORMAL; + dlg.dialog.atr = A_NORMAL; + dlg.title.atr = A_BOLD; + dlg.border.atr = A_NORMAL; + dlg.button_active.atr = A_REVERSE; + dlg.button_inactive.atr = A_DIM; + dlg.button_key_active.atr = A_REVERSE; + dlg.button_key_inactive.atr = A_BOLD; + dlg.button_label_active.atr = A_REVERSE; + dlg.button_label_inactive.atr = A_NORMAL; + dlg.inputbox.atr = A_NORMAL; + dlg.inputbox_border.atr = A_NORMAL; + dlg.searchbox.atr = A_NORMAL; + dlg.searchbox_title.atr = A_BOLD; + dlg.searchbox_border.atr = A_NORMAL; + dlg.position_indicator.atr = A_BOLD; + dlg.menubox.atr = A_NORMAL; + dlg.menubox_border.atr = A_NORMAL; + dlg.item.atr = A_NORMAL; + dlg.item_selected.atr = A_REVERSE; + dlg.tag.atr = A_BOLD; + dlg.tag_selected.atr = A_REVERSE; + dlg.tag_key.atr = A_BOLD; + dlg.tag_key_selected.atr = A_REVERSE; + dlg.check.atr = A_BOLD; + dlg.check_selected.atr = A_REVERSE; + dlg.uarrow.atr = A_BOLD; + dlg.darrow.atr = A_BOLD; +} + +#define DLG_COLOR(dialog, f, b, h) \ +do { \ + dlg.dialog.fg = (f); \ + dlg.dialog.bg = (b); \ + dlg.dialog.hl = (h); \ +} while (0) + +static void set_classic_theme(void) +{ + DLG_COLOR(screen, COLOR_CYAN, COLOR_BLUE, true); + DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, true); + DLG_COLOR(dialog, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(title, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(border, COLOR_WHITE, COLOR_WHITE, true); + DLG_COLOR(button_active, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(button_inactive, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(button_key_active, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_WHITE, false); + DLG_COLOR(button_label_active, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_WHITE, true); + DLG_COLOR(inputbox, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(inputbox_border, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(searchbox, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(searchbox_border, COLOR_WHITE, COLOR_WHITE, true); + DLG_COLOR(position_indicator, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(menubox, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(menubox_border, COLOR_WHITE, COLOR_WHITE, true); + DLG_COLOR(item, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(item_selected, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(tag, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(tag_key, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(check, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(check_selected, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(uarrow, COLOR_GREEN, COLOR_WHITE, true); + DLG_COLOR(darrow, COLOR_GREEN, COLOR_WHITE, true); +} + +static void set_blackbg_theme(void) +{ + DLG_COLOR(screen, COLOR_RED, COLOR_BLACK, true); + DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, false); + DLG_COLOR(dialog, COLOR_WHITE, COLOR_BLACK, false); + DLG_COLOR(title, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(border, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(button_active, COLOR_YELLOW, COLOR_RED, false); + DLG_COLOR(button_inactive, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_RED, true); + DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_RED, false); + DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(inputbox, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(inputbox_border, COLOR_YELLOW, COLOR_BLACK, false); + + DLG_COLOR(searchbox, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_BLACK, true); + DLG_COLOR(searchbox_border, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(position_indicator, COLOR_RED, COLOR_BLACK, false); + + DLG_COLOR(menubox, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(menubox_border, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(item, COLOR_WHITE, COLOR_BLACK, false); + DLG_COLOR(item_selected, COLOR_WHITE, COLOR_RED, false); + + DLG_COLOR(tag, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_RED, true); + DLG_COLOR(tag_key, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_RED, true); + + DLG_COLOR(check, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(check_selected, COLOR_YELLOW, COLOR_RED, true); + + DLG_COLOR(uarrow, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(darrow, COLOR_RED, COLOR_BLACK, false); +} + +static void set_bluetitle_theme(void) +{ + set_classic_theme(); + DLG_COLOR(title, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(searchbox_title, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(position_indicator, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(tag, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(tag_key, COLOR_BLUE, COLOR_WHITE, true); + +} + +/* + * Select color theme + */ +static int set_theme(const char *theme) +{ + int use_color = 1; + if (!theme) + set_bluetitle_theme(); + else if (strcmp(theme, "classic") == 0) + set_classic_theme(); + else if (strcmp(theme, "bluetitle") == 0) + set_bluetitle_theme(); + else if (strcmp(theme, "blackbg") == 0) + set_blackbg_theme(); + else if (strcmp(theme, "mono") == 0) + use_color = 0; + + return use_color; +} + +static void init_one_color(struct dialog_color *color) +{ + static int pair = 0; + + pair++; + init_pair(pair, color->fg, color->bg); + if (color->hl) + color->atr = A_BOLD | COLOR_PAIR(pair); + else + color->atr = COLOR_PAIR(pair); +} + +static void init_dialog_colors(void) +{ + init_one_color(&dlg.screen); + init_one_color(&dlg.shadow); + init_one_color(&dlg.dialog); + init_one_color(&dlg.title); + init_one_color(&dlg.border); + init_one_color(&dlg.button_active); + init_one_color(&dlg.button_inactive); + init_one_color(&dlg.button_key_active); + init_one_color(&dlg.button_key_inactive); + init_one_color(&dlg.button_label_active); + init_one_color(&dlg.button_label_inactive); + init_one_color(&dlg.inputbox); + init_one_color(&dlg.inputbox_border); + init_one_color(&dlg.searchbox); + init_one_color(&dlg.searchbox_title); + init_one_color(&dlg.searchbox_border); + init_one_color(&dlg.position_indicator); + init_one_color(&dlg.menubox); + init_one_color(&dlg.menubox_border); + init_one_color(&dlg.item); + init_one_color(&dlg.item_selected); + init_one_color(&dlg.tag); + init_one_color(&dlg.tag_selected); + init_one_color(&dlg.tag_key); + init_one_color(&dlg.tag_key_selected); + init_one_color(&dlg.check); + init_one_color(&dlg.check_selected); + init_one_color(&dlg.uarrow); + init_one_color(&dlg.darrow); +} + +/* + * Setup for color display + */ +static void color_setup(const char *theme) +{ + int use_color; + + use_color = set_theme(theme); + if (use_color && has_colors()) { + start_color(); + init_dialog_colors(); + } else + set_mono_theme(); +} + +/* + * Set window to attribute 'attr' + */ +void attr_clear(WINDOW * win, int height, int width, chtype attr) +{ + int i, j; + + wattrset(win, attr); + for (i = 0; i < height; i++) { + wmove(win, i, 0); + for (j = 0; j < width; j++) + waddch(win, ' '); + } + touchwin(win); +} + +void dialog_clear(void) +{ + int lines, columns; + + lines = getmaxy(stdscr); + columns = getmaxx(stdscr); + + attr_clear(stdscr, lines, columns, dlg.screen.atr); + /* Display background title if it exists ... - SLH */ + if (dlg.backtitle != NULL) { + int i, len = 0, skip = 0; + struct subtitle_list *pos; + + wattrset(stdscr, dlg.screen.atr); + mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle); + + for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { + /* 3 is for the arrow and spaces */ + len += strlen(pos->text) + 3; + } + + wmove(stdscr, 1, 1); + if (len > columns - 2) { + const char *ellipsis = "[...] "; + waddstr(stdscr, ellipsis); + skip = len - (columns - 2 - strlen(ellipsis)); + } + + for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { + if (skip == 0) + waddch(stdscr, ACS_RARROW); + else + skip--; + + if (skip == 0) + waddch(stdscr, ' '); + else + skip--; + + if (skip < strlen(pos->text)) { + waddstr(stdscr, pos->text + skip); + skip = 0; + } else + skip -= strlen(pos->text); + + if (skip == 0) + waddch(stdscr, ' '); + else + skip--; + } + + for (i = len + 1; i < columns - 1; i++) + waddch(stdscr, ACS_HLINE); + } + wnoutrefresh(stdscr); +} + +/* + * Do some initialization for dialog + */ +int init_dialog(const char *backtitle) +{ + int height, width; + + initscr(); /* Init curses */ + + /* Get current cursor position for signal handler in mconf.c */ + getyx(stdscr, saved_y, saved_x); + + getmaxyx(stdscr, height, width); + if (height < WINDOW_HEIGTH_MIN || width < WINDOW_WIDTH_MIN) { + endwin(); + return -ERRDISPLAYTOOSMALL; + } + + dlg.backtitle = backtitle; + color_setup(getenv("MENUCONFIG_COLOR")); + + keypad(stdscr, TRUE); + cbreak(); + noecho(); + dialog_clear(); + + return 0; +} + +void set_dialog_backtitle(const char *backtitle) +{ + dlg.backtitle = backtitle; +} + +void set_dialog_subtitles(struct subtitle_list *subtitles) +{ + dlg.subtitles = subtitles; +} + +/* + * End using dialog functions. + */ +void end_dialog(int x, int y) +{ + /* move cursor back to original position */ + move(y, x); + refresh(); + endwin(); +} + +/* Print the title of the dialog. Center the title and truncate + * tile if wider than dialog (- 2 chars). + **/ +void print_title(WINDOW *dialog, const char *title, int width) +{ + if (title) { + int tlen = MIN(width - 2, strlen(title)); + wattrset(dialog, dlg.title.atr); + mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' '); + mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen); + waddch(dialog, ' '); + } +} + +/* + * Print a string of text in a window, automatically wrap around to the + * next line if the string is too long to fit on one line. Newline + * characters '\n' are propperly processed. We start on a new line + * if there is no room for at least 4 nonblanks following a double-space. + */ +void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) +{ + int newl, cur_x, cur_y; + int prompt_len, room, wlen; + char tempstr[MAX_LEN + 1], *word, *sp, *sp2, *newline_separator = 0; + + strcpy(tempstr, prompt); + + prompt_len = strlen(tempstr); + + if (prompt_len <= width - x * 2) { /* If prompt is short */ + wmove(win, y, (width - prompt_len) / 2); + waddstr(win, tempstr); + } else { + cur_x = x; + cur_y = y; + newl = 1; + word = tempstr; + while (word && *word) { + sp = strpbrk(word, "\n "); + if (sp && *sp == '\n') + newline_separator = sp; + + if (sp) + *sp++ = 0; + + /* Wrap to next line if either the word does not fit, + or it is the first word of a new sentence, and it is + short, and the next word does not fit. */ + room = width - cur_x; + wlen = strlen(word); + if (wlen > room || + (newl && wlen < 4 && sp + && wlen + 1 + strlen(sp) > room + && (!(sp2 = strpbrk(sp, "\n ")) + || wlen + 1 + (sp2 - sp) > room))) { + cur_y++; + cur_x = x; + } + wmove(win, cur_y, cur_x); + waddstr(win, word); + getyx(win, cur_y, cur_x); + + /* Move to the next line if the word separator was a newline */ + if (newline_separator) { + cur_y++; + cur_x = x; + newline_separator = 0; + } else + cur_x++; + + if (sp && *sp == ' ') { + cur_x++; /* double space */ + while (*++sp == ' ') ; + newl = 1; + } else + newl = 0; + word = sp; + } + } +} + +/* + * Print a button + */ +void print_button(WINDOW * win, const char *label, int y, int x, int selected) +{ + int i, temp; + + wmove(win, y, x); + wattrset(win, selected ? dlg.button_active.atr + : dlg.button_inactive.atr); + waddstr(win, "<"); + temp = strspn(label, " "); + label += temp; + wattrset(win, selected ? dlg.button_label_active.atr + : dlg.button_label_inactive.atr); + for (i = 0; i < temp; i++) + waddch(win, ' '); + wattrset(win, selected ? dlg.button_key_active.atr + : dlg.button_key_inactive.atr); + waddch(win, label[0]); + wattrset(win, selected ? dlg.button_label_active.atr + : dlg.button_label_inactive.atr); + waddstr(win, (char *)label + 1); + wattrset(win, selected ? dlg.button_active.atr + : dlg.button_inactive.atr); + waddstr(win, ">"); + wmove(win, y, x + temp + 1); +} + +/* + * Draw a rectangular box with line drawing characters + */ +void +draw_box(WINDOW * win, int y, int x, int height, int width, + chtype box, chtype border) +{ + int i, j; + + wattrset(win, 0); + for (i = 0; i < height; i++) { + wmove(win, y + i, x); + for (j = 0; j < width; j++) + if (!i && !j) + waddch(win, border | ACS_ULCORNER); + else if (i == height - 1 && !j) + waddch(win, border | ACS_LLCORNER); + else if (!i && j == width - 1) + waddch(win, box | ACS_URCORNER); + else if (i == height - 1 && j == width - 1) + waddch(win, box | ACS_LRCORNER); + else if (!i) + waddch(win, border | ACS_HLINE); + else if (i == height - 1) + waddch(win, box | ACS_HLINE); + else if (!j) + waddch(win, border | ACS_VLINE); + else if (j == width - 1) + waddch(win, box | ACS_VLINE); + else + waddch(win, box | ' '); + } +} + +/* + * Draw shadows along the right and bottom edge to give a more 3D look + * to the boxes + */ +void draw_shadow(WINDOW * win, int y, int x, int height, int width) +{ + int i; + + if (has_colors()) { /* Whether terminal supports color? */ + wattrset(win, dlg.shadow.atr); + wmove(win, y + height, x + 2); + for (i = 0; i < width; i++) + waddch(win, winch(win) & A_CHARTEXT); + for (i = y + 1; i < y + height + 1; i++) { + wmove(win, i, x + width); + waddch(win, winch(win) & A_CHARTEXT); + waddch(win, winch(win) & A_CHARTEXT); + } + wnoutrefresh(win); + } +} + +/* + * Return the position of the first alphabetic character in a string. + */ +int first_alpha(const char *string, const char *exempt) +{ + int i, in_paren = 0, c; + + for (i = 0; i < strlen(string); i++) { + c = tolower(string[i]); + + if (strchr("<[(", c)) + ++in_paren; + if (strchr(">])", c) && in_paren > 0) + --in_paren; + + if ((!in_paren) && isalpha(c) && strchr(exempt, c) == 0) + return i; + } + + return 0; +} + +/* + * ncurses uses ESC to detect escaped char sequences. This resutl in + * a small timeout before ESC is actually delivered to the application. + * lxdialog suggest which is correctly translated to two + * times esc. But then we need to ignore the second esc to avoid stepping + * out one menu too much. Filter away all escaped key sequences since + * keypad(FALSE) turn off ncurses support for escape sequences - and thats + * needed to make notimeout() do as expected. + */ +int on_key_esc(WINDOW *win) +{ + int key; + int key2; + int key3; + + nodelay(win, TRUE); + keypad(win, FALSE); + key = wgetch(win); + key2 = wgetch(win); + do { + key3 = wgetch(win); + } while (key3 != ERR); + nodelay(win, FALSE); + keypad(win, TRUE); + if (key == KEY_ESC && key2 == ERR) + return KEY_ESC; + else if (key != ERR && key != KEY_ESC && key2 == ERR) + ungetch(key); + + return -1; +} + +/* redraw screen in new size */ +int on_key_resize(void) +{ + dialog_clear(); + return KEY_RESIZE; +} + +struct dialog_list *item_cur; +struct dialog_list item_nil; +struct dialog_list *item_head; + +void item_reset(void) +{ + struct dialog_list *p, *next; + + for (p = item_head; p; p = next) { + next = p->next; + free(p); + } + item_head = NULL; + item_cur = &item_nil; +} + +void item_make(const char *fmt, ...) +{ + va_list ap; + struct dialog_list *p = malloc(sizeof(*p)); + + if (item_head) + item_cur->next = p; + else + item_head = p; + item_cur = p; + memset(p, 0, sizeof(*p)); + + va_start(ap, fmt); + vsnprintf(item_cur->node.str, sizeof(item_cur->node.str), fmt, ap); + va_end(ap); +} + +void item_add_str(const char *fmt, ...) +{ + va_list ap; + size_t avail; + + avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str); + + va_start(ap, fmt); + vsnprintf(item_cur->node.str + strlen(item_cur->node.str), + avail, fmt, ap); + item_cur->node.str[sizeof(item_cur->node.str) - 1] = '\0'; + va_end(ap); +} + +void item_set_tag(char tag) +{ + item_cur->node.tag = tag; +} +void item_set_data(void *ptr) +{ + item_cur->node.data = ptr; +} + +void item_set_selected(int val) +{ + item_cur->node.selected = val; +} + +int item_activate_selected(void) +{ + item_foreach() + if (item_is_selected()) + return 1; + return 0; +} + +void *item_data(void) +{ + return item_cur->node.data; +} + +char item_tag(void) +{ + return item_cur->node.tag; +} + +int item_count(void) +{ + int n = 0; + struct dialog_list *p; + + for (p = item_head; p; p = p->next) + n++; + return n; +} + +void item_set(int n) +{ + int i = 0; + item_foreach() + if (i++ == n) + return; +} + +int item_n(void) +{ + int n = 0; + struct dialog_list *p; + + for (p = item_head; p; p = p->next) { + if (p == item_cur) + return n; + n++; + } + return 0; +} + +const char *item_str(void) +{ + return item_cur->node.str; +} + +int item_is_selected(void) +{ + return (item_cur->node.selected != 0); +} + +int item_is_tag(char tag) +{ + return (item_cur->node.tag == tag); +} diff --git a/support/kconfig/lxdialog/yesno.c b/support/kconfig/lxdialog/yesno.c new file mode 100644 index 00000000..676fb2f8 --- /dev/null +++ b/support/kconfig/lxdialog/yesno.c @@ -0,0 +1,114 @@ +/* + * yesno.c -- implements the yes/no box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +/* + * Display termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 10; + int y = height - 2; + + print_button(dialog, gettext(" Yes "), y, x, selected == 0); + print_button(dialog, gettext(" No "), y, x + 13, selected == 1); + + wmove(dialog, y, x + 1 + 13 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box with two buttons - Yes and No + */ +int dialog_yesno(const char *title, const char *prompt, int height, int width) +{ + int i, x, y, key = 0, button = 0; + WINDOW *dialog; + +do_resize: + if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN)) + return -ERRDISPLAYTOOSMALL; + if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN)) + return -ERRDISPLAYTOOSMALL; + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dlg.dialog.atr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + print_buttons(dialog, height, width, 0); + + while (key != KEY_ESC) { + key = wgetch(dialog); + switch (key) { + case 'Y': + case 'y': + delwin(dialog); + return 0; + case 'N': + case 'n': + delwin(dialog); + return 1; + + case TAB: + case KEY_LEFT: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh(dialog); + break; + case ' ': + case '\n': + delwin(dialog); + return button; + case KEY_ESC: + key = on_key_esc(dialog); + break; + case KEY_RESIZE: + delwin(dialog); + on_key_resize(); + goto do_resize; + } + } + + delwin(dialog); + return key; /* ESC pressed */ +} diff --git a/support/kconfig/mconf.c b/support/kconfig/mconf.c new file mode 100644 index 00000000..279f4552 --- /dev/null +++ b/support/kconfig/mconf.c @@ -0,0 +1,1047 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + * + * Introduced single menu mode (show all sub-menus in one large tree). + * 2002-11-06 Petr Baudis + * + * i18n, 2005, Arnaldo Carvalho de Melo + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lkc.h" +#include "lxdialog/dialog.h" + +static const char mconf_readme[] = N_( +"Overview\n" +"--------\n" +"This interface lets you select features and parameters for the build.\n" +"Features can either be built-in, modularized, or ignored. Parameters\n" +"must be entered in as decimal or hexadecimal numbers or text.\n" +"\n" +"Menu items beginning with following braces represent features that\n" +" [ ] can be built in or removed\n" +" < > can be built in, modularized or removed\n" +" { } can be built in or modularized (selected by other feature)\n" +" - - are selected by other feature,\n" +"while *, M or whitespace inside braces means to build in, build as\n" +"a module or to exclude the feature respectively.\n" +"\n" +"To change any of these features, highlight it with the cursor\n" +"keys and press to build it in, to make it a module or\n" +" to remove it. You may also press the to cycle\n" +"through the available options (i.e. Y->N->M->Y).\n" +"\n" +"Some additional keyboard hints:\n" +"\n" +"Menus\n" +"----------\n" +"o Use the Up/Down arrow keys (cursor keys) to highlight the item you\n" +" wish to change or the submenu you wish to select and press .\n" +" Submenus are designated by \"--->\", empty ones by \"----\".\n" +"\n" +" Shortcut: Press the option's highlighted letter (hotkey).\n" +" Pressing a hotkey more than once will sequence\n" +" through all visible items which use that hotkey.\n" +"\n" +" You may also use the and keys to scroll\n" +" unseen options into view.\n" +"\n" +"o To exit a menu use the cursor keys to highlight the button\n" +" and press .\n" +"\n" +" Shortcut: Press or or if there is no hotkey\n" +" using those letters. You may press a single , but\n" +" there is a delayed response which you may find annoying.\n" +"\n" +" Also, the and cursor keys will cycle between and\n" +" \n" +"\n" +"\n" +"Data Entry\n" +"-----------\n" +"o Enter the requested information and press \n" +" If you are entering hexadecimal values, it is not necessary to\n" +" add the '0x' prefix to the entry.\n" +"\n" +"o For help, use the or cursor keys to highlight the help option\n" +" and press . You can try as well.\n" +"\n" +"\n" +"Text Box (Help Window)\n" +"--------\n" +"o Use the cursor keys to scroll up/down/left/right. The VI editor\n" +" keys h,j,k,l function here as do , , and for\n" +" those who are familiar with less and lynx.\n" +"\n" +"o Press , , , or to exit.\n" +"\n" +"\n" +"Alternate Configuration Files\n" +"-----------------------------\n" +"Menuconfig supports the use of alternate configuration files for\n" +"those who, for various reasons, find it necessary to switch\n" +"between different configurations.\n" +"\n" +"The button will let you save the current configuration to\n" +"a file of your choosing. Use the button to load a previously\n" +"saved alternate configuration.\n" +"\n" +"Even if you don't use alternate configuration files, but you find\n" +"during a Menuconfig session that you have completely messed up your\n" +"settings, you may use the button to restore your previously\n" +"saved settings from \".config\" without restarting Menuconfig.\n" +"\n" +"Other information\n" +"-----------------\n" +"If you use Menuconfig in an XTERM window, make sure you have your\n" +"$TERM variable set to point to an xterm definition which supports\n" +"color. Otherwise, Menuconfig will look rather bad. Menuconfig will\n" +"not display correctly in an RXVT window because rxvt displays only one\n" +"intensity of color, bright.\n" +"\n" +"Menuconfig will display larger menus on screens or xterms which are\n" +"set to display more than the standard 25 row by 80 column geometry.\n" +"In order for this to work, the \"stty size\" command must be able to\n" +"display the screen's current row and column geometry. I STRONGLY\n" +"RECOMMEND that you make sure you do NOT have the shell variables\n" +"LINES and COLUMNS exported into your environment. Some distributions\n" +"export those variables via /etc/profile. Some ncurses programs can\n" +"become confused when those variables (LINES & COLUMNS) don't reflect\n" +"the true screen size.\n" +"\n" +"Optional personality available\n" +"------------------------------\n" +"If you prefer to have all of the options listed in a single menu,\n" +"rather than the default multimenu hierarchy, run the menuconfig with\n" +"MENUCONFIG_MODE environment variable set to single_menu. Example:\n" +"\n" +"make MENUCONFIG_MODE=single_menu menuconfig\n" +"\n" +" will then unroll the appropriate category, or enfold it if it\n" +"is already unrolled.\n" +"\n" +"Note that this mode can eventually be a little more CPU expensive\n" +"(especially with a larger number of unrolled categories) than the\n" +"default mode.\n" +"\n" +"Different color themes available\n" +"--------------------------------\n" +"It is possible to select different color themes using the variable\n" +"MENUCONFIG_COLOR. To select a theme use:\n" +"\n" +"make MENUCONFIG_COLOR= menuconfig\n" +"\n" +"Available themes are\n" +" mono => selects colors suitable for monochrome displays\n" +" blackbg => selects a color scheme with black background\n" +" classic => theme with blue background. The classic look\n" +" bluetitle => an LCD friendly version of classic. (default)\n" +"\n"), +menu_instructions[] = N_( + "Arrow keys navigate the menu. " + " selects submenus ---> (or empty submenus ----). " + "Highlighted letters are hotkeys. " + "Pressing selects a feature, while excludes a feature. " + "Press to exit, for Help, for Search. " + "Legend: [*] feature is selected [ ] feature is excluded"), +radiolist_instructions[] = N_( + "Use the arrow keys to navigate this window or " + "press the hotkey of the item you wish to select " + "followed by the . " + "Press for additional information about this option."), +inputbox_instructions_int[] = N_( + "Please enter a decimal value. " + "Fractions will not be accepted. " + "Use the key to move from the input field to the buttons below it."), +inputbox_instructions_hex[] = N_( + "Please enter a hexadecimal value. " + "Use the key to move from the input field to the buttons below it."), +inputbox_instructions_string[] = N_( + "Please enter a string value. " + "Use the key to move from the input field to the buttons below it."), +setmod_text[] = N_( + "This feature depends on another which has been configured as a module.\n" + "As a result, this feature will be built as a module."), +load_config_text[] = N_( + "Enter the name of the configuration file you wish to load. " + "Accept the name shown to restore the configuration you " + "last retrieved. Leave blank to abort."), +load_config_help[] = N_( + "\n" + "For various reasons, one may wish to keep several different\n" + "configurations available on a single machine.\n" + "\n" + "If you have saved a previous configuration in a file other than the\n" + "default one, entering its name here will allow you to modify that\n" + "configuration.\n" + "\n" + "If you are uncertain, then you have probably never used alternate\n" + "configuration files. You should therefore leave this blank to abort.\n"), +save_config_text[] = N_( + "Enter a filename to which this configuration should be saved " + "as an alternate. Leave blank to abort."), +save_config_help[] = N_( + "\n" + "For various reasons, one may wish to keep different configurations\n" + "available on a single machine.\n" + "\n" + "Entering a file name here will allow you to later retrieve, modify\n" + "and use the current configuration as an alternate to whatever\n" + "configuration options you have selected at that time.\n" + "\n" + "If you are uncertain what all this means then you should probably\n" + "leave this blank.\n"), +search_help[] = N_( + "\n" + "Search for symbols and display their relations.\n" + "Regular expressions are allowed.\n" + "Example: search for \"^FOO\"\n" + "Result:\n" + "-----------------------------------------------------------------\n" + "Symbol: FOO [=m]\n" + "Type : tristate\n" + "Prompt: Foo bus is used to drive the bar HW\n" + " Location:\n" + " -> Bus options (PCI, PCMCIA, EISA, ISA)\n" + " -> PCI support (PCI [=y])\n" + "(1) -> PCI access mode ( [=y])\n" + " Defined at drivers/pci/Kconfig:47\n" + " Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" + " Selects: LIBCRC32\n" + " Selected by: BAR [=n]\n" + "-----------------------------------------------------------------\n" + "o The line 'Type:' shows the type of the configuration option for\n" + " this symbol (bool, tristate, string, ...)\n" + "o The line 'Prompt:' shows the text used in the menu structure for\n" + " this symbol\n" + "o The 'Defined at' line tells at what file / line number the symbol\n" + " is defined\n" + "o The 'Depends on:' line tells what symbols need to be defined for\n" + " this symbol to be visible in the menu (selectable)\n" + "o The 'Location:' lines tells where in the menu structure this symbol\n" + " is located\n" + " A location followed by a [=y] indicates that this is a\n" + " selectable menu item - and the current value is displayed inside\n" + " brackets.\n" + " Press the key in the (#) prefix to jump directly to that\n" + " location. You will be returned to the current search results\n" + " after exiting this new menu.\n" + "o The 'Selects:' line tells what symbols will be automatically\n" + " selected if this symbol is selected (y or m)\n" + "o The 'Selected by' line tells what symbol has selected this symbol\n" + "\n" + "Only relevant lines are shown.\n" + "\n\n" + "Search examples:\n" + "Examples: USB => find all symbols containing USB\n" + " ^USB => find all symbols starting with USB\n" + " USB$ => find all symbols ending with USB\n" + "\n"); + +static int indent; +static struct menu *current_menu; +static int child_count; +static int single_menu_mode; +static int show_all_options; +static int save_and_exit; +static int silent; + +static void conf(struct menu *menu, struct menu *active_menu); +static void conf_choice(struct menu *menu); +static void conf_string(struct menu *menu); +static void conf_load(void); +static void conf_save(void); +static int show_textbox_ext(const char *title, char *text, int r, int c, + int *keys, int *vscroll, int *hscroll, + update_text_fn update_text, void *data); +static void show_textbox(const char *title, const char *text, int r, int c); +static void show_helptext(const char *title, const char *text); +static void show_help(struct menu *menu); + +static char filename[PATH_MAX+1]; +static void set_config_filename(const char *config_filename) +{ + static char menu_backtitle[PATH_MAX+128]; + int size; + + size = snprintf(menu_backtitle, sizeof(menu_backtitle), + "%s - %s", config_filename, rootmenu.prompt->text); + if (size >= sizeof(menu_backtitle)) + menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; + set_dialog_backtitle(menu_backtitle); + + size = snprintf(filename, sizeof(filename), "%s", config_filename); + if (size >= sizeof(filename)) + filename[sizeof(filename)-1] = '\0'; +} + +struct subtitle_part { + struct list_head entries; + const char *text; +}; +static LIST_HEAD(trail); + +static struct subtitle_list *subtitles; +static void set_subtitle(void) +{ + struct subtitle_part *sp; + struct subtitle_list *pos, *tmp; + + for (pos = subtitles; pos != NULL; pos = tmp) { + tmp = pos->next; + free(pos); + } + + subtitles = NULL; + list_for_each_entry(sp, &trail, entries) { + if (sp->text) { + if (pos) { + pos->next = xcalloc(1, sizeof(*pos)); + pos = pos->next; + } else { + subtitles = pos = xcalloc(1, sizeof(*pos)); + } + pos->text = sp->text; + } + } + + set_dialog_subtitles(subtitles); +} + +static void reset_subtitle(void) +{ + struct subtitle_list *pos, *tmp; + + for (pos = subtitles; pos != NULL; pos = tmp) { + tmp = pos->next; + free(pos); + } + subtitles = NULL; + set_dialog_subtitles(subtitles); +} + +struct search_data { + struct list_head *head; + struct menu **targets; + int *keys; +}; + +static void update_text(char *buf, size_t start, size_t end, void *_data) +{ + struct search_data *data = _data; + struct jump_key *pos; + int k = 0; + + list_for_each_entry(pos, data->head, entries) { + if (pos->offset >= start && pos->offset < end) { + char header[4]; + + if (k < JUMP_NB) { + int key = '0' + (pos->index % JUMP_NB) + 1; + + sprintf(header, "(%c)", key); + data->keys[k] = key; + data->targets[k] = pos->target; + k++; + } else { + sprintf(header, " "); + } + + memcpy(buf + pos->offset, header, sizeof(header) - 1); + } + } + data->keys[k] = 0; +} + +static void search_conf(void) +{ + struct symbol **sym_arr; + struct gstr res; + struct gstr title; + char *dialog_input; + int dres, vscroll = 0, hscroll = 0; + bool again; + struct gstr sttext; + struct subtitle_part stpart; + + title = str_new(); + str_printf( &title, _("Enter (sub)string or regexp to search for " + "(with or without \"%s\")"), CONFIG_); + +again: + dialog_clear(); + dres = dialog_inputbox(_("Search Configuration Parameter"), + str_get(&title), + 10, 75, ""); + switch (dres) { + case 0: + break; + case 1: + show_helptext(_("Search Configuration"), search_help); + goto again; + default: + str_free(&title); + return; + } + + /* strip the prefix if necessary */ + dialog_input = dialog_input_result; + if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) + dialog_input += strlen(CONFIG_); + + sttext = str_new(); + str_printf(&sttext, "Search (%s)", dialog_input_result); + stpart.text = str_get(&sttext); + list_add_tail(&stpart.entries, &trail); + + sym_arr = sym_re_search(dialog_input); + do { + LIST_HEAD(head); + struct menu *targets[JUMP_NB]; + int keys[JUMP_NB + 1], i; + struct search_data data = { + .head = &head, + .targets = targets, + .keys = keys, + }; + struct jump_key *pos, *tmp; + + res = get_relations_str(sym_arr, &head); + set_subtitle(); + dres = show_textbox_ext(_("Search Results"), (char *) + str_get(&res), 0, 0, keys, &vscroll, + &hscroll, &update_text, (void *) + &data); + again = false; + for (i = 0; i < JUMP_NB && keys[i]; i++) + if (dres == keys[i]) { + conf(targets[i]->parent, targets[i]); + again = true; + } + str_free(&res); + list_for_each_entry_safe(pos, tmp, &head, entries) + free(pos); + } while (again); + free(sym_arr); + str_free(&title); + list_del(trail.prev); + str_free(&sttext); +} + +static void build_conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + int type, tmp, doint = 2; + tristate val; + char ch; + bool visible; + + /* + * note: menu_is_visible() has side effect that it will + * recalc the value of the symbol. + */ + visible = menu_is_visible(menu); + if (show_all_options && !menu_has_prompt(menu)) + return; + else if (!show_all_options && !visible) + return; + + sym = menu->sym; + prop = menu->prompt; + if (!sym) { + if (prop && menu != current_menu) { + const char *prompt = menu_get_prompt(menu); + switch (prop->type) { + case P_MENU: + child_count++; + prompt = _(prompt); + if (single_menu_mode) { + item_make("%s%*c%s", + menu->data ? "-->" : "++>", + indent + 1, ' ', prompt); + } else + item_make(" %*c%s %s", + indent + 1, ' ', prompt, + menu_is_empty(menu) ? "----" : "--->"); + item_set_tag('m'); + item_set_data(menu); + if (single_menu_mode && menu->data) + goto conf_childs; + return; + case P_COMMENT: + if (prompt) { + child_count++; + item_make(" %*c*** %s ***", indent + 1, ' ', _(prompt)); + item_set_tag(':'); + item_set_data(menu); + } + break; + default: + if (prompt) { + child_count++; + item_make("---%*c%s", indent + 1, ' ', _(prompt)); + item_set_tag(':'); + item_set_data(menu); + } + } + } else + doint = 0; + goto conf_childs; + } + + type = sym_get_type(sym); + if (sym_is_choice(sym)) { + struct symbol *def_sym = sym_get_choice_value(sym); + struct menu *def_menu = NULL; + + child_count++; + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child) && child->sym == def_sym) + def_menu = child; + } + + val = sym_get_tristate_value(sym); + if (sym_is_changable(sym)) { + switch (type) { + case S_BOOLEAN: + item_make("[%c]", val == no ? ' ' : '*'); + break; + case S_TRISTATE: + switch (val) { + case yes: ch = '*'; break; + case mod: ch = 'M'; break; + default: ch = ' '; break; + } + item_make("<%c>", ch); + break; + } + item_set_tag('t'); + item_set_data(menu); + } else { + item_make(" "); + item_set_tag(def_menu ? 't' : ':'); + item_set_data(menu); + } + + item_add_str("%*c%s", indent + 1, ' ', _(menu_get_prompt(menu))); + if (val == yes) { + if (def_menu) { + item_add_str(" (%s)", _(menu_get_prompt(def_menu))); + item_add_str(" --->"); + if (def_menu->list) { + indent += 2; + build_conf(def_menu); + indent -= 2; + } + } + return; + } + } else { + if (menu == current_menu) { + item_make("---%*c%s", indent + 1, ' ', _(menu_get_prompt(menu))); + item_set_tag(':'); + item_set_data(menu); + goto conf_childs; + } + child_count++; + val = sym_get_tristate_value(sym); + if (sym_is_choice_value(sym) && val == yes) { + item_make(" "); + item_set_tag(':'); + item_set_data(menu); + } else { + switch (type) { + case S_BOOLEAN: + if (sym_is_changable(sym)) + item_make("[%c]", val == no ? ' ' : '*'); + else + item_make("-%c-", val == no ? ' ' : '*'); + item_set_tag('t'); + item_set_data(menu); + break; + case S_TRISTATE: + switch (val) { + case yes: ch = '*'; break; + case mod: ch = 'M'; break; + default: ch = ' '; break; + } + if (sym_is_changable(sym)) { + if (sym->rev_dep.tri == mod) + item_make("{%c}", ch); + else + item_make("<%c>", ch); + } else + item_make("-%c-", ch); + item_set_tag('t'); + item_set_data(menu); + break; + default: + tmp = 2 + strlen(sym_get_string_value(sym)); /* () = 2 */ + item_make("(%s)", sym_get_string_value(sym)); + tmp = indent - tmp + 4; + if (tmp < 0) + tmp = 0; + item_add_str("%*c%s%s", tmp, ' ', _(menu_get_prompt(menu)), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : _(" (NEW)")); + item_set_tag('s'); + item_set_data(menu); + goto conf_childs; + } + } + item_add_str("%*c%s%s", indent + 1, ' ', _(menu_get_prompt(menu)), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : _(" (NEW)")); + if (menu->prompt->type == P_MENU) { + item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); + return; + } + } + +conf_childs: + indent += doint; + for (child = menu->list; child; child = child->next) + build_conf(child); + indent -= doint; +} + +static void conf(struct menu *menu, struct menu *active_menu) +{ + struct menu *submenu; + const char *prompt = menu_get_prompt(menu); + struct subtitle_part stpart; + struct symbol *sym; + int res; + int s_scroll = 0; + + if (menu != &rootmenu) + stpart.text = menu_get_prompt(menu); + else + stpart.text = NULL; + list_add_tail(&stpart.entries, &trail); + + while (1) { + item_reset(); + current_menu = menu; + build_conf(menu); + if (!child_count) + break; + set_subtitle(); + dialog_clear(); + res = dialog_menu(prompt ? _(prompt) : _("Main Menu"), + _(menu_instructions), + active_menu, &s_scroll); + if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) + break; + if (item_count() != 0) { + if (!item_activate_selected()) + continue; + if (!item_tag()) + continue; + } + submenu = item_data(); + active_menu = item_data(); + if (submenu) + sym = submenu->sym; + else + sym = NULL; + + switch (res) { + case 0: + switch (item_tag()) { + case 'm': + if (single_menu_mode) + submenu->data = (void *) (long) !submenu->data; + else + conf(submenu, NULL); + break; + case 't': + if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes) + conf_choice(submenu); + else if (submenu->prompt->type == P_MENU) + conf(submenu, NULL); + break; + case 's': + conf_string(submenu); + break; + } + break; + case 2: + if (sym) + show_help(submenu); + else { + reset_subtitle(); + show_helptext(_("README"), _(mconf_readme)); + } + break; + case 3: + reset_subtitle(); + conf_save(); + break; + case 4: + reset_subtitle(); + conf_load(); + break; + case 5: + if (item_is_tag('t')) { + if (sym_set_tristate_value(sym, yes)) + break; + if (sym_set_tristate_value(sym, mod)) + show_textbox(NULL, setmod_text, 6, 74); + } + break; + case 6: + if (item_is_tag('t')) + sym_set_tristate_value(sym, no); + break; + case 7: + if (item_is_tag('t')) + sym_set_tristate_value(sym, mod); + break; + case 8: + if (item_is_tag('t')) + sym_toggle_tristate_value(sym); + else if (item_is_tag('m')) + conf(submenu, NULL); + break; + case 9: + search_conf(); + break; + case 10: + show_all_options = !show_all_options; + break; + } + } + + list_del(trail.prev); +} + +static int show_textbox_ext(const char *title, char *text, int r, int c, int + *keys, int *vscroll, int *hscroll, update_text_fn + update_text, void *data) +{ + dialog_clear(); + return dialog_textbox(title, text, r, c, keys, vscroll, hscroll, + update_text, data); +} + +static void show_textbox(const char *title, const char *text, int r, int c) +{ + show_textbox_ext(title, (char *) text, r, c, (int []) {0}, NULL, NULL, + NULL, NULL); +} + +static void show_helptext(const char *title, const char *text) +{ + show_textbox(title, text, 0, 0); +} + +static void conf_message_callback(const char *fmt, va_list ap) +{ + char buf[PATH_MAX+1]; + + vsnprintf(buf, sizeof(buf), fmt, ap); + if (save_and_exit) { + if (!silent) + printf("%s", buf); + } else { + show_textbox(NULL, buf, 6, 60); + } +} + +static void show_help(struct menu *menu) +{ + struct gstr help = str_new(); + + help.max_width = getmaxx(stdscr) - 10; + menu_get_ext_help(menu, &help); + + show_helptext(_(menu_get_prompt(menu)), str_get(&help)); + str_free(&help); +} + +static void conf_choice(struct menu *menu) +{ + const char *prompt = _(menu_get_prompt(menu)); + struct menu *child; + struct symbol *active; + + active = sym_get_choice_value(menu->sym); + while (1) { + int res; + int selected; + item_reset(); + + current_menu = menu; + for (child = menu->list; child; child = child->next) { + if (!menu_is_visible(child)) + continue; + if (child->sym) + item_make("%s", _(menu_get_prompt(child))); + else { + item_make("*** %s ***", _(menu_get_prompt(child))); + item_set_tag(':'); + } + item_set_data(child); + if (child->sym == active) + item_set_selected(1); + if (child->sym == sym_get_choice_value(menu->sym)) + item_set_tag('X'); + } + dialog_clear(); + res = dialog_checklist(prompt ? _(prompt) : _("Main Menu"), + _(radiolist_instructions), + MENUBOX_HEIGTH_MIN, + MENUBOX_WIDTH_MIN, + CHECKLIST_HEIGTH_MIN); + selected = item_activate_selected(); + switch (res) { + case 0: + if (selected) { + child = item_data(); + if (!child->sym) + break; + + sym_set_tristate_value(child->sym, yes); + } + return; + case 1: + if (selected) { + child = item_data(); + show_help(child); + active = child->sym; + } else + show_help(menu); + break; + case KEY_ESC: + return; + case -ERRDISPLAYTOOSMALL: + return; + } + } +} + +static void conf_string(struct menu *menu) +{ + const char *prompt = menu_get_prompt(menu); + + while (1) { + int res; + const char *heading; + + switch (sym_get_type(menu->sym)) { + case S_INT: + heading = _(inputbox_instructions_int); + break; + case S_HEX: + heading = _(inputbox_instructions_hex); + break; + case S_STRING: + heading = _(inputbox_instructions_string); + break; + default: + heading = _("Internal mconf error!"); + } + dialog_clear(); + res = dialog_inputbox(prompt ? _(prompt) : _("Main Menu"), + heading, 10, 75, + sym_get_string_value(menu->sym)); + switch (res) { + case 0: + if (sym_set_string_value(menu->sym, dialog_input_result)) + return; + show_textbox(NULL, _("You have made an invalid entry."), 5, 43); + break; + case 1: + show_help(menu); + break; + case KEY_ESC: + return; + } + } +} + +static void conf_load(void) +{ + + while (1) { + int res; + dialog_clear(); + res = dialog_inputbox(NULL, load_config_text, + 11, 55, filename); + switch(res) { + case 0: + if (!dialog_input_result[0]) + return; + if (!conf_read(dialog_input_result)) { + set_config_filename(dialog_input_result); + sym_set_change_count(1); + return; + } + show_textbox(NULL, _("File does not exist!"), 5, 38); + break; + case 1: + show_helptext(_("Load Alternate Configuration"), load_config_help); + break; + case KEY_ESC: + return; + } + } +} + +static void conf_save(void) +{ + while (1) { + int res; + dialog_clear(); + res = dialog_inputbox(NULL, save_config_text, + 11, 55, filename); + switch(res) { + case 0: + if (!dialog_input_result[0]) + return; + if (!conf_write(dialog_input_result)) { + set_config_filename(dialog_input_result); + return; + } + show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60); + break; + case 1: + show_helptext(_("Save Alternate Configuration"), save_config_help); + break; + case KEY_ESC: + return; + } + } +} + +static int handle_exit(void) +{ + int res; + + save_and_exit = 1; + reset_subtitle(); + dialog_clear(); + if (conf_get_changed()) + res = dialog_yesno(NULL, + _("Do you wish to save your new configuration?\n" + "(Press to continue Buildroot configuration.)"), + 6, 60); + else + res = -1; + + end_dialog(saved_x, saved_y); + + switch (res) { + case 0: + if (conf_write(filename)) { + fprintf(stderr, _("\n\n" + "Error while writing of the configuration.\n" + "Your configuration changes were NOT saved." + "\n\n")); + return 1; + } + /* fall through */ + case -1: + if (!silent) + printf(_("\n\n" + "*** End of the configuration.\n" + "*** Execute 'make' to start the build or try 'make help'." + "\n\n")); + res = 0; + break; + default: + if (!silent) + fprintf(stderr, _("\n\n" + "Your configuration changes were NOT saved." + "\n\n")); + if (res != KEY_ESC) + res = 0; + } + + return res; +} + +static void sig_handler(int signo) +{ + exit(handle_exit()); +} + +int main(int ac, char **av) +{ + char *mode; + int res; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + signal(SIGINT, sig_handler); + + if (ac > 1 && strcmp(av[1], "-s") == 0) { + silent = 1; + /* Silence conf_read() until the real callback is set up */ + conf_set_message_callback(NULL); + av++; + } + conf_parse(av[1]); + conf_read(NULL); + + mode = getenv("MENUCONFIG_MODE"); + if (mode) { + if (!strcasecmp(mode, "single_menu")) + single_menu_mode = 1; + } + + if (init_dialog(NULL)) { + fprintf(stderr, N_("Your display is too small to run Menuconfig!\n")); + fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n")); + return 1; + } + + set_config_filename(conf_get_configname()); + conf_set_message_callback(conf_message_callback); + do { + conf(&rootmenu, NULL); + res = handle_exit(); + } while (res == KEY_ESC); + + return res; +} diff --git a/support/kconfig/menu.c b/support/kconfig/menu.c new file mode 100644 index 00000000..5c5c1374 --- /dev/null +++ b/support/kconfig/menu.c @@ -0,0 +1,873 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include + +#include "lkc.h" + +static const char nohelp_text[] = "There is no help available for this option."; + +struct menu rootmenu; +static struct menu **last_entry_ptr; + +struct file *file_list; +struct file *current_file; + +void menu_warn(struct menu *menu, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", menu->file->name, menu->lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +static void prop_warn(struct property *prop, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +void _menu_init(void) +{ + current_entry = current_menu = &rootmenu; + last_entry_ptr = &rootmenu.list; +} + +void menu_add_entry(struct symbol *sym) +{ + struct menu *menu; + + menu = xmalloc(sizeof(*menu)); + memset(menu, 0, sizeof(*menu)); + menu->sym = sym; + menu->parent = current_menu; + menu->file = current_file; + menu->lineno = zconf_lineno(); + + *last_entry_ptr = menu; + last_entry_ptr = &menu->next; + current_entry = menu; + if (sym) + menu_add_symbol(P_SYMBOL, sym, NULL); +} + +struct menu *menu_add_menu(void) +{ + last_entry_ptr = ¤t_entry->list; + return current_menu = current_entry; +} + +void menu_end_menu(void) +{ + last_entry_ptr = ¤t_menu->next; + current_menu = current_menu->parent; +} + +/* + * Rewrites 'm' to 'm' && MODULES, so that it evaluates to 'n' when running + * without modules + */ +static struct expr *rewrite_m(struct expr *e) +{ + if (!e) + return e; + + switch (e->type) { + case E_NOT: + e->left.expr = rewrite_m(e->left.expr); + break; + case E_OR: + case E_AND: + e->left.expr = rewrite_m(e->left.expr); + e->right.expr = rewrite_m(e->right.expr); + break; + case E_SYMBOL: + /* change 'm' into 'm' && MODULES */ + if (e->left.sym == &symbol_mod) + return expr_alloc_and(e, expr_alloc_symbol(modules_sym)); + break; + default: + break; + } + return e; +} + +void menu_add_dep(struct expr *dep) +{ + current_entry->dep = expr_alloc_and(current_entry->dep, dep); +} + +void menu_set_type(int type) +{ + struct symbol *sym = current_entry->sym; + + if (sym->type == type) + return; + if (sym->type == S_UNKNOWN) { + sym->type = type; + return; + } + menu_warn(current_entry, + "ignoring type redefinition of '%s' from '%s' to '%s'", + sym->name ? sym->name : "", + sym_type_name(sym->type), sym_type_name(type)); +} + +static struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) +{ + struct property *prop = prop_alloc(type, current_entry->sym); + + prop->menu = current_entry; + prop->expr = expr; + prop->visible.expr = dep; + + if (prompt) { + if (isspace(*prompt)) { + prop_warn(prop, "leading whitespace ignored"); + while (isspace(*prompt)) + prompt++; + } + if (current_entry->prompt && current_entry != &rootmenu) + prop_warn(prop, "prompt redefined"); + + /* Apply all upper menus' visibilities to actual prompts. */ + if(type == P_PROMPT) { + struct menu *menu = current_entry; + + while ((menu = menu->parent) != NULL) { + struct expr *dup_expr; + + if (!menu->visibility) + continue; + /* + * Do not add a reference to the + * menu's visibility expression but + * use a copy of it. Otherwise the + * expression reduction functions + * will modify expressions that have + * multiple references which can + * cause unwanted side effects. + */ + dup_expr = expr_copy(menu->visibility); + + prop->visible.expr + = expr_alloc_and(prop->visible.expr, + dup_expr); + } + } + + current_entry->prompt = prop; + } + prop->text = prompt; + + return prop; +} + +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) +{ + return menu_add_prop(type, prompt, NULL, dep); +} + +void menu_add_visibility(struct expr *expr) +{ + current_entry->visibility = expr_alloc_and(current_entry->visibility, + expr); +} + +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) +{ + menu_add_prop(type, NULL, expr, dep); +} + +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) +{ + menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); +} + +void menu_add_option(int token, char *arg) +{ + switch (token) { + case T_OPT_MODULES: + if (modules_sym) + zconf_error("symbol '%s' redefines option 'modules'" + " already defined by symbol '%s'", + current_entry->sym->name, + modules_sym->name + ); + modules_sym = current_entry->sym; + break; + case T_OPT_DEFCONFIG_LIST: + if (!sym_defconfig_list) + sym_defconfig_list = current_entry->sym; + else if (sym_defconfig_list != current_entry->sym) + zconf_error("trying to redefine defconfig symbol"); + sym_defconfig_list->flags |= SYMBOL_AUTO; + break; + case T_OPT_ENV: + prop_add_env(arg); + break; + case T_OPT_ALLNOCONFIG_Y: + current_entry->sym->flags |= SYMBOL_ALLNOCONFIG_Y; + break; + } +} + +static int menu_validate_number(struct symbol *sym, struct symbol *sym2) +{ + return sym2->type == S_INT || sym2->type == S_HEX || + (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); +} + +static void sym_check_prop(struct symbol *sym) +{ + struct property *prop; + struct symbol *sym2; + char *use; + + for (prop = sym->prop; prop; prop = prop->next) { + switch (prop->type) { + case P_DEFAULT: + if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) && + prop->expr->type != E_SYMBOL) + prop_warn(prop, + "default for config symbol '%s'" + " must be a single symbol", sym->name); + if (prop->expr->type != E_SYMBOL) + break; + sym2 = prop_get_symbol(prop); + if (sym->type == S_HEX || sym->type == S_INT) { + if (!menu_validate_number(sym, sym2)) + prop_warn(prop, + "'%s': number is invalid", + sym->name); + } + if (sym_is_choice(sym)) { + struct property *choice_prop = + sym_get_choice_prop(sym2); + + if (!choice_prop || + prop_get_symbol(choice_prop) != sym) + prop_warn(prop, + "choice default symbol '%s' is not contained in the choice", + sym2->name); + } + break; + case P_SELECT: + case P_IMPLY: + use = prop->type == P_SELECT ? "select" : "imply"; + sym2 = prop_get_symbol(prop); + if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) + prop_warn(prop, + "config symbol '%s' uses %s, but is " + "not bool or tristate", sym->name, use); + else if (sym2->type != S_UNKNOWN && + sym2->type != S_BOOLEAN && + sym2->type != S_TRISTATE) + prop_warn(prop, + "'%s' has wrong type. '%s' only " + "accept arguments of bool and " + "tristate type", sym2->name, use); + break; + case P_RANGE: + if (sym->type != S_INT && sym->type != S_HEX) + prop_warn(prop, "range is only allowed " + "for int or hex symbols"); + if (!menu_validate_number(sym, prop->expr->left.sym) || + !menu_validate_number(sym, prop->expr->right.sym)) + prop_warn(prop, "range is invalid"); + break; + default: + ; + } + } +} + +void menu_finalize(struct menu *parent) +{ + struct menu *menu, *last_menu; + struct symbol *sym; + struct property *prop; + struct expr *parentdep, *basedep, *dep, *dep2, **ep; + + sym = parent->sym; + if (parent->list) { + /* + * This menu node has children. We (recursively) process them + * and propagate parent dependencies before moving on. + */ + + if (sym && sym_is_choice(sym)) { + if (sym->type == S_UNKNOWN) { + /* find the first choice value to find out choice type */ + current_entry = parent; + for (menu = parent->list; menu; menu = menu->next) { + if (menu->sym && menu->sym->type != S_UNKNOWN) { + menu_set_type(menu->sym->type); + break; + } + } + } + /* set the type of the remaining choice values */ + for (menu = parent->list; menu; menu = menu->next) { + current_entry = menu; + if (menu->sym && menu->sym->type == S_UNKNOWN) + menu_set_type(sym->type); + } + + /* + * Use the choice itself as the parent dependency of + * the contained items. This turns the mode of the + * choice into an upper bound on the visibility of the + * choice value symbols. + */ + parentdep = expr_alloc_symbol(sym); + } else if (parent->prompt) + /* Menu node for 'menu' */ + parentdep = parent->prompt->visible.expr; + else + /* Menu node for 'if' */ + parentdep = parent->dep; + + /* For each child menu node... */ + for (menu = parent->list; menu; menu = menu->next) { + /* + * Propagate parent dependencies to the child menu + * node, also rewriting and simplifying expressions + */ + basedep = rewrite_m(menu->dep); + basedep = expr_transform(basedep); + basedep = expr_alloc_and(expr_copy(parentdep), basedep); + basedep = expr_eliminate_dups(basedep); + menu->dep = basedep; + + if (menu->sym) + /* + * Note: For symbols, all prompts are included + * too in the symbol's own property list + */ + prop = menu->sym->prop; + else + /* + * For non-symbol menu nodes, we just need to + * handle the prompt + */ + prop = menu->prompt; + + /* For each property... */ + for (; prop; prop = prop->next) { + if (prop->menu != menu) + /* + * Two possibilities: + * + * 1. The property lacks dependencies + * and so isn't location-specific, + * e.g. an 'option' + * + * 2. The property belongs to a symbol + * defined in multiple locations and + * is from some other location. It + * will be handled there in that + * case. + * + * Skip the property. + */ + continue; + + /* + * Propagate parent dependencies to the + * property's condition, rewriting and + * simplifying expressions at the same time + */ + dep = rewrite_m(prop->visible.expr); + dep = expr_transform(dep); + dep = expr_alloc_and(expr_copy(basedep), dep); + dep = expr_eliminate_dups(dep); + if (menu->sym && menu->sym->type != S_TRISTATE) + dep = expr_trans_bool(dep); + prop->visible.expr = dep; + + /* + * Handle selects and implies, which modify the + * dependencies of the selected/implied symbol + */ + if (prop->type == P_SELECT) { + struct symbol *es = prop_get_symbol(prop); + es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, + expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); + } else if (prop->type == P_IMPLY) { + struct symbol *es = prop_get_symbol(prop); + es->implied.expr = expr_alloc_or(es->implied.expr, + expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); + } + } + } + + if (sym && sym_is_choice(sym)) + expr_free(parentdep); + + /* + * Recursively process children in the same fashion before + * moving on + */ + for (menu = parent->list; menu; menu = menu->next) + menu_finalize(menu); + } else if (sym) { + /* + * Automatic submenu creation. If sym is a symbol and A, B, C, + * ... are consecutive items (symbols, menus, ifs, etc.) that + * all depend on sym, then the following menu structure is + * created: + * + * sym + * +-A + * +-B + * +-C + * ... + * + * This also works recursively, giving the following structure + * if A is a symbol and B depends on A: + * + * sym + * +-A + * | +-B + * +-C + * ... + */ + + basedep = parent->prompt ? parent->prompt->visible.expr : NULL; + basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); + basedep = expr_eliminate_dups(expr_transform(basedep)); + + /* Examine consecutive elements after sym */ + last_menu = NULL; + for (menu = parent->next; menu; menu = menu->next) { + dep = menu->prompt ? menu->prompt->visible.expr : menu->dep; + if (!expr_contains_symbol(dep, sym)) + /* No dependency, quit */ + break; + if (expr_depends_symbol(dep, sym)) + /* Absolute dependency, put in submenu */ + goto next; + + /* + * Also consider it a dependency on sym if our + * dependencies contain sym and are a "superset" of + * sym's dependencies, e.g. '(sym || Q) && R' when sym + * depends on R. + * + * Note that 'R' might be from an enclosing menu or if, + * making this a more common case than it might seem. + */ + dep = expr_trans_compare(dep, E_UNEQUAL, &symbol_no); + dep = expr_eliminate_dups(expr_transform(dep)); + dep2 = expr_copy(basedep); + expr_eliminate_eq(&dep, &dep2); + expr_free(dep); + if (!expr_is_yes(dep2)) { + /* Not superset, quit */ + expr_free(dep2); + break; + } + /* Superset, put in submenu */ + expr_free(dep2); + next: + menu_finalize(menu); + menu->parent = parent; + last_menu = menu; + } + expr_free(basedep); + if (last_menu) { + parent->list = parent->next; + parent->next = last_menu->next; + last_menu->next = NULL; + } + + sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep); + } + for (menu = parent->list; menu; menu = menu->next) { + if (sym && sym_is_choice(sym) && + menu->sym && !sym_is_choice_value(menu->sym)) { + current_entry = menu; + menu->sym->flags |= SYMBOL_CHOICEVAL; + if (!menu->prompt) + menu_warn(menu, "choice value must have a prompt"); + for (prop = menu->sym->prop; prop; prop = prop->next) { + if (prop->type == P_DEFAULT) + prop_warn(prop, "defaults for choice " + "values not supported"); + if (prop->menu == menu) + continue; + if (prop->type == P_PROMPT && + prop->menu->parent->sym != sym) + prop_warn(prop, "choice value used outside its choice group"); + } + /* Non-tristate choice values of tristate choices must + * depend on the choice being set to Y. The choice + * values' dependencies were propagated to their + * properties above, so the change here must be re- + * propagated. + */ + if (sym->type == S_TRISTATE && menu->sym->type != S_TRISTATE) { + basedep = expr_alloc_comp(E_EQUAL, sym, &symbol_yes); + menu->dep = expr_alloc_and(basedep, menu->dep); + for (prop = menu->sym->prop; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + prop->visible.expr = expr_alloc_and(expr_copy(basedep), + prop->visible.expr); + } + } + menu_add_symbol(P_CHOICE, sym, NULL); + prop = sym_get_choice_prop(sym); + for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) + ; + *ep = expr_alloc_one(E_LIST, NULL); + (*ep)->right.sym = menu->sym; + } + + /* + * This code serves two purposes: + * + * (1) Flattening 'if' blocks, which do not specify a submenu + * and only add dependencies. + * + * (Automatic submenu creation might still create a submenu + * from an 'if' before this code runs.) + * + * (2) "Undoing" any automatic submenus created earlier below + * promptless symbols. + * + * Before: + * + * A + * if ... (or promptless symbol) + * +-B + * +-C + * D + * + * After: + * + * A + * if ... (or promptless symbol) + * B + * C + * D + */ + if (menu->list && (!menu->prompt || !menu->prompt->text)) { + for (last_menu = menu->list; ; last_menu = last_menu->next) { + last_menu->parent = parent; + if (!last_menu->next) + break; + } + last_menu->next = menu->next; + menu->next = menu->list; + menu->list = NULL; + } + } + + if (sym && !(sym->flags & SYMBOL_WARNED)) { + if (sym->type == S_UNKNOWN) + menu_warn(parent, "config symbol defined without type"); + + if (sym_is_choice(sym) && !parent->prompt) + menu_warn(parent, "choice must have a prompt"); + + /* Check properties connected to this symbol */ + sym_check_prop(sym); + sym->flags |= SYMBOL_WARNED; + } + + /* + * For non-optional choices, add a reverse dependency (corresponding to + * a select) of ' && m'. This prevents the user from + * setting the choice mode to 'n' when the choice is visible. + * + * This would also work for non-choice symbols, but only non-optional + * choices clear SYMBOL_OPTIONAL as of writing. Choices are implemented + * as a type of symbol. + */ + if (sym && !sym_is_optional(sym) && parent->prompt) { + sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, + expr_alloc_and(parent->prompt->visible.expr, + expr_alloc_symbol(&symbol_mod))); + } +} + +bool menu_has_prompt(struct menu *menu) +{ + if (!menu->prompt) + return false; + return true; +} + +/* + * Determine if a menu is empty. + * A menu is considered empty if it contains no or only + * invisible entries. + */ +bool menu_is_empty(struct menu *menu) +{ + struct menu *child; + + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child)) + return(false); + } + return(true); +} + +bool menu_is_visible(struct menu *menu) +{ + struct menu *child; + struct symbol *sym; + tristate visible; + + if (!menu->prompt) + return false; + + if (menu->visibility) { + if (expr_calc_value(menu->visibility) == no) + return false; + } + + sym = menu->sym; + if (sym) { + sym_calc_value(sym); + visible = menu->prompt->visible.tri; + } else + visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr); + + if (visible != no) + return true; + + if (!sym || sym_get_tristate_value(menu->sym) == no) + return false; + + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child)) { + if (sym) + sym->flags |= SYMBOL_DEF_USER; + return true; + } + } + + return false; +} + +const char *menu_get_prompt(struct menu *menu) +{ + if (menu->prompt) + return menu->prompt->text; + else if (menu->sym) + return menu->sym->name; + return NULL; +} + +struct menu *menu_get_root_menu(struct menu *menu) +{ + return &rootmenu; +} + +struct menu *menu_get_parent_menu(struct menu *menu) +{ + enum prop_type type; + + for (; menu != &rootmenu; menu = menu->parent) { + type = menu->prompt ? menu->prompt->type : 0; + if (type == P_MENU) + break; + } + return menu; +} + +bool menu_has_help(struct menu *menu) +{ + return menu->help != NULL; +} + +const char *menu_get_help(struct menu *menu) +{ + if (menu->help) + return menu->help; + else + return ""; +} + +static void get_prompt_str(struct gstr *r, struct property *prop, + struct list_head *head) +{ + int i, j; + struct menu *submenu[8], *menu, *location = NULL; + struct jump_key *jump = NULL; + + str_printf(r, _("Prompt: %s\n"), _(prop->text)); + menu = prop->menu->parent; + for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) { + bool accessible = menu_is_visible(menu); + + submenu[i++] = menu; + if (location == NULL && accessible) + location = menu; + } + if (head && location) { + jump = xmalloc(sizeof(struct jump_key)); + + if (menu_is_visible(prop->menu)) { + /* + * There is not enough room to put the hint at the + * beginning of the "Prompt" line. Put the hint on the + * last "Location" line even when it would belong on + * the former. + */ + jump->target = prop->menu; + } else + jump->target = location; + + if (list_empty(head)) + jump->index = 0; + else + jump->index = list_entry(head->prev, struct jump_key, + entries)->index + 1; + + list_add_tail(&jump->entries, head); + } + + if (i > 0) { + str_printf(r, _(" Location:\n")); + for (j = 4; --i >= 0; j += 2) { + menu = submenu[i]; + if (jump && menu == location) + jump->offset = strlen(r->s); + str_printf(r, "%*c-> %s", j, ' ', + _(menu_get_prompt(menu))); + if (menu->sym) { + str_printf(r, " (%s [=%s])", menu->sym->name ? + menu->sym->name : _(""), + sym_get_string_value(menu->sym)); + } + str_append(r, "\n"); + } + } +} + +/* + * get property of type P_SYMBOL + */ +static struct property *get_symbol_prop(struct symbol *sym) +{ + struct property *prop = NULL; + + for_all_properties(sym, prop, P_SYMBOL) + break; + return prop; +} + +static void get_symbol_props_str(struct gstr *r, struct symbol *sym, + enum prop_type tok, const char *prefix) +{ + bool hit = false; + struct property *prop; + + for_all_properties(sym, prop, tok) { + if (!hit) { + str_append(r, prefix); + hit = true; + } else + str_printf(r, " && "); + expr_gstr_print(prop->expr, r); + } + if (hit) + str_append(r, "\n"); +} + +/* + * head is optional and may be NULL + */ +static void get_symbol_str(struct gstr *r, struct symbol *sym, + struct list_head *head) +{ + struct property *prop; + + if (sym && sym->name) { + str_printf(r, "Symbol: %s [=%s]\n", sym->name, + sym_get_string_value(sym)); + str_printf(r, "Type : %s\n", sym_type_name(sym->type)); + if (sym->type == S_INT || sym->type == S_HEX) { + prop = sym_get_range_prop(sym); + if (prop) { + str_printf(r, "Range : "); + expr_gstr_print(prop->expr, r); + str_append(r, "\n"); + } + } + } + for_all_prompts(sym, prop) + get_prompt_str(r, prop, head); + + prop = get_symbol_prop(sym); + if (prop) { + str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name, + prop->menu->lineno); + if (!expr_is_yes(prop->visible.expr)) { + str_append(r, _(" Depends on: ")); + expr_gstr_print(prop->visible.expr, r); + str_append(r, "\n"); + } + } + + get_symbol_props_str(r, sym, P_SELECT, _(" Selects: ")); + if (sym->rev_dep.expr) { + expr_gstr_print_revdep(sym->rev_dep.expr, r, yes, " Selected by [y]:\n"); + expr_gstr_print_revdep(sym->rev_dep.expr, r, mod, " Selected by [m]:\n"); + expr_gstr_print_revdep(sym->rev_dep.expr, r, no, " Selected by [n]:\n"); + } + + get_symbol_props_str(r, sym, P_IMPLY, _(" Implies: ")); + if (sym->implied.expr) { + expr_gstr_print_revdep(sym->implied.expr, r, yes, " Implied by [y]:\n"); + expr_gstr_print_revdep(sym->implied.expr, r, mod, " Implied by [m]:\n"); + expr_gstr_print_revdep(sym->implied.expr, r, no, " Implied by [n]:\n"); + } + + str_append(r, "\n\n"); +} + +struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head) +{ + struct symbol *sym; + struct gstr res = str_new(); + int i; + + for (i = 0; sym_arr && (sym = sym_arr[i]); i++) + get_symbol_str(&res, sym, head); + if (!i) + str_append(&res, _("No matches found.\n")); + return res; +} + + +void menu_get_ext_help(struct menu *menu, struct gstr *help) +{ + struct symbol *sym = menu->sym; + const char *help_text = nohelp_text; + + if (menu_has_help(menu)) { + if (sym->name) + str_printf(help, "%s%s:\n\n", CONFIG_, sym->name); + help_text = menu_get_help(menu); + } + str_printf(help, "%s\n", _(help_text)); + if (sym) + get_symbol_str(help, sym, NULL); +} diff --git a/support/kconfig/merge_config.sh b/support/kconfig/merge_config.sh new file mode 100755 index 00000000..14917806 --- /dev/null +++ b/support/kconfig/merge_config.sh @@ -0,0 +1,182 @@ +#!/bin/sh +# merge_config.sh - Takes a list of config fragment values, and merges +# them one by one. Provides warnings on overridden values, and specified +# values that did not make it to the resulting .config file (due to missed +# dependencies or config symbol removal). +# +# Portions reused from kconf_check and generate_cfg: +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/kconf_check +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/generate_cfg +# +# Copyright (c) 2009-2010 Wind River Systems, Inc. +# Copyright 2011 Linaro +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License for more details. + +clean_up() { + rm -f $TMP_FILE + exit +} +trap clean_up HUP INT TERM + +usage() { + echo "Usage: $0 [OPTIONS] [CONFIG [...]]" + echo " -h display this help text" + echo " -m only merge the fragments, do not execute the make command" + echo " -n use allnoconfig instead of alldefconfig" + echo " -r list redundant entries when merging fragments" + echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead." + echo " -e colon-separated list of br2-external trees to use (optional)" + echo + echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ + environment variable." +} + +RUNMAKE=true +ALLTARGET=alldefconfig +WARNREDUN=false +OUTPUT=. +CONFIG_PREFIX=${CONFIG_-CONFIG_} + +while true; do + case $1 in + "-n") + ALLTARGET=allnoconfig + shift + continue + ;; + "-m") + RUNMAKE=false + shift + continue + ;; + "-h") + usage + exit + ;; + "-r") + WARNREDUN=true + shift + continue + ;; + "-O") + if [ -d $2 ];then + OUTPUT=$(echo $2 | sed 's/\/*$//') + else + echo "output directory $2 does not exist" 1>&2 + exit 1 + fi + shift 2 + continue + ;; + "-e") + EXTERNAL_ARG="BR2_EXTERNAL=$2" + shift 2 + continue + ;; + *) + break + ;; + esac +done + +if [ "$#" -lt 1 ] ; then + usage + exit +fi + +if [ -z "$KCONFIG_CONFIG" ]; then + if [ "$OUTPUT" != . ]; then + KCONFIG_CONFIG=$(readlink -m -- "$OUTPUT/.config") + else + KCONFIG_CONFIG=.config + fi +fi + +INITFILE=$1 +shift; + +if [ ! -r "$INITFILE" ]; then + echo "The base file '$INITFILE' does not exist. Exit." >&2 + exit 1 +fi + +MERGE_LIST=$* +SED_CONFIG_EXP1="s/^\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)=.*/\1/p" +SED_CONFIG_EXP2="s/^# \(${CONFIG_PREFIX}[a-zA-Z0-9_]*\) is not set$/\1/p" + +TMP_FILE=$(mktemp -t .tmp.config.XXXXXXXXXX) + +echo "Using $INITFILE as base" +cat $INITFILE > $TMP_FILE + +# Merge files, printing warnings on overridden values +for MERGE_FILE in $MERGE_LIST ; do + echo "Merging $MERGE_FILE" + if [ ! -r "$MERGE_FILE" ]; then + echo "The merge file '$MERGE_FILE' does not exist. Exit." >&2 + exit 1 + fi + CFG_LIST=$(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $MERGE_FILE) + + for CFG in $CFG_LIST ; do + grep -q -w $CFG $TMP_FILE || continue + PREV_VAL=$(grep -w $CFG $TMP_FILE) + NEW_VAL=$(grep -w $CFG $MERGE_FILE) + if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then + echo Value of $CFG is redefined by fragment $MERGE_FILE: + echo Previous value: $PREV_VAL + echo New value: $NEW_VAL + echo + elif [ "$WARNREDUN" = "true" ]; then + echo Value of $CFG is redundant by fragment $MERGE_FILE: + fi + sed -i "/$CFG[ =]/d" $TMP_FILE + done + cat $MERGE_FILE >> $TMP_FILE +done + +if [ "$RUNMAKE" = "false" ]; then + cp -T -- "$TMP_FILE" "$KCONFIG_CONFIG" + echo "#" + echo "# merged configuration written to $KCONFIG_CONFIG (needs make)" + echo "#" + clean_up + exit +fi + +# If we have an output dir, setup the O= argument, otherwise leave +# it blank, since O=. will create an unnecessary ./source softlink +OUTPUT_ARG="" +if [ "$OUTPUT" != "." ] ; then + OUTPUT_ARG="O=$OUTPUT" +fi + + +# Use the merged file as the starting point for: +# alldefconfig: Fills in any missing symbols with Kconfig default +# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set +make KCONFIG_ALLCONFIG=$TMP_FILE $EXTERNAL_ARG $OUTPUT_ARG $ALLTARGET + + +# Check all specified config values took (might have missed-dependency issues) +for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do + + REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) + ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG") + if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then + echo "Value requested for $CFG not in final .config" + echo "Requested value: $REQUESTED_VAL" + echo "Actual value: $ACTUAL_VAL" + echo "" + fi +done + +clean_up diff --git a/support/kconfig/nconf.c b/support/kconfig/nconf.c new file mode 100644 index 00000000..00311477 --- /dev/null +++ b/support/kconfig/nconf.c @@ -0,0 +1,1563 @@ +/* + * Copyright (C) 2008 Nir Tzachar +#include + +#include "lkc.h" +#include "nconf.h" +#include + +static const char nconf_global_help[] = N_( +"Help windows\n" +"------------\n" +"o Global help: Unless in a data entry window, pressing will give \n" +" you the global help window, which you are just reading.\n" +"\n" +"o A short version of the global help is available by pressing .\n" +"\n" +"o Local help: To get help related to the current menu entry, use any\n" +" of , or if in a data entry window then press .\n" +"\n" +"\n" +"Menu entries\n" +"------------\n" +"This interface lets you select features and parameters for the kernel\n" +"build. Kernel features can either be built-in, modularized, or removed.\n" +"Parameters must be entered as text or decimal or hexadecimal numbers.\n" +"\n" +"Menu entries beginning with following braces represent features that\n" +" [ ] can be built in or removed\n" +" < > can be built in, modularized or removed\n" +" { } can be built in or modularized, are selected by another feature\n" +" - - are selected by another feature\n" +" XXX cannot be selected. Symbol Info tells you why.\n" +"*, M or whitespace inside braces means to build in, build as a module\n" +"or to exclude the feature respectively.\n" +"\n" +"To change any of these features, highlight it with the movement keys\n" +"listed below and press to build it in, to make it a module or\n" +" to remove it. You may press the key to cycle through the\n" +"available options.\n" +"\n" +"A trailing \"--->\" designates a submenu, a trailing \"----\" an\n" +"empty submenu.\n" +"\n" +"Menu navigation keys\n" +"----------------------------------------------------------------------\n" +"Linewise up \n" +"Linewise down \n" +"Pagewise up \n" +"Pagewise down \n" +"First entry \n" +"Last entry \n" +"Enter a submenu \n" +"Go back to parent menu \n" +"Close a help window \n" +"Close entry window, apply \n" +"Close entry window, forget \n" +"Start incremental, case-insensitive search for STRING in menu entries,\n" +" no regex support, STRING is displayed in upper left corner\n" +" STRING\n" +" Remove last character \n" +" Jump to next hit \n" +" Jump to previous hit \n" +"Exit menu search mode \n" +"Search for configuration variables with or without leading CONFIG_\n" +" RegExpr\n" +"Verbose search help \n" +"----------------------------------------------------------------------\n" +"\n" +"Unless in a data entry window, key <1> may be used instead of ,\n" +"<2> instead of , etc.\n" +"\n" +"\n" +"Radiolist (Choice list)\n" +"-----------------------\n" +"Use the movement keys listed above to select the option you wish to set\n" +"and press .\n" +"\n" +"\n" +"Data entry\n" +"----------\n" +"Enter the requested information and press . Hexadecimal values\n" +"may be entered without the \"0x\" prefix.\n" +"\n" +"\n" +"Text Box (Help Window)\n" +"----------------------\n" +"Use movement keys as listed in table above.\n" +"\n" +"Press any of to exit.\n" +"\n" +"\n" +"Alternate configuration files\n" +"-----------------------------\n" +"nconfig supports switching between different configurations.\n" +"Press to save your current configuration. Press and enter\n" +"a file name to load a previously saved configuration.\n" +"\n" +"\n" +"Terminal configuration\n" +"----------------------\n" +"If you use nconfig in a xterm window, make sure your TERM environment\n" +"variable specifies a terminal configuration which supports at least\n" +"16 colors. Otherwise nconfig will look rather bad.\n" +"\n" +"If the \"stty size\" command reports the current terminalsize correctly,\n" +"nconfig will adapt to sizes larger than the traditional 80x25 \"standard\"\n" +"and display longer menus properly.\n" +"\n" +"\n" +"Single menu mode\n" +"----------------\n" +"If you prefer to have all of the menu entries listed in a single menu,\n" +"rather than the default multimenu hierarchy, run nconfig with\n" +"NCONFIG_MODE environment variable set to single_menu. Example:\n" +"\n" +"make NCONFIG_MODE=single_menu nconfig\n" +"\n" +" will then unfold the appropriate category, or fold it if it\n" +"is already unfolded. Folded menu entries will be designated by a\n" +"leading \"++>\" and unfolded entries by a leading \"-->\".\n" +"\n" +"Note that this mode can eventually be a little more CPU expensive than\n" +"the default mode, especially with a larger number of unfolded submenus.\n" +"\n"), +menu_no_f_instructions[] = N_( +"Legend: [*] built-in [ ] excluded module < > module capable.\n" +"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n" +"\n" +"Use the following keys to navigate the menus:\n" +"Move up or down with and .\n" +"Enter a submenu with or .\n" +"Exit a submenu to its parent menu with or .\n" +"Pressing includes, excludes, modularizes features.\n" +"Pressing cycles through the available options.\n" +"To search for menu entries press .\n" +" always leaves the current window.\n" +"\n" +"You do not have function keys support.\n" +"Press <1> instead of , <2> instead of , etc.\n" +"For verbose global help use key <1>.\n" +"For help related to the current menu entry press or .\n"), +menu_instructions[] = N_( +"Legend: [*] built-in [ ] excluded module < > module capable.\n" +"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n" +"\n" +"Use the following keys to navigate the menus:\n" +"Move up or down with or .\n" +"Enter a submenu with or .\n" +"Exit a submenu to its parent menu with or .\n" +"Pressing includes, excludes, modularizes features.\n" +"Pressing cycles through the available options.\n" +"To search for menu entries press .\n" +" always leaves the current window.\n" +"\n" +"Pressing <1> may be used instead of , <2> instead of , etc.\n" +"For verbose global help press .\n" +"For help related to the current menu entry press or .\n"), +radiolist_instructions[] = N_( +"Press , , or to navigate a radiolist, select\n" +"with .\n" +"For help related to the current entry press or .\n" +"For global help press .\n"), +inputbox_instructions_int[] = N_( +"Please enter a decimal value.\n" +"Fractions will not be accepted.\n" +"Press to apply, to cancel."), +inputbox_instructions_hex[] = N_( +"Please enter a hexadecimal value.\n" +"Press to apply, to cancel."), +inputbox_instructions_string[] = N_( +"Please enter a string value.\n" +"Press to apply, to cancel."), +setmod_text[] = N_( +"This feature depends on another feature which has been configured as a\n" +"module. As a result, the current feature will be built as a module too."), +load_config_text[] = N_( +"Enter the name of the configuration file you wish to load.\n" +"Accept the name shown to restore the configuration you last\n" +"retrieved. Leave empty to abort."), +load_config_help[] = N_( +"For various reasons, one may wish to keep several different\n" +"configurations available on a single machine.\n" +"\n" +"If you have saved a previous configuration in a file other than the\n" +"default one, entering its name here will allow you to load and modify\n" +"that configuration.\n" +"\n" +"Leave empty to abort.\n"), +save_config_text[] = N_( +"Enter a filename to which this configuration should be saved\n" +"as an alternate. Leave empty to abort."), +save_config_help[] = N_( +"For various reasons, one may wish to keep several different\n" +"configurations available on a single machine.\n" +"\n" +"Entering a file name here will allow you to later retrieve, modify\n" +"and use the current configuration as an alternate to whatever\n" +"configuration options you have selected at that time.\n" +"\n" +"Leave empty to abort.\n"), +search_help[] = N_( +"Search for symbols (configuration variable names CONFIG_*) and display\n" +"their relations. Regular expressions are supported.\n" +"Example: Search for \"^FOO\".\n" +"Result:\n" +"-----------------------------------------------------------------\n" +"Symbol: FOO [ = m]\n" +"Prompt: Foo bus is used to drive the bar HW\n" +"Defined at drivers/pci/Kconfig:47\n" +"Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" +"Location:\n" +" -> Bus options (PCI, PCMCIA, EISA, ISA)\n" +" -> PCI support (PCI [ = y])\n" +" -> PCI access mode ( [ = y])\n" +"Selects: LIBCRC32\n" +"Selected by: BAR\n" +"-----------------------------------------------------------------\n" +"o The line 'Prompt:' shows the text displayed for this symbol in\n" +" the menu hierarchy.\n" +"o The 'Defined at' line tells at what file / line number the symbol is\n" +" defined.\n" +"o The 'Depends on:' line lists symbols that need to be defined for\n" +" this symbol to be visible and selectable in the menu.\n" +"o The 'Location:' lines tell, where in the menu structure this symbol\n" +" is located. A location followed by a [ = y] indicates that this is\n" +" a selectable menu item, and the current value is displayed inside\n" +" brackets.\n" +"o The 'Selects:' line tells, what symbol will be automatically selected\n" +" if this symbol is selected (y or m).\n" +"o The 'Selected by' line tells what symbol has selected this symbol.\n" +"\n" +"Only relevant lines are shown.\n" +"\n\n" +"Search examples:\n" +"USB => find all symbols containing USB\n" +"^USB => find all symbols starting with USB\n" +"USB$ => find all symbols ending with USB\n" +"\n"); + +struct mitem { + char str[256]; + char tag; + void *usrptr; + int is_visible; +}; + +#define MAX_MENU_ITEMS 4096 +static int show_all_items; +static int indent; +static struct menu *current_menu; +static int child_count; +static int single_menu_mode; +/* the window in which all information appears */ +static WINDOW *main_window; +/* the largest size of the menu window */ +static int mwin_max_lines; +static int mwin_max_cols; +/* the window in which we show option buttons */ +static MENU *curses_menu; +static ITEM *curses_menu_items[MAX_MENU_ITEMS]; +static struct mitem k_menu_items[MAX_MENU_ITEMS]; +static int items_num; +static int global_exit; +/* the currently selected button */ +static const char *current_instructions = menu_instructions; + +static char *dialog_input_result; +static int dialog_input_result_len; + +static void conf(struct menu *menu); +static void conf_choice(struct menu *menu); +static void conf_string(struct menu *menu); +static void conf_load(void); +static void conf_save(void); +static void show_help(struct menu *menu); +static int do_exit(void); +static void setup_windows(void); +static void search_conf(void); + +typedef void (*function_key_handler_t)(int *key, struct menu *menu); +static void handle_f1(int *key, struct menu *current_item); +static void handle_f2(int *key, struct menu *current_item); +static void handle_f3(int *key, struct menu *current_item); +static void handle_f4(int *key, struct menu *current_item); +static void handle_f5(int *key, struct menu *current_item); +static void handle_f6(int *key, struct menu *current_item); +static void handle_f7(int *key, struct menu *current_item); +static void handle_f8(int *key, struct menu *current_item); +static void handle_f9(int *key, struct menu *current_item); + +struct function_keys { + const char *key_str; + const char *func; + function_key key; + function_key_handler_t handler; +}; + +static const int function_keys_num = 9; +static struct function_keys function_keys[] = { + { + .key_str = "F1", + .func = "Help", + .key = F_HELP, + .handler = handle_f1, + }, + { + .key_str = "F2", + .func = "SymInfo", + .key = F_SYMBOL, + .handler = handle_f2, + }, + { + .key_str = "F3", + .func = "Help 2", + .key = F_INSTS, + .handler = handle_f3, + }, + { + .key_str = "F4", + .func = "ShowAll", + .key = F_CONF, + .handler = handle_f4, + }, + { + .key_str = "F5", + .func = "Back", + .key = F_BACK, + .handler = handle_f5, + }, + { + .key_str = "F6", + .func = "Save", + .key = F_SAVE, + .handler = handle_f6, + }, + { + .key_str = "F7", + .func = "Load", + .key = F_LOAD, + .handler = handle_f7, + }, + { + .key_str = "F8", + .func = "SymSearch", + .key = F_SEARCH, + .handler = handle_f8, + }, + { + .key_str = "F9", + .func = "Exit", + .key = F_EXIT, + .handler = handle_f9, + }, +}; + +static void print_function_line(void) +{ + int i; + int offset = 1; + const int skip = 1; + int lines = getmaxy(stdscr); + + for (i = 0; i < function_keys_num; i++) { + (void) wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); + mvwprintw(main_window, lines-3, offset, + "%s", + function_keys[i].key_str); + (void) wattrset(main_window, attributes[FUNCTION_TEXT]); + offset += strlen(function_keys[i].key_str); + mvwprintw(main_window, lines-3, + offset, "%s", + function_keys[i].func); + offset += strlen(function_keys[i].func) + skip; + } + (void) wattrset(main_window, attributes[NORMAL]); +} + +/* help */ +static void handle_f1(int *key, struct menu *current_item) +{ + show_scroll_win(main_window, + _("Global help"), _(nconf_global_help)); + return; +} + +/* symbole help */ +static void handle_f2(int *key, struct menu *current_item) +{ + show_help(current_item); + return; +} + +/* instructions */ +static void handle_f3(int *key, struct menu *current_item) +{ + show_scroll_win(main_window, + _("Short help"), + _(current_instructions)); + return; +} + +/* config */ +static void handle_f4(int *key, struct menu *current_item) +{ + int res = btn_dialog(main_window, + _("Show all symbols?"), + 2, + " ", + ""); + if (res == 0) + show_all_items = 1; + else if (res == 1) + show_all_items = 0; + + return; +} + +/* back */ +static void handle_f5(int *key, struct menu *current_item) +{ + *key = KEY_LEFT; + return; +} + +/* save */ +static void handle_f6(int *key, struct menu *current_item) +{ + conf_save(); + return; +} + +/* load */ +static void handle_f7(int *key, struct menu *current_item) +{ + conf_load(); + return; +} + +/* search */ +static void handle_f8(int *key, struct menu *current_item) +{ + search_conf(); + return; +} + +/* exit */ +static void handle_f9(int *key, struct menu *current_item) +{ + do_exit(); + return; +} + +/* return != 0 to indicate the key was handles */ +static int process_special_keys(int *key, struct menu *menu) +{ + int i; + + if (*key == KEY_RESIZE) { + setup_windows(); + return 1; + } + + for (i = 0; i < function_keys_num; i++) { + if (*key == KEY_F(function_keys[i].key) || + *key == '0' + function_keys[i].key){ + function_keys[i].handler(key, menu); + return 1; + } + } + + return 0; +} + +static void clean_items(void) +{ + int i; + for (i = 0; curses_menu_items[i]; i++) + free_item(curses_menu_items[i]); + bzero(curses_menu_items, sizeof(curses_menu_items)); + bzero(k_menu_items, sizeof(k_menu_items)); + items_num = 0; +} + +typedef enum {MATCH_TINKER_PATTERN_UP, MATCH_TINKER_PATTERN_DOWN, + FIND_NEXT_MATCH_DOWN, FIND_NEXT_MATCH_UP} match_f; + +/* return the index of the matched item, or -1 if no such item exists */ +static int get_mext_match(const char *match_str, match_f flag) +{ + int match_start = item_index(current_item(curses_menu)); + int index; + + if (flag == FIND_NEXT_MATCH_DOWN) + ++match_start; + else if (flag == FIND_NEXT_MATCH_UP) + --match_start; + + index = match_start; + index = (index + items_num) % items_num; + while (true) { + char *str = k_menu_items[index].str; + if (strcasestr(str, match_str) != NULL) + return index; + if (flag == FIND_NEXT_MATCH_UP || + flag == MATCH_TINKER_PATTERN_UP) + --index; + else + ++index; + index = (index + items_num) % items_num; + if (index == match_start) + return -1; + } +} + +/* Make a new item. */ +static void item_make(struct menu *menu, char tag, const char *fmt, ...) +{ + va_list ap; + + if (items_num > MAX_MENU_ITEMS-1) + return; + + bzero(&k_menu_items[items_num], sizeof(k_menu_items[0])); + k_menu_items[items_num].tag = tag; + k_menu_items[items_num].usrptr = menu; + if (menu != NULL) + k_menu_items[items_num].is_visible = + menu_is_visible(menu); + else + k_menu_items[items_num].is_visible = 1; + + va_start(ap, fmt); + vsnprintf(k_menu_items[items_num].str, + sizeof(k_menu_items[items_num].str), + fmt, ap); + va_end(ap); + + if (!k_menu_items[items_num].is_visible) + memcpy(k_menu_items[items_num].str, "XXX", 3); + + curses_menu_items[items_num] = new_item( + k_menu_items[items_num].str, + k_menu_items[items_num].str); + set_item_userptr(curses_menu_items[items_num], + &k_menu_items[items_num]); + /* + if (!k_menu_items[items_num].is_visible) + item_opts_off(curses_menu_items[items_num], O_SELECTABLE); + */ + + items_num++; + curses_menu_items[items_num] = NULL; +} + +/* very hackish. adds a string to the last item added */ +static void item_add_str(const char *fmt, ...) +{ + va_list ap; + int index = items_num-1; + char new_str[256]; + char tmp_str[256]; + + if (index < 0) + return; + + va_start(ap, fmt); + vsnprintf(new_str, sizeof(new_str), fmt, ap); + va_end(ap); + snprintf(tmp_str, sizeof(tmp_str), "%s%s", + k_menu_items[index].str, new_str); + strncpy(k_menu_items[index].str, + tmp_str, + sizeof(k_menu_items[index].str)); + + free_item(curses_menu_items[index]); + curses_menu_items[index] = new_item( + k_menu_items[index].str, + k_menu_items[index].str); + set_item_userptr(curses_menu_items[index], + &k_menu_items[index]); +} + +/* get the tag of the currently selected item */ +static char item_tag(void) +{ + ITEM *cur; + struct mitem *mcur; + + cur = current_item(curses_menu); + if (cur == NULL) + return 0; + mcur = (struct mitem *) item_userptr(cur); + return mcur->tag; +} + +static int curses_item_index(void) +{ + return item_index(current_item(curses_menu)); +} + +static void *item_data(void) +{ + ITEM *cur; + struct mitem *mcur; + + cur = current_item(curses_menu); + if (!cur) + return NULL; + mcur = (struct mitem *) item_userptr(cur); + return mcur->usrptr; + +} + +static int item_is_tag(char tag) +{ + return item_tag() == tag; +} + +static char filename[PATH_MAX+1]; +static char menu_backtitle[PATH_MAX+128]; +static const char *set_config_filename(const char *config_filename) +{ + int size; + + size = snprintf(menu_backtitle, sizeof(menu_backtitle), + "%s - %s", config_filename, rootmenu.prompt->text); + if (size >= sizeof(menu_backtitle)) + menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; + + size = snprintf(filename, sizeof(filename), "%s", config_filename); + if (size >= sizeof(filename)) + filename[sizeof(filename)-1] = '\0'; + return menu_backtitle; +} + +/* return = 0 means we are successful. + * -1 means go on doing what you were doing + */ +static int do_exit(void) +{ + int res; + if (!conf_get_changed()) { + global_exit = 1; + return 0; + } + res = btn_dialog(main_window, + _("Do you wish to save your new configuration?\n" + " to cancel and resume nconfig."), + 2, + " ", + ""); + if (res == KEY_EXIT) { + global_exit = 0; + return -1; + } + + /* if we got here, the user really wants to exit */ + switch (res) { + case 0: + res = conf_write(filename); + if (res) + btn_dialog( + main_window, + _("Error during writing of configuration.\n" + "Your configuration changes were NOT saved."), + 1, + ""); + break; + default: + btn_dialog( + main_window, + _("Your configuration changes were NOT saved."), + 1, + ""); + break; + } + global_exit = 1; + return 0; +} + + +static void search_conf(void) +{ + struct symbol **sym_arr; + struct gstr res; + struct gstr title; + char *dialog_input; + int dres; + + title = str_new(); + str_printf( &title, _("Enter (sub)string or regexp to search for " + "(with or without \"%s\")"), CONFIG_); + +again: + dres = dialog_inputbox(main_window, + _("Search Configuration Parameter"), + str_get(&title), + "", &dialog_input_result, &dialog_input_result_len); + switch (dres) { + case 0: + break; + case 1: + show_scroll_win(main_window, + _("Search Configuration"), search_help); + goto again; + default: + str_free(&title); + return; + } + + /* strip the prefix if necessary */ + dialog_input = dialog_input_result; + if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) + dialog_input += strlen(CONFIG_); + + sym_arr = sym_re_search(dialog_input); + res = get_relations_str(sym_arr, NULL); + free(sym_arr); + show_scroll_win(main_window, + _("Search Results"), str_get(&res)); + str_free(&res); + str_free(&title); +} + + +static void build_conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + int type, tmp, doint = 2; + tristate val; + char ch; + + if (!menu || (!show_all_items && !menu_is_visible(menu))) + return; + + sym = menu->sym; + prop = menu->prompt; + if (!sym) { + if (prop && menu != current_menu) { + const char *prompt = menu_get_prompt(menu); + enum prop_type ptype; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + switch (ptype) { + case P_MENU: + child_count++; + prompt = _(prompt); + if (single_menu_mode) { + item_make(menu, 'm', + "%s%*c%s", + menu->data ? "-->" : "++>", + indent + 1, ' ', prompt); + } else + item_make(menu, 'm', + " %*c%s %s", + indent + 1, ' ', prompt, + menu_is_empty(menu) ? "----" : "--->"); + + if (single_menu_mode && menu->data) + goto conf_childs; + return; + case P_COMMENT: + if (prompt) { + child_count++; + item_make(menu, ':', + " %*c*** %s ***", + indent + 1, ' ', + _(prompt)); + } + break; + default: + if (prompt) { + child_count++; + item_make(menu, ':', "---%*c%s", + indent + 1, ' ', + _(prompt)); + } + } + } else + doint = 0; + goto conf_childs; + } + + type = sym_get_type(sym); + if (sym_is_choice(sym)) { + struct symbol *def_sym = sym_get_choice_value(sym); + struct menu *def_menu = NULL; + + child_count++; + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child) && child->sym == def_sym) + def_menu = child; + } + + val = sym_get_tristate_value(sym); + if (sym_is_changable(sym)) { + switch (type) { + case S_BOOLEAN: + item_make(menu, 't', "[%c]", + val == no ? ' ' : '*'); + break; + case S_TRISTATE: + switch (val) { + case yes: + ch = '*'; + break; + case mod: + ch = 'M'; + break; + default: + ch = ' '; + break; + } + item_make(menu, 't', "<%c>", ch); + break; + } + } else { + item_make(menu, def_menu ? 't' : ':', " "); + } + + item_add_str("%*c%s", indent + 1, + ' ', _(menu_get_prompt(menu))); + if (val == yes) { + if (def_menu) { + item_add_str(" (%s)", + _(menu_get_prompt(def_menu))); + item_add_str(" --->"); + if (def_menu->list) { + indent += 2; + build_conf(def_menu); + indent -= 2; + } + } + return; + } + } else { + if (menu == current_menu) { + item_make(menu, ':', + "---%*c%s", indent + 1, + ' ', _(menu_get_prompt(menu))); + goto conf_childs; + } + child_count++; + val = sym_get_tristate_value(sym); + if (sym_is_choice_value(sym) && val == yes) { + item_make(menu, ':', " "); + } else { + switch (type) { + case S_BOOLEAN: + if (sym_is_changable(sym)) + item_make(menu, 't', "[%c]", + val == no ? ' ' : '*'); + else + item_make(menu, 't', "-%c-", + val == no ? ' ' : '*'); + break; + case S_TRISTATE: + switch (val) { + case yes: + ch = '*'; + break; + case mod: + ch = 'M'; + break; + default: + ch = ' '; + break; + } + if (sym_is_changable(sym)) { + if (sym->rev_dep.tri == mod) + item_make(menu, + 't', "{%c}", ch); + else + item_make(menu, + 't', "<%c>", ch); + } else + item_make(menu, 't', "-%c-", ch); + break; + default: + tmp = 2 + strlen(sym_get_string_value(sym)); + item_make(menu, 's', " (%s)", + sym_get_string_value(sym)); + tmp = indent - tmp + 4; + if (tmp < 0) + tmp = 0; + item_add_str("%*c%s%s", tmp, ' ', + _(menu_get_prompt(menu)), + (sym_has_value(sym) || + !sym_is_changable(sym)) ? "" : + _(" (NEW)")); + goto conf_childs; + } + } + item_add_str("%*c%s%s", indent + 1, ' ', + _(menu_get_prompt(menu)), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : _(" (NEW)")); + if (menu->prompt && menu->prompt->type == P_MENU) { + item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); + return; + } + } + +conf_childs: + indent += doint; + for (child = menu->list; child; child = child->next) + build_conf(child); + indent -= doint; +} + +static void reset_menu(void) +{ + unpost_menu(curses_menu); + clean_items(); +} + +/* adjust the menu to show this item. + * prefer not to scroll the menu if possible*/ +static void center_item(int selected_index, int *last_top_row) +{ + int toprow; + + set_top_row(curses_menu, *last_top_row); + toprow = top_row(curses_menu); + if (selected_index < toprow || + selected_index >= toprow+mwin_max_lines) { + toprow = max(selected_index-mwin_max_lines/2, 0); + if (toprow >= item_count(curses_menu)-mwin_max_lines) + toprow = item_count(curses_menu)-mwin_max_lines; + set_top_row(curses_menu, toprow); + } + set_current_item(curses_menu, + curses_menu_items[selected_index]); + *last_top_row = toprow; + post_menu(curses_menu); + refresh_all_windows(main_window); +} + +/* this function assumes reset_menu has been called before */ +static void show_menu(const char *prompt, const char *instructions, + int selected_index, int *last_top_row) +{ + int maxx, maxy; + WINDOW *menu_window; + + current_instructions = instructions; + + clear(); + (void) wattrset(main_window, attributes[NORMAL]); + print_in_middle(stdscr, 1, 0, getmaxx(stdscr), + menu_backtitle, + attributes[MAIN_HEADING]); + + (void) wattrset(main_window, attributes[MAIN_MENU_BOX]); + box(main_window, 0, 0); + (void) wattrset(main_window, attributes[MAIN_MENU_HEADING]); + mvwprintw(main_window, 0, 3, " %s ", prompt); + (void) wattrset(main_window, attributes[NORMAL]); + + set_menu_items(curses_menu, curses_menu_items); + + /* position the menu at the middle of the screen */ + scale_menu(curses_menu, &maxy, &maxx); + maxx = min(maxx, mwin_max_cols-2); + maxy = mwin_max_lines; + menu_window = derwin(main_window, + maxy, + maxx, + 2, + (mwin_max_cols-maxx)/2); + keypad(menu_window, TRUE); + set_menu_win(curses_menu, menu_window); + set_menu_sub(curses_menu, menu_window); + + /* must reassert this after changing items, otherwise returns to a + * default of 16 + */ + set_menu_format(curses_menu, maxy, 1); + center_item(selected_index, last_top_row); + set_menu_format(curses_menu, maxy, 1); + + print_function_line(); + + /* Post the menu */ + post_menu(curses_menu); + refresh_all_windows(main_window); +} + +static void adj_match_dir(match_f *match_direction) +{ + if (*match_direction == FIND_NEXT_MATCH_DOWN) + *match_direction = + MATCH_TINKER_PATTERN_DOWN; + else if (*match_direction == FIND_NEXT_MATCH_UP) + *match_direction = + MATCH_TINKER_PATTERN_UP; + /* else, do no change.. */ +} + +struct match_state +{ + int in_search; + match_f match_direction; + char pattern[256]; +}; + +/* Return 0 means I have handled the key. In such a case, ans should hold the + * item to center, or -1 otherwise. + * Else return -1 . + */ +static int do_match(int key, struct match_state *state, int *ans) +{ + char c = (char) key; + int terminate_search = 0; + *ans = -1; + if (key == '/' || (state->in_search && key == 27)) { + move(0, 0); + refresh(); + clrtoeol(); + state->in_search = 1-state->in_search; + bzero(state->pattern, sizeof(state->pattern)); + state->match_direction = MATCH_TINKER_PATTERN_DOWN; + return 0; + } else if (!state->in_search) + return 1; + + if (isalnum(c) || isgraph(c) || c == ' ') { + state->pattern[strlen(state->pattern)] = c; + state->pattern[strlen(state->pattern)] = '\0'; + adj_match_dir(&state->match_direction); + *ans = get_mext_match(state->pattern, + state->match_direction); + } else if (key == KEY_DOWN) { + state->match_direction = FIND_NEXT_MATCH_DOWN; + *ans = get_mext_match(state->pattern, + state->match_direction); + } else if (key == KEY_UP) { + state->match_direction = FIND_NEXT_MATCH_UP; + *ans = get_mext_match(state->pattern, + state->match_direction); + } else if (key == KEY_BACKSPACE || key == 127) { + state->pattern[strlen(state->pattern)-1] = '\0'; + adj_match_dir(&state->match_direction); + } else + terminate_search = 1; + + if (terminate_search) { + state->in_search = 0; + bzero(state->pattern, sizeof(state->pattern)); + move(0, 0); + refresh(); + clrtoeol(); + return -1; + } + return 0; +} + +static void conf(struct menu *menu) +{ + struct menu *submenu = NULL; + const char *prompt = menu_get_prompt(menu); + struct symbol *sym; + int res; + int current_index = 0; + int last_top_row = 0; + struct match_state match_state = { + .in_search = 0, + .match_direction = MATCH_TINKER_PATTERN_DOWN, + .pattern = "", + }; + + while (!global_exit) { + reset_menu(); + current_menu = menu; + build_conf(menu); + if (!child_count) + break; + + show_menu(prompt ? _(prompt) : _("Main Menu"), + _(menu_instructions), + current_index, &last_top_row); + keypad((menu_win(curses_menu)), TRUE); + while (!global_exit) { + if (match_state.in_search) { + mvprintw(0, 0, + "searching: %s", match_state.pattern); + clrtoeol(); + } + refresh_all_windows(main_window); + res = wgetch(menu_win(curses_menu)); + if (!res) + break; + if (do_match(res, &match_state, ¤t_index) == 0) { + if (current_index != -1) + center_item(current_index, + &last_top_row); + continue; + } + if (process_special_keys(&res, + (struct menu *) item_data())) + break; + switch (res) { + case KEY_DOWN: + menu_driver(curses_menu, REQ_DOWN_ITEM); + break; + case KEY_UP: + menu_driver(curses_menu, REQ_UP_ITEM); + break; + case KEY_NPAGE: + menu_driver(curses_menu, REQ_SCR_DPAGE); + break; + case KEY_PPAGE: + menu_driver(curses_menu, REQ_SCR_UPAGE); + break; + case KEY_HOME: + menu_driver(curses_menu, REQ_FIRST_ITEM); + break; + case KEY_END: + menu_driver(curses_menu, REQ_LAST_ITEM); + break; + case 'h': + case '?': + show_help((struct menu *) item_data()); + break; + } + if (res == 10 || res == 27 || + res == 32 || res == 'n' || res == 'y' || + res == KEY_LEFT || res == KEY_RIGHT || + res == 'm') + break; + refresh_all_windows(main_window); + } + + refresh_all_windows(main_window); + /* if ESC or left*/ + if (res == 27 || (menu != &rootmenu && res == KEY_LEFT)) + break; + + /* remember location in the menu */ + last_top_row = top_row(curses_menu); + current_index = curses_item_index(); + + if (!item_tag()) + continue; + + submenu = (struct menu *) item_data(); + if (!submenu || !menu_is_visible(submenu)) + continue; + sym = submenu->sym; + + switch (res) { + case ' ': + if (item_is_tag('t')) + sym_toggle_tristate_value(sym); + else if (item_is_tag('m')) + conf(submenu); + break; + case KEY_RIGHT: + case 10: /* ENTER WAS PRESSED */ + switch (item_tag()) { + case 'm': + if (single_menu_mode) + submenu->data = + (void *) (long) !submenu->data; + else + conf(submenu); + break; + case 't': + if (sym_is_choice(sym) && + sym_get_tristate_value(sym) == yes) + conf_choice(submenu); + else if (submenu->prompt && + submenu->prompt->type == P_MENU) + conf(submenu); + else if (res == 10) + sym_toggle_tristate_value(sym); + break; + case 's': + conf_string(submenu); + break; + } + break; + case 'y': + if (item_is_tag('t')) { + if (sym_set_tristate_value(sym, yes)) + break; + if (sym_set_tristate_value(sym, mod)) + btn_dialog(main_window, setmod_text, 0); + } + break; + case 'n': + if (item_is_tag('t')) + sym_set_tristate_value(sym, no); + break; + case 'm': + if (item_is_tag('t')) + sym_set_tristate_value(sym, mod); + break; + } + } +} + +static void conf_message_callback(const char *fmt, va_list ap) +{ + char buf[1024]; + + vsnprintf(buf, sizeof(buf), fmt, ap); + btn_dialog(main_window, buf, 1, ""); +} + +static void show_help(struct menu *menu) +{ + struct gstr help; + + if (!menu) + return; + + help = str_new(); + menu_get_ext_help(menu, &help); + show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help)); + str_free(&help); +} + +static void conf_choice(struct menu *menu) +{ + const char *prompt = _(menu_get_prompt(menu)); + struct menu *child = NULL; + struct symbol *active; + int selected_index = 0; + int last_top_row = 0; + int res, i = 0; + struct match_state match_state = { + .in_search = 0, + .match_direction = MATCH_TINKER_PATTERN_DOWN, + .pattern = "", + }; + + active = sym_get_choice_value(menu->sym); + /* this is mostly duplicated from the conf() function. */ + while (!global_exit) { + reset_menu(); + + for (i = 0, child = menu->list; child; child = child->next) { + if (!show_all_items && !menu_is_visible(child)) + continue; + + if (child->sym == sym_get_choice_value(menu->sym)) + item_make(child, ':', " %s", + _(menu_get_prompt(child))); + else if (child->sym) + item_make(child, ':', " %s", + _(menu_get_prompt(child))); + else + item_make(child, ':', "*** %s ***", + _(menu_get_prompt(child))); + + if (child->sym == active){ + last_top_row = top_row(curses_menu); + selected_index = i; + } + i++; + } + show_menu(prompt ? _(prompt) : _("Choice Menu"), + _(radiolist_instructions), + selected_index, + &last_top_row); + while (!global_exit) { + if (match_state.in_search) { + mvprintw(0, 0, "searching: %s", + match_state.pattern); + clrtoeol(); + } + refresh_all_windows(main_window); + res = wgetch(menu_win(curses_menu)); + if (!res) + break; + if (do_match(res, &match_state, &selected_index) == 0) { + if (selected_index != -1) + center_item(selected_index, + &last_top_row); + continue; + } + if (process_special_keys( + &res, + (struct menu *) item_data())) + break; + switch (res) { + case KEY_DOWN: + menu_driver(curses_menu, REQ_DOWN_ITEM); + break; + case KEY_UP: + menu_driver(curses_menu, REQ_UP_ITEM); + break; + case KEY_NPAGE: + menu_driver(curses_menu, REQ_SCR_DPAGE); + break; + case KEY_PPAGE: + menu_driver(curses_menu, REQ_SCR_UPAGE); + break; + case KEY_HOME: + menu_driver(curses_menu, REQ_FIRST_ITEM); + break; + case KEY_END: + menu_driver(curses_menu, REQ_LAST_ITEM); + break; + case 'h': + case '?': + show_help((struct menu *) item_data()); + break; + } + if (res == 10 || res == 27 || res == ' ' || + res == KEY_LEFT){ + break; + } + refresh_all_windows(main_window); + } + /* if ESC or left */ + if (res == 27 || res == KEY_LEFT) + break; + + child = item_data(); + if (!child || !menu_is_visible(child) || !child->sym) + continue; + switch (res) { + case ' ': + case 10: + case KEY_RIGHT: + sym_set_tristate_value(child->sym, yes); + return; + case 'h': + case '?': + show_help(child); + active = child->sym; + break; + case KEY_EXIT: + return; + } + } +} + +static void conf_string(struct menu *menu) +{ + const char *prompt = menu_get_prompt(menu); + + while (1) { + int res; + const char *heading; + + switch (sym_get_type(menu->sym)) { + case S_INT: + heading = _(inputbox_instructions_int); + break; + case S_HEX: + heading = _(inputbox_instructions_hex); + break; + case S_STRING: + heading = _(inputbox_instructions_string); + break; + default: + heading = _("Internal nconf error!"); + } + res = dialog_inputbox(main_window, + prompt ? _(prompt) : _("Main Menu"), + heading, + sym_get_string_value(menu->sym), + &dialog_input_result, + &dialog_input_result_len); + switch (res) { + case 0: + if (sym_set_string_value(menu->sym, + dialog_input_result)) + return; + btn_dialog(main_window, + _("You have made an invalid entry."), 0); + break; + case 1: + show_help(menu); + break; + case KEY_EXIT: + return; + } + } +} + +static void conf_load(void) +{ + while (1) { + int res; + res = dialog_inputbox(main_window, + NULL, load_config_text, + filename, + &dialog_input_result, + &dialog_input_result_len); + switch (res) { + case 0: + if (!dialog_input_result[0]) + return; + if (!conf_read(dialog_input_result)) { + set_config_filename(dialog_input_result); + sym_set_change_count(1); + return; + } + btn_dialog(main_window, _("File does not exist!"), 0); + break; + case 1: + show_scroll_win(main_window, + _("Load Alternate Configuration"), + load_config_help); + break; + case KEY_EXIT: + return; + } + } +} + +static void conf_save(void) +{ + while (1) { + int res; + res = dialog_inputbox(main_window, + NULL, save_config_text, + filename, + &dialog_input_result, + &dialog_input_result_len); + switch (res) { + case 0: + if (!dialog_input_result[0]) + return; + res = conf_write(dialog_input_result); + if (!res) { + set_config_filename(dialog_input_result); + return; + } + btn_dialog(main_window, _("Can't create file! " + "Probably a nonexistent directory."), + 1, ""); + break; + case 1: + show_scroll_win(main_window, + _("Save Alternate Configuration"), + save_config_help); + break; + case KEY_EXIT: + return; + } + } +} + +static void setup_windows(void) +{ + int lines, columns; + + getmaxyx(stdscr, lines, columns); + + if (main_window != NULL) + delwin(main_window); + + /* set up the menu and menu window */ + main_window = newwin(lines-2, columns-2, 2, 1); + keypad(main_window, TRUE); + mwin_max_lines = lines-7; + mwin_max_cols = columns-6; + + /* panels order is from bottom to top */ + new_panel(main_window); +} + +int main(int ac, char **av) +{ + int lines, columns; + char *mode; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + if (ac > 1 && strcmp(av[1], "-s") == 0) { + /* Silence conf_read() until the real callback is set up */ + conf_set_message_callback(NULL); + av++; + } + conf_parse(av[1]); + conf_read(NULL); + + mode = getenv("NCONFIG_MODE"); + if (mode) { + if (!strcasecmp(mode, "single_menu")) + single_menu_mode = 1; + } + + /* Initialize curses */ + initscr(); + /* set color theme */ + set_colors(); + + cbreak(); + noecho(); + keypad(stdscr, TRUE); + curs_set(0); + + getmaxyx(stdscr, lines, columns); + if (columns < 75 || lines < 20) { + endwin(); + printf("Your terminal should have at " + "least 20 lines and 75 columns\n"); + return 1; + } + + notimeout(stdscr, FALSE); +#if NCURSES_REENTRANT + set_escdelay(1); +#else + ESCDELAY = 1; +#endif + + /* set btns menu */ + curses_menu = new_menu(curses_menu_items); + menu_opts_off(curses_menu, O_SHOWDESC); + menu_opts_on(curses_menu, O_SHOWMATCH); + menu_opts_on(curses_menu, O_ONEVALUE); + menu_opts_on(curses_menu, O_NONCYCLIC); + menu_opts_on(curses_menu, O_IGNORECASE); + set_menu_mark(curses_menu, " "); + set_menu_fore(curses_menu, attributes[MAIN_MENU_FORE]); + set_menu_back(curses_menu, attributes[MAIN_MENU_BACK]); + set_menu_grey(curses_menu, attributes[MAIN_MENU_GREY]); + + set_config_filename(conf_get_configname()); + setup_windows(); + + /* check for KEY_FUNC(1) */ + if (has_key(KEY_F(1)) == FALSE) { + show_scroll_win(main_window, + _("Instructions"), + _(menu_no_f_instructions)); + } + + conf_set_message_callback(conf_message_callback); + /* do the work */ + while (!global_exit) { + conf(&rootmenu); + if (!global_exit && do_exit() == 0) + break; + } + /* ok, we are done */ + unpost_menu(curses_menu); + free_menu(curses_menu); + delwin(main_window); + clear(); + refresh(); + endwin(); + return 0; +} diff --git a/support/kconfig/nconf.gui.c b/support/kconfig/nconf.gui.c new file mode 100644 index 00000000..88874acf --- /dev/null +++ b/support/kconfig/nconf.gui.c @@ -0,0 +1,664 @@ +/* + * Copyright (C) 2008 Nir Tzachar 0) + win_rows = msg_lines+4; + else + win_rows = msg_lines+2; + + win = newwin(win_rows, total_width+4, y, x); + keypad(win, TRUE); + menu_win = derwin(win, 1, btns_width, win_rows-2, + 1+(total_width+2-btns_width)/2); + menu = new_menu(btns); + msg_win = derwin(win, win_rows-2, msg_width, 1, + 1+(total_width+2-msg_width)/2); + + set_menu_fore(menu, attributes[DIALOG_MENU_FORE]); + set_menu_back(menu, attributes[DIALOG_MENU_BACK]); + + (void) wattrset(win, attributes[DIALOG_BOX]); + box(win, 0, 0); + + /* print message */ + (void) wattrset(msg_win, attributes[DIALOG_TEXT]); + fill_window(msg_win, msg); + + set_menu_win(menu, win); + set_menu_sub(menu, menu_win); + set_menu_format(menu, 1, btn_num); + menu_opts_off(menu, O_SHOWDESC); + menu_opts_off(menu, O_SHOWMATCH); + menu_opts_on(menu, O_ONEVALUE); + menu_opts_on(menu, O_NONCYCLIC); + set_menu_mark(menu, ""); + post_menu(menu); + + + touchwin(win); + refresh_all_windows(main_window); + while ((res = wgetch(win))) { + switch (res) { + case KEY_LEFT: + menu_driver(menu, REQ_LEFT_ITEM); + break; + case KEY_RIGHT: + menu_driver(menu, REQ_RIGHT_ITEM); + break; + case 10: /* ENTER */ + case 27: /* ESCAPE */ + case ' ': + case KEY_F(F_BACK): + case KEY_F(F_EXIT): + break; + } + touchwin(win); + refresh_all_windows(main_window); + + if (res == 10 || res == ' ') { + res = item_index(current_item(menu)); + break; + } else if (res == 27 || res == KEY_F(F_BACK) || + res == KEY_F(F_EXIT)) { + res = KEY_EXIT; + break; + } + } + + unpost_menu(menu); + free_menu(menu); + for (i = 0; i < btn_num; i++) + free_item(btns[i]); + + delwin(win); + return res; +} + +int dialog_inputbox(WINDOW *main_window, + const char *title, const char *prompt, + const char *init, char **resultp, int *result_len) +{ + int prompt_lines = 0; + int prompt_width = 0; + WINDOW *win; + WINDOW *prompt_win; + WINDOW *form_win; + PANEL *panel; + int i, x, y, lines, columns, win_lines, win_cols; + int res = -1; + int cursor_position = strlen(init); + int cursor_form_win; + char *result = *resultp; + + getmaxyx(stdscr, lines, columns); + + if (strlen(init)+1 > *result_len) { + *result_len = strlen(init)+1; + *resultp = result = xrealloc(result, *result_len); + } + + /* find the widest line of msg: */ + prompt_lines = get_line_no(prompt); + for (i = 0; i < prompt_lines; i++) { + const char *line = get_line(prompt, i); + int len = get_line_length(line); + prompt_width = max(prompt_width, len); + } + + if (title) + prompt_width = max(prompt_width, strlen(title)); + + win_lines = min(prompt_lines+6, lines-2); + win_cols = min(prompt_width+7, columns-2); + prompt_lines = max(win_lines-6, 0); + prompt_width = max(win_cols-7, 0); + + /* place dialog in middle of screen */ + y = (lines-win_lines)/2; + x = (columns-win_cols)/2; + + strncpy(result, init, *result_len); + + /* create the windows */ + win = newwin(win_lines, win_cols, y, x); + prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2); + form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2); + keypad(form_win, TRUE); + + (void) wattrset(form_win, attributes[INPUT_FIELD]); + + (void) wattrset(win, attributes[INPUT_BOX]); + box(win, 0, 0); + (void) wattrset(win, attributes[INPUT_HEADING]); + if (title) + mvwprintw(win, 0, 3, "%s", title); + + /* print message */ + (void) wattrset(prompt_win, attributes[INPUT_TEXT]); + fill_window(prompt_win, prompt); + + mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); + cursor_form_win = min(cursor_position, prompt_width-1); + mvwprintw(form_win, 0, 0, "%s", + result + cursor_position-cursor_form_win); + + /* create panels */ + panel = new_panel(win); + + /* show the cursor */ + curs_set(1); + + touchwin(win); + refresh_all_windows(main_window); + while ((res = wgetch(form_win))) { + int len = strlen(result); + switch (res) { + case 10: /* ENTER */ + case 27: /* ESCAPE */ + case KEY_F(F_HELP): + case KEY_F(F_EXIT): + case KEY_F(F_BACK): + break; + case 127: + case KEY_BACKSPACE: + if (cursor_position > 0) { + memmove(&result[cursor_position-1], + &result[cursor_position], + len-cursor_position+1); + cursor_position--; + cursor_form_win--; + len--; + } + break; + case KEY_DC: + if (cursor_position >= 0 && cursor_position < len) { + memmove(&result[cursor_position], + &result[cursor_position+1], + len-cursor_position+1); + len--; + } + break; + case KEY_UP: + case KEY_RIGHT: + if (cursor_position < len) { + cursor_position++; + cursor_form_win++; + } + break; + case KEY_DOWN: + case KEY_LEFT: + if (cursor_position > 0) { + cursor_position--; + cursor_form_win--; + } + break; + case KEY_HOME: + cursor_position = 0; + cursor_form_win = 0; + break; + case KEY_END: + cursor_position = len; + cursor_form_win = min(cursor_position, prompt_width-1); + break; + default: + if ((isgraph(res) || isspace(res))) { + /* one for new char, one for '\0' */ + if (len+2 > *result_len) { + *result_len = len+2; + *resultp = result = realloc(result, + *result_len); + } + /* insert the char at the proper position */ + memmove(&result[cursor_position+1], + &result[cursor_position], + len-cursor_position+1); + result[cursor_position] = res; + cursor_position++; + cursor_form_win++; + len++; + } else { + mvprintw(0, 0, "unknown key: %d\n", res); + } + break; + } + if (cursor_form_win < 0) + cursor_form_win = 0; + else if (cursor_form_win > prompt_width-1) + cursor_form_win = prompt_width-1; + + wmove(form_win, 0, 0); + wclrtoeol(form_win); + mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); + mvwprintw(form_win, 0, 0, "%s", + result + cursor_position-cursor_form_win); + wmove(form_win, 0, cursor_form_win); + touchwin(win); + refresh_all_windows(main_window); + + if (res == 10) { + res = 0; + break; + } else if (res == 27 || res == KEY_F(F_BACK) || + res == KEY_F(F_EXIT)) { + res = KEY_EXIT; + break; + } else if (res == KEY_F(F_HELP)) { + res = 1; + break; + } + } + + /* hide the cursor */ + curs_set(0); + del_panel(panel); + delwin(prompt_win); + delwin(form_win); + delwin(win); + return res; +} + +/* refresh all windows in the correct order */ +void refresh_all_windows(WINDOW *main_window) +{ + update_panels(); + touchwin(main_window); + refresh(); +} + +/* layman's scrollable window... */ +void show_scroll_win(WINDOW *main_window, + const char *title, + const char *text) +{ + int res; + int total_lines = get_line_no(text); + int x, y, lines, columns; + int start_x = 0, start_y = 0; + int text_lines = 0, text_cols = 0; + int total_cols = 0; + int win_cols = 0; + int win_lines = 0; + int i = 0; + WINDOW *win; + WINDOW *pad; + PANEL *panel; + + getmaxyx(stdscr, lines, columns); + + /* find the widest line of msg: */ + total_lines = get_line_no(text); + for (i = 0; i < total_lines; i++) { + const char *line = get_line(text, i); + int len = get_line_length(line); + total_cols = max(total_cols, len+2); + } + + /* create the pad */ + pad = newpad(total_lines+10, total_cols+10); + (void) wattrset(pad, attributes[SCROLLWIN_TEXT]); + fill_window(pad, text); + + win_lines = min(total_lines+4, lines-2); + win_cols = min(total_cols+2, columns-2); + text_lines = max(win_lines-4, 0); + text_cols = max(win_cols-2, 0); + + /* place window in middle of screen */ + y = (lines-win_lines)/2; + x = (columns-win_cols)/2; + + win = newwin(win_lines, win_cols, y, x); + keypad(win, TRUE); + /* show the help in the help window, and show the help panel */ + (void) wattrset(win, attributes[SCROLLWIN_BOX]); + box(win, 0, 0); + (void) wattrset(win, attributes[SCROLLWIN_HEADING]); + mvwprintw(win, 0, 3, " %s ", title); + panel = new_panel(win); + + /* handle scrolling */ + do { + + copywin(pad, win, start_y, start_x, 2, 2, text_lines, + text_cols, 0); + print_in_middle(win, + text_lines+2, + 0, + text_cols, + "", + attributes[DIALOG_MENU_FORE]); + wrefresh(win); + + res = wgetch(win); + switch (res) { + case KEY_NPAGE: + case ' ': + case 'd': + start_y += text_lines-2; + break; + case KEY_PPAGE: + case 'u': + start_y -= text_lines+2; + break; + case KEY_HOME: + start_y = 0; + break; + case KEY_END: + start_y = total_lines-text_lines; + break; + case KEY_DOWN: + case 'j': + start_y++; + break; + case KEY_UP: + case 'k': + start_y--; + break; + case KEY_LEFT: + case 'h': + start_x--; + break; + case KEY_RIGHT: + case 'l': + start_x++; + break; + } + if (res == 10 || res == 27 || res == 'q' || + res == KEY_F(F_HELP) || res == KEY_F(F_BACK) || + res == KEY_F(F_EXIT)) + break; + if (start_y < 0) + start_y = 0; + if (start_y >= total_lines-text_lines) + start_y = total_lines-text_lines; + if (start_x < 0) + start_x = 0; + if (start_x >= total_cols-text_cols) + start_x = total_cols-text_cols; + } while (res); + + del_panel(panel); + delwin(win); + refresh_all_windows(main_window); +} diff --git a/support/kconfig/nconf.h b/support/kconfig/nconf.h new file mode 100644 index 00000000..9f6f21d3 --- /dev/null +++ b/support/kconfig/nconf.h @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2008 Nir Tzachar +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define max(a, b) ({\ + typeof(a) _a = a;\ + typeof(b) _b = b;\ + _a > _b ? _a : _b; }) + +#define min(a, b) ({\ + typeof(a) _a = a;\ + typeof(b) _b = b;\ + _a < _b ? _a : _b; }) + +typedef enum { + NORMAL = 1, + MAIN_HEADING, + MAIN_MENU_BOX, + MAIN_MENU_FORE, + MAIN_MENU_BACK, + MAIN_MENU_GREY, + MAIN_MENU_HEADING, + SCROLLWIN_TEXT, + SCROLLWIN_HEADING, + SCROLLWIN_BOX, + DIALOG_TEXT, + DIALOG_MENU_FORE, + DIALOG_MENU_BACK, + DIALOG_BOX, + INPUT_BOX, + INPUT_HEADING, + INPUT_TEXT, + INPUT_FIELD, + FUNCTION_TEXT, + FUNCTION_HIGHLIGHT, + ATTR_MAX +} attributes_t; +extern attributes_t attributes[]; + +typedef enum { + F_HELP = 1, + F_SYMBOL = 2, + F_INSTS = 3, + F_CONF = 4, + F_BACK = 5, + F_SAVE = 6, + F_LOAD = 7, + F_SEARCH = 8, + F_EXIT = 9, +} function_key; + +void set_colors(void); + +/* this changes the windows attributes !!! */ +void print_in_middle(WINDOW *win, + int starty, + int startx, + int width, + const char *string, + chtype color); +int get_line_length(const char *line); +int get_line_no(const char *text); +const char *get_line(const char *text, int line_no); +void fill_window(WINDOW *win, const char *text); +int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...); +int dialog_inputbox(WINDOW *main_window, + const char *title, const char *prompt, + const char *init, char **resultp, int *result_len); +void refresh_all_windows(WINDOW *main_window); +void show_scroll_win(WINDOW *main_window, + const char *title, + const char *text); diff --git a/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch b/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch new file mode 100644 index 00000000..43ae61a9 --- /dev/null +++ b/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch @@ -0,0 +1,107 @@ +--- + confdata.c | 4 ++-- + gconf.glade | 2 +- + mconf.c | 4 ++-- + zconf.tab.c_shipped | 2 +- + zconf.y | 2 +- + 5 files changed, 7 insertions(+), 7 deletions(-) + +Index: kconfig/gconf.glade +=================================================================== +--- kconfig.orig/gconf.glade ++++ kconfig/gconf.glade +@@ -4,7 +4,7 @@ + + + True +- Gtk Kernel Configurator ++ Gtk Buildroot Configurator + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False +Index: kconfig/mconf.c +=================================================================== +--- kconfig.orig/mconf.c ++++ kconfig/mconf.c +@@ -176,9 +176,9 @@ menu_instructions[] = N_( + "Arrow keys navigate the menu. " + " selects submenus ---> (or empty submenus ----). " + "Highlighted letters are hotkeys. " +- "Pressing includes, excludes, modularizes features. " ++ "Pressing selects a feature, while excludes a feature. " + "Press to exit, for Help, for Search. " +- "Legend: [*] built-in [ ] excluded module < > module capable"), ++ "Legend: [*] feature is selected [ ] feature is excluded"), + radiolist_instructions[] = N_( + "Use the arrow keys to navigate this window or " + "press the hotkey of the item you wish to select " +@@ -962,7 +962,7 @@ static int handle_exit(void) + if (conf_get_changed()) + res = dialog_yesno(NULL, + _("Do you wish to save your new configuration?\n" +- "(Press to continue kernel configuration.)"), ++ "(Press to continue Buildroot configuration.)"), + 6, 60); + else + res = -1; +Index: kconfig/zconf.tab.c_shipped +=================================================================== +--- kconfig.orig/zconf.tab.c_shipped ++++ kconfig/zconf.tab.c_shipped +@@ -1515,7 +1515,7 @@ yyreduce: + * later regardless of whether it comes from the 'prompt' in + * mainmenu_stmt or here + */ +- menu_add_prompt(P_MENU, xstrdup("Linux Kernel Configuration"), NULL); ++ menu_add_prompt(P_MENU, xstrdup("Buildroot Configuration"), NULL); + } + + break; +Index: kconfig/zconf.y +=================================================================== +--- kconfig.orig/zconf.y ++++ kconfig/zconf.y +@@ -127,7 +127,7 @@ no_mainmenu_stmt: /* empty */ + * later regardless of whether it comes from the 'prompt' in + * mainmenu_stmt or here + */ +- menu_add_prompt(P_MENU, xstrdup("Linux Kernel Configuration"), NULL); ++ menu_add_prompt(P_MENU, xstrdup("Buildroot Configuration"), NULL); + }; + + +Index: kconfig/confdata.c +=================================================================== +--- kconfig.orig/confdata.c ++++ kconfig/confdata.c +@@ -30,7 +30,7 @@ static void conf_message(const char *fmt + static const char *conf_filename; + static int conf_lineno, conf_warnings; + +-const char conf_defname[] = "arch/$ARCH/defconfig"; ++const char conf_defname[] = ".defconfig"; + + static void conf_warning(const char *fmt, ...) + { +@@ -69,7 +69,7 @@ static void conf_message(const char *fmt + + const char *conf_get_configname(void) + { +- char *name = getenv("KCONFIG_CONFIG"); ++ char *name = getenv("BR2_CONFIG"); + + return name ? name : ".config"; + } +Index: kconfig/qconf.cc +=================================================================== +--- kconfig.orig/qconf.cc ++++ kconfig/qconf.cc +@@ -55,7 +55,7 @@ static inline QString qgettext(const QSt + } + + ConfigSettings::ConfigSettings() +- : QSettings("kernel.org", "qconf") ++ : QSettings("buildroot.org", "qconf") + { + } + diff --git a/support/kconfig/patches/06-br-build-system-integration.patch b/support/kconfig/patches/06-br-build-system-integration.patch new file mode 100644 index 00000000..35420cbb --- /dev/null +++ b/support/kconfig/patches/06-br-build-system-integration.patch @@ -0,0 +1,74 @@ +Index: kconfig/Makefile +=================================================================== +--- kconfig.orig/Makefile ++++ kconfig/Makefile +@@ -205,7 +205,35 @@ qconf-cxxobjs := qconf.o + qconf-objs := zconf.tab.o + gconf-objs := gconf.o zconf.tab.o + +-hostprogs-y := conf nconf mconf kxgettext qconf gconf ++hostprogs-y := conf ++ ++ifeq ($(MAKECMDGOALS),nconf) ++ hostprogs-y += nconf ++endif ++ ++ifeq ($(MAKECMDGOALS),mconf) ++ hostprogs-y += mconf ++endif ++ ++ifeq ($(MAKECMDGOALS),update-po-config) ++ hostprogs-y += kxgettext ++endif ++ ++ifeq ($(MAKECMDGOALS),qconf) ++ qconf-target := 1 ++endif ++ ++ifeq ($(MAKECMDGOALS),gconf) ++ gconf-target := 1 ++endif ++ ++ifeq ($(qconf-target),1) ++ hostprogs-y += qconf ++endif ++ ++ifeq ($(gconf-target),1) ++ hostprogs-y += gconf ++endif + + targets += zconf.lex.c + clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck +@@ -243,7 +271,7 @@ HOSTLOADLIBES_nconf = $(shell \ + || echo "-lmenu -lpanel -lncurses" ) + $(obj)/qconf.o: $(obj)/.tmp_qtcheck + +-ifeq ($(MAKECMDGOALS),xconfig) ++ifeq ($(MAKECMDGOALS),qconf) + $(obj)/.tmp_qtcheck: $(src)/Makefile + -include $(obj)/.tmp_qtcheck + +@@ -270,9 +298,8 @@ $(obj)/.tmp_qtcheck: + echo "KC_QT_MOC=$$moc" >> $@ + endif + ++ifeq ($(MAKECMDGOALS),gconf) + $(obj)/gconf.o: $(obj)/.tmp_gtkcheck +- +-ifeq ($(MAKECMDGOALS),gconfig) + -include $(obj)/.tmp_gtkcheck + + # GTK+ needs some extra effort, too... +@@ -300,11 +327,8 @@ $(obj)/zconf.tab.o: $(obj)/zconf.lex.c + + $(obj)/qconf.o: $(obj)/qconf.moc + +-quiet_cmd_moc = MOC $@ +- cmd_moc = $(KC_QT_MOC) -i $< -o $@ +- + $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck +- $(call cmd,moc) ++ $(KC_QT_MOC) -i $< -o $@ + + # Extract gconf menu items for i18n support + $(obj)/gconf.glade.h: $(obj)/gconf.glade diff --git a/support/kconfig/patches/10-br-build-system.patch b/support/kconfig/patches/10-br-build-system.patch new file mode 100644 index 00000000..abf24636 --- /dev/null +++ b/support/kconfig/patches/10-br-build-system.patch @@ -0,0 +1,80 @@ +--- + Makefile.br | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + foo.h | 12 ++++++++++++ + 2 files changed, 65 insertions(+) + +Index: kconfig/Makefile.br +=================================================================== +--- /dev/null ++++ kconfig/Makefile.br +@@ -0,0 +1,53 @@ ++src := . ++top_srcdir=../../ ++top_builddir=../../ ++srctree := . ++obj ?= . ++ ++include Makefile ++#HOSTCFLAGS+=-Dinline="" -include foo.h ++-include $(obj)/.depend ++$(obj)/.depend: $(wildcard *.h *.c) ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || : ++ ++__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) ++host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) ++host-cmulti := $(foreach m,$(__hostprogs),\ ++ $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) ++host-cxxmulti := $(foreach m,$(__hostprogs),\ ++ $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),))) ++host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs)))) ++host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))) ++ ++HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\" ++ ++$(host-csingle): %: %.c ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@ ++ ++$(host-cmulti): %: $(host-cobjs) $(host-cshlib) ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ ++ ++$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) ++ $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ ++ ++$(obj)/%.o: %.c ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ ++ ++$(obj)/%.o: $(obj)/%.c ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ ++ ++$(obj)/%.o: %.cc ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@ ++ ++$(obj)/%:: $(src)/%_shipped ++ $(Q)cat $< > $@ ++ ++clean: ++ $(Q)rm -f $(addprefix $(obj)/,$(clean-files)) ++distclean: clean ++ $(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \ ++ $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \ ++ mconf .depend) ++ ++FORCE: ++.PHONY: FORCE clean distclean +Index: kconfig/foo.h +=================================================================== +--- /dev/null ++++ kconfig/foo.h +@@ -0,0 +1,12 @@ ++#ifndef __KCONFIG_FOO_H ++#define __KCONFIG_FOO_H ++ ++#ifndef __APPLE__ ++#include ++#endif ++#include ++ ++#ifndef PATH_MAX ++#define PATH_MAX 1024 ++#endif ++#endif /* __KCONFIG_FOO_H */ diff --git a/support/kconfig/patches/11-use-mktemp-for-lxdialog.patch b/support/kconfig/patches/11-use-mktemp-for-lxdialog.patch new file mode 100644 index 00000000..387c633a --- /dev/null +++ b/support/kconfig/patches/11-use-mktemp-for-lxdialog.patch @@ -0,0 +1,17 @@ +--- + lxdialog/check-lxdialog.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: kconfig/lxdialog/check-lxdialog.sh +=================================================================== +--- kconfig.orig/lxdialog/check-lxdialog.sh ++++ kconfig/lxdialog/check-lxdialog.sh +@@ -41,7 +41,7 @@ ccflags() + } + + # Temp file, try to clean up after us +-tmp=.lxdialog.tmp ++tmp=$(mktemp) + trap "rm -f $tmp" 0 1 2 3 15 + + # Check if we can link to ncurses diff --git a/support/kconfig/patches/12-fix-glade-file-path.patch b/support/kconfig/patches/12-fix-glade-file-path.patch new file mode 100644 index 00000000..7d5941fc --- /dev/null +++ b/support/kconfig/patches/12-fix-glade-file-path.patch @@ -0,0 +1,17 @@ +--- + gconf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: kconfig/gconf.c +=================================================================== +--- kconfig.orig/gconf.c ++++ kconfig/gconf.c +@@ -1462,7 +1462,7 @@ int main(int ac, char *av[]) + /* Determine GUI path */ + env = getenv(SRCTREE); + if (env) +- glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL); ++ glade_file = g_strconcat(env, "/support/kconfig/gconf.glade", NULL); + else if (av[0][0] == '/') + glade_file = g_strconcat(av[0], ".glade", NULL); + else diff --git a/support/kconfig/patches/14-support-out-of-tree-config.patch b/support/kconfig/patches/14-support-out-of-tree-config.patch new file mode 100644 index 00000000..a3b33ba6 --- /dev/null +++ b/support/kconfig/patches/14-support-out-of-tree-config.patch @@ -0,0 +1,207 @@ +--- + conf.c | 1 + confdata.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++--------------- + util.c | 16 +++++++++++++-- + 3 files changed, 61 insertions(+), 18 deletions(-) + +Index: kconfig/conf.c +=================================================================== +--- kconfig.orig/conf.c ++++ kconfig/conf.c +@@ -565,7 +565,6 @@ int main(int ac, char **av) + } + name = av[optind]; + conf_parse(name); +- //zconfdump(stdout); + if (sync_kconfig) { + name = conf_get_configname(); + if (stat(name, &tmpstat)) { +Index: kconfig/confdata.c +=================================================================== +--- kconfig.orig/confdata.c ++++ kconfig/confdata.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "lkc.h" + +@@ -76,9 +77,7 @@ const char *conf_get_configname(void) + + const char *conf_get_autoconfig_name(void) + { +- char *name = getenv("KCONFIG_AUTOCONFIG"); +- +- return name ? name : "include/config/auto.conf"; ++ return getenv("KCONFIG_AUTOCONFIG"); + } + + static char *conf_expand_value(const char *in) +@@ -748,6 +747,9 @@ int conf_write(const char *name) + char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; + char *env; + ++ if (!name) ++ name = conf_get_configname(); ++ + dirname[0] = 0; + if (name && name[0]) { + struct stat st; +@@ -842,6 +844,7 @@ static int conf_split_config(void) + { + const char *name; + char path[PATH_MAX+1]; ++ char *opwd, *dir, *_name; + char *s, *d, c; + struct symbol *sym; + struct stat sb; +@@ -851,8 +854,20 @@ static int conf_split_config(void) + conf_read_simple(name, S_DEF_AUTO); + sym_calc_value(modules_sym); + +- if (chdir("include/config")) +- return 1; ++ opwd = malloc(256); ++ _name = strdup(name); ++ if (opwd == NULL || _name == NULL) ++ return 1; ++ opwd = getcwd(opwd, 256); ++ dir = dirname(_name); ++ if (dir == NULL) { ++ res = 1; ++ goto err; ++ } ++ if (chdir(dir)) { ++ res = 1; ++ goto err; ++ } + + res = 0; + for_all_symbols(i, sym) { +@@ -945,9 +960,11 @@ static int conf_split_config(void) + close(fd); + } + out: +- if (chdir("../..")) +- return 1; +- ++ if (chdir(opwd)) ++ res = 1; ++err: ++ free(opwd); ++ free(_name); + return res; + } + +@@ -957,25 +974,38 @@ int conf_write_autoconf(void) + const char *name; + FILE *out, *tristate, *out_h; + int i; ++ char dir[PATH_MAX+1], buf[PATH_MAX+1]; ++ char *s; ++ ++ strcpy(dir, conf_get_configname()); ++ s = strrchr(dir, '/'); ++ if (s) ++ s[1] = 0; ++ else ++ dir[0] = 0; + + sym_clear_all_valid(); + +- file_write_dep("include/config/auto.conf.cmd"); ++ sprintf(buf, "%s.config.cmd", dir); ++ file_write_dep(buf); + + if (conf_split_config()) + return 1; + +- out = fopen(".tmpconfig", "w"); ++ sprintf(buf, "%s.tmpconfig", dir); ++ out = fopen(buf, "w"); + if (!out) + return 1; + +- tristate = fopen(".tmpconfig_tristate", "w"); ++ sprintf(buf, "%s.tmpconfig_tristate", dir); ++ tristate = fopen(buf, "w"); + if (!tristate) { + fclose(out); + return 1; + } + +- out_h = fopen(".tmpconfig.h", "w"); ++ sprintf(buf, "%s.tmpconfig.h", dir); ++ out_h = fopen(buf, "w"); + if (!out_h) { + fclose(out); + fclose(tristate); +@@ -1007,19 +1037,22 @@ int conf_write_autoconf(void) + name = getenv("KCONFIG_AUTOHEADER"); + if (!name) + name = "include/generated/autoconf.h"; +- if (rename(".tmpconfig.h", name)) ++ sprintf(buf, "%s.tmpconfig.h", dir); ++ if (rename(buf, name)) + return 1; + name = getenv("KCONFIG_TRISTATE"); + if (!name) + name = "include/config/tristate.conf"; +- if (rename(".tmpconfig_tristate", name)) ++ sprintf(buf, "%s.tmpconfig_tristate", dir); ++ if (rename(buf, name)) + return 1; + name = conf_get_autoconfig_name(); + /* + * This must be the last step, kbuild has a dependency on auto.conf + * and this marks the successful completion of the previous steps. + */ +- if (rename(".tmpconfig", name)) ++ sprintf(buf, "%s.tmpconfig", dir); ++ if (rename(buf, name)) + return 1; + + return 0; +Index: kconfig/util.c +=================================================================== +--- kconfig.orig/util.c ++++ kconfig/util.c +@@ -34,6 +34,8 @@ struct file *file_lookup(const char *nam + /* write a dependency file as used by kbuild to track dependencies */ + int file_write_dep(const char *name) + { ++ char *str; ++ char buf[PATH_MAX+1], buf2[PATH_MAX+1], dir[PATH_MAX+1]; + struct symbol *sym, *env_sym; + struct expr *e; + struct file *file; +@@ -41,7 +43,16 @@ int file_write_dep(const char *name) + + if (!name) + name = ".kconfig.d"; +- out = fopen("..config.tmp", "w"); ++ ++ strcpy(dir, conf_get_configname()); ++ str = strrchr(dir, '/'); ++ if (str) ++ str[1] = 0; ++ else ++ dir[0] = 0; ++ ++ sprintf(buf, "%s..config.tmp", dir); ++ out = fopen(buf, "w"); + if (!out) + return 1; + fprintf(out, "deps_config := \\\n"); +@@ -72,7 +83,8 @@ int file_write_dep(const char *name) + + fprintf(out, "\n$(deps_config): ;\n"); + fclose(out); +- rename("..config.tmp", name); ++ sprintf(buf2, "%s%s", dir, name); ++ rename(buf, buf2); + return 0; + } + diff --git a/support/kconfig/patches/16-fix-space-to-de-select-options.patch b/support/kconfig/patches/16-fix-space-to-de-select-options.patch new file mode 100644 index 00000000..08f7ec5d --- /dev/null +++ b/support/kconfig/patches/16-fix-space-to-de-select-options.patch @@ -0,0 +1,41 @@ +commit 6faa447282fe90d42e0513af46c13f20b4b327d4 +Author: Yann E. MORIN +Date: Wed Nov 13 22:45:02 2013 +0100 + + support/kconfig: fix 'space' to (de)select options + + In case a menu has comment without letters/numbers (eg. characters + matching the regexp '^[^[:alpha:][:digit:]]+$', for example - or *), + hitting space will cycle through those comments, rather than + selecting/deselecting the currently-highlighted option. + + This is the behaviour of hitting any letter/digit: jump to the next + option which prompt starts with that letter. The only letters that + do not behave as such are 'y' 'm' and 'n'. Prompts that start with + one of those three letters are instead matched on the first letter + that is not 'y', 'm' or 'n'. + + Fix that by treating 'space' as we treat y/m/n, ie. as an action key, + not as shortcut to jump to prompt. + + Signed-off-by: "Yann E. MORIN" + Cc: Thomas Petazzoni + Cc: Peter Korsgaard + Cc: Samuel Martin + Cc: Thomas De Schampheleire + --- + Note: I'll be running this upstream soonish. + +Index: kconfig/lxdialog/menubox.c +=================================================================== +--- kconfig.orig/lxdialog/menubox.c ++++ kconfig/lxdialog/menubox.c +@@ -285,7 +285,7 @@ do_resize: + if (key < 256 && isalpha(key)) + key = tolower(key); + +- if (strchr("ynmh", key)) ++ if (strchr("ynmh ", key)) + i = max_choice; + else { + for (i = choice + 1; i < max_choice; i++) { diff --git a/support/kconfig/patches/17-backport-kecho.patch b/support/kconfig/patches/17-backport-kecho.patch new file mode 100644 index 00000000..9d138766 --- /dev/null +++ b/support/kconfig/patches/17-backport-kecho.patch @@ -0,0 +1,26 @@ +This commit added kecho to scripts/Kbuild.include (and doc). +Backported just Kbuild.include part to Makefile + +commit 5410ecc0def8955ab99810c5626cc7e156991896 +Author: Mike Frysinger +Date: Thu Nov 6 03:31:34 2008 -0500 + + kbuild: introduce $(kecho) convenience echo + +Index: kconfig/Makefile +=================================================================== +--- kconfig.orig/Makefile ++++ kconfig/Makefile +@@ -6,6 +6,12 @@ + PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \ + localmodconfig localyesconfig + ++# Easy method for doing a status message ++ kecho := : ++ quiet_kecho := echo ++silent_kecho := : ++kecho := $($(quiet)kecho) ++ + ifdef KBUILD_KCONFIG + Kconfig := $(KBUILD_KCONFIG) + else diff --git a/support/kconfig/patches/18-merge-config.sh-create-temporary-files-in-tmp.patch b/support/kconfig/patches/18-merge-config.sh-create-temporary-files-in-tmp.patch new file mode 100644 index 00000000..f2a261f3 --- /dev/null +++ b/support/kconfig/patches/18-merge-config.sh-create-temporary-files-in-tmp.patch @@ -0,0 +1,27 @@ +commit 0f56304521db42bd2c05867fd78a247104a4ad95 +Author: Henrique Marks +Date: Mon, 7 Dec 2015 12:08:45 -0200 + + merge_config.sh: create temporary files in /tmp + + Creating temporary files in /tmp (or the path pointed by $TMPDIR) allows the + buildroot top directory to be read-only and shareable between multible builds. + This follows what other scripts do, e.g. check-kernel-headers.sh. + + Signed-off-by: Henrique Marks + Signed-off-by: Carlos Santos + Signed-off-by: Peter Korsgaard + +Index: kconfig/merge_config.sh +=================================================================== +--- kconfig.orig/merge_config.sh ++++ kconfig/merge_config.sh +@@ -100,7 +100,7 @@ fi + + MERGE_LIST=$* + SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" +-TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) ++TMP_FILE=$(mktemp -t .tmp.config.XXXXXXXXXX) + + echo "Using $INITFILE as base" + cat $INITFILE > $TMP_FILE diff --git a/support/kconfig/patches/19-merge_config.sh-add-br2-external-support.patch b/support/kconfig/patches/19-merge_config.sh-add-br2-external-support.patch new file mode 100644 index 00000000..1d0ef323 --- /dev/null +++ b/support/kconfig/patches/19-merge_config.sh-add-br2-external-support.patch @@ -0,0 +1,47 @@ +commit 28fac3973b3c693c453594b007c08c1e1e5c4af3 +Author: Ilya Kuzmich +Date: Tue, 9 Jan 2018 14:37:43 +0300 + + merge_config.sh: add br2-external support + + Pass BR2_EXTERNAL value via -e option. + This will prevent merge_config.sh from silently eating any symbols defined in + external trees on a clean buildroot tree invocation. + + Signed-off-by: Ilya Kuzmich + Acked-by: "Yann E. MORIN" + Signed-off-by: Peter Korsgaard + +Index: kconfig/merge_config.sh +=================================================================== +--- kconfig.orig/merge_config.sh ++++ kconfig/merge_config.sh +@@ -33,6 +33,7 @@ usage() { + echo " -n use allnoconfig instead of alldefconfig" + echo " -r list redundant entries when merging fragments" + echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead." ++ echo " -e colon-separated list of br2-external trees to use (optional)" + } + + RUNMAKE=true +@@ -71,6 +72,11 @@ while true; do + shift 2 + continue + ;; ++ "-e") ++ EXTERNAL_ARG="BR2_EXTERNAL=$2" ++ shift 2 ++ continue ++ ;; + *) + break + ;; +@@ -151,7 +157,7 @@ fi + # Use the merged file as the starting point for: + # alldefconfig: Fills in any missing symbols with Kconfig default + # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set +-make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET ++make KCONFIG_ALLCONFIG=$TMP_FILE $EXTERNAL_ARG $OUTPUT_ARG $ALLTARGET + + + # Check all specified config values took (might have missed-dependency issues) diff --git a/support/kconfig/patches/20-merge_config.sh-Allow-to-define-config-prefix.patch b/support/kconfig/patches/20-merge_config.sh-Allow-to-define-config-prefix.patch new file mode 100644 index 00000000..645043b1 --- /dev/null +++ b/support/kconfig/patches/20-merge_config.sh-Allow-to-define-config-prefix.patch @@ -0,0 +1,31 @@ +Index: kconfig/merge_config.sh +=================================================================== +--- kconfig.orig/merge_config.sh ++++ kconfig/merge_config.sh +@@ -34,12 +34,16 @@ usage() { + echo " -r list redundant entries when merging fragments" + echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead." + echo " -e colon-separated list of br2-external trees to use (optional)" ++ echo ++ echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ ++ environment variable." + } + + RUNMAKE=true + ALLTARGET=alldefconfig + WARNREDUN=false + OUTPUT=. ++CONFIG_PREFIX=${CONFIG_-CONFIG_} + + while true; do + case $1 in +@@ -105,7 +109,8 @@ if [ ! -r "$INITFILE" ]; then + fi + + MERGE_LIST=$* +-SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" ++SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)[= ].*/\2/p" ++ + TMP_FILE=$(mktemp -t .tmp.config.XXXXXXXXXX) + + echo "Using $INITFILE as base" diff --git a/support/kconfig/patches/21-Avoid-false-positive-matches-from-comment-lines.patch b/support/kconfig/patches/21-Avoid-false-positive-matches-from-comment-lines.patch new file mode 100644 index 00000000..c11144e4 --- /dev/null +++ b/support/kconfig/patches/21-Avoid-false-positive-matches-from-comment-lines.patch @@ -0,0 +1,32 @@ +Index: kconfig/merge_config.sh +=================================================================== +--- kconfig.orig/merge_config.sh ++++ kconfig/merge_config.sh +@@ -109,7 +109,8 @@ if [ ! -r "$INITFILE" ]; then + fi + + MERGE_LIST=$* +-SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)[= ].*/\2/p" ++SED_CONFIG_EXP1="s/^\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)=.*/\1/p" ++SED_CONFIG_EXP2="s/^# \(${CONFIG_PREFIX}[a-zA-Z0-9_]*\) is not set$/\1/p" + + TMP_FILE=$(mktemp -t .tmp.config.XXXXXXXXXX) + +@@ -123,7 +124,7 @@ for MERGE_FILE in $MERGE_LIST ; do + echo "The merge file '$MERGE_FILE' does not exist. Exit." >&2 + exit 1 + fi +- CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) ++ CFG_LIST=$(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $MERGE_FILE) + + for CFG in $CFG_LIST ; do + grep -q -w $CFG $TMP_FILE || continue +@@ -166,7 +167,7 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $EXTERN + + + # Check all specified config values took (might have missed-dependency issues) +-for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do ++for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do + + REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) + ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG") diff --git a/support/kconfig/patches/series b/support/kconfig/patches/series new file mode 100644 index 00000000..e5a6f69d --- /dev/null +++ b/support/kconfig/patches/series @@ -0,0 +1,12 @@ +01-kconfig-kernel-to-buildroot.patch +06-br-build-system-integration.patch +10-br-build-system.patch +11-use-mktemp-for-lxdialog.patch +12-fix-glade-file-path.patch +14-support-out-of-tree-config.patch +16-fix-space-to-de-select-options.patch +17-backport-kecho.patch +18-merge-config.sh-create-temporary-files-in-tmp.patch +19-merge_config.sh-add-br2-external-support.patch +20-merge_config.sh-Allow-to-define-config-prefix.patch +21-Avoid-false-positive-matches-from-comment-lines.patch diff --git a/support/kconfig/qconf.cc b/support/kconfig/qconf.cc new file mode 100644 index 00000000..7896b584 --- /dev/null +++ b/support/kconfig/qconf.cc @@ -0,0 +1,1879 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Copyright (C) 2015 Boris Barbulovski + * Released under the terms of the GNU GPL v2.0. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "lkc.h" +#include "qconf.h" + +#include "qconf.moc" +#include "images.c" + +#ifdef _ +# undef _ +# define _ qgettext +#endif + +static QApplication *configApp; +static ConfigSettings *configSettings; + +QAction *ConfigMainWindow::saveAction; + +static inline QString qgettext(const char* str) +{ + return QString::fromLocal8Bit(gettext(str)); +} + +static inline QString qgettext(const QString& str) +{ + return QString::fromLocal8Bit(gettext(str.toLatin1())); +} + +ConfigSettings::ConfigSettings() + : QSettings("buildroot.org", "qconf") +{ +} + +/** + * Reads a list of integer values from the application settings. + */ +QList ConfigSettings::readSizes(const QString& key, bool *ok) +{ + QList result; + + if (contains(key)) + { + QStringList entryList = value(key).toStringList(); + QStringList::Iterator it; + + for (it = entryList.begin(); it != entryList.end(); ++it) + result.push_back((*it).toInt()); + + *ok = true; + } + else + *ok = false; + + return result; +} + +/** + * Writes a list of integer values to the application settings. + */ +bool ConfigSettings::writeSizes(const QString& key, const QList& value) +{ + QStringList stringList; + QList::ConstIterator it; + + for (it = value.begin(); it != value.end(); ++it) + stringList.push_back(QString::number(*it)); + setValue(key, stringList); + + return true; +} + + +/* + * set the new data + * TODO check the value + */ +void ConfigItem::okRename(int col) +{ +} + +/* + * update the displayed of a menu entry + */ +void ConfigItem::updateMenu(void) +{ + ConfigList* list; + struct symbol* sym; + struct property *prop; + QString prompt; + int type; + tristate expr; + + list = listView(); + if (goParent) { + setPixmap(promptColIdx, list->menuBackPix); + prompt = ".."; + goto set_prompt; + } + + sym = menu->sym; + prop = menu->prompt; + prompt = _(menu_get_prompt(menu)); + + if (prop) switch (prop->type) { + case P_MENU: + if (list->mode == singleMode || list->mode == symbolMode) { + /* a menuconfig entry is displayed differently + * depending whether it's at the view root or a child. + */ + if (sym && list->rootEntry == menu) + break; + setPixmap(promptColIdx, list->menuPix); + } else { + if (sym) + break; + setPixmap(promptColIdx, QIcon()); + } + goto set_prompt; + case P_COMMENT: + setPixmap(promptColIdx, QIcon()); + goto set_prompt; + default: + ; + } + if (!sym) + goto set_prompt; + + setText(nameColIdx, QString::fromLocal8Bit(sym->name)); + + type = sym_get_type(sym); + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + char ch; + + if (!sym_is_changable(sym) && list->optMode == normalOpt) { + setPixmap(promptColIdx, QIcon()); + setText(noColIdx, QString::null); + setText(modColIdx, QString::null); + setText(yesColIdx, QString::null); + break; + } + expr = sym_get_tristate_value(sym); + switch (expr) { + case yes: + if (sym_is_choice_value(sym) && type == S_BOOLEAN) + setPixmap(promptColIdx, list->choiceYesPix); + else + setPixmap(promptColIdx, list->symbolYesPix); + setText(yesColIdx, "Y"); + ch = 'Y'; + break; + case mod: + setPixmap(promptColIdx, list->symbolModPix); + setText(modColIdx, "M"); + ch = 'M'; + break; + default: + if (sym_is_choice_value(sym) && type == S_BOOLEAN) + setPixmap(promptColIdx, list->choiceNoPix); + else + setPixmap(promptColIdx, list->symbolNoPix); + setText(noColIdx, "N"); + ch = 'N'; + break; + } + if (expr != no) + setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0); + if (expr != mod) + setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0); + if (expr != yes) + setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0); + + setText(dataColIdx, QChar(ch)); + break; + case S_INT: + case S_HEX: + case S_STRING: + const char* data; + + data = sym_get_string_value(sym); + + setText(dataColIdx, data); + if (type == S_STRING) + prompt = QString("%1: %2").arg(prompt).arg(data); + else + prompt = QString("(%2) %1").arg(prompt).arg(data); + break; + } + if (!sym_has_value(sym) && visible) + prompt += _(" (NEW)"); +set_prompt: + setText(promptColIdx, prompt); +} + +void ConfigItem::testUpdateMenu(bool v) +{ + ConfigItem* i; + + visible = v; + if (!menu) + return; + + sym_calc_value(menu->sym); + if (menu->flags & MENU_CHANGED) { + /* the menu entry changed, so update all list items */ + menu->flags &= ~MENU_CHANGED; + for (i = (ConfigItem*)menu->data; i; i = i->nextItem) + i->updateMenu(); + } else if (listView()->updateAll) + updateMenu(); +} + + +/* + * construct a menu entry + */ +void ConfigItem::init(void) +{ + if (menu) { + ConfigList* list = listView(); + nextItem = (ConfigItem*)menu->data; + menu->data = this; + + if (list->mode != fullMode) + setExpanded(true); + sym_calc_value(menu->sym); + } + updateMenu(); +} + +/* + * destruct a menu entry + */ +ConfigItem::~ConfigItem(void) +{ + if (menu) { + ConfigItem** ip = (ConfigItem**)&menu->data; + for (; *ip; ip = &(*ip)->nextItem) { + if (*ip == this) { + *ip = nextItem; + break; + } + } + } +} + +ConfigLineEdit::ConfigLineEdit(ConfigView* parent) + : Parent(parent) +{ + connect(this, SIGNAL(editingFinished()), SLOT(hide())); +} + +void ConfigLineEdit::show(ConfigItem* i) +{ + item = i; + if (sym_get_string_value(item->menu->sym)) + setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); + else + setText(QString::null); + Parent::show(); + setFocus(); +} + +void ConfigLineEdit::keyPressEvent(QKeyEvent* e) +{ + switch (e->key()) { + case Qt::Key_Escape: + break; + case Qt::Key_Return: + case Qt::Key_Enter: + sym_set_string_value(item->menu->sym, text().toLatin1()); + parent()->updateList(item); + break; + default: + Parent::keyPressEvent(e); + return; + } + e->accept(); + parent()->list->setFocus(); + hide(); +} + +ConfigList::ConfigList(ConfigView* p, const char *name) + : Parent(p), + updateAll(false), + symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no), + choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), + menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void), + showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt), + rootEntry(0), headerPopup(0) +{ + int i; + + setObjectName(name); + setSortingEnabled(false); + setRootIsDecorated(true); + + setVerticalScrollMode(ScrollPerPixel); + setHorizontalScrollMode(ScrollPerPixel); + + setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value")); + + connect(this, SIGNAL(itemSelectionChanged(void)), + SLOT(updateSelection(void))); + + if (name) { + configSettings->beginGroup(name); + showName = configSettings->value("/showName", false).toBool(); + showRange = configSettings->value("/showRange", false).toBool(); + showData = configSettings->value("/showData", false).toBool(); + optMode = (enum optionMode)configSettings->value("/optionMode", 0).toInt(); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + } + + addColumn(promptColIdx); + + reinit(); +} + +bool ConfigList::menuSkip(struct menu *menu) +{ + if (optMode == normalOpt && menu_is_visible(menu)) + return false; + if (optMode == promptOpt && menu_has_prompt(menu)) + return false; + if (optMode == allOpt) + return false; + return true; +} + +void ConfigList::reinit(void) +{ + removeColumn(dataColIdx); + removeColumn(yesColIdx); + removeColumn(modColIdx); + removeColumn(noColIdx); + removeColumn(nameColIdx); + + if (showName) + addColumn(nameColIdx); + if (showRange) { + addColumn(noColIdx); + addColumn(modColIdx); + addColumn(yesColIdx); + } + if (showData) + addColumn(dataColIdx); + + updateListAll(); +} + +void ConfigList::saveSettings(void) +{ + if (!objectName().isEmpty()) { + configSettings->beginGroup(objectName()); + configSettings->setValue("/showName", showName); + configSettings->setValue("/showRange", showRange); + configSettings->setValue("/showData", showData); + configSettings->setValue("/optionMode", (int)optMode); + configSettings->endGroup(); + } +} + +ConfigItem* ConfigList::findConfigItem(struct menu *menu) +{ + ConfigItem* item = (ConfigItem*)menu->data; + + for (; item; item = item->nextItem) { + if (this == item->listView()) + break; + } + + return item; +} + +void ConfigList::updateSelection(void) +{ + struct menu *menu; + enum prop_type type; + + if (selectedItems().count() == 0) + return; + + ConfigItem* item = (ConfigItem*)selectedItems().first(); + if (!item) + return; + + menu = item->menu; + emit menuChanged(menu); + if (!menu) + return; + type = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (mode == menuMode && type == P_MENU) + emit menuSelected(menu); +} + +void ConfigList::updateList(ConfigItem* item) +{ + ConfigItem* last = 0; + + if (!rootEntry) { + if (mode != listMode) + goto update; + QTreeWidgetItemIterator it(this); + ConfigItem* item; + + while (*it) { + item = (ConfigItem*)(*it); + if (!item->menu) + continue; + item->testUpdateMenu(menu_is_visible(item->menu)); + + ++it; + } + return; + } + + if (rootEntry != &rootmenu && (mode == singleMode || + (mode == symbolMode && rootEntry->parent != &rootmenu))) { + item = (ConfigItem *)topLevelItem(0); + if (!item) + item = new ConfigItem(this, 0, true); + last = item; + } + if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) && + rootEntry->sym && rootEntry->prompt) { + item = last ? last->nextSibling() : firstChild(); + if (!item) + item = new ConfigItem(this, last, rootEntry, true); + else + item->testUpdateMenu(true); + + updateMenuList(item, rootEntry); + update(); + resizeColumnToContents(0); + return; + } +update: + updateMenuList(this, rootEntry); + update(); + resizeColumnToContents(0); +} + +void ConfigList::setValue(ConfigItem* item, tristate val) +{ + struct symbol* sym; + int type; + tristate oldval; + + sym = item->menu ? item->menu->sym : 0; + if (!sym) + return; + + type = sym_get_type(sym); + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + oldval = sym_get_tristate_value(sym); + + if (!sym_set_tristate_value(sym, val)) + return; + if (oldval == no && item->menu->list) + item->setExpanded(true); + parent()->updateList(item); + break; + } +} + +void ConfigList::changeValue(ConfigItem* item) +{ + struct symbol* sym; + struct menu* menu; + int type, oldexpr, newexpr; + + menu = item->menu; + if (!menu) + return; + sym = menu->sym; + if (!sym) { + if (item->menu->list) + item->setExpanded(!item->isExpanded()); + return; + } + + type = sym_get_type(sym); + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + oldexpr = sym_get_tristate_value(sym); + newexpr = sym_toggle_tristate_value(sym); + if (item->menu->list) { + if (oldexpr == newexpr) + item->setExpanded(!item->isExpanded()); + else if (oldexpr == no) + item->setExpanded(true); + } + if (oldexpr != newexpr) + parent()->updateList(item); + break; + case S_INT: + case S_HEX: + case S_STRING: + parent()->lineEdit->show(item); + break; + } +} + +void ConfigList::setRootMenu(struct menu *menu) +{ + enum prop_type type; + + if (rootEntry == menu) + return; + type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (type != P_MENU) + return; + updateMenuList(this, 0); + rootEntry = menu; + updateListAll(); + if (currentItem()) { + currentItem()->setSelected(hasFocus()); + scrollToItem(currentItem()); + } +} + +void ConfigList::setParentMenu(void) +{ + ConfigItem* item; + struct menu *oldroot; + + oldroot = rootEntry; + if (rootEntry == &rootmenu) + return; + setRootMenu(menu_get_parent_menu(rootEntry->parent)); + + QTreeWidgetItemIterator it(this); + while (*it) { + item = (ConfigItem *)(*it); + if (item->menu == oldroot) { + setCurrentItem(item); + scrollToItem(item); + break; + } + + ++it; + } +} + +/* + * update all the children of a menu entry + * removes/adds the entries from the parent widget as necessary + * + * parent: either the menu list widget or a menu entry widget + * menu: entry to be updated + */ +void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu) +{ + struct menu* child; + ConfigItem* item; + ConfigItem* last; + bool visible; + enum prop_type type; + + if (!menu) { + while (parent->childCount() > 0) + { + delete parent->takeChild(0); + } + + return; + } + + last = parent->firstChild(); + if (last && !last->goParent) + last = 0; + for (child = menu->list; child; child = child->next) { + item = last ? last->nextSibling() : parent->firstChild(); + type = child->prompt ? child->prompt->type : P_UNKNOWN; + + switch (mode) { + case menuMode: + if (!(child->flags & MENU_ROOT)) + goto hide; + break; + case symbolMode: + if (child->flags & MENU_ROOT) + goto hide; + break; + default: + break; + } + + visible = menu_is_visible(child); + if (!menuSkip(child)) { + if (!child->sym && !child->list && !child->prompt) + continue; + if (!item || item->menu != child) + item = new ConfigItem(parent, last, child, visible); + else + item->testUpdateMenu(visible); + + if (mode == fullMode || mode == menuMode || type != P_MENU) + updateMenuList(item, child); + else + updateMenuList(item, 0); + last = item; + continue; + } + hide: + if (item && item->menu == child) { + last = parent->firstChild(); + if (last == item) + last = 0; + else while (last->nextSibling() != item) + last = last->nextSibling(); + delete item; + } + } +} + +void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) +{ + struct menu* child; + ConfigItem* item; + ConfigItem* last; + bool visible; + enum prop_type type; + + if (!menu) { + while (parent->topLevelItemCount() > 0) + { + delete parent->takeTopLevelItem(0); + } + + return; + } + + last = (ConfigItem*)parent->topLevelItem(0); + if (last && !last->goParent) + last = 0; + for (child = menu->list; child; child = child->next) { + item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0); + type = child->prompt ? child->prompt->type : P_UNKNOWN; + + switch (mode) { + case menuMode: + if (!(child->flags & MENU_ROOT)) + goto hide; + break; + case symbolMode: + if (child->flags & MENU_ROOT) + goto hide; + break; + default: + break; + } + + visible = menu_is_visible(child); + if (!menuSkip(child)) { + if (!child->sym && !child->list && !child->prompt) + continue; + if (!item || item->menu != child) + item = new ConfigItem(parent, last, child, visible); + else + item->testUpdateMenu(visible); + + if (mode == fullMode || mode == menuMode || type != P_MENU) + updateMenuList(item, child); + else + updateMenuList(item, 0); + last = item; + continue; + } + hide: + if (item && item->menu == child) { + last = (ConfigItem*)parent->topLevelItem(0); + if (last == item) + last = 0; + else while (last->nextSibling() != item) + last = last->nextSibling(); + delete item; + } + } +} + +void ConfigList::keyPressEvent(QKeyEvent* ev) +{ + QTreeWidgetItem* i = currentItem(); + ConfigItem* item; + struct menu *menu; + enum prop_type type; + + if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) { + emit parentSelected(); + ev->accept(); + return; + } + + if (!i) { + Parent::keyPressEvent(ev); + return; + } + item = (ConfigItem*)i; + + switch (ev->key()) { + case Qt::Key_Return: + case Qt::Key_Enter: + if (item->goParent) { + emit parentSelected(); + break; + } + menu = item->menu; + if (!menu) + break; + type = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (type == P_MENU && rootEntry != menu && + mode != fullMode && mode != menuMode) { + emit menuSelected(menu); + break; + } + case Qt::Key_Space: + changeValue(item); + break; + case Qt::Key_N: + setValue(item, no); + break; + case Qt::Key_M: + setValue(item, mod); + break; + case Qt::Key_Y: + setValue(item, yes); + break; + default: + Parent::keyPressEvent(ev); + return; + } + ev->accept(); +} + +void ConfigList::mousePressEvent(QMouseEvent* e) +{ + //QPoint p(contentsToViewport(e->pos())); + //printf("contentsMousePressEvent: %d,%d\n", p.x(), p.y()); + Parent::mousePressEvent(e); +} + +void ConfigList::mouseReleaseEvent(QMouseEvent* e) +{ + QPoint p = e->pos(); + ConfigItem* item = (ConfigItem*)itemAt(p); + struct menu *menu; + enum prop_type ptype; + QIcon icon; + int idx, x; + + if (!item) + goto skip; + + menu = item->menu; + x = header()->offset() + p.x(); + idx = header()->logicalIndexAt(x); + switch (idx) { + case promptColIdx: + icon = item->pixmap(promptColIdx); + if (!icon.isNull()) { + int off = header()->sectionPosition(0) + visualRect(indexAt(p)).x() + 4; // 4 is Hardcoded image offset. There might be a way to do it properly. + if (x >= off && x < off + icon.availableSizes().first().width()) { + if (item->goParent) { + emit parentSelected(); + break; + } else if (!menu) + break; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (ptype == P_MENU && rootEntry != menu && + mode != fullMode && mode != menuMode) + emit menuSelected(menu); + else + changeValue(item); + } + } + break; + case noColIdx: + setValue(item, no); + break; + case modColIdx: + setValue(item, mod); + break; + case yesColIdx: + setValue(item, yes); + break; + case dataColIdx: + changeValue(item); + break; + } + +skip: + //printf("contentsMouseReleaseEvent: %d,%d\n", p.x(), p.y()); + Parent::mouseReleaseEvent(e); +} + +void ConfigList::mouseMoveEvent(QMouseEvent* e) +{ + //QPoint p(contentsToViewport(e->pos())); + //printf("contentsMouseMoveEvent: %d,%d\n", p.x(), p.y()); + Parent::mouseMoveEvent(e); +} + +void ConfigList::mouseDoubleClickEvent(QMouseEvent* e) +{ + QPoint p = e->pos(); // TODO: Check if this works(was contentsToViewport). + ConfigItem* item = (ConfigItem*)itemAt(p); + struct menu *menu; + enum prop_type ptype; + + if (!item) + goto skip; + if (item->goParent) { + emit parentSelected(); + goto skip; + } + menu = item->menu; + if (!menu) + goto skip; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (ptype == P_MENU && (mode == singleMode || mode == symbolMode)) + emit menuSelected(menu); + else if (menu->sym) + changeValue(item); + +skip: + //printf("contentsMouseDoubleClickEvent: %d,%d\n", p.x(), p.y()); + Parent::mouseDoubleClickEvent(e); +} + +void ConfigList::focusInEvent(QFocusEvent *e) +{ + struct menu *menu = NULL; + + Parent::focusInEvent(e); + + ConfigItem* item = (ConfigItem *)currentItem(); + if (item) { + item->setSelected(true); + menu = item->menu; + } + emit gotFocus(menu); +} + +void ConfigList::contextMenuEvent(QContextMenuEvent *e) +{ + if (e->y() <= header()->geometry().bottom()) { + if (!headerPopup) { + QAction *action; + + headerPopup = new QMenu(this); + action = new QAction(_("Show Name"), this); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowName(bool))); + connect(parent(), SIGNAL(showNameChanged(bool)), + action, SLOT(setOn(bool))); + action->setChecked(showName); + headerPopup->addAction(action); + action = new QAction(_("Show Range"), this); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowRange(bool))); + connect(parent(), SIGNAL(showRangeChanged(bool)), + action, SLOT(setOn(bool))); + action->setChecked(showRange); + headerPopup->addAction(action); + action = new QAction(_("Show Data"), this); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowData(bool))); + connect(parent(), SIGNAL(showDataChanged(bool)), + action, SLOT(setOn(bool))); + action->setChecked(showData); + headerPopup->addAction(action); + } + headerPopup->exec(e->globalPos()); + e->accept(); + } else + e->ignore(); +} + +ConfigView*ConfigView::viewList; +QAction *ConfigView::showNormalAction; +QAction *ConfigView::showAllAction; +QAction *ConfigView::showPromptAction; + +ConfigView::ConfigView(QWidget* parent, const char *name) + : Parent(parent) +{ + setObjectName(name); + QVBoxLayout *verticalLayout = new QVBoxLayout(this); + verticalLayout->setContentsMargins(0, 0, 0, 0); + + list = new ConfigList(this); + verticalLayout->addWidget(list); + lineEdit = new ConfigLineEdit(this); + lineEdit->hide(); + verticalLayout->addWidget(lineEdit); + + this->nextView = viewList; + viewList = this; +} + +ConfigView::~ConfigView(void) +{ + ConfigView** vp; + + for (vp = &viewList; *vp; vp = &(*vp)->nextView) { + if (*vp == this) { + *vp = nextView; + break; + } + } +} + +void ConfigView::setOptionMode(QAction *act) +{ + if (act == showNormalAction) + list->optMode = normalOpt; + else if (act == showAllAction) + list->optMode = allOpt; + else + list->optMode = promptOpt; + + list->updateListAll(); +} + +void ConfigView::setShowName(bool b) +{ + if (list->showName != b) { + list->showName = b; + list->reinit(); + emit showNameChanged(b); + } +} + +void ConfigView::setShowRange(bool b) +{ + if (list->showRange != b) { + list->showRange = b; + list->reinit(); + emit showRangeChanged(b); + } +} + +void ConfigView::setShowData(bool b) +{ + if (list->showData != b) { + list->showData = b; + list->reinit(); + emit showDataChanged(b); + } +} + +void ConfigList::setAllOpen(bool open) +{ + QTreeWidgetItemIterator it(this); + + while (*it) { + (*it)->setExpanded(open); + + ++it; + } +} + +void ConfigView::updateList(ConfigItem* item) +{ + ConfigView* v; + + for (v = viewList; v; v = v->nextView) + v->list->updateList(item); +} + +void ConfigView::updateListAll(void) +{ + ConfigView* v; + + for (v = viewList; v; v = v->nextView) + v->list->updateListAll(); +} + +ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) + : Parent(parent), sym(0), _menu(0) +{ + setObjectName(name); + + + if (!objectName().isEmpty()) { + configSettings->beginGroup(objectName()); + setShowDebug(configSettings->value("/showDebug", false).toBool()); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + } +} + +void ConfigInfoView::saveSettings(void) +{ + if (!objectName().isEmpty()) { + configSettings->beginGroup(objectName()); + configSettings->setValue("/showDebug", showDebug()); + configSettings->endGroup(); + } +} + +void ConfigInfoView::setShowDebug(bool b) +{ + if (_showDebug != b) { + _showDebug = b; + if (_menu) + menuInfo(); + else if (sym) + symbolInfo(); + emit showDebugChanged(b); + } +} + +void ConfigInfoView::setInfo(struct menu *m) +{ + if (_menu == m) + return; + _menu = m; + sym = NULL; + if (!_menu) + clear(); + else + menuInfo(); +} + +void ConfigInfoView::symbolInfo(void) +{ + QString str; + + str += "Symbol: "; + str += print_filter(sym->name); + str += "

value: "; + str += print_filter(sym_get_string_value(sym)); + str += "
visibility: "; + str += sym->visible == yes ? "y" : sym->visible == mod ? "m" : "n"; + str += "
"; + str += debug_info(sym); + + setText(str); +} + +void ConfigInfoView::menuInfo(void) +{ + struct symbol* sym; + QString head, debug, help; + + sym = _menu->sym; + if (sym) { + if (_menu->prompt) { + head += ""; + head += print_filter(_(_menu->prompt->text)); + head += ""; + if (sym->name) { + head += " ("; + if (showDebug()) + head += QString().sprintf("", sym); + head += print_filter(sym->name); + if (showDebug()) + head += ""; + head += ")"; + } + } else if (sym->name) { + head += ""; + if (showDebug()) + head += QString().sprintf("", sym); + head += print_filter(sym->name); + if (showDebug()) + head += ""; + head += ""; + } + head += "

"; + + if (showDebug()) + debug = debug_info(sym); + + struct gstr help_gstr = str_new(); + menu_get_ext_help(_menu, &help_gstr); + help = print_filter(str_get(&help_gstr)); + str_free(&help_gstr); + } else if (_menu->prompt) { + head += ""; + head += print_filter(_(_menu->prompt->text)); + head += "

"; + if (showDebug()) { + if (_menu->prompt->visible.expr) { + debug += "  dep: "; + expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE); + debug += "

"; + } + } + } + if (showDebug()) + debug += QString().sprintf("defined at %s:%d

", _menu->file->name, _menu->lineno); + + setText(head + debug + help); +} + +QString ConfigInfoView::debug_info(struct symbol *sym) +{ + QString debug; + + debug += "type: "; + debug += print_filter(sym_type_name(sym->type)); + if (sym_is_choice(sym)) + debug += " (choice)"; + debug += "
"; + if (sym->rev_dep.expr) { + debug += "reverse dep: "; + expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + for (struct property *prop = sym->prop; prop; prop = prop->next) { + switch (prop->type) { + case P_PROMPT: + case P_MENU: + debug += QString().sprintf("prompt: ", prop->menu); + debug += print_filter(_(prop->text)); + debug += "
"; + break; + case P_DEFAULT: + case P_SELECT: + case P_RANGE: + case P_ENV: + debug += prop_get_type_name(prop->type); + debug += ": "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + break; + case P_CHOICE: + if (sym_is_choice(sym)) { + debug += "choice: "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + break; + default: + debug += "unknown property: "; + debug += prop_get_type_name(prop->type); + debug += "
"; + } + if (prop->visible.expr) { + debug += "    dep: "; + expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + } + debug += "
"; + + return debug; +} + +QString ConfigInfoView::print_filter(const QString &str) +{ + QRegExp re("[<>&\"\\n]"); + QString res = str; + for (int i = 0; (i = res.indexOf(re, i)) >= 0;) { + switch (res[i].toLatin1()) { + case '<': + res.replace(i, 1, "<"); + i += 4; + break; + case '>': + res.replace(i, 1, ">"); + i += 4; + break; + case '&': + res.replace(i, 1, "&"); + i += 5; + break; + case '"': + res.replace(i, 1, """); + i += 6; + break; + case '\n': + res.replace(i, 1, "
"); + i += 4; + break; + } + } + return res; +} + +void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str) +{ + QString* text = reinterpret_cast(data); + QString str2 = print_filter(str); + + if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { + *text += QString().sprintf("", sym); + *text += str2; + *text += ""; + } else + *text += str2; +} + +QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos) +{ + QMenu* popup = Parent::createStandardContextMenu(pos); + QAction* action = new QAction(_("Show Debug Info"), popup); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); + connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); + action->setChecked(showDebug()); + popup->addSeparator(); + popup->addAction(action); + return popup; +} + +void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e) +{ + Parent::contextMenuEvent(e); +} + +ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name) + : Parent(parent), result(NULL) +{ + setObjectName(name); + setWindowTitle("Search Config"); + + QVBoxLayout* layout1 = new QVBoxLayout(this); + layout1->setContentsMargins(11, 11, 11, 11); + layout1->setSpacing(6); + QHBoxLayout* layout2 = new QHBoxLayout(0); + layout2->setContentsMargins(0, 0, 0, 0); + layout2->setSpacing(6); + layout2->addWidget(new QLabel(_("Find:"), this)); + editField = new QLineEdit(this); + connect(editField, SIGNAL(returnPressed()), SLOT(search())); + layout2->addWidget(editField); + searchButton = new QPushButton(_("Search"), this); + searchButton->setAutoDefault(false); + connect(searchButton, SIGNAL(clicked()), SLOT(search())); + layout2->addWidget(searchButton); + layout1->addLayout(layout2); + + split = new QSplitter(this); + split->setOrientation(Qt::Vertical); + list = new ConfigView(split, name); + list->list->mode = listMode; + info = new ConfigInfoView(split, name); + connect(list->list, SIGNAL(menuChanged(struct menu *)), + info, SLOT(setInfo(struct menu *))); + connect(list->list, SIGNAL(menuChanged(struct menu *)), + parent, SLOT(setMenuLink(struct menu *))); + + layout1->addWidget(split); + + if (name) { + QVariant x, y; + int width, height; + bool ok; + + configSettings->beginGroup(name); + width = configSettings->value("/window width", parent->width() / 2).toInt(); + height = configSettings->value("/window height", parent->height() / 2).toInt(); + resize(width, height); + x = configSettings->value("/window x"); + y = configSettings->value("/window y"); + if ((x.isValid())&&(y.isValid())) + move(x.toInt(), y.toInt()); + QList sizes = configSettings->readSizes("/split", &ok); + if (ok) + split->setSizes(sizes); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + } +} + +void ConfigSearchWindow::saveSettings(void) +{ + if (!objectName().isEmpty()) { + configSettings->beginGroup(objectName()); + configSettings->setValue("/window x", pos().x()); + configSettings->setValue("/window y", pos().y()); + configSettings->setValue("/window width", size().width()); + configSettings->setValue("/window height", size().height()); + configSettings->writeSizes("/split", split->sizes()); + configSettings->endGroup(); + } +} + +void ConfigSearchWindow::search(void) +{ + struct symbol **p; + struct property *prop; + ConfigItem *lastItem = NULL; + + free(result); + list->list->clear(); + info->clear(); + + result = sym_re_search(editField->text().toLatin1()); + if (!result) + return; + for (p = result; *p; p++) { + for_all_prompts((*p), prop) + lastItem = new ConfigItem(list->list, lastItem, prop->menu, + menu_is_visible(prop->menu)); + } +} + +/* + * Construct the complete config widget + */ +ConfigMainWindow::ConfigMainWindow(void) + : searchWindow(0) +{ + QMenuBar* menu; + bool ok = true; + QVariant x, y; + int width, height; + char title[256]; + + QDesktopWidget *d = configApp->desktop(); + snprintf(title, sizeof(title), "%s%s", + rootmenu.prompt->text, + "" + ); + setWindowTitle(title); + + width = configSettings->value("/window width", d->width() - 64).toInt(); + height = configSettings->value("/window height", d->height() - 64).toInt(); + resize(width, height); + x = configSettings->value("/window x"); + y = configSettings->value("/window y"); + if ((x.isValid())&&(y.isValid())) + move(x.toInt(), y.toInt()); + + split1 = new QSplitter(this); + split1->setOrientation(Qt::Horizontal); + setCentralWidget(split1); + + menuView = new ConfigView(split1, "menu"); + menuList = menuView->list; + + split2 = new QSplitter(split1); + split2->setOrientation(Qt::Vertical); + + // create config tree + configView = new ConfigView(split2, "config"); + configList = configView->list; + + helpText = new ConfigInfoView(split2, "help"); + + setTabOrder(configList, helpText); + configList->setFocus(); + + menu = menuBar(); + toolBar = new QToolBar("Tools", this); + addToolBar(toolBar); + + backAction = new QAction(QPixmap(xpm_back), _("Back"), this); + connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); + backAction->setEnabled(false); + QAction *quitAction = new QAction(_("&Quit"), this); + quitAction->setShortcut(Qt::CTRL + Qt::Key_Q); + connect(quitAction, SIGNAL(triggered(bool)), SLOT(close())); + QAction *loadAction = new QAction(QPixmap(xpm_load), _("&Load"), this); + loadAction->setShortcut(Qt::CTRL + Qt::Key_L); + connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig())); + saveAction = new QAction(QPixmap(xpm_save), _("&Save"), this); + saveAction->setShortcut(Qt::CTRL + Qt::Key_S); + connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig())); + conf_set_changed_callback(conf_changed); + // Set saveAction's initial state + conf_changed(); + QAction *saveAsAction = new QAction(_("Save &As..."), this); + connect(saveAsAction, SIGNAL(triggered(bool)), SLOT(saveConfigAs())); + QAction *searchAction = new QAction(_("&Find"), this); + searchAction->setShortcut(Qt::CTRL + Qt::Key_F); + connect(searchAction, SIGNAL(triggered(bool)), SLOT(searchConfig())); + singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this); + singleViewAction->setCheckable(true); + connect(singleViewAction, SIGNAL(triggered(bool)), SLOT(showSingleView())); + splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this); + splitViewAction->setCheckable(true); + connect(splitViewAction, SIGNAL(triggered(bool)), SLOT(showSplitView())); + fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this); + fullViewAction->setCheckable(true); + connect(fullViewAction, SIGNAL(triggered(bool)), SLOT(showFullView())); + + QAction *showNameAction = new QAction(_("Show Name"), this); + showNameAction->setCheckable(true); + connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool))); + showNameAction->setChecked(configView->showName()); + QAction *showRangeAction = new QAction(_("Show Range"), this); + showRangeAction->setCheckable(true); + connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool))); + QAction *showDataAction = new QAction(_("Show Data"), this); + showDataAction->setCheckable(true); + connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool))); + + QActionGroup *optGroup = new QActionGroup(this); + optGroup->setExclusive(true); + connect(optGroup, SIGNAL(triggered(QAction*)), configView, + SLOT(setOptionMode(QAction *))); + connect(optGroup, SIGNAL(triggered(QAction *)), menuView, + SLOT(setOptionMode(QAction *))); + + configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup); + configView->showAllAction = new QAction(_("Show All Options"), optGroup); + configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup); + configView->showNormalAction->setCheckable(true); + configView->showAllAction->setCheckable(true); + configView->showPromptAction->setCheckable(true); + + QAction *showDebugAction = new QAction( _("Show Debug Info"), this); + showDebugAction->setCheckable(true); + connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool))); + showDebugAction->setChecked(helpText->showDebug()); + + QAction *showIntroAction = new QAction( _("Introduction"), this); + connect(showIntroAction, SIGNAL(triggered(bool)), SLOT(showIntro())); + QAction *showAboutAction = new QAction( _("About"), this); + connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout())); + + // init tool bar + toolBar->addAction(backAction); + toolBar->addSeparator(); + toolBar->addAction(loadAction); + toolBar->addAction(saveAction); + toolBar->addSeparator(); + toolBar->addAction(singleViewAction); + toolBar->addAction(splitViewAction); + toolBar->addAction(fullViewAction); + + // create config menu + QMenu* config = menu->addMenu(_("&File")); + config->addAction(loadAction); + config->addAction(saveAction); + config->addAction(saveAsAction); + config->addSeparator(); + config->addAction(quitAction); + + // create edit menu + QMenu* editMenu = menu->addMenu(_("&Edit")); + editMenu->addAction(searchAction); + + // create options menu + QMenu* optionMenu = menu->addMenu(_("&Option")); + optionMenu->addAction(showNameAction); + optionMenu->addAction(showRangeAction); + optionMenu->addAction(showDataAction); + optionMenu->addSeparator(); + optionMenu->addActions(optGroup->actions()); + optionMenu->addSeparator(); + optionMenu->addAction(showDebugAction); + + // create help menu + menu->addSeparator(); + QMenu* helpMenu = menu->addMenu(_("&Help")); + helpMenu->addAction(showIntroAction); + helpMenu->addAction(showAboutAction); + + connect(configList, SIGNAL(menuChanged(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(configList, SIGNAL(menuSelected(struct menu *)), + SLOT(changeMenu(struct menu *))); + connect(configList, SIGNAL(parentSelected()), + SLOT(goBack())); + connect(menuList, SIGNAL(menuChanged(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(menuList, SIGNAL(menuSelected(struct menu *)), + SLOT(changeMenu(struct menu *))); + + connect(configList, SIGNAL(gotFocus(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(menuList, SIGNAL(gotFocus(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(menuList, SIGNAL(gotFocus(struct menu *)), + SLOT(listFocusChanged(void))); + connect(helpText, SIGNAL(menuSelected(struct menu *)), + SLOT(setMenuLink(struct menu *))); + + QString listMode = configSettings->value("/listMode", "symbol").toString(); + if (listMode == "single") + showSingleView(); + else if (listMode == "full") + showFullView(); + else /*if (listMode == "split")*/ + showSplitView(); + + // UI setup done, restore splitter positions + QList sizes = configSettings->readSizes("/split1", &ok); + if (ok) + split1->setSizes(sizes); + + sizes = configSettings->readSizes("/split2", &ok); + if (ok) + split2->setSizes(sizes); +} + +void ConfigMainWindow::loadConfig(void) +{ + QString s = QFileDialog::getOpenFileName(this, "", conf_get_configname()); + if (s.isNull()) + return; + if (conf_read(QFile::encodeName(s))) + QMessageBox::information(this, "qconf", _("Unable to load configuration!")); + ConfigView::updateListAll(); +} + +bool ConfigMainWindow::saveConfig(void) +{ + if (conf_write(NULL)) { + QMessageBox::information(this, "qconf", _("Unable to save configuration!")); + return false; + } + return true; +} + +void ConfigMainWindow::saveConfigAs(void) +{ + QString s = QFileDialog::getSaveFileName(this, "", conf_get_configname()); + if (s.isNull()) + return; + saveConfig(); +} + +void ConfigMainWindow::searchConfig(void) +{ + if (!searchWindow) + searchWindow = new ConfigSearchWindow(this, "search"); + searchWindow->show(); +} + +void ConfigMainWindow::changeMenu(struct menu *menu) +{ + configList->setRootMenu(menu); + if (configList->rootEntry->parent == &rootmenu) + backAction->setEnabled(false); + else + backAction->setEnabled(true); +} + +void ConfigMainWindow::setMenuLink(struct menu *menu) +{ + struct menu *parent; + ConfigList* list = NULL; + ConfigItem* item; + + if (configList->menuSkip(menu)) + return; + + switch (configList->mode) { + case singleMode: + list = configList; + parent = menu_get_parent_menu(menu); + if (!parent) + return; + list->setRootMenu(parent); + break; + case symbolMode: + if (menu->flags & MENU_ROOT) { + configList->setRootMenu(menu); + configList->clearSelection(); + list = menuList; + } else { + list = configList; + parent = menu_get_parent_menu(menu->parent); + if (!parent) + return; + item = menuList->findConfigItem(parent); + if (item) { + item->setSelected(true); + menuList->scrollToItem(item); + } + list->setRootMenu(parent); + } + break; + case fullMode: + list = configList; + break; + default: + break; + } + + if (list) { + item = list->findConfigItem(menu); + if (item) { + item->setSelected(true); + list->scrollToItem(item); + list->setFocus(); + } + } +} + +void ConfigMainWindow::listFocusChanged(void) +{ + if (menuList->mode == menuMode) + configList->clearSelection(); +} + +void ConfigMainWindow::goBack(void) +{ + ConfigItem* item, *oldSelection; + + configList->setParentMenu(); + if (configList->rootEntry == &rootmenu) + backAction->setEnabled(false); + + if (menuList->selectedItems().count() == 0) + return; + + item = (ConfigItem*)menuList->selectedItems().first(); + oldSelection = item; + while (item) { + if (item->menu == configList->rootEntry) { + oldSelection->setSelected(false); + item->setSelected(true); + break; + } + item = (ConfigItem*)item->parent(); + } +} + +void ConfigMainWindow::showSingleView(void) +{ + singleViewAction->setEnabled(false); + singleViewAction->setChecked(true); + splitViewAction->setEnabled(true); + splitViewAction->setChecked(false); + fullViewAction->setEnabled(true); + fullViewAction->setChecked(false); + + menuView->hide(); + menuList->setRootMenu(0); + configList->mode = singleMode; + if (configList->rootEntry == &rootmenu) + configList->updateListAll(); + else + configList->setRootMenu(&rootmenu); + configList->setFocus(); +} + +void ConfigMainWindow::showSplitView(void) +{ + singleViewAction->setEnabled(true); + singleViewAction->setChecked(false); + splitViewAction->setEnabled(false); + splitViewAction->setChecked(true); + fullViewAction->setEnabled(true); + fullViewAction->setChecked(false); + + configList->mode = symbolMode; + if (configList->rootEntry == &rootmenu) + configList->updateListAll(); + else + configList->setRootMenu(&rootmenu); + configList->setAllOpen(true); + configApp->processEvents(); + menuList->mode = menuMode; + menuList->setRootMenu(&rootmenu); + menuList->setAllOpen(true); + menuView->show(); + menuList->setFocus(); +} + +void ConfigMainWindow::showFullView(void) +{ + singleViewAction->setEnabled(true); + singleViewAction->setChecked(false); + splitViewAction->setEnabled(true); + splitViewAction->setChecked(false); + fullViewAction->setEnabled(false); + fullViewAction->setChecked(true); + + menuView->hide(); + menuList->setRootMenu(0); + configList->mode = fullMode; + if (configList->rootEntry == &rootmenu) + configList->updateListAll(); + else + configList->setRootMenu(&rootmenu); + configList->setFocus(); +} + +/* + * ask for saving configuration before quitting + * TODO ask only when something changed + */ +void ConfigMainWindow::closeEvent(QCloseEvent* e) +{ + if (!conf_get_changed()) { + e->accept(); + return; + } + QMessageBox mb("qconf", _("Save configuration?"), QMessageBox::Warning, + QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape); + mb.setButtonText(QMessageBox::Yes, _("&Save Changes")); + mb.setButtonText(QMessageBox::No, _("&Discard Changes")); + mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); + switch (mb.exec()) { + case QMessageBox::Yes: + if (saveConfig()) + e->accept(); + else + e->ignore(); + break; + case QMessageBox::No: + e->accept(); + break; + case QMessageBox::Cancel: + e->ignore(); + break; + } +} + +void ConfigMainWindow::showIntro(void) +{ + static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n" + "For each option, a blank box indicates the feature is disabled, a check\n" + "indicates it is enabled, and a dot indicates that it is to be compiled\n" + "as a module. Clicking on the box will cycle through the three states.\n\n" + "If you do not see an option (e.g., a device driver) that you believe\n" + "should be present, try turning on Show All Options under the Options menu.\n" + "Although there is no cross reference yet to help you figure out what other\n" + "options must be enabled to support the option you are interested in, you can\n" + "still view the help of a grayed-out option.\n\n" + "Toggling Show Debug Info under the Options menu will show the dependencies,\n" + "which you can then match by examining other options.\n\n"); + + QMessageBox::information(this, "qconf", str); +} + +void ConfigMainWindow::showAbout(void) +{ + static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel .\n" + "Copyright (C) 2015 Boris Barbulovski .\n\n" + "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n"); + + QMessageBox::information(this, "qconf", str); +} + +void ConfigMainWindow::saveSettings(void) +{ + configSettings->setValue("/window x", pos().x()); + configSettings->setValue("/window y", pos().y()); + configSettings->setValue("/window width", size().width()); + configSettings->setValue("/window height", size().height()); + + QString entry; + switch(configList->mode) { + case singleMode : + entry = "single"; + break; + + case symbolMode : + entry = "split"; + break; + + case fullMode : + entry = "full"; + break; + + default: + break; + } + configSettings->setValue("/listMode", entry); + + configSettings->writeSizes("/split1", split1->sizes()); + configSettings->writeSizes("/split2", split2->sizes()); +} + +void ConfigMainWindow::conf_changed(void) +{ + if (saveAction) + saveAction->setEnabled(conf_get_changed()); +} + +void fixup_rootmenu(struct menu *menu) +{ + struct menu *child; + static int menu_cnt = 0; + + menu->flags |= MENU_ROOT; + for (child = menu->list; child; child = child->next) { + if (child->prompt && child->prompt->type == P_MENU) { + menu_cnt++; + fixup_rootmenu(child); + menu_cnt--; + } else if (!menu_cnt) + fixup_rootmenu(child); + } +} + +static const char *progname; + +static void usage(void) +{ + printf(_("%s [-s] \n").toLatin1().constData(), progname); + exit(0); +} + +int main(int ac, char** av) +{ + ConfigMainWindow* v; + const char *name; + + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + progname = av[0]; + configApp = new QApplication(ac, av); + if (ac > 1 && av[1][0] == '-') { + switch (av[1][1]) { + case 's': + conf_set_message_callback(NULL); + break; + case 'h': + case '?': + usage(); + } + name = av[2]; + } else + name = av[1]; + if (!name) + usage(); + + conf_parse(name); + fixup_rootmenu(&rootmenu); + conf_read(NULL); + //zconfdump(stdout); + + configSettings = new ConfigSettings(); + configSettings->beginGroup("/kconfig/qconf"); + v = new ConfigMainWindow(); + + //zconfdump(stdout); + configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit())); + configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings())); + v->show(); + configApp->exec(); + + configSettings->endGroup(); + delete configSettings; + delete v; + delete configApp; + + return 0; +} diff --git a/support/kconfig/qconf.h b/support/kconfig/qconf.h new file mode 100644 index 00000000..a40036d1 --- /dev/null +++ b/support/kconfig/qconf.h @@ -0,0 +1,330 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "expr.h" + +class ConfigView; +class ConfigList; +class ConfigItem; +class ConfigLineEdit; +class ConfigMainWindow; + +class ConfigSettings : public QSettings { +public: + ConfigSettings(); + QList readSizes(const QString& key, bool *ok); + bool writeSizes(const QString& key, const QList& value); +}; + +enum colIdx { + promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr +}; +enum listMode { + singleMode, menuMode, symbolMode, fullMode, listMode +}; +enum optionMode { + normalOpt = 0, allOpt, promptOpt +}; + +class ConfigList : public QTreeWidget { + Q_OBJECT + typedef class QTreeWidget Parent; +public: + ConfigList(ConfigView* p, const char *name = 0); + void reinit(void); + ConfigView* parent(void) const + { + return (ConfigView*)Parent::parent(); + } + ConfigItem* findConfigItem(struct menu *); + +protected: + void keyPressEvent(QKeyEvent *e); + void mousePressEvent(QMouseEvent *e); + void mouseReleaseEvent(QMouseEvent *e); + void mouseMoveEvent(QMouseEvent *e); + void mouseDoubleClickEvent(QMouseEvent *e); + void focusInEvent(QFocusEvent *e); + void contextMenuEvent(QContextMenuEvent *e); + +public slots: + void setRootMenu(struct menu *menu); + + void updateList(ConfigItem *item); + void setValue(ConfigItem* item, tristate val); + void changeValue(ConfigItem* item); + void updateSelection(void); + void saveSettings(void); +signals: + void menuChanged(struct menu *menu); + void menuSelected(struct menu *menu); + void parentSelected(void); + void gotFocus(struct menu *); + +public: + void updateListAll(void) + { + updateAll = true; + updateList(NULL); + updateAll = false; + } + ConfigList* listView() + { + return this; + } + ConfigItem* firstChild() const + { + return (ConfigItem *)children().first(); + } + void addColumn(colIdx idx) + { + showColumn(idx); + } + void removeColumn(colIdx idx) + { + hideColumn(idx); + } + void setAllOpen(bool open); + void setParentMenu(void); + + bool menuSkip(struct menu *); + + void updateMenuList(ConfigItem *parent, struct menu*); + void updateMenuList(ConfigList *parent, struct menu*); + + bool updateAll; + + QPixmap symbolYesPix, symbolModPix, symbolNoPix; + QPixmap choiceYesPix, choiceNoPix; + QPixmap menuPix, menuInvPix, menuBackPix, voidPix; + + bool showName, showRange, showData; + enum listMode mode; + enum optionMode optMode; + struct menu *rootEntry; + QPalette disabledColorGroup; + QPalette inactivedColorGroup; + QMenu* headerPopup; +}; + +class ConfigItem : public QTreeWidgetItem { + typedef class QTreeWidgetItem Parent; +public: + ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m, bool v) + : Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) + { + init(); + } + ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v) + : Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) + { + init(); + } + ConfigItem(ConfigList *parent, ConfigItem *after, bool v) + : Parent(parent, after), nextItem(0), menu(0), visible(v), goParent(true) + { + init(); + } + ~ConfigItem(void); + void init(void); + void okRename(int col); + void updateMenu(void); + void testUpdateMenu(bool v); + ConfigList* listView() const + { + return (ConfigList*)Parent::treeWidget(); + } + ConfigItem* firstChild() const + { + return (ConfigItem *)Parent::child(0); + } + ConfigItem* nextSibling() + { + ConfigItem *ret = NULL; + ConfigItem *_parent = (ConfigItem *)parent(); + + if(_parent) { + ret = (ConfigItem *)_parent->child(_parent->indexOfChild(this)+1); + } else { + QTreeWidget *_treeWidget = treeWidget(); + ret = (ConfigItem *)_treeWidget->topLevelItem(_treeWidget->indexOfTopLevelItem(this)+1); + } + + return ret; + } + void setText(colIdx idx, const QString& text) + { + Parent::setText(idx, text); + } + QString text(colIdx idx) const + { + return Parent::text(idx); + } + void setPixmap(colIdx idx, const QIcon &icon) + { + Parent::setIcon(idx, icon); + } + const QIcon pixmap(colIdx idx) const + { + return icon(idx); + } + // TODO: Implement paintCell + + ConfigItem* nextItem; + struct menu *menu; + bool visible; + bool goParent; +}; + +class ConfigLineEdit : public QLineEdit { + Q_OBJECT + typedef class QLineEdit Parent; +public: + ConfigLineEdit(ConfigView* parent); + ConfigView* parent(void) const + { + return (ConfigView*)Parent::parent(); + } + void show(ConfigItem *i); + void keyPressEvent(QKeyEvent *e); + +public: + ConfigItem *item; +}; + +class ConfigView : public QWidget { + Q_OBJECT + typedef class QWidget Parent; +public: + ConfigView(QWidget* parent, const char *name = 0); + ~ConfigView(void); + static void updateList(ConfigItem* item); + static void updateListAll(void); + + bool showName(void) const { return list->showName; } + bool showRange(void) const { return list->showRange; } + bool showData(void) const { return list->showData; } +public slots: + void setShowName(bool); + void setShowRange(bool); + void setShowData(bool); + void setOptionMode(QAction *); +signals: + void showNameChanged(bool); + void showRangeChanged(bool); + void showDataChanged(bool); +public: + ConfigList* list; + ConfigLineEdit* lineEdit; + + static ConfigView* viewList; + ConfigView* nextView; + + static QAction *showNormalAction; + static QAction *showAllAction; + static QAction *showPromptAction; +}; + +class ConfigInfoView : public QTextBrowser { + Q_OBJECT + typedef class QTextBrowser Parent; +public: + ConfigInfoView(QWidget* parent, const char *name = 0); + bool showDebug(void) const { return _showDebug; } + +public slots: + void setInfo(struct menu *menu); + void saveSettings(void); + void setShowDebug(bool); + +signals: + void showDebugChanged(bool); + void menuSelected(struct menu *); + +protected: + void symbolInfo(void); + void menuInfo(void); + QString debug_info(struct symbol *sym); + static QString print_filter(const QString &str); + static void expr_print_help(void *data, struct symbol *sym, const char *str); + QMenu *createStandardContextMenu(const QPoint & pos); + void contextMenuEvent(QContextMenuEvent *e); + + struct symbol *sym; + struct menu *_menu; + bool _showDebug; +}; + +class ConfigSearchWindow : public QDialog { + Q_OBJECT + typedef class QDialog Parent; +public: + ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0); + +public slots: + void saveSettings(void); + void search(void); + +protected: + QLineEdit* editField; + QPushButton* searchButton; + QSplitter* split; + ConfigView* list; + ConfigInfoView* info; + + struct symbol **result; +}; + +class ConfigMainWindow : public QMainWindow { + Q_OBJECT + + static QAction *saveAction; + static void conf_changed(void); +public: + ConfigMainWindow(void); +public slots: + void changeMenu(struct menu *); + void setMenuLink(struct menu *); + void listFocusChanged(void); + void goBack(void); + void loadConfig(void); + bool saveConfig(void); + void saveConfigAs(void); + void searchConfig(void); + void showSingleView(void); + void showSplitView(void); + void showFullView(void); + void showIntro(void); + void showAbout(void); + void saveSettings(void); + +protected: + void closeEvent(QCloseEvent *e); + + ConfigSearchWindow *searchWindow; + ConfigView *menuView; + ConfigList *menuList; + ConfigView *configView; + ConfigList *configList; + ConfigInfoView *helpText; + QToolBar *toolBar; + QAction *backAction; + QAction *singleViewAction; + QAction *splitViewAction; + QAction *fullViewAction; + QSplitter *split1; + QSplitter *split2; +}; diff --git a/support/kconfig/streamline_config.pl b/support/kconfig/streamline_config.pl new file mode 100755 index 00000000..a2e83ab1 --- /dev/null +++ b/support/kconfig/streamline_config.pl @@ -0,0 +1,682 @@ +#!/usr/bin/env perl +# +# Copyright 2005-2009 - Steven Rostedt +# Licensed under the terms of the GNU GPL License version 2 +# +# It's simple enough to figure out how this works. +# If not, then you can ask me at stripconfig@goodmis.org +# +# What it does? +# +# If you have installed a Linux kernel from a distribution +# that turns on way too many modules than you need, and +# you only want the modules you use, then this program +# is perfect for you. +# +# It gives you the ability to turn off all the modules that are +# not loaded on your system. +# +# Howto: +# +# 1. Boot up the kernel that you want to stream line the config on. +# 2. Change directory to the directory holding the source of the +# kernel that you just booted. +# 3. Copy the configuraton file to this directory as .config +# 4. Have all your devices that you need modules for connected and +# operational (make sure that their corresponding modules are loaded) +# 5. Run this script redirecting the output to some other file +# like config_strip. +# 6. Back up your old config (if you want too). +# 7. copy the config_strip file to .config +# 8. Run "make oldconfig" +# +# Now your kernel is ready to be built with only the modules that +# are loaded. +# +# Here's what I did with my Debian distribution. +# +# cd /usr/src/linux-2.6.10 +# cp /boot/config-2.6.10-1-686-smp .config +# ~/bin/streamline_config > config_strip +# mv .config config_sav +# mv config_strip .config +# make oldconfig +# +use warnings; +use strict; +use Getopt::Long; + +# set the environment variable LOCALMODCONFIG_DEBUG to get +# debug output. +my $debugprint = 0; +$debugprint = 1 if (defined($ENV{LOCALMODCONFIG_DEBUG})); + +sub dprint { + return if (!$debugprint); + print STDERR @_; +} + +my $config = ".config"; + +my $uname = `uname -r`; +chomp $uname; + +my @searchconfigs = ( + { + "file" => ".config", + "exec" => "cat", + }, + { + "file" => "/proc/config.gz", + "exec" => "zcat", + }, + { + "file" => "/boot/config-$uname", + "exec" => "cat", + }, + { + "file" => "/boot/vmlinuz-$uname", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "vmlinux", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "/lib/modules/$uname/kernel/kernel/configs.ko", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "kernel/configs.ko", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "kernel/configs.o", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, +); + +sub read_config { + foreach my $conf (@searchconfigs) { + my $file = $conf->{"file"}; + + next if ( ! -f "$file"); + + if (defined($conf->{"test"})) { + `$conf->{"test"} $conf->{"file"} 2>/dev/null`; + next if ($?); + } + + my $exec = $conf->{"exec"}; + + print STDERR "using config: '$file'\n"; + + open(my $infile, '-|', "$exec $file") || die "Failed to run $exec $file"; + my @x = <$infile>; + close $infile; + return @x; + } + die "No config file found"; +} + +my @config_file = read_config; + +# Parse options +my $localmodconfig = 0; +my $localyesconfig = 0; + +GetOptions("localmodconfig" => \$localmodconfig, + "localyesconfig" => \$localyesconfig); + +# Get the build source and top level Kconfig file (passed in) +my $ksource = ($ARGV[0] ? $ARGV[0] : '.'); +my $kconfig = $ARGV[1]; +my $lsmod_file = $ENV{'LSMOD'}; + +my @makefiles = `find $ksource -name Makefile -or -name Kbuild 2>/dev/null`; +chomp @makefiles; + +my %depends; +my %selects; +my %prompts; +my %objects; +my $var; +my $iflevel = 0; +my @ifdeps; + +# prevent recursion +my %read_kconfigs; + +sub read_kconfig { + my ($kconfig) = @_; + + my $state = "NONE"; + my $config; + + my $cont = 0; + my $line; + + my $source = "$ksource/$kconfig"; + my $last_source = ""; + + # Check for any environment variables used + while ($source =~ /\$(\w+)/ && $last_source ne $source) { + my $env = $1; + $last_source = $source; + $source =~ s/\$$env/$ENV{$env}/; + } + + open(my $kinfile, '<', $source) || die "Can't open $kconfig"; + while (<$kinfile>) { + chomp; + + # Make sure that lines ending with \ continue + if ($cont) { + $_ = $line . " " . $_; + } + + if (s/\\$//) { + $cont = 1; + $line = $_; + next; + } + + $cont = 0; + + # collect any Kconfig sources + if (/^source\s+"?([^"]+)/) { + my $kconfig = $1; + # prevent reading twice. + if (!defined($read_kconfigs{$kconfig})) { + $read_kconfigs{$kconfig} = 1; + read_kconfig($kconfig); + } + next; + } + + # configs found + if (/^\s*(menu)?config\s+(\S+)\s*$/) { + $state = "NEW"; + $config = $2; + + # Add depends for 'if' nesting + for (my $i = 0; $i < $iflevel; $i++) { + if ($i) { + $depends{$config} .= " " . $ifdeps[$i]; + } else { + $depends{$config} = $ifdeps[$i]; + } + $state = "DEP"; + } + + # collect the depends for the config + } elsif ($state eq "NEW" && /^\s*depends\s+on\s+(.*)$/) { + $state = "DEP"; + $depends{$config} = $1; + } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) { + $depends{$config} .= " " . $1; + } elsif ($state eq "DEP" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) { + my $dep = $3; + if ($dep !~ /^\s*(y|m|n)\s*$/) { + $dep =~ s/.*\sif\s+//; + $depends{$config} .= " " . $dep; + dprint "Added default depends $dep to $config\n"; + } + + # Get the configs that select this config + } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) { + my $conf = $1; + if (defined($selects{$conf})) { + $selects{$conf} .= " " . $config; + } else { + $selects{$conf} = $config; + } + + # configs without prompts must be selected + } elsif ($state ne "NONE" && /^\s*(tristate\s+\S|prompt\b)/) { + # note if the config has a prompt + $prompts{$config} = 1; + + # Check for if statements + } elsif (/^if\s+(.*\S)\s*$/) { + my $deps = $1; + # remove beginning and ending non text + $deps =~ s/^[^a-zA-Z0-9_]*//; + $deps =~ s/[^a-zA-Z0-9_]*$//; + + my @deps = split /[^a-zA-Z0-9_]+/, $deps; + + $ifdeps[$iflevel++] = join ':', @deps; + + } elsif (/^endif/) { + + $iflevel-- if ($iflevel); + + # stop on "help" and keywords that end a menu entry + } elsif (/^\s*(---)?help(---)?\s*$/ || /^(comment|choice|menu)\b/) { + $state = "NONE"; + } + } + close($kinfile); +} + +if ($kconfig) { + read_kconfig($kconfig); +} + +# Makefiles can use variables to define their dependencies +sub convert_vars { + my ($line, %vars) = @_; + + my $process = ""; + + while ($line =~ s/^(.*?)(\$\((.*?)\))//) { + my $start = $1; + my $variable = $2; + my $var = $3; + + if (defined($vars{$var})) { + $process .= $start . $vars{$var}; + } else { + $process .= $start . $variable; + } + } + + $process .= $line; + + return $process; +} + +# Read all Makefiles to map the configs to the objects +foreach my $makefile (@makefiles) { + + my $line = ""; + my %make_vars; + + open(my $infile, '<', $makefile) || die "Can't open $makefile"; + while (<$infile>) { + # if this line ends with a backslash, continue + chomp; + if (/^(.*)\\$/) { + $line .= $1; + next; + } + + $line .= $_; + $_ = $line; + $line = ""; + + my $objs; + + # Convert variables in a line (could define configs) + $_ = convert_vars($_, %make_vars); + + # collect objects after obj-$(CONFIG_FOO_BAR) + if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) { + $var = $1; + $objs = $2; + + # check if variables are set + } elsif (/^\s*(\S+)\s*[:]?=\s*(.*\S)/) { + $make_vars{$1} = $2; + } + if (defined($objs)) { + foreach my $obj (split /\s+/,$objs) { + $obj =~ s/-/_/g; + if ($obj =~ /(.*)\.o$/) { + # Objects may be enabled by more than one config. + # Store configs in an array. + my @arr; + + if (defined($objects{$1})) { + @arr = @{$objects{$1}}; + } + + $arr[$#arr+1] = $var; + + # The objects have a hash mapping to a reference + # of an array of configs. + $objects{$1} = \@arr; + } + } + } + } + close($infile); +} + +my %modules; +my $linfile; + +if (defined($lsmod_file)) { + if ( ! -f $lsmod_file) { + if ( -f $ENV{'objtree'}."/".$lsmod_file) { + $lsmod_file = $ENV{'objtree'}."/".$lsmod_file; + } else { + die "$lsmod_file not found"; + } + } + + my $otype = ( -x $lsmod_file) ? '-|' : '<'; + open($linfile, $otype, $lsmod_file); + +} else { + + # see what modules are loaded on this system + my $lsmod; + + foreach my $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) { + if ( -x "$dir/lsmod" ) { + $lsmod = "$dir/lsmod"; + last; + } +} + if (!defined($lsmod)) { + # try just the path + $lsmod = "lsmod"; + } + + open($linfile, '-|', $lsmod) || die "Can not call lsmod with $lsmod"; +} + +while (<$linfile>) { + next if (/^Module/); # Skip the first line. + if (/^(\S+)/) { + $modules{$1} = 1; + } +} +close ($linfile); + +# add to the configs hash all configs that are needed to enable +# a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o +# where we know we need bar.o so we add FOO to the list. +my %configs; +foreach my $module (keys(%modules)) { + if (defined($objects{$module})) { + my @arr = @{$objects{$module}}; + foreach my $conf (@arr) { + $configs{$conf} = $module; + dprint "$conf added by direct ($module)\n"; + if ($debugprint) { + my $c=$conf; + $c =~ s/^CONFIG_//; + if (defined($depends{$c})) { + dprint " deps = $depends{$c}\n"; + } else { + dprint " no deps\n"; + } + } + } + } else { + # Most likely, someone has a custom (binary?) module loaded. + print STDERR "$module config not found!!\n"; + } +} + +# Read the current config, and see what is enabled. We want to +# ignore configs that we would not enable anyway. + +my %orig_configs; +my $valid = "A-Za-z_0-9"; + +foreach my $line (@config_file) { + $_ = $line; + + if (/(CONFIG_[$valid]*)=(m|y)/) { + $orig_configs{$1} = $2; + } +} + +my $repeat = 1; + +my $depconfig; + +# +# Note, we do not care about operands (like: &&, ||, !) we want to add any +# config that is in the depend list of another config. This script does +# not enable configs that are not already enabled. If we come across a +# config A that depends on !B, we can still add B to the list of depends +# to keep on. If A was on in the original config, B would not have been +# and B would not be turned on by this script. +# +sub parse_config_depends +{ + my ($p) = @_; + + while ($p =~ /[$valid]/) { + + if ($p =~ /^[^$valid]*([$valid]+)/) { + my $conf = "CONFIG_" . $1; + + $p =~ s/^[^$valid]*[$valid]+//; + + # We only need to process if the depend config is a module + if (!defined($orig_configs{$conf}) || $orig_configs{$conf} eq "y") { + next; + } + + if (!defined($configs{$conf})) { + # We must make sure that this config has its + # dependencies met. + $repeat = 1; # do again + dprint "$conf selected by depend $depconfig\n"; + $configs{$conf} = 1; + } + } else { + die "this should never happen"; + } + } +} + +# Select is treated a bit differently than depends. We call this +# when a config has no prompt and requires another config to be +# selected. We use to just select all configs that selected this +# config, but found that that can balloon into enabling hundreds +# of configs that we do not care about. +# +# The idea is we look at all the configs that select it. If one +# is already in our list of configs to enable, then there's nothing +# else to do. If there isn't, we pick the first config that was +# enabled in the orignal config and use that. +sub parse_config_selects +{ + my ($config, $p) = @_; + + my $next_config; + + while ($p =~ /[$valid]/) { + + if ($p =~ /^[^$valid]*([$valid]+)/) { + my $conf = "CONFIG_" . $1; + + $p =~ s/^[^$valid]*[$valid]+//; + + # Make sure that this config exists in the current .config file + if (!defined($orig_configs{$conf})) { + dprint "$conf not set for $config select\n"; + next; + } + + # Check if something other than a module selects this config + if (defined($orig_configs{$conf}) && $orig_configs{$conf} ne "m") { + dprint "$conf (non module) selects config, we are good\n"; + # we are good with this + return; + } + if (defined($configs{$conf})) { + dprint "$conf selects $config so we are good\n"; + # A set config selects this config, we are good + return; + } + # Set this config to be selected + if (!defined($next_config)) { + $next_config = $conf; + } + } else { + die "this should never happen"; + } + } + + # If no possible config selected this, then something happened. + if (!defined($next_config)) { + print STDERR "WARNING: $config is required, but nothing in the\n"; + print STDERR " current config selects it.\n"; + return; + } + + # If we are here, then we found no config that is set and + # selects this config. Repeat. + $repeat = 1; + # Make this config need to be selected + $configs{$next_config} = 1; + dprint "$next_config selected by select $config\n"; +} + +my %process_selects; + +# loop through all configs, select their dependencies. +sub loop_depend { + $repeat = 1; + + while ($repeat) { + $repeat = 0; + + forloop: + foreach my $config (keys %configs) { + + # If this config is not a module, we do not need to process it + if (defined($orig_configs{$config}) && $orig_configs{$config} ne "m") { + next forloop; + } + + $config =~ s/^CONFIG_//; + $depconfig = $config; + + if (defined($depends{$config})) { + # This config has dependencies. Make sure they are also included + parse_config_depends $depends{$config}; + } + + # If the config has no prompt, then we need to check if a config + # that is enabled selected it. Or if we need to enable one. + if (!defined($prompts{$config}) && defined($selects{$config})) { + $process_selects{$config} = 1; + } + } + } +} + +sub loop_select { + + foreach my $config (keys %process_selects) { + $config =~ s/^CONFIG_//; + + dprint "Process select $config\n"; + + # config has no prompt and must be selected. + parse_config_selects $config, $selects{$config}; + } +} + +while ($repeat) { + # Get the first set of configs and their dependencies. + loop_depend; + + $repeat = 0; + + # Now we need to see if we have to check selects; + loop_select; +} + +my %setconfigs; + +# Finally, read the .config file and turn off any module enabled that +# we could not find a reason to keep enabled. +foreach my $line (@config_file) { + $_ = $line; + + if (/CONFIG_IKCONFIG/) { + if (/# CONFIG_IKCONFIG is not set/) { + # enable IKCONFIG at least as a module + print "CONFIG_IKCONFIG=m\n"; + # don't ask about PROC + print "# CONFIG_IKCONFIG_PROC is not set\n"; + } else { + print; + } + next; + } + + if (/CONFIG_MODULE_SIG_KEY="(.+)"/) { + my $orig_cert = $1; + my $default_cert = "certs/signing_key.pem"; + + # Check that the logic in this script still matches the one in Kconfig + if (!defined($depends{"MODULE_SIG_KEY"}) || + $depends{"MODULE_SIG_KEY"} !~ /"\Q$default_cert\E"/) { + print STDERR "WARNING: MODULE_SIG_KEY assertion failure, ", + "update needed to ", __FILE__, " line ", __LINE__, "\n"; + print; + } elsif ($orig_cert ne $default_cert && ! -f $orig_cert) { + print STDERR "Module signature verification enabled but ", + "module signing key \"$orig_cert\" not found. Resetting ", + "signing key to default value.\n"; + print "CONFIG_MODULE_SIG_KEY=\"$default_cert\"\n"; + } else { + print; + } + next; + } + + if (/CONFIG_SYSTEM_TRUSTED_KEYS="(.+)"/) { + my $orig_keys = $1; + + if (! -f $orig_keys) { + print STDERR "System keyring enabled but keys \"$orig_keys\" ", + "not found. Resetting keys to default value.\n"; + print "CONFIG_SYSTEM_TRUSTED_KEYS=\"\"\n"; + } else { + print; + } + next; + } + + if (/^(CONFIG.*)=(m|y)/) { + if (defined($configs{$1})) { + if ($localyesconfig) { + $setconfigs{$1} = 'y'; + print "$1=y\n"; + next; + } else { + $setconfigs{$1} = $2; + } + } elsif ($2 eq "m") { + print "# $1 is not set\n"; + next; + } + } + print; +} + +# Integrity check, make sure all modules that we want enabled do +# indeed have their configs set. +loop: +foreach my $module (keys(%modules)) { + if (defined($objects{$module})) { + my @arr = @{$objects{$module}}; + foreach my $conf (@arr) { + if (defined($setconfigs{$conf})) { + next loop; + } + } + print STDERR "module $module did not have configs"; + foreach my $conf (@arr) { + print STDERR " " , $conf; + } + print STDERR "\n"; + } +} diff --git a/support/kconfig/symbol.c b/support/kconfig/symbol.c new file mode 100644 index 00000000..f0b2e3b3 --- /dev/null +++ b/support/kconfig/symbol.c @@ -0,0 +1,1432 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include + +#include "lkc.h" + +struct symbol symbol_yes = { + .name = "y", + .curr = { "y", yes }, + .flags = SYMBOL_CONST|SYMBOL_VALID, +}, symbol_mod = { + .name = "m", + .curr = { "m", mod }, + .flags = SYMBOL_CONST|SYMBOL_VALID, +}, symbol_no = { + .name = "n", + .curr = { "n", no }, + .flags = SYMBOL_CONST|SYMBOL_VALID, +}, symbol_empty = { + .name = "", + .curr = { "", no }, + .flags = SYMBOL_VALID, +}; + +struct symbol *sym_defconfig_list; +struct symbol *modules_sym; +tristate modules_val; + +struct expr *sym_env_list; + +static void sym_add_default(struct symbol *sym, const char *def) +{ + struct property *prop = prop_alloc(P_DEFAULT, sym); + + prop->expr = expr_alloc_symbol(sym_lookup(def, SYMBOL_CONST)); +} + +void sym_init(void) +{ + struct symbol *sym; + struct utsname uts; + static bool inited = false; + + if (inited) + return; + inited = true; + + uname(&uts); + + sym = sym_lookup("UNAME_RELEASE", 0); + sym->type = S_STRING; + sym->flags |= SYMBOL_AUTO; + sym_add_default(sym, uts.release); +} + +enum symbol_type sym_get_type(struct symbol *sym) +{ + enum symbol_type type = sym->type; + + if (type == S_TRISTATE) { + if (sym_is_choice_value(sym) && sym->visible == yes) + type = S_BOOLEAN; + else if (modules_val == no) + type = S_BOOLEAN; + } + return type; +} + +const char *sym_type_name(enum symbol_type type) +{ + switch (type) { + case S_BOOLEAN: + return "bool"; + case S_TRISTATE: + return "tristate"; + case S_INT: + return "integer"; + case S_HEX: + return "hex"; + case S_STRING: + return "string"; + case S_UNKNOWN: + return "unknown"; + case S_OTHER: + break; + } + return "???"; +} + +struct property *sym_get_choice_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_choices(sym, prop) + return prop; + return NULL; +} + +struct property *sym_get_env_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_properties(sym, prop, P_ENV) + return prop; + return NULL; +} + +static struct property *sym_get_default_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_defaults(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri != no) + return prop; + } + return NULL; +} + +static struct property *sym_get_range_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_properties(sym, prop, P_RANGE) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri != no) + return prop; + } + return NULL; +} + +static long long sym_get_range_val(struct symbol *sym, int base) +{ + sym_calc_value(sym); + switch (sym->type) { + case S_INT: + base = 10; + break; + case S_HEX: + base = 16; + break; + default: + break; + } + return strtoll(sym->curr.val, NULL, base); +} + +static void sym_validate_range(struct symbol *sym) +{ + struct property *prop; + int base; + long long val, val2; + char str[64]; + + switch (sym->type) { + case S_INT: + base = 10; + break; + case S_HEX: + base = 16; + break; + default: + return; + } + prop = sym_get_range_prop(sym); + if (!prop) + return; + val = strtoll(sym->curr.val, NULL, base); + val2 = sym_get_range_val(prop->expr->left.sym, base); + if (val >= val2) { + val2 = sym_get_range_val(prop->expr->right.sym, base); + if (val <= val2) + return; + } + if (sym->type == S_INT) + sprintf(str, "%lld", val2); + else + sprintf(str, "0x%llx", val2); + sym->curr.val = xstrdup(str); +} + +static void sym_set_changed(struct symbol *sym) +{ + struct property *prop; + + sym->flags |= SYMBOL_CHANGED; + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu) + prop->menu->flags |= MENU_CHANGED; + } +} + +static void sym_set_all_changed(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) + sym_set_changed(sym); +} + +static void sym_calc_visibility(struct symbol *sym) +{ + struct property *prop; + struct symbol *choice_sym = NULL; + tristate tri; + + /* any prompt visible? */ + tri = no; + + if (sym_is_choice_value(sym)) + choice_sym = prop_get_symbol(sym_get_choice_prop(sym)); + + for_all_prompts(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + /* + * Tristate choice_values with visibility 'mod' are + * not visible if the corresponding choice's value is + * 'yes'. + */ + if (choice_sym && sym->type == S_TRISTATE && + prop->visible.tri == mod && choice_sym->curr.tri == yes) + prop->visible.tri = no; + + tri = EXPR_OR(tri, prop->visible.tri); + } + if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) + tri = yes; + if (sym->visible != tri) { + sym->visible = tri; + sym_set_changed(sym); + } + if (sym_is_choice_value(sym)) + return; + /* defaulting to "yes" if no explicit "depends on" are given */ + tri = yes; + if (sym->dir_dep.expr) + tri = expr_calc_value(sym->dir_dep.expr); + if (tri == mod && sym_get_type(sym) == S_BOOLEAN) + tri = yes; + if (sym->dir_dep.tri != tri) { + sym->dir_dep.tri = tri; + sym_set_changed(sym); + } + tri = no; + if (sym->rev_dep.expr) + tri = expr_calc_value(sym->rev_dep.expr); + if (tri == mod && sym_get_type(sym) == S_BOOLEAN) + tri = yes; + if (sym->rev_dep.tri != tri) { + sym->rev_dep.tri = tri; + sym_set_changed(sym); + } + tri = no; + if (sym->implied.expr && sym->dir_dep.tri != no) + tri = expr_calc_value(sym->implied.expr); + if (tri == mod && sym_get_type(sym) == S_BOOLEAN) + tri = yes; + if (sym->implied.tri != tri) { + sym->implied.tri = tri; + sym_set_changed(sym); + } +} + +/* + * Find the default symbol for a choice. + * First try the default values for the choice symbol + * Next locate the first visible choice value + * Return NULL if none was found + */ +struct symbol *sym_choice_default(struct symbol *sym) +{ + struct symbol *def_sym; + struct property *prop; + struct expr *e; + + /* any of the defaults visible? */ + for_all_defaults(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri == no) + continue; + def_sym = prop_get_symbol(prop); + if (def_sym->visible != no) + return def_sym; + } + + /* just get the first visible value */ + prop = sym_get_choice_prop(sym); + expr_list_for_each_sym(prop->expr, e, def_sym) + if (def_sym->visible != no) + return def_sym; + + /* failed to locate any defaults */ + return NULL; +} + +static struct symbol *sym_calc_choice(struct symbol *sym) +{ + struct symbol *def_sym; + struct property *prop; + struct expr *e; + int flags; + + /* first calculate all choice values' visibilities */ + flags = sym->flags; + prop = sym_get_choice_prop(sym); + expr_list_for_each_sym(prop->expr, e, def_sym) { + sym_calc_visibility(def_sym); + if (def_sym->visible != no) + flags &= def_sym->flags; + } + + sym->flags &= flags | ~SYMBOL_DEF_USER; + + /* is the user choice visible? */ + def_sym = sym->def[S_DEF_USER].val; + if (def_sym && def_sym->visible != no) + return def_sym; + + def_sym = sym_choice_default(sym); + + if (def_sym == NULL) + /* no choice? reset tristate value */ + sym->curr.tri = no; + + return def_sym; +} + +static void sym_warn_unmet_dep(struct symbol *sym) +{ + struct gstr gs = str_new(); + + str_printf(&gs, + "\nWARNING: unmet direct dependencies detected for %s\n", + sym->name); + str_printf(&gs, + " Depends on [%c]: ", + sym->dir_dep.tri == mod ? 'm' : 'n'); + expr_gstr_print(sym->dir_dep.expr, &gs); + str_printf(&gs, "\n"); + + expr_gstr_print_revdep(sym->rev_dep.expr, &gs, yes, + " Selected by [y]:\n"); + expr_gstr_print_revdep(sym->rev_dep.expr, &gs, mod, + " Selected by [m]:\n"); + + fputs(str_get(&gs), stderr); +} + +void sym_calc_value(struct symbol *sym) +{ + struct symbol_value newval, oldval; + struct property *prop; + struct expr *e; + + if (!sym) + return; + + if (sym->flags & SYMBOL_VALID) + return; + + if (sym_is_choice_value(sym) && + sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES) { + sym->flags &= ~SYMBOL_NEED_SET_CHOICE_VALUES; + prop = sym_get_choice_prop(sym); + sym_calc_value(prop_get_symbol(prop)); + } + + sym->flags |= SYMBOL_VALID; + + oldval = sym->curr; + + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + newval = symbol_empty.curr; + break; + case S_BOOLEAN: + case S_TRISTATE: + newval = symbol_no.curr; + break; + default: + sym->curr.val = sym->name; + sym->curr.tri = no; + return; + } + sym->flags &= ~SYMBOL_WRITE; + + sym_calc_visibility(sym); + + if (sym->visible != no) + sym->flags |= SYMBOL_WRITE; + + /* set default if recursively called */ + sym->curr = newval; + + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym_is_choice_value(sym) && sym->visible == yes) { + prop = sym_get_choice_prop(sym); + newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; + } else { + if (sym->visible != no) { + /* if the symbol is visible use the user value + * if available, otherwise try the default value + */ + if (sym_has_value(sym)) { + newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri, + sym->visible); + goto calc_newval; + } + } + if (sym->rev_dep.tri != no) + sym->flags |= SYMBOL_WRITE; + if (!sym_is_choice(sym)) { + prop = sym_get_default_prop(sym); + if (prop) { + newval.tri = EXPR_AND(expr_calc_value(prop->expr), + prop->visible.tri); + if (newval.tri != no) + sym->flags |= SYMBOL_WRITE; + } + if (sym->implied.tri != no) { + sym->flags |= SYMBOL_WRITE; + newval.tri = EXPR_OR(newval.tri, sym->implied.tri); + } + } + calc_newval: + if (sym->dir_dep.tri < sym->rev_dep.tri) + sym_warn_unmet_dep(sym); + newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); + } + if (newval.tri == mod && + (sym_get_type(sym) == S_BOOLEAN || sym->implied.tri == yes)) + newval.tri = yes; + break; + case S_STRING: + case S_HEX: + case S_INT: + if (sym->visible != no && sym_has_value(sym)) { + newval.val = sym->def[S_DEF_USER].val; + break; + } + prop = sym_get_default_prop(sym); + if (prop) { + struct symbol *ds = prop_get_symbol(prop); + if (ds) { + sym->flags |= SYMBOL_WRITE; + sym_calc_value(ds); + newval.val = ds->curr.val; + } + } + break; + default: + ; + } + + sym->curr = newval; + if (sym_is_choice(sym) && newval.tri == yes) + sym->curr.val = sym_calc_choice(sym); + sym_validate_range(sym); + + if (memcmp(&oldval, &sym->curr, sizeof(oldval))) { + sym_set_changed(sym); + if (modules_sym == sym) { + sym_set_all_changed(); + modules_val = modules_sym->curr.tri; + } + } + + if (sym_is_choice(sym)) { + struct symbol *choice_sym; + + prop = sym_get_choice_prop(sym); + expr_list_for_each_sym(prop->expr, e, choice_sym) { + if ((sym->flags & SYMBOL_WRITE) && + choice_sym->visible != no) + choice_sym->flags |= SYMBOL_WRITE; + if (sym->flags & SYMBOL_CHANGED) + sym_set_changed(choice_sym); + } + } + + if (sym->flags & SYMBOL_AUTO) + sym->flags &= ~SYMBOL_WRITE; + + if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES) + set_all_choice_values(sym); +} + +void sym_clear_all_valid(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) + sym->flags &= ~SYMBOL_VALID; + sym_add_change_count(1); + sym_calc_value(modules_sym); +} + +bool sym_tristate_within_range(struct symbol *sym, tristate val) +{ + int type = sym_get_type(sym); + + if (sym->visible == no) + return false; + + if (type != S_BOOLEAN && type != S_TRISTATE) + return false; + + if (type == S_BOOLEAN && val == mod) + return false; + if (sym->visible <= sym->rev_dep.tri) + return false; + if (sym->implied.tri == yes && val == mod) + return false; + if (sym_is_choice_value(sym) && sym->visible == yes) + return val == yes; + return val >= sym->rev_dep.tri && val <= sym->visible; +} + +bool sym_set_tristate_value(struct symbol *sym, tristate val) +{ + tristate oldval = sym_get_tristate_value(sym); + + if (oldval != val && !sym_tristate_within_range(sym, val)) + return false; + + if (!(sym->flags & SYMBOL_DEF_USER)) { + sym->flags |= SYMBOL_DEF_USER; + sym_set_changed(sym); + } + /* + * setting a choice value also resets the new flag of the choice + * symbol and all other choice values. + */ + if (sym_is_choice_value(sym) && val == yes) { + struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); + struct property *prop; + struct expr *e; + + cs->def[S_DEF_USER].val = sym; + cs->flags |= SYMBOL_DEF_USER; + prop = sym_get_choice_prop(cs); + for (e = prop->expr; e; e = e->left.expr) { + if (e->right.sym->visible != no) + e->right.sym->flags |= SYMBOL_DEF_USER; + } + } + + sym->def[S_DEF_USER].tri = val; + if (oldval != val) + sym_clear_all_valid(); + + return true; +} + +tristate sym_toggle_tristate_value(struct symbol *sym) +{ + tristate oldval, newval; + + oldval = newval = sym_get_tristate_value(sym); + do { + switch (newval) { + case no: + newval = mod; + break; + case mod: + newval = yes; + break; + case yes: + newval = no; + break; + } + if (sym_set_tristate_value(sym, newval)) + break; + } while (oldval != newval); + return newval; +} + +bool sym_string_valid(struct symbol *sym, const char *str) +{ + signed char ch; + + switch (sym->type) { + case S_STRING: + return true; + case S_INT: + ch = *str++; + if (ch == '-') + ch = *str++; + if (!isdigit(ch)) + return false; + if (ch == '0' && *str != 0) + return false; + while ((ch = *str++)) { + if (!isdigit(ch)) + return false; + } + return true; + case S_HEX: + if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + str += 2; + ch = *str++; + do { + if (!isxdigit(ch)) + return false; + } while ((ch = *str++)); + return true; + case S_BOOLEAN: + case S_TRISTATE: + switch (str[0]) { + case 'y': case 'Y': + case 'm': case 'M': + case 'n': case 'N': + return true; + } + return false; + default: + return false; + } +} + +bool sym_string_within_range(struct symbol *sym, const char *str) +{ + struct property *prop; + long long val; + + switch (sym->type) { + case S_STRING: + return sym_string_valid(sym, str); + case S_INT: + if (!sym_string_valid(sym, str)) + return false; + prop = sym_get_range_prop(sym); + if (!prop) + return true; + val = strtoll(str, NULL, 10); + return val >= sym_get_range_val(prop->expr->left.sym, 10) && + val <= sym_get_range_val(prop->expr->right.sym, 10); + case S_HEX: + if (!sym_string_valid(sym, str)) + return false; + prop = sym_get_range_prop(sym); + if (!prop) + return true; + val = strtoll(str, NULL, 16); + return val >= sym_get_range_val(prop->expr->left.sym, 16) && + val <= sym_get_range_val(prop->expr->right.sym, 16); + case S_BOOLEAN: + case S_TRISTATE: + switch (str[0]) { + case 'y': case 'Y': + return sym_tristate_within_range(sym, yes); + case 'm': case 'M': + return sym_tristate_within_range(sym, mod); + case 'n': case 'N': + return sym_tristate_within_range(sym, no); + } + return false; + default: + return false; + } +} + +bool sym_set_string_value(struct symbol *sym, const char *newval) +{ + const char *oldval; + char *val; + int size; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + switch (newval[0]) { + case 'y': case 'Y': + return sym_set_tristate_value(sym, yes); + case 'm': case 'M': + return sym_set_tristate_value(sym, mod); + case 'n': case 'N': + return sym_set_tristate_value(sym, no); + } + return false; + default: + ; + } + + if (!sym_string_within_range(sym, newval)) + return false; + + if (!(sym->flags & SYMBOL_DEF_USER)) { + sym->flags |= SYMBOL_DEF_USER; + sym_set_changed(sym); + } + + oldval = sym->def[S_DEF_USER].val; + size = strlen(newval) + 1; + if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) { + size += 2; + sym->def[S_DEF_USER].val = val = xmalloc(size); + *val++ = '0'; + *val++ = 'x'; + } else if (!oldval || strcmp(oldval, newval)) + sym->def[S_DEF_USER].val = val = xmalloc(size); + else + return true; + + strcpy(val, newval); + free((void *)oldval); + sym_clear_all_valid(); + + return true; +} + +/* + * Find the default value associated to a symbol. + * For tristate symbol handle the modules=n case + * in which case "m" becomes "y". + * If the symbol does not have any default then fallback + * to the fixed default values. + */ +const char *sym_get_string_default(struct symbol *sym) +{ + struct property *prop; + struct symbol *ds; + const char *str; + tristate val; + + sym_calc_visibility(sym); + sym_calc_value(modules_sym); + val = symbol_no.curr.tri; + str = symbol_empty.curr.val; + + /* If symbol has a default value look it up */ + prop = sym_get_default_prop(sym); + if (prop != NULL) { + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + /* The visibility may limit the value from yes => mod */ + val = EXPR_AND(expr_calc_value(prop->expr), prop->visible.tri); + break; + default: + /* + * The following fails to handle the situation + * where a default value is further limited by + * the valid range. + */ + ds = prop_get_symbol(prop); + if (ds != NULL) { + sym_calc_value(ds); + str = (const char *)ds->curr.val; + } + } + } + + /* Handle select statements */ + val = EXPR_OR(val, sym->rev_dep.tri); + + /* transpose mod to yes if modules are not enabled */ + if (val == mod) + if (!sym_is_choice_value(sym) && modules_sym->curr.tri == no) + val = yes; + + /* transpose mod to yes if type is bool */ + if (sym->type == S_BOOLEAN && val == mod) + val = yes; + + /* adjust the default value if this symbol is implied by another */ + if (val < sym->implied.tri) + val = sym->implied.tri; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + switch (val) { + case no: return "n"; + case mod: return "m"; + case yes: return "y"; + } + case S_INT: + case S_HEX: + return str; + case S_STRING: + return str; + case S_OTHER: + case S_UNKNOWN: + break; + } + return ""; +} + +const char *sym_get_string_value(struct symbol *sym) +{ + tristate val; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + val = sym_get_tristate_value(sym); + switch (val) { + case no: + return "n"; + case mod: + sym_calc_value(modules_sym); + return (modules_sym->curr.tri == no) ? "n" : "m"; + case yes: + return "y"; + } + break; + default: + ; + } + return (const char *)sym->curr.val; +} + +bool sym_is_changable(struct symbol *sym) +{ + return sym->visible > sym->rev_dep.tri; +} + +static unsigned strhash(const char *s) +{ + /* fnv32 hash */ + unsigned hash = 2166136261U; + for (; *s; s++) + hash = (hash ^ *s) * 0x01000193; + return hash; +} + +struct symbol *sym_lookup(const char *name, int flags) +{ + struct symbol *symbol; + char *new_name; + int hash; + + if (name) { + if (name[0] && !name[1]) { + switch (name[0]) { + case 'y': return &symbol_yes; + case 'm': return &symbol_mod; + case 'n': return &symbol_no; + } + } + hash = strhash(name) % SYMBOL_HASHSIZE; + + for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { + if (symbol->name && + !strcmp(symbol->name, name) && + (flags ? symbol->flags & flags + : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE)))) + return symbol; + } + new_name = xstrdup(name); + } else { + new_name = NULL; + hash = 0; + } + + symbol = xmalloc(sizeof(*symbol)); + memset(symbol, 0, sizeof(*symbol)); + symbol->name = new_name; + symbol->type = S_UNKNOWN; + symbol->flags |= flags; + + symbol->next = symbol_hash[hash]; + symbol_hash[hash] = symbol; + + return symbol; +} + +struct symbol *sym_find(const char *name) +{ + struct symbol *symbol = NULL; + int hash = 0; + + if (!name) + return NULL; + + if (name[0] && !name[1]) { + switch (name[0]) { + case 'y': return &symbol_yes; + case 'm': return &symbol_mod; + case 'n': return &symbol_no; + } + } + hash = strhash(name) % SYMBOL_HASHSIZE; + + for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { + if (symbol->name && + !strcmp(symbol->name, name) && + !(symbol->flags & SYMBOL_CONST)) + break; + } + + return symbol; +} + +/* + * Expand symbol's names embedded in the string given in argument. Symbols' + * name to be expanded shall be prefixed by a '$'. Unknown symbol expands to + * the empty string. + */ +char *sym_expand_string_value(const char *in) +{ + const char *src; + char *res; + size_t reslen; + + /* + * Note: 'in' might come from a token that's about to be + * freed, so make sure to always allocate a new string + */ + reslen = strlen(in) + 1; + res = xmalloc(reslen); + res[0] = '\0'; + + while ((src = strchr(in, '$'))) { + char *p, name[SYMBOL_MAXLENGTH]; + const char *symval = ""; + struct symbol *sym; + size_t newlen; + + strncat(res, in, src - in); + src++; + + p = name; + while (isalnum(*src) || *src == '_') + *p++ = *src++; + *p = '\0'; + + sym = sym_find(name); + if (sym != NULL) { + sym_calc_value(sym); + symval = sym_get_string_value(sym); + } + + newlen = strlen(res) + strlen(symval) + strlen(src) + 1; + if (newlen > reslen) { + reslen = newlen; + res = xrealloc(res, reslen); + } + + strcat(res, symval); + in = src; + } + strcat(res, in); + + return res; +} + +const char *sym_escape_string_value(const char *in) +{ + const char *p; + size_t reslen; + char *res; + size_t l; + + reslen = strlen(in) + strlen("\"\"") + 1; + + p = in; + for (;;) { + l = strcspn(p, "\"\\"); + p += l; + + if (p[0] == '\0') + break; + + reslen++; + p++; + } + + res = xmalloc(reslen); + res[0] = '\0'; + + strcat(res, "\""); + + p = in; + for (;;) { + l = strcspn(p, "\"\\"); + strncat(res, p, l); + p += l; + + if (p[0] == '\0') + break; + + strcat(res, "\\"); + strncat(res, p++, 1); + } + + strcat(res, "\""); + return res; +} + +struct sym_match { + struct symbol *sym; + off_t so, eo; +}; + +/* Compare matched symbols as thus: + * - first, symbols that match exactly + * - then, alphabetical sort + */ +static int sym_rel_comp(const void *sym1, const void *sym2) +{ + const struct sym_match *s1 = sym1; + const struct sym_match *s2 = sym2; + int exact1, exact2; + + /* Exact match: + * - if matched length on symbol s1 is the length of that symbol, + * then this symbol should come first; + * - if matched length on symbol s2 is the length of that symbol, + * then this symbol should come first. + * Note: since the search can be a regexp, both symbols may match + * exactly; if this is the case, we can't decide which comes first, + * and we fallback to sorting alphabetically. + */ + exact1 = (s1->eo - s1->so) == strlen(s1->sym->name); + exact2 = (s2->eo - s2->so) == strlen(s2->sym->name); + if (exact1 && !exact2) + return -1; + if (!exact1 && exact2) + return 1; + + /* As a fallback, sort symbols alphabetically */ + return strcmp(s1->sym->name, s2->sym->name); +} + +struct symbol **sym_re_search(const char *pattern) +{ + struct symbol *sym, **sym_arr = NULL; + struct sym_match *sym_match_arr = NULL; + int i, cnt, size; + regex_t re; + regmatch_t match[1]; + + cnt = size = 0; + /* Skip if empty */ + if (strlen(pattern) == 0) + return NULL; + if (regcomp(&re, pattern, REG_EXTENDED|REG_ICASE)) + return NULL; + + for_all_symbols(i, sym) { + if (sym->flags & SYMBOL_CONST || !sym->name) + continue; + if (regexec(&re, sym->name, 1, match, 0)) + continue; + if (cnt >= size) { + void *tmp; + size += 16; + tmp = realloc(sym_match_arr, size * sizeof(struct sym_match)); + if (!tmp) + goto sym_re_search_free; + sym_match_arr = tmp; + } + sym_calc_value(sym); + /* As regexec returned 0, we know we have a match, so + * we can use match[0].rm_[se]o without further checks + */ + sym_match_arr[cnt].so = match[0].rm_so; + sym_match_arr[cnt].eo = match[0].rm_eo; + sym_match_arr[cnt++].sym = sym; + } + if (sym_match_arr) { + qsort(sym_match_arr, cnt, sizeof(struct sym_match), sym_rel_comp); + sym_arr = malloc((cnt+1) * sizeof(struct symbol *)); + if (!sym_arr) + goto sym_re_search_free; + for (i = 0; i < cnt; i++) + sym_arr[i] = sym_match_arr[i].sym; + sym_arr[cnt] = NULL; + } +sym_re_search_free: + /* sym_match_arr can be NULL if no match, but free(NULL) is OK */ + free(sym_match_arr); + regfree(&re); + + return sym_arr; +} + +/* + * When we check for recursive dependencies we use a stack to save + * current state so we can print out relevant info to user. + * The entries are located on the call stack so no need to free memory. + * Note insert() remove() must always match to properly clear the stack. + */ +static struct dep_stack { + struct dep_stack *prev, *next; + struct symbol *sym; + struct property *prop; + struct expr *expr; +} *check_top; + +static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym) +{ + memset(stack, 0, sizeof(*stack)); + if (check_top) + check_top->next = stack; + stack->prev = check_top; + stack->sym = sym; + check_top = stack; +} + +static void dep_stack_remove(void) +{ + check_top = check_top->prev; + if (check_top) + check_top->next = NULL; +} + +/* + * Called when we have detected a recursive dependency. + * check_top point to the top of the stact so we use + * the ->prev pointer to locate the bottom of the stack. + */ +static void sym_check_print_recursive(struct symbol *last_sym) +{ + struct dep_stack *stack; + struct symbol *sym, *next_sym; + struct menu *menu = NULL; + struct property *prop; + struct dep_stack cv_stack; + + if (sym_is_choice_value(last_sym)) { + dep_stack_insert(&cv_stack, last_sym); + last_sym = prop_get_symbol(sym_get_choice_prop(last_sym)); + } + + for (stack = check_top; stack != NULL; stack = stack->prev) + if (stack->sym == last_sym) + break; + if (!stack) { + fprintf(stderr, "unexpected recursive dependency error\n"); + return; + } + + for (; stack; stack = stack->next) { + sym = stack->sym; + next_sym = stack->next ? stack->next->sym : last_sym; + prop = stack->prop; + if (prop == NULL) + prop = stack->sym->prop; + + /* for choice values find the menu entry (used below) */ + if (sym_is_choice(sym) || sym_is_choice_value(sym)) { + for (prop = sym->prop; prop; prop = prop->next) { + menu = prop->menu; + if (prop->menu) + break; + } + } + if (stack->sym == last_sym) + fprintf(stderr, "%s:%d:error: recursive dependency detected!\n", + prop->file->name, prop->lineno); + + if (stack->expr) { + fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", + prop->file->name, prop->lineno, + sym->name ? sym->name : "", + prop_get_type_name(prop->type), + next_sym->name ? next_sym->name : ""); + } else if (stack->prop) { + fprintf(stderr, "%s:%d:\tsymbol %s depends on %s\n", + prop->file->name, prop->lineno, + sym->name ? sym->name : "", + next_sym->name ? next_sym->name : ""); + } else if (sym_is_choice(sym)) { + fprintf(stderr, "%s:%d:\tchoice %s contains symbol %s\n", + menu->file->name, menu->lineno, + sym->name ? sym->name : "", + next_sym->name ? next_sym->name : ""); + } else if (sym_is_choice_value(sym)) { + fprintf(stderr, "%s:%d:\tsymbol %s is part of choice %s\n", + menu->file->name, menu->lineno, + sym->name ? sym->name : "", + next_sym->name ? next_sym->name : ""); + } else { + fprintf(stderr, "%s:%d:\tsymbol %s is selected by %s\n", + prop->file->name, prop->lineno, + sym->name ? sym->name : "", + next_sym->name ? next_sym->name : ""); + } + } + + fprintf(stderr, + "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n" + "subsection \"Kconfig recursive dependency limitations\"\n" + "\n"); + + if (check_top == &cv_stack) + dep_stack_remove(); +} + +static struct symbol *sym_check_expr_deps(struct expr *e) +{ + struct symbol *sym; + + if (!e) + return NULL; + switch (e->type) { + case E_OR: + case E_AND: + sym = sym_check_expr_deps(e->left.expr); + if (sym) + return sym; + return sym_check_expr_deps(e->right.expr); + case E_NOT: + return sym_check_expr_deps(e->left.expr); + case E_EQUAL: + case E_GEQ: + case E_GTH: + case E_LEQ: + case E_LTH: + case E_UNEQUAL: + sym = sym_check_deps(e->left.sym); + if (sym) + return sym; + return sym_check_deps(e->right.sym); + case E_SYMBOL: + return sym_check_deps(e->left.sym); + default: + break; + } + fprintf(stderr, "Oops! How to check %d?\n", e->type); + return NULL; +} + +/* return NULL when dependencies are OK */ +static struct symbol *sym_check_sym_deps(struct symbol *sym) +{ + struct symbol *sym2; + struct property *prop; + struct dep_stack stack; + + dep_stack_insert(&stack, sym); + + sym2 = sym_check_expr_deps(sym->rev_dep.expr); + if (sym2) + goto out; + + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->type == P_CHOICE || prop->type == P_SELECT) + continue; + stack.prop = prop; + sym2 = sym_check_expr_deps(prop->visible.expr); + if (sym2) + break; + if (prop->type != P_DEFAULT || sym_is_choice(sym)) + continue; + stack.expr = prop->expr; + sym2 = sym_check_expr_deps(prop->expr); + if (sym2) + break; + stack.expr = NULL; + } + +out: + dep_stack_remove(); + + return sym2; +} + +static struct symbol *sym_check_choice_deps(struct symbol *choice) +{ + struct symbol *sym, *sym2; + struct property *prop; + struct expr *e; + struct dep_stack stack; + + dep_stack_insert(&stack, choice); + + prop = sym_get_choice_prop(choice); + expr_list_for_each_sym(prop->expr, e, sym) + sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); + + choice->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); + sym2 = sym_check_sym_deps(choice); + choice->flags &= ~SYMBOL_CHECK; + if (sym2) + goto out; + + expr_list_for_each_sym(prop->expr, e, sym) { + sym2 = sym_check_sym_deps(sym); + if (sym2) + break; + } +out: + expr_list_for_each_sym(prop->expr, e, sym) + sym->flags &= ~SYMBOL_CHECK; + + if (sym2 && sym_is_choice_value(sym2) && + prop_get_symbol(sym_get_choice_prop(sym2)) == choice) + sym2 = choice; + + dep_stack_remove(); + + return sym2; +} + +struct symbol *sym_check_deps(struct symbol *sym) +{ + struct symbol *sym2; + struct property *prop; + + if (sym->flags & SYMBOL_CHECK) { + sym_check_print_recursive(sym); + return sym; + } + if (sym->flags & SYMBOL_CHECKED) + return NULL; + + if (sym_is_choice_value(sym)) { + struct dep_stack stack; + + /* for choice groups start the check with main choice symbol */ + dep_stack_insert(&stack, sym); + prop = sym_get_choice_prop(sym); + sym2 = sym_check_deps(prop_get_symbol(prop)); + dep_stack_remove(); + } else if (sym_is_choice(sym)) { + sym2 = sym_check_choice_deps(sym); + } else { + sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); + sym2 = sym_check_sym_deps(sym); + sym->flags &= ~SYMBOL_CHECK; + } + + if (sym2 && sym2 == sym) + sym2 = NULL; + + return sym2; +} + +struct property *prop_alloc(enum prop_type type, struct symbol *sym) +{ + struct property *prop; + struct property **propp; + + prop = xmalloc(sizeof(*prop)); + memset(prop, 0, sizeof(*prop)); + prop->type = type; + prop->sym = sym; + prop->file = current_file; + prop->lineno = zconf_lineno(); + + /* append property to the prop list of symbol */ + if (sym) { + for (propp = &sym->prop; *propp; propp = &(*propp)->next) + ; + *propp = prop; + } + + return prop; +} + +struct symbol *prop_get_symbol(struct property *prop) +{ + if (prop->expr && (prop->expr->type == E_SYMBOL || + prop->expr->type == E_LIST)) + return prop->expr->left.sym; + return NULL; +} + +const char *prop_get_type_name(enum prop_type type) +{ + switch (type) { + case P_PROMPT: + return "prompt"; + case P_ENV: + return "env"; + case P_COMMENT: + return "comment"; + case P_MENU: + return "menu"; + case P_DEFAULT: + return "default"; + case P_CHOICE: + return "choice"; + case P_SELECT: + return "select"; + case P_IMPLY: + return "imply"; + case P_RANGE: + return "range"; + case P_SYMBOL: + return "symbol"; + case P_UNKNOWN: + break; + } + return "unknown"; +} + +static void prop_add_env(const char *env) +{ + struct symbol *sym, *sym2; + struct property *prop; + char *p; + + sym = current_entry->sym; + sym->flags |= SYMBOL_AUTO; + for_all_properties(sym, prop, P_ENV) { + sym2 = prop_get_symbol(prop); + if (strcmp(sym2->name, env)) + menu_warn(current_entry, "redefining environment symbol from %s", + sym2->name); + return; + } + + prop = prop_alloc(P_ENV, sym); + prop->expr = expr_alloc_symbol(sym_lookup(env, SYMBOL_CONST)); + + sym_env_list = expr_alloc_one(E_LIST, sym_env_list); + sym_env_list->right.sym = sym; + + p = getenv(env); + if (p) + sym_add_default(sym, p); + else + menu_warn(current_entry, "environment variable %s undefined", env); +} diff --git a/support/kconfig/util.c b/support/kconfig/util.c new file mode 100644 index 00000000..18a8e523 --- /dev/null +++ b/support/kconfig/util.c @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2002-2005 Roman Zippel + * Copyright (C) 2002-2005 Sam Ravnborg + * + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include "lkc.h" + +/* file already present in list? If not add it */ +struct file *file_lookup(const char *name) +{ + struct file *file; + char *file_name = sym_expand_string_value(name); + + for (file = file_list; file; file = file->next) { + if (!strcmp(name, file->name)) { + free(file_name); + return file; + } + } + + file = xmalloc(sizeof(*file)); + memset(file, 0, sizeof(*file)); + file->name = file_name; + file->next = file_list; + file_list = file; + return file; +} + +/* write a dependency file as used by kbuild to track dependencies */ +int file_write_dep(const char *name) +{ + char *str; + char buf[PATH_MAX+1], buf2[PATH_MAX+1], dir[PATH_MAX+1]; + struct symbol *sym, *env_sym; + struct expr *e; + struct file *file; + FILE *out; + + if (!name) + name = ".kconfig.d"; + + strcpy(dir, conf_get_configname()); + str = strrchr(dir, '/'); + if (str) + str[1] = 0; + else + dir[0] = 0; + + sprintf(buf, "%s..config.tmp", dir); + out = fopen(buf, "w"); + if (!out) + return 1; + fprintf(out, "deps_config := \\\n"); + for (file = file_list; file; file = file->next) { + if (file->next) + fprintf(out, "\t%s \\\n", file->name); + else + fprintf(out, "\t%s\n", file->name); + } + fprintf(out, "\n%s: \\\n" + "\t$(deps_config)\n\n", conf_get_autoconfig_name()); + + expr_list_for_each_sym(sym_env_list, e, sym) { + struct property *prop; + const char *value; + + prop = sym_get_env_prop(sym); + env_sym = prop_get_symbol(prop); + if (!env_sym) + continue; + value = getenv(env_sym->name); + if (!value) + value = ""; + fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value); + fprintf(out, "%s: FORCE\n", conf_get_autoconfig_name()); + fprintf(out, "endif\n"); + } + + fprintf(out, "\n$(deps_config): ;\n"); + fclose(out); + sprintf(buf2, "%s%s", dir, name); + rename(buf, buf2); + return 0; +} + + +/* Allocate initial growable string */ +struct gstr str_new(void) +{ + struct gstr gs; + gs.s = xmalloc(sizeof(char) * 64); + gs.len = 64; + gs.max_width = 0; + strcpy(gs.s, "\0"); + return gs; +} + +/* Free storage for growable string */ +void str_free(struct gstr *gs) +{ + if (gs->s) + free(gs->s); + gs->s = NULL; + gs->len = 0; +} + +/* Append to growable string */ +void str_append(struct gstr *gs, const char *s) +{ + size_t l; + if (s) { + l = strlen(gs->s) + strlen(s) + 1; + if (l > gs->len) { + gs->s = xrealloc(gs->s, l); + gs->len = l; + } + strcat(gs->s, s); + } +} + +/* Append printf formatted string to growable string */ +void str_printf(struct gstr *gs, const char *fmt, ...) +{ + va_list ap; + char s[10000]; /* big enough... */ + va_start(ap, fmt); + vsnprintf(s, sizeof(s), fmt, ap); + str_append(gs, s); + va_end(ap); +} + +/* Retrieve value of growable string */ +const char *str_get(struct gstr *gs) +{ + return gs->s; +} + +void *xmalloc(size_t size) +{ + void *p = malloc(size); + if (p) + return p; + fprintf(stderr, "Out of memory.\n"); + exit(1); +} + +void *xcalloc(size_t nmemb, size_t size) +{ + void *p = calloc(nmemb, size); + if (p) + return p; + fprintf(stderr, "Out of memory.\n"); + exit(1); +} + +void *xrealloc(void *p, size_t size) +{ + p = realloc(p, size); + if (p) + return p; + fprintf(stderr, "Out of memory.\n"); + exit(1); +} + +char *xstrdup(const char *s) +{ + char *p; + + p = strdup(s); + if (p) + return p; + fprintf(stderr, "Out of memory.\n"); + exit(1); +} diff --git a/support/kconfig/zconf.l b/support/kconfig/zconf.l new file mode 100644 index 00000000..045093d8 --- /dev/null +++ b/support/kconfig/zconf.l @@ -0,0 +1,372 @@ +%option nostdinit noyywrap never-interactive full ecs +%option 8bit nodefault yylineno +%option noinput +%x COMMAND HELP STRING PARAM +%{ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include + +#include "lkc.h" + +#define START_STRSIZE 16 + +static struct { + struct file *file; + int lineno; +} current_pos; + +static char *text; +static int text_size, text_asize; + +struct buffer { + struct buffer *parent; + YY_BUFFER_STATE state; +}; + +struct buffer *current_buf; + +static int last_ts, first_ts; + +static void zconf_endhelp(void); +static void zconf_endfile(void); + +static void new_string(void) +{ + text = xmalloc(START_STRSIZE); + text_asize = START_STRSIZE; + text_size = 0; + *text = 0; +} + +static void append_string(const char *str, int size) +{ + int new_size = text_size + size + 1; + if (new_size > text_asize) { + new_size += START_STRSIZE - 1; + new_size &= -START_STRSIZE; + text = xrealloc(text, new_size); + text_asize = new_size; + } + memcpy(text + text_size, str, size); + text_size += size; + text[text_size] = 0; +} + +static void alloc_string(const char *str, int size) +{ + text = xmalloc(size + 1); + memcpy(text, str, size); + text[size] = 0; +} + +static void warn_ignored_character(char chr) +{ + fprintf(stderr, + "%s:%d:warning: ignoring unsupported character '%c'\n", + zconf_curname(), zconf_lineno(), chr); +} +%} + +n [A-Za-z0-9_-] + +%% + int str = 0; + int ts, i; + +[ \t]*#.*\n | +[ \t]*\n { + return T_EOL; +} +[ \t]*#.* + + +[ \t]+ { + BEGIN(COMMAND); +} + +. { + unput(yytext[0]); + BEGIN(COMMAND); +} + + +{ + {n}+ { + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + BEGIN(PARAM); + current_pos.file = current_file; + current_pos.lineno = yylineno; + if (id && id->flags & TF_COMMAND) { + yylval.id = id; + return id->token; + } + alloc_string(yytext, yyleng); + yylval.string = text; + return T_WORD; + } + . warn_ignored_character(*yytext); + \n { + BEGIN(INITIAL); + return T_EOL; + } +} + +{ + "&&" return T_AND; + "||" return T_OR; + "(" return T_OPEN_PAREN; + ")" return T_CLOSE_PAREN; + "!" return T_NOT; + "=" return T_EQUAL; + "!=" return T_UNEQUAL; + "<=" return T_LESS_EQUAL; + ">=" return T_GREATER_EQUAL; + "<" return T_LESS; + ">" return T_GREATER; + \"|\' { + str = yytext[0]; + new_string(); + BEGIN(STRING); + } + \n BEGIN(INITIAL); return T_EOL; + ({n}|[/.])+ { + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + if (id && id->flags & TF_PARAM) { + yylval.id = id; + return id->token; + } + alloc_string(yytext, yyleng); + yylval.string = text; + return T_WORD; + } + #.* /* comment */ + \\\n ; + [[:blank:]]+ + . warn_ignored_character(*yytext); + <> { + BEGIN(INITIAL); + } +} + +{ + [^'"\\\n]+/\n { + append_string(yytext, yyleng); + yylval.string = text; + return T_WORD_QUOTE; + } + [^'"\\\n]+ { + append_string(yytext, yyleng); + } + \\.?/\n { + append_string(yytext + 1, yyleng - 1); + yylval.string = text; + return T_WORD_QUOTE; + } + \\.? { + append_string(yytext + 1, yyleng - 1); + } + \'|\" { + if (str == yytext[0]) { + BEGIN(PARAM); + yylval.string = text; + return T_WORD_QUOTE; + } else + append_string(yytext, 1); + } + \n { + fprintf(stderr, + "%s:%d:warning: multi-line strings not supported\n", + zconf_curname(), zconf_lineno()); + BEGIN(INITIAL); + return T_EOL; + } + <> { + BEGIN(INITIAL); + } +} + +{ + [ \t]+ { + ts = 0; + for (i = 0; i < yyleng; i++) { + if (yytext[i] == '\t') + ts = (ts & ~7) + 8; + else + ts++; + } + last_ts = ts; + if (first_ts) { + if (ts < first_ts) { + zconf_endhelp(); + return T_HELPTEXT; + } + ts -= first_ts; + while (ts > 8) { + append_string(" ", 8); + ts -= 8; + } + append_string(" ", ts); + } + } + [ \t]*\n/[^ \t\n] { + zconf_endhelp(); + return T_HELPTEXT; + } + [ \t]*\n { + append_string("\n", 1); + } + [^ \t\n].* { + while (yyleng) { + if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t')) + break; + yyleng--; + } + append_string(yytext, yyleng); + if (!first_ts) + first_ts = last_ts; + } + <> { + zconf_endhelp(); + return T_HELPTEXT; + } +} + +<> { + if (current_file) { + zconf_endfile(); + return T_EOL; + } + fclose(yyin); + yyterminate(); +} + +%% +void zconf_starthelp(void) +{ + new_string(); + last_ts = first_ts = 0; + BEGIN(HELP); +} + +static void zconf_endhelp(void) +{ + yylval.string = text; + BEGIN(INITIAL); +} + + +/* + * Try to open specified file with following names: + * ./name + * $(srctree)/name + * The latter is used when srctree is separate from objtree + * when compiling the kernel. + * Return NULL if file is not found. + */ +FILE *zconf_fopen(const char *name) +{ + char *env, fullname[PATH_MAX+1]; + FILE *f; + + f = fopen(name, "r"); + if (!f && name != NULL && name[0] != '/') { + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + f = fopen(fullname, "r"); + } + } + return f; +} + +void zconf_initscan(const char *name) +{ + yyin = zconf_fopen(name); + if (!yyin) { + fprintf(stderr, "can't find file %s\n", name); + exit(1); + } + + current_buf = xmalloc(sizeof(*current_buf)); + memset(current_buf, 0, sizeof(*current_buf)); + + current_file = file_lookup(name); + yylineno = 1; +} + +void zconf_nextfile(const char *name) +{ + struct file *iter; + struct file *file = file_lookup(name); + struct buffer *buf = xmalloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + + current_buf->state = YY_CURRENT_BUFFER; + yyin = zconf_fopen(file->name); + if (!yyin) { + fprintf(stderr, "%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), file->name); + exit(1); + } + yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + current_file->lineno = yylineno; + file->parent = current_file; + + for (iter = current_file; iter; iter = iter->parent) { + if (!strcmp(iter->name, file->name)) { + fprintf(stderr, + "Recursive inclusion detected.\n" + "Inclusion path:\n" + " current file : %s\n", file->name); + iter = file; + do { + iter = iter->parent; + fprintf(stderr, " included from: %s:%d\n", + iter->name, iter->lineno - 1); + } while (strcmp(iter->name, file->name)); + exit(1); + } + } + + yylineno = 1; + current_file = file; +} + +static void zconf_endfile(void) +{ + struct buffer *parent; + + current_file = current_file->parent; + if (current_file) + yylineno = current_file->lineno; + + parent = current_buf->parent; + if (parent) { + fclose(yyin); + yy_delete_buffer(YY_CURRENT_BUFFER); + yy_switch_to_buffer(parent->state); + } + free(current_buf); + current_buf = parent; +} + +int zconf_lineno(void) +{ + return current_pos.lineno; +} + +const char *zconf_curname(void) +{ + return current_pos.file ? current_pos.file->name : ""; +} diff --git a/support/kconfig/zconf.lex.c_shipped b/support/kconfig/zconf.lex.c_shipped new file mode 100644 index 00000000..33913d43 --- /dev/null +++ b/support/kconfig/zconf.lex.c_shipped @@ -0,0 +1,2500 @@ + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* begin standard C++ headers. */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern int yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires + * access to the local variable yy_act. Since yyless() is a macro, it would break + * existing scanners that call yyless() from OUTSIDE yylex. + * One obvious solution it to make yy_act a global. I tried that, and saw + * a 5% performance hit in a non-yylineno scanner, because yy_act is + * normally declared as a register variable-- so it is not worth it. + */ + #define YY_LESS_LINENO(n) \ + do { \ + int yyl;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = NULL; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); + +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define yywrap() (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; + +FILE *yyin = NULL, *yyout = NULL; + +typedef int yy_state_type; + +extern int yylineno; +int yylineno = 1; + +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext + +static const flex_int16_t yy_nxt[][18] = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + }, + + { + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12 + }, + + { + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12 + }, + + { + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, + 16, 18, 16, 16, 16, 16, 16, 16 + }, + + { + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, + 16, 18, 16, 16, 16, 16, 16, 16 + + }, + + { + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19 + }, + + { + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19 + }, + + { + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, + 22, 22, 22, 22, 22, 22, 25, 22 + }, + + { + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, + 22, 22, 22, 22, 22, 22, 25, 22 + }, + + { + 11, 26, 27, 28, 29, 30, 31, 32, 30, 33, + 34, 35, 35, 36, 37, 38, 39, 40 + + }, + + { + 11, 26, 27, 28, 29, 30, 31, 32, 30, 33, + 34, 35, 35, 36, 37, 38, 39, 40 + }, + + { + -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, + -11, -11, -11, -11, -11, -11, -11, -11 + }, + + { + 11, -12, -12, -12, -12, -12, -12, -12, -12, -12, + -12, -12, -12, -12, -12, -12, -12, -12 + }, + + { + 11, -13, 41, 42, -13, -13, 43, -13, -13, -13, + -13, -13, -13, -13, -13, -13, -13, -13 + }, + + { + 11, -14, -14, -14, -14, -14, -14, -14, -14, -14, + -14, -14, -14, -14, -14, -14, -14, -14 + + }, + + { + 11, 44, 44, 45, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44 + }, + + { + 11, -16, -16, -16, -16, -16, -16, -16, -16, -16, + -16, -16, -16, -16, -16, -16, -16, -16 + }, + + { + 11, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17, -17 + }, + + { + 11, -18, -18, -18, -18, -18, -18, -18, -18, -18, + -18, 46, -18, -18, -18, -18, -18, -18 + }, + + { + 11, 47, 47, -19, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47 + + }, + + { + 11, -20, 48, 49, -20, -20, -20, -20, -20, -20, + -20, -20, -20, -20, -20, -20, -20, -20 + }, + + { + 11, 50, -21, -21, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50 + }, + + { + 11, 51, 51, 52, 51, -22, 51, 51, -22, 51, + 51, 51, 51, 51, 51, 51, -22, 51 + }, + + { + 11, -23, -23, -23, -23, -23, -23, -23, -23, -23, + -23, -23, -23, -23, -23, -23, -23, -23 + }, + + { + 11, -24, -24, -24, -24, -24, -24, -24, -24, -24, + -24, -24, -24, -24, -24, -24, -24, -24 + + }, + + { + 11, 53, 53, 54, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53 + }, + + { + 11, -26, -26, -26, -26, -26, -26, -26, -26, -26, + -26, -26, -26, -26, -26, -26, -26, -26 + }, + + { + 11, -27, 55, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27, -27 + }, + + { + 11, -28, -28, -28, -28, -28, -28, -28, -28, -28, + -28, -28, -28, -28, -28, -28, -28, -28 + }, + + { + 11, -29, -29, -29, -29, -29, -29, -29, -29, -29, + -29, -29, -29, -29, 56, -29, -29, -29 + + }, + + { + 11, -30, -30, -30, -30, -30, -30, -30, -30, -30, + -30, -30, -30, -30, -30, -30, -30, -30 + }, + + { + 11, 57, 57, -31, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57 + }, + + { + 11, -32, -32, -32, -32, -32, -32, 58, -32, -32, + -32, -32, -32, -32, -32, -32, -32, -32 + }, + + { + 11, -33, -33, -33, -33, -33, -33, -33, -33, -33, + -33, -33, -33, -33, -33, -33, -33, -33 + }, + + { + 11, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, -34, -34, -34, -34, -34, -34, -34 + + }, + + { + 11, -35, -35, -35, -35, -35, -35, -35, -35, -35, + -35, 59, 59, -35, -35, -35, -35, -35 + }, + + { + 11, -36, -36, -36, -36, -36, -36, -36, -36, -36, + -36, -36, -36, -36, 60, -36, -36, -36 + }, + + { + 11, -37, -37, -37, -37, -37, -37, -37, -37, -37, + -37, -37, -37, -37, -37, -37, -37, -37 + }, + + { + 11, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, 61, -38, -38, -38 + }, + + { + 11, -39, -39, 62, -39, -39, -39, -39, -39, -39, + -39, -39, -39, -39, -39, -39, -39, -39 + + }, + + { + 11, -40, -40, -40, -40, -40, -40, -40, -40, -40, + -40, -40, -40, -40, -40, -40, -40, 63 + }, + + { + 11, -41, 41, 42, -41, -41, 43, -41, -41, -41, + -41, -41, -41, -41, -41, -41, -41, -41 + }, + + { + 11, -42, -42, -42, -42, -42, -42, -42, -42, -42, + -42, -42, -42, -42, -42, -42, -42, -42 + }, + + { + 11, 44, 44, 45, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44 + }, + + { + 11, 44, 44, 45, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44 + + }, + + { + 11, -45, -45, -45, -45, -45, -45, -45, -45, -45, + -45, -45, -45, -45, -45, -45, -45, -45 + }, + + { + 11, -46, -46, -46, -46, -46, -46, -46, -46, -46, + -46, 46, -46, -46, -46, -46, -46, -46 + }, + + { + 11, 47, 47, -47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47 + }, + + { + 11, -48, 48, 49, -48, -48, -48, -48, -48, -48, + -48, -48, -48, -48, -48, -48, -48, -48 + }, + + { + 11, 50, -49, -49, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50 + + }, + + { + 11, -50, -50, -50, -50, -50, -50, -50, -50, -50, + -50, -50, -50, -50, -50, -50, -50, -50 + }, + + { + 11, 51, 51, 52, 51, -51, 51, 51, -51, 51, + 51, 51, 51, 51, 51, 51, -51, 51 + }, + + { + 11, -52, -52, -52, -52, -52, -52, -52, -52, -52, + -52, -52, -52, -52, -52, -52, -52, -52 + }, + + { + 11, -53, -53, 54, -53, -53, -53, -53, -53, -53, + -53, -53, -53, -53, -53, -53, -53, -53 + }, + + { + 11, -54, -54, -54, -54, -54, -54, -54, -54, -54, + -54, -54, -54, -54, -54, -54, -54, -54 + + }, + + { + 11, -55, 55, -55, -55, -55, -55, -55, -55, -55, + -55, -55, -55, -55, -55, -55, -55, -55 + }, + + { + 11, -56, -56, -56, -56, -56, -56, -56, -56, -56, + -56, -56, -56, -56, -56, -56, -56, -56 + }, + + { + 11, 57, 57, -57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57 + }, + + { + 11, -58, -58, -58, -58, -58, -58, -58, -58, -58, + -58, -58, -58, -58, -58, -58, -58, -58 + }, + + { + 11, -59, -59, -59, -59, -59, -59, -59, -59, -59, + -59, 59, 59, -59, -59, -59, -59, -59 + + }, + + { + 11, -60, -60, -60, -60, -60, -60, -60, -60, -60, + -60, -60, -60, -60, -60, -60, -60, -60 + }, + + { + 11, -61, -61, -61, -61, -61, -61, -61, -61, -61, + -61, -61, -61, -61, -61, -61, -61, -61 + }, + + { + 11, -62, -62, -62, -62, -62, -62, -62, -62, -62, + -62, -62, -62, -62, -62, -62, -62, -62 + }, + + { + 11, -63, -63, -63, -63, -63, -63, -63, -63, -63, + -63, -63, -63, -63, -63, -63, -63, -63 + }, + + } ; + +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; +#define YY_NUM_RULES 37 +#define YY_END_OF_BUFFER 38 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[64] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 38, 5, 4, 2, 3, 7, 8, 6, 36, 33, + 35, 28, 32, 31, 30, 26, 25, 21, 13, 20, + 23, 26, 11, 12, 22, 18, 14, 19, 26, 26, + 4, 2, 3, 3, 1, 6, 36, 33, 35, 34, + 28, 27, 30, 29, 25, 15, 23, 9, 22, 16, + 17, 24, 10 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 6, 1, 1, 7, 8, 9, + 10, 1, 1, 1, 11, 12, 12, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 1, 1, 13, + 14, 15, 1, 1, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 1, 16, 1, 1, 11, 1, 11, 11, 11, 11, + + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 1, 17, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +/* Table of booleans, true if rule could match eol. */ +static const flex_int32_t yy_rule_can_match_eol[38] = + { 0, +1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, }; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#define YY_NO_INPUT 1 + +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include + +#include "lkc.h" + +#define START_STRSIZE 16 + +static struct { + struct file *file; + int lineno; +} current_pos; + +static char *text; +static int text_size, text_asize; + +struct buffer { + struct buffer *parent; + YY_BUFFER_STATE state; +}; + +struct buffer *current_buf; + +static int last_ts, first_ts; + +static void zconf_endhelp(void); +static void zconf_endfile(void); + +static void new_string(void) +{ + text = xmalloc(START_STRSIZE); + text_asize = START_STRSIZE; + text_size = 0; + *text = 0; +} + +static void append_string(const char *str, int size) +{ + int new_size = text_size + size + 1; + if (new_size > text_asize) { + new_size += START_STRSIZE - 1; + new_size &= -START_STRSIZE; + text = xrealloc(text, new_size); + text_asize = new_size; + } + memcpy(text + text_size, str, size); + text_size += size; + text[text_size] = 0; +} + +static void alloc_string(const char *str, int size) +{ + text = xmalloc(size + 1); + memcpy(text, str, size); + text[size] = 0; +} + +static void warn_ignored_character(char chr) +{ + fprintf(stderr, + "%s:%d:warning: ignoring unsupported character '%c'\n", + zconf_curname(), zconf_lineno(), chr); +} + +#define INITIAL 0 +#define COMMAND 1 +#define HELP 2 +#define STRING 3 +#define PARAM 4 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals ( void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy ( void ); + +int yyget_debug ( void ); + +void yyset_debug ( int debug_flag ); + +YY_EXTRA_TYPE yyget_extra ( void ); + +void yyset_extra ( YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in ( void ); + +void yyset_in ( FILE * _in_str ); + +FILE *yyget_out ( void ); + +void yyset_out ( FILE * _out_str ); + + int yyget_leng ( void ); + +char *yyget_text ( void ); + +int yyget_lineno ( void ); + +void yyset_lineno ( int _line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap ( void ); +#else +extern int yywrap ( void ); +#endif +#endif + +#ifndef YY_NO_UNPUT + + static void yyunput ( int c, char *buf_ptr ); + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * ); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput ( void ); +#else +static int input ( void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + errno=0; \ + while ( (result = (int) read( fileno(yyin), buf, (yy_size_t) max_size )) < 0 ) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { + + int str = 0; + int ts, i; + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 ) + ++yy_cp; + + yy_current_state = -yy_current_state; + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + yylineno++; +; + } + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +/* rule 1 can match eol */ +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +{ + return T_EOL; +} + YY_BREAK +case 3: +YY_RULE_SETUP + + YY_BREAK +case 4: +YY_RULE_SETUP +{ + BEGIN(COMMAND); +} + YY_BREAK +case 5: +YY_RULE_SETUP +{ + unput(yytext[0]); + BEGIN(COMMAND); +} + YY_BREAK + +case 6: +YY_RULE_SETUP +{ + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + BEGIN(PARAM); + current_pos.file = current_file; + current_pos.lineno = yylineno; + if (id && id->flags & TF_COMMAND) { + yylval.id = id; + return id->token; + } + alloc_string(yytext, yyleng); + yylval.string = text; + return T_WORD; + } + YY_BREAK +case 7: +YY_RULE_SETUP +warn_ignored_character(*yytext); + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +{ + BEGIN(INITIAL); + return T_EOL; + } + YY_BREAK + +case 9: +YY_RULE_SETUP +return T_AND; + YY_BREAK +case 10: +YY_RULE_SETUP +return T_OR; + YY_BREAK +case 11: +YY_RULE_SETUP +return T_OPEN_PAREN; + YY_BREAK +case 12: +YY_RULE_SETUP +return T_CLOSE_PAREN; + YY_BREAK +case 13: +YY_RULE_SETUP +return T_NOT; + YY_BREAK +case 14: +YY_RULE_SETUP +return T_EQUAL; + YY_BREAK +case 15: +YY_RULE_SETUP +return T_UNEQUAL; + YY_BREAK +case 16: +YY_RULE_SETUP +return T_LESS_EQUAL; + YY_BREAK +case 17: +YY_RULE_SETUP +return T_GREATER_EQUAL; + YY_BREAK +case 18: +YY_RULE_SETUP +return T_LESS; + YY_BREAK +case 19: +YY_RULE_SETUP +return T_GREATER; + YY_BREAK +case 20: +YY_RULE_SETUP +{ + str = yytext[0]; + new_string(); + BEGIN(STRING); + } + YY_BREAK +case 21: +/* rule 21 can match eol */ +YY_RULE_SETUP +BEGIN(INITIAL); return T_EOL; + YY_BREAK +case 22: +YY_RULE_SETUP +{ + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + if (id && id->flags & TF_PARAM) { + yylval.id = id; + return id->token; + } + alloc_string(yytext, yyleng); + yylval.string = text; + return T_WORD; + } + YY_BREAK +case 23: +YY_RULE_SETUP +/* comment */ + YY_BREAK +case 24: +/* rule 24 can match eol */ +YY_RULE_SETUP +; + YY_BREAK +case 25: +YY_RULE_SETUP + + YY_BREAK +case 26: +YY_RULE_SETUP +warn_ignored_character(*yytext); + YY_BREAK +case YY_STATE_EOF(PARAM): +{ + BEGIN(INITIAL); + } + YY_BREAK + +case 27: +/* rule 27 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ +YY_RULE_SETUP +{ + append_string(yytext, yyleng); + yylval.string = text; + return T_WORD_QUOTE; + } + YY_BREAK +case 28: +YY_RULE_SETUP +{ + append_string(yytext, yyleng); + } + YY_BREAK +case 29: +/* rule 29 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ +YY_RULE_SETUP +{ + append_string(yytext + 1, yyleng - 1); + yylval.string = text; + return T_WORD_QUOTE; + } + YY_BREAK +case 30: +YY_RULE_SETUP +{ + append_string(yytext + 1, yyleng - 1); + } + YY_BREAK +case 31: +YY_RULE_SETUP +{ + if (str == yytext[0]) { + BEGIN(PARAM); + yylval.string = text; + return T_WORD_QUOTE; + } else + append_string(yytext, 1); + } + YY_BREAK +case 32: +/* rule 32 can match eol */ +YY_RULE_SETUP +{ + fprintf(stderr, + "%s:%d:warning: multi-line strings not supported\n", + zconf_curname(), zconf_lineno()); + BEGIN(INITIAL); + return T_EOL; + } + YY_BREAK +case YY_STATE_EOF(STRING): +{ + BEGIN(INITIAL); + } + YY_BREAK + +case 33: +YY_RULE_SETUP +{ + ts = 0; + for (i = 0; i < yyleng; i++) { + if (yytext[i] == '\t') + ts = (ts & ~7) + 8; + else + ts++; + } + last_ts = ts; + if (first_ts) { + if (ts < first_ts) { + zconf_endhelp(); + return T_HELPTEXT; + } + ts -= first_ts; + while (ts > 8) { + append_string(" ", 8); + ts -= 8; + } + append_string(" ", ts); + } + } + YY_BREAK +case 34: +/* rule 34 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ +YY_RULE_SETUP +{ + zconf_endhelp(); + return T_HELPTEXT; + } + YY_BREAK +case 35: +/* rule 35 can match eol */ +YY_RULE_SETUP +{ + append_string("\n", 1); + } + YY_BREAK +case 36: +YY_RULE_SETUP +{ + while (yyleng) { + if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t')) + break; + yyleng--; + } + append_string(yytext, yyleng); + if (!first_ts) + first_ts = last_ts; + } + YY_BREAK +case YY_STATE_EOF(HELP): +{ + zconf_endhelp(); + return T_HELPTEXT; + } + YY_BREAK + +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(COMMAND): +{ + if (current_file) { + zconf_endfile(); + return T_EOL; + } + fclose(yyin); + yyterminate(); +} + YY_BREAK +case 37: +YY_RULE_SETUP +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + int yy_is_jam; + + yy_current_state = yy_nxt[yy_current_state][1]; + yy_is_jam = (yy_current_state <= 0); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp ) +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ){ + --yylineno; + } + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + if ( c == '\n' ) + + yylineno++; +; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); + + yyfree( (void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (const char * yystr ) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (const char* msg ) +{ + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param _line_number line number + * + */ +void yyset_lineno (int _line_number ) +{ + + yylineno = _line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} + +void yyset_out (FILE * _out_str ) +{ + yyout = _out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int _bdebug ) +{ + yy_flex_debug = _bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + /* We do not touch yylineno unless the option is enabled. */ + yylineno = 1; + + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +void zconf_starthelp(void) +{ + new_string(); + last_ts = first_ts = 0; + BEGIN(HELP); +} + +static void zconf_endhelp(void) +{ + yylval.string = text; + BEGIN(INITIAL); +} + +/* + * Try to open specified file with following names: + * ./name + * $(srctree)/name + * The latter is used when srctree is separate from objtree + * when compiling the kernel. + * Return NULL if file is not found. + */ +FILE *zconf_fopen(const char *name) +{ + char *env, fullname[PATH_MAX+1]; + FILE *f; + + f = fopen(name, "r"); + if (!f && name != NULL && name[0] != '/') { + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + f = fopen(fullname, "r"); + } + } + return f; +} + +void zconf_initscan(const char *name) +{ + yyin = zconf_fopen(name); + if (!yyin) { + fprintf(stderr, "can't find file %s\n", name); + exit(1); + } + + current_buf = xmalloc(sizeof(*current_buf)); + memset(current_buf, 0, sizeof(*current_buf)); + + current_file = file_lookup(name); + yylineno = 1; +} + +void zconf_nextfile(const char *name) +{ + struct file *iter; + struct file *file = file_lookup(name); + struct buffer *buf = xmalloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + + current_buf->state = YY_CURRENT_BUFFER; + yyin = zconf_fopen(file->name); + if (!yyin) { + fprintf(stderr, "%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), file->name); + exit(1); + } + yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + current_file->lineno = yylineno; + file->parent = current_file; + + for (iter = current_file; iter; iter = iter->parent) { + if (!strcmp(iter->name, file->name)) { + fprintf(stderr, + "Recursive inclusion detected.\n" + "Inclusion path:\n" + " current file : %s\n", file->name); + iter = file; + do { + iter = iter->parent; + fprintf(stderr, " included from: %s:%d\n", + iter->name, iter->lineno - 1); + } while (strcmp(iter->name, file->name)); + exit(1); + } + } + + yylineno = 1; + current_file = file; +} + +static void zconf_endfile(void) +{ + struct buffer *parent; + + current_file = current_file->parent; + if (current_file) + yylineno = current_file->lineno; + + parent = current_buf->parent; + if (parent) { + fclose(yyin); + yy_delete_buffer(YY_CURRENT_BUFFER); + yy_switch_to_buffer(parent->state); + } + free(current_buf); + current_buf = parent; +} + +int zconf_lineno(void) +{ + return current_pos.lineno; +} + +const char *zconf_curname(void) +{ + return current_pos.file ? current_pos.file->name : ""; +} + diff --git a/support/kconfig/zconf.tab.c_shipped b/support/kconfig/zconf.tab.c_shipped new file mode 100644 index 00000000..4eca5b31 --- /dev/null +++ b/support/kconfig/zconf.tab.c_shipped @@ -0,0 +1,2488 @@ +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "3.0.4" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + + + +/* Copy the first part of user declarations. */ + + +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include + +#include "lkc.h" + +#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) + +#define PRINTD 0x0001 +#define DEBUG_PARSE 0x0002 + +int cdebug = PRINTD; + +int yylex(void); +static void yyerror(const char *err); +static void zconfprint(const char *err, ...); +static void zconf_error(const char *err, ...); +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken); + +struct symbol *symbol_hash[SYMBOL_HASHSIZE]; + +static struct menu *current_menu, *current_entry; + + + + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + + +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + T_MAINMENU = 258, + T_MENU = 259, + T_ENDMENU = 260, + T_SOURCE = 261, + T_CHOICE = 262, + T_ENDCHOICE = 263, + T_COMMENT = 264, + T_CONFIG = 265, + T_MENUCONFIG = 266, + T_HELP = 267, + T_HELPTEXT = 268, + T_IF = 269, + T_ENDIF = 270, + T_DEPENDS = 271, + T_OPTIONAL = 272, + T_PROMPT = 273, + T_TYPE = 274, + T_DEFAULT = 275, + T_SELECT = 276, + T_IMPLY = 277, + T_RANGE = 278, + T_VISIBLE = 279, + T_OPTION = 280, + T_ON = 281, + T_WORD = 282, + T_WORD_QUOTE = 283, + T_UNEQUAL = 284, + T_LESS = 285, + T_LESS_EQUAL = 286, + T_GREATER = 287, + T_GREATER_EQUAL = 288, + T_CLOSE_PAREN = 289, + T_OPEN_PAREN = 290, + T_EOL = 291, + T_OR = 292, + T_AND = 293, + T_EQUAL = 294, + T_NOT = 295 + }; +#endif + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + +union YYSTYPE +{ + + + char *string; + struct file *file; + struct symbol *symbol; + struct expr *expr; + struct menu *menu; + const struct kconf_id *id; + + +}; + +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE yylval; + +int yyparse (void); + + + +/* Copy the second part of user declarations. */ + + +/* Include kconf_id.c here so it can see the token constants. */ +#include "kconf_id.c" + + + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 11 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 325 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 41 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 52 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 126 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 206 + +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 295 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 110, 110, 110, 112, 112, 116, 124, 134, 136, + 137, 138, 139, 140, 141, 145, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 153, 154, 155, 156, 157, + 158, 162, 163, 169, 176, 181, 188, 197, 199, 200, + 201, 202, 203, 204, 207, 215, 221, 231, 237, 243, + 249, 252, 254, 267, 268, 273, 283, 288, 296, 299, + 301, 302, 303, 304, 305, 308, 314, 325, 331, 341, + 343, 348, 356, 364, 367, 369, 370, 371, 376, 383, + 388, 396, 399, 401, 402, 403, 406, 415, 422, 427, + 433, 451, 453, 454, 455, 458, 466, 468, 469, 472, + 479, 481, 486, 487, 490, 491, 492, 496, 497, 500, + 501, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 513, 514, 518, 520, 521, 524, 525 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 0 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", + "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", + "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", + "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_IMPLY", + "T_RANGE", "T_VISIBLE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", + "T_UNEQUAL", "T_LESS", "T_LESS_EQUAL", "T_GREATER", "T_GREATER_EQUAL", + "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", + "T_NOT", "$accept", "input", "start", "mainmenu_stmt", + "no_mainmenu_stmt", "stmt_list", "option_name", "common_stmt", + "option_error", "config_entry_start", "config_stmt", + "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", + "config_option", "symbol_option", "symbol_option_list", + "symbol_option_arg", "choice", "choice_entry", "choice_end", + "choice_stmt", "choice_option_list", "choice_option", "choice_block", + "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry", + "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment", + "comment_stmt", "help_start", "help", "depends_list", "depends", + "visibility_list", "visible", "prompt_stmt_opt", "prompt", "end", "nl", + "if_expr", "expr", "nonconst_symbol", "symbol", "word_opt", YY_NULLPTR +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295 +}; +# endif + +#define YYPACT_NINF -92 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-92))) + +#define YYTABLE_NINF -89 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = +{ + 20, 33, -92, 16, -92, -92, -92, 21, -92, -92, + 29, -92, 152, 186, -92, -92, 40, 67, 33, 71, + 33, 42, 80, 33, 78, 78, 31, 82, -92, -92, + -92, -92, -92, -92, -92, -92, -92, 120, -92, 131, + -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, + -92, -92, -92, -92, -92, -92, -92, -92, 109, -92, + 118, -92, 128, -92, 129, -92, 141, 142, -92, 31, + 31, 74, -92, 69, -92, 144, 145, 28, 119, 248, + 286, 77, 38, 77, 219, -92, -92, -92, -92, -92, + -92, -7, -92, 31, 31, 40, 52, 52, 52, 52, + 52, 52, -92, -92, 146, 147, 158, 33, 33, 31, + 78, 78, 52, -92, 184, -92, -92, -92, -92, 176, + -92, -92, 162, 33, 33, 78, -92, -92, -92, -92, + -92, -92, -92, -92, -92, -92, -92, -92, -92, 197, + -92, 272, -92, -92, -92, -92, -92, -92, -92, -92, + -92, -92, 174, -92, -92, -92, -92, -92, -92, -92, + -92, -92, 31, 197, 178, 197, 59, 197, 197, 52, + 27, 179, -92, -92, 197, 180, 197, 31, -92, 111, + 181, -92, -92, 182, 185, 195, 197, 193, -92, -92, + 208, -92, 209, 113, -92, -92, -92, -92, -92, 211, + 33, -92, -92, -92, -92, -92 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 7, 0, 107, 0, 3, 8, 8, 7, 102, 103, + 0, 1, 0, 0, 108, 2, 6, 0, 0, 0, + 0, 125, 0, 0, 0, 0, 0, 0, 16, 21, + 17, 18, 23, 19, 20, 22, 24, 0, 25, 0, + 9, 37, 28, 37, 29, 59, 69, 10, 74, 26, + 96, 82, 11, 30, 91, 27, 12, 15, 0, 104, + 0, 126, 0, 105, 0, 122, 0, 0, 124, 0, + 0, 0, 123, 111, 106, 0, 0, 0, 0, 0, + 0, 0, 91, 0, 0, 78, 86, 55, 87, 33, + 35, 0, 119, 0, 0, 71, 0, 0, 0, 0, + 0, 0, 13, 14, 0, 0, 0, 0, 100, 0, + 0, 0, 0, 51, 0, 43, 42, 38, 39, 0, + 41, 40, 0, 0, 100, 0, 63, 64, 60, 62, + 61, 70, 58, 57, 75, 77, 73, 76, 72, 109, + 98, 0, 97, 83, 85, 81, 84, 80, 93, 94, + 92, 118, 120, 121, 117, 112, 113, 114, 115, 116, + 32, 89, 0, 109, 0, 109, 109, 109, 109, 0, + 0, 0, 90, 67, 109, 0, 109, 0, 99, 0, + 0, 44, 101, 0, 0, 0, 109, 53, 50, 31, + 0, 66, 0, 110, 95, 45, 46, 47, 48, 0, + 0, 52, 65, 68, 49, 54 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -92, -92, 241, -92, -92, 244, -92, -13, -66, -92, + -92, -92, -92, 218, -92, -92, -92, -92, -92, -92, + -92, -69, -92, -92, -92, -92, -92, -92, -92, -92, + -92, -92, 12, -92, -92, -92, -92, -92, 172, 170, + -64, -92, -92, 148, -1, 34, 1, 139, -68, -21, + -91, -92 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 3, 4, 5, 6, 12, 39, 40, 116, 41, + 42, 43, 44, 77, 117, 118, 170, 201, 45, 46, + 132, 47, 79, 128, 80, 48, 136, 49, 81, 50, + 51, 145, 52, 83, 53, 54, 55, 119, 120, 84, + 121, 82, 142, 164, 165, 56, 7, 178, 71, 72, + 73, 62 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_int16 yytable[] = +{ + 10, 91, 92, 66, 67, 154, 155, 156, 157, 158, + 159, 16, 135, 127, 144, 130, 11, 58, 149, 60, + 150, 169, 64, 1, 1, 152, 153, 151, -34, 104, + 93, 94, -34, -34, -34, -34, -34, -34, -34, -34, + 105, 166, -34, -34, 106, -34, 107, 108, 109, 110, + 111, 112, -34, 113, 187, 114, 2, 14, 65, 68, + 8, 9, 139, 188, 115, 2, 69, 131, 134, 61, + 143, 70, 95, 177, 140, 149, 14, 150, 186, 65, + 68, 18, 19, 20, 21, 22, 23, 24, 25, 167, + 168, 26, 27, 137, 179, 146, 93, 94, 96, 97, + 98, 99, 100, 57, 176, 65, 163, 59, 101, 193, + 2, 93, 94, 38, 133, 138, 63, 147, 74, -36, + 104, 75, 174, -36, -36, -36, -36, -36, -36, -36, + -36, 105, 76, -36, -36, 106, -36, 107, 108, 109, + 110, 111, 112, -36, 113, 85, 114, 194, 93, 94, + 93, 94, -4, 17, 86, 115, 18, 19, 20, 21, + 22, 23, 24, 25, 87, 88, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 89, 90, 37, + 102, 103, 160, 161, 162, 171, -5, 17, 38, 172, + 18, 19, 20, 21, 22, 23, 24, 25, 173, 205, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 177, 94, 37, 181, 189, 191, 195, 196, -88, + 104, 197, 38, -88, -88, -88, -88, -88, -88, -88, + -88, 198, 200, -88, -88, 106, -88, -88, -88, -88, + -88, -88, -88, -88, 202, 203, 114, 204, 15, 104, + 13, 129, 141, -56, -56, 148, -56, -56, -56, -56, + 105, 78, -56, -56, 106, 122, 123, 124, 125, 0, + 0, 0, 175, 104, 0, 114, -79, -79, -79, -79, + -79, -79, -79, -79, 126, 0, -79, -79, 106, 0, + 0, 19, 20, 0, 22, 23, 24, 25, 0, 114, + 26, 27, 180, 0, 182, 183, 184, 185, 148, 0, + 0, 0, 0, 190, 0, 192, 0, 0, 0, 0, + 0, 0, 38, 0, 0, 199 +}; + +static const yytype_int16 yycheck[] = +{ + 1, 69, 70, 24, 25, 96, 97, 98, 99, 100, + 101, 10, 81, 79, 83, 79, 0, 18, 84, 20, + 84, 112, 23, 3, 3, 93, 94, 34, 0, 1, + 37, 38, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 109, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 27, 27, 36, 36, 27, 28, + 27, 28, 24, 36, 36, 36, 35, 80, 81, 27, + 83, 40, 71, 14, 36, 141, 36, 141, 169, 27, + 28, 4, 5, 6, 7, 8, 9, 10, 11, 110, + 111, 14, 15, 81, 162, 83, 37, 38, 29, 30, + 31, 32, 33, 36, 125, 27, 107, 36, 39, 177, + 36, 37, 38, 36, 80, 81, 36, 83, 36, 0, + 1, 1, 123, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 1, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 36, 27, 36, 37, 38, + 37, 38, 0, 1, 36, 36, 4, 5, 6, 7, + 8, 9, 10, 11, 36, 36, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 36, 36, 27, + 36, 36, 36, 36, 26, 1, 0, 1, 36, 13, + 4, 5, 6, 7, 8, 9, 10, 11, 36, 200, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 14, 38, 27, 36, 36, 36, 36, 36, 0, + 1, 36, 36, 4, 5, 6, 7, 8, 9, 10, + 11, 36, 39, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 36, 36, 27, 36, 7, 1, + 6, 79, 82, 5, 6, 36, 8, 9, 10, 11, + 12, 43, 14, 15, 16, 17, 18, 19, 20, -1, + -1, -1, 124, 1, -1, 27, 4, 5, 6, 7, + 8, 9, 10, 11, 36, -1, 14, 15, 16, -1, + -1, 5, 6, -1, 8, 9, 10, 11, -1, 27, + 14, 15, 163, -1, 165, 166, 167, 168, 36, -1, + -1, -1, -1, 174, -1, 176, -1, -1, -1, -1, + -1, -1, 36, -1, -1, 186 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 3, 36, 42, 43, 44, 45, 87, 27, 28, + 85, 0, 46, 46, 36, 43, 87, 1, 4, 5, + 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 27, 36, 47, + 48, 50, 51, 52, 53, 59, 60, 62, 66, 68, + 70, 71, 73, 75, 76, 77, 86, 36, 85, 36, + 85, 27, 92, 36, 85, 27, 90, 90, 28, 35, + 40, 89, 90, 91, 36, 1, 1, 54, 54, 63, + 65, 69, 82, 74, 80, 36, 36, 36, 36, 36, + 36, 89, 89, 37, 38, 87, 29, 30, 31, 32, + 33, 39, 36, 36, 1, 12, 16, 18, 19, 20, + 21, 22, 23, 25, 27, 36, 49, 55, 56, 78, + 79, 81, 17, 18, 19, 20, 36, 49, 64, 79, + 81, 48, 61, 86, 48, 62, 67, 73, 86, 24, + 36, 80, 83, 48, 62, 72, 73, 86, 36, 49, + 81, 34, 89, 89, 91, 91, 91, 91, 91, 91, + 36, 36, 26, 85, 84, 85, 89, 90, 90, 91, + 57, 1, 13, 36, 85, 84, 90, 14, 88, 89, + 88, 36, 88, 88, 88, 88, 91, 27, 36, 36, + 88, 36, 88, 89, 36, 36, 36, 36, 36, 88, + 39, 58, 36, 36, 36, 85 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 41, 42, 42, 43, 43, 44, 45, 46, 46, + 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, + 48, 49, 49, 50, 51, 52, 53, 54, 54, 54, + 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, + 56, 57, 57, 58, 58, 59, 60, 61, 62, 63, + 63, 63, 63, 63, 63, 64, 64, 64, 64, 65, + 65, 66, 67, 68, 69, 69, 69, 69, 70, 71, + 72, 73, 74, 74, 74, 74, 75, 76, 77, 78, + 79, 80, 80, 80, 80, 81, 82, 82, 82, 83, + 84, 84, 85, 85, 86, 86, 86, 87, 87, 88, + 88, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 90, 91, 91, 92, 92 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 2, 1, 2, 2, 3, 0, 0, 2, + 2, 2, 2, 4, 4, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 2, 3, 2, 3, 2, 0, 2, 2, + 2, 2, 2, 2, 3, 4, 4, 4, 4, 5, + 3, 0, 3, 0, 2, 3, 2, 1, 3, 0, + 2, 2, 2, 2, 2, 4, 3, 2, 4, 0, + 2, 3, 1, 3, 0, 2, 2, 2, 3, 3, + 1, 3, 0, 2, 2, 2, 3, 3, 2, 2, + 2, 0, 2, 2, 2, 4, 0, 2, 2, 2, + 0, 2, 1, 1, 2, 2, 2, 1, 2, 0, + 2, 1, 3, 3, 3, 3, 3, 3, 3, 2, + 3, 3, 1, 1, 1, 0, 1 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) +{ + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +yystrlen (const char *yystr) +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +{ + YYUSE (yyvaluep); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + switch (yytype) + { + case 60: /* choice_entry */ + + { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno); + if (current_menu == ((*yyvaluep).menu)) + menu_end_menu(); +} + + break; + + case 66: /* if_entry */ + + { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno); + if (current_menu == ((*yyvaluep).menu)) + menu_end_menu(); +} + + break; + + case 71: /* menu_entry */ + + { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + ((*yyvaluep).menu)->file->name, ((*yyvaluep).menu)->lineno); + if (current_menu == ((*yyvaluep).menu)) + menu_end_menu(); +} + + break; + + + default: + break; + } + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (void) +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = yylex (); + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 6: + + { + menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); +} + + break; + + case 7: + + { + /* + * Hack: Keep the main menu title on the heap so we can safely free it + * later regardless of whether it comes from the 'prompt' in + * mainmenu_stmt or here + */ + menu_add_prompt(P_MENU, xstrdup("Buildroot Configuration"), NULL); +} + + break; + + case 12: + + { zconf_error("unexpected end statement"); } + + break; + + case 13: + + { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); } + + break; + + case 14: + + { + zconf_error("unexpected option \"%s\"", (yyvsp[-2].id)->name); +} + + break; + + case 15: + + { zconf_error("invalid statement"); } + + break; + + case 31: + + { zconf_error("unknown option \"%s\"", (yyvsp[-2].string)); } + + break; + + case 32: + + { zconf_error("invalid option"); } + + break; + + case 33: + + { + (yyvsp[-1].symbol)->flags |= SYMBOL_OPTIONAL; + menu_add_entry((yyvsp[-1].symbol)); + printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].symbol)->name); +} + + break; + + case 34: + + { + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 35: + + { + (yyvsp[-1].symbol)->flags |= SYMBOL_OPTIONAL; + menu_add_entry((yyvsp[-1].symbol)); + printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].symbol)->name); +} + + break; + + case 36: + + { + if (current_entry->prompt) + current_entry->prompt->type = P_MENU; + else + zconfprint("warning: menuconfig statement without prompt"); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 44: + + { + menu_set_type((yyvsp[-2].id)->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + (yyvsp[-2].id)->stype); +} + + break; + + case 45: + + { + menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 46: + + { + menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr)); + if ((yyvsp[-3].id)->stype != S_UNKNOWN) + menu_set_type((yyvsp[-3].id)->stype); + printd(DEBUG_PARSE, "%s:%d:default(%u)\n", + zconf_curname(), zconf_lineno(), + (yyvsp[-3].id)->stype); +} + + break; + + case 47: + + { + menu_add_symbol(P_SELECT, (yyvsp[-2].symbol), (yyvsp[-1].expr)); + printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 48: + + { + menu_add_symbol(P_IMPLY, (yyvsp[-2].symbol), (yyvsp[-1].expr)); + printd(DEBUG_PARSE, "%s:%d:imply\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 49: + + { + menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr)); + printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 52: + + { + const struct kconf_id *id = kconf_id_lookup((yyvsp[-1].string), strlen((yyvsp[-1].string))); + if (id && id->flags & TF_OPTION) { + menu_add_option(id->token, (yyvsp[0].string)); + free((yyvsp[0].string)); + } + else + zconfprint("warning: ignoring unknown option %s", (yyvsp[-1].string)); + free((yyvsp[-1].string)); +} + + break; + + case 53: + + { (yyval.string) = NULL; } + + break; + + case 54: + + { (yyval.string) = (yyvsp[0].string); } + + break; + + case 55: + + { + struct symbol *sym = sym_lookup((yyvsp[-1].string), SYMBOL_CHOICE); + sym->flags |= SYMBOL_AUTO; + menu_add_entry(sym); + menu_add_expr(P_CHOICE, NULL, NULL); + free((yyvsp[-1].string)); + printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 56: + + { + (yyval.menu) = menu_add_menu(); +} + + break; + + case 57: + + { + if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); + } +} + + break; + + case 65: + + { + menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 66: + + { + if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) { + menu_set_type((yyvsp[-2].id)->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + (yyvsp[-2].id)->stype); + } else + YYERROR; +} + + break; + + case 67: + + { + current_entry->sym->flags |= SYMBOL_OPTIONAL; + printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 68: + + { + if ((yyvsp[-3].id)->stype == S_UNKNOWN) { + menu_add_symbol(P_DEFAULT, (yyvsp[-2].symbol), (yyvsp[-1].expr)); + printd(DEBUG_PARSE, "%s:%d:default\n", + zconf_curname(), zconf_lineno()); + } else + YYERROR; +} + + break; + + case 71: + + { + printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); + menu_add_entry(NULL); + menu_add_dep((yyvsp[-1].expr)); + (yyval.menu) = menu_add_menu(); +} + + break; + + case 72: + + { + if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); + } +} + + break; + + case 78: + + { + menu_add_entry(NULL); + menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); + printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 79: + + { + (yyval.menu) = menu_add_menu(); +} + + break; + + case 80: + + { + if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); + } +} + + break; + + case 86: + + { + printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); + zconf_nextfile((yyvsp[-1].string)); + free((yyvsp[-1].string)); +} + + break; + + case 87: + + { + menu_add_entry(NULL); + menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL); + printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 89: + + { + printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); + zconf_starthelp(); +} + + break; + + case 90: + + { + if (current_entry->help) { + free(current_entry->help); + zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used", + current_entry->sym->name ?: ""); + } + + /* Is the help text empty or all whitespace? */ + if ((yyvsp[0].string)[strspn((yyvsp[0].string), " \f\n\r\t\v")] == '\0') + zconfprint("warning: '%s' defined with blank help text", + current_entry->sym->name ?: ""); + + current_entry->help = (yyvsp[0].string); +} + + break; + + case 95: + + { + menu_add_dep((yyvsp[-1].expr)); + printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); +} + + break; + + case 99: + + { + menu_add_visibility((yyvsp[0].expr)); +} + + break; + + case 101: + + { + menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr)); +} + + break; + + case 104: + + { (yyval.id) = (yyvsp[-1].id); } + + break; + + case 105: + + { (yyval.id) = (yyvsp[-1].id); } + + break; + + case 106: + + { (yyval.id) = (yyvsp[-1].id); } + + break; + + case 109: + + { (yyval.expr) = NULL; } + + break; + + case 110: + + { (yyval.expr) = (yyvsp[0].expr); } + + break; + + case 111: + + { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); } + + break; + + case 112: + + { (yyval.expr) = expr_alloc_comp(E_LTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } + + break; + + case 113: + + { (yyval.expr) = expr_alloc_comp(E_LEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } + + break; + + case 114: + + { (yyval.expr) = expr_alloc_comp(E_GTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } + + break; + + case 115: + + { (yyval.expr) = expr_alloc_comp(E_GEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } + + break; + + case 116: + + { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } + + break; + + case 117: + + { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } + + break; + + case 118: + + { (yyval.expr) = (yyvsp[-1].expr); } + + break; + + case 119: + + { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); } + + break; + + case 120: + + { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); } + + break; + + case 121: + + { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); } + + break; + + case 122: + + { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); } + + break; + + case 124: + + { (yyval.symbol) = sym_lookup((yyvsp[0].string), SYMBOL_CONST); free((yyvsp[0].string)); } + + break; + + case 125: + + { (yyval.string) = NULL; } + + break; + + + + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + return yyresult; +} + + + +void conf_parse(const char *name) +{ + const char *tmp; + struct symbol *sym; + int i; + + zconf_initscan(name); + + sym_init(); + _menu_init(); + + if (getenv("ZCONF_DEBUG")) + yydebug = 1; + yyparse(); + if (yynerrs) + exit(1); + if (!modules_sym) + modules_sym = sym_find( "n" ); + + tmp = rootmenu.prompt->text; + rootmenu.prompt->text = _(rootmenu.prompt->text); + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); + free((char*)tmp); + + menu_finalize(&rootmenu); + for_all_symbols(i, sym) { + if (sym_check_deps(sym)) + yynerrs++; + } + if (yynerrs) + exit(1); + sym_set_change_count(1); +} + +static const char *zconf_tokenname(int token) +{ + switch (token) { + case T_MENU: return "menu"; + case T_ENDMENU: return "endmenu"; + case T_CHOICE: return "choice"; + case T_ENDCHOICE: return "endchoice"; + case T_IF: return "if"; + case T_ENDIF: return "endif"; + case T_DEPENDS: return "depends"; + case T_VISIBLE: return "visible"; + } + return ""; +} + +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken) +{ + if (id->token != endtoken) { + zconf_error("unexpected '%s' within %s block", + id->name, zconf_tokenname(starttoken)); + yynerrs++; + return false; + } + if (current_menu->file != current_file) { + zconf_error("'%s' in different file than '%s'", + id->name, zconf_tokenname(starttoken)); + fprintf(stderr, "%s:%d: location of the '%s'\n", + current_menu->file->name, current_menu->lineno, + zconf_tokenname(starttoken)); + yynerrs++; + return false; + } + return true; +} + +static void zconfprint(const char *err, ...) +{ + va_list ap; + + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconf_error(const char *err, ...) +{ + va_list ap; + + yynerrs++; + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void yyerror(const char *err) +{ + fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); +} + +static void print_quoted_string(FILE *out, const char *str) +{ + const char *p; + int len; + + putc('"', out); + while ((p = strchr(str, '"'))) { + len = p - str; + if (len) + fprintf(out, "%.*s", len, str); + fputs("\\\"", out); + str = p + 1; + } + fputs(str, out); + putc('"', out); +} + +static void print_symbol(FILE *out, struct menu *menu) +{ + struct symbol *sym = menu->sym; + struct property *prop; + + if (sym_is_choice(sym)) + fprintf(out, "\nchoice\n"); + else + fprintf(out, "\nconfig %s\n", sym->name); + switch (sym->type) { + case S_BOOLEAN: + fputs(" bool\n", out); + break; + case S_TRISTATE: + fputs(" tristate\n", out); + break; + case S_STRING: + fputs(" string\n", out); + break; + case S_INT: + fputs(" integer\n", out); + break; + case S_HEX: + fputs(" hex\n", out); + break; + default: + fputs(" ???\n", out); + break; + } + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + switch (prop->type) { + case P_PROMPT: + fputs(" prompt ", out); + print_quoted_string(out, prop->text); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_DEFAULT: + fputs( " default ", out); + expr_fprint(prop->expr, out); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_CHOICE: + fputs(" #choice value\n", out); + break; + case P_SELECT: + fputs( " select ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_IMPLY: + fputs( " imply ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_RANGE: + fputs( " range ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_MENU: + fputs( " menu ", out); + print_quoted_string(out, prop->text); + fputc('\n', out); + break; + default: + fprintf(out, " unknown prop %d!\n", prop->type); + break; + } + } + if (menu->help) { + int len = strlen(menu->help); + while (menu->help[--len] == '\n') + menu->help[len] = 0; + fprintf(out, " help\n%s\n", menu->help); + } +} + +void zconfdump(FILE *out) +{ + struct property *prop; + struct symbol *sym; + struct menu *menu; + + menu = rootmenu.list; + while (menu) { + if ((sym = menu->sym)) + print_symbol(out, menu); + else if ((prop = menu->prompt)) { + switch (prop->type) { + case P_COMMENT: + fputs("\ncomment ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + case P_MENU: + fputs("\nmenu ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + default: + ; + } + if (!expr_is_yes(prop->visible.expr)) { + fputs(" depends ", out); + expr_fprint(prop->visible.expr, out); + fputc('\n', out); + } + } + + if (menu->list) + menu = menu->list; + else if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->prompt && menu->prompt->type == P_MENU) + fputs("\nendmenu\n", out); + if (menu->next) { + menu = menu->next; + break; + } + } + } +} + +#include "zconf.lex.c" +#include "util.c" +#include "confdata.c" +#include "expr.c" +#include "symbol.c" +#include "menu.c" diff --git a/support/kconfig/zconf.y b/support/kconfig/zconf.y new file mode 100644 index 00000000..7b34de28 --- /dev/null +++ b/support/kconfig/zconf.y @@ -0,0 +1,782 @@ +%{ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include + +#include "lkc.h" + +#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) + +#define PRINTD 0x0001 +#define DEBUG_PARSE 0x0002 + +int cdebug = PRINTD; + +int yylex(void); +static void yyerror(const char *err); +static void zconfprint(const char *err, ...); +static void zconf_error(const char *err, ...); +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken); + +struct symbol *symbol_hash[SYMBOL_HASHSIZE]; + +static struct menu *current_menu, *current_entry; + +%} +%expect 32 + +%union +{ + char *string; + struct file *file; + struct symbol *symbol; + struct expr *expr; + struct menu *menu; + const struct kconf_id *id; +} + +%token T_MAINMENU +%token T_MENU +%token T_ENDMENU +%token T_SOURCE +%token T_CHOICE +%token T_ENDCHOICE +%token T_COMMENT +%token T_CONFIG +%token T_MENUCONFIG +%token T_HELP +%token T_HELPTEXT +%token T_IF +%token T_ENDIF +%token T_DEPENDS +%token T_OPTIONAL +%token T_PROMPT +%token T_TYPE +%token T_DEFAULT +%token T_SELECT +%token T_IMPLY +%token T_RANGE +%token T_VISIBLE +%token T_OPTION +%token T_ON +%token T_WORD +%token T_WORD_QUOTE +%token T_UNEQUAL +%token T_LESS +%token T_LESS_EQUAL +%token T_GREATER +%token T_GREATER_EQUAL +%token T_CLOSE_PAREN +%token T_OPEN_PAREN +%token T_EOL + +%left T_OR +%left T_AND +%left T_EQUAL T_UNEQUAL +%left T_LESS T_LESS_EQUAL T_GREATER T_GREATER_EQUAL +%nonassoc T_NOT + +%type prompt +%type nonconst_symbol +%type symbol +%type expr +%type if_expr +%type end +%type option_name +%type if_entry menu_entry choice_entry +%type symbol_option_arg word_opt + +%destructor { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + $$->file->name, $$->lineno); + if (current_menu == $$) + menu_end_menu(); +} if_entry menu_entry choice_entry + +%{ +/* Include kconf_id.c here so it can see the token constants. */ +#include "kconf_id.c" +%} + +%% +input: nl start | start; + +start: mainmenu_stmt stmt_list | no_mainmenu_stmt stmt_list; + +/* mainmenu entry */ + +mainmenu_stmt: T_MAINMENU prompt nl +{ + menu_add_prompt(P_MENU, $2, NULL); +}; + +/* Default main menu, if there's no mainmenu entry */ + +no_mainmenu_stmt: /* empty */ +{ + /* + * Hack: Keep the main menu title on the heap so we can safely free it + * later regardless of whether it comes from the 'prompt' in + * mainmenu_stmt or here + */ + menu_add_prompt(P_MENU, xstrdup("Buildroot Configuration"), NULL); +}; + + +stmt_list: + /* empty */ + | stmt_list common_stmt + | stmt_list choice_stmt + | stmt_list menu_stmt + | stmt_list end { zconf_error("unexpected end statement"); } + | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } + | stmt_list option_name error T_EOL +{ + zconf_error("unexpected option \"%s\"", $2->name); +} + | stmt_list error T_EOL { zconf_error("invalid statement"); } +; + +option_name: + T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_IMPLY | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE +; + +common_stmt: + T_EOL + | if_stmt + | comment_stmt + | config_stmt + | menuconfig_stmt + | source_stmt +; + +option_error: + T_WORD error T_EOL { zconf_error("unknown option \"%s\"", $1); } + | error T_EOL { zconf_error("invalid option"); } +; + + +/* config/menuconfig entry */ + +config_entry_start: T_CONFIG nonconst_symbol T_EOL +{ + $2->flags |= SYMBOL_OPTIONAL; + menu_add_entry($2); + printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2->name); +}; + +config_stmt: config_entry_start config_option_list +{ + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +}; + +menuconfig_entry_start: T_MENUCONFIG nonconst_symbol T_EOL +{ + $2->flags |= SYMBOL_OPTIONAL; + menu_add_entry($2); + printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), $2->name); +}; + +menuconfig_stmt: menuconfig_entry_start config_option_list +{ + if (current_entry->prompt) + current_entry->prompt->type = P_MENU; + else + zconfprint("warning: menuconfig statement without prompt"); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +}; + +config_option_list: + /* empty */ + | config_option_list config_option + | config_option_list symbol_option + | config_option_list depends + | config_option_list help + | config_option_list option_error + | config_option_list T_EOL +; + +config_option: T_TYPE prompt_stmt_opt T_EOL +{ + menu_set_type($1->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + $1->stype); +}; + +config_option: T_PROMPT prompt if_expr T_EOL +{ + menu_add_prompt(P_PROMPT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_DEFAULT expr if_expr T_EOL +{ + menu_add_expr(P_DEFAULT, $2, $3); + if ($1->stype != S_UNKNOWN) + menu_set_type($1->stype); + printd(DEBUG_PARSE, "%s:%d:default(%u)\n", + zconf_curname(), zconf_lineno(), + $1->stype); +}; + +config_option: T_SELECT nonconst_symbol if_expr T_EOL +{ + menu_add_symbol(P_SELECT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_IMPLY nonconst_symbol if_expr T_EOL +{ + menu_add_symbol(P_IMPLY, $2, $3); + printd(DEBUG_PARSE, "%s:%d:imply\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_RANGE symbol symbol if_expr T_EOL +{ + menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); + printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); +}; + +symbol_option: T_OPTION symbol_option_list T_EOL +; + +symbol_option_list: + /* empty */ + | symbol_option_list T_WORD symbol_option_arg +{ + const struct kconf_id *id = kconf_id_lookup($2, strlen($2)); + if (id && id->flags & TF_OPTION) { + menu_add_option(id->token, $3); + free($3); + } + else + zconfprint("warning: ignoring unknown option %s", $2); + free($2); +}; + +symbol_option_arg: + /* empty */ { $$ = NULL; } + | T_EQUAL prompt { $$ = $2; } +; + +/* choice entry */ + +choice: T_CHOICE word_opt T_EOL +{ + struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE); + sym->flags |= SYMBOL_AUTO; + menu_add_entry(sym); + menu_add_expr(P_CHOICE, NULL, NULL); + free($2); + printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); +}; + +choice_entry: choice choice_option_list +{ + $$ = menu_add_menu(); +}; + +choice_end: end +{ + if (zconf_endtoken($1, T_CHOICE, T_ENDCHOICE)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); + } +}; + +choice_stmt: choice_entry choice_block choice_end +; + +choice_option_list: + /* empty */ + | choice_option_list choice_option + | choice_option_list depends + | choice_option_list help + | choice_option_list T_EOL + | choice_option_list option_error +; + +choice_option: T_PROMPT prompt if_expr T_EOL +{ + menu_add_prompt(P_PROMPT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_TYPE prompt_stmt_opt T_EOL +{ + if ($1->stype == S_BOOLEAN || $1->stype == S_TRISTATE) { + menu_set_type($1->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + $1->stype); + } else + YYERROR; +}; + +choice_option: T_OPTIONAL T_EOL +{ + current_entry->sym->flags |= SYMBOL_OPTIONAL; + printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_DEFAULT nonconst_symbol if_expr T_EOL +{ + if ($1->stype == S_UNKNOWN) { + menu_add_symbol(P_DEFAULT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:default\n", + zconf_curname(), zconf_lineno()); + } else + YYERROR; +}; + +choice_block: + /* empty */ + | choice_block common_stmt +; + +/* if entry */ + +if_entry: T_IF expr nl +{ + printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); + menu_add_entry(NULL); + menu_add_dep($2); + $$ = menu_add_menu(); +}; + +if_end: end +{ + if (zconf_endtoken($1, T_IF, T_ENDIF)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); + } +}; + +if_stmt: if_entry if_block if_end +; + +if_block: + /* empty */ + | if_block common_stmt + | if_block menu_stmt + | if_block choice_stmt +; + +/* menu entry */ + +menu: T_MENU prompt T_EOL +{ + menu_add_entry(NULL); + menu_add_prompt(P_MENU, $2, NULL); + printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); +}; + +menu_entry: menu visibility_list depends_list +{ + $$ = menu_add_menu(); +}; + +menu_end: end +{ + if (zconf_endtoken($1, T_MENU, T_ENDMENU)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); + } +}; + +menu_stmt: menu_entry menu_block menu_end +; + +menu_block: + /* empty */ + | menu_block common_stmt + | menu_block menu_stmt + | menu_block choice_stmt +; + +source_stmt: T_SOURCE prompt T_EOL +{ + printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); + zconf_nextfile($2); + free($2); +}; + +/* comment entry */ + +comment: T_COMMENT prompt T_EOL +{ + menu_add_entry(NULL); + menu_add_prompt(P_COMMENT, $2, NULL); + printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); +}; + +comment_stmt: comment depends_list +; + +/* help option */ + +help_start: T_HELP T_EOL +{ + printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); + zconf_starthelp(); +}; + +help: help_start T_HELPTEXT +{ + if (current_entry->help) { + free(current_entry->help); + zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used", + current_entry->sym->name ?: ""); + } + + /* Is the help text empty or all whitespace? */ + if ($2[strspn($2, " \f\n\r\t\v")] == '\0') + zconfprint("warning: '%s' defined with blank help text", + current_entry->sym->name ?: ""); + + current_entry->help = $2; +}; + +/* depends option */ + +depends_list: + /* empty */ + | depends_list depends + | depends_list T_EOL + | depends_list option_error +; + +depends: T_DEPENDS T_ON expr T_EOL +{ + menu_add_dep($3); + printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); +}; + +/* visibility option */ + +visibility_list: + /* empty */ + | visibility_list visible + | visibility_list T_EOL +; + +visible: T_VISIBLE if_expr +{ + menu_add_visibility($2); +}; + +/* prompt statement */ + +prompt_stmt_opt: + /* empty */ + | prompt if_expr +{ + menu_add_prompt(P_PROMPT, $1, $2); +}; + +prompt: T_WORD + | T_WORD_QUOTE +; + +end: T_ENDMENU T_EOL { $$ = $1; } + | T_ENDCHOICE T_EOL { $$ = $1; } + | T_ENDIF T_EOL { $$ = $1; } +; + +nl: + T_EOL + | nl T_EOL +; + +if_expr: /* empty */ { $$ = NULL; } + | T_IF expr { $$ = $2; } +; + +expr: symbol { $$ = expr_alloc_symbol($1); } + | symbol T_LESS symbol { $$ = expr_alloc_comp(E_LTH, $1, $3); } + | symbol T_LESS_EQUAL symbol { $$ = expr_alloc_comp(E_LEQ, $1, $3); } + | symbol T_GREATER symbol { $$ = expr_alloc_comp(E_GTH, $1, $3); } + | symbol T_GREATER_EQUAL symbol { $$ = expr_alloc_comp(E_GEQ, $1, $3); } + | symbol T_EQUAL symbol { $$ = expr_alloc_comp(E_EQUAL, $1, $3); } + | symbol T_UNEQUAL symbol { $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); } + | T_OPEN_PAREN expr T_CLOSE_PAREN { $$ = $2; } + | T_NOT expr { $$ = expr_alloc_one(E_NOT, $2); } + | expr T_OR expr { $$ = expr_alloc_two(E_OR, $1, $3); } + | expr T_AND expr { $$ = expr_alloc_two(E_AND, $1, $3); } +; + +/* For symbol definitions, selects, etc., where quotes are not accepted */ +nonconst_symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); }; + +symbol: nonconst_symbol + | T_WORD_QUOTE { $$ = sym_lookup($1, SYMBOL_CONST); free($1); } +; + +word_opt: /* empty */ { $$ = NULL; } + | T_WORD + +%% + +void conf_parse(const char *name) +{ + const char *tmp; + struct symbol *sym; + int i; + + zconf_initscan(name); + + sym_init(); + _menu_init(); + + if (getenv("ZCONF_DEBUG")) + yydebug = 1; + yyparse(); + if (yynerrs) + exit(1); + if (!modules_sym) + modules_sym = sym_find( "n" ); + + tmp = rootmenu.prompt->text; + rootmenu.prompt->text = _(rootmenu.prompt->text); + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); + free((char*)tmp); + + menu_finalize(&rootmenu); + for_all_symbols(i, sym) { + if (sym_check_deps(sym)) + yynerrs++; + } + if (yynerrs) + exit(1); + sym_set_change_count(1); +} + +static const char *zconf_tokenname(int token) +{ + switch (token) { + case T_MENU: return "menu"; + case T_ENDMENU: return "endmenu"; + case T_CHOICE: return "choice"; + case T_ENDCHOICE: return "endchoice"; + case T_IF: return "if"; + case T_ENDIF: return "endif"; + case T_DEPENDS: return "depends"; + case T_VISIBLE: return "visible"; + } + return ""; +} + +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken) +{ + if (id->token != endtoken) { + zconf_error("unexpected '%s' within %s block", + id->name, zconf_tokenname(starttoken)); + yynerrs++; + return false; + } + if (current_menu->file != current_file) { + zconf_error("'%s' in different file than '%s'", + id->name, zconf_tokenname(starttoken)); + fprintf(stderr, "%s:%d: location of the '%s'\n", + current_menu->file->name, current_menu->lineno, + zconf_tokenname(starttoken)); + yynerrs++; + return false; + } + return true; +} + +static void zconfprint(const char *err, ...) +{ + va_list ap; + + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconf_error(const char *err, ...) +{ + va_list ap; + + yynerrs++; + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void yyerror(const char *err) +{ + fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); +} + +static void print_quoted_string(FILE *out, const char *str) +{ + const char *p; + int len; + + putc('"', out); + while ((p = strchr(str, '"'))) { + len = p - str; + if (len) + fprintf(out, "%.*s", len, str); + fputs("\\\"", out); + str = p + 1; + } + fputs(str, out); + putc('"', out); +} + +static void print_symbol(FILE *out, struct menu *menu) +{ + struct symbol *sym = menu->sym; + struct property *prop; + + if (sym_is_choice(sym)) + fprintf(out, "\nchoice\n"); + else + fprintf(out, "\nconfig %s\n", sym->name); + switch (sym->type) { + case S_BOOLEAN: + fputs(" bool\n", out); + break; + case S_TRISTATE: + fputs(" tristate\n", out); + break; + case S_STRING: + fputs(" string\n", out); + break; + case S_INT: + fputs(" integer\n", out); + break; + case S_HEX: + fputs(" hex\n", out); + break; + default: + fputs(" ???\n", out); + break; + } + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + switch (prop->type) { + case P_PROMPT: + fputs(" prompt ", out); + print_quoted_string(out, prop->text); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_DEFAULT: + fputs( " default ", out); + expr_fprint(prop->expr, out); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_CHOICE: + fputs(" #choice value\n", out); + break; + case P_SELECT: + fputs( " select ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_IMPLY: + fputs( " imply ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_RANGE: + fputs( " range ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_MENU: + fputs( " menu ", out); + print_quoted_string(out, prop->text); + fputc('\n', out); + break; + default: + fprintf(out, " unknown prop %d!\n", prop->type); + break; + } + } + if (menu->help) { + int len = strlen(menu->help); + while (menu->help[--len] == '\n') + menu->help[len] = 0; + fprintf(out, " help\n%s\n", menu->help); + } +} + +void zconfdump(FILE *out) +{ + struct property *prop; + struct symbol *sym; + struct menu *menu; + + menu = rootmenu.list; + while (menu) { + if ((sym = menu->sym)) + print_symbol(out, menu); + else if ((prop = menu->prompt)) { + switch (prop->type) { + case P_COMMENT: + fputs("\ncomment ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + case P_MENU: + fputs("\nmenu ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + default: + ; + } + if (!expr_is_yes(prop->visible.expr)) { + fputs(" depends ", out); + expr_fprint(prop->visible.expr, out); + fputc('\n', out); + } + } + + if (menu->list) + menu = menu->list; + else if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->prompt && menu->prompt->type == P_MENU) + fputs("\nendmenu\n", out); + if (menu->next) { + menu = menu->next; + break; + } + } + } +} + +#include "zconf.lex.c" +#include "util.c" +#include "confdata.c" +#include "expr.c" +#include "symbol.c" +#include "menu.c" diff --git a/support/legal-info/README.header b/support/legal-info/README.header new file mode 100644 index 00000000..55996b53 --- /dev/null +++ b/support/legal-info/README.header @@ -0,0 +1,35 @@ +Most of the packages that were used by Buildroot to produce the image files, +including Buildroot itself, have open-source licenses. It is your +responsibility to comply to the requirements of these licenses. +To make this easier for you, Buildroot collected in this directory some +material you may need to get it done. + +This material is composed of the following items. + * The scripts used to control compilation of the packages and the generation + of image files, i.e. the Buildroot sources. + Note: this has not been saved due to technical limitations, you must + collect it manually. + * The Buildroot configuration file; this has been saved in buildroot.config. + * The toolchain (cross-compiler and related tools) used to generate all the + compiled programs. + Note: this may have not been saved due to technical limitations, you may + need to collect it manually. + * The original source code for target packages in the 'sources/' + subdirectory and for host packages in the 'host-sources/' subdirectory + (except for the non-redistributable packages, which have not been + saved). Patches that were applied are also saved, along with a file + named 'series' that lists the patches in the order they were + applied. Patches are under the same license as the files that they + modify in the original package. + Note: Buildroot applies additional patches to Libtool scripts of + autotools-based packages. These patches can be found under + support/libtool in the Buildroot source and, due to technical + limitations, are not saved with the package sources. You may need + to collect them manually. + * Two manifest files listing the configured packages and related + information: 'manifest.csv' for target packages and 'host-manifest.csv' + for host packages. + * The license text of the packages, in the 'licenses/' and + 'host-licenses/' subdirectories for target and host packages + respectively. + diff --git a/support/legal-info/README.warnings-header b/support/legal-info/README.warnings-header new file mode 100644 index 00000000..cd082906 --- /dev/null +++ b/support/legal-info/README.warnings-header @@ -0,0 +1,4 @@ +Due to technical limitations or lack of license definition in the package +makefile, some of the material listed above could not been saved, as the +following list details. + diff --git a/support/legal-info/buildroot.hash b/support/legal-info/buildroot.hash new file mode 100644 index 00000000..1b62dbee --- /dev/null +++ b/support/legal-info/buildroot.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 9755181e27175cb3510b4da8629caa406fb355a19aa8e7d55f06bf8ab33323c4 COPYING diff --git a/support/libtool/buildroot-libtool-v1.5.patch b/support/libtool/buildroot-libtool-v1.5.patch new file mode 100644 index 00000000..cdd9c5a0 --- /dev/null +++ b/support/libtool/buildroot-libtool-v1.5.patch @@ -0,0 +1,91 @@ +--- a/ltmain.sh 2014-07-31 10:43:01.634568799 -0300 ++++ b/ltmain.sh 2014-07-31 10:44:14.032018999 -0300 +@@ -226,8 +226,9 @@ + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" +- $echo "$modename: specify a tag with \`--tag'" 1>&2 +- exit $EXIT_FAILURE ++ $echo "$modename: defaulting to \`CC'" ++ $echo "$modename: if this is not correct, specify a tag with \`--tag'" ++# exit $EXIT_FAILURE + # else + # $echo "$modename: using $tagname tagged configuration" + fi +@@ -247,6 +248,11 @@ + arg="$1" + shift + ++ # Make -static behave as -all-static ++ case $arg in ++ -static) arg="-all-static" ;; ++ esac ++ + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; +@@ -1238,7 +1244,8 @@ + prevarg="$arg" + + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" +@@ -2146,8 +2153,14 @@ + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ # Adding 'libdir' from the .la file to our library search paths ++ # breaks crosscompilation horribly. We cheat here and don't add ++ # it, instead adding the path where we found the .la. -CL ++ dir="$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" ++ #dir="$libdir" ++ #absdir="$libdir" + fi + else + dir="$ladir/$objdir" +@@ -2272,7 +2285,7 @@ + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" +- need_relink=yes ++ need_relink=no + fi + # This is a shared library + +@@ -5169,6 +5182,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` +@@ -5487,10 +5504,13 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- if test "$inst_prefix_dir" = "$destdir"; then +- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 +- exit $EXIT_FAILURE +- fi ++ # ++ # This breaks install into our staging area. -PB ++ # ++ # if test "$inst_prefix_dir" = "$destdir"; then ++ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 ++ # exit $EXIT_FAILURE ++ # fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. diff --git a/support/libtool/buildroot-libtool-v2.2.patch b/support/libtool/buildroot-libtool-v2.2.patch new file mode 100644 index 00000000..8bb78268 --- /dev/null +++ b/support/libtool/buildroot-libtool-v2.2.patch @@ -0,0 +1,106 @@ +--- a/ltmain.sh 2010-06-09 15:08:53.000000000 +0200 ++++ b/ltmain.sh 2014-07-30 22:33:41.176710372 +0200 +@@ -1214,8 +1214,8 @@ + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then +- func_echo "unable to infer tagged configuration" +- func_fatal_error "specify a tag with \`--tag'" ++ func_echo "defaulting to \`CC'" ++ func_echo "if this is not correct, specify a tag with \`--tag'" + # else + # func_verbose "using $tagname tagged configuration" + fi +@@ -2239,8 +2239,11 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- test "$inst_prefix_dir" = "$destdir" && \ +- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" ++ # ++ # This breaks install into our staging area. -PB ++ # ++ # test "$inst_prefix_dir" = "$destdir" && \ ++ # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. +@@ -4429,7 +4432,8 @@ + ;; + -all-static | -static | -static-libtool-libs) + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi +@@ -4438,12 +4442,6 @@ + fi + prefer_static_libs=yes + ;; +- -static) +- if test -z "$pic_flag" && test -n "$link_static_flag"; then +- dlopen_self=$dlopen_self_static +- fi +- prefer_static_libs=built +- ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static +@@ -4726,7 +4724,8 @@ + prevarg="$arg" + + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" +@@ -4995,7 +4994,7 @@ + continue + ;; + +- -static | -static-libtool-libs) ++ -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects +@@ -5739,8 +5738,14 @@ + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ # Adding 'libdir' from the .la file to our library search paths ++ # breaks crosscompilation horribly. We cheat here and don't add ++ # it, instead adding the path where we found the .la. -CL ++ dir="$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" ++ #dir="$libdir" ++ #absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +@@ -5891,7 +5896,7 @@ + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" +- need_relink=yes ++ need_relink=no + fi + ;; + esac +@@ -8373,6 +8378,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + func_basename "$deplib" diff --git a/support/libtool/buildroot-libtool-v2.4.4.patch b/support/libtool/buildroot-libtool-v2.4.4.patch new file mode 100644 index 00000000..bcdf30c7 --- /dev/null +++ b/support/libtool/buildroot-libtool-v2.4.4.patch @@ -0,0 +1,95 @@ +Libtool fixes for cross-compilation, many past contributors/authors. +Update based on libtool-2.4.4, useful for 2.4.3 as well but not 2.4.2. + +Signed-off-by: Gustavo Zacarias + +--- a/ltmain.sh 2014-12-16 09:51:23.068441045 -0300 ++++ b/ltmain.sh 2014-12-16 09:57:10.509430339 -0300 +@@ -2687,8 +2687,8 @@ + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then +- func_echo "unable to infer tagged configuration" +- func_fatal_error "specify a tag with '--tag'" ++ func_echo "defaulting to \`CC'" ++ func_echo "if this is not correct, specify a tag with \`--tag'" + # else + # func_verbose "using $tagname tagged configuration" + fi +@@ -4277,8 +4277,12 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- test "$inst_prefix_dir" = "$destdir" && \ +- func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" ++ ++ # ++ # This breaks install into our staging area. -PB ++ # ++ #test "$inst_prefix_dir" = "$destdir" && \ ++ # func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. +@@ -6550,7 +6554,8 @@ + ;; + -all-static | -static | -static-libtool-libs) + case $arg in +- -all-static) ++ # Make -static behave like -all-static -GZ ++ -all-static | -static) + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi +@@ -6559,12 +6564,6 @@ + fi + prefer_static_libs=yes + ;; +- -static) +- if test -z "$pic_flag" && test -n "$link_static_flag"; then +- dlopen_self=$dlopen_self_static +- fi +- prefer_static_libs=built +- ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static +@@ -6858,7 +6857,8 @@ + prevarg=$arg + + case $arg in +- -all-static) ++ # Make -static behave like -all-static -GZ ++ -all-static | -static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" +@@ -7149,7 +7149,7 @@ + continue + ;; + +- -static | -static-libtool-libs) ++ -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects +@@ -8112,7 +8112,7 @@ + *) + if test no = "$installed"; then + func_append notinst_deplibs " $lib" +- need_relink=yes ++ need_relink=no + fi + ;; + esac +@@ -10710,6 +10710,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + func_basename "$deplib" diff --git a/support/libtool/buildroot-libtool-v2.4.patch b/support/libtool/buildroot-libtool-v2.4.patch new file mode 100644 index 00000000..f610b1b3 --- /dev/null +++ b/support/libtool/buildroot-libtool-v2.4.patch @@ -0,0 +1,89 @@ +--- a/ltmain.sh 2014-07-30 22:21:24.664684143 +0200 ++++ b/ltmain.sh 2014-07-30 22:23:02.440687625 +0200 +@@ -1417,8 +1417,8 @@ + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then +- func_echo "unable to infer tagged configuration" +- func_fatal_error "specify a tag with \`--tag'" ++ func_echo "defaulting to \`CC'" ++ func_echo "if this is not correct, specify a tag with \`--tag'" + # else + # func_verbose "using $tagname tagged configuration" + fi +@@ -2963,8 +2963,11 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- test "$inst_prefix_dir" = "$destdir" && \ +- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" ++ # ++ # This breaks install into our staging area. -PB ++ # ++ # test "$inst_prefix_dir" = "$destdir" && \ ++ # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. +@@ -5176,7 +5179,8 @@ + ;; + -all-static | -static | -static-libtool-libs) + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi +@@ -5185,12 +5189,6 @@ + fi + prefer_static_libs=yes + ;; +- -static) +- if test -z "$pic_flag" && test -n "$link_static_flag"; then +- dlopen_self=$dlopen_self_static +- fi +- prefer_static_libs=built +- ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static +@@ -5473,7 +5471,8 @@ + prevarg="$arg" + + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" +@@ -5754,7 +5753,7 @@ + continue + ;; + +- -static | -static-libtool-libs) ++ -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects +@@ -6697,7 +6696,7 @@ + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" +- need_relink=yes ++ need_relink=no + fi + ;; + esac +@@ -9275,6 +9274,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + func_basename "$deplib" diff --git a/support/misc/Buildroot.cmake b/support/misc/Buildroot.cmake new file mode 100644 index 00000000..761b6d7a --- /dev/null +++ b/support/misc/Buildroot.cmake @@ -0,0 +1,8 @@ +# Impersonate a Linux system. Afterall, that's what we are... +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM ${CMAKE_SYSTEM_NAME}) +include(Platform/Linux) + +# Override problematic settings, to avoid RPATH against host lib directories. +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS FALSE) +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE) diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile new file mode 100644 index 00000000..f0d1e788 --- /dev/null +++ b/support/misc/Vagrantfile @@ -0,0 +1,60 @@ +################################################################################ +# +# Vagrantfile +# +################################################################################ + +# Buildroot version to use +RELEASE='2021.02.4' + +### Change here for more memory/cores ### +VM_MEMORY=2048 +VM_CORES=1 + +Vagrant.configure('2') do |config| + config.vm.box = 'ubuntu/bionic64' + + config.vm.provider :vmware_fusion do |v, override| + v.vmx['memsize'] = VM_MEMORY + v.vmx['numvcpus'] = VM_CORES + end + + config.vm.provider :virtualbox do |v, override| + v.memory = VM_MEMORY + v.cpus = VM_CORES + + required_plugins = %w( vagrant-vbguest ) + required_plugins.each do |plugin| + system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin + end + end + + config.vm.provision 'shell' do |s| + s.inline = 'echo Setting up machine name' + + config.vm.provider :vmware_fusion do |v, override| + v.vmx['displayname'] = "Buildroot #{RELEASE}" + end + + config.vm.provider :virtualbox do |v, override| + v.name = "Buildroot #{RELEASE}" + end + end + + config.vm.provision 'shell', privileged: true, inline: + "sed -i 's|deb http://us.archive.ubuntu.com/ubuntu/|deb mirror://mirrors.ubuntu.com/mirrors.txt|g' /etc/apt/sources.list + dpkg --add-architecture i386 + apt-get -q update + apt-get purge -q -y snapd lxcfs lxd ubuntu-core-launcher snap-confine + apt-get -q -y install build-essential libncurses5-dev \ + git bzr cvs mercurial subversion libc6:i386 unzip bc + apt-get -q -y autoremove + apt-get -q -y clean + update-locale LC_ALL=C" + + config.vm.provision 'shell', privileged: false, inline: + "echo 'Downloading and extracting buildroot #{RELEASE}' + wget -q -c http://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz + tar axf buildroot-#{RELEASE}.tar.gz" + +end diff --git a/support/misc/gitlab-ci.yml.in b/support/misc/gitlab-ci.yml.in new file mode 100644 index 00000000..fcfff5c6 --- /dev/null +++ b/support/misc/gitlab-ci.yml.in @@ -0,0 +1,78 @@ +.check-DEVELOPERS_base: + # get-developers should print just "No action specified"; if it prints + # anything else, it's a parse error. + # The initial ! is removed by YAML so we need to quote it. + script: + - "! utils/get-developers | grep -v 'No action specified'" + +.check-flake8_base: + script: + - make check-flake8 + +.check-package_base: + script: + - make check-package + +.defconfig_check: + before_script: + - DEFCONFIG_NAME=$(echo ${CI_JOB_NAME} | sed -e 's,_check$,,g') + script: + - echo "Configure Buildroot for ${DEFCONFIG_NAME}" + - make ${DEFCONFIG_NAME} + - support/scripts/check-dotconfig.py .config configs/${DEFCONFIG_NAME} + artifacts: + when: on_failure + expire_in: 2 weeks + paths: + - .config + +.defconfig_base: + before_script: + - DEFCONFIG_NAME=${CI_JOB_NAME} + script: + - echo "Configure Buildroot for ${DEFCONFIG_NAME}" + - make ${DEFCONFIG_NAME} + - ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME} + - echo 'Build buildroot' + - | + make > >(tee build.log |grep '>>>') 2>&1 || { + echo 'Failed build last output' + tail -200 build.log + exit 1 + } + - | + ./support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || { + echo 'Failed runtime test last output' + tail -200 runtime-test.log + exit 1 + } + artifacts: + when: always + expire_in: 2 weeks + paths: + - .config + - build.log + - output/images/ + - output/build/build-time.log + - output/build/packages-file-list.txt + - output/build/*/.config + - runtime-test.log + +.runtime_test_base: + before_script: + - TEST_CASE_NAME=${CI_JOB_NAME} + # Keep build directories so the rootfs can be an artifact of the job. The + # runner will clean up those files for us. + # Multiply every emulator timeout by 10 to avoid sporadic failures in + # elastic runners. + script: + - echo "Starting runtime test ${TEST_CASE_NAME}" + - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME} + artifacts: + when: always + expire_in: 2 weeks + paths: + - test-output/*.log + - test-output/*/.config + - test-output/*/images/* + diff --git a/support/misc/relocate-sdk.sh b/support/misc/relocate-sdk.sh new file mode 100755 index 00000000..caabeaa6 --- /dev/null +++ b/support/misc/relocate-sdk.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# +if [ "$#" -ne 0 ]; then + echo "Run this script to relocate the buildroot SDK at that location" + exit 1 +fi + +LOCFILE="share/buildroot/sdk-location" +FILEPATH="$(readlink -f "$0")" +NEWPATH="$(dirname "${FILEPATH}")" + +cd "${NEWPATH}" +if [ ! -r "${LOCFILE}" ]; then + echo "Previous location of the buildroot SDK not found!" + exit 1 +fi +OLDPATH="$(cat "${LOCFILE}")" + +if [ "${NEWPATH}" = "${OLDPATH}" ]; then + echo "This buildroot SDK has already been relocated!" + exit 0 +fi + +# Check if the path substitution does work properly, e.g. a tree +# "/a/b/c" copied into "/a/b/c/a/b/c/" would not be allowed. +newpath="$(sed -e "s|${OLDPATH}|${NEWPATH}|g" "${LOCFILE}")" +if [ "${NEWPATH}" != "${newpath}" ]; then + echo "Something went wrong with substituting the path!" + echo "Please choose another location for your SDK!" + exit 1 +fi + +echo "Relocating the buildroot SDK from ${OLDPATH} to ${NEWPATH} ..." + +# Make sure file uses the right language +export LC_ALL=C +# Replace the old path with the new one in all text files +grep -lr "${OLDPATH}" . | while read -r FILE ; do + if file -b --mime-type "${FILE}" | grep -q '^text/' && [ "${FILE}" != "${LOCFILE}" ] + then + sed -i "s|${OLDPATH}|${NEWPATH}|g" "${FILE}" + fi +done + +# At the very end, we update the location file to not break the +# SDK if this script gets interruted. +sed -i "s|${OLDPATH}|${NEWPATH}|g" ${LOCFILE} diff --git a/support/misc/target-dir-warning.txt b/support/misc/target-dir-warning.txt new file mode 100644 index 00000000..94d2e0c0 --- /dev/null +++ b/support/misc/target-dir-warning.txt @@ -0,0 +1,29 @@ +Warning! +======== + +This directory does *not* contain the root filesystem that you can use +on your embedded system. Since Buildroot does not run as root, it +cannot create device files and set the permissions and ownership of +files correctly in this directory to make it usable as a root +filesystem. + +For that reason, do *not* use the contents of this directory to mount +your root filesystem over NFS or copy the contents of this directory +to a SD card or USB key, thinking it will work as the root filesystem +for your embedded system. It will simply *not* work. + +Instead, if you need a usable root filesystem, please select one of +the filesystem image formats available in the Buildroot configuration +interface (make menuconfig or others) in the "Filesystem images" +sub-menu. If you want to get a filesystem image that you can easily +extract to your SD card or to some directory exposed through NFS, +please use the "tar the root filesystem" option. It will generate a +images/rootfs.tar image in your Buildroot output directory, which you +can extract as root: + + sudo tar -C /destination/of/extraction -xf images/rootfs.tar + +Those image files are created using the contents of the target/ +directory, but there is a post-processing step to create device files +and set ownership/permissions properly even if Buildroot does not run +as root. diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in new file mode 100644 index 00000000..be575566 --- /dev/null +++ b/support/misc/toolchainfile.cmake.in @@ -0,0 +1,73 @@ +# +# Automatically generated file; DO NOT EDIT. +# CMake toolchain file for Buildroot +# + +# In order to allow the toolchain to be relocated, we calculate the +# HOST_DIR based on this file's location: $(HOST_DIR)/share/buildroot +# and store it in RELOCATED_HOST_DIR. +# All the other variables that need to refer to HOST_DIR will use the +# RELOCATED_HOST_DIR variable. +string(REPLACE "/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST_DIR}) + +# Point cmake to the location where we have our custom modules, +# so that it can find our custom platform description. +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(CMAKE_SYSTEM_NAME Buildroot) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR @@CMAKE_SYSTEM_PROCESSOR@@) + +# Set the {C,CXX}FLAGS appended by CMake depending on the build type +# defined by Buildroot. CMake defaults these variables with -g and/or +# -O options, and they are appended at the end of the argument list, +# so the Buildroot options are overridden. Therefore these variables +# have to be cleared, so that the options passed in CMAKE_C_FLAGS do +# apply. +# +# Note: +# if the project forces some of these flag variables, Buildroot is +# screwed up and there is nothing Buildroot can do about that :( +set(CMAKE_C_FLAGS_DEBUG "" CACHE STRING "Debug CFLAGS") +set(CMAKE_C_FLAGS_RELEASE " -DNDEBUG" CACHE STRING "Release CFLAGS") + +# Build type from the Buildroot configuration +set(CMAKE_BUILD_TYPE @@CMAKE_BUILD_TYPE@@ CACHE STRING "Buildroot build configuration") + +# Buildroot defaults flags. +# If you are using this toolchainfile.cmake file outside of Buildroot and +# want to customize the compiler/linker flags, then: +# * set them all on the cmake command line, e.g.: +# cmake -DCMAKE_C_FLAGS="@@TARGET_CFLAGS@@ -Dsome_custom_flag" ... +# * and make sure the project's CMake code extends them like this if needed: +# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dsome_definitions") +set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@" CACHE STRING "Buildroot CFLAGS") +set(CMAKE_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@" CACHE STRING "Buildroot LDFLAGS for executables") +set(CMAKE_SHARED_LINKER_FLAGS "@@TARGET_LDFLAGS@@" CACHE STRING "Buildroot LDFLAGS for shared libraries") +set(CMAKE_MODULE_LINKER_FLAGS "@@TARGET_LDFLAGS@@" CACHE STRING "Buildroot LDFLAGS for module libraries") + +set(CMAKE_INSTALL_SO_NO_EXE 0) + +set(CMAKE_PROGRAM_PATH "${RELOCATED_HOST_DIR}/bin") +set(CMAKE_SYSROOT "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@") +set(CMAKE_FIND_ROOT_PATH "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@") +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@") + +# This toolchain file can be used both inside and outside Buildroot. +set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC@@") +if(@@TOOLCHAIN_HAS_CXX@@) + set(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "Debug CXXFLAGS") + set(CMAKE_CXX_FLAGS_RELEASE " -DNDEBUG" CACHE STRING "Release CXXFLAGS") + set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@" CACHE STRING "Buildroot CXXFLAGS") + set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX@@") +endif() +if(@@TOOLCHAIN_HAS_FORTRAN@@) + set(CMAKE_Fortran_FLAGS_DEBUG "" CACHE STRING "Debug Fortran FLAGS") + set(CMAKE_Fortran_FLAGS_RELEASE " -DNDEBUG" CACHE STRING "Release Fortran FLAGS") + set(CMAKE_Fortran_FLAGS "@@TARGET_FCFLAGS@@" CACHE STRING "Buildroot FCFLAGS") + set(CMAKE_Fortran_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_FC@@") +endif() diff --git a/support/misc/utils.mk b/support/misc/utils.mk new file mode 100644 index 00000000..dc60cad9 --- /dev/null +++ b/support/misc/utils.mk @@ -0,0 +1,137 @@ +################################################################################ +# +# This file contains various utility macros and variables used about +# everywhere in make constructs. +# +################################################################################ + +# Strip quotes and then whitespaces +qstrip = $(strip $(subst ",,$(1))) +#")) + +# Variables for use in Make constructs +comma := , +empty := +space := $(empty) $(empty) + +# make 4.3: +# https://lwn.net/Articles/810071/ +# Number signs (#) appearing inside a macro reference or function invocation +# no longer introduce comments and should not be escaped with backslashes: +# thus a call such as: +# foo := $(shell echo '#') +# is legal. Previously the number sign needed to be escaped, for example: +# foo := $(shell echo '\#') +# Now this latter will resolve to "\#". If you want to write makefiles +# portable to both versions, assign the number sign to a variable: +# H := \# +# foo := $(shell echo '$H') +SHARP_SIGN := \# + +# Case conversion macros. This is inspired by the 'up' macro from gmsl +# (http://gmsl.sf.net). It is optimised very heavily because these macros +# are used a lot. It is about 5 times faster than forking a shell and tr. +# +# The caseconvert-helper creates a definition of the case conversion macro. +# After expansion by the outer $(eval ), the UPPERCASE macro is defined as: +# $(strip $(eval __tmp := $(1)) $(eval __tmp := $(subst a,A,$(__tmp))) ... ) +# In other words, every letter is substituted one by one. +# +# The caseconvert-helper allows us to create this definition out of the +# [FROM] and [TO] lists, so we don't need to write down every substition +# manually. The uses of $ and $$ quoting are chosen in order to do as +# much expansion as possible up-front. +# +# Note that it would be possible to conceive a slightly more optimal +# implementation that avoids the use of __tmp, but that would be even +# more unreadable and is not worth the effort. + +[FROM] := a b c d e f g h i j k l m n o p q r s t u v w x y z - . +[TO] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _ + +define caseconvert-helper +$(1) = $$(strip \ + $$(eval __tmp := $$(1))\ + $(foreach c, $(2),\ + $$(eval __tmp := $$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),$$(__tmp))))\ + $$(__tmp)) +endef + +$(eval $(call caseconvert-helper,UPPERCASE,$(join $(addsuffix :,$([FROM])),$([TO])))) +$(eval $(call caseconvert-helper,LOWERCASE,$(join $(addsuffix :,$([TO])),$([FROM])))) + +# Reverse the orders of words in a list. Again, inspired by the gmsl +# 'reverse' macro. +reverse = $(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1))) $(firstword $(1))) + +# Sanitize macro cleans up generic strings so it can be used as a filename +# and in rules. Particularly useful for VCS version strings, that can contain +# slashes, colons (OK in filenames but not in rules), and spaces. +sanitize = $(subst $(space),_,$(subst :,_,$(subst /,_,$(strip $(1))))) + +# MESSAGE Macro -- display a message in bold type +MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(call qstrip,$(1))$(TERM_RESET)" +TERM_BOLD := $(shell tput smso 2>/dev/null) +TERM_RESET := $(shell tput rmso 2>/dev/null) + +# Utility functions for 'find' +# findfileclauses(filelist) => -name 'X' -o -name 'Y' +findfileclauses = $(call notfirstword,$(patsubst %,-o -name '%',$(1))) +# finddirclauses(base, dirlist) => -path 'base/dirX' -o -path 'base/dirY' +finddirclauses = $(call notfirstword,$(patsubst %,-o -path '$(1)/%',$(2))) + +# Miscellaneous utility functions +# notfirstword(wordlist): returns all but the first word in wordlist +notfirstword = $(wordlist 2,$(words $(1)),$(1)) + +# build a comma-separated list of quoted items, from a space-separated +# list of unquoted items: a b c d --> "a", "b", "c", "d" +make-comma-list = $(subst $(space),$(comma)$(space),$(patsubst %,"%",$(strip $(1)))) + +# build a comma-separated list of single quoted items, from a space-separated +# list of unquoted items: a b c d --> 'a', 'b', 'c', 'd' +make-sq-comma-list = $(subst $(space),$(comma)$(space),$(patsubst %,'%',$(strip $(1)))) + +# Needed for the foreach loops to loop over the list of hooks, so that +# each hook call is properly separated by a newline. +define sep + + +endef + +PERCENT = % +QUOTE = ' +# ' # Meh... syntax-highlighting + +# This macro properly escapes a command string, then prints it with printf: +# +# - first, backslash '\' are self-escaped, so that they do not escape +# the following char and so that printf properly outputs a backslash; +# +# - next, single quotes are escaped by closing an existing one, adding +# an escaped one, and re-openning a new one (see below for the reason); +# +# - then '%' signs are self-escaped so that the printf does not interpret +# them as a format specifier, in case the variable contains an actual +# printf with a format; +# +# - finally, $(sep) is replaced with the literal '\n' so that make does +# not break on the so-expanded variable, but so that the printf does +# correctly output an LF. +# +# Note: this must be escaped in this order to avoid over-escaping the +# previously escaped elements. +# +# Once everything has been escaped, it is passed between single quotes +# (that's why the single-quotes are escaped they way they are, above, +# and why the dollar sign is not escaped) to printf(1). A trailing +# newline is apended, too. +# +# Note: leading or trailing spaces are *not* stripped. +# +define PRINTF + printf '$(subst $(sep),\n,\ + $(subst $(PERCENT),$(PERCENT)$(PERCENT),\ + $(subst $(QUOTE),$(QUOTE)\$(QUOTE)$(QUOTE),\ + $(subst \,\\,$(1)))))\n' +endef diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh new file mode 100755 index 00000000..9fb488c5 --- /dev/null +++ b/support/scripts/apply-patches.sh @@ -0,0 +1,170 @@ +#!/usr/bin/env bash +# A little script I whipped up to make it easy to +# patch source trees and have sane error handling +# -Erik +# +# (c) 2002 Erik Andersen +# +# Parameters: +# - "-s", optional. Silent operation, don't print anything if there +# isn't any error. +# - the build directory, optional, default value is '.'. The place where are +# the package sources. +# - the patch directory, optional, default '../kernel-patches'. The place +# where are the scripts you want to apply. +# - other parameters are the patch name patterns, optional, default value is +# '*'. Pattern(s) describing the patch names you want to apply. +# +# The script will look recursively for patches from the patch directory. If a +# file named 'series' exists then the patches mentioned in it will be applied +# as plain patches, regardless of their file name. If no 'series' file exists, +# the script will look for file names matching pattern(s). If the name +# ends with '.tar.*', '.tbz2' or '.tgz', the file is considered as an archive +# and will be uncompressed into a directory named +# '.patches-name_of_the_archive-unpacked'. It's the turn of this directory to +# be scanned with '*' as pattern. Remember that scanning is recursive. Other +# files than series file and archives are considered as a patch. +# +# Once a patch is found, the script will try to apply it. If its name doesn't +# end with '.gz', '.bz', '.bz2', '.xz', '.zip', '.Z', '.diff*' or '.patch*', +# it will be skipped. If necessary, the patch will be uncompressed before being +# applied. The list of the patches applied is stored in '.applied_patches_list' +# file in the build directory. + +set -e + +silent= +if [ "$1" = "-s" ] ; then + # add option to be used by the patch tool + silent=-s + shift +fi + +# Set directories from arguments, or use defaults. +builddir=${1-.} +patchdir=${2-../kernel-patches} +shift 2 +patchpattern=${@-*} + +# use a well defined sorting order +export LC_COLLATE=C + +if [ ! -d "${builddir}" ] ; then + echo "Aborting. '${builddir}' is not a directory." + exit 1 +fi +if [ ! -d "${patchdir}" ] ; then + echo "Aborting. '${patchdir}' is not a directory." + exit 1 +fi + +# Remove any rejects present BEFORE patching - Because if there are +# any, even if patches are well applied, at the end it will complain +# about rejects in builddir. +find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \ + xargs -0 -r rm -f + +function apply_patch { + path="${1%%/}" + patch="${2}" + case "${path}" in + /*) ;; + *) path="$PWD/${path}";; + esac + if [ "$3" ]; then + type="series"; uncomp="cat" + else + case "$patch" in + *.gz) + type="gzip"; uncomp="gunzip -dc"; ;; + *.bz) + type="bzip"; uncomp="bunzip -dc"; ;; + *.bz2) + type="bzip2"; uncomp="bunzip2 -dc"; ;; + *.xz) + type="xz"; uncomp="unxz -dc"; ;; + *.zip) + type="zip"; uncomp="unzip -d"; ;; + *.Z) + type="compress"; uncomp="uncompress -c"; ;; + *.diff*) + type="diff"; uncomp="cat"; ;; + *.patch*) + type="patch"; uncomp="cat"; ;; + *) + echo "Unsupported file type for ${path}/${patch}, skipping"; + return 0 + ;; + esac + fi + if [ -z "$silent" ] ; then + echo "" + echo "Applying $patch using ${type}: " + fi + if [ ! -e "${path}/$patch" ] ; then + echo "Error: missing patch file ${path}/$patch" + exit 1 + fi + existing="$(grep -E "/${patch}\$" ${builddir}/.applied_patches_list || true)" + if [ -n "${existing}" ]; then + echo "Error: duplicate filename '${patch}'" + echo "Conflicting files are:" + echo " already applied: ${existing}" + echo " to be applied : ${path}/${patch}" + exit 1 + fi + if ${uncomp} "${path}/$patch" | grep -q "^rename from" && \ + ${uncomp} "${path}/$patch" | grep -q "^rename to" ; then + echo "Error: patch contains some renames, not supported by old patch versions" + exit 1 + fi + echo "${path}/${patch}" >> ${builddir}/.applied_patches_list + ${uncomp} "${path}/$patch" | patch -g0 -p1 -E --no-backup-if-mismatch -d "${builddir}" -t -N $silent + if [ $? != 0 ] ; then + echo "Patch failed! Please fix ${patch}!" + exit 1 + fi +} + +function scan_patchdir { + local path=$1 + shift 1 + patches=${@-*} + + # If there is a series file, use it instead of using ls sort order + # to apply patches. Skip line starting with a dash. + if [ -e "${path}/series" ] ; then + # The format of a series file accepts a second field that is + # used to specify the number of directory components to strip + # when applying the patch, in the form -pN (N an integer >= 0) + # We assume this field to always be -p1 whether it is present + # or missing. + series_patches="`grep -Ev "^#" ${path}/series | cut -d ' ' -f1 2> /dev/null`" + for i in $series_patches; do + apply_patch "$path" "$i" series + done + else + for i in `cd $path; ls -d $patches 2> /dev/null` ; do + if [ -d "${path}/$i" ] ; then + scan_patchdir "${path}/$i" + elif echo "$i" | grep -q -E "\.tar(\..*)?$|\.tbz2?$|\.tgz$" ; then + unpackedarchivedir="$builddir/.patches-$(basename $i)-unpacked" + rm -rf "$unpackedarchivedir" 2> /dev/null + mkdir "$unpackedarchivedir" + tar -C "$unpackedarchivedir" -xaf "${path}/$i" + scan_patchdir "$unpackedarchivedir" + else + apply_patch "$path" "$i" + fi + done + fi +} + +touch ${builddir}/.applied_patches_list +scan_patchdir "$patchdir" "$patchpattern" + +# Check for rejects... +if [ "`find $builddir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then + echo "Aborting. Reject files found." + exit 1 +fi diff --git a/support/scripts/boot-qemu-image.py b/support/scripts/boot-qemu-image.py new file mode 100755 index 00000000..0d4ad825 --- /dev/null +++ b/support/scripts/boot-qemu-image.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 + +# This script expect to run from the Buildroot top directory. + +import os +import pexpect +import sys +import time + + +def main(): + if not (len(sys.argv) == 2): + print("Error: incorrect number of arguments") + print("""Usage: boot-qemu-image.py """) + sys.exit(1) + + # Ignore non Qemu defconfig + if not sys.argv[1].startswith('qemu_'): + sys.exit(0) + + if not os.path.exists('output/images/start-qemu.sh'): + print('qemu-start.sh is missing, cannot test.') + sys.exit(0) + + qemu_start = os.path.join(os.getcwd(), 'output/images/start-qemu.sh') + + child = pexpect.spawn(qemu_start, ['serial-only'], + timeout=5, encoding='utf-8', + env={"QEMU_AUDIO_DRV": "none"}) + + # We want only stdout into the log to avoid double echo + child.logfile = sys.stdout + + # Let the spawn actually try to fork+exec to the wrapper, and then + # let the wrapper exec the qemu process. + time.sleep(1) + + try: + child.expect(["buildroot login:"], timeout=60) + except pexpect.EOF as e: + # Some emulations require a fork of qemu-system, which may be + # missing on the system, and is not provided by Buildroot. + # In this case, spawn above will succeed at starting the wrapper + # start-qemu.sh, but that one will fail (exit with 127) in such + # a situation. + exit = [int(l.split(' ')[1]) + for l in e.value.splitlines() + if l.startswith('exitstatus: ')] + if len(exit) and exit[0] == 127: + print('qemu-start.sh could not find the qemu binary') + sys.exit(0) + print("Connection problem, exiting.") + sys.exit(1) + except pexpect.TIMEOUT: + print("System did not boot in time, exiting.") + sys.exit(1) + + child.sendline("root\r") + + try: + child.expect(["# "], timeout=60) + except pexpect.EOF: + print("Cannot connect to shell") + sys.exit(1) + except pexpect.TIMEOUT: + print("Timeout while waiting for shell") + sys.exit(1) + + child.sendline("poweroff\r") + + try: + child.expect(["System halted"], timeout=60) + child.expect(pexpect.EOF) + except pexpect.EOF: + pass + except pexpect.TIMEOUT: + # Qemu may not exit properly after "System halted", ignore. + print("Cannot halt machine") + + sys.exit(0) + + +if __name__ == "__main__": + main() diff --git a/support/scripts/br2-external b/support/scripts/br2-external new file mode 100755 index 00000000..56dc6f53 --- /dev/null +++ b/support/scripts/br2-external @@ -0,0 +1,253 @@ +#!/usr/bin/env bash +set -e + +# This script must be able to run with bash-3.1, so it can't use +# associative arrays. Instead, it emulates them using 'eval'. It +# can however use indexed arrays, supported since at least bash-3.0. + +# The names of the br2-external trees, once validated. +declare -a BR2_EXT_NAMES + +# URL to manual for help in converting old br2-external trees. +# Escape '#' so that make does not consider it a comment. +MANUAL_URL='https://buildroot.org/manual.html\#br2-external-converting' + +main() { + local OPT OPTARG + local br2_ext outputdir + + while getopts :d: OPT; do + case "${OPT}" in + d) outputdir="${OPTARG}";; + :) error "option '%s' expects a mandatory argument\n" "${OPTARG}";; + \?) error "unknown option '%s'\n" "${OPTARG}";; + esac + done + # Forget options; keep only positional args + shift $((OPTIND-1)) + + if [ -z "${outputdir}" ]; then + error "no output directory specified (-d)\n" + fi + + # Trap any unexpected error to generate a meaningful error message + trap "error 'unexpected error while generating ${ofile}\n'" ERR + + mkdir -p "${outputdir}" + do_validate "${outputdir}" ${@//:/ } + do_mk "${outputdir}" + do_kconfig "${outputdir}" +} + +# Validates the br2-external trees passed as arguments. Makes each of +# them canonical and store them in the global arrays BR2_EXT_NAMES +# and BR2_EXT_PATHS. +# +# Note: since this script is always first called from Makefile context +# to generate the Makefile fragment before it is called to generate the +# Kconfig snippet, we're sure that any error in do_validate will be +# interpreted in Makefile context. Going up to generating the Kconfig +# snippet means that there were no error. +# +do_validate() { + local outputdir="${1}" + local br2_ext + shift + + if [ ${#} -eq 0 ]; then + # No br2-external tree is valid + return + fi + + for br2_ext in "${@}"; do + do_validate_one "${br2_ext}" + done >"${outputdir}/.br2-external.mk" +} + +do_validate_one() { + local br2_ext="${1}" + local br2_name br2_desc n d + + if [ ! -d "${br2_ext}" ]; then + error "'%s': no such file or directory\n" "${br2_ext}" + fi + if [ ! -r "${br2_ext}" -o ! -x "${br2_ext}" ]; then + error "'%s': permission denied\n" "${br2_ext}" + fi + if [ ! -f "${br2_ext}/external.desc" ]; then + error "'%s': does not have an 'external.desc'. See %s\n" \ + "${br2_ext}" "${MANUAL_URL}" + fi + br2_name="$(sed -r -e '/^name: +(.*)$/!d; s//\1/' "${br2_ext}/external.desc")" + if [ -z "${br2_name}" ]; then + error "'%s/external.desc': does not define the name\n" "${br2_ext}" + fi + # Only ASCII chars in [A-Za-z0-9_] are permitted + n="$(sed -r -e 's/[A-Za-z0-9_]//g' <<<"${br2_name}" )" + if [ -n "${n}" ]; then + # Escape '$' so that it gets printed + error "'%s': name '%s' contains invalid chars: '%s'\n" \ + "${br2_ext}" "${br2_name//\$/\$\$}" "${n//\$/\$\$}" + fi + eval d="\"\${BR2_EXT_PATHS_${br2_name}}\"" + if [ -n "${d}" ]; then + error "'%s': name '%s' is already used in '%s'\n" \ + "${br2_ext}" "${br2_name}" "${d}" + fi + br2_desc="$(sed -r -e '/^desc: +(.*)$/!d; s//\1/' "${br2_ext}/external.desc")" + if [ ! -f "${br2_ext}/external.mk" ]; then + error "'%s/external.mk': no such file or directory\n" "${br2_ext}" + fi + if [ ! -f "${br2_ext}/Config.in" ]; then + error "'%s/Config.in': no such file or directory\n" "${br2_ext}" + fi + + # Register this br2-external tree, use an absolute canonical path + br2_ext="$( cd "${br2_ext}"; pwd )" + BR2_EXT_NAMES+=( "${br2_name}" ) + eval BR2_EXT_PATHS_${br2_name}="\"\${br2_ext}\"" + eval BR2_EXT_DESCS_${br2_name}="\"\${br2_desc:-\${br2_name}}\"" +} + +# Generate the .mk snippet that defines makefile variables +# for the br2-external tree +do_mk() { + local outputdir="${1}" + local br2_name br2_desc br2_ext + + { + printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' + printf '\n' + + printf 'BR2_EXTERNAL ?=' + for br2_name in "${BR2_EXT_NAMES[@]}"; do + eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" + printf ' %s' "${br2_ext}" + done + printf '\n' + + printf 'BR2_EXTERNAL_NAMES = \n' + printf 'BR2_EXTERNAL_DIRS = \n' + printf 'BR2_EXTERNAL_MKS = \n' + + if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then + printf '\n' + printf '# No br2-external tree defined.\n' + return + fi + + for br2_name in "${BR2_EXT_NAMES[@]}"; do + eval br2_desc="\"\${BR2_EXT_DESCS_${br2_name}}\"" + eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" + printf '\n' + printf 'BR2_EXTERNAL_NAMES += %s\n' "${br2_name}" + printf 'BR2_EXTERNAL_DIRS += %s\n' "${br2_ext}" + printf 'BR2_EXTERNAL_MKS += %s/external.mk\n' "${br2_ext}" + printf 'export BR2_EXTERNAL_%s_PATH = %s\n' "${br2_name}" "${br2_ext}" + printf 'export BR2_EXTERNAL_%s_DESC = %s\n' "${br2_name}" "${br2_desc}" + done + } >"${outputdir}/.br2-external.mk" +} + +# Generate the kconfig snippets for the br2-external tree. +do_kconfig() { + local outputdir="${1}" + local br2_name br2_desc br2_ext br2 + local -a items + + items=( + paths + menus + toolchains + jpeg + openssl + skeleton + init + ) + + for br2 in "${items[@]}"; do + { + printf '#\n# Automatically generated file; DO NOT EDIT.\n#\n' + printf '\n' + if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then + printf '# No br2-external tree defined.\n' + fi + } >"${outputdir}/.br2-external.in.${br2}" + done + if [ ${#BR2_EXT_NAMES[@]} -eq 0 ]; then + return + fi + + printf 'menu "External options"\n\n' >>"${outputdir}/.br2-external.in.menus" + + for br2_name in "${BR2_EXT_NAMES[@]}"; do + eval br2_desc="\"\${BR2_EXT_DESCS_${br2_name}}\"" + eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\"" + + { + printf 'config BR2_EXTERNAL_%s_PATH\n' "${br2_name}" + printf '\tstring\n' + printf '\tdefault "%s"\n' "${br2_ext}" + printf '\n' + } >>"${outputdir}/.br2-external.in.paths" + + { + if [ ${#BR2_EXT_NAMES[@]} -gt 1 ]; then + printf 'menu "%s"\n' "${br2_desc}" + fi + printf 'comment "%s (in %s)"\n' "${br2_desc}" "${br2_ext}" + printf 'source "%s/Config.in"\n' "${br2_ext}" + if [ ${#BR2_EXT_NAMES[@]} -gt 1 ]; then + printf 'endmenu # %s\n' "${br2_name}" + fi + printf '\n' + } >>"${outputdir}/.br2-external.in.menus" + + if [ -f "${br2_ext}/provides/toolchains.in" ]; then + printf 'comment "Toolchains from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/toolchains.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No toolchain from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.toolchains" + + if [ -f "${br2_ext}/provides/jpeg.in" ]; then + printf 'comment "jpeg from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/jpeg.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No jpeg from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.jpeg" + + if [ -f "${br2_ext}/provides/openssl.in" ]; then + printf 'comment "openssl from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/openssl.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No openssl from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.openssl" + + if [ -f "${br2_ext}/provides/skeleton.in" ]; then + printf 'comment "skeleton from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/skeleton.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No skeleton from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.skeleton" + + if [ -f "${br2_ext}/provides/init.in" ]; then + printf 'comment "init from: %s"\n' "${br2_desc}" + printf 'source "%s/provides/init.in"\n' "${br2_ext}" + printf '\n' + else + printf '# No init from: %s\n\n' "${br2_desc}" + fi >>"${outputdir}/.br2-external.in.init" + done + + printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus" +} + +error() { local fmt="${1}"; shift; printf "BR2_EXTERNAL_ERROR = ${fmt}" "${@}"; exit 1; } + +my_name="${0##*/}" +main "${@}" diff --git a/support/scripts/brpkgutil.py b/support/scripts/brpkgutil.py new file mode 100644 index 00000000..73d8fbe9 --- /dev/null +++ b/support/scripts/brpkgutil.py @@ -0,0 +1,50 @@ +# Copyright (C) 2010-2013 Thomas Petazzoni +# Copyright (C) 2019 Yann E. MORIN + +import json +import logging +import os +import subprocess +from collections import defaultdict + + +# This function returns a tuple of four dictionaries, all using package +# names as keys: +# - a dictionary which values are the lists of packages that are the +# dependencies of the package used as key; +# - a dictionary which values are the lists of packages that are the +# reverse dependencies of the package used as key; +# - a dictionary which values are the type of the package used as key; +# - a dictionary which values are the version of the package used as key, +# 'virtual' for a virtual package, or the empty string for a rootfs. +def get_dependency_tree(): + logging.info("Getting dependency tree...") + + deps = {} + rdeps = defaultdict(list) + types = {} + versions = {} + + # Special case for the 'all' top-level fake package + deps['all'] = [] + types['all'] = 'target' + versions['all'] = '' + + cmd = ["make", "-s", "--no-print-directory", "show-info"] + with open(os.devnull, 'wb') as devnull: + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=devnull, + universal_newlines=True) + pkg_list = json.loads(p.communicate()[0]) + + for pkg in pkg_list: + deps['all'].append(pkg) + types[pkg] = pkg_list[pkg]["type"] + deps[pkg] = pkg_list[pkg].get("dependencies", []) + for p in deps[pkg]: + rdeps[p].append(pkg) + versions[pkg] = \ + None if pkg_list[pkg]["type"] == "rootfs" \ + else "virtual" if pkg_list[pkg]["virtual"] \ + else pkg_list[pkg]["version"] + + return (deps, rdeps, types, versions) diff --git a/support/scripts/check-bin-arch b/support/scripts/check-bin-arch new file mode 100755 index 00000000..27cc59bc --- /dev/null +++ b/support/scripts/check-bin-arch @@ -0,0 +1,96 @@ +#!/usr/bin/env bash + +# List of hardcoded paths that should be ignored, as they may +# contain binaries for an architecture different from the +# architecture of the target. +declare -a IGNORES=( + # Skip firmware files, they could be ELF files for other + # architectures + "/lib/firmware" + "/usr/lib/firmware" + + # Skip kernel modules + # When building a 32-bit userland on 64-bit architectures, the kernel + # and its modules may still be 64-bit. To keep the basic + # check-bin-arch logic simple, just skip this directory. + "/lib/modules" + "/usr/lib/modules" + + # Skip files in /usr/share, several packages (qemu, + # pru-software-support) legitimately install ELF binaries that + # are not for the target architecture + "/usr/share" + + # Skip files in {/usr,}/lib/grub, since it is possible to have + # it for a different architecture (e.g. i386 grub on x86_64). + "/lib/grub" + "/usr/lib/grub" + + # Guile modules are ELF files, with a "None" machine + "/usr/lib/guile" +) + +while getopts p:l:r:a:i: OPT ; do + case "${OPT}" in + p) package="${OPTARG}";; + l) pkg_list="${OPTARG}";; + r) readelf="${OPTARG}";; + a) arch_name="${OPTARG}";; + i) + # Ensure we do have single '/' as separators, + # and that we have a leading and a trailing one. + pattern="$(sed -r -e 's:/+:/:g; s:^/*:/:; s:/*$:/:;' <<<"${OPTARG}")" + IGNORES+=("${pattern}") + ;; + :) error "option '%s' expects a mandatory argument\n" "${OPTARG}";; + \?) error "unknown option '%s'\n" "${OPTARG}";; + esac +done + +if test -z "${package}" -o -z "${pkg_list}" -o -z "${readelf}" -o -z "${arch_name}" ; then + echo "Usage: $0 -p -l -r -a [-i PATH ...]" + exit 1 +fi + +exitcode=0 + +# Only split on new lines, for filenames-with-spaces +IFS=" +" + +while read f; do + for ignore in "${IGNORES[@]}"; do + if [[ "${f}" =~ ^"${ignore}" ]]; then + continue 2 + fi + done + + # Skip symlinks. Some symlinks may have absolute paths as + # target, pointing to host binaries while we're building. + if [[ -L "${TARGET_DIR}/${f}" ]]; then + continue + fi + + # Get architecture using readelf. We pipe through 'head -1' so + # that when the file is a static library (.a), we only take + # into account the architecture of the first object file. + arch=$(LC_ALL=C ${readelf} -h "${TARGET_DIR}/${f}" 2>&1 | \ + sed -r -e '/^ Machine: +(.+)/!d; s//\1/;' | head -1) + + # If no architecture found, assume it was not an ELF file + if test "${arch}" = "" ; then + continue + fi + + # Architecture is correct + if test "${arch}" = "${arch_name}" ; then + continue + fi + + printf 'ERROR: architecture for "%s" is "%s", should be "%s"\n' \ + "${f}" "${arch}" "${arch_name}" + + exitcode=1 +done < <( sed -r -e "/^${package},\.(.+)$/!d; s//\1/;" ${pkg_list} ) + +exit ${exitcode} diff --git a/support/scripts/check-dotconfig.py b/support/scripts/check-dotconfig.py new file mode 100755 index 00000000..f9a416b7 --- /dev/null +++ b/support/scripts/check-dotconfig.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 + +# This scripts check that all lines present in the defconfig are +# still present in the .config + +import sys + + +def main(): + if not (len(sys.argv) == 3): + print("Error: incorrect number of arguments") + print("""Usage: check-dotconfig """) + sys.exit(1) + + configfile = sys.argv[1] + defconfig = sys.argv[2] + + # strip() to get rid of trailing \n + with open(configfile) as configf: + configlines = [l.strip() for l in configf.readlines()] + + defconfiglines = [] + with open(defconfig) as defconfigf: + # strip() to get rid of trailing \n + for line in (line.strip() for line in defconfigf.readlines()): + if line.startswith("BR2_"): + defconfiglines.append(line) + elif line.startswith('# BR2_') and line.endswith(' is not set'): + defconfiglines.append(line) + + # Check that all the defconfig lines are still present + missing = [line for line in defconfiglines if line not in configlines] + + if missing: + print("WARN: defconfig {} can't be used:".format(defconfig)) + for m in missing: + print(" Missing: {}".format(m)) + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath new file mode 100755 index 00000000..9a386698 --- /dev/null +++ b/support/scripts/check-host-rpath @@ -0,0 +1,111 @@ +#!/usr/bin/env bash + +# This script scans $(HOST_DIR)/{bin,sbin} for all ELF files, and checks +# they have an RPATH to $(HOST_DIR)/lib if they need libraries from +# there. + +# Override the user's locale so we are sure we can parse the output of +# readelf(1) and file(1) +export LC_ALL=C + +main() { + local pkg="${1}" + local hostdir="${2}" + local perpackagedir="${3}" + local file ret + + # Remove duplicate and trailing '/' for proper match + hostdir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${hostdir}" )" + + ret=0 + while read file; do + is_elf "${file}" || continue + elf_needs_rpath "${file}" "${hostdir}" || continue + check_elf_has_rpath "${file}" "${hostdir}" "${perpackagedir}" && continue + if [ ${ret} -eq 0 ]; then + ret=1 + printf "***\n" + printf "*** ERROR: package %s installs executables without proper RPATH:\n" "${pkg}" + fi + printf "*** %s\n" "${file}" + done < <( find "${hostdir}"/{bin,sbin} -type f 2>/dev/null ) + + return ${ret} +} + +is_elf() { + local f="${1}" + + readelf -l "${f}" 2>/dev/null \ + |grep -E 'Requesting program interpreter:' >/dev/null 2>&1 +} + +# This function tells whether a given ELF executable (first argument) +# needs a RPATH pointing to the host library directory or not. It +# needs such an RPATH if at least of the libraries used by the ELF +# executable is available in the host library directory. This function +# returns 0 when a RPATH is needed, 1 otherwise. +# +# With per-package directory support, ${hostdir} will point to the +# current package per-package host directory, and this is where this +# function will check if the libraries needed by the executable are +# located (or not). In practice, the ELF executable RPATH may point to +# another package per-package host directory, but that is fine because +# if such an executable is within the current package per-package host +# directory, its libraries will also have been copied into the current +# package per-package host directory. +elf_needs_rpath() { + local file="${1}" + local hostdir="${2}" + local lib + + while read lib; do + [ -e "${hostdir}/lib/${lib}" ] && return 0 + done < <( readelf -d "${file}" \ + |sed -r -e '/^.* \(NEEDED\) .*Shared library: \[(.+)\]$/!d;' \ + -e 's//\1/;' \ + ) + + return 1 +} + +# This function checks whether at least one of the RPATH of the given +# ELF executable (first argument) properly points to the host library +# directory (second argument), either through an absolute RPATH or a +# relative RPATH. In the context of per-package directory support, +# ${hostdir} (second argument) points to the current package host +# directory. However, it is perfectly valid for an ELF binary to have +# a RPATH pointing to another package per-package host directory, +# which is why such RPATH is also accepted (the per-package directory +# gets passed as third argument). Having a RPATH pointing to the host +# directory will make sure the ELF executable will find at runtime the +# shared libraries it depends on. This function returns 0 when a +# proper RPATH was found, or 1 otherwise. +check_elf_has_rpath() { + local file="${1}" + local hostdir="${2}" + local perpackagedir="${3}" + local rpath dir + + while read rpath; do + for dir in ${rpath//:/ }; do + # Remove duplicate and trailing '/' for proper match + dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )" + [ "${dir}" = "${hostdir}/lib" ] && return 0 + [ "${dir}" = "\$ORIGIN/../lib" ] && return 0 + # This check is done even for builds where + # BR2_PER_PACKAGE_DIRECTORIES is disabled. In this case, + # PER_PACKAGE_DIR and therefore ${perpackagedir} points to + # a non-existent directory, and this check will always be + # false. + [[ ${dir} =~ ${perpackagedir}/[^/]+/host/lib ]] && return 0 + done + done < <( readelf -d "${file}" \ + |sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \ + -e 's//\3/;' \ + ) + + return 1 +} + +main "${@}" diff --git a/support/scripts/check-kernel-headers.sh b/support/scripts/check-kernel-headers.sh new file mode 100755 index 00000000..4e6dce54 --- /dev/null +++ b/support/scripts/check-kernel-headers.sh @@ -0,0 +1,69 @@ +#!/bin/sh + +# This script (and the embedded C code) will check that the actual +# headers version match the user told us they were: +# +# - if both versions are the same, all is well. +# +# - if the actual headers are older than the user told us, this is +# an error. +# +# - if the actual headers are more recent than the user told us, and +# we are doing a strict check, then this is an error. +# +# - if the actual headers are more recent than the user told us, and +# we are doing a loose check, then a warning is printed, but this is +# not an error. + +BUILDDIR="${1}" +SYSROOT="${2}" +# Make sure we have enough version components +HDR_VER="${3}.0.0" +CHECK="${4}" # 'strict' or 'loose' + +HDR_M="${HDR_VER%%.*}" +HDR_V="${HDR_VER#*.}" +HDR_m="${HDR_V%%.*}" + +# Exit on any error, so we don't try to run an unexisting program if the +# compilation fails. +set -e + +# Set the clean-up trap in advance to prevent a race condition in which we +# create the file but get a SIGTERM before setting it. Notice that we don't +# need to care about EXEC being empty, since 'rm -f ""' does nothing. +trap 'rm -f "${EXEC}"' EXIT + +EXEC="$(mktemp -p "${BUILDDIR}" -t .check-headers.XXXXXX)" + +# We do not want to account for the patch-level, since headers are +# not supposed to change for different patchlevels, so we mask it out. +# This only applies to kernels >= 3.0, but those are the only one +# we actually care about; we treat all 2.6.x kernels equally. +${HOSTCC} -imacros "${SYSROOT}/usr/include/linux/version.h" \ + -x c -o "${EXEC}" - <<_EOF_ +#include +#include +#include + +int main(int argc __attribute__((unused)), + char** argv __attribute__((unused))) +{ + int l = LINUX_VERSION_CODE & ~0xFF; + int h = KERNEL_VERSION(${HDR_M},${HDR_m},0); + + if ((l >= h) && !strcmp("${CHECK}", "loose")) + return 0; + + if (l != h) { + printf("Incorrect selection of kernel headers: "); + printf("expected %d.%d.x, got %d.%d.x\n", ${HDR_M}, ${HDR_m}, + ((LINUX_VERSION_CODE>>16) & 0xFF), + ((LINUX_VERSION_CODE>>8) & 0xFF)); + return 1; + } + return 0; +} +_EOF_ + +"${EXEC}" diff --git a/support/scripts/check-merged-usr.sh b/support/scripts/check-merged-usr.sh new file mode 100755 index 00000000..433857cd --- /dev/null +++ b/support/scripts/check-merged-usr.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Check if a given custom skeleton or overlay complies to the merged /usr +# requirements: +# / +# /bin -> usr/bin +# /lib -> usr/lib +# /sbin -> usr/sbin +# /usr/bin/ +# /usr/lib/ +# /usr/sbin/ +# +# Output: the list of non-compliant paths (empty if compliant). +# + +# Extract the inode numbers for all of those directories. In case any is +# a symlink, we want to get the inode of the pointed-to directory, so we +# append '/.' to be sure we get the target directory. Since the symlinks +# can be anyway (/bin -> /usr/bin or /usr/bin -> /bin), we do that for +# all of them. +# +lib_inode=$(stat -c '%i' "${1}/lib/." 2>/dev/null) +bin_inode=$(stat -c '%i' "${1}/bin/." 2>/dev/null) +sbin_inode=$(stat -c '%i' "${1}/sbin/." 2>/dev/null) +usr_lib_inode=$(stat -c '%i' "${1}/usr/lib/." 2>/dev/null) +usr_bin_inode=$(stat -c '%i' "${1}/usr/bin/." 2>/dev/null) +usr_sbin_inode=$(stat -c '%i' "${1}/usr/sbin/." 2>/dev/null) + +not_merged_dirs="" +test -z "$lib_inode" || \ + test "$lib_inode" = "$usr_lib_inode" || \ + not_merged_dirs="/lib" +test -z "$bin_inode" || \ + test "$bin_inode" = "$usr_bin_inode" || \ + not_merged_dirs="$not_merged_dirs /bin" +test -z "$sbin_inode" || \ + test "$sbin_inode" = "$usr_sbin_inode" || \ + not_merged_dirs="$not_merged_dirs /sbin" +echo "${not_merged_dirs# }" diff --git a/support/scripts/cpedb.py b/support/scripts/cpedb.py new file mode 100644 index 00000000..f4daf561 --- /dev/null +++ b/support/scripts/cpedb.py @@ -0,0 +1,174 @@ +#!/usr/bin/env python3 + +import xml.etree.ElementTree as ET +from xml.etree.ElementTree import Element, SubElement +import gzip +import os +import requests +import time +from xml.dom import minidom + +VALID_REFS = ['VENDOR', 'VERSION', 'CHANGE_LOG', 'PRODUCT', 'PROJECT', 'ADVISORY'] + +CPEDB_URL = "https://static.nvd.nist.gov/feeds/xml/cpe/dictionary/official-cpe-dictionary_v2.3.xml.gz" + +ns = { + '': 'http://cpe.mitre.org/dictionary/2.0', + 'cpe-23': 'http://scap.nist.gov/schema/cpe-extension/2.3', + 'xml': 'http://www.w3.org/XML/1998/namespace' +} + + +class CPE: + def __init__(self, cpe_str, titles, refs): + self.cpe_str = cpe_str + self.titles = titles + self.references = refs + self.cpe_cur_ver = "".join(self.cpe_str.split(":")[5:6]) + + def update_xml_dict(self): + ET.register_namespace('', 'http://cpe.mitre.org/dictionary/2.0') + cpes = Element('cpe-list') + cpes.set('xmlns:cpe-23', "http://scap.nist.gov/schema/cpe-extension/2.3") + cpes.set('xmlns:ns6', "http://scap.nist.gov/schema/scap-core/0.1") + cpes.set('xmlns:scap-core', "http://scap.nist.gov/schema/scap-core/0.3") + cpes.set('xmlns:config', "http://scap.nist.gov/schema/configuration/0.1") + cpes.set('xmlns:xsi', "http://www.w3.org/2001/XMLSchema-instance") + cpes.set('xmlns:meta', "http://scap.nist.gov/schema/cpe-dictionary-metadata/0.2") + cpes.set('xsi:schemaLocation', " ".join(["http://scap.nist.gov/schema/cpe-extension/2.3", + "https://scap.nist.gov/schema/cpe/2.3/cpe-dictionary-extension_2.3.xsd", + "http://cpe.mitre.org/dictionary/2.0", + "https://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd", + "http://scap.nist.gov/schema/cpe-dictionary-metadata/0.2", + "https://scap.nist.gov/schema/cpe/2.1/cpe-dictionary-metadata_0.2.xsd", + "http://scap.nist.gov/schema/scap-core/0.3", + "https://scap.nist.gov/schema/nvd/scap-core_0.3.xsd", + "http://scap.nist.gov/schema/configuration/0.1", + "https://scap.nist.gov/schema/nvd/configuration_0.1.xsd", + "http://scap.nist.gov/schema/scap-core/0.1", + "https://scap.nist.gov/schema/nvd/scap-core_0.1.xsd"])) + item = SubElement(cpes, 'cpe-item') + cpe_short_name = CPE.short_name(self.cpe_str) + cpe_new_ver = CPE.version_update(self.cpe_str) + + item.set('name', 'cpe:/' + cpe_short_name) + self.titles[0].text.replace(self.cpe_cur_ver, cpe_new_ver) + for title in self.titles: + item.append(title) + if self.references: + item.append(self.references) + cpe23item = SubElement(item, 'cpe-23:cpe23-item') + cpe23item.set('name', self.cpe_str) + + # Generate the XML as a string + xmlstr = ET.tostring(cpes) + + # And use minidom to pretty print the XML + return minidom.parseString(xmlstr).toprettyxml(encoding="utf-8").decode("utf-8") + + @staticmethod + def version(cpe): + return cpe.split(":")[5] + + @staticmethod + def product(cpe): + return cpe.split(":")[4] + + @staticmethod + def short_name(cpe): + return ":".join(cpe.split(":")[2:6]) + + @staticmethod + def version_update(cpe): + return ":".join(cpe.split(":")[5:6]) + + @staticmethod + def no_version(cpe): + return ":".join(cpe.split(":")[:5]) + + +class CPEDB: + def __init__(self, nvd_path): + self.all_cpes = dict() + self.all_cpes_no_version = dict() + self.nvd_path = nvd_path + + def get_xml_dict(self): + print("CPE: Setting up NIST dictionary") + if not os.path.exists(os.path.join(self.nvd_path, "cpe")): + os.makedirs(os.path.join(self.nvd_path, "cpe")) + + cpe_dict_local = os.path.join(self.nvd_path, "cpe", os.path.basename(CPEDB_URL)) + if not os.path.exists(cpe_dict_local) or os.stat(cpe_dict_local).st_mtime < time.time() - 86400: + print("CPE: Fetching xml manifest from [" + CPEDB_URL + "]") + cpe_dict = requests.get(CPEDB_URL) + open(cpe_dict_local, "wb").write(cpe_dict.content) + + print("CPE: Unzipping xml manifest...") + nist_cpe_file = gzip.GzipFile(fileobj=open(cpe_dict_local, 'rb')) + print("CPE: Converting xml manifest to dict...") + tree = ET.parse(nist_cpe_file) + all_cpedb = tree.getroot() + self.parse_dict(all_cpedb) + + def parse_dict(self, all_cpedb): + # Cycle through the dict and build two dict to be used for custom + # lookups of partial and complete CPE objects + # The objects are then used to create new proposed XML updates if + # if is determined one is required + # Out of the different language titles, select English + for cpe in all_cpedb.findall(".//{http://cpe.mitre.org/dictionary/2.0}cpe-item"): + cpe_titles = [] + for title in cpe.findall('.//{http://cpe.mitre.org/dictionary/2.0}title[@xml:lang="en-US"]', ns): + title.tail = None + cpe_titles.append(title) + + # Some older CPE don't include references, if they do, make + # sure we handle the case of one ref needing to be packed + # in a list + cpe_ref = cpe.find(".//{http://cpe.mitre.org/dictionary/2.0}references") + if cpe_ref: + for ref in cpe_ref.findall(".//{http://cpe.mitre.org/dictionary/2.0}reference"): + ref.tail = None + ref.text = ref.text.upper() + if ref.text not in VALID_REFS: + ref.text = ref.text + "-- UPDATE this entry, here are some examples and just one word should be used -- " + ' '.join(VALID_REFS) # noqa E501 + cpe_ref.tail = None + cpe_ref.text = None + + cpe_str = cpe.find(".//{http://scap.nist.gov/schema/cpe-extension/2.3}cpe23-item").get('name') + item = CPE(cpe_str, cpe_titles, cpe_ref) + cpe_str_no_version = CPE.no_version(cpe_str) + # This dict must have a unique key for every CPE version + # which allows matching to the specific obj data of that + # NIST dict entry + self.all_cpes.update({cpe_str: item}) + # This dict has one entry for every CPE (w/o version) to allow + # partial match (no valid version) check (the obj is saved and + # used as seed for suggested xml updates. By updating the same + # non-version'd entry, it assumes the last update here is the + # latest version in the NIST dict) + self.all_cpes_no_version.update({cpe_str_no_version: item}) + + def find_partial(self, cpe_str): + cpe_str_no_version = CPE.no_version(cpe_str) + if cpe_str_no_version in self.all_cpes_no_version: + return cpe_str_no_version + + def find_partial_obj(self, cpe_str): + cpe_str_no_version = CPE.no_version(cpe_str) + if cpe_str_no_version in self.all_cpes_no_version: + return self.all_cpes_no_version[cpe_str_no_version] + + def find_partial_latest_version(self, cpe_str_partial): + cpe_obj = self.find_partial_obj(cpe_str_partial) + return cpe_obj.cpe_cur_ver + + def find(self, cpe_str): + if self.find_partial(cpe_str): + if cpe_str in self.all_cpes: + return cpe_str + + def gen_update_xml(self, cpe_str): + cpe = self.find_partial_obj(cpe_str) + return cpe.update_xml_dict() diff --git a/support/scripts/cve.py b/support/scripts/cve.py new file mode 100755 index 00000000..13c29fab --- /dev/null +++ b/support/scripts/cve.py @@ -0,0 +1,273 @@ +#!/usr/bin/env python + +# Copyright (C) 2009 by Thomas Petazzoni +# Copyright (C) 2020 by Gregory CLEMENT +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +import datetime +import os +import requests # URL checking +import distutils.version +import time +import gzip +import sys +import operator + +try: + import ijson + # backend is a module in < 2.5, a string in >= 2.5 + if 'python' in getattr(ijson.backend, '__name__', ijson.backend): + try: + import ijson.backends.yajl2_cffi as ijson + except ImportError: + sys.stderr.write('Warning: Using slow ijson python backend\n') +except ImportError: + sys.stderr.write("You need ijson to parse NVD for CVE check\n") + exit(1) + +sys.path.append('utils/') + +NVD_START_YEAR = 2002 +NVD_JSON_VERSION = "1.1" +NVD_BASE_URL = "https://nvd.nist.gov/feeds/json/cve/" + NVD_JSON_VERSION + +ops = { + '>=': operator.ge, + '>': operator.gt, + '<=': operator.le, + '<': operator.lt, + '=': operator.eq +} + + +# Check if two CPE IDs match each other +def cpe_matches(cpe1, cpe2): + cpe1_elems = cpe1.split(":") + cpe2_elems = cpe2.split(":") + + remains = filter(lambda x: x[0] not in ["*", "-"] and x[1] not in ["*", "-"] and x[0] != x[1], + zip(cpe1_elems, cpe2_elems)) + return len(list(remains)) == 0 + + +def cpe_product(cpe): + return cpe.split(':')[4] + + +def cpe_version(cpe): + return cpe.split(':')[5] + + +class CVE: + """An accessor class for CVE Items in NVD files""" + CVE_AFFECTS = 1 + CVE_DOESNT_AFFECT = 2 + CVE_UNKNOWN = 3 + + def __init__(self, nvd_cve): + """Initialize a CVE from its NVD JSON representation""" + self.nvd_cve = nvd_cve + + @staticmethod + def download_nvd_year(nvd_path, year): + metaf = "nvdcve-%s-%s.meta" % (NVD_JSON_VERSION, year) + path_metaf = os.path.join(nvd_path, metaf) + jsonf_gz = "nvdcve-%s-%s.json.gz" % (NVD_JSON_VERSION, year) + path_jsonf_gz = os.path.join(nvd_path, jsonf_gz) + + # If the database file is less than a day old, we assume the NVD data + # locally available is recent enough. + if os.path.exists(path_jsonf_gz) and os.stat(path_jsonf_gz).st_mtime >= time.time() - 86400: + return path_jsonf_gz + + # If not, we download the meta file + url = "%s/%s" % (NVD_BASE_URL, metaf) + print("Getting %s" % url) + page_meta = requests.get(url) + page_meta.raise_for_status() + + # If the meta file already existed, we compare the existing + # one with the data newly downloaded. If they are different, + # we need to re-download the database. + # If the database does not exist locally, we need to redownload it in + # any case. + if os.path.exists(path_metaf) and os.path.exists(path_jsonf_gz): + meta_known = open(path_metaf, "r").read() + if page_meta.text == meta_known: + return path_jsonf_gz + + # Grab the compressed JSON NVD, and write files to disk + url = "%s/%s" % (NVD_BASE_URL, jsonf_gz) + print("Getting %s" % url) + page_json = requests.get(url) + page_json.raise_for_status() + open(path_jsonf_gz, "wb").write(page_json.content) + open(path_metaf, "w").write(page_meta.text) + return path_jsonf_gz + + @classmethod + def read_nvd_dir(cls, nvd_dir): + """ + Iterate over all the CVEs contained in NIST Vulnerability Database + feeds since NVD_START_YEAR. If the files are missing or outdated in + nvd_dir, a fresh copy will be downloaded, and kept in .json.gz + """ + for year in range(NVD_START_YEAR, datetime.datetime.now().year + 1): + filename = CVE.download_nvd_year(nvd_dir, year) + try: + content = ijson.items(gzip.GzipFile(filename), 'CVE_Items.item') + except: # noqa: E722 + print("ERROR: cannot read %s. Please remove the file then rerun this script" % filename) + raise + for cve in content: + yield cls(cve) + + def each_product(self): + """Iterate over each product section of this cve""" + for vendor in self.nvd_cve['cve']['affects']['vendor']['vendor_data']: + for product in vendor['product']['product_data']: + yield product + + def parse_node(self, node): + """ + Parse the node inside the configurations section to extract the + cpe information usefull to know if a product is affected by + the CVE. Actually only the product name and the version + descriptor are needed, but we also provide the vendor name. + """ + + # The node containing the cpe entries matching the CVE can also + # contain sub-nodes, so we need to manage it. + for child in node.get('children', ()): + for parsed_node in self.parse_node(child): + yield parsed_node + + for cpe in node.get('cpe_match', ()): + if not cpe['vulnerable']: + return + product = cpe_product(cpe['cpe23Uri']) + version = cpe_version(cpe['cpe23Uri']) + # ignore when product is '-', which means N/A + if product == '-': + return + op_start = '' + op_end = '' + v_start = '' + v_end = '' + + if version != '*' and version != '-': + # Version is defined, this is a '=' match + op_start = '=' + v_start = version + else: + # Parse start version, end version and operators + if 'versionStartIncluding' in cpe: + op_start = '>=' + v_start = cpe['versionStartIncluding'] + + if 'versionStartExcluding' in cpe: + op_start = '>' + v_start = cpe['versionStartExcluding'] + + if 'versionEndIncluding' in cpe: + op_end = '<=' + v_end = cpe['versionEndIncluding'] + + if 'versionEndExcluding' in cpe: + op_end = '<' + v_end = cpe['versionEndExcluding'] + + yield { + 'id': cpe['cpe23Uri'], + 'v_start': v_start, + 'op_start': op_start, + 'v_end': v_end, + 'op_end': op_end + } + + def each_cpe(self): + for node in self.nvd_cve['configurations']['nodes']: + for cpe in self.parse_node(node): + yield cpe + + @property + def identifier(self): + """The CVE unique identifier""" + return self.nvd_cve['cve']['CVE_data_meta']['ID'] + + @property + def affected_products(self): + """The set of CPE products referred by this CVE definition""" + return set(cpe_product(p['id']) for p in self.each_cpe()) + + def affects(self, name, version, cve_ignore_list, cpeid=None): + """ + True if the Buildroot Package object passed as argument is affected + by this CVE. + """ + if self.identifier in cve_ignore_list: + return self.CVE_DOESNT_AFFECT + + pkg_version = distutils.version.LooseVersion(version) + if not hasattr(pkg_version, "version"): + print("Cannot parse package '%s' version '%s'" % (name, version)) + pkg_version = None + + # if we don't have a cpeid, build one based on name and version + if not cpeid: + cpeid = "cpe:2.3:*:*:%s:%s:*:*:*:*:*:*:*" % (name, version) + # if we have a cpeid, use its version instead of the package + # version, as they might be different due to + # _CPE_ID_VERSION + else: + pkg_version = distutils.version.LooseVersion(cpe_version(cpeid)) + + for cpe in self.each_cpe(): + if not cpe_matches(cpe['id'], cpeid): + continue + if not cpe['v_start'] and not cpe['v_end']: + return self.CVE_AFFECTS + if not pkg_version: + continue + + if cpe['v_start']: + try: + cve_affected_version = distutils.version.LooseVersion(cpe['v_start']) + inrange = ops.get(cpe['op_start'])(pkg_version, cve_affected_version) + except TypeError: + return self.CVE_UNKNOWN + + # current package version is before v_start, so we're + # not affected by the CVE + if not inrange: + continue + + if cpe['v_end']: + try: + cve_affected_version = distutils.version.LooseVersion(cpe['v_end']) + inrange = ops.get(cpe['op_end'])(pkg_version, cve_affected_version) + except TypeError: + return self.CVE_UNKNOWN + + # current package version is after v_end, so we're + # not affected by the CVE + if not inrange: + continue + + # We're in the version range affected by this CVE + return self.CVE_AFFECTS + + return self.CVE_DOESNT_AFFECT diff --git a/support/scripts/eclipse-register-toolchain b/support/scripts/eclipse-register-toolchain new file mode 100755 index 00000000..891d29ee --- /dev/null +++ b/support/scripts/eclipse-register-toolchain @@ -0,0 +1,76 @@ +#!/bin/sh + +# This script registers the toolchain of a Buildroot project into the +# Eclipse plugin. To do so, it adds a new line for the Buildroot +# toolchain into the $HOME/.buildroot-eclipse.toolchains file, which +# the Eclipse Buildroot plugin reads to discover automatically the +# available Buildroot toolchains on the system. +# +# This script should typically not be called manually. Instead, one +# should enable the BR2_ECLIPSE_REGISTER configuration option, which +# will lead Buildroot to automatically call this script with the +# appropriate arguments. +# +# Usage: +# eclipse-register-toolchain project-directory toolchain-prefix architecture +# +# project-directory is the absolute path to the Buildroot project +# output directory (which contains the host/, target/, build/, +# images/, etc. subdirectories). It should be an absolute and +# canonical path. +# +# toolchain-prefix is the prefix of the cross-compilation tools, i.e +# 'arm-linux-' if the cross-compiler executable is 'arm-linux-gcc'. +# +# architecture is the lower-cased name of the architecture targetted +# by the Buildroot project. + +if test $# -ne 3; then + echo "Invalid number of arguments." + echo "Usage: $0 project-directory toolchain-prefix architecture" + exit 1 +fi + +project_directory=$1 +toolchain_prefix=$2 +architecture=$3 + +if test ! -d ${project_directory} ; then + echo "Non-existing project directory ${project_directory}" + exit 1 +fi + +if test ! -d ${project_directory}/host ; then + echo "Your project directory does not look like a Buildroot output" + exit 1 +fi + +if test ! -e ${project_directory}/host/bin/${toolchain_prefix}gcc ; then + echo "Cannot find the cross-compiler in the project directory" + exit 1 +fi + +TOOLCHAIN_ECLIPSE_FILE=${HOME}/.buildroot-eclipse.toolchains + +# First, we remove all lines from the ${TOOLCHAIN_ECLISPE_FILE} that +# correspond to toolchains that no longer exist. +if test -f ${TOOLCHAIN_ECLIPSE_FILE} ; then + mv ${TOOLCHAIN_ECLIPSE_FILE} ${TOOLCHAIN_ECLIPSE_FILE}.tmp + cat ${TOOLCHAIN_ECLIPSE_FILE}.tmp | while read toolchain ; do + path=$(echo ${toolchain} | cut -f1 -d ':') + # Filter lines corresponding to still existing projects + echo "Testing ${path} ..." + if ! test -d ${path} ; then + continue + fi + # .. and the current project + if test ${path} = ${project_directory} ; then + continue + fi + echo ${toolchain} >> ${TOOLCHAIN_ECLIPSE_FILE} + done + rm ${TOOLCHAIN_ECLIPSE_FILE}.tmp +fi + +# Add the toolchain +echo "${project_directory}:${toolchain_prefix}:${architecture}" >> ${TOOLCHAIN_ECLIPSE_FILE} diff --git a/support/scripts/expunge-gconv-modules b/support/scripts/expunge-gconv-modules new file mode 100755 index 00000000..03012c1c --- /dev/null +++ b/support/scripts/expunge-gconv-modules @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +# This script is used to generate a gconv-modules file that takes into +# account only the gconv modules installed by Buildroot. It receives +# on its standard input the original complete gconv-modules file from +# the toolchain, and as arguments the list of gconv modules that were +# actually installed, and writes on its standard output the new +# gconv-modules file. + +# The format of gconv-modules is precisely documented in the +# file itself. It consists of two different directives: +# module FROMSET TOSET FILENAME COST +# alias ALIAS REALNAME +# and that's what this script parses and generates. +# +# There are two kinds of 'module' directives: +# - the first defines conversion of a charset to/from INTERNAL representation +# - the second defines conversion of a charset to/from another charset +# we handle each with slightly different code, since the second never has +# associated aliases. + +gawk -v files="${1}" ' +$1 == "alias" { + aliases[$3] = aliases[$3] " " $2; +} +$1 == "module" && $2 != "INTERNAL" && $3 == "INTERNAL" { + file2internals[$4] = file2internals[$4] " " $2; + mod2cost[$2] = $5; +} +$1 == "module" && $2 != "INTERNAL" && $3 != "INTERNAL" { + file2cset[$4] = file2cset[$4] " " $2 ":" $3; + mod2cost[$2] = $5; +} + +END { + nb_files = split(files, all_files); + for(f = 1; f <= nb_files; f++) { + file = all_files[f]; + printf("# Modules and aliases for: %s\n", file); + nb_mods = split(file2internals[file], mods); + for(i = 1; i <= nb_mods; i++) { + nb_aliases = split(aliases[mods[i]], mod_aliases); + for(j = 1; j <= nb_aliases; j++) { + printf("alias\t%s\t%s\n", mod_aliases[j], mods[i]); + } + printf("module\t%s\t%s\t%s\t%d\n", mods[i], "INTERNAL", file, mod2cost[mods[i]]); + printf("module\t%s\t%s\t%s\t%d\n", "INTERNAL", mods[i], file, mod2cost[mods[i]]); + printf("\n" ); + } + printf("%s", nb_mods != 0 ? "\n" : ""); + nb_csets = split(file2cset[file], csets); + for(i = 1; i <= nb_csets; i++) { + split(csets[i], cs, ":"); + printf("module\t%s\t%s\t%s\t%d\n", cs[1], cs[2], file, mod2cost[cs[1]]); + } + printf("%s", nb_csets != 0 ? "\n\n" : ""); + } +} +' diff --git a/support/scripts/fix-configure-powerpc64.sh b/support/scripts/fix-configure-powerpc64.sh new file mode 100755 index 00000000..ff2b283c --- /dev/null +++ b/support/scripts/fix-configure-powerpc64.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# This is a script to find, and correct, a problem with old versions of +# configure that affect powerpc64 and powerpc64le. + +# The issue causes configure to incorrectly determine that shared library +# support is not present in the linker. This causes the package to build a +# static library rather than a dynamic one and although the build will succeed, +# it may cause packages that link with the static library it to fail due to +# undefined symbols. + +# This script searches for files named 'configure' that appear to have this +# issue (by searching for a known bad pattern) and patching them. + +set -e + +if [ $# -ne 1 ]; then + echo "Usage: $0 " + exit 2 +fi + +srcdir="$1" +files=$(cd "$srcdir" && find . -name configure \ +-exec grep -qF 'Generated by GNU Autoconf' {} \; \ +-exec grep -qF 'ppc*-*linux*|powerpc*-*linux*)' {} \; -print) + +# --ignore-whitespace is needed because some packages have included +# copies of configure scripts where tabs have been replaced with spaces. +for c in $files; do + patch --ignore-whitespace "$srcdir"/"$c" <<'EOF' +--- a/configure 2016-11-16 15:31:46.097447271 +1100 ++++ b/configure 2008-07-21 12:17:23.000000000 +1000 +@@ -4433,7 +4433,10 @@ + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpcle-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; ++ powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) +EOF +done + diff --git a/support/scripts/fix-rpath b/support/scripts/fix-rpath new file mode 100755 index 00000000..3e67e770 --- /dev/null +++ b/support/scripts/fix-rpath @@ -0,0 +1,162 @@ +#!/usr/bin/env bash + +# Copyright (C) 2016 Samuel Martin +# Copyright (C) 2017 Wolfgang Grandegger +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +usage() { + cat <&2 +Usage: ${0} TREE_KIND + +Description: + + This script scans a tree and sanitize ELF files' RPATH found in there. + + Sanitization behaves the same whatever the kind of the processed tree, + but the resulting RPATH differs. The rpath sanitization is done using + "patchelf --make-rpath-relative". + +Arguments: + + TREE_KIND Kind of tree to be processed. + Allowed values: host, target, staging + +Environment: + + PATCHELF patchelf program to use + (default: HOST_DIR/bin/patchelf) + + HOST_DIR host directory + STAGING_DIR staging directory + TARGET_DIR target directory + + TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR + (default HOST_DIR/opt/ext-toolchain) + +Returns: 0 if success or 1 in case of error + +EOF +} + +: ${PATCHELF:=${HOST_DIR}/bin/patchelf} + +# ELF files should not be in these sub-directories +HOST_EXCLUDEPATHS="/share/terminfo" +STAGING_EXCLUDEPATHS="/usr/include /usr/share/terminfo" +TARGET_EXCLUDEPATHS="/lib/firmware" + +main() { + local rootdir + local tree="${1}" + local find_args=( ) + local sanitize_extra_args=( ) + + if ! "${PATCHELF}" --version > /dev/null 2>&1; then + echo "Error: can't execute patchelf utility '${PATCHELF}'" + exit 1 + fi + + case "${tree}" in + host) + rootdir="${HOST_DIR}" + + # do not process the sysroot (only contains target binaries) + find_args+=( "-path" "${STAGING_DIR}" "-prune" "-o" ) + + # do not process the external toolchain installation directory to + # avoid breaking it. + test "${TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR}" != "" && \ + find_args+=( "-path" "${TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR}" "-prune" "-o" ) + + for excludepath in ${HOST_EXCLUDEPATHS}; do + find_args+=( "-path" "${HOST_DIR}""${excludepath}" "-prune" "-o" ) + done + + # do not process the patchelf binary but a copy to work-around "file in use" + find_args+=( "-path" "${PATCHELF}" "-prune" "-o" ) + cp "${PATCHELF}" "${PATCHELF}.__to_be_patched" + + # we always want $ORIGIN-based rpaths to make it relocatable. + sanitize_extra_args+=( "--relative-to-file" ) + ;; + + staging) + rootdir="${STAGING_DIR}" + + # ELF files should not be in these sub-directories + for excludepath in ${STAGING_EXCLUDEPATHS}; do + find_args+=( "-path" "${STAGING_DIR}""${excludepath}" "-prune" "-o" ) + done + + # should be like for the target tree below + sanitize_extra_args+=( "--no-standard-lib-dirs" ) + ;; + + target) + rootdir="${TARGET_DIR}" + + for excludepath in ${TARGET_EXCLUDEPATHS}; do + find_args+=( "-path" "${TARGET_DIR}""${excludepath}" "-prune" "-o" ) + done + + # we don't want $ORIGIN-based rpaths but absolute paths without rootdir. + # we also want to remove rpaths pointing to /lib or /usr/lib. + sanitize_extra_args+=( "--no-standard-lib-dirs" ) + ;; + + *) + usage + exit 1 + ;; + esac + + find_args+=( "-type" "f" "-print" ) + + while read file ; do + # check if it's an ELF file + rpath=$(${PATCHELF} --print-rpath "${file}" 2>&1) + if test $? -ne 0 ; then + continue + fi + + # make files writable if necessary + changed=$(chmod -c u+w "${file}") + + # With per-package directory support, most RPATH of host + # binaries will point to per-package directories. This won't + # work with the --make-rpath-relative ${rootdir} invocation as + # the per-package host directory is not within ${rootdir}. So, + # we rewrite all RPATHs pointing to per-package directories so + # that they point to the global host directry. + changed_rpath=$(echo ${rpath} | sed "s@${PER_PACKAGE_DIR}/[^/]\+/host@${HOST_DIR}@") + if test "${rpath}" != "${changed_rpath}" ; then + ${PATCHELF} --set-rpath ${changed_rpath} "${file}" + fi + + # call patchelf to sanitize the rpath + ${PATCHELF} --make-rpath-relative "${rootdir}" ${sanitize_extra_args[@]} "${file}" + # restore the original permission + test "${changed}" != "" && chmod u-w "${file}" + done < <(find "${rootdir}" ${find_args[@]}) + + # Restore patched patchelf utility + test "${tree}" = "host" && mv "${PATCHELF}.__to_be_patched" "${PATCHELF}" + + # ignore errors + return 0 +} + +main ${@} diff --git a/support/scripts/gen-bootlin-toolchains b/support/scripts/gen-bootlin-toolchains new file mode 100755 index 00000000..902b7795 --- /dev/null +++ b/support/scripts/gen-bootlin-toolchains @@ -0,0 +1,496 @@ +#!/usr/bin/env python3 + +import os.path +import re +import requests +import textwrap + +BASE_URL = "https://toolchains.bootlin.com/downloads/releases/toolchains" + +AUTOGENERATED_COMMENT = """# This file was auto-generated by support/scripts/gen-bootlin-toolchains +# Do not edit +""" + +# In the below dict: + +# - 'conditions' indicate the cumulative conditions under which the +# toolchain will be made available. In several situations, a given +# toolchain is usable on several architectures variants (for +# example, an ARMv6 toolchain can be used on ARMv7) +# - 'test_options' indicate one specific configuration where the +# toolchain can be used. It is used to create the runtime test +# cases. If 'test_options' does not exist, the code assumes it can +# be made equal to 'conditions' +# - 'prefix' is the prefix of the cross-compilation toolchain tools + +arches = { + 'aarch64': { + 'conditions': ['BR2_aarch64'], + 'prefix': 'aarch64', + }, + 'aarch64be': { + 'conditions': ['BR2_aarch64_be'], + 'prefix': 'aarch64_be', + }, + 'arcle-750d': { + 'conditions': ['BR2_arcle', 'BR2_arc750d'], + 'prefix': 'arc', + }, + 'arcle-hs38': { + 'conditions': ['BR2_arcle', 'BR2_archs38'], + 'prefix': 'arc', + }, + 'armv5-eabi': { + 'conditions': ['BR2_ARM_CPU_ARMV5', 'BR2_ARM_EABI'], + 'test_options': ['BR2_arm', 'BR2_arm926t', 'BR2_ARM_EABI'], + 'prefix': 'arm', + }, + 'armv6-eabihf': { + 'conditions': ['BR2_ARM_CPU_ARMV6', 'BR2_ARM_EABIHF'], + 'test_options': ['BR2_arm', 'BR2_arm1176jzf_s', 'BR2_ARM_EABIHF'], + 'prefix': 'arm', + }, + 'armv7-eabihf': { + 'conditions': ['BR2_ARM_CPU_ARMV7A', 'BR2_ARM_EABIHF'], + 'test_options': ['BR2_arm', 'BR2_cortex_a8', 'BR2_ARM_EABIHF'], + 'prefix': 'arm', + }, + 'armv7m': { + 'conditions': ['BR2_ARM_CPU_ARMV7M'], + 'test_options': ['BR2_arm', 'BR2_cortex_m4'], + 'prefix': 'arm', + }, + 'm68k-68xxx': { + 'conditions': ['BR2_m68k_m68k'], + 'test_options': ['BR2_m68k', 'BR2_m68k_68040'], + 'prefix': 'm68k', + }, + 'm68k-coldfire': { + 'conditions': ['BR2_m68k_cf'], + 'test_options': ['BR2_m68k', 'BR2_m68k_cf5208'], + 'prefix': 'm68k', + }, + 'microblazebe': { + 'conditions': ['BR2_microblazebe'], + 'prefix': 'microblaze', + }, + 'microblazeel': { + 'conditions': ['BR2_microblazeel'], + 'prefix': 'microblazeel', + }, + 'mips32': { + # Not sure it could be used by other mips32 variants? + 'conditions': ['BR2_mips', 'BR2_mips_32', '!BR2_MIPS_SOFT_FLOAT'], + 'prefix': 'mips', + }, + 'mips32el': { + # Not sure it could be used by other mips32el variants? + 'conditions': ['BR2_mipsel', 'BR2_mips_32', '!BR2_MIPS_SOFT_FLOAT'], + 'prefix': 'mipsel', + }, + 'mips32r5el': { + 'conditions': ['BR2_mipsel', 'BR2_mips_32r5', '!BR2_MIPS_SOFT_FLOAT'], + 'prefix': 'mipsel', + }, + 'mips32r6el': { + 'conditions': ['BR2_mipsel', 'BR2_mips_32r6', '!BR2_MIPS_SOFT_FLOAT'], + 'prefix': 'mipsel', + }, + 'mips64': { + # Not sure it could be used by other mips64 variants? + 'conditions': ['BR2_mips64', 'BR2_mips_64', '!BR2_MIPS_SOFT_FLOAT'], + 'prefix': 'mips64', + }, + 'mips64-n32': { + # Not sure it could be used by other mips64 variants? + 'conditions': ['BR2_mips64', 'BR2_mips_64', 'BR2_MIPS_NABI32', '!BR2_MIPS_SOFT_FLOAT'], + 'prefix': 'mips64', + }, + 'mips64el-n32': { + # Not sure it could be used by other mips64el variants? + 'conditions': ['BR2_mips64el', 'BR2_mips_64', 'BR2_MIPS_NABI32', '!BR2_MIPS_SOFT_FLOAT'], + 'prefix': 'mips64el', + }, + 'mips64r6el-n32': { + 'conditions': ['BR2_mips64el', 'BR2_mips_64r6', 'BR2_MIPS_NABI32', '!BR2_MIPS_SOFT_FLOAT'], + 'prefix': 'mips64el', + }, + 'nios2': { + 'conditions': ['BR2_nios2'], + 'prefix': 'nios2', + }, + 'openrisc': { + 'conditions': ['BR2_or1k'], + 'prefix': 'or1k', + }, + 'powerpc-440fp': { + # Not sure it could be used by other powerpc variants? + 'conditions': ['BR2_powerpc', 'BR2_powerpc_440fp'], + 'prefix': 'powerpc', + }, + 'powerpc-e300c3': { + # Not sure it could be used by other powerpc variants? + 'conditions': ['BR2_powerpc', 'BR2_powerpc_e300c3'], + 'prefix': 'powerpc', + }, + 'powerpc-e500mc': { + # Not sure it could be used by other powerpc variants? + 'conditions': ['BR2_powerpc', 'BR2_powerpc_e500mc'], + 'prefix': 'powerpc', + }, + 'powerpc64-e5500': { + 'conditions': ['BR2_powerpc64', 'BR2_powerpc_e5500'], + 'prefix': 'powerpc64', + }, + 'powerpc64-e6500': { + 'conditions': ['BR2_powerpc64', 'BR2_powerpc_e6500'], + 'prefix': 'powerpc64', + }, + 'powerpc64-power8': { + 'conditions': ['BR2_powerpc64', 'BR2_powerpc_power8'], + 'prefix': 'powerpc64', + }, + 'powerpc64le-power8': { + 'conditions': ['BR2_powerpc64le', 'BR2_powerpc_power8'], + 'prefix': 'powerpc64le', + }, + 'riscv32-ilp32d': { + 'conditions': ['BR2_riscv', 'BR2_riscv_g', 'BR2_RISCV_32', 'BR2_RISCV_ABI_ILP32D'], + 'prefix': 'riscv32', + }, + 'riscv64': { + 'conditions': ['BR2_riscv', 'BR2_riscv_g', 'BR2_RISCV_64', 'BR2_RISCV_ABI_LP64'], + 'prefix': 'riscv64', + }, + 'sh-sh4': { + 'conditions': ['BR2_sh', 'BR2_sh4'], + 'prefix': 'sh4', + }, + 'sh-sh4aeb': { + 'conditions': ['BR2_sh', 'BR2_sh4aeb'], + 'prefix': 'sh4aeb', + }, + 'sparc64': { + 'conditions': ['BR2_sparc64', 'BR2_sparc_v9'], + 'prefix': 'sparc64', + }, + 'sparcv8': { + 'conditions': ['BR2_sparc', 'BR2_sparc_v8'], + 'prefix': 'sparc', + }, + 'x86-64-core-i7': { + 'conditions': ['BR2_x86_64', + 'BR2_X86_CPU_HAS_MMX', + 'BR2_X86_CPU_HAS_SSE', + 'BR2_X86_CPU_HAS_SSE2', + 'BR2_X86_CPU_HAS_SSE3', + 'BR2_X86_CPU_HAS_SSSE3', + 'BR2_X86_CPU_HAS_SSE4', + 'BR2_X86_CPU_HAS_SSE42'], + 'test_options': ['BR2_x86_64', 'BR2_x86_corei7'], + 'prefix': 'x86_64', + }, + 'x86-core2': { + 'conditions': ['BR2_i386', + 'BR2_X86_CPU_HAS_MMX', + 'BR2_X86_CPU_HAS_SSE', + 'BR2_X86_CPU_HAS_SSE2', + 'BR2_X86_CPU_HAS_SSE3', + 'BR2_X86_CPU_HAS_SSSE3'], + 'test_options': ['BR2_i386', 'BR2_x86_core2'], + 'prefix': 'i686', + }, + 'x86-i686': { + 'conditions': ['BR2_i386', + '!BR2_x86_i486', + '!BR2_x86_i586', + '!BR2_x86_x1000'], + 'test_options': ['BR2_i386', + 'BR2_x86_i686'], + 'prefix': 'i686', + }, + 'xtensa-lx60': { + 'conditions': ['BR2_xtensa', 'BR2_XTENSA_CUSTOM', 'BR2_XTENSA_LITTLE_ENDIAN'], + 'prefix': 'xtensa', + }, +} + + +class Toolchain: + def __init__(self, arch, libc, variant, version): + self.arch = arch + self.libc = libc + self.variant = variant + self.version = version + self.fname_prefix = "%s--%s--%s-%s" % (self.arch, self.libc, self.variant, self.version) + self.option_name = "BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_%s_%s_%s" % \ + (self.arch.replace("-", "_").upper(), self.libc.upper(), self.variant.replace("-", "_").upper()) + self.fragment = requests.get(self.fragment_url).text.split("\n") + self.sha256 = requests.get(self.hash_url).text.split(" ")[0] + + @property + def tarball_url(self): + return os.path.join(BASE_URL, self.arch, "tarballs", + self.fname_prefix + ".tar.bz2") + + @property + def hash_url(self): + return os.path.join(BASE_URL, self.arch, "tarballs", + self.fname_prefix + ".sha256") + + @property + def fragment_url(self): + return os.path.join(BASE_URL, self.arch, "fragments", + self.fname_prefix + ".frag") + + def gen_config_in_options(self, f): + f.write("config %s\n" % self.option_name) + f.write("\tbool \"%s %s %s %s\"\n" % + (self.arch, self.libc, self.variant, self.version)) + depends = [] + selects = [] + + for c in arches[self.arch]['conditions']: + depends.append(c) + + for frag in self.fragment: + # libc type + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC"): + selects.append("BR2_TOOLCHAIN_EXTERNAL_UCLIBC") + elif frag.startswith("BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC"): + # glibc needs mmu support + depends.append("BR2_USE_MMU") + # glibc doesn't support static only configuration + depends.append("!BR2_STATIC_LIBS") + selects.append("BR2_TOOLCHAIN_EXTERNAL_GLIBC") + elif frag.startswith("BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL"): + # musl needs mmu support + depends.append("BR2_USE_MMU") + selects.append("BR2_TOOLCHAIN_EXTERNAL_MUSL") + + # gcc version + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_GCC_"): + m = re.match("^BR2_TOOLCHAIN_EXTERNAL_GCC_([0-9_]*)=y$", frag) + assert m, "Cannot get gcc version for toolchain %s" % self.fname_prefix + selects.append("BR2_TOOLCHAIN_GCC_AT_LEAST_%s" % m[1]) + + # kernel headers version + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HEADERS_"): + m = re.match("^BR2_TOOLCHAIN_EXTERNAL_HEADERS_([0-9_]*)=y$", frag) + assert m, "Cannot get kernel headers version for toolchain %s" % self.fname_prefix + selects.append("BR2_TOOLCHAIN_HEADERS_AT_LEAST_%s" % m[1]) + + # C++ + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_CXX"): + selects.append("BR2_INSTALL_LIBSTDCPP") + + # SSP + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_SSP"): + selects.append("BR2_TOOLCHAIN_HAS_SSP") + + # wchar + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_WCHAR"): + selects.append("BR2_USE_WCHAR") + + # locale + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_LOCALE"): + # locale implies the availability of wchar + selects.append("BR2_USE_WCHAR") + selects.append("BR2_ENABLE_LOCALE") + + # thread support + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS"): + selects.append("BR2_TOOLCHAIN_HAS_THREADS") + + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG"): + selects.append("BR2_TOOLCHAIN_HAS_THREADS_DEBUG") + + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL"): + selects.append("BR2_TOOLCHAIN_HAS_THREADS_NPTL") + + # RPC + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_INET_RPC"): + selects.append("BR2_TOOLCHAIN_HAS_NATIVE_RPC") + + # D language + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_DLANG"): + selects.append("BR2_TOOLCHAIN_HAS_DLANG") + + # fortran + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_FORTRAN"): + selects.append("BR2_TOOLCHAIN_HAS_FORTRAN") + + # OpenMP + if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_OPENMP"): + selects.append("BR2_TOOLCHAIN_HAS_OPENMP") + + for depend in depends: + f.write("\tdepends on %s\n" % depend) + + for select in selects: + f.write("\tselect %s\n" % select) + + f.write("\thelp\n") + + desc = "Bootlin toolchain for the %s architecture, using the %s C library. " % \ + (self.arch, self.libc) + + if self.variant == "stable": + desc += "This is a stable version, which means it is using stable and proven versions of gcc, gdb and binutils." + else: + desc += "This is a bleeding-edge version, which means it is using the latest versions of gcc, gdb and binutils." + + f.write(textwrap.fill(desc, width=62, initial_indent="\t ", subsequent_indent="\t ") + "\n") + f.write("\n") + f.write("\t https://toolchains.bootlin.com/\n") + + f.write("\n") + + def gen_mk(self, f): + f.write("ifeq ($(%s),y)\n" % self.option_name) + f.write("TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = %s\n" % self.version) + f.write("TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = %s--%s--%s-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2\n" % + (self.arch, self.libc, self.variant)) + f.write("TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = %s\n" % + os.path.join(BASE_URL, self.arch, "tarballs")) + f.write("endif\n\n") + pass + + def gen_hash(self, f): + f.write("# From %s\n" % self.hash_url) + f.write("sha256 %s %s\n" % (self.sha256, os.path.basename(self.tarball_url))) + + def gen_test(self, f): + if self.variant == "stable": + variant = "Stable" + else: + variant = "BleedingEdge" + testname = "TestExternalToolchainBootlin" + \ + self.arch.replace("-", "").capitalize() + \ + self.libc.capitalize() + variant + f.write("\n\n") + f.write("class %s(TestExternalToolchain):\n" % testname) + f.write(" config = \"\"\"\n") + if 'test_options' in arches[self.arch]: + test_options = arches[self.arch]['test_options'] + else: + test_options = arches[self.arch]['conditions'] + for opt in test_options: + if opt.startswith("!"): + f.write(" # %s is not set\n" % opt[1:]) + else: + f.write(" %s=y\n" % opt) + f.write(" BR2_TOOLCHAIN_EXTERNAL=y\n") + f.write(" BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y\n") + f.write(" %s=y\n" % self.option_name) + f.write(" # BR2_TARGET_ROOTFS_TAR is not set\n") + f.write(" \"\"\"\n") + f.write(" toolchain_prefix = \"%s-linux\"\n" % arches[self.arch]['prefix']) + f.write("\n") + f.write(" def test_run(self):\n") + f.write(" TestExternalToolchain.common_check(self)\n") + + def __repr__(self): + return "Toolchain(arch=%s libc=%s variant=%s version=%s, option=%s)" % \ + (self.arch, self.libc, self.variant, self.version, self.option_name) + + +def get_toolchains(): + toolchains = list() + for arch, details in arches.items(): + print(arch) + url = os.path.join(BASE_URL, arch, "available_toolchains") + page = requests.get(url).text + fnames = sorted(re.findall(r'&1 \ + | sed -r -e '/^test_run \((.*)\).*/!d; s//\1/' \ + | LC_ALL=C sort) + ) + + if [ -n "${CI_COMMIT_TAG}" ]; then + do_basics=true + do_defconfigs=base + do_runtime=true + elif [ "${CI_PIPELINE_SOURCE}" = "trigger" ]; then + case "${BR_SCHEDULE_JOBS}" in + (basic) + do_basics=true + do_defconfigs=check + defconfigs_ext=_check + ;; + (defconfig) + do_defconfigs=base + ;; + (runtime) + do_runtime=true + ;; + esac + else + case "${CI_COMMIT_REF_NAME}" in + (*-basics) + do_basics=true + do_defconfigs=check + defconfigs_ext=_check + ;; + (*-defconfigs) + do_defconfigs=base + ;; + (*-*_defconfig) + defconfigs=( "${CI_COMMIT_REF_NAME##*-}" ) + do_defconfigs=base + ;; + (*-runtime-tests) + do_runtime=true + ;; + (*-tests.*) + runtimes=( "${CI_COMMIT_REF_NAME##*-}" ) + do_runtime=true + ;; + esac + fi + + # If nothing else, at least do the basics to generate a valid pipeline + if [ -z "${do_defconfigs}" \ + -a -z "${do_runtime}" \ + ] + then + do_basics=true + fi + + if ${do_basics:-false}; then + for tst in "${basics[@]}"; do + printf 'check-%s: { extends: .check-%s_base }\n' "${tst}" "${tst}" + done + fi + + if [ -n "${do_defconfigs}" ]; then + for cfg in "${defconfigs[@]}"; do + printf '%s%s: { extends: .defconfig_%s }\n' \ + "${cfg}" "${defconfigs_ext}" "${do_defconfigs}" + done + fi + + if ${do_runtime:-false}; then + printf '%s: { extends: .runtime_test_base }\n' "${runtimes[@]}" + fi +} + +main "${@}" diff --git a/support/scripts/genimage.sh b/support/scripts/genimage.sh new file mode 100755 index 00000000..2796e19e --- /dev/null +++ b/support/scripts/genimage.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +die() { + cat <&2 +Error: $@ + +Usage: ${0} -c GENIMAGE_CONFIG_FILE +EOF + exit 1 +} + +# Parse arguments and put into argument list of the script +opts="$(getopt -n "${0##*/}" -o c: -- "$@")" || exit $? +eval set -- "$opts" + +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +while true ; do + case "$1" in + -c) + GENIMAGE_CFG="${2}"; + shift 2 ;; + --) # Discard all non-option parameters + shift 1; + break ;; + *) + die "unknown option '${1}'" ;; + esac +done + +[ -n "${GENIMAGE_CFG}" ] || die "Missing argument" + +# Pass an empty rootpath. genimage makes a full copy of the given rootpath to +# ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk +# space. We don't rely on genimage to build the rootfs image, just to insert a +# pre-built one in the disk image. + +trap 'rm -rf "${ROOTPATH_TMP}"' EXIT +ROOTPATH_TMP="$(mktemp -d)" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${ROOTPATH_TMP}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" diff --git a/support/scripts/graph-build-time b/support/scripts/graph-build-time new file mode 100755 index 00000000..ba3cdad8 --- /dev/null +++ b/support/scripts/graph-build-time @@ -0,0 +1,312 @@ +#!/usr/bin/env python + +# Copyright (C) 2011 by Thomas Petazzoni +# Copyright (C) 2013 by Yann E. MORIN +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# This script generates graphs of packages build time, from the timing +# data generated by Buildroot in the $(O)/build-time.log file. +# +# Example usage: +# +# cat $(O)/build-time.log | ./support/scripts/graph-build-time --type=histogram --output=foobar.pdf +# +# Three graph types are available : +# +# * histogram, which creates an histogram of the build time for each +# package, decomposed by each step (extract, patch, configure, +# etc.). The order in which the packages are shown is +# configurable: by package name, by build order, or by duration +# order. See the --order option. +# +# * pie-packages, which creates a pie chart of the build time of +# each package (without decomposition in steps). Packages that +# contributed to less than 1% of the overall build time are all +# grouped together in an "Other" entry. +# +# * pie-steps, which creates a pie chart of the time spent globally +# on each step (extract, patch, configure, etc...) +# +# The default is to generate an histogram ordered by package name. +# +# Requirements: +# +# * matplotlib (python-matplotlib on Debian/Ubuntu systems) +# * numpy (python-numpy on Debian/Ubuntu systems) +# * argparse (by default in Python 2.7, requires python-argparse if +# Python 2.6 is used) + +import sys + +try: + import matplotlib as mpl + import numpy +except ImportError: + sys.stderr.write("You need python-matplotlib and python-numpy to generate build graphs\n") + exit(1) + +# Use the Agg backend (which produces a PNG output, see +# http://matplotlib.org/faq/usage_faq.html#what-is-a-backend), +# otherwise an incorrect backend is used on some host machines). +# Note: matplotlib.use() must be called *before* matplotlib.pyplot. +mpl.use('Agg') + +import matplotlib.pyplot as plt # noqa: E402 +import matplotlib.font_manager as fm # noqa: E402 +import csv # noqa: E402 +import argparse # noqa: E402 + +steps = ['download', 'extract', 'patch', 'configure', 'build', + 'install-target', 'install-staging', 'install-images', + 'install-host'] + +default_colors = ['#8d02ff', '#e60004', '#009836', '#2e1d86', '#ffed00', + '#0068b5', '#f28e00', '#940084', '#97c000'] + +alternate_colors = ['#ffbe0a', '#96bdff', '#3f7f7f', '#ff0000', '#00c000', + '#0080ff', '#c000ff', '#00eeee', '#e0e000'] + + +class Package: + def __init__(self, name): + self.name = name + self.steps_duration = {} + self.steps_start = {} + self.steps_end = {} + + def add_step(self, step, state, time): + if state == "start": + self.steps_start[step] = time + else: + self.steps_end[step] = time + if step in self.steps_start and step in self.steps_end: + self.steps_duration[step] = self.steps_end[step] - self.steps_start[step] + + def get_duration(self, step=None): + if step is None: + duration = 0 + for step in list(self.steps_duration.keys()): + duration += self.steps_duration[step] + return duration + if step in self.steps_duration: + return self.steps_duration[step] + return 0 + + +# Generate an histogram of the time spent in each step of each +# package. +def pkg_histogram(data, output, order="build"): + n_pkgs = len(data) + ind = numpy.arange(n_pkgs) + + if order == "duration": + data = sorted(data, key=lambda p: p.get_duration(), reverse=True) + elif order == "name": + data = sorted(data, key=lambda p: p.name, reverse=False) + + # Prepare the vals array, containing one entry for each step + vals = [] + for step in steps: + val = [] + for p in data: + val.append(p.get_duration(step)) + vals.append(val) + + bottom = [0] * n_pkgs + legenditems = [] + + plt.figure() + + # Draw the bars, step by step + for i in range(0, len(vals)): + b = plt.bar(ind+0.1, vals[i], width=0.8, color=colors[i], bottom=bottom, linewidth=0.25) + legenditems.append(b[0]) + bottom = [bottom[j] + vals[i][j] for j in range(0, len(vals[i]))] + + # Draw the package names + plt.xticks(ind + .6, [p.name for p in data], rotation=-60, rotation_mode="anchor", fontsize=8, ha='left') + + # Adjust size of graph depending on the number of packages + # Ensure a minimal size twice as the default + # Magic Numbers do Magic Layout! + ratio = max(((n_pkgs + 10) / 48, 2)) + borders = 0.1 / ratio + sz = plt.gcf().get_figwidth() + plt.gcf().set_figwidth(sz * ratio) + + # Adjust space at borders, add more space for the + # package names at the bottom + plt.gcf().subplots_adjust(bottom=0.2, left=borders, right=1-borders) + + # Remove ticks in the graph for each package + axes = plt.gcf().gca() + for line in axes.get_xticklines(): + line.set_markersize(0) + + axes.set_ylabel('Time (seconds)') + + # Reduce size of legend text + leg_prop = fm.FontProperties(size=6) + + # Draw legend + plt.legend(legenditems, steps, prop=leg_prop) + + if order == "name": + plt.title('Build time of packages\n') + elif order == "build": + plt.title('Build time of packages, by build order\n') + elif order == "duration": + plt.title('Build time of packages, by duration order\n') + + # Save graph + plt.savefig(output) + + +# Generate a pie chart with the time spent building each package. +def pkg_pie_time_per_package(data, output): + # Compute total build duration + total = 0 + for p in data: + total += p.get_duration() + + # Build the list of labels and values, and filter the packages + # that account for less than 1% of the build time. + labels = [] + values = [] + other_value = 0 + for p in sorted(data, key=lambda p: p.get_duration()): + if p.get_duration() < (total * 0.01): + other_value += p.get_duration() + else: + labels.append(p.name) + values.append(p.get_duration()) + + labels.append('Other') + values.append(other_value) + + plt.figure() + + # Draw pie graph + patches, texts, autotexts = plt.pie(values, labels=labels, + autopct='%1.1f%%', shadow=True, + colors=colors) + + # Reduce text size + proptease = fm.FontProperties() + proptease.set_size('xx-small') + plt.setp(autotexts, fontproperties=proptease) + plt.setp(texts, fontproperties=proptease) + + plt.title('Build time per package') + plt.savefig(output) + + +# Generate a pie chart with a portion for the overall time spent in +# each step for all packages. +def pkg_pie_time_per_step(data, output): + steps_values = [] + for step in steps: + val = 0 + for p in data: + val += p.get_duration(step) + steps_values.append(val) + + plt.figure() + + # Draw pie graph + patches, texts, autotexts = plt.pie(steps_values, labels=steps, + autopct='%1.1f%%', shadow=True, + colors=colors) + + # Reduce text size + proptease = fm.FontProperties() + proptease.set_size('xx-small') + plt.setp(autotexts, fontproperties=proptease) + plt.setp(texts, fontproperties=proptease) + + plt.title('Build time per step') + plt.savefig(output) + + +# Parses the csv file passed on standard input and returns a list of +# Package objects, filed with the duration of each step and the total +# duration of the package. +def read_data(input_file): + if input_file is None: + input_file = sys.stdin + else: + input_file = open(input_file) + reader = csv.reader(input_file, delimiter=':') + pkgs = [] + + # Auxilliary function to find a package by name in the list. + def getpkg(name): + for p in pkgs: + if p.name == name: + return p + return None + + for row in reader: + time = float(row[0].strip()) + state = row[1].strip() + step = row[2].strip() + pkg = row[3].strip() + + p = getpkg(pkg) + if p is None: + p = Package(pkg) + pkgs.append(p) + + p.add_step(step, state, time) + + return pkgs + + +parser = argparse.ArgumentParser(description='Draw build time graphs') +parser.add_argument("--type", '-t', metavar="GRAPH_TYPE", + help="Type of graph (histogram, pie-packages, pie-steps)") +parser.add_argument("--order", '-O', metavar="GRAPH_ORDER", + help="Ordering of packages: build or duration (for histogram only)") +parser.add_argument("--alternate-colors", '-c', action="store_true", + help="Use alternate colour-scheme") +parser.add_argument("--input", '-i', metavar="INPUT", + help="Input file (usually $(O)/build/build-time.log)") +parser.add_argument("--output", '-o', metavar="OUTPUT", required=True, + help="Output file (.pdf or .png extension)") +args = parser.parse_args() + +d = read_data(args.input) + +if args.alternate_colors: + colors = alternate_colors +else: + colors = default_colors + +if args.type == "histogram" or args.type is None: + if args.order == "build" or args.order == "duration" or args.order == "name": + pkg_histogram(d, args.output, args.order) + elif args.order is None: + pkg_histogram(d, args.output, "name") + else: + sys.stderr.write("Unknown ordering: %s\n" % args.order) + exit(1) +elif args.type == "pie-packages": + pkg_pie_time_per_package(d, args.output) +elif args.type == "pie-steps": + pkg_pie_time_per_step(d, args.output) +else: + sys.stderr.write("Unknown type: %s\n" % args.type) + exit(1) diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends new file mode 100755 index 00000000..d42bebce --- /dev/null +++ b/support/scripts/graph-depends @@ -0,0 +1,357 @@ +#!/usr/bin/env python + +# Usage (the graphviz package must be installed in your distribution) +# ./support/scripts/graph-depends [-p package-name] > test.dot +# dot -Tpdf test.dot -o test.pdf +# +# With no arguments, graph-depends will draw a complete graph of +# dependencies for the current configuration. +# If '-p ' is specified, graph-depends will draw a graph +# of dependencies for the given package name. +# If '-d ' is specified, graph-depends will limit the depth of +# the dependency graph to 'depth' levels. +# +# Limitations +# +# * Some packages have dependencies that depend on the Buildroot +# configuration. For example, many packages have a dependency on +# openssl if openssl has been enabled. This tool will graph the +# dependencies as they are with the current Buildroot +# configuration. +# +# Copyright (C) 2010-2013 Thomas Petazzoni +# Copyright (C) 2019 Yann E. MORIN + +import logging +import sys +import argparse +from fnmatch import fnmatch + +import brpkgutil + +# Modes of operation: +MODE_FULL = 1 # draw full dependency graph for all selected packages +MODE_PKG = 2 # draw dependency graph for a given package + +allpkgs = [] + + +# The Graphviz "dot" utility doesn't like dashes in node names. So for +# node names, we strip all dashes. Also, nodes can't start with a number, +# so we prepend an underscore. +def pkg_node_name(pkg): + return "_" + pkg.replace("-", "") + + +# Basic cache for the results of the is_dep() function, in order to +# optimize the execution time. The cache is a dict of dict of boolean +# values. The key to the primary dict is "pkg", and the key of the +# sub-dicts is "pkg2". +is_dep_cache = {} + + +def is_dep_cache_insert(pkg, pkg2, val): + try: + is_dep_cache[pkg].update({pkg2: val}) + except KeyError: + is_dep_cache[pkg] = {pkg2: val} + + +# Retrieves from the cache whether pkg2 is a transitive dependency +# of pkg. +# Note: raises a KeyError exception if the dependency is not known. +def is_dep_cache_lookup(pkg, pkg2): + return is_dep_cache[pkg][pkg2] + + +# This function return True if pkg is a dependency (direct or +# transitive) of pkg2, dependencies being listed in the deps +# dictionary. Returns False otherwise. +# This is the un-cached version. +def is_dep_uncached(pkg, pkg2, deps): + try: + for p in deps[pkg2]: + if pkg == p: + return True + if is_dep(pkg, p, deps): + return True + except KeyError: + pass + return False + + +# See is_dep_uncached() above; this is the cached version. +def is_dep(pkg, pkg2, deps): + try: + return is_dep_cache_lookup(pkg, pkg2) + except KeyError: + val = is_dep_uncached(pkg, pkg2, deps) + is_dep_cache_insert(pkg, pkg2, val) + return val + + +# This function eliminates transitive dependencies; for example, given +# these dependency chain: A->{B,C} and B->{C}, the A->{C} dependency is +# already covered by B->{C}, so C is a transitive dependency of A, via B. +# The functions does: +# - for each dependency d[i] of the package pkg +# - if d[i] is a dependency of any of the other dependencies d[j] +# - do not keep d[i] +# - otherwise keep d[i] +def remove_transitive_deps(pkg, deps): + d = deps[pkg] + new_d = [] + for i in range(len(d)): + keep_me = True + for j in range(len(d)): + if j == i: + continue + if is_dep(d[i], d[j], deps): + keep_me = False + if keep_me: + new_d.append(d[i]) + return new_d + + +# List of dependencies that all/many packages have, and that we want +# to trim when generating the dependency graph. +MANDATORY_DEPS = ['toolchain', 'skeleton', 'host-skeleton', 'host-tar', 'host-gzip', 'host-ccache'] + + +# This function removes the dependency on some 'mandatory' package, like the +# 'toolchain' package, or the 'skeleton' package +def remove_mandatory_deps(pkg, deps): + return [p for p in deps[pkg] if p not in MANDATORY_DEPS] + + +# This function returns all dependencies of pkg that are part of the +# mandatory dependencies: +def get_mandatory_deps(pkg, deps): + return [p for p in deps[pkg] if p in MANDATORY_DEPS] + + +# This function will check that there is no loop in the dependency chain +# As a side effect, it builds up the dependency cache. +def check_circular_deps(deps): + def recurse(pkg): + if pkg not in list(deps.keys()): + return + if pkg in not_loop: + return + not_loop.append(pkg) + chain.append(pkg) + for p in deps[pkg]: + if p in chain: + logging.warning("\nRecursion detected for : %s" % (p)) + while True: + _p = chain.pop() + logging.warning("which is a dependency of: %s" % (_p)) + if p == _p: + sys.exit(1) + recurse(p) + chain.pop() + + not_loop = [] + chain = [] + for pkg in list(deps.keys()): + recurse(pkg) + + +# This functions trims down the dependency list of all packages. +# It applies in sequence all the dependency-elimination methods. +def remove_extra_deps(deps, rootpkg, transitive, arrow_dir): + # For the direct dependencies, find and eliminate mandatory + # deps, and add them to the root package. Don't do it for a + # reverse graph, because mandatory deps are only direct deps. + if arrow_dir == "forward": + for pkg in list(deps.keys()): + if not pkg == rootpkg: + for d in get_mandatory_deps(pkg, deps): + if d not in deps[rootpkg]: + deps[rootpkg].append(d) + deps[pkg] = remove_mandatory_deps(pkg, deps) + for pkg in list(deps.keys()): + if not transitive or pkg == rootpkg: + deps[pkg] = remove_transitive_deps(pkg, deps) + return deps + + +# Print the attributes of a node: label and fill-color +def print_attrs(outfile, pkg, pkg_type, pkg_version, depth, colors): + name = pkg_node_name(pkg) + if pkg == 'all': + label = 'ALL' + else: + label = pkg + if depth == 0: + color = colors[0] + else: + if pkg_type == "host": + color = colors[2] + else: + color = colors[1] + if pkg_version == "virtual": + outfile.write("%s [label = <%s>]\n" % (name, label)) + else: + outfile.write("%s [label = \"%s\"]\n" % (name, label)) + outfile.write("%s [color=%s,style=filled]\n" % (name, color)) + + +done_deps = [] + + +# Print the dependency graph of a package +def print_pkg_deps(outfile, dict_deps, dict_types, dict_versions, stop_list, exclude_list, + arrow_dir, draw_graph, depth, max_depth, pkg, colors): + if pkg in done_deps: + return + done_deps.append(pkg) + if draw_graph: + print_attrs(outfile, pkg, dict_types[pkg], dict_versions[pkg], depth, colors) + elif depth != 0: + outfile.write("%s " % pkg) + if pkg not in dict_deps: + return + for p in stop_list: + if fnmatch(pkg, p): + return + if dict_versions[pkg] == "virtual" and "virtual" in stop_list: + return + if dict_types[pkg] == "host" and "host" in stop_list: + return + if max_depth == 0 or depth < max_depth: + for d in dict_deps[pkg]: + if dict_versions[d] == "virtual" and "virtual" in exclude_list: + continue + if dict_types[d] == "host" and "host" in exclude_list: + continue + add = True + for p in exclude_list: + if fnmatch(d, p): + add = False + break + if add: + if draw_graph: + outfile.write("%s -> %s [dir=%s]\n" % (pkg_node_name(pkg), pkg_node_name(d), arrow_dir)) + print_pkg_deps(outfile, dict_deps, dict_types, dict_versions, stop_list, exclude_list, + arrow_dir, draw_graph, depth + 1, max_depth, d, colors) + + +def parse_args(): + parser = argparse.ArgumentParser(description="Graph packages dependencies") + parser.add_argument("--check-only", "-C", dest="check_only", action="store_true", default=False, + help="Only do the dependency checks (circular deps...)") + parser.add_argument("--outfile", "-o", metavar="OUT_FILE", dest="outfile", + help="File in which to generate the dot representation") + parser.add_argument("--package", '-p', metavar="PACKAGE", + help="Graph the dependencies of PACKAGE") + parser.add_argument("--depth", '-d', metavar="DEPTH", dest="depth", type=int, default=0, + help="Limit the dependency graph to DEPTH levels; 0 means no limit.") + parser.add_argument("--stop-on", "-s", metavar="PACKAGE", dest="stop_list", action="append", + help="Do not graph past this package (can be given multiple times)." + + " Can be a package name or a glob, " + + " 'virtual' to stop on virtual packages, or " + + "'host' to stop on host packages.") + parser.add_argument("--exclude", "-x", metavar="PACKAGE", dest="exclude_list", action="append", + help="Like --stop-on, but do not add PACKAGE to the graph.") + parser.add_argument("--exclude-mandatory", "-X", action="store_true", + help="Like if -x was passed for all mandatory dependencies.") + parser.add_argument("--colors", "-c", metavar="COLOR_LIST", dest="colors", + default="lightblue,grey,gainsboro", + help="Comma-separated list of the three colors to use" + + " to draw the top-level package, the target" + + " packages, and the host packages, in this order." + + " Defaults to: 'lightblue,grey,gainsboro'") + parser.add_argument("--transitive", dest="transitive", action='store_true', + default=False) + parser.add_argument("--no-transitive", dest="transitive", action='store_false', + help="Draw (do not draw) transitive dependencies") + parser.add_argument("--direct", dest="direct", action='store_true', default=True, + help="Draw direct dependencies (the default)") + parser.add_argument("--reverse", dest="direct", action='store_false', + help="Draw reverse dependencies") + parser.add_argument("--quiet", '-q', dest="quiet", action='store_true', + help="Quiet") + parser.add_argument("--flat-list", '-f', dest="flat_list", action='store_true', default=False, + help="Do not draw graph, just print a flat list") + return parser.parse_args() + + +def main(): + args = parse_args() + + check_only = args.check_only + + logging.basicConfig(stream=sys.stderr, format='%(message)s', + level=logging.WARNING if args.quiet else logging.INFO) + + if args.outfile is None: + outfile = sys.stdout + else: + if check_only: + logging.error("don't specify outfile and check-only at the same time") + sys.exit(1) + outfile = open(args.outfile, "w") + + if args.package is None: + mode = MODE_FULL + rootpkg = 'all' + else: + mode = MODE_PKG + rootpkg = args.package + + if args.stop_list is None: + stop_list = [] + else: + stop_list = args.stop_list + + if args.exclude_list is None: + exclude_list = [] + else: + exclude_list = args.exclude_list + + if args.exclude_mandatory: + exclude_list += MANDATORY_DEPS + + if args.direct: + arrow_dir = "forward" + else: + if mode == MODE_FULL: + logging.error("--reverse needs a package") + sys.exit(1) + arrow_dir = "back" + + draw_graph = not args.flat_list + + # Get the colors: we need exactly three colors, + # so no need not split more than 4 + # We'll let 'dot' validate the colors... + colors = args.colors.split(',', 4) + if len(colors) != 3: + logging.error("Error: incorrect color list '%s'" % args.colors) + sys.exit(1) + + deps, rdeps, dict_types, dict_versions = brpkgutil.get_dependency_tree() + dict_deps = deps if args.direct else rdeps + + check_circular_deps(dict_deps) + if check_only: + sys.exit(0) + + dict_deps = remove_extra_deps(dict_deps, rootpkg, args.transitive, arrow_dir) + + # Start printing the graph data + if draw_graph: + outfile.write("digraph G {\n") + + print_pkg_deps(outfile, dict_deps, dict_types, dict_versions, stop_list, exclude_list, + arrow_dir, draw_graph, 0, args.depth, rootpkg, colors) + + if draw_graph: + outfile.write("}\n") + else: + outfile.write("\n") + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/support/scripts/hardlink-or-copy b/support/scripts/hardlink-or-copy new file mode 100755 index 00000000..a052318f --- /dev/null +++ b/support/scripts/hardlink-or-copy @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Try to hardlink a file into a directory, fallback to copy on failure. +# +# Hardlink-or-copy the source file in the first argument into the +# destination directory in the second argument, using the basename in +# the third argument as basename for the destination file. If the third +# argument is missing, use the basename of the source file as basename +# for the destination file. +# +# In either case, remove the destination prior to doing the +# hardlink-or-copy. +# +# Note that this is NOT an atomic operation. + +set -e + +main() { + local src_file="${1}" + local dst_dir="${2}" + local dst_file="${3}" + + if [ -n "${dst_file}" ]; then + dst_file="${dst_dir}/${dst_file}" + else + dst_file="${dst_dir}/${src_file##*/}" + fi + + mkdir -p "${dst_dir}" + rm -f "${dst_file}" + ln -f "${src_file}" "${dst_file}" 2>/dev/null \ + || cp -f "${src_file}" "${dst_file}" +} + +main "${@}" diff --git a/support/scripts/mkmakefile b/support/scripts/mkmakefile new file mode 100755 index 00000000..c7569f2c --- /dev/null +++ b/support/scripts/mkmakefile @@ -0,0 +1,52 @@ +#!/bin/sh +# Generates a small Makefile used in the root of the output +# directory, to allow make to be started from there. +# The Makefile also allow for more convenient build of external modules + +# Usage +# $1 - Kernel src directory +# $2 - Output directory + + +test ! -r $2/Makefile -o -O $2/Makefile || exit 0 +# Only overwrite automatically generated Makefiles +# (so we do not overwrite buildroot Makefile) +if test -e $2/Makefile && ! grep -q Automatically $2/Makefile +then + exit 0 +fi +echo " GEN $2/Makefile" + +cat << EOF > $2/Makefile +# Automatically generated by $0: don't edit + +ifeq ("\$(origin V)", "command line") +VERBOSE := \$(V) +endif +ifneq (\$(VERBOSE),1) +Q := @ +endif + +lastword = \$(word \$(words \$(1)),\$(1)) +makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST))) + +MAKEARGS := -C $1 +MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir)) + +MAKEFLAGS += --no-print-directory + +.PHONY: _all \$(MAKECMDGOALS) + +all := \$(filter-out Makefile,\$(MAKECMDGOALS)) + +_all: + \$(Q)umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all) + +Makefile:; + +\$(all): _all + @: + +%/: _all + @: +EOF diff --git a/support/scripts/mkusers b/support/scripts/mkusers new file mode 100755 index 00000000..d00ba338 --- /dev/null +++ b/support/scripts/mkusers @@ -0,0 +1,443 @@ +#!/usr/bin/env bash +set -e +myname="${0##*/}" + +#---------------------------------------------------------------------------- +# Configurable items +MIN_UID=1000 +MAX_UID=1999 +MIN_GID=1000 +MAX_GID=1999 +# No more is configurable below this point +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +error() { + local fmt="${1}" + shift + + printf "%s: " "${myname}" >&2 + printf "${fmt}" "${@}" >&2 +} +fail() { + error "$@" + exit 1 +} + +#---------------------------------------------------------------------------- +if [ ${#} -ne 2 ]; then + fail "usage: %s USERS_TABLE TARGET_DIR\n" +fi +USERS_TABLE="${1}" +TARGET_DIR="${2}" +shift 2 +PASSWD="${TARGET_DIR}/etc/passwd" +SHADOW="${TARGET_DIR}/etc/shadow" +GROUP="${TARGET_DIR}/etc/group" +# /etc/gshadow is not part of the standard skeleton, so not everybody +# will have it, but some may have it, and its content must be in sync +# with /etc/group, so any use of gshadow must be conditional. +GSHADOW="${TARGET_DIR}/etc/gshadow" + +# We can't simply source ${BR2_CONFIG} as it may contains constructs +# such as: +# BR2_DEFCONFIG="$(CONFIG_DIR)/defconfig" +# which when sourced from a shell script will eventually try to execute +# a command named 'CONFIG_DIR', which is plain wrong for virtually every +# systems out there. +# So, we have to scan that file instead. Sigh... :-( +PASSWD_METHOD="$( sed -r -e '/^BR2_TARGET_GENERIC_PASSWD_METHOD="(.*)"$/!d;' \ + -e 's//\1/;' \ + "${BR2_CONFIG}" \ + )" + +#---------------------------------------------------------------------------- +get_uid() { + local username="${1}" + + awk -F: -v username="${username}" \ + '$1 == username { printf( "%d\n", $3 ); }' "${PASSWD}" +} + +#---------------------------------------------------------------------------- +get_ugid() { + local username="${1}" + + awk -F: -v username="${username}" \ + '$1 == username { printf( "%d\n", $4 ); }' "${PASSWD}" +} + +#---------------------------------------------------------------------------- +get_gid() { + local group="${1}" + + awk -F: -v group="${group}" \ + '$1 == group { printf( "%d\n", $3 ); }' "${GROUP}" +} + +#---------------------------------------------------------------------------- +get_members() { + local group="${1}" + + awk -F: -v group="${group}" \ + '$1 == group { printf( "%s\n", $4 ); }' "${GROUP}" +} + +#---------------------------------------------------------------------------- +get_username() { + local uid="${1}" + + awk -F: -v uid="${uid}" \ + '$3 == uid { printf( "%s\n", $1 ); }' "${PASSWD}" +} + +#---------------------------------------------------------------------------- +get_group() { + local gid="${1}" + + awk -F: -v gid="${gid}" \ + '$3 == gid { printf( "%s\n", $1 ); }' "${GROUP}" +} + +#---------------------------------------------------------------------------- +get_ugroup() { + local username="${1}" + local ugid + + ugid="$( get_ugid "${username}" )" + if [ -n "${ugid}" ]; then + get_group "${ugid}" + fi +} + +#---------------------------------------------------------------------------- +# Sanity-check the new user/group: +# - check the gid is not already used for another group +# - check the group does not already exist with another gid +# - check the user does not already exist with another gid +# - check the uid is not already used for another user +# - check the user does not already exist with another uid +# - check the user does not already exist in another group +check_user_validity() { + local username="${1}" + local uid="${2}" + local group="${3}" + local gid="${4}" + local _uid _ugid _gid _username _group _ugroup + + _group="$( get_group "${gid}" )" + _gid="$( get_gid "${group}" )" + _ugid="$( get_ugid "${username}" )" + _username="$( get_username "${uid}" )" + _uid="$( get_uid "${username}" )" + _ugroup="$( get_ugroup "${username}" )" + + if [ "${username}" = "root" ]; then + fail "invalid username '%s\n'" "${username}" + fi + + if [ ${gid} -lt -1 -o ${gid} -eq 0 ]; then + fail "invalid gid '%d' for '%s'\n" ${gid} "${username}" + elif [ ${gid} -ne -1 ]; then + # check the gid is not already used for another group + if [ -n "${_group}" -a "${_group}" != "${group}" ]; then + fail "gid '%d' for '%s' is already used by group '%s'\n" \ + ${gid} "${username}" "${_group}" + fi + + # check the group does not already exists with another gid + # Need to split the check in two, otherwise '[' complains it + # is missing arguments when _gid is empty + if [ -n "${_gid}" ] && [ ${_gid} -ne ${gid} ]; then + fail "group '%s' for '%s' already exists with gid '%d' (wants '%d')\n" \ + "${group}" "${username}" ${_gid} ${gid} + fi + + # check the user does not already exists with another gid + # Need to split the check in two, otherwise '[' complains it + # is missing arguments when _ugid is empty + if [ -n "${_ugid}" ] && [ ${_ugid} -ne ${gid} ]; then + fail "user '%s' already exists with gid '%d' (wants '%d')\n" \ + "${username}" ${_ugid} ${gid} + fi + fi + + if [ ${uid} -lt -1 -o ${uid} -eq 0 ]; then + fail "invalid uid '%d' for '%s'\n" ${uid} "${username}" + elif [ ${uid} -ne -1 ]; then + # check the uid is not already used for another user + if [ -n "${_username}" -a "${_username}" != "${username}" ]; then + fail "uid '%d' for '%s' already used by user '%s'\n" \ + ${uid} "${username}" "${_username}" + fi + + # check the user does not already exists with another uid + # Need to split the check in two, otherwise '[' complains it + # is missing arguments when _uid is empty + if [ -n "${_uid}" ] && [ ${_uid} -ne ${uid} ]; then + fail "user '%s' already exists with uid '%d' (wants '%d')\n" \ + "${username}" ${_uid} ${uid} + fi + fi + + # check the user does not already exist in another group + if [ -n "${_ugroup}" -a "${_ugroup}" != "${group}" ]; then + fail "user '%s' already exists with group '%s' (wants '%s')\n" \ + "${username}" "${_ugroup}" "${group}" + fi + + return 0 +} + +#---------------------------------------------------------------------------- +# Generate a unique GID for given group. If the group already exists, +# then simply report its current GID. Otherwise, generate the lowest GID +# that is: +# - not 0 +# - comprised in [MIN_GID..MAX_GID] +# - not already used by a group +generate_gid() { + local group="${1}" + local gid + + gid="$( get_gid "${group}" )" + if [ -z "${gid}" ]; then + for(( gid=MIN_GID; gid<=MAX_GID; gid++ )); do + if [ -z "$( get_group "${gid}" )" ]; then + break + fi + done + if [ ${gid} -gt ${MAX_GID} ]; then + fail "can not allocate a GID for group '%s'\n" "${group}" + fi + fi + printf "%d\n" "${gid}" +} + +#---------------------------------------------------------------------------- +# Add a group; if it does already exist, remove it first +add_one_group() { + local group="${1}" + local gid="${2}" + local members + + # Generate a new GID if needed + if [ ${gid} -eq -1 ]; then + gid="$( generate_gid "${group}" )" + fi + + members=$(get_members "$group") + # Remove any previous instance of this group, and re-add the new one + sed -i --follow-symlinks -e '/^'"${group}"':.*/d;' "${GROUP}" + printf "%s:x:%d:%s\n" "${group}" "${gid}" "${members}" >>"${GROUP}" + + # Ditto for /etc/gshadow if it exists + if [ -f "${GSHADOW}" ]; then + sed -i --follow-symlinks -e '/^'"${group}"':.*/d;' "${GSHADOW}" + printf "%s:*::\n" "${group}" >>"${GSHADOW}" + fi +} + +#---------------------------------------------------------------------------- +# Generate a unique UID for given username. If the username already exists, +# then simply report its current UID. Otherwise, generate the lowest UID +# that is: +# - not 0 +# - comprised in [MIN_UID..MAX_UID] +# - not already used by a user +generate_uid() { + local username="${1}" + local uid + + uid="$( get_uid "${username}" )" + if [ -z "${uid}" ]; then + for(( uid=MIN_UID; uid<=MAX_UID; uid++ )); do + if [ -z "$( get_username "${uid}" )" ]; then + break + fi + done + if [ ${uid} -gt ${MAX_UID} ]; then + fail "can not allocate a UID for user '%s'\n" "${username}" + fi + fi + printf "%d\n" "${uid}" +} + +#---------------------------------------------------------------------------- +# Add given user to given group, if not already the case +add_user_to_group() { + local username="${1}" + local group="${2}" + local _f + + for _f in "${GROUP}" "${GSHADOW}"; do + [ -f "${_f}" ] || continue + sed -r -i --follow-symlinks \ + -e 's/^('"${group}"':.*:)(([^:]+,)?)'"${username}"'(,[^:]+*)?$/\1\2\4/;' \ + -e 's/^('"${group}"':.*)$/\1,'"${username}"'/;' \ + -e 's/,+/,/' \ + -e 's/:,/:/' \ + "${_f}" + done +} + +#---------------------------------------------------------------------------- +# Encode a password +encode_password() { + local passwd="${1}" + + mkpasswd -m "${PASSWD_METHOD}" "${passwd}" +} + +#---------------------------------------------------------------------------- +# Add a user; if it does already exist, remove it first +add_one_user() { + local username="${1}" + local uid="${2}" + local group="${3}" + local gid="${4}" + local passwd="${5}" + local home="${6}" + local shell="${7}" + local groups="${8}" + local comment="${9}" + local _f _group _home _shell _gid _passwd + + # First, sanity-check the user + check_user_validity "${username}" "${uid}" "${group}" "${gid}" + + # Generate a new UID if needed + if [ ${uid} -eq -1 ]; then + uid="$( generate_uid "${username}" )" + fi + + # Remove any previous instance of this user + for _f in "${PASSWD}" "${SHADOW}"; do + sed -r -i --follow-symlinks -e '/^'"${username}"':.*/d;' "${_f}" + done + + _gid="$( get_gid "${group}" )" + _shell="${shell}" + if [ "${shell}" = "-" ]; then + _shell="/bin/false" + fi + case "${home}" in + -) _home="/";; + /) fail "home can not explicitly be '/'\n";; + /*) _home="${home}";; + *) fail "home must be an absolute path\n";; + esac + case "${passwd}" in + -) + _passwd="" + ;; + !=*) + _passwd='!'"$( encode_password "${passwd#!=}" )" + ;; + =*) + _passwd="$( encode_password "${passwd#=}" )" + ;; + *) + _passwd="${passwd}" + ;; + esac + + printf "%s:x:%d:%d:%s:%s:%s\n" \ + "${username}" "${uid}" "${_gid}" \ + "${comment}" "${_home}" "${_shell}" \ + >>"${PASSWD}" + printf "%s:%s:::::::\n" \ + "${username}" "${_passwd}" \ + >>"${SHADOW}" + + # Add the user to its additional groups + if [ "${groups}" != "-" ]; then + for _group in ${groups//,/ }; do + add_user_to_group "${username}" "${_group}" + done + fi + + # If the user has a home, chown it + # (Note: stdout goes to the fakeroot-script) + if [ "${home}" != "-" ]; then + mkdir -p "${TARGET_DIR}/${home}" + printf "chown -h -R %d:%d '%s'\n" "${uid}" "${_gid}" "${TARGET_DIR}/${home}" + fi +} + +#---------------------------------------------------------------------------- +main() { + local username uid group gid passwd home shell groups comment + local line + local -a ENTRIES + + # Some sanity checks + if [ ${MIN_UID} -le 0 ]; then + fail "MIN_UID must be >0 (currently %d)\n" ${MIN_UID} + fi + if [ ${MIN_GID} -le 0 ]; then + fail "MIN_GID must be >0 (currently %d)\n" ${MIN_GID} + fi + + # Read in all the file in memory, exclude empty lines and comments + while read line; do + ENTRIES+=( "${line}" ) + done < <( sed -r -e 's/#.*//; /^[[:space:]]*$/d;' "${USERS_TABLE}" ) + + # We first create groups whose gid is not -1, and then we create groups + # whose gid is -1 (automatic), so that, if a group is defined both with + # a specified gid and an automatic gid, we ensure the specified gid is + # used, rather than a different automatic gid is computed. + + # First, create all the main groups which gid is *not* automatic + for line in "${ENTRIES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + [ ${gid} -ge 0 ] || continue # Automatic gid + add_one_group "${group}" "${gid}" + done + + # Then, create all the main groups which gid *is* automatic + for line in "${ENTRIES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + [ ${gid} -eq -1 ] || continue # Non-automatic gid + add_one_group "${group}" "${gid}" + done + + # Then, create all the additional groups + # If any additional group is already a main group, we should use + # the gid of that main group; otherwise, we can use any gid + for line in "${ENTRIES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + if [ "${groups}" != "-" ]; then + for g in ${groups//,/ }; do + add_one_group "${g}" -1 + done + fi + done + + # When adding users, we do as for groups, in case two packages create + # the same user, one with an automatic uid, the other with a specified + # uid, to ensure the specified uid is used, rather than an incompatible + # uid be generated. + + # Now, add users whose uid is *not* automatic + for line in "${ENTRIES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + [ "${username}" != "-" ] || continue # Magic string to skip user creation + [ ${uid} -ge 0 ] || continue # Automatic uid + add_one_user "${username}" "${uid}" "${group}" "${gid}" "${passwd}" \ + "${home}" "${shell}" "${groups}" "${comment}" + done + + # Finally, add users whose uid *is* automatic + for line in "${ENTRIES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + [ "${username}" != "-" ] || continue # Magic string to skip user creation + [ ${uid} -eq -1 ] || continue # Non-automatic uid + add_one_user "${username}" "${uid}" "${group}" "${gid}" "${passwd}" \ + "${home}" "${shell}" "${groups}" "${comment}" + done +} + +#---------------------------------------------------------------------------- +main "${@}" diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats new file mode 100755 index 00000000..44ed4448 --- /dev/null +++ b/support/scripts/pkg-stats @@ -0,0 +1,1132 @@ +#!/usr/bin/env python3 + +# Copyright (C) 2009 by Thomas Petazzoni +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +import aiohttp +import argparse +import asyncio +import datetime +import fnmatch +import os +from collections import defaultdict +import re +import subprocess +import json +import sys + +brpath = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) + +sys.path.append(os.path.join(brpath, "utils")) +from getdeveloperlib import parse_developers # noqa: E402 +from cpedb import CPEDB # noqa: E402 + +INFRA_RE = re.compile(r"\$\(eval \$\(([a-z-]*)-package\)\)") +URL_RE = re.compile(r"\s*https?://\S*\s*$") + +RM_API_STATUS_ERROR = 1 +RM_API_STATUS_FOUND_BY_DISTRO = 2 +RM_API_STATUS_FOUND_BY_PATTERN = 3 +RM_API_STATUS_NOT_FOUND = 4 + + +class Defconfig: + def __init__(self, name, path): + self.name = name + self.path = path + self.developers = None + + def set_developers(self, developers): + """ + Fills in the .developers field + """ + self.developers = [ + developer.name + for developer in developers + if developer.hasfile(self.path) + ] + + +def get_defconfig_list(): + """ + Builds the list of Buildroot defconfigs, returning a list of Defconfig + objects. + """ + return [ + Defconfig(name[:-len('_defconfig')], os.path.join('configs', name)) + for name in os.listdir(os.path.join(brpath, 'configs')) + if name.endswith('_defconfig') + ] + + +class Package: + all_licenses = dict() + all_license_files = list() + all_versions = dict() + all_ignored_cves = dict() + all_cpeids = dict() + # This is the list of all possible checks. Add new checks to this list so + # a tool that post-processeds the json output knows the checks before + # iterating over the packages. + status_checks = ['cve', 'developers', 'hash', 'license', + 'license-files', 'patches', 'pkg-check', 'url', 'version'] + + def __init__(self, name, path): + self.name = name + self.path = path + self.pkg_path = os.path.dirname(path) + self.infras = None + self.license = None + self.has_license = False + self.has_license_files = False + self.has_hash = False + self.patch_files = [] + self.warnings = 0 + self.current_version = None + self.url = None + self.url_worker = None + self.cpeid = None + self.cves = list() + self.ignored_cves = list() + self.latest_version = {'status': RM_API_STATUS_ERROR, 'version': None, 'id': None} + self.status = {} + + def pkgvar(self): + return self.name.upper().replace("-", "_") + + def set_url(self): + """ + Fills in the .url field + """ + self.status['url'] = ("warning", "no Config.in") + pkgdir = os.path.dirname(os.path.join(brpath, self.path)) + for filename in os.listdir(pkgdir): + if fnmatch.fnmatch(filename, 'Config.*'): + fp = open(os.path.join(pkgdir, filename), "r") + for config_line in fp: + if URL_RE.match(config_line): + self.url = config_line.strip() + self.status['url'] = ("ok", "found") + fp.close() + return + self.status['url'] = ("error", "missing") + fp.close() + + @property + def patch_count(self): + return len(self.patch_files) + + @property + def has_valid_infra(self): + try: + if self.infras[0][1] == 'virtual': + return False + except IndexError: + return False + return True + + def set_infra(self): + """ + Fills in the .infras field + """ + self.infras = list() + with open(os.path.join(brpath, self.path), 'r') as f: + lines = f.readlines() + for line in lines: + match = INFRA_RE.match(line) + if not match: + continue + infra = match.group(1) + if infra.startswith("host-"): + self.infras.append(("host", infra[5:])) + else: + self.infras.append(("target", infra)) + + def set_license(self): + """ + Fills in the .status['license'] and .status['license-files'] fields + """ + if not self.has_valid_infra: + self.status['license'] = ("na", "no valid package infra") + self.status['license-files'] = ("na", "no valid package infra") + return + + var = self.pkgvar() + self.status['license'] = ("error", "missing") + self.status['license-files'] = ("error", "missing") + if var in self.all_licenses: + self.license = self.all_licenses[var] + self.status['license'] = ("ok", "found") + if var in self.all_license_files: + self.status['license-files'] = ("ok", "found") + + def set_hash_info(self): + """ + Fills in the .status['hash'] field + """ + if not self.has_valid_infra: + self.status['hash'] = ("na", "no valid package infra") + self.status['hash-license'] = ("na", "no valid package infra") + return + + hashpath = self.path.replace(".mk", ".hash") + if os.path.exists(os.path.join(brpath, hashpath)): + self.status['hash'] = ("ok", "found") + else: + self.status['hash'] = ("error", "missing") + + def set_patch_count(self): + """ + Fills in the .patch_count, .patch_files and .status['patches'] fields + """ + if not self.has_valid_infra: + self.status['patches'] = ("na", "no valid package infra") + return + + pkgdir = os.path.dirname(os.path.join(brpath, self.path)) + for subdir, _, _ in os.walk(pkgdir): + self.patch_files = fnmatch.filter(os.listdir(subdir), '*.patch') + + if self.patch_count == 0: + self.status['patches'] = ("ok", "no patches") + elif self.patch_count < 5: + self.status['patches'] = ("warning", "some patches") + else: + self.status['patches'] = ("error", "lots of patches") + + def set_current_version(self): + """ + Fills in the .current_version field + """ + var = self.pkgvar() + if var in self.all_versions: + self.current_version = self.all_versions[var] + + def set_cpeid(self): + """ + Fills in the .cpeid field + """ + var = self.pkgvar() + if not self.has_valid_infra: + self.status['cpe'] = ("na", "no valid package infra") + return + + if var in self.all_cpeids: + self.cpeid = self.all_cpeids[var] + # Set a preliminary status, it might be overridden by check_package_cpes() + self.status['cpe'] = ("warning", "not checked against CPE dictionnary") + else: + self.status['cpe'] = ("error", "no verified CPE identifier") + + def set_check_package_warnings(self): + """ + Fills in the .warnings and .status['pkg-check'] fields + """ + cmd = [os.path.join(brpath, "utils/check-package")] + pkgdir = os.path.dirname(os.path.join(brpath, self.path)) + self.status['pkg-check'] = ("error", "Missing") + for root, dirs, files in os.walk(pkgdir): + for f in files: + if f.endswith(".mk") or f.endswith(".hash") or f == "Config.in" or f == "Config.in.host": + cmd.append(os.path.join(root, f)) + o = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[1] + lines = o.splitlines() + for line in lines: + m = re.match("^([0-9]*) warnings generated", line.decode()) + if m: + self.warnings = int(m.group(1)) + if self.warnings == 0: + self.status['pkg-check'] = ("ok", "no warnings") + else: + self.status['pkg-check'] = ("error", "{} warnings".format(self.warnings)) + return + + def set_ignored_cves(self): + """ + Give the list of CVEs ignored by the package + """ + self.ignored_cves = list(self.all_ignored_cves.get(self.pkgvar(), [])) + + def set_developers(self, developers): + """ + Fills in the .developers and .status['developers'] field + """ + self.developers = [ + dev.name + for dev in developers + if dev.hasfile(self.path) + ] + + if self.developers: + self.status['developers'] = ("ok", "{} developers".format(len(self.developers))) + else: + self.status['developers'] = ("warning", "no developers") + + def is_status_ok(self, name): + return name in self.status and self.status[name][0] == 'ok' + + def is_status_error(self, name): + return name in self.status and self.status[name][0] == 'error' + + def is_status_na(self, name): + return name in self.status and self.status[name][0] == 'na' + + def __eq__(self, other): + return self.path == other.path + + def __lt__(self, other): + return self.path < other.path + + def __str__(self): + return "%s (path='%s', license='%s', license_files='%s', hash='%s', patches=%d)" % \ + (self.name, self.path, self.is_status_ok('license'), + self.is_status_ok('license-files'), self.status['hash'], self.patch_count) + + +def get_pkglist(npackages, package_list): + """ + Builds the list of Buildroot packages, returning a list of Package + objects. Only the .name and .path fields of the Package object are + initialized. + + npackages: limit to N packages + package_list: limit to those packages in this list + """ + WALK_USEFUL_SUBDIRS = ["boot", "linux", "package", "toolchain"] + WALK_EXCLUDES = ["boot/common.mk", + "linux/linux-ext-.*.mk", + "package/freescale-imx/freescale-imx.mk", + "package/gcc/gcc.mk", + "package/gstreamer/gstreamer.mk", + "package/gstreamer1/gstreamer1.mk", + "package/gtk2-themes/gtk2-themes.mk", + "package/matchbox/matchbox.mk", + "package/opengl/opengl.mk", + "package/qt5/qt5.mk", + "package/x11r7/x11r7.mk", + "package/doc-asciidoc.mk", + "package/pkg-.*.mk", + "toolchain/toolchain-external/pkg-toolchain-external.mk", + "toolchain/toolchain-external/toolchain-external.mk", + "toolchain/toolchain.mk", + "toolchain/helpers.mk", + "toolchain/toolchain-wrapper.mk"] + packages = list() + count = 0 + for root, dirs, files in os.walk(brpath): + root = os.path.relpath(root, brpath) + rootdir = root.split("/") + if len(rootdir) < 1: + continue + if rootdir[0] not in WALK_USEFUL_SUBDIRS: + continue + for f in files: + if not f.endswith(".mk"): + continue + # Strip ending ".mk" + pkgname = f[:-3] + if package_list and pkgname not in package_list: + continue + pkgpath = os.path.join(root, f) + skip = False + for exclude in WALK_EXCLUDES: + if re.match(exclude, pkgpath): + skip = True + continue + if skip: + continue + p = Package(pkgname, pkgpath) + packages.append(p) + count += 1 + if npackages and count == npackages: + return packages + return packages + + +def get_config_packages(): + cmd = ["make", "--no-print-directory", "show-info"] + js = json.loads(subprocess.check_output(cmd)) + return set([v["name"] for v in js.values()]) + + +def package_init_make_info(): + # Fetch all variables at once + variables = subprocess.check_output(["make", "BR2_HAVE_DOT_CONFIG=y", "-s", "printvars", + "VARS=%_LICENSE %_LICENSE_FILES %_VERSION %_IGNORE_CVES %_CPE_ID"]) + variable_list = variables.decode().splitlines() + + # We process first the host package VERSION, and then the target + # package VERSION. This means that if a package exists in both + # target and host variants, with different values (eg. version + # numbers (unlikely)), we'll report the target one. + variable_list = [x[5:] for x in variable_list if x.startswith("HOST_")] + \ + [x for x in variable_list if not x.startswith("HOST_")] + + for item in variable_list: + # Get variable name and value + pkgvar, value = item.split("=") + + # Strip the suffix according to the variable + if pkgvar.endswith("_LICENSE"): + # If value is "unknown", no license details available + if value == "unknown": + continue + pkgvar = pkgvar[:-8] + Package.all_licenses[pkgvar] = value + + elif pkgvar.endswith("_LICENSE_FILES"): + if pkgvar.endswith("_MANIFEST_LICENSE_FILES"): + continue + pkgvar = pkgvar[:-14] + Package.all_license_files.append(pkgvar) + + elif pkgvar.endswith("_VERSION"): + if pkgvar.endswith("_DL_VERSION"): + continue + pkgvar = pkgvar[:-8] + Package.all_versions[pkgvar] = value + + elif pkgvar.endswith("_IGNORE_CVES"): + pkgvar = pkgvar[:-12] + Package.all_ignored_cves[pkgvar] = value.split() + + elif pkgvar.endswith("_CPE_ID"): + pkgvar = pkgvar[:-7] + Package.all_cpeids[pkgvar] = value + + +check_url_count = 0 + + +async def check_url_status(session, pkg, npkgs, retry=True): + global check_url_count + + try: + async with session.get(pkg.url) as resp: + if resp.status >= 400: + pkg.status['url'] = ("error", "invalid {}".format(resp.status)) + check_url_count += 1 + print("[%04d/%04d] %s" % (check_url_count, npkgs, pkg.name)) + return + except (aiohttp.ClientError, asyncio.TimeoutError): + if retry: + return await check_url_status(session, pkg, npkgs, retry=False) + else: + pkg.status['url'] = ("error", "invalid (err)") + check_url_count += 1 + print("[%04d/%04d] %s" % (check_url_count, npkgs, pkg.name)) + return + + pkg.status['url'] = ("ok", "valid") + check_url_count += 1 + print("[%04d/%04d] %s" % (check_url_count, npkgs, pkg.name)) + + +async def check_package_urls(packages): + tasks = [] + connector = aiohttp.TCPConnector(limit_per_host=5) + async with aiohttp.ClientSession(connector=connector, trust_env=True) as sess: + packages = [p for p in packages if p.status['url'][0] == 'ok'] + for pkg in packages: + tasks.append(asyncio.ensure_future(check_url_status(sess, pkg, len(packages)))) + await asyncio.wait(tasks) + + +def check_package_latest_version_set_status(pkg, status, version, identifier): + pkg.latest_version = { + "status": status, + "version": version, + "id": identifier, + } + + if pkg.latest_version['status'] == RM_API_STATUS_ERROR: + pkg.status['version'] = ('warning', "Release Monitoring API error") + elif pkg.latest_version['status'] == RM_API_STATUS_NOT_FOUND: + pkg.status['version'] = ('warning', "Package not found on Release Monitoring") + + if pkg.latest_version['version'] is None: + pkg.status['version'] = ('warning', "No upstream version available on Release Monitoring") + elif pkg.latest_version['version'] != pkg.current_version: + pkg.status['version'] = ('error', "The newer version {} is available upstream".format(pkg.latest_version['version'])) + else: + pkg.status['version'] = ('ok', 'up-to-date') + + +async def check_package_get_latest_version_by_distro(session, pkg, retry=True): + url = "https://release-monitoring.org//api/project/Buildroot/%s" % pkg.name + try: + async with session.get(url) as resp: + if resp.status != 200: + return False + + data = await resp.json() + version = data['version'] if 'version' in data else None + check_package_latest_version_set_status(pkg, + RM_API_STATUS_FOUND_BY_DISTRO, + version, + data['id']) + return True + + except (aiohttp.ClientError, asyncio.TimeoutError): + if retry: + return await check_package_get_latest_version_by_distro(session, pkg, retry=False) + else: + return False + + +async def check_package_get_latest_version_by_guess(session, pkg, retry=True): + url = "https://release-monitoring.org/api/projects/?pattern=%s" % pkg.name + try: + async with session.get(url) as resp: + if resp.status != 200: + return False + + data = await resp.json() + # filter projects that have the right name and a version defined + projects = [p for p in data['projects'] if p['name'] == pkg.name and 'version' in p] + projects.sort(key=lambda x: x['id']) + + if len(projects) > 0: + check_package_latest_version_set_status(pkg, + RM_API_STATUS_FOUND_BY_DISTRO, + projects[0]['version'], + projects[0]['id']) + return True + + except (aiohttp.ClientError, asyncio.TimeoutError): + if retry: + return await check_package_get_latest_version_by_guess(session, pkg, retry=False) + else: + return False + + +check_latest_count = 0 + + +async def check_package_latest_version_get(session, pkg, npkgs): + global check_latest_count + + if await check_package_get_latest_version_by_distro(session, pkg): + check_latest_count += 1 + print("[%04d/%04d] %s" % (check_latest_count, npkgs, pkg.name)) + return + + if await check_package_get_latest_version_by_guess(session, pkg): + check_latest_count += 1 + print("[%04d/%04d] %s" % (check_latest_count, npkgs, pkg.name)) + return + + check_package_latest_version_set_status(pkg, + RM_API_STATUS_NOT_FOUND, + None, None) + check_latest_count += 1 + print("[%04d/%04d] %s" % (check_latest_count, npkgs, pkg.name)) + + +async def check_package_latest_version(packages): + """ + Fills in the .latest_version field of all Package objects + + This field is a dict and has the following keys: + + - status: one of RM_API_STATUS_ERROR, + RM_API_STATUS_FOUND_BY_DISTRO, RM_API_STATUS_FOUND_BY_PATTERN, + RM_API_STATUS_NOT_FOUND + - version: string containing the latest version known by + release-monitoring.org for this package + - id: string containing the id of the project corresponding to this + package, as known by release-monitoring.org + """ + + for pkg in [p for p in packages if not p.has_valid_infra]: + pkg.status['version'] = ("na", "no valid package infra") + + tasks = [] + connector = aiohttp.TCPConnector(limit_per_host=5) + async with aiohttp.ClientSession(connector=connector, trust_env=True) as sess: + packages = [p for p in packages if p.has_valid_infra] + for pkg in packages: + tasks.append(asyncio.ensure_future(check_package_latest_version_get(sess, pkg, len(packages)))) + await asyncio.wait(tasks) + + +def check_package_cve_affects(cve, cpe_product_pkgs): + for product in cve.affected_products: + if product not in cpe_product_pkgs: + continue + for pkg in cpe_product_pkgs[product]: + if cve.affects(pkg.name, pkg.current_version, pkg.ignored_cves, pkg.cpeid) == cve.CVE_AFFECTS: + pkg.cves.append(cve.identifier) + + +def check_package_cves(nvd_path, packages): + if not os.path.isdir(nvd_path): + os.makedirs(nvd_path) + + cpe_product_pkgs = defaultdict(list) + for pkg in packages: + if not pkg.has_valid_infra: + pkg.status['cve'] = ("na", "no valid package infra") + continue + if not pkg.current_version: + pkg.status['cve'] = ("na", "no version information available") + continue + if pkg.cpeid: + cpe_product = cvecheck.cpe_product(pkg.cpeid) + cpe_product_pkgs[cpe_product].append(pkg) + else: + cpe_product_pkgs[pkg.name].append(pkg) + + for cve in cvecheck.CVE.read_nvd_dir(nvd_path): + check_package_cve_affects(cve, cpe_product_pkgs) + + for pkg in packages: + if 'cve' not in pkg.status: + if pkg.cves: + pkg.status['cve'] = ("error", "affected by CVEs") + else: + pkg.status['cve'] = ("ok", "not affected by CVEs") + + +def check_package_cpes(nvd_path, packages): + cpedb = CPEDB(nvd_path) + cpedb.get_xml_dict() + for p in packages: + if not p.cpeid: + continue + if cpedb.find(p.cpeid): + p.status['cpe'] = ("ok", "verified CPE identifier") + else: + p.status['cpe'] = ("error", "CPE identifier unknown in CPE database") + + +def calculate_stats(packages): + stats = defaultdict(int) + stats['packages'] = len(packages) + for pkg in packages: + # If packages have multiple infra, take the first one. For the + # vast majority of packages, the target and host infra are the + # same. There are very few packages that use a different infra + # for the host and target variants. + if len(pkg.infras) > 0: + infra = pkg.infras[0][1] + stats["infra-%s" % infra] += 1 + else: + stats["infra-unknown"] += 1 + if pkg.is_status_ok('license'): + stats["license"] += 1 + else: + stats["no-license"] += 1 + if pkg.is_status_ok('license-files'): + stats["license-files"] += 1 + else: + stats["no-license-files"] += 1 + if pkg.is_status_ok('hash'): + stats["hash"] += 1 + else: + stats["no-hash"] += 1 + if pkg.latest_version['status'] == RM_API_STATUS_FOUND_BY_DISTRO: + stats["rmo-mapping"] += 1 + else: + stats["rmo-no-mapping"] += 1 + if not pkg.latest_version['version']: + stats["version-unknown"] += 1 + elif pkg.latest_version['version'] == pkg.current_version: + stats["version-uptodate"] += 1 + else: + stats["version-not-uptodate"] += 1 + stats["patches"] += pkg.patch_count + stats["total-cves"] += len(pkg.cves) + if len(pkg.cves) != 0: + stats["pkg-cves"] += 1 + if pkg.cpeid: + stats["cpe-id"] += 1 + else: + stats["no-cpe-id"] += 1 + return stats + + +html_header = """ + + + +Statistics of Buildroot packages + + +Results
+ +

+""" + + +html_footer = """ + + + +""" + + +def infra_str(infra_list): + if not infra_list: + return "Unknown" + elif len(infra_list) == 1: + return "%s
%s" % (infra_list[0][1], infra_list[0][0]) + elif infra_list[0][1] == infra_list[1][1]: + return "%s
%s + %s" % \ + (infra_list[0][1], infra_list[0][0], infra_list[1][0]) + else: + return "%s (%s)
%s (%s)" % \ + (infra_list[0][1], infra_list[0][0], + infra_list[1][1], infra_list[1][0]) + + +def boolean_str(b): + if b: + return "Yes" + else: + return "No" + + +def dump_html_pkg(f, pkg): + f.write(" \n") + f.write(" %s\n" % pkg.path) + + # Patch count + td_class = ["centered"] + if pkg.patch_count == 0: + td_class.append("nopatches") + elif pkg.patch_count < 5: + td_class.append("somepatches") + else: + td_class.append("lotsofpatches") + f.write(" %s\n" % + (" ".join(td_class), str(pkg.patch_count))) + + # Infrastructure + infra = infra_str(pkg.infras) + td_class = ["centered"] + if infra == "Unknown": + td_class.append("wrong") + else: + td_class.append("correct") + f.write(" %s\n" % + (" ".join(td_class), infra_str(pkg.infras))) + + # License + td_class = ["centered"] + if pkg.is_status_ok('license'): + td_class.append("correct") + else: + td_class.append("wrong") + f.write(" %s\n" % + (" ".join(td_class), boolean_str(pkg.is_status_ok('license')))) + + # License files + td_class = ["centered"] + if pkg.is_status_ok('license-files'): + td_class.append("correct") + else: + td_class.append("wrong") + f.write(" %s\n" % + (" ".join(td_class), boolean_str(pkg.is_status_ok('license-files')))) + + # Hash + td_class = ["centered"] + if pkg.is_status_ok('hash'): + td_class.append("correct") + else: + td_class.append("wrong") + f.write(" %s\n" % + (" ".join(td_class), boolean_str(pkg.is_status_ok('hash')))) + + # Current version + if len(pkg.current_version) > 20: + current_version = pkg.current_version[:20] + "..." + else: + current_version = pkg.current_version + f.write(" %s\n" % current_version) + + # Latest version + if pkg.latest_version['status'] == RM_API_STATUS_ERROR: + td_class.append("version-error") + if pkg.latest_version['version'] is None: + td_class.append("version-unknown") + elif pkg.latest_version['version'] != pkg.current_version: + td_class.append("version-needs-update") + else: + td_class.append("version-good") + + if pkg.latest_version['status'] == RM_API_STATUS_ERROR: + latest_version_text = "Error" + elif pkg.latest_version['status'] == RM_API_STATUS_NOT_FOUND: + latest_version_text = "Not found" + else: + if pkg.latest_version['version'] is None: + latest_version_text = "Found, but no version" + else: + latest_version_text = "%s" % \ + (pkg.latest_version['id'], str(pkg.latest_version['version'])) + + latest_version_text += "
" + + if pkg.latest_version['status'] == RM_API_STATUS_FOUND_BY_DISTRO: + latest_version_text += "found by distro" + else: + latest_version_text += "found by guess" + + f.write(" %s\n" % + (" ".join(td_class), latest_version_text)) + + # Warnings + td_class = ["centered"] + if pkg.warnings == 0: + td_class.append("correct") + else: + td_class.append("wrong") + f.write(" %d\n" % + (" ".join(td_class), pkg.warnings)) + + # URL status + td_class = ["centered"] + url_str = pkg.status['url'][1] + if pkg.status['url'][0] in ("error", "warning"): + td_class.append("missing_url") + if pkg.status['url'][0] == "error": + td_class.append("invalid_url") + url_str = "%s" % (pkg.url, pkg.status['url'][1]) + else: + td_class.append("good_url") + url_str = "Link" % pkg.url + f.write(" %s\n" % + (" ".join(td_class), url_str)) + + # CVEs + td_class = ["centered"] + if pkg.is_status_ok("cve"): + td_class.append("cve-ok") + elif pkg.is_status_error("cve"): + td_class.append("cve-nok") + else: + td_class.append("cve-unknown") + f.write(" \n" % " ".join(td_class)) + if pkg.is_status_error("cve"): + for cve in pkg.cves: + f.write(" %s
\n" % (cve, cve)) + elif pkg.is_status_na("cve"): + f.write(" %s" % pkg.status['cve'][1]) + else: + f.write(" N/A\n") + f.write(" \n") + + # CPE ID + td_class = ["left"] + if pkg.is_status_ok("cpe"): + td_class.append("cpe-ok") + elif pkg.is_status_error("cpe"): + td_class.append("cpe-nok") + else: + td_class.append("cpe-unknown") + f.write(" \n" % " ".join(td_class)) + if pkg.cpeid: + f.write(" %s\n" % pkg.cpeid) + if not pkg.is_status_ok("cpe"): + f.write(" %s%s\n" % ("
" if pkg.cpeid else "", pkg.status['cpe'][1])) + f.write(" \n") + + f.write(" \n") + + +def dump_html_all_pkgs(f, packages): + f.write(""" + + + + + + + + + + + + + + + +""") + for pkg in sorted(packages): + dump_html_pkg(f, pkg) + f.write("
PackagePatch countInfrastructureLicenseLicense filesHash fileCurrent versionLatest versionWarningsUpstream URLCVEsCPE ID
") + + +def dump_html_stats(f, stats): + f.write("
\n") + f.write("\n") + infras = [infra[6:] for infra in stats.keys() if infra.startswith("infra-")] + for infra in infras: + f.write(" \n" % + (infra, stats["infra-%s" % infra])) + f.write(" \n" % + stats["license"]) + f.write(" \n" % + stats["no-license"]) + f.write(" \n" % + stats["license-files"]) + f.write(" \n" % + stats["no-license-files"]) + f.write(" \n" % + stats["hash"]) + f.write(" \n" % + stats["no-hash"]) + f.write(" \n" % + stats["patches"]) + f.write("\n" % + stats["rmo-mapping"]) + f.write("\n" % + stats["rmo-no-mapping"]) + f.write("\n" % + stats["version-uptodate"]) + f.write("\n" % + stats["version-not-uptodate"]) + f.write("\n" % + stats["version-unknown"]) + f.write("\n" % + stats["pkg-cves"]) + f.write("\n" % + stats["total-cves"]) + f.write("\n" % + stats["cpe-id"]) + f.write("\n" % + stats["no-cpe-id"]) + f.write("
Packages using the %s infrastructure%s
Packages having license information%s
Packages not having license information%s
Packages having license files information%s
Packages not having license files information%s
Packages having a hash file%s
Packages not having a hash file%s
Total number of patches%s
Packages having a mapping on release-monitoring.org%s
Packages lacking a mapping on release-monitoring.org%s
Packages that are up-to-date%s
Packages that are not up-to-date%s
Packages with no known upstream version%s
Packages affected by CVEs%s
Total number of CVEs affecting all packages%s
Packages with CPE ID%s
Packages without CPE ID%s
\n") + + +def dump_html_gen_info(f, date, commit): + # Updated on Mon Feb 19 08:12:08 CET 2018, Git commit aa77030b8f5e41f1c53eb1c1ad664b8c814ba032 + f.write("

Updated on %s, git commit %s

\n" % (str(date), commit)) + + +def dump_html(packages, stats, date, commit, output): + with open(output, 'w') as f: + f.write(html_header) + dump_html_all_pkgs(f, packages) + dump_html_stats(f, stats) + dump_html_gen_info(f, date, commit) + f.write(html_footer) + + +def dump_json(packages, defconfigs, stats, date, commit, output): + # Format packages as a dictionnary instead of a list + # Exclude local field that does not contains real date + excluded_fields = ['url_worker', 'name'] + pkgs = { + pkg.name: { + k: v + for k, v in pkg.__dict__.items() + if k not in excluded_fields + } for pkg in packages + } + defconfigs = { + d.name: { + k: v + for k, v in d.__dict__.items() + } for d in defconfigs + } + # Aggregate infrastructures into a single dict entry + statistics = { + k: v + for k, v in stats.items() + if not k.startswith('infra-') + } + statistics['infra'] = {k[6:]: v for k, v in stats.items() if k.startswith('infra-')} + # The actual structure to dump, add commit and date to it + final = {'packages': pkgs, + 'stats': statistics, + 'defconfigs': defconfigs, + 'package_status_checks': Package.status_checks, + 'commit': commit, + 'date': str(date)} + + with open(output, 'w') as f: + json.dump(final, f, indent=2, separators=(',', ': ')) + f.write('\n') + + +def resolvepath(path): + return os.path.abspath(os.path.expanduser(path)) + + +def parse_args(): + parser = argparse.ArgumentParser() + output = parser.add_argument_group('output', 'Output file(s)') + output.add_argument('--html', dest='html', type=resolvepath, + help='HTML output file') + output.add_argument('--json', dest='json', type=resolvepath, + help='JSON output file') + packages = parser.add_mutually_exclusive_group() + packages.add_argument('-c', dest='configpackages', action='store_true', + help='Apply to packages enabled in current configuration') + packages.add_argument('-n', dest='npackages', type=int, action='store', + help='Number of packages') + packages.add_argument('-p', dest='packages', action='store', + help='List of packages (comma separated)') + parser.add_argument('--nvd-path', dest='nvd_path', + help='Path to the local NVD database', type=resolvepath) + args = parser.parse_args() + if not args.html and not args.json: + parser.error('at least one of --html or --json (or both) is required') + return args + + +def __main__(): + global cvecheck + + args = parse_args() + + if args.nvd_path: + import cve as cvecheck + + if args.packages: + package_list = args.packages.split(",") + elif args.configpackages: + package_list = get_config_packages() + else: + package_list = None + date = datetime.datetime.utcnow() + commit = subprocess.check_output(['git', '-C', brpath, + 'rev-parse', + 'HEAD']).splitlines()[0].decode() + print("Build package list ...") + packages = get_pkglist(args.npackages, package_list) + print("Getting developers ...") + developers = parse_developers() + print("Build defconfig list ...") + defconfigs = get_defconfig_list() + for d in defconfigs: + d.set_developers(developers) + print("Getting package make info ...") + package_init_make_info() + print("Getting package details ...") + for pkg in packages: + pkg.set_infra() + pkg.set_license() + pkg.set_hash_info() + pkg.set_patch_count() + pkg.set_check_package_warnings() + pkg.set_current_version() + pkg.set_cpeid() + pkg.set_url() + pkg.set_ignored_cves() + pkg.set_developers(developers) + print("Checking URL status") + loop = asyncio.get_event_loop() + loop.run_until_complete(check_package_urls(packages)) + print("Getting latest versions ...") + loop = asyncio.get_event_loop() + loop.run_until_complete(check_package_latest_version(packages)) + if args.nvd_path: + print("Checking packages CVEs") + check_package_cves(args.nvd_path, packages) + check_package_cpes(args.nvd_path, packages) + print("Calculate stats") + stats = calculate_stats(packages) + if args.html: + print("Write HTML") + dump_html(packages, stats, date, commit, args.html) + if args.json: + print("Write JSON") + dump_json(packages, defconfigs, stats, date, commit, args.json) + + +__main__() diff --git a/support/scripts/pycompile.py b/support/scripts/pycompile.py new file mode 100644 index 00000000..b8cd3cee --- /dev/null +++ b/support/scripts/pycompile.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python + +""" +Byte compile all .py files from provided directories. This script is an +alternative implementation of compileall.compile_dir written with +cross-compilation in mind. +""" + +from __future__ import print_function + +import argparse +import os +import py_compile +import re +import sys + + +def compile_one(host_path, strip_root=None, verbose=False): + """ + Compile a .py file into a .pyc file located next to it. + + :arg host_path: + Absolute path to the file to compile on the host running the build. + :arg strip_root: + Prefix to remove from the original source paths encoded in compiled + files. + :arg verbose: + Print compiled file paths. + """ + if os.path.islink(host_path) or not os.path.isfile(host_path): + return # only compile real files + + if not re.match(r"^[_A-Za-z][_A-Za-z0-9]*\.py$", + os.path.basename(host_path)): + return # only compile "importable" python modules + + if strip_root is not None: + # determine the runtime path of the file (i.e.: relative path to root + # dir prepended with "/"). + runtime_path = os.path.join("/", os.path.relpath(host_path, strip_root)) + else: + runtime_path = host_path + + if verbose: + print(" PYC {}".format(runtime_path)) + + # will raise an error if the file cannot be compiled + py_compile.compile(host_path, cfile=host_path + "c", + dfile=runtime_path, doraise=True) + + +def existing_dir_abs(arg): + """ + argparse type callback that checks that argument is a directory and returns + its absolute path. + """ + if not os.path.isdir(arg): + raise argparse.ArgumentTypeError('no such directory: {!r}'.format(arg)) + return os.path.abspath(arg) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("dirs", metavar="DIR", nargs="+", type=existing_dir_abs, + help="Directory to recursively scan and compile") + parser.add_argument("--strip-root", metavar="ROOT", type=existing_dir_abs, + help=""" + Prefix to remove from the original source paths encoded + in compiled files + """) + parser.add_argument("--verbose", action="store_true", + help="Print compiled files") + + args = parser.parse_args() + + try: + for d in args.dirs: + if args.strip_root and ".." in os.path.relpath(d, args.strip_root): + parser.error("DIR: not inside ROOT dir: {!r}".format(d)) + for parent, _, files in os.walk(d): + for f in files: + compile_one(os.path.join(parent, f), args.strip_root, + args.verbose) + + except Exception as e: + print("error: {}".format(e)) + return 1 + + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/support/scripts/setlocalversion b/support/scripts/setlocalversion new file mode 100755 index 00000000..d492f2db --- /dev/null +++ b/support/scripts/setlocalversion @@ -0,0 +1,93 @@ +#!/bin/sh +# +# This scripts adds local version information from the version +# control systems git, mercurial (hg) and subversion (svn). +# +# If something goes wrong, send a mail the kernel build mailinglist +# (see MAINTAINERS) and CC Nico Schottelius +# . +# +# + +usage() { + echo "Usage: $0 [srctree]" >&2 + exit 1 +} + +cd "${1:-.}" || usage + +# Check for git and a git repo. +if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then + + atag="`git describe 2>/dev/null`" + + # Show -g if we have no tag, or just the tag + # otherwise. + if [ -z "${atag}" ] ; then + printf "%s%s" -g ${head} + else + printf ${atag} + fi + + # Is this git on svn? + if git config --get svn-remote.svn.url >/dev/null; then + printf -- '-svn%s' "`git svn find-rev $head`" + fi + + # Update index only on r/w media + [ -w . ] && git update-index --refresh --unmerged > /dev/null + + # Check for uncommitted changes + if git diff-index --name-only HEAD | grep -v "^scripts/package" \ + | read dummy; then + printf '%s' -dirty + fi + + # All done with git + exit +fi + +# Check for mercurial and a mercurial repo. +# In the git case, 'git describe' will show the latest tag, and unless we are +# exactly on that tag, the number of commits since then, and last commit id. +# Mimic something similar in the Mercurial case. +if hgid=`HGRCPATH= hg id --id --tags 2>/dev/null`; then + tag=`printf '%s' "$hgid" | cut -d' ' -f2 --only-delimited` + + # Do we have an untagged version? + if [ -z "$tag" -o "$tag" = tip ]; then + # current revision is not tagged, determine latest tag + latesttag=`HGRCPATH= hg log -r. -T '{latesttag}' 2>/dev/null` + # In case there is more than one tag on the latest tagged commit, + # 'latesttag' will separate them by colon (:). We'll retain this. + # In case there is no tag at all, 'null' will be returned. + if [ "$latesttag" = "null" ]; then + latesttag='' + fi + + # add the commit id + id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` + printf '%s%s%s' "${latesttag}" -hg "$id" + else + # current revision is tagged, just print the tag + printf ${tag} + fi + + # Are there uncommitted changes? + # These are represented by + after the changeset id. + case "$hgid" in + *+|*+\ *) printf '%s' -dirty ;; + esac + + # All done with mercurial + exit +fi + +# Check for svn and a svn repo. +if rev=`LC_ALL=C svn info 2>/dev/null | grep '^Last Changed Rev'`; then + rev=`echo $rev | awk '{print $NF}'` + printf -- '-svn%s' "$rev" + + # All done with svn + exit +fi diff --git a/support/scripts/size-stats b/support/scripts/size-stats new file mode 100755 index 00000000..dea3a600 --- /dev/null +++ b/support/scripts/size-stats @@ -0,0 +1,308 @@ +#!/usr/bin/env python + +# Copyright (C) 2014 by Thomas Petazzoni + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +import sys +import os +import os.path +import argparse +import csv +import collections +import math + +try: + import matplotlib + matplotlib.use('Agg') + import matplotlib.font_manager as fm + import matplotlib.pyplot as plt +except ImportError: + sys.stderr.write("You need python-matplotlib to generate the size graph\n") + exit(1) + + +class Config: + biggest_first = False + iec = False + size_limit = 0.01 + colors = ['#e60004', '#f28e00', '#ffed00', '#940084', + '#2e1d86', '#0068b5', '#009836', '#97c000'] + + +# +# This function adds a new file to 'filesdict', after checking its +# size. The 'filesdict' contain the relative path of the file as the +# key, and as the value a tuple containing the name of the package to +# which the file belongs and the size of the file. +# +# filesdict: the dict to which the file is added +# relpath: relative path of the file +# fullpath: absolute path to the file +# pkg: package to which the file belongs +# +def add_file(filesdict, relpath, abspath, pkg): + if not os.path.exists(abspath): + return + if os.path.islink(abspath): + return + sz = os.stat(abspath).st_size + filesdict[relpath] = (pkg, sz) + + +# +# This function returns a dict where each key is the path of a file in +# the root filesystem, and the value is a tuple containing two +# elements: the name of the package to which this file belongs and the +# size of the file. +# +# builddir: path to the Buildroot output directory +# +def build_package_dict(builddir): + filesdict = {} + with open(os.path.join(builddir, "build", "packages-file-list.txt")) as f: + for l in f.readlines(): + pkg, fpath = l.split(",", 1) + # remove the initial './' in each file path + fpath = fpath.strip()[2:] + fullpath = os.path.join(builddir, "target", fpath) + add_file(filesdict, fpath, fullpath, pkg) + return filesdict + + +# +# This function builds a dictionary that contains the name of a +# package as key, and the size of the files installed by this package +# as the value. +# +# filesdict: dictionary with the name of the files as key, and as +# value a tuple containing the name of the package to which the files +# belongs, and the size of the file. As returned by +# build_package_dict. +# +# builddir: path to the Buildroot output directory +# +def build_package_size(filesdict, builddir): + pkgsize = collections.defaultdict(int) + + seeninodes = set() + for root, _, files in os.walk(os.path.join(builddir, "target")): + for f in files: + fpath = os.path.join(root, f) + if os.path.islink(fpath): + continue + + st = os.stat(fpath) + if st.st_ino in seeninodes: + # hard link + continue + else: + seeninodes.add(st.st_ino) + + frelpath = os.path.relpath(fpath, os.path.join(builddir, "target")) + if frelpath not in filesdict: + print("WARNING: %s is not part of any package" % frelpath) + pkg = "unknown" + else: + pkg = filesdict[frelpath][0] + + pkgsize[pkg] += st.st_size + + return pkgsize + + +# +# Given a dict returned by build_package_size(), this function +# generates a pie chart of the size installed by each package. +# +# pkgsize: dictionary with the name of the package as a key, and the +# size as the value, as returned by build_package_size. +# +# outputf: output file for the graph +# +def draw_graph(pkgsize, outputf): + def size2string(sz): + if Config.iec: + divider = 1024.0 + prefixes = ['', 'Ki', 'Mi', 'Gi', 'Ti'] + else: + divider = 1000.0 + prefixes = ['', 'k', 'M', 'G', 'T'] + while sz > divider and len(prefixes) > 1: + prefixes = prefixes[1:] + sz = sz/divider + # precision is made so that there are always at least three meaningful + # digits displayed (e.g. '3.14' and '10.4', not just '3' and '10') + precision = int(2-math.floor(math.log10(sz))) if sz < 1000 else 0 + return '{:.{prec}f} {}B'.format(sz, prefixes[0], prec=precision) + + total = sum(pkgsize.values()) + labels = [] + values = [] + other_value = 0 + unknown_value = 0 + for (p, sz) in sorted(pkgsize.items(), key=lambda x: x[1], + reverse=Config.biggest_first): + if sz < (total * Config.size_limit): + other_value += sz + elif p == "unknown": + unknown_value = sz + else: + labels.append("%s (%s)" % (p, size2string(sz))) + values.append(sz) + if unknown_value != 0: + labels.append("Unknown (%s)" % (size2string(unknown_value))) + values.append(unknown_value) + if other_value != 0: + labels.append("Other (%s)" % (size2string(other_value))) + values.append(other_value) + + plt.figure() + patches, texts, autotexts = plt.pie(values, labels=labels, + autopct='%1.1f%%', shadow=True, + colors=Config.colors) + # Reduce text size + proptease = fm.FontProperties() + proptease.set_size('xx-small') + plt.setp(autotexts, fontproperties=proptease) + plt.setp(texts, fontproperties=proptease) + + plt.suptitle("Filesystem size per package", fontsize=18, y=.97) + plt.title("Total filesystem size: %s" % (size2string(total)), fontsize=10, + y=.96) + plt.savefig(outputf) + + +# +# Generate a CSV file with statistics about the size of each file, its +# size contribution to the package and to the overall system. +# +# filesdict: dictionary with the name of the files as key, and as +# value a tuple containing the name of the package to which the files +# belongs, and the size of the file. As returned by +# build_package_dict. +# +# pkgsize: dictionary with the name of the package as a key, and the +# size as the value, as returned by build_package_size. +# +# outputf: output CSV file +# +def gen_files_csv(filesdict, pkgsizes, outputf): + total = 0 + for (p, sz) in pkgsizes.items(): + total += sz + with open(outputf, 'w') as csvfile: + wr = csv.writer(csvfile, delimiter=',', quoting=csv.QUOTE_MINIMAL) + wr.writerow(["File name", + "Package name", + "File size", + "Package size", + "File size in package (%)", + "File size in system (%)"]) + for f, (pkgname, filesize) in filesdict.items(): + pkgsize = pkgsizes[pkgname] + + if pkgsize == 0: + percent_pkg = 0 + else: + percent_pkg = float(filesize) / pkgsize * 100 + + percent_total = float(filesize) / total * 100 + + wr.writerow([f, pkgname, filesize, pkgsize, + "%.1f" % percent_pkg, + "%.1f" % percent_total]) + + +# +# Generate a CSV file with statistics about the size of each package, +# and their size contribution to the overall system. +# +# pkgsize: dictionary with the name of the package as a key, and the +# size as the value, as returned by build_package_size. +# +# outputf: output CSV file +# +def gen_packages_csv(pkgsizes, outputf): + total = sum(pkgsizes.values()) + with open(outputf, 'w') as csvfile: + wr = csv.writer(csvfile, delimiter=',', quoting=csv.QUOTE_MINIMAL) + wr.writerow(["Package name", "Package size", + "Package size in system (%)"]) + for (pkg, size) in pkgsizes.items(): + wr.writerow([pkg, size, "%.1f" % (float(size) / total * 100)]) + + +# +# Our special action for --iec, --binary, --si, --decimal +# +class PrefixAction(argparse.Action): + def __init__(self, option_strings, dest, **kwargs): + for key in ["type", "nargs"]: + if key in kwargs: + raise ValueError('"{}" not allowed'.format(key)) + super(PrefixAction, self).__init__(option_strings, dest, nargs=0, + type=bool, **kwargs) + + def __call__(self, parser, namespace, values, option_string=None): + setattr(namespace, self.dest, option_string in ["--iec", "--binary"]) + + +def main(): + parser = argparse.ArgumentParser(description='Draw size statistics graphs') + + parser.add_argument("--builddir", '-i', metavar="BUILDDIR", required=True, + help="Buildroot output directory") + parser.add_argument("--graph", '-g', metavar="GRAPH", + help="Graph output file (.pdf or .png extension)") + parser.add_argument("--file-size-csv", '-f', metavar="FILE_SIZE_CSV", + help="CSV output file with file size statistics") + parser.add_argument("--package-size-csv", '-p', metavar="PKG_SIZE_CSV", + help="CSV output file with package size statistics") + parser.add_argument("--biggest-first", action='store_true', + help="Sort packages in decreasing size order, " + + "rather than in increasing size order") + parser.add_argument("--iec", "--binary", "--si", "--decimal", + action=PrefixAction, + help="Use IEC (binary, powers of 1024) or SI (decimal, " + "powers of 1000, the default) prefixes") + parser.add_argument("--size-limit", "-l", type=float, + help='Under this size ratio, files are accounted to ' + + 'the generic "Other" package. Default: 0.01 (1%%)') + args = parser.parse_args() + + Config.biggest_first = args.biggest_first + Config.iec = args.iec + if args.size_limit is not None: + if args.size_limit < 0.0 or args.size_limit > 1.0: + parser.error("--size-limit must be in [0.0..1.0]") + Config.size_limit = args.size_limit + + # Find out which package installed what files + pkgdict = build_package_dict(args.builddir) + + # Collect the size installed by each package + pkgsize = build_package_size(pkgdict, args.builddir) + + if args.graph: + draw_graph(pkgsize, args.graph) + if args.file_size_csv: + gen_files_csv(pkgdict, pkgsize, args.file_size_csv) + if args.package_size_csv: + gen_packages_csv(pkgsize, args.package_size_csv) + + +if __name__ == "__main__": + main() diff --git a/support/testing/conf/binfmt-misc-kernel-fragment.config b/support/testing/conf/binfmt-misc-kernel-fragment.config new file mode 100644 index 00000000..7c992ff7 --- /dev/null +++ b/support/testing/conf/binfmt-misc-kernel-fragment.config @@ -0,0 +1,2 @@ +# Needed for binfmt_misc service: "Arbitrary Executable File Formats File System" +CONFIG_BINFMT_MISC=y diff --git a/support/testing/conf/docker-compose-kernel.config b/support/testing/conf/docker-compose-kernel.config new file mode 100644 index 00000000..4d30a578 --- /dev/null +++ b/support/testing/conf/docker-compose-kernel.config @@ -0,0 +1,77 @@ +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +# CONFIG_CROSS_MEMORY_ATTACH is not set +CONFIG_HIGH_RES_TIMERS=y +# CONFIG_COMPAT_BRK is not set +# CONFIG_X86_EXTENDED_PLATFORM is not set +CONFIG_IOSF_MBI=y +CONFIG_MCORE2=y +# CONFIG_X86_MCE is not set +# CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set +CONFIG_LEGACY_VSYSCALL_NONE=y +# CONFIG_SUSPEND is not set +# CONFIG_ACPI is not set +CONFIG_CPU_IDLE=y +CONFIG_PCI_MSI=y +# CONFIG_VIRTUALIZATION is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_MQ_IOSCHED_DEADLINE is not set +# CONFIG_MQ_IOSCHED_KYBER is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_TRANSPARENT_HUGEPAGE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_IPV6 is not set +# CONFIG_NF_CONNTRACK_PROCFS is not set +# CONFIG_NF_CT_PROTO_DCCP is not set +# CONFIG_NF_CT_PROTO_SCTP is not set +# CONFIG_NF_CT_PROTO_UDPLITE is not set +CONFIG_IP_VS=y +CONFIG_IP_VS_RR=y +CONFIG_IP_VS_NFCT=y +# CONFIG_BRIDGE_IGMP_SNOOPING is not set +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_VIRTIO_BLK=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO_NET=y +# CONFIG_ETHERNET is not set +# CONFIG_WLAN is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_DEVMEM is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_LPSS is not set +# CONFIG_SERIAL_8250_MID is not set +# CONFIG_HW_RANDOM_INTEL is not set +# CONFIG_HW_RANDOM_AMD is not set +# CONFIG_HW_RANDOM_VIA is not set +CONFIG_HW_RANDOM_VIRTIO=y +# CONFIG_DEVPORT is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_RTC_CLASS=y +CONFIG_VIRTIO_PCI=y +# CONFIG_VIRTIO_PCI_LEGACY is not set +# CONFIG_X86_PLATFORM_DEVICES is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +# CONFIG_MISC_FILESYSTEMS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_SECURITYFS=y +# CONFIG_CRYPTO_ECHAINIV is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_UNWINDER_FRAME_POINTER=y diff --git a/support/testing/conf/docker-compose.yml b/support/testing/conf/docker-compose.yml new file mode 100644 index 00000000..ce89d79b --- /dev/null +++ b/support/testing/conf/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3' +services: + busybox: + image: "busybox:latest" + command: httpd -f -h /www/ + ports: + - "80:80" + volumes: + - "/bin:/www" diff --git a/support/testing/conf/f2fs-kernel-fragment.config b/support/testing/conf/f2fs-kernel-fragment.config new file mode 100644 index 00000000..0fca7e78 --- /dev/null +++ b/support/testing/conf/f2fs-kernel-fragment.config @@ -0,0 +1,5 @@ +CONFIG_F2FS_FS=y +CONFIG_F2FS_STAT_FS=y +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_FS_POSIX_ACL=y +CONFIG_F2FS_FS_SECURITY=y diff --git a/support/testing/conf/grub2.cfg b/support/testing/conf/grub2.cfg new file mode 100644 index 00000000..a982d0b7 --- /dev/null +++ b/support/testing/conf/grub2.cfg @@ -0,0 +1,7 @@ +set default="0" +set timeout="1" + +menuentry "Buildroot" { + linux __KERNEL_PATH__ root=/dev/sr0 console=ttyS0,115200 + initrd __INITRD_PATH__ +} diff --git a/support/testing/conf/isolinux.cfg b/support/testing/conf/isolinux.cfg new file mode 100644 index 00000000..ba031a68 --- /dev/null +++ b/support/testing/conf/isolinux.cfg @@ -0,0 +1,5 @@ +default 1 +label 1 + kernel __KERNEL_PATH__ + initrd __INITRD_PATH__ + append root=/dev/sr0 console=ttyS0,115200 diff --git a/support/testing/conf/minimal-x86-qemu-kernel.config b/support/testing/conf/minimal-x86-qemu-kernel.config new file mode 100644 index 00000000..cc8ee6a7 --- /dev/null +++ b/support/testing/conf/minimal-x86-qemu-kernel.config @@ -0,0 +1,49 @@ +CONFIG_SYSVIPC=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_SMP=y +CONFIG_HYPERVISOR_GUEST=y +CONFIG_PARAVIRT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=y +CONFIG_SCSI_VIRTIO=y +CONFIG_ATA=y +CONFIG_ATA_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO_NET=y +CONFIG_NE2K_PCI=y +CONFIG_8139CP=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_HW_RANDOM_VIRTIO=m +CONFIG_DRM=y +CONFIG_DRM_BOCHS=y +CONFIG_DRM_QXL=y +CONFIG_DRM_VIRTIO_GPU=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_HDA_INTEL=y +CONFIG_SND_HDA_GENERIC=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_UHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_INPUT=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y +CONFIG_EXT4_FS=y +CONFIG_ISO9660_FS=y +CONFIG_ZISOFS=y +CONFIG_JOLIET=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/support/testing/conf/unittest.cfg b/support/testing/conf/unittest.cfg new file mode 100644 index 00000000..4f516fb8 --- /dev/null +++ b/support/testing/conf/unittest.cfg @@ -0,0 +1,5 @@ +[unittest] +plugins = nose2.plugins.mp + +[multiprocess] +always-on = True diff --git a/support/testing/infra/__init__.py b/support/testing/infra/__init__.py new file mode 100644 index 00000000..6522a265 --- /dev/null +++ b/support/testing/infra/__init__.py @@ -0,0 +1,114 @@ +import os +import re +import sys +import tempfile +import subprocess +from urllib.request import urlopen +from urllib.error import HTTPError, URLError + +ARTIFACTS_URL = "http://autobuild.buildroot.net/artefacts/" +BASE_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), "../../..")) + + +def open_log_file(builddir, stage, logtofile=True): + """ + Open a file for logging and return its handler. + If logtofile is True, returns sys.stdout. Otherwise opens a file + with a suitable name in the build directory. + """ + if logtofile: + fhandle = open("{}-{}.log".format(builddir, stage), 'a+') + else: + fhandle = sys.stdout + return fhandle + + +def basepath(relpath=""): + """Return the absolute path for a file or directory relative to the Buildroot top directory.""" + return os.path.join(BASE_DIR, relpath) + + +def filepath(relpath): + return os.path.join(BASE_DIR, "support/testing", relpath) + + +def download(dldir, filename): + finalpath = os.path.join(dldir, filename) + if os.path.exists(finalpath): + return finalpath + + if not os.path.exists(dldir): + os.makedirs(dldir) + + tmpfile = tempfile.mktemp(dir=dldir) + print("Downloading to {}".format(tmpfile)) + + try: + url_fh = urlopen(os.path.join(ARTIFACTS_URL, filename)) + with open(tmpfile, "w+b") as tmpfile_fh: + tmpfile_fh.write(url_fh.read()) + except (HTTPError, URLError) as err: + os.unlink(tmpfile) + raise err + + print("Renaming from {} to {}".format(tmpfile, finalpath)) + os.rename(tmpfile, finalpath) + return finalpath + + +def run_cmd_on_host(builddir, cmd): + """Call subprocess.check_output and return the text output.""" + out = subprocess.check_output(cmd, + stderr=open(os.devnull, "w"), + cwd=builddir, + env={"LANG": "C"}, + universal_newlines=True) + return out + + +def get_elf_arch_tag(builddir, prefix, fpath, tag): + """ + Runs the cross readelf on 'fpath', then extracts the value of tag 'tag'. + Example: + >>> get_elf_arch_tag('output', 'arm-none-linux-gnueabi-', + 'bin/busybox', 'Tag_CPU_arch') + v5TEJ + >>> + """ + cmd = ["host/bin/{}-readelf".format(prefix), + "-A", os.path.join("target", fpath)] + out = run_cmd_on_host(builddir, cmd) + regexp = re.compile(r"^ {}: (.*)$".format(tag)) + for line in out.splitlines(): + m = regexp.match(line) + if not m: + continue + return m.group(1) + return None + + +def get_file_arch(builddir, prefix, fpath): + return get_elf_arch_tag(builddir, prefix, fpath, "Tag_CPU_arch") + + +def get_elf_prog_interpreter(builddir, prefix, fpath): + """ + Runs the cross readelf on 'fpath' to extract the program interpreter + name and returns it. + Example: + >>> get_elf_prog_interpreter('br-tests/TestExternalToolchainLinaroArm', + 'arm-linux-gnueabihf', + 'bin/busybox') + /lib/ld-linux-armhf.so.3 + >>> + """ + cmd = ["host/bin/{}-readelf".format(prefix), + "-l", os.path.join("target", fpath)] + out = run_cmd_on_host(builddir, cmd) + regexp = re.compile(r"^ *\[Requesting program interpreter: (.*)\]$") + for line in out.splitlines(): + m = regexp.match(line) + if not m: + continue + return m.group(1) + return None diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py new file mode 100644 index 00000000..a97a8144 --- /dev/null +++ b/support/testing/infra/basetest.py @@ -0,0 +1,92 @@ +import unittest +import os +import datetime + +from infra.builder import Builder +from infra.emulator import Emulator + +BASIC_TOOLCHAIN_CONFIG = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--uclibc--bleeding-edge-2018.11-1.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_8=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y + BR2_TOOLCHAIN_EXTERNAL_LOCALE=y + BR2_TOOLCHAIN_HAS_THREADS_DEBUG=y + BR2_TOOLCHAIN_EXTERNAL_CXX=y + """ + +MINIMAL_CONFIG = \ + """ + BR2_INIT_NONE=y + BR2_SYSTEM_BIN_SH_NONE=y + # BR2_PACKAGE_BUSYBOX is not set + # BR2_TARGET_ROOTFS_TAR is not set + """ + + +class BRConfigTest(unittest.TestCase): + config = None + br2_external = list() + downloaddir = None + outputdir = None + logtofile = True + keepbuilds = False + jlevel = 0 + timeout_multiplier = 1 + + def __init__(self, names): + super(BRConfigTest, self).__init__(names) + self.testname = self.__class__.__name__ + self.builddir = self.outputdir and os.path.join(self.outputdir, self.testname) + self.config += '\nBR2_DL_DIR="{}"\n'.format(self.downloaddir) + self.config += "\nBR2_JLEVEL={}\n".format(self.jlevel) + + def show_msg(self, msg): + print("{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"), + self.testname, msg)) + + def setUp(self): + self.show_msg("Starting") + self.b = Builder(self.config, self.builddir, self.logtofile) + + if not self.keepbuilds: + self.b.delete() + + if not self.b.is_finished(): + self.b.configure(make_extra_opts=["BR2_EXTERNAL={}".format(":".join(self.br2_external))]) + + def tearDown(self): + self.show_msg("Cleaning up") + if self.b and not self.keepbuilds: + self.b.delete() + + +class BRTest(BRConfigTest): + def __init__(self, names): + super(BRTest, self).__init__(names) + self.emulator = None + + def setUp(self): + super(BRTest, self).setUp() + if not self.b.is_finished(): + self.show_msg("Building") + self.b.build() + self.show_msg("Building done") + + self.emulator = Emulator(self.builddir, self.downloaddir, + self.logtofile, self.timeout_multiplier) + + def tearDown(self): + if self.emulator: + self.emulator.stop() + super(BRTest, self).tearDown() + + # Run the given 'cmd' with a 'timeout' on the target and + # assert that the command succeeded + def assertRunOk(self, cmd, timeout=-1): + _, exit_code = self.emulator.run(cmd, timeout) + self.assertEqual(exit_code, 0) diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py new file mode 100644 index 00000000..922a7072 --- /dev/null +++ b/support/testing/infra/builder.py @@ -0,0 +1,107 @@ +import os +import shutil +import subprocess + +import infra + + +class Builder(object): + def __init__(self, config, builddir, logtofile): + self.config = '\n'.join([line.lstrip() for line in + config.splitlines()]) + '\n' + self.builddir = builddir + self.logfile = infra.open_log_file(builddir, "build", logtofile) + + def is_defconfig_valid(self, configfile, defconfig): + """Check if the .config is contains all lines present in the defconfig.""" + with open(configfile) as configf: + configlines = configf.readlines() + + defconfiglines = defconfig.split("\n") + + # Check that all the defconfig lines are still present + for defconfigline in defconfiglines: + if defconfigline + "\n" not in configlines: + self.logfile.write("WARN: defconfig can't be used\n") + self.logfile.write(" Missing: %s\n" % defconfigline.strip()) + self.logfile.flush() + return False + + return True + + def configure(self, make_extra_opts=[], make_extra_env={}): + """Configure the build. + + make_extra_opts: a list of arguments to be passed to the make + command. + e.g. make_extra_opts=["BR2_EXTERNAL=/path"] + + make_extra_env: a dict of variables to be appended (or replaced) + in the environment that calls make. + e.g. make_extra_env={"BR2_DL_DIR": "/path"} + """ + if not os.path.isdir(self.builddir): + os.makedirs(self.builddir) + + config_file = os.path.join(self.builddir, ".config") + with open(config_file, "w+") as cf: + cf.write(self.config) + # dump the defconfig to the logfile for easy debugging + self.logfile.write("> start defconfig\n" + self.config + + "> end defconfig\n") + self.logfile.flush() + + env = {"PATH": os.environ["PATH"]} + env.update(make_extra_env) + + cmd = ["make", + "O={}".format(self.builddir)] + cmd += make_extra_opts + cmd += ["olddefconfig"] + + ret = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile, + cwd=infra.basepath(), env=env) + if ret != 0: + raise SystemError("Cannot olddefconfig") + + if not self.is_defconfig_valid(config_file, self.config): + raise SystemError("The defconfig is not valid") + + def build(self, make_extra_opts=[], make_extra_env={}): + """Perform the build. + + make_extra_opts: a list of arguments to be passed to the make + command. It can include a make target. + e.g. make_extra_opts=["foo-source"] + + make_extra_env: a dict of variables to be appended (or replaced) + in the environment that calls make. + e.g. make_extra_env={"BR2_DL_DIR": "/path"} + """ + env = {"PATH": os.environ["PATH"]} + if "http_proxy" in os.environ: + self.logfile.write("Using system proxy: " + + os.environ["http_proxy"] + "\n") + env['http_proxy'] = os.environ["http_proxy"] + env['https_proxy'] = os.environ["http_proxy"] + env.update(make_extra_env) + + cmd = ["make", "-C", self.builddir] + cmd += make_extra_opts + + ret = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile, + env=env) + if ret != 0: + raise SystemError("Build failed") + + open(self.stamp_path(), 'a').close() + + def stamp_path(self): + return os.path.join(self.builddir, "build-done") + + def is_finished(self): + return os.path.exists(self.stamp_path()) + + def delete(self): + if os.path.exists(self.builddir): + shutil.rmtree(self.builddir) diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py new file mode 100644 index 00000000..5611ec96 --- /dev/null +++ b/support/testing/infra/emulator.py @@ -0,0 +1,125 @@ +import pexpect + +import infra + + +class Emulator(object): + + def __init__(self, builddir, downloaddir, logtofile, timeout_multiplier): + self.qemu = None + self.downloaddir = downloaddir + self.logfile = infra.open_log_file(builddir, "run", logtofile) + # We use elastic runners on the cloud to runs our tests. Those runners + # can take a long time to run the emulator. Use a timeout multiplier + # when running the tests to avoid sporadic failures. + self.timeout_multiplier = timeout_multiplier + + # Start Qemu to boot the system + # + # arch: Qemu architecture to use + # + # kernel: path to the kernel image, or the special string + # 'builtin'. 'builtin' means a pre-built kernel image will be + # downloaded from ARTEFACTS_URL and suitable options are + # automatically passed to qemu and added to the kernel cmdline. So + # far only armv5, armv7 and i386 builtin kernels are available. + # If None, then no kernel is used, and we assume a bootable device + # will be specified. + # + # kernel_cmdline: array of kernel arguments to pass to Qemu -append option + # + # options: array of command line options to pass to Qemu + # + def boot(self, arch, kernel=None, kernel_cmdline=None, options=None): + if arch in ["armv7", "armv5"]: + qemu_arch = "arm" + else: + qemu_arch = arch + + qemu_cmd = ["qemu-system-{}".format(qemu_arch), + "-serial", "stdio", + "-display", "none", + "-m", "256"] + + if options: + qemu_cmd += options + + if kernel_cmdline is None: + kernel_cmdline = [] + + if kernel: + if kernel == "builtin": + if arch in ["armv7", "armv5"]: + kernel_cmdline.append("console=ttyAMA0") + + if arch == "armv7": + kernel = infra.download(self.downloaddir, + "kernel-vexpress") + dtb = infra.download(self.downloaddir, + "vexpress-v2p-ca9.dtb") + qemu_cmd += ["-dtb", dtb] + qemu_cmd += ["-M", "vexpress-a9"] + elif arch == "armv5": + kernel = infra.download(self.downloaddir, + "kernel-versatile-4.19") + dtb = infra.download(self.downloaddir, + "versatile-pb-4.19.dtb") + qemu_cmd += ["-dtb", dtb] + qemu_cmd += ["-M", "versatilepb"] + qemu_cmd += ["-device", "virtio-rng-pci"] + + qemu_cmd += ["-kernel", kernel] + + if kernel_cmdline: + qemu_cmd += ["-append", " ".join(kernel_cmdline)] + + self.logfile.write("> starting qemu with '%s'\n" % " ".join(qemu_cmd)) + self.qemu = pexpect.spawn(qemu_cmd[0], qemu_cmd[1:], + timeout=5 * self.timeout_multiplier, + encoding='utf-8', + env={"QEMU_AUDIO_DRV": "none"}) + # We want only stdout into the log to avoid double echo + self.qemu.logfile_read = self.logfile + + # Wait for the login prompt to appear, and then login as root with + # the provided password, or no password if not specified. + def login(self, password=None): + # The login prompt can take some time to appear when running multiple + # instances in parallel, so set the timeout to a large value + index = self.qemu.expect(["buildroot login:", pexpect.TIMEOUT], + timeout=60 * self.timeout_multiplier) + if index != 0: + self.logfile.write("==> System does not boot") + raise SystemError("System does not boot") + + self.qemu.sendline("root") + if password: + self.qemu.expect("Password:") + self.qemu.sendline(password) + index = self.qemu.expect(["# ", pexpect.TIMEOUT]) + if index != 0: + raise SystemError("Cannot login") + self.run("dmesg -n 1") + + # Run the given 'cmd' with a 'timeout' on the target + # return a tuple (output, exit_code) + def run(self, cmd, timeout=-1): + self.qemu.sendline(cmd) + if timeout != -1: + timeout *= self.timeout_multiplier + self.qemu.expect("# ", timeout=timeout) + # Remove double carriage return from qemu stdout so str.splitlines() + # works as expected. + output = self.qemu.before.replace("\r\r", "\r").splitlines()[1:] + + self.qemu.sendline("echo $?") + self.qemu.expect("# ") + exit_code = self.qemu.before.splitlines()[2] + exit_code = int(exit_code) + + return output, exit_code + + def stop(self): + if self.qemu is None: + return + self.qemu.terminate(force=True) diff --git a/support/testing/run-tests b/support/testing/run-tests new file mode 100755 index 00000000..022209b4 --- /dev/null +++ b/support/testing/run-tests @@ -0,0 +1,123 @@ +#!/usr/bin/env python3 +import argparse +import multiprocessing +import os +import sys + +import nose2 + +from infra.basetest import BRConfigTest + + +def main(): + parser = argparse.ArgumentParser(description='Run Buildroot tests') + parser.add_argument('testname', nargs='*', + help='list of test cases to execute') + parser.add_argument('-l', '--list', action='store_true', + help='list of available test cases') + parser.add_argument('-a', '--all', action='store_true', + help='execute all test cases') + parser.add_argument('-s', '--stdout', action='store_true', + help='log everything to stdout') + parser.add_argument('-o', '--output', + help='output directory') + parser.add_argument('-d', '--download', + help='download directory') + parser.add_argument('-k', '--keep', + help='keep build directories', + action='store_true') + parser.add_argument('-t', '--testcases', type=int, default=1, + help='number of testcases to run simultaneously') + parser.add_argument('-j', '--jlevel', type=int, + help='BR2_JLEVEL to use for each testcase') + parser.add_argument('--timeout-multiplier', type=int, default=1, + help='increase timeouts (useful for slow machines)') + + args = parser.parse_args() + + script_path = os.path.realpath(__file__) + test_dir = os.path.dirname(script_path) + + if args.stdout: + BRConfigTest.logtofile = False + + if args.list: + print("List of tests") + nose2.discover(argv=[script_path, + "-s", test_dir, + "-v", + "--collect-only"], + plugins=["nose2.plugins.collect"]) + return 0 + + if args.download is None: + args.download = os.getenv("BR2_DL_DIR") + if args.download is None: + print("Missing download directory, please use -d/--download") + print("") + parser.print_help() + return 1 + + BRConfigTest.downloaddir = os.path.abspath(args.download) + + if args.output is None: + print("Missing output directory, please use -o/--output") + print("") + parser.print_help() + return 1 + + if not os.path.exists(args.output): + os.mkdir(args.output) + + BRConfigTest.outputdir = os.path.abspath(args.output) + + if args.all is False and not args.testname: + print("No test selected") + print("") + parser.print_help() + return 1 + + BRConfigTest.keepbuilds = args.keep + + if args.testcases != 1: + if args.testcases < 1: + print("Invalid number of testcases to run simultaneously") + print("") + parser.print_help() + return 1 + # same default BR2_JLEVEL as package/Makefile.in + br2_jlevel = 1 + multiprocessing.cpu_count() + each_testcase = br2_jlevel / args.testcases + if each_testcase < 1: + each_testcase = 1 + BRConfigTest.jlevel = each_testcase + + if args.jlevel: + if args.jlevel < 0: + print("Invalid BR2_JLEVEL to use for each testcase") + print("") + parser.print_help() + return 1 + # the user can override the auto calculated value + BRConfigTest.jlevel = args.jlevel + + if args.timeout_multiplier < 1: + print("Invalid multiplier for timeout values") + print("") + parser.print_help() + return 1 + BRConfigTest.timeout_multiplier = args.timeout_multiplier + + nose2_args = ["-v", + "-N", str(args.testcases), + "-s", test_dir, + "-c", os.path.join(test_dir, "conf/unittest.cfg")] + + if args.testname: + nose2_args += args.testname + + nose2.discover(argv=nose2_args) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/support/testing/tests/__init__.py b/support/testing/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/boot/__init__.py b/support/testing/tests/boot/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/boot/test_atf.py b/support/testing/tests/boot/test_atf.py new file mode 100644 index 00000000..e6c11aa7 --- /dev/null +++ b/support/testing/tests/boot/test_atf.py @@ -0,0 +1,57 @@ +import infra.basetest + + +class TestATFVexpress(infra.basetest.BRTest): + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64=y + BR2_TARGET_ARM_TRUSTED_FIRMWARE=y + BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y + BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/ARM-software/arm-trusted-firmware.git" + BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="v2.2" + BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="juno" + BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y + BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y + BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y + BR2_TARGET_UBOOT=y + BR2_TARGET_UBOOT_BOARDNAME="vexpress_aemv8a_juno" + BR2_TARGET_UBOOT_CUSTOM_VERSION=y + BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" + BR2_TARGET_VEXPRESS_FIRMWARE=y + """ + + def test_run(self): + pass + + +class TestATFAllwinner(infra.basetest.BRTest): + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64=y + BR2_TARGET_ARM_TRUSTED_FIRMWARE=y + BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y + BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" + BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" + BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" + BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + BR2_TARGET_UBOOT=y + BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y + BR2_TARGET_UBOOT_CUSTOM_VERSION=y + BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10" + BR2_TARGET_UBOOT_BOARD_DEFCONFIG="bananapi_m64" + BR2_TARGET_UBOOT_NEEDS_DTC=y + BR2_TARGET_UBOOT_NEEDS_PYTHON3=y + BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y + BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y + BR2_TARGET_UBOOT_FORMAT_CUSTOM=y + BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" + BR2_TARGET_UBOOT_SPL=y + BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" + """ + + def test_run(self): + pass diff --git a/support/testing/tests/boot/test_syslinux.py b/support/testing/tests/boot/test_syslinux.py new file mode 100644 index 00000000..467d564e --- /dev/null +++ b/support/testing/tests/boot/test_syslinux.py @@ -0,0 +1,85 @@ +import infra.basetest + + +class TestSysLinuxBase(infra.basetest.BRTest): + x86_toolchain_config = \ + """ + BR2_x86_i686=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--glibc--bleeding-edge-2018.11-1.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_8=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y + BR2_TOOLCHAIN_EXTERNAL_CXX=y + """ + + x86_64_toolchain_config = \ + """ + BR2_x86_64=y + BR2_x86_corei7=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs/x86-64-core-i7--glibc--stable-2018.11-1.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_7=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y + BR2_TOOLCHAIN_EXTERNAL_CXX=y + BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y + """ + + syslinux_legacy_config = \ + """ + BR2_TARGET_SYSLINUX=y + BR2_TARGET_SYSLINUX_ISOLINUX=y + BR2_TARGET_SYSLINUX_PXELINUX=y + BR2_TARGET_SYSLINUX_MBR=y + """ + + syslinux_efi_config = \ + """ + BR2_TARGET_SYSLINUX=y + BR2_TARGET_SYSLINUX_EFI=y + """ + + +class TestSysLinuxX86LegacyBios(TestSysLinuxBase): + config = \ + TestSysLinuxBase.x86_toolchain_config + \ + infra.basetest.MINIMAL_CONFIG + \ + TestSysLinuxBase.syslinux_legacy_config + + def test_run(self): + pass + + +class TestSysLinuxX86EFI(TestSysLinuxBase): + config = \ + TestSysLinuxBase.x86_toolchain_config + \ + infra.basetest.MINIMAL_CONFIG + \ + TestSysLinuxBase.syslinux_efi_config + + def test_run(self): + pass + + +class TestSysLinuxX86_64LegacyBios(TestSysLinuxBase): + config = \ + TestSysLinuxBase.x86_64_toolchain_config + \ + infra.basetest.MINIMAL_CONFIG + \ + TestSysLinuxBase.syslinux_legacy_config + + def test_run(self): + pass + + +class TestSysLinuxX86_64EFI(TestSysLinuxBase): + config = \ + TestSysLinuxBase.x86_64_toolchain_config + \ + infra.basetest.MINIMAL_CONFIG + \ + TestSysLinuxBase.syslinux_efi_config + + def test_run(self): + pass diff --git a/support/testing/tests/core/__init__.py b/support/testing/tests/core/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/core/cpeid-br2-external/Config.in b/support/testing/tests/core/cpeid-br2-external/Config.in new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/core/cpeid-br2-external/external.desc b/support/testing/tests/core/cpeid-br2-external/external.desc new file mode 100644 index 00000000..d19ae79e --- /dev/null +++ b/support/testing/tests/core/cpeid-br2-external/external.desc @@ -0,0 +1 @@ +name: CPE_ID diff --git a/support/testing/tests/core/cpeid-br2-external/external.mk b/support/testing/tests/core/cpeid-br2-external/external.mk new file mode 100644 index 00000000..47492d7f --- /dev/null +++ b/support/testing/tests/core/cpeid-br2-external/external.mk @@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_CPE_ID_PATH)/package/*/*.mk)) diff --git a/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg1/cpe-id-pkg1.mk b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg1/cpe-id-pkg1.mk new file mode 100644 index 00000000..5e746028 --- /dev/null +++ b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg1/cpe-id-pkg1.mk @@ -0,0 +1,4 @@ +CPE_ID_PKG1_VERSION = 42 + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg2/cpe-id-pkg2.mk b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg2/cpe-id-pkg2.mk new file mode 100644 index 00000000..12b3f322 --- /dev/null +++ b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg2/cpe-id-pkg2.mk @@ -0,0 +1,3 @@ +CPE_ID_PKG2_VERSION = 67 + +$(eval $(host-generic-package)) diff --git a/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg3/cpe-id-pkg3.mk b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg3/cpe-id-pkg3.mk new file mode 100644 index 00000000..7f539ad5 --- /dev/null +++ b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg3/cpe-id-pkg3.mk @@ -0,0 +1,5 @@ +CPE_ID_PKG3_VERSION = 67 +CPE_ID_PKG3_CPE_ID_VENDOR = cpe-id-pkg3_project + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg4/cpe-id-pkg4.mk b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg4/cpe-id-pkg4.mk new file mode 100644 index 00000000..557acff8 --- /dev/null +++ b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg4/cpe-id-pkg4.mk @@ -0,0 +1,9 @@ +CPE_ID_PKG4_VERSION = 67 +CPE_ID_PKG4_CPE_ID_VENDOR = foo +CPE_ID_PKG4_CPE_ID_PRODUCT = bar +CPE_ID_PKG4_CPE_ID_VERSION = 42 +CPE_ID_PKG4_CPE_ID_UPDATE = b2 +CPE_ID_PKG4_CPE_ID_PREFIX = cpe:2.4:a + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg5/cpe-id-pkg5.mk b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg5/cpe-id-pkg5.mk new file mode 100644 index 00000000..d0db5f03 --- /dev/null +++ b/support/testing/tests/core/cpeid-br2-external/package/cpe-id-pkg5/cpe-id-pkg5.mk @@ -0,0 +1,16 @@ +CPE_ID_PKG5_VERSION = 57 + +CPE_ID_PKG5_CPE_ID_VENDOR = foo +CPE_ID_PKG5_CPE_ID_PRODUCT = bar +CPE_ID_PKG5_CPE_ID_VERSION = 42 +CPE_ID_PKG5_CPE_ID_UPDATE = b2 +CPE_ID_PKG5_CPE_ID_PREFIX = cpe:2.4:a + +HOST_CPE_ID_PKG5_CPE_ID_VENDOR = baz +HOST_CPE_ID_PKG5_CPE_ID_PRODUCT = fuz +HOST_CPE_ID_PKG5_CPE_ID_VERSION = 43 +HOST_CPE_ID_PKG5_CPE_ID_UPDATE = b3 +HOST_CPE_ID_PKG5_CPE_ID_PREFIX = cpe:2.5:a + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/support/testing/tests/core/device_table2.txt b/support/testing/tests/core/device_table2.txt new file mode 100644 index 00000000..f8323217 --- /dev/null +++ b/support/testing/tests/core/device_table2.txt @@ -0,0 +1,7 @@ +# +/usr/sbin/getcap f 755 0 0 - - - - - +|xattr cap_sys_nice+eip +# leading spaces are ignored for xattr + |xattr cap_kill+eip +# leading tabs are ignored for xattr + |xattr cap_sys_time+eip diff --git a/support/testing/tests/core/post-build.sh b/support/testing/tests/core/post-build.sh new file mode 100755 index 00000000..f3d0dbe5 --- /dev/null +++ b/support/testing/tests/core/post-build.sh @@ -0,0 +1,12 @@ +#!/bin/sh +( +printf "arg1,%s\n" "${1}" +printf "arg2,%s\n" "${2}" +printf "arg3,%s\n" "${3}" +printf "TARGET_DIR,%s\n" "${TARGET_DIR}" +printf "BUILD_DIR,%s\n" "${BUILD_DIR}" +printf "HOST_DIR,%s\n" "${HOST_DIR}" +printf "STAGING_DIR,%s\n" "${STAGING_DIR}" +printf "BINARIES_DIR,%s\n" "${BINARIES_DIR}" +printf "BR2_CONFIG,%s\n" "${BR2_CONFIG}" +) > ${BUILD_DIR}/$(basename "${0}" .sh).log diff --git a/support/testing/tests/core/post-fakeroot.sh b/support/testing/tests/core/post-fakeroot.sh new file mode 120000 index 00000000..d680fcca --- /dev/null +++ b/support/testing/tests/core/post-fakeroot.sh @@ -0,0 +1 @@ +post-build.sh \ No newline at end of file diff --git a/support/testing/tests/core/post-image.sh b/support/testing/tests/core/post-image.sh new file mode 120000 index 00000000..d680fcca --- /dev/null +++ b/support/testing/tests/core/post-image.sh @@ -0,0 +1 @@ +post-build.sh \ No newline at end of file diff --git a/support/testing/tests/core/rootfs-overlay1/test-file1 b/support/testing/tests/core/rootfs-overlay1/test-file1 new file mode 100644 index 00000000..323fae03 --- /dev/null +++ b/support/testing/tests/core/rootfs-overlay1/test-file1 @@ -0,0 +1 @@ +foobar diff --git a/support/testing/tests/core/rootfs-overlay2/etc/test-file2 b/support/testing/tests/core/rootfs-overlay2/etc/test-file2 new file mode 100644 index 00000000..34a3ec23 --- /dev/null +++ b/support/testing/tests/core/rootfs-overlay2/etc/test-file2 @@ -0,0 +1 @@ +barfoo diff --git a/support/testing/tests/core/squashfs-xattr-kernel.config b/support/testing/tests/core/squashfs-xattr-kernel.config new file mode 100644 index 00000000..81b21b94 --- /dev/null +++ b/support/testing/tests/core/squashfs-xattr-kernel.config @@ -0,0 +1 @@ +CONFIG_SQUASHFS_XATTR=y diff --git a/support/testing/tests/core/test_cpeid.py b/support/testing/tests/core/test_cpeid.py new file mode 100644 index 00000000..11c84721 --- /dev/null +++ b/support/testing/tests/core/test_cpeid.py @@ -0,0 +1,110 @@ +import infra +import subprocess +import json + + +class CpeIdTest(infra.basetest.BRConfigTest): + config = "" + br2_external = [infra.filepath("tests/core/cpeid-br2-external")] + + def get_vars(self, var): + cmd = ["make", "--no-print-directory", "-C", self.b.builddir, + "VARS=%s%%" % var, "printvars"] + lines = subprocess.check_output(cmd).splitlines() + return dict([str(x, "utf-8").split("=") for x in lines]) + + def get_json(self, pkg): + cmd = ["make", "--no-print-directory", "-C", self.b.builddir, + "%s-show-info" % pkg] + return json.loads(subprocess.check_output(cmd)) + + def test_pkg1(self): + # this package has no CPE ID information, it should not have + # any CPE_ID variable defined. + pkg_vars = self.get_vars("CPE_ID_PKG1_CPE_ID") + cpe_vars = ["CPE_ID_VALID", "CPE_ID_PRODUCT", "CPE_ID_VERSION", "CPE_ID_UPDATE", + "CPE_ID_PREFIX", "CPE_ID"] + for v in cpe_vars: + self.assertNotIn("CPE_ID_PKG1_%s" % v, pkg_vars) + pkg_json = self.get_json("cpe-id-pkg1") + self.assertNotIn("cpe-id", pkg_json['cpe-id-pkg1']) + + pkg_vars = self.get_vars("HOST_CPE_ID_PKG1_CPE_ID") + for v in cpe_vars: + self.assertNotIn("HOST_CPE_ID_PKG1_%s" % v, pkg_vars) + pkg_json = self.get_json("host-cpe-id-pkg1") + self.assertNotIn("cpe-id", pkg_json['host-cpe-id-pkg1']) + + def test_pkg2(self): + # this package has no CPE ID information, it should not have + # any CPE_ID variable defined. + pkg_vars = self.get_vars("HOST_CPE_ID_PKG2_CPE_ID") + cpe_vars = ["CPE_ID_VALID", "CPE_ID_PRODUCT", "CPE_ID_VERSION", "CPE_ID_UPDATE", + "CPE_ID_PREFIX", "CPE_ID"] + for v in cpe_vars: + self.assertNotIn("HOST_CPE_ID_PKG2_%s" % v, pkg_vars) + pkg_json = self.get_json("host-cpe-id-pkg2") + self.assertNotIn("cpe-id", pkg_json['host-cpe-id-pkg2']) + + def test_pkg3(self): + # this package has just _CPE_ID_VENDOR defined, so verify + # it has the default CPE_ID value, and that inheritance of the + # values for the host package is working + pkg_vars = self.get_vars("CPE_ID_PKG3_CPE_ID") + self.assertEqual(pkg_vars["CPE_ID_PKG3_CPE_ID"], + "cpe:2.3:a:cpe-id-pkg3_project:cpe-id-pkg3:67:*:*:*:*:*:*:*") + self.assertEqual(pkg_vars["CPE_ID_PKG3_CPE_ID_VALID"], "YES") + pkg_json = self.get_json("cpe-id-pkg3") + self.assertEqual(pkg_json['cpe-id-pkg3']['cpe-id'], + "cpe:2.3:a:cpe-id-pkg3_project:cpe-id-pkg3:67:*:*:*:*:*:*:*") + + pkg_vars = self.get_vars("HOST_CPE_ID_PKG3_CPE_ID") + self.assertEqual(pkg_vars["HOST_CPE_ID_PKG3_CPE_ID"], + "cpe:2.3:a:cpe-id-pkg3_project:cpe-id-pkg3:67:*:*:*:*:*:*:*") + self.assertEqual(pkg_vars["HOST_CPE_ID_PKG3_CPE_ID_VALID"], "YES") + pkg_json = self.get_json("host-cpe-id-pkg3") + self.assertEqual(pkg_json['host-cpe-id-pkg3']['cpe-id'], + "cpe:2.3:a:cpe-id-pkg3_project:cpe-id-pkg3:67:*:*:*:*:*:*:*") + + def test_pkg4(self): + # this package defines + # _CPE_ID_{VENDOR,PRODUCT,VERSION,UPDATE,PREFIX}, + # make sure we get the computed _CPE_ID, and that it is + # inherited by the host variant + pkg_vars = self.get_vars("CPE_ID_PKG4_CPE_ID") + self.assertEqual(pkg_vars["CPE_ID_PKG4_CPE_ID"], + "cpe:2.4:a:foo:bar:42:b2:*:*:*:*:*:*") + self.assertEqual(pkg_vars["CPE_ID_PKG4_CPE_ID_VALID"], "YES") + pkg_json = self.get_json("cpe-id-pkg4") + self.assertEqual(pkg_json['cpe-id-pkg4']['cpe-id'], + "cpe:2.4:a:foo:bar:42:b2:*:*:*:*:*:*") + + pkg_vars = self.get_vars("HOST_CPE_ID_PKG4_CPE_ID") + self.assertEqual(pkg_vars["HOST_CPE_ID_PKG4_CPE_ID"], + "cpe:2.4:a:foo:bar:42:b2:*:*:*:*:*:*") + self.assertEqual(pkg_vars["HOST_CPE_ID_PKG4_CPE_ID_VALID"], "YES") + pkg_json = self.get_json("host-cpe-id-pkg4") + self.assertEqual(pkg_json['host-cpe-id-pkg4']['cpe-id'], + "cpe:2.4:a:foo:bar:42:b2:*:*:*:*:*:*") + + def test_pkg5(self): + # this package defines + # _CPE_ID_{VENDOR,PRODUCT,VERSION,UPDATE,PREFIX} and + # HOST__CPE_ID_{VENDOR,PRODUCT,VERSION,UPDATE,PREFIX} + # separately, with different values. Make sure we get the + # right _CPE_ID and HOST__CPE_ID values. + pkg_vars = self.get_vars("CPE_ID_PKG5_CPE_ID") + self.assertEqual(pkg_vars["CPE_ID_PKG5_CPE_ID"], + "cpe:2.4:a:foo:bar:42:b2:*:*:*:*:*:*") + self.assertEqual(pkg_vars["CPE_ID_PKG5_CPE_ID_VALID"], "YES") + pkg_json = self.get_json("cpe-id-pkg5") + self.assertEqual(pkg_json['cpe-id-pkg5']['cpe-id'], + "cpe:2.4:a:foo:bar:42:b2:*:*:*:*:*:*") + + pkg_vars = self.get_vars("HOST_CPE_ID_PKG5_CPE_ID") + self.assertEqual(pkg_vars["HOST_CPE_ID_PKG5_CPE_ID"], + "cpe:2.5:a:baz:fuz:43:b3:*:*:*:*:*:*") + self.assertEqual(pkg_vars["HOST_CPE_ID_PKG5_CPE_ID_VALID"], "YES") + pkg_json = self.get_json("host-cpe-id-pkg5") + self.assertEqual(pkg_json['host-cpe-id-pkg5']['cpe-id'], + "cpe:2.5:a:baz:fuz:43:b3:*:*:*:*:*:*") diff --git a/support/testing/tests/core/test_file_capabilities.py b/support/testing/tests/core/test_file_capabilities.py new file mode 100644 index 00000000..b9ece18d --- /dev/null +++ b/support/testing/tests/core/test_file_capabilities.py @@ -0,0 +1,47 @@ +import os +import subprocess + +import infra.basetest + + +class TestFileCapabilities(infra.basetest.BRTest): + config = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt {}" + BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.3" + BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}" + BR2_LINUX_KERNEL_DTS_SUPPORT=y + BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + BR2_PACKAGE_LIBCAP=y + BR2_PACKAGE_LIBCAP_TOOLS=y + BR2_TARGET_ROOTFS_SQUASHFS=y + # BR2_TARGET_ROOTFS_TAR is not set + """.format(infra.filepath("tests/core/device_table2.txt"), + infra.filepath("tests/core/squashfs-xattr-kernel.config")) + + def test_run(self): + img = os.path.join(self.builddir, "images", "rootfs.squashfs") + subprocess.call(["truncate", "-s", "%1M", img]) + + self.emulator.boot(arch="armv7", + kernel=os.path.join(self.builddir, "images", "zImage"), + kernel_cmdline=["root=/dev/mmcblk0", + "rootfstype=squashfs"], + options=["-drive", "file={},if=sd,format=raw".format(img), + "-M", "vexpress-a9", + "-dtb", os.path.join(self.builddir, "images", "vexpress-v2p-ca9.dtb")]) + self.emulator.login() + + cmd = "getcap -v /usr/sbin/getcap" + output, _ = self.emulator.run(cmd) + self.assertIn("cap_kill", output[0]) + self.assertIn("cap_sys_nice", output[0]) + self.assertIn("cap_sys_time", output[0]) + self.assertIn("=eip", output[0]) diff --git a/support/testing/tests/core/test_hardening.py b/support/testing/tests/core/test_hardening.py new file mode 100644 index 00000000..60e14303 --- /dev/null +++ b/support/testing/tests/core/test_hardening.py @@ -0,0 +1,114 @@ +import os +import json + +import infra.basetest + + +class TestHardeningBase(infra.basetest.BRTest): + config = \ + """ + BR2_powerpc64=y + BR2_powerpc_e5500=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e5500/tarballs/powerpc64-e5500--glibc--stable-2018.02-2.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_6=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y + BR2_TOOLCHAIN_EXTERNAL_CXX=y + BR2_PACKAGE_LIGHTTPD=y + BR2_PACKAGE_HOST_CHECKSEC=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + checksec_files = ["usr/sbin/lighttpd", "bin/busybox"] + + def checksec_run(self, target_file): + filepath = os.path.join(self.builddir, "target", target_file) + cmd = ["host/bin/checksec", "--format=json", + "--file={}".format(filepath)] + # Checksec is being used for elf file analysis only. There are no + # assumptions of target/run-time checks as part of this testing. + ret = infra.run_cmd_on_host(self.builddir, cmd) + return json.loads(ret) + + +class TestRelro(TestHardeningBase): + config = TestHardeningBase.config + \ + """ + BR2_RELRO_FULL=y + """ + + def test_run(self): + for f in self.checksec_files: + out = self.checksec_run(f) + filepath = os.path.join(self.builddir, "target", f) + self.assertEqual(out[filepath]["relro"], "full") + self.assertEqual(out[filepath]["pie"], "yes") + + +class TestRelroPartial(TestHardeningBase): + config = TestHardeningBase.config + \ + """ + BR2_RELRO_PARTIAL=y + """ + + def test_run(self): + for f in self.checksec_files: + out = self.checksec_run(f) + filepath = os.path.join(self.builddir, "target", f) + self.assertEqual(out[filepath]["relro"], "partial") + self.assertEqual(out[filepath]["pie"], "no") + + +class TestSspNone(TestHardeningBase): + config = TestHardeningBase.config + \ + """ + BR2_SSP_NONE=y + """ + + def test_run(self): + for f in self.checksec_files: + out = self.checksec_run(f) + filepath = os.path.join(self.builddir, "target", f) + self.assertEqual(out[filepath]["canary"], "no") + + +class TestSspStrong(TestHardeningBase): + config = TestHardeningBase.config + \ + """ + BR2_SSP_STRONG=y + """ + + def test_run(self): + for f in self.checksec_files: + out = self.checksec_run(f) + filepath = os.path.join(self.builddir, "target", f) + self.assertEqual(out[filepath]["canary"], "yes") + + +class TestFortifyNone(TestHardeningBase): + config = TestHardeningBase.config + \ + """ + BR2_FORTIFY_SOURCE_NONE=y + """ + + def test_run(self): + for f in self.checksec_files: + out = self.checksec_run(f) + filepath = os.path.join(self.builddir, "target", f) + self.assertEqual(out[filepath]["fortified"], "0") + + +class TestFortifyConserv(TestHardeningBase): + config = TestHardeningBase.config + \ + """ + BR2_FORTIFY_SOURCE_1=y + """ + + def test_run(self): + for f in self.checksec_files: + out = self.checksec_run(f) + filepath = os.path.join(self.builddir, "target", f) + self.assertNotEqual(out[filepath]["fortified"], "0") diff --git a/support/testing/tests/core/test_post_scripts.py b/support/testing/tests/core/test_post_scripts.py new file mode 100644 index 00000000..bc61f4af --- /dev/null +++ b/support/testing/tests/core/test_post_scripts.py @@ -0,0 +1,48 @@ +import os +import csv + +import infra.basetest + + +class TestPostScripts(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_INIT_NONE=y + BR2_SYSTEM_BIN_SH_NONE=y + # BR2_PACKAGE_BUSYBOX is not set + BR2_ROOTFS_POST_BUILD_SCRIPT="{}" + BR2_ROOTFS_POST_FAKEROOT_SCRIPT="{}" + BR2_ROOTFS_POST_IMAGE_SCRIPT="{}" + BR2_ROOTFS_POST_SCRIPT_ARGS="foobar baz" + """.format(infra.filepath("tests/core/post-build.sh"), + infra.filepath("tests/core/post-fakeroot.sh"), + infra.filepath("tests/core/post-image.sh")) + + def check_post_log_file(self, f, what, target_dir): + lines = {} + with open(os.path.join(self.builddir, "build", f), newline='') as csvfile: + r = csv.reader(csvfile, delimiter=',') + for row in r: + lines[row[0]] = row[1] + + self.assertEqual(lines["arg1"], what) + self.assertEqual(lines["arg2"], "foobar") + self.assertEqual(lines["arg3"], "baz") + self.assertEqual(lines["TARGET_DIR"], target_dir) + self.assertEqual(lines["BUILD_DIR"], os.path.join(self.builddir, "build")) + self.assertEqual(lines["HOST_DIR"], os.path.join(self.builddir, "host")) + staging = os.readlink(os.path.join(self.builddir, "staging")) + self.assertEqual(lines["STAGING_DIR"], staging) + self.assertEqual(lines["BINARIES_DIR"], os.path.join(self.builddir, "images")) + self.assertEqual(lines["BR2_CONFIG"], os.path.join(self.builddir, ".config")) + + def test_run(self): + self.check_post_log_file("post-build.log", + os.path.join(self.builddir, "target"), + os.path.join(self.builddir, "target")) + self.check_post_log_file("post-fakeroot.log", + os.path.join(self.builddir, "build/buildroot-fs/tar/target"), + os.path.join(self.builddir, "build/buildroot-fs/tar/target")) + self.check_post_log_file("post-image.log", + os.path.join(self.builddir, "images"), + os.path.join(self.builddir, "target")) diff --git a/support/testing/tests/core/test_root_password.py b/support/testing/tests/core/test_root_password.py new file mode 100644 index 00000000..aefcd360 --- /dev/null +++ b/support/testing/tests/core/test_root_password.py @@ -0,0 +1,36 @@ +import os +import infra.basetest +from crypt import crypt + + +class TestRootPassword(infra.basetest.BRTest): + password = "foo" + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + BR2_TARGET_ENABLE_ROOT_LOGIN=y + BR2_TARGET_GENERIC_ROOT_PASSWD="{}" + """.format(password) + + def test_run(self): + # 1. Test by looking hash in the /etc/shadow + shadow = os.path.join(self.builddir, "target", "etc", "shadow") + with open(shadow, "r") as f: + users = f.readlines() + for user in users: + s = user.split(":") + n, h = s[0], s[1] + if n == "root": + # Fail if the account is disabled or no password is required + self.assertTrue(h not in ["", "*"]) + # Fail if the hash isn't right + self.assertEqual(crypt(self.password, h), h) + + # 2. Test by attempting to login + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + try: + self.emulator.boot(arch="armv7", kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login(self.password) + except SystemError: + self.fail("Unable to login with the password") diff --git a/support/testing/tests/core/test_rootfs_overlay.py b/support/testing/tests/core/test_rootfs_overlay.py new file mode 100644 index 00000000..fedd40d8 --- /dev/null +++ b/support/testing/tests/core/test_rootfs_overlay.py @@ -0,0 +1,30 @@ +import os +import subprocess + +import infra.basetest + + +def compare_file(file1, file2): + return subprocess.call(["cmp", file1, file2]) + + +class TestRootfsOverlay(infra.basetest.BRTest): + + rootfs_overlay_path = infra.filepath("tests/core/rootfs-overlay") + + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + infra.basetest.MINIMAL_CONFIG + \ + """ + BR2_ROOTFS_OVERLAY="{0}1 {0}2" + """.format(rootfs_overlay_path) + + def test_run(self): + target_file = os.path.join(self.builddir, "target", "test-file1") + overlay_file = "{}1/test-file1".format(self.rootfs_overlay_path) + ret = compare_file(overlay_file, target_file) + self.assertEqual(ret, 0) + + target_file = os.path.join(self.builddir, "target", "etc", "test-file2") + overlay_file = "{}2/etc/test-file2".format(self.rootfs_overlay_path) + ret = compare_file(overlay_file, target_file) + self.assertEqual(ret, 0) diff --git a/support/testing/tests/core/test_selinux.py b/support/testing/tests/core/test_selinux.py new file mode 100644 index 00000000..683a424d --- /dev/null +++ b/support/testing/tests/core/test_selinux.py @@ -0,0 +1,86 @@ +import os + +import infra.basetest + + +class TestSELinuxInfra(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG +\ + """ + BR2_PACKAGE_REFPOLICY=y + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_SETOOLS=y + BR2_TARGET_ROOTFS_CPIO=y + """ + + def base_test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + +class TestSELinuxExtraModules(TestSELinuxInfra): + config = TestSELinuxInfra.config + \ + """ + BR2_REFPOLICY_EXTRA_MODULES="ntp tor" + """ + + def test_run(self): + TestSELinuxInfra.base_test_run(self) + + out, ret = self.emulator.run("seinfo -t ntpd_t", 15) + self.assertEqual(ret, 0) + self.assertEqual(out[2].strip(), "ntpd_t") + + out, ret = self.emulator.run("seinfo -t tor_t", 15) + self.assertEqual(ret, 0) + self.assertEqual(out[2].strip(), "tor_t") + + +class TestSELinuxExtraModulesDirs(TestSELinuxInfra): + config = TestSELinuxInfra.config + \ + """ + BR2_REFPOLICY_EXTRA_MODULES_DIRS="{}" + """.format(infra.filepath("tests/core/test_selinux/extra_modules")) + + def test_run(self): + TestSELinuxInfra.base_test_run(self) + + out, ret = self.emulator.run("seinfo -t buildroot_test_t", 15) + self.assertEqual(ret, 0) + self.assertEqual(out[2].strip(), "buildroot_test_t") + + +class TestSELinuxCustomGit(TestSELinuxInfra): + config = TestSELinuxInfra.config + \ + """ + BR2_PACKAGE_REFPOLICY_CUSTOM_GIT=y + BR2_PACKAGE_REFPOLICY_CUSTOM_REPO_URL="https://github.com/SELinuxProject/refpolicy.git" + BR2_PACKAGE_REFPOLICY_CUSTOM_REPO_VERSION="RELEASE_2_20200818" + """ + + def test_run(self): + pass + + +class TestSELinuxPackage(TestSELinuxInfra): + br2_external = [infra.filepath("tests/core/test_selinux/br2_external")] + config = TestSELinuxInfra.config + \ + """ + BR2_PACKAGE_SELINUX_TEST=y + """ + + def test_run(self): + TestSELinuxInfra.base_test_run(self) + + out, ret = self.emulator.run("seinfo -t ntpd_t", 15) + self.assertEqual(ret, 0) + self.assertEqual(out[2].strip(), "ntpd_t") + + out, ret = self.emulator.run("seinfo -t tor_t", 15) + self.assertEqual(ret, 0) + self.assertEqual(out[2].strip(), "tor_t") + + out, ret = self.emulator.run("seinfo -t buildroot_test_t", 15) + self.assertEqual(ret, 0) + self.assertEqual(out[2].strip(), "buildroot_test_t") diff --git a/support/testing/tests/core/test_selinux/br2_external/Config.in b/support/testing/tests/core/test_selinux/br2_external/Config.in new file mode 100644 index 00000000..9d9c84ee --- /dev/null +++ b/support/testing/tests/core/test_selinux/br2_external/Config.in @@ -0,0 +1 @@ +source "$BR2_EXTERNAL_SELINUX_PATH/package/selinux-test/Config.in" diff --git a/support/testing/tests/core/test_selinux/br2_external/external.desc b/support/testing/tests/core/test_selinux/br2_external/external.desc new file mode 100644 index 00000000..44b5b95f --- /dev/null +++ b/support/testing/tests/core/test_selinux/br2_external/external.desc @@ -0,0 +1 @@ +name: SELINUX diff --git a/support/testing/tests/core/test_selinux/br2_external/external.mk b/support/testing/tests/core/test_selinux/br2_external/external.mk new file mode 100644 index 00000000..54d2402d --- /dev/null +++ b/support/testing/tests/core/test_selinux/br2_external/external.mk @@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_SELINUX_PATH)/package/*/*.mk)) diff --git a/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/Config.in b/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/Config.in new file mode 100644 index 00000000..e30ac831 --- /dev/null +++ b/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_SELINUX_TEST + bool "SELinux test package" + help + Test package for SELinux Buildroot helpers. diff --git a/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux-test.mk b/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux-test.mk new file mode 100644 index 00000000..0100b718 --- /dev/null +++ b/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux-test.mk @@ -0,0 +1,9 @@ +################################################################################ +# +# SELinux test package +# +################################################################################ + +SELINUX_TEST_SELINUX_MODULES = ntp tor + +$(eval $(generic-package)) diff --git a/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux/buildroot.fc b/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux/buildroot.fc new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux/buildroot.if b/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux/buildroot.if new file mode 100644 index 00000000..acf797e6 --- /dev/null +++ b/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux/buildroot.if @@ -0,0 +1 @@ +## Buildroot rules diff --git a/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux/buildroot.te b/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux/buildroot.te new file mode 100644 index 00000000..266bc03b --- /dev/null +++ b/support/testing/tests/core/test_selinux/br2_external/package/selinux-test/selinux/buildroot.te @@ -0,0 +1,3 @@ +policy_module(buildroot, 1.0.0) + +type buildroot_test_t; diff --git a/support/testing/tests/core/test_selinux/extra_modules/buildroot.fc b/support/testing/tests/core/test_selinux/extra_modules/buildroot.fc new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/core/test_selinux/extra_modules/buildroot.if b/support/testing/tests/core/test_selinux/extra_modules/buildroot.if new file mode 100644 index 00000000..acf797e6 --- /dev/null +++ b/support/testing/tests/core/test_selinux/extra_modules/buildroot.if @@ -0,0 +1 @@ +## Buildroot rules diff --git a/support/testing/tests/core/test_selinux/extra_modules/buildroot.te b/support/testing/tests/core/test_selinux/extra_modules/buildroot.te new file mode 100644 index 00000000..266bc03b --- /dev/null +++ b/support/testing/tests/core/test_selinux/extra_modules/buildroot.te @@ -0,0 +1,3 @@ +policy_module(buildroot, 1.0.0) + +type buildroot_test_t; diff --git a/support/testing/tests/core/test_timezone.py b/support/testing/tests/core/test_timezone.py new file mode 100644 index 00000000..f6615191 --- /dev/null +++ b/support/testing/tests/core/test_timezone.py @@ -0,0 +1,72 @@ +import os + +import infra.basetest + + +def boot_armv5_cpio(emulator, builddir): + img = os.path.join(builddir, "images", "rootfs.cpio") + emulator.boot(arch="armv5", kernel="builtin", + options=["-initrd", img]) + emulator.login() + + +class TestNoTimezone(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + # BR2_TARGET_TZ_INFO is not set + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + boot_armv5_cpio(self.emulator, self.builddir) + tz, _ = self.emulator.run("TZ=UTC date +%Z") + self.assertEqual(tz[0].strip(), "UTC") + tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z") + self.assertEqual(tz[0].strip(), "UTC") + + +class TestGlibcAllTimezone(infra.basetest.BRTest): + config = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_TZ_INFO=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + boot_armv5_cpio(self.emulator, self.builddir) + tz, _ = self.emulator.run("date +%Z") + self.assertEqual(tz[0].strip(), "UTC") + tz, _ = self.emulator.run("TZ=UTC date +%Z") + self.assertEqual(tz[0].strip(), "UTC") + tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z") + self.assertEqual(tz[0].strip(), "PST") + tz, _ = self.emulator.run("TZ=Europe/Paris date +%Z") + self.assertEqual(tz[0].strip(), "CET") + + +class TestGlibcNonDefaultLimitedTimezone(infra.basetest.BRTest): + config = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_TZ_INFO=y + BR2_TARGET_TZ_ZONELIST="northamerica" + BR2_TARGET_LOCALTIME="America/New_York" + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + boot_armv5_cpio(self.emulator, self.builddir) + tz, _ = self.emulator.run("date +%Z") + self.assertEqual(tz[0].strip(), "EST") + tz, _ = self.emulator.run("TZ=UTC date +%Z") + self.assertEqual(tz[0].strip(), "UTC") + tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z") + self.assertEqual(tz[0].strip(), "PST") + tz, _ = self.emulator.run("TZ=Europe/Paris date +%Z") + self.assertEqual(tz[0].strip(), "Europe") diff --git a/support/testing/tests/download/__init__.py b/support/testing/tests/download/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/download/br2-external/git-hash/Config.in b/support/testing/tests/download/br2-external/git-hash/Config.in new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/download/br2-external/git-hash/external.desc b/support/testing/tests/download/br2-external/git-hash/external.desc new file mode 100644 index 00000000..41316c8b --- /dev/null +++ b/support/testing/tests/download/br2-external/git-hash/external.desc @@ -0,0 +1 @@ +name: GIT_HASH diff --git a/support/testing/tests/download/br2-external/git-hash/external.mk b/support/testing/tests/download/br2-external/git-hash/external.mk new file mode 100644 index 00000000..4646dfe2 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-hash/external.mk @@ -0,0 +1,4 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_GIT_HASH_PATH)/package/*/*.mk)) + +# Get the git server port number from the test infra +GITREMOTE_PORT_NUMBER ?= 9418 diff --git a/support/testing/tests/download/br2-external/git-hash/package/bad/bad.hash b/support/testing/tests/download/br2-external/git-hash/package/bad/bad.hash new file mode 100644 index 00000000..b44b1f82 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-hash/package/bad/bad.hash @@ -0,0 +1 @@ +sha256 0000000000000000000000000000000000000000000000000000000000000000 bad-a238b1dfcd825d47d834af3c5223417c8411d90d-br1.tar.gz diff --git a/support/testing/tests/download/br2-external/git-hash/package/bad/bad.mk b/support/testing/tests/download/br2-external/git-hash/package/bad/bad.mk new file mode 100644 index 00000000..5497bd6b --- /dev/null +++ b/support/testing/tests/download/br2-external/git-hash/package/bad/bad.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# bad +# +################################################################################ + +BAD_VERSION = a238b1dfcd825d47d834af3c5223417c8411d90d +BAD_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-hash/package/good/good.hash b/support/testing/tests/download/br2-external/git-hash/package/good/good.hash new file mode 100644 index 00000000..fc3f60da --- /dev/null +++ b/support/testing/tests/download/br2-external/git-hash/package/good/good.hash @@ -0,0 +1 @@ +sha256 682ad1f39f258bfb35e26f213f3798f44bb8105bb55fad47bdc003113765b650 good-a238b1dfcd825d47d834af3c5223417c8411d90d-br1.tar.gz diff --git a/support/testing/tests/download/br2-external/git-hash/package/good/good.mk b/support/testing/tests/download/br2-external/git-hash/package/good/good.mk new file mode 100644 index 00000000..0f0eefd9 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-hash/package/good/good.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# good +# +################################################################################ + +GOOD_VERSION = a238b1dfcd825d47d834af3c5223417c8411d90d +GOOD_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-hash/package/nohash/nohash.mk b/support/testing/tests/download/br2-external/git-hash/package/nohash/nohash.mk new file mode 100644 index 00000000..1da19d88 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-hash/package/nohash/nohash.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# nohash +# +################################################################################ + +NOHASH_VERSION = a238b1dfcd825d47d834af3c5223417c8411d90d +NOHASH_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/Config.in b/support/testing/tests/download/br2-external/git-refs/Config.in new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/download/br2-external/git-refs/external.desc b/support/testing/tests/download/br2-external/git-refs/external.desc new file mode 100644 index 00000000..69f40d46 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/external.desc @@ -0,0 +1 @@ +name: GIT_REFS diff --git a/support/testing/tests/download/br2-external/git-refs/external.mk b/support/testing/tests/download/br2-external/git-refs/external.mk new file mode 100644 index 00000000..ab38c27e --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/external.mk @@ -0,0 +1,4 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_GIT_REFS_PATH)/package/*/*.mk)) + +# Get the git server port number from the test infra +GITREMOTE_PORT_NUMBER ?= 9418 diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.hash new file mode 100644 index 00000000..26a6b358 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.hash @@ -0,0 +1,2 @@ +sha256 c27041b3e874beb0d0218158e7d6507ad1515b684de5eed5fabd0f7205e9718e git-partial-sha1-branch-head-68c197d0879d485f4f6c-br1.tar.gz +sha256 2c1126513651b0d346a4e6d1bb75ac1c9999217e18026302d27bea47b06c7fb2 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.mk new file mode 100644 index 00000000..6d4177c5 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-partial-sha1-branch-head +# +################################################################################ + +GIT_PARTIAL_SHA1_BRANCH_HEAD_VERSION = 68c197d0879d485f4f6c +GIT_PARTIAL_SHA1_BRANCH_HEAD_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_PARTIAL_SHA1_BRANCH_HEAD_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.hash new file mode 100644 index 00000000..ab1edc73 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.hash @@ -0,0 +1,2 @@ +sha256 1bbba9bf2788bd789ed8da4e47cabbf3467b1f706875b3f6b62df38e08fb9aba git-partial-sha1-reachable-by-branch-317406308d9259e2231b-br1.tar.gz +sha256 fabbc65c442bacb5e69b7adfea6d14fbbfc1327134322efd12771dc84387d507 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.mk new file mode 100644 index 00000000..2f65b5c9 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-partial-sha1-reachable-by-branch +# +################################################################################ + +GIT_PARTIAL_SHA1_REACHABLE_BY_BRANCH_VERSION = 317406308d9259e2231b +GIT_PARTIAL_SHA1_REACHABLE_BY_BRANCH_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_PARTIAL_SHA1_REACHABLE_BY_BRANCH_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.hash new file mode 100644 index 00000000..e4a08342 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.hash @@ -0,0 +1,2 @@ +sha256 52d223f3b2d625216c259e9ff949ca8818452a531ba61557dd91f3889c7919d7 git-partial-sha1-reachable-by-tag-46bae5b639e5a18e2cc4-br1.tar.gz +sha256 2de87d77a2f226813f2d9bda906e970e4195605cdba6680443c0c04d89c532b6 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.mk new file mode 100644 index 00000000..05aa659d --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-partial-sha1-reachable-by-tag +# +################################################################################ + +GIT_PARTIAL_SHA1_REACHABLE_BY_TAG_VERSION = 46bae5b639e5a18e2cc4 +GIT_PARTIAL_SHA1_REACHABLE_BY_TAG_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_PARTIAL_SHA1_REACHABLE_BY_TAG_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.hash new file mode 100644 index 00000000..6e83e637 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.hash @@ -0,0 +1,2 @@ +sha256 5cfc004b05f48b3fb419a5db4b7239223d670225fbbb91de2ae151c97910b36c git-partial-sha1-tag-itself-2b0e0d98a49c97da6a61-br1.tar.gz +sha256 6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.mk new file mode 100644 index 00000000..51549239 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-partial-sha1-tag-itself +# +################################################################################ + +GIT_PARTIAL_SHA1_TAG_ITSELF_VERSION = 2b0e0d98a49c97da6a61 +GIT_PARTIAL_SHA1_TAG_ITSELF_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_PARTIAL_SHA1_TAG_ITSELF_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.hash new file mode 100644 index 00000000..7d538e72 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.hash @@ -0,0 +1,2 @@ +sha256 0f40d7f39bf2e389cc2ce03c73cc0cc9ded1119378aaa68e2a2ef8597f6fd2f3 git-partial-sha1-tag-points-to-516c9c5f64ec66534d4d-br1.tar.gz +sha256 6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.mk new file mode 100644 index 00000000..c810e811 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-partial-sha1-tag-points-to +# +################################################################################ + +GIT_PARTIAL_SHA1_TAG_POINTS_TO_VERSION = 516c9c5f64ec66534d4d +GIT_PARTIAL_SHA1_TAG_POINTS_TO_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_PARTIAL_SHA1_TAG_POINTS_TO_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.hash new file mode 100644 index 00000000..2fc4fbcb --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.hash @@ -0,0 +1,2 @@ +sha256 3ab67c485ce1825abbbf5db1d90d94dfadc89b30bb740041cfc75fc04021e218 git-sha1-branch-head-68c197d0879d485f4f6cee85544722b79e68e59f-br1.tar.gz +sha256 2c1126513651b0d346a4e6d1bb75ac1c9999217e18026302d27bea47b06c7fb2 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.mk new file mode 100644 index 00000000..d3ecaa85 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-sha1-branch-head +# +################################################################################ + +GIT_SHA1_BRANCH_HEAD_VERSION = 68c197d0879d485f4f6cee85544722b79e68e59f +GIT_SHA1_BRANCH_HEAD_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_SHA1_BRANCH_HEAD_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.hash new file mode 100644 index 00000000..38f0578f --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.hash @@ -0,0 +1,2 @@ +sha256 a5936d6d6022ea101a6076864a2afa918ab2776764012c4be589027001044041 git-sha1-reachable-by-branch-317406308d9259e2231bd0d6ddad3de3832bce08-br1.tar.gz +sha256 fabbc65c442bacb5e69b7adfea6d14fbbfc1327134322efd12771dc84387d507 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.mk new file mode 100644 index 00000000..badf9e13 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-sha1-reachable-by-branch +# +################################################################################ + +GIT_SHA1_REACHABLE_BY_BRANCH_VERSION = 317406308d9259e2231bd0d6ddad3de3832bce08 +GIT_SHA1_REACHABLE_BY_BRANCH_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_SHA1_REACHABLE_BY_BRANCH_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.hash new file mode 100644 index 00000000..bd4673b1 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.hash @@ -0,0 +1,2 @@ +sha256 c203f968e358ca478d4c5344b1e4ae9bf13f9fb1120f2ed96a12154dd64195a6 git-sha1-reachable-by-tag-46bae5b639e5a18e2cc4dc508f080d566baeff59-br1.tar.gz +sha256 2de87d77a2f226813f2d9bda906e970e4195605cdba6680443c0c04d89c532b6 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.mk new file mode 100644 index 00000000..b5fde7b5 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-sha1-reachable-by-tag +# +################################################################################ + +GIT_SHA1_REACHABLE_BY_TAG_VERSION = 46bae5b639e5a18e2cc4dc508f080d566baeff59 +GIT_SHA1_REACHABLE_BY_TAG_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_SHA1_REACHABLE_BY_TAG_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.hash new file mode 100644 index 00000000..c6862da7 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.hash @@ -0,0 +1,2 @@ +sha256 57f08e9f3914e79a10e7fb5d346b26fef2773dd22eed0d61fd755e79e62cee93 git-sha1-tag-itself-2b0e0d98a49c97da6a618ab36337e2058eb733a2-br1.tar.gz +sha256 6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.mk new file mode 100644 index 00000000..89144966 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-sha1-tag-itself +# +################################################################################ + +GIT_SHA1_TAG_ITSELF_VERSION = 2b0e0d98a49c97da6a618ab36337e2058eb733a2 +GIT_SHA1_TAG_ITSELF_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_SHA1_TAG_ITSELF_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.hash new file mode 100644 index 00000000..188cb689 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.hash @@ -0,0 +1,2 @@ +sha256 1d8b565827137aa21ba37cde382aa291e33a135c697e38dcd31f14e195386327 git-sha1-tag-points-to-516c9c5f64ec66534d4d069c2e408d9ae4dce023-br1.tar.gz +sha256 6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.mk new file mode 100644 index 00000000..adaae732 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-sha1-tag-points-to +# +################################################################################ + +GIT_SHA1_TAG_POINTS_TO_VERSION = 516c9c5f64ec66534d4d069c2e408d9ae4dce023 +GIT_SHA1_TAG_POINTS_TO_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_SHA1_TAG_POINTS_TO_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-submodule-disabled/git-submodule-disabled.hash b/support/testing/tests/download/br2-external/git-refs/package/git-submodule-disabled/git-submodule-disabled.hash new file mode 100644 index 00000000..c0698e7b --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-submodule-disabled/git-submodule-disabled.hash @@ -0,0 +1,2 @@ +sha256 e8e0febc7f1408df22bce2d73d9a30081e03b45e152bc25effd14435ca8b3433 git-submodule-disabled-a9dbc1e23c45e8e1b88c0448763f54d714eb6f8f-br1.tar.gz +sha256 ba8b6ddc4726bfb6a05045ebfd8c43263c968ad1bc601bd46a25bc055008eddc file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-submodule-disabled/git-submodule-disabled.mk b/support/testing/tests/download/br2-external/git-refs/package/git-submodule-disabled/git-submodule-disabled.mk new file mode 100644 index 00000000..7a35b3b5 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-submodule-disabled/git-submodule-disabled.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-submodule-disabled +# +################################################################################ + +GIT_SUBMODULE_DISABLED_VERSION = a9dbc1e23c45e8e1b88c0448763f54d714eb6f8f +GIT_SUBMODULE_DISABLED_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_SUBMODULE_DISABLED_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-submodule-enabled/git-submodule-enabled.hash b/support/testing/tests/download/br2-external/git-refs/package/git-submodule-enabled/git-submodule-enabled.hash new file mode 100644 index 00000000..b95c51fe --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-submodule-enabled/git-submodule-enabled.hash @@ -0,0 +1 @@ +sha256 176c32f10ad11f290b6251d701835450292ba281eb59c7fb57b244407a55ceab git-submodule-enabled-a9dbc1e23c45e8e1b88c0448763f54d714eb6f8f-br1.tar.gz diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-submodule-enabled/git-submodule-enabled.mk b/support/testing/tests/download/br2-external/git-refs/package/git-submodule-enabled/git-submodule-enabled.mk new file mode 100644 index 00000000..48a42f5e --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-submodule-enabled/git-submodule-enabled.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-submodule-enabled +# +################################################################################ + +GIT_SUBMODULE_ENABLED_VERSION = a9dbc1e23c45e8e1b88c0448763f54d714eb6f8f +GIT_SUBMODULE_ENABLED_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_SUBMODULE_ENABLED_GIT_SUBMODULES = YES + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.hash b/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.hash new file mode 100644 index 00000000..c7ebcf0e --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.hash @@ -0,0 +1,2 @@ +sha256 c66b2366d8ccb1670951012334fe8d48de3358aef39b3da2912b339448fefcde git-tag-mytag-br1.tar.gz +sha256 6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.mk b/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.mk new file mode 100644 index 00000000..6960ceb2 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-tag +# +################################################################################ + +GIT_TAG_VERSION = mytag +GIT_TAG_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_TAG_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-wrong-content/git-wrong-content.hash b/support/testing/tests/download/br2-external/git-refs/package/git-wrong-content/git-wrong-content.hash new file mode 100644 index 00000000..453ffc0a --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-wrong-content/git-wrong-content.hash @@ -0,0 +1,2 @@ + sha256 4a230e667227310289438cd7d899276a0d45ca8778abfd043dfc0a10ed2c9085 git-wrong-content-a238b1dfcd825d47d834af3c5223417c8411d90d-br1.tar.gz + sha256 0000000000000000000000000000000000000000000000000000000000000000 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-wrong-content/git-wrong-content.mk b/support/testing/tests/download/br2-external/git-refs/package/git-wrong-content/git-wrong-content.mk new file mode 100644 index 00000000..786224da --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-wrong-content/git-wrong-content.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-wrong-content +# +################################################################################ + +GIT_WRONG_CONTENT_VERSION = a238b1dfcd825d47d834af3c5223417c8411d90d +GIT_WRONG_CONTENT_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_WRONG_CONTENT_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-wrong-sha1/git-wrong-sha1.mk b/support/testing/tests/download/br2-external/git-refs/package/git-wrong-sha1/git-wrong-sha1.mk new file mode 100644 index 00000000..f9d0d222 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-wrong-sha1/git-wrong-sha1.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-wrong-sha1 +# +################################################################################ + +GIT_WRONG_SHA1_VERSION = 0000000000000000000000000000000000000000 +GIT_WRONG_SHA1_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_WRONG_SHA1_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/.gitattributes b/support/testing/tests/download/git-remote/refs-sub1.git/.gitattributes new file mode 100644 index 00000000..eb50c64a --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub1.git/.gitattributes @@ -0,0 +1 @@ +objects/*/* binary diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/HEAD b/support/testing/tests/download/git-remote/refs-sub1.git/HEAD new file mode 100644 index 00000000..4e92c1f2 --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub1.git/HEAD @@ -0,0 +1 @@ +cb545facf77bbc5f24f95b6d503c338d10b7b717 diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/config b/support/testing/tests/download/git-remote/refs-sub1.git/config new file mode 100644 index 00000000..07d359d0 --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub1.git/config @@ -0,0 +1,4 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/07/cabc655213bdf7087d8dd50fda95124e935570 b/support/testing/tests/download/git-remote/refs-sub1.git/objects/07/cabc655213bdf7087d8dd50fda95124e935570 new file mode 100644 index 00000000..cbf5085a Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub1.git/objects/07/cabc655213bdf7087d8dd50fda95124e935570 differ diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/1d/f823cb8a6d1866148ae50a8009762a9c4c777f b/support/testing/tests/download/git-remote/refs-sub1.git/objects/1d/f823cb8a6d1866148ae50a8009762a9c4c777f new file mode 100644 index 00000000..04055b89 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub1.git/objects/1d/f823cb8a6d1866148ae50a8009762a9c4c777f differ diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/7d/52f458bdb0f9f5a4beb46fa82824421b8b988e b/support/testing/tests/download/git-remote/refs-sub1.git/objects/7d/52f458bdb0f9f5a4beb46fa82824421b8b988e new file mode 100644 index 00000000..2b78a019 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub1.git/objects/7d/52f458bdb0f9f5a4beb46fa82824421b8b988e differ diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/99/f2e3e1cb15f9b52fa29f66d380dda061d917ab b/support/testing/tests/download/git-remote/refs-sub1.git/objects/99/f2e3e1cb15f9b52fa29f66d380dda061d917ab new file mode 100644 index 00000000..9db72668 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub1.git/objects/99/f2e3e1cb15f9b52fa29f66d380dda061d917ab differ diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/a1/30af1626bbadd64841b2cbcb6ac4ed0638ba1a b/support/testing/tests/download/git-remote/refs-sub1.git/objects/a1/30af1626bbadd64841b2cbcb6ac4ed0638ba1a new file mode 100644 index 00000000..f49d5332 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub1.git/objects/a1/30af1626bbadd64841b2cbcb6ac4ed0638ba1a differ diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/bc/c81ba6e5bd8bf52c95688ae8d3e697e131fa23 b/support/testing/tests/download/git-remote/refs-sub1.git/objects/bc/c81ba6e5bd8bf52c95688ae8d3e697e131fa23 new file mode 100644 index 00000000..7d2a9d55 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub1.git/objects/bc/c81ba6e5bd8bf52c95688ae8d3e697e131fa23 differ diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/cb/545facf77bbc5f24f95b6d503c338d10b7b717 b/support/testing/tests/download/git-remote/refs-sub1.git/objects/cb/545facf77bbc5f24f95b6d503c338d10b7b717 new file mode 100644 index 00000000..dc7de294 --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub1.git/objects/cb/545facf77bbc5f24f95b6d503c338d10b7b717 @@ -0,0 +1 @@ +x­Î½ Â0@ajOq $:;²#„X€&8ÿ…q,S°=‘(èíW<=_ræjœv­ÆÖ&‡(½“:Y§U"e“1a˜0B#ƒ•#9AÏv+.쩆gª�W_w†Cý`Ÿ¿xš3ñÒû’� 5N¨�4*D±é6ÑâŸr‚WnL‹Wž×º’Rç^û_fÅW` \ No newline at end of file diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/dd/130f6f4629514adaf2e03407f3ed9344eb6cd6 b/support/testing/tests/download/git-remote/refs-sub1.git/objects/dd/130f6f4629514adaf2e03407f3ed9344eb6cd6 new file mode 100644 index 00000000..37037d39 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub1.git/objects/dd/130f6f4629514adaf2e03407f3ed9344eb6cd6 differ diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/e7/9c5e8f964493290a409888d5413a737e8e5dd5 b/support/testing/tests/download/git-remote/refs-sub1.git/objects/e7/9c5e8f964493290a409888d5413a737e8e5dd5 new file mode 100644 index 00000000..df2037a2 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub1.git/objects/e7/9c5e8f964493290a409888d5413a737e8e5dd5 differ diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/objects/f8/001e5780100962a5e30a25cbc4c9609cfc7bf3 b/support/testing/tests/download/git-remote/refs-sub1.git/objects/f8/001e5780100962a5e30a25cbc4c9609cfc7bf3 new file mode 100644 index 00000000..d824d3c1 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub1.git/objects/f8/001e5780100962a5e30a25cbc4c9609cfc7bf3 differ diff --git a/support/testing/tests/download/git-remote/refs-sub1.git/refs/heads/submodule b/support/testing/tests/download/git-remote/refs-sub1.git/refs/heads/submodule new file mode 100644 index 00000000..bf97dc41 --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub1.git/refs/heads/submodule @@ -0,0 +1 @@ +1df823cb8a6d1866148ae50a8009762a9c4c777f diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/.gitattributes b/support/testing/tests/download/git-remote/refs-sub2.git/.gitattributes new file mode 100644 index 00000000..eb50c64a --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub2.git/.gitattributes @@ -0,0 +1 @@ +objects/*/* binary diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/HEAD b/support/testing/tests/download/git-remote/refs-sub2.git/HEAD new file mode 100644 index 00000000..bbf19a4b --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub2.git/HEAD @@ -0,0 +1 @@ +32d61bae693af7879da63b89a60d3ae67f851e56 diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/config b/support/testing/tests/download/git-remote/refs-sub2.git/config new file mode 100644 index 00000000..07d359d0 --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub2.git/config @@ -0,0 +1,4 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/objects/0a/846af45c3e455789435f49f80d70e86b65b9d7 b/support/testing/tests/download/git-remote/refs-sub2.git/objects/0a/846af45c3e455789435f49f80d70e86b65b9d7 new file mode 100644 index 00000000..aaa29dbd Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub2.git/objects/0a/846af45c3e455789435f49f80d70e86b65b9d7 differ diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/objects/0b/32ebd8fc52cec991f18c94be980e85a8341585 b/support/testing/tests/download/git-remote/refs-sub2.git/objects/0b/32ebd8fc52cec991f18c94be980e85a8341585 new file mode 100644 index 00000000..50caf8b6 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub2.git/objects/0b/32ebd8fc52cec991f18c94be980e85a8341585 differ diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/objects/32/d61bae693af7879da63b89a60d3ae67f851e56 b/support/testing/tests/download/git-remote/refs-sub2.git/objects/32/d61bae693af7879da63b89a60d3ae67f851e56 new file mode 100644 index 00000000..a8887b1e --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub2.git/objects/32/d61bae693af7879da63b89a60d3ae67f851e56 @@ -0,0 +1 @@ +x­Î½ Â0@ajOq $:;²#„X€&8ÿ…q,S°=‘(èíW<=_ræjœv­ÆÖ&‡(½“:Y§U"e“1a˜0B#ƒ•#9AÏv+.쩆gª�W_w†Cý`Ÿ¿xš3ñÒû’� 5N¨�-t¨ŦÛD‹Ê ^¹1-B\y^cèJJ�{í™o`Ì`+ \ No newline at end of file diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/objects/3e/9b0a5198c64cea9c00f820433411e3b4d50c1c b/support/testing/tests/download/git-remote/refs-sub2.git/objects/3e/9b0a5198c64cea9c00f820433411e3b4d50c1c new file mode 100644 index 00000000..b1fb722c Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub2.git/objects/3e/9b0a5198c64cea9c00f820433411e3b4d50c1c differ diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/objects/85/8f666af75b7c0dfba6b8be7eac5f196e7a1221 b/support/testing/tests/download/git-remote/refs-sub2.git/objects/85/8f666af75b7c0dfba6b8be7eac5f196e7a1221 new file mode 100644 index 00000000..10f24a08 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub2.git/objects/85/8f666af75b7c0dfba6b8be7eac5f196e7a1221 differ diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/objects/99/f2e3e1cb15f9b52fa29f66d380dda061d917ab b/support/testing/tests/download/git-remote/refs-sub2.git/objects/99/f2e3e1cb15f9b52fa29f66d380dda061d917ab new file mode 100644 index 00000000..9db72668 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub2.git/objects/99/f2e3e1cb15f9b52fa29f66d380dda061d917ab differ diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/objects/cd/4d62ff218ab7b4a04f5bfdf800ace087af3ceb b/support/testing/tests/download/git-remote/refs-sub2.git/objects/cd/4d62ff218ab7b4a04f5bfdf800ace087af3ceb new file mode 100644 index 00000000..35d253f0 --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub2.git/objects/cd/4d62ff218ab7b4a04f5bfdf800ace087af3ceb @@ -0,0 +1,2 @@ +x­Î=n!†aל‚ ¬5,? ‘eùi’ Ã`#‡Åbq‘Ûg£飴�ô}z©ÕZ†Ô³=ŒÎ,5‡hUðä 1È~£µQŠu4É)ì¼~“SÙ�yñKHètô$½ó’½Ul�À縵.ß +aOM¾be¥¶Ý‹<õ<Ö_¼\+–�#µz–Ê‚ëLXä3€Øu�üOwb{ÆyRB¼—ëÊij9Oñóå/­â ãxl) \ No newline at end of file diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/objects/e7/9c5e8f964493290a409888d5413a737e8e5dd5 b/support/testing/tests/download/git-remote/refs-sub2.git/objects/e7/9c5e8f964493290a409888d5413a737e8e5dd5 new file mode 100644 index 00000000..df2037a2 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub2.git/objects/e7/9c5e8f964493290a409888d5413a737e8e5dd5 differ diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/objects/e8/3f6f805bd016b90acafc8702c52d778eb57310 b/support/testing/tests/download/git-remote/refs-sub2.git/objects/e8/3f6f805bd016b90acafc8702c52d778eb57310 new file mode 100644 index 00000000..05c04d28 Binary files /dev/null and b/support/testing/tests/download/git-remote/refs-sub2.git/objects/e8/3f6f805bd016b90acafc8702c52d778eb57310 differ diff --git a/support/testing/tests/download/git-remote/refs-sub2.git/refs/heads/submodule b/support/testing/tests/download/git-remote/refs-sub2.git/refs/heads/submodule new file mode 100644 index 00000000..39dc53f0 --- /dev/null +++ b/support/testing/tests/download/git-remote/refs-sub2.git/refs/heads/submodule @@ -0,0 +1 @@ +e83f6f805bd016b90acafc8702c52d778eb57310 diff --git a/support/testing/tests/download/git-remote/repo.git/.gitattributes b/support/testing/tests/download/git-remote/repo.git/.gitattributes new file mode 100644 index 00000000..eb50c64a --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/.gitattributes @@ -0,0 +1 @@ +objects/*/* binary diff --git a/support/testing/tests/download/git-remote/repo.git/HEAD b/support/testing/tests/download/git-remote/repo.git/HEAD new file mode 100644 index 00000000..cb089cd8 --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/support/testing/tests/download/git-remote/repo.git/config b/support/testing/tests/download/git-remote/repo.git/config new file mode 100644 index 00000000..07d359d0 --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/config @@ -0,0 +1,4 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true diff --git a/support/testing/tests/download/git-remote/repo.git/objects/0b/d8ceb961c3b2b210f64a67d57f4b5cd669d343 b/support/testing/tests/download/git-remote/repo.git/objects/0b/d8ceb961c3b2b210f64a67d57f4b5cd669d343 new file mode 100644 index 00000000..ef7fbd41 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/0b/d8ceb961c3b2b210f64a67d57f4b5cd669d343 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/11/93ff46343f4f6a0522e2b28b871e905178c1f0 b/support/testing/tests/download/git-remote/repo.git/objects/11/93ff46343f4f6a0522e2b28b871e905178c1f0 new file mode 100644 index 00000000..3541cd14 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/11/93ff46343f4f6a0522e2b28b871e905178c1f0 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/25/59d83bfe937fc0412d96ed664663c9e8a99055 b/support/testing/tests/download/git-remote/repo.git/objects/25/59d83bfe937fc0412d96ed664663c9e8a99055 new file mode 100644 index 00000000..cbf60fc7 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/25/59d83bfe937fc0412d96ed664663c9e8a99055 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/2b/0e0d98a49c97da6a618ab36337e2058eb733a2 b/support/testing/tests/download/git-remote/repo.git/objects/2b/0e0d98a49c97da6a618ab36337e2058eb733a2 new file mode 100644 index 00000000..39c91309 --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/objects/2b/0e0d98a49c97da6a618ab36337e2058eb733a2 @@ -0,0 +1 @@ +xEŽK!]s~BbŒpã °i *ƒA6s{1³póR©Eåõ�`6jWo¦f¶äÉÜ­f²Ö(uDëI²F}`‰Q*Ñ×7ÕRr}4Ê:öG‰\3…+\Bëy¡úyf8¶MNå/Ï©„üšFæ4NàÁ'ÑÁ¢[ò L3 \ No newline at end of file diff --git a/support/testing/tests/download/git-remote/repo.git/objects/2f/a37f6885d7eb746df75eccaddbacf3ac82799d b/support/testing/tests/download/git-remote/repo.git/objects/2f/a37f6885d7eb746df75eccaddbacf3ac82799d new file mode 100644 index 00000000..2dd14580 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/2f/a37f6885d7eb746df75eccaddbacf3ac82799d differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/31/7406308d9259e2231bd0d6ddad3de3832bce08 b/support/testing/tests/download/git-remote/repo.git/objects/31/7406308d9259e2231bd0d6ddad3de3832bce08 new file mode 100644 index 00000000..c2c98657 --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/objects/31/7406308d9259e2231bd0d6ddad3de3832bce08 @@ -0,0 +1 @@ +x­Î;N1@Qj¯Â˜Èߌ�P” Ð�<¿Ob�‘ãìžH)èí)®.öÖêÔÞí_æ`ÖìPØì“¬‹bïDغ` ¢‡‚œRfõƒ·©ÁùT, Rr‘ÂJÉ�Ñ9ìŠ)XKÙ�‚û¼ô¡?* ®ßa̺a¿]«~Oܵ_<žÔÏövÐ6š5ÇäcÖ‹ñƨ‡>¦'ÿSN•^¬R§zÞ˜–.²”ï׿̪1nS \ No newline at end of file diff --git a/support/testing/tests/download/git-remote/repo.git/objects/34/d1da713bf7de1c535e1d7d3ca985afd84bc7e5 b/support/testing/tests/download/git-remote/repo.git/objects/34/d1da713bf7de1c535e1d7d3ca985afd84bc7e5 new file mode 100644 index 00000000..29f2d4fd Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/34/d1da713bf7de1c535e1d7d3ca985afd84bc7e5 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/46/bae5b639e5a18e2cc4dc508f080d566baeff59 b/support/testing/tests/download/git-remote/repo.git/objects/46/bae5b639e5a18e2cc4dc508f080d566baeff59 new file mode 100644 index 00000000..3bf8865e --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/objects/46/bae5b639e5a18e2cc4dc508f080d566baeff59 @@ -0,0 +1 @@ +x­Î1n!@Qל‚ ¬Å0àa£(òÒÄ'˜e`�–“··¥î-·¯øú±ÕZ†F‹»ÑSÒ1›ìrðB )![±~™çƒ‡À�(±1 ~¹§mh¶�%X/Ž$ ãŒÑ[‹( ³Åãܺþ*‘»4ýÉ}”-¶ËwÑïý÷õ�ǵrùÙÇV?4xC³pðz2hŒºë}z¤åÔà”:•uK2µœ§åúöÌ©ºÍFkb \ No newline at end of file diff --git a/support/testing/tests/download/git-remote/repo.git/objects/51/6c9c5f64ec66534d4d069c2e408d9ae4dce023 b/support/testing/tests/download/git-remote/repo.git/objects/51/6c9c5f64ec66534d4d069c2e408d9ae4dce023 new file mode 100644 index 00000000..0bda23ab --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/objects/51/6c9c5f64ec66534d4d069c2e408d9ae4dce023 @@ -0,0 +1,2 @@ +x­ÎKN1EQÆ^…7БåBQ6À„¬ º\n¬à6rœ»'æˆéyÒÓ¥ÞZ�Òû4³dc|ZK +¾pÖœÅ\ôV“Ââ‚uшO¼OéüŠ «·‰udCä2�ŠEE•Á?æR ¼Í÷>ä[%¹ËW³îÔ¯—*_ÆÚ/ž¶†õã@½¥D¬\”UJÜõ=ùŸîÄÄÍq®ÛÎyé¥,ë×ó_JÅ7Êle \ No newline at end of file diff --git a/support/testing/tests/download/git-remote/repo.git/objects/68/c197d0879d485f4f6cee85544722b79e68e59f b/support/testing/tests/download/git-remote/repo.git/objects/68/c197d0879d485f4f6cee85544722b79e68e59f new file mode 100644 index 00000000..3e421bb9 --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/objects/68/c197d0879d485f4f6cee85544722b79e68e59f @@ -0,0 +1 @@ +x­Î=N1†ajŸÂØÈ;³ë„ !'ÏL+x�Œ)¸=+¥HÑ>Ò÷éåVkÁ?�®j3,cð°¨pˆâ ÍxA&I™R`拺nûp‹óè¢$X“àœÅ‰!AQŒ™ÕEC?ãÒºý(L]š}§>ÊÆíûZìK¿á¡Þñí\©|¸ÕW;¯.¤5¢G;9tÎìºGý§;“;m|cŽå¼©Lítšòïó#±æ$bl· \ No newline at end of file diff --git a/support/testing/tests/download/git-remote/repo.git/objects/8b/8a7e885a041da72b1ee9a47c5b9300b172a9e7 b/support/testing/tests/download/git-remote/repo.git/objects/8b/8a7e885a041da72b1ee9a47c5b9300b172a9e7 new file mode 100644 index 00000000..70cf1795 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/8b/8a7e885a041da72b1ee9a47c5b9300b172a9e7 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/92/ef85be57d627f280d8ce3724452ac21c9a6452 b/support/testing/tests/download/git-remote/repo.git/objects/92/ef85be57d627f280d8ce3724452ac21c9a6452 new file mode 100644 index 00000000..1f2474ba Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/92/ef85be57d627f280d8ce3724452ac21c9a6452 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/99/f2e3e1cb15f9b52fa29f66d380dda061d917ab b/support/testing/tests/download/git-remote/repo.git/objects/99/f2e3e1cb15f9b52fa29f66d380dda061d917ab new file mode 100644 index 00000000..9db72668 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/99/f2e3e1cb15f9b52fa29f66d380dda061d917ab differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/a2/38b1dfcd825d47d834af3c5223417c8411d90d b/support/testing/tests/download/git-remote/repo.git/objects/a2/38b1dfcd825d47d834af3c5223417c8411d90d new file mode 100644 index 00000000..31b6bcf3 --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/objects/a2/38b1dfcd825d47d834af3c5223417c8411d90d @@ -0,0 +1 @@ +x­ÎM @aלb.Ш”bŒñnôÃ_�´@‚¸ðö6qáÞ¸ý/Ï•”¨�ÔÓ®ÕÀ˜(ijBEc•Œ(MG?LÜ{ä£ðFh´ Ÿí^*\Éaõ.XeW Á±~°O_<Ï ií]I'Šk£ô´×Ðñ�s¶é6ÑŸrŒ25•±Í9ø®ÄØÙ×á—YölÚ`C \ No newline at end of file diff --git a/support/testing/tests/download/git-remote/repo.git/objects/a9/dbc1e23c45e8e1b88c0448763f54d714eb6f8f b/support/testing/tests/download/git-remote/repo.git/objects/a9/dbc1e23c45e8e1b88c0448763f54d714eb6f8f new file mode 100644 index 00000000..2cbdce1f Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/a9/dbc1e23c45e8e1b88c0448763f54d714eb6f8f differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/b2/4b387624edc78d0292a127c43cad9ba97c6232 b/support/testing/tests/download/git-remote/repo.git/objects/b2/4b387624edc78d0292a127c43cad9ba97c6232 new file mode 100644 index 00000000..20491e3f Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/b2/4b387624edc78d0292a127c43cad9ba97c6232 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/cf/0f4f85d7a1237e377a2d25b996518a877ea001 b/support/testing/tests/download/git-remote/repo.git/objects/cf/0f4f85d7a1237e377a2d25b996518a877ea001 new file mode 100644 index 00000000..fd224552 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/cf/0f4f85d7a1237e377a2d25b996518a877ea001 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/d4/e2941d18a63535400476324ddeb7f40164be41 b/support/testing/tests/download/git-remote/repo.git/objects/d4/e2941d18a63535400476324ddeb7f40164be41 new file mode 100644 index 00000000..4d821693 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/d4/e2941d18a63535400476324ddeb7f40164be41 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/e2/2695cbf976fed1f543ad7486a531c0af473482 b/support/testing/tests/download/git-remote/repo.git/objects/e2/2695cbf976fed1f543ad7486a531c0af473482 new file mode 100644 index 00000000..15d80c78 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/e2/2695cbf976fed1f543ad7486a531c0af473482 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/e2/cfe068f7e5bf4de32ffe1241da53abce9fa89e b/support/testing/tests/download/git-remote/repo.git/objects/e2/cfe068f7e5bf4de32ffe1241da53abce9fa89e new file mode 100644 index 00000000..57be6485 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/e2/cfe068f7e5bf4de32ffe1241da53abce9fa89e differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/e7/9c5e8f964493290a409888d5413a737e8e5dd5 b/support/testing/tests/download/git-remote/repo.git/objects/e7/9c5e8f964493290a409888d5413a737e8e5dd5 new file mode 100644 index 00000000..df2037a2 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/e7/9c5e8f964493290a409888d5413a737e8e5dd5 differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/f6/476b879f65e956d7dedd5b08736369e9a24acc b/support/testing/tests/download/git-remote/repo.git/objects/f6/476b879f65e956d7dedd5b08736369e9a24acc new file mode 100644 index 00000000..ee01041e Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/f6/476b879f65e956d7dedd5b08736369e9a24acc differ diff --git a/support/testing/tests/download/git-remote/repo.git/objects/fe/74231105841041d5f441e70399d37f0e600aa5 b/support/testing/tests/download/git-remote/repo.git/objects/fe/74231105841041d5f441e70399d37f0e600aa5 new file mode 100644 index 00000000..6d0ae484 Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/fe/74231105841041d5f441e70399d37f0e600aa5 differ diff --git a/support/testing/tests/download/git-remote/repo.git/refs/heads/master b/support/testing/tests/download/git-remote/repo.git/refs/heads/master new file mode 100644 index 00000000..b6bccc1c --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/refs/heads/master @@ -0,0 +1 @@ +a238b1dfcd825d47d834af3c5223417c8411d90d diff --git a/support/testing/tests/download/git-remote/repo.git/refs/heads/mybranch b/support/testing/tests/download/git-remote/repo.git/refs/heads/mybranch new file mode 100644 index 00000000..45cec546 --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/refs/heads/mybranch @@ -0,0 +1 @@ +68c197d0879d485f4f6cee85544722b79e68e59f diff --git a/support/testing/tests/download/git-remote/repo.git/refs/heads/submodule b/support/testing/tests/download/git-remote/repo.git/refs/heads/submodule new file mode 100644 index 00000000..e9f4f32c --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/refs/heads/submodule @@ -0,0 +1 @@ +2fa37f6885d7eb746df75eccaddbacf3ac82799d diff --git a/support/testing/tests/download/git-remote/repo.git/refs/tags/mytag b/support/testing/tests/download/git-remote/repo.git/refs/tags/mytag new file mode 100644 index 00000000..8c09448a --- /dev/null +++ b/support/testing/tests/download/git-remote/repo.git/refs/tags/mytag @@ -0,0 +1 @@ +2b0e0d98a49c97da6a618ab36337e2058eb733a2 diff --git a/support/testing/tests/download/gitremote.py b/support/testing/tests/download/gitremote.py new file mode 100644 index 00000000..7df252d0 --- /dev/null +++ b/support/testing/tests/download/gitremote.py @@ -0,0 +1,47 @@ +# subprocess does not kill the child daemon when a test case fails by raising +# an exception. So use pexpect instead. +import infra + +import pexpect + + +GIT_REMOTE_PORT_INITIAL = 9418 +GIT_REMOTE_PORT_LAST = GIT_REMOTE_PORT_INITIAL + 99 + + +class GitRemote(object): + def __init__(self, builddir, serveddir, logtofile): + """ + Start a local git server. + + In order to support test cases in parallel, select the port the + server will listen to in runtime. Since there is no reliable way + to allocate the port prior to starting the server (another + process in the host machine can use the port between it is + selected from a list and it is really allocated to the server) + try to start the server in a port and in the case it is already + in use, try the next one in the allowed range. + """ + self.daemon = None + self.port = None + self.logfile = infra.open_log_file(builddir, "gitremote", logtofile) + + daemon_cmd = ["git", "daemon", "--reuseaddr", "--verbose", + "--listen=localhost", "--export-all", + "--base-path={}".format(serveddir)] + for port in range(GIT_REMOTE_PORT_INITIAL, GIT_REMOTE_PORT_LAST + 1): + cmd = daemon_cmd + ["--port={port}".format(port=port)] + self.logfile.write("> starting git remote with '{}'\n".format(" ".join(cmd))) + self.daemon = pexpect.spawn(cmd[0], cmd[1:], logfile=self.logfile, + encoding='utf-8') + ret = self.daemon.expect(["Ready to rumble", + "Address already in use"]) + if ret == 0: + self.port = port + return + raise SystemError("Could not find a free port to run git remote") + + def stop(self): + if self.daemon is None: + return + self.daemon.terminate(force=True) diff --git a/support/testing/tests/download/test_git.py b/support/testing/tests/download/test_git.py new file mode 100644 index 00000000..ec5b8f3f --- /dev/null +++ b/support/testing/tests/download/test_git.py @@ -0,0 +1,81 @@ +import os +import shutil + +from tests.download.gitremote import GitRemote + +import infra + + +class GitTestBase(infra.basetest.BRConfigTest): + config = \ + """ + BR2_BACKUP_SITE="" + """ + gitremotedir = infra.filepath("tests/download/git-remote") + gitremote = None + + def setUp(self): + super(GitTestBase, self).setUp() + self.gitremote = GitRemote(self.builddir, self.gitremotedir, self.logtofile) + + def tearDown(self): + self.show_msg("Cleaning up") + if self.gitremote: + self.gitremote.stop() + if self.b and not self.keepbuilds: + self.b.delete() + + def check_hash(self, package): + # store downloaded tarball inside the output dir so the test infra + # cleans it up at the end + env = {"BR2_DL_DIR": os.path.join(self.builddir, "dl"), + "GITREMOTE_PORT_NUMBER": str(self.gitremote.port)} + self.b.build(["{}-dirclean".format(package), + "{}-source".format(package)], + env) + + def check_download(self, package): + # store downloaded tarball inside the output dir so the test infra + # cleans it up at the end + dl_dir = os.path.join(self.builddir, "dl") + # enforce we test the download + if os.path.exists(dl_dir): + shutil.rmtree(dl_dir) + env = {"BR2_DL_DIR": dl_dir, + "GITREMOTE_PORT_NUMBER": str(self.gitremote.port)} + self.b.build(["{}-dirclean".format(package), + "{}-legal-info".format(package)], + env) + + +class TestGitHash(GitTestBase): + br2_external = [infra.filepath("tests/download/br2-external/git-hash")] + + def test_run(self): + with self.assertRaises(SystemError): + self.check_hash("bad") + self.check_hash("good") + self.check_hash("nohash") + + +class TestGitRefs(GitTestBase): + br2_external = [infra.filepath("tests/download/br2-external/git-refs")] + + def test_run(self): + with self.assertRaises(SystemError): + self.check_download("git-wrong-content") + with self.assertRaises(SystemError): + self.check_download("git-wrong-sha1") + self.check_download("git-partial-sha1-branch-head") + self.check_download("git-partial-sha1-reachable-by-branch") + self.check_download("git-partial-sha1-reachable-by-tag") + self.check_download("git-partial-sha1-tag-itself") + self.check_download("git-partial-sha1-tag-points-to") + self.check_download("git-sha1-branch-head") + self.check_download("git-sha1-reachable-by-branch") + self.check_download("git-sha1-reachable-by-tag") + self.check_download("git-sha1-tag-itself") + self.check_download("git-sha1-tag-points-to") + self.check_download("git-submodule-disabled") + self.check_download("git-submodule-enabled") + self.check_download("git-tag") diff --git a/support/testing/tests/fs/__init__.py b/support/testing/tests/fs/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/fs/test_ext.py b/support/testing/tests/fs/test_ext.py new file mode 100644 index 00000000..16b308cf --- /dev/null +++ b/support/testing/tests/fs/test_ext.py @@ -0,0 +1,121 @@ +import os + +import infra.basetest + +VOLNAME_PROP = "Filesystem volume name" +REVISION_PROP = "Filesystem revision #" +FEATURES_PROP = "Filesystem features" +BLOCKCNT_PROP = "Block count" +INODECNT_PROP = "Inode count" +RESBLKCNT_PROP = "Reserved block count" + +CHECK_FS_TYPE_CMD = "mount | grep '/dev/root on / type {}'" + + +def dumpe2fs_run(builddir, image): + cmd = ["host/sbin/dumpe2fs", os.path.join("images", image)] + ret = infra.run_cmd_on_host(builddir, cmd) + return ret.strip().splitlines() + + +def dumpe2fs_getprop(out, prop): + for line in out: + fields = line.split(": ") + if fields[0] == prop: + return fields[1].strip() + + +def boot_img_and_check_fs_type(emulator, builddir, fs_type): + img = os.path.join(builddir, "images", "rootfs.{}".format(fs_type)) + emulator.boot(arch="armv7", + kernel="builtin", + kernel_cmdline=["root=/dev/mmcblk0", + "rootfstype={}".format(fs_type)], + options=["-drive", "file={},if=sd".format(img)]) + emulator.login() + _, exit_code = emulator.run(CHECK_FS_TYPE_CMD.format(fs_type)) + return exit_code + + +class TestExt2(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_2r0=y + BR2_TARGET_ROOTFS_EXT2_LABEL="foobaz" + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + out = dumpe2fs_run(self.builddir, "rootfs.ext2") + self.assertEqual(dumpe2fs_getprop(out, VOLNAME_PROP), "foobaz") + self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "0 (original)") + + exit_code = boot_img_and_check_fs_type(self.emulator, + self.builddir, "ext2") + self.assertEqual(exit_code, 0) + + +class TestExt2r1(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_2r1=y + BR2_TARGET_ROOTFS_EXT2_LABEL="foobar" + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + out = dumpe2fs_run(self.builddir, "rootfs.ext2") + self.assertEqual(dumpe2fs_getprop(out, VOLNAME_PROP), "foobar") + self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "1 (dynamic)") + self.assertNotIn("has_journal", dumpe2fs_getprop(out, FEATURES_PROP)) + + exit_code = boot_img_and_check_fs_type(self.emulator, + self.builddir, "ext2") + self.assertEqual(exit_code, 0) + + +class TestExt3(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_3=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + out = dumpe2fs_run(self.builddir, "rootfs.ext3") + self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "1 (dynamic)") + self.assertIn("has_journal", dumpe2fs_getprop(out, FEATURES_PROP)) + self.assertNotIn("extent", dumpe2fs_getprop(out, FEATURES_PROP)) + + exit_code = boot_img_and_check_fs_type(self.emulator, + self.builddir, "ext3") + self.assertEqual(exit_code, 0) + + +class TestExt4(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_4=y + BR2_TARGET_ROOTFS_EXT2_SIZE="16384" + BR2_TARGET_ROOTFS_EXT2_INODES=3000 + BR2_TARGET_ROOTFS_EXT2_RESBLKS=10 + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + out = dumpe2fs_run(self.builddir, "rootfs.ext4") + self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "1 (dynamic)") + self.assertEqual(dumpe2fs_getprop(out, BLOCKCNT_PROP), "16384") + # Yes there are 8 more inodes than requested + self.assertEqual(dumpe2fs_getprop(out, INODECNT_PROP), "3008") + self.assertEqual(dumpe2fs_getprop(out, RESBLKCNT_PROP), "1638") + self.assertIn("has_journal", dumpe2fs_getprop(out, FEATURES_PROP)) + self.assertIn("extent", dumpe2fs_getprop(out, FEATURES_PROP)) + + exit_code = boot_img_and_check_fs_type(self.emulator, + self.builddir, "ext4") + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/fs/test_f2fs.py b/support/testing/tests/fs/test_f2fs.py new file mode 100644 index 00000000..950d4cf2 --- /dev/null +++ b/support/testing/tests/fs/test_f2fs.py @@ -0,0 +1,48 @@ +import os + +import infra.basetest + + +def dumpf2fs_getprop(out, prop): + for line in out: + fields = line.split(" = ") + if fields[0] == prop: + return fields[1].strip() + + +class TestF2FS(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_F2FS=y + BR2_TARGET_ROOTFS_F2FS_SIZE="128M" + BR2_TARGET_ROOTFS_F2FS_OVERPROVISION=0 + BR2_TARGET_ROOTFS_F2FS_DISCARD=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7" + BR2_LINUX_KERNEL_USE_DEFCONFIG=y + BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}" + """.format(infra.filepath("conf/f2fs-kernel-fragment.config")) + + def test_run(self): + img = os.path.join(self.builddir, "images", "rootfs.f2fs") + out = infra.run_cmd_on_host(self.builddir, ["host/sbin/dump.f2fs", img]) + out = out.splitlines() + prop = dumpf2fs_getprop(out, "Info: total sectors") + self.assertEqual(prop, "262144 (128 MB)") + + kernel = os.path.join(self.builddir, "images", "zImage") + kernel_cmdline = ["root=/dev/mmcblk0", "rootfstype=f2fs", + "console=ttyAMA0"] + dtb = infra.download(self.downloaddir, "vexpress-v2p-ca9.dtb") + options = ["-M", "vexpress-a9", "-dtb", dtb, + "-drive", "file={},if=sd,format=raw".format(img)] + self.emulator.boot(arch="armv7", kernel=kernel, + kernel_cmdline=kernel_cmdline, + options=options) + self.emulator.login() + cmd = "mount | grep '/dev/root on / type f2fs'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/fs/test_iso9660.py b/support/testing/tests/fs/test_iso9660.py new file mode 100644 index 00000000..68f48408 --- /dev/null +++ b/support/testing/tests/fs/test_iso9660.py @@ -0,0 +1,169 @@ +import os + +import infra.basetest + +BASIC_CONFIG = \ + """ + BR2_x86_pentium4=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-i386-pentium4-full-2017.05-1078-g95b1dae.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_6=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2=y + BR2_TOOLCHAIN_EXTERNAL_LOCALE=y + # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set + BR2_TOOLCHAIN_EXTERNAL_CXX=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="{}" + # BR2_TARGET_ROOTFS_TAR is not set + """.format(infra.filepath("conf/minimal-x86-qemu-kernel.config")) + + +def test_mount_internal_external(emulator, builddir, internal=True): + img = os.path.join(builddir, "images", "rootfs.iso9660") + emulator.boot(arch="i386", options=["-cdrom", img]) + emulator.login() + + if internal: + cmd = "mount | grep 'rootfs on / type rootfs'" + else: + cmd = "mount | grep '/dev/root on / type iso9660'" + + _, exit_code = emulator.run(cmd) + return exit_code + + +def test_touch_file(emulator): + _, exit_code = emulator.run("touch test") + return exit_code + +# +# Grub 2 + + +class TestIso9660Grub2External(infra.basetest.BRTest): + config = BASIC_CONFIG + \ + """ + BR2_TARGET_ROOTFS_ISO9660=y + # BR2_TARGET_ROOTFS_ISO9660_INITRD is not set + BR2_TARGET_GRUB2=y + BR2_TARGET_GRUB2_BOOT_PARTITION="cd" + BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660" + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + """.format(infra.filepath("conf/grub2.cfg")) + + def test_run(self): + exit_code = test_mount_internal_external(self.emulator, + self.builddir, internal=False) + self.assertEqual(exit_code, 0) + + exit_code = test_touch_file(self.emulator) + self.assertEqual(exit_code, 1) + + +class TestIso9660Grub2ExternalCompress(infra.basetest.BRTest): + config = BASIC_CONFIG + \ + """ + BR2_TARGET_ROOTFS_ISO9660=y + # BR2_TARGET_ROOTFS_ISO9660_INITRD is not set + BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION=y + BR2_TARGET_GRUB2=y + BR2_TARGET_GRUB2_BOOT_PARTITION="cd" + BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660" + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + """.format(infra.filepath("conf/grub2.cfg")) + + def test_run(self): + exit_code = test_mount_internal_external(self.emulator, + self.builddir, internal=False) + self.assertEqual(exit_code, 0) + + exit_code = test_touch_file(self.emulator) + self.assertEqual(exit_code, 1) + + +class TestIso9660Grub2Internal(infra.basetest.BRTest): + config = BASIC_CONFIG + \ + """ + BR2_TARGET_ROOTFS_ISO9660=y + BR2_TARGET_ROOTFS_ISO9660_INITRD=y + BR2_TARGET_GRUB2=y + BR2_TARGET_GRUB2_BOOT_PARTITION="cd" + BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660" + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + """.format(infra.filepath("conf/grub2.cfg")) + + def test_run(self): + exit_code = test_mount_internal_external(self.emulator, + self.builddir, internal=True) + self.assertEqual(exit_code, 0) + + exit_code = test_touch_file(self.emulator) + self.assertEqual(exit_code, 0) + +# +# Syslinux + + +class TestIso9660SyslinuxExternal(infra.basetest.BRTest): + config = BASIC_CONFIG + \ + """ + BR2_TARGET_ROOTFS_ISO9660=y + # BR2_TARGET_ROOTFS_ISO9660_INITRD is not set + BR2_TARGET_ROOTFS_ISO9660_HYBRID=y + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + BR2_TARGET_SYSLINUX=y + """.format(infra.filepath("conf/isolinux.cfg")) + + def test_run(self): + exit_code = test_mount_internal_external(self.emulator, + self.builddir, internal=False) + self.assertEqual(exit_code, 0) + + exit_code = test_touch_file(self.emulator) + self.assertEqual(exit_code, 1) + + +class TestIso9660SyslinuxExternalCompress(infra.basetest.BRTest): + config = BASIC_CONFIG + \ + """ + BR2_TARGET_ROOTFS_ISO9660=y + # BR2_TARGET_ROOTFS_ISO9660_INITRD is not set + BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION=y + BR2_TARGET_ROOTFS_ISO9660_HYBRID=y + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + BR2_TARGET_SYSLINUX=y + """.format(infra.filepath("conf/isolinux.cfg")) + + def test_run(self): + exit_code = test_mount_internal_external(self.emulator, + self.builddir, internal=False) + self.assertEqual(exit_code, 0) + + exit_code = test_touch_file(self.emulator) + self.assertEqual(exit_code, 1) + + +class TestIso9660SyslinuxInternal(infra.basetest.BRTest): + config = BASIC_CONFIG + \ + """ + BR2_TARGET_ROOTFS_ISO9660=y + BR2_TARGET_ROOTFS_ISO9660_INITRD=y + BR2_TARGET_ROOTFS_ISO9660_HYBRID=y + BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}" + BR2_TARGET_SYSLINUX=y + """.format(infra.filepath("conf/isolinux.cfg")) + + def test_run(self): + exit_code = test_mount_internal_external(self.emulator, + self.builddir, internal=True) + self.assertEqual(exit_code, 0) + + exit_code = test_touch_file(self.emulator) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/fs/test_jffs2.py b/support/testing/tests/fs/test_jffs2.py new file mode 100644 index 00000000..f5066ff0 --- /dev/null +++ b/support/testing/tests/fs/test_jffs2.py @@ -0,0 +1,45 @@ +import os + +import infra.basetest + + +def jffs2dump_find_file(files_list, fname): + for file_name in files_list: + file_name = file_name.strip() + if file_name.startswith("Dirent") and file_name.endswith(fname): + return True + return False + + +class TestJffs2(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_JFFS2=y + BR2_TARGET_ROOTFS_JFFS2_CUSTOM=y + BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE=0x80000 + BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y + BR2_TARGET_ROOTFS_JFFS2_PAD=y + BR2_TARGET_ROOTFS_JFFS2_PADSIZE=0x4000000 + # BR2_TARGET_ROOTFS_TAR is not set + """ + + # TODO: there are some scary JFFS2 messages when one starts to + # write files in the rootfs: "jffs2: Newly-erased block contained + # word 0x0 at offset 0x046c0000". To be investigated. + + def test_run(self): + img = os.path.join(self.builddir, "images", "rootfs.jffs2") + cmd = ["host/sbin/jffs2dump", "-c", img] + out = infra.run_cmd_on_host(self.builddir, cmd) + out = out.splitlines() + self.assertTrue(jffs2dump_find_file(out, "busybox")) + + self.emulator.boot(arch="armv7", + kernel="builtin", + kernel_cmdline=["root=/dev/mtdblock0", + "rootfstype=jffs2"], + options=["-drive", "file={},if=pflash".format(img)]) + self.emulator.login() + cmd = "mount | grep '/dev/root on / type jffs2'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/fs/test_squashfs.py b/support/testing/tests/fs/test_squashfs.py new file mode 100644 index 00000000..234f4944 --- /dev/null +++ b/support/testing/tests/fs/test_squashfs.py @@ -0,0 +1,36 @@ +import os +import subprocess + +import infra.basetest + + +class TestSquashfs(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_SQUASHFS=y + # BR2_TARGET_ROOTFS_SQUASHFS4_GZIP is not set + BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + unsquashfs_cmd = ["host/bin/unsquashfs", "-s", "images/rootfs.squashfs"] + out = infra.run_cmd_on_host(self.builddir, unsquashfs_cmd) + out = out.splitlines() + self.assertEqual(out[0], + "Found a valid SQUASHFS 4:0 superblock on images/rootfs.squashfs.") + self.assertEqual(out[3], "Compression lz4") + + img = os.path.join(self.builddir, "images", "rootfs.squashfs") + subprocess.call(["truncate", "-s", "%1M", img]) + + self.emulator.boot(arch="armv7", + kernel="builtin", + kernel_cmdline=["root=/dev/mmcblk0", + "rootfstype=squashfs"], + options=["-drive", "file={},if=sd,format=raw".format(img)]) + self.emulator.login() + + cmd = "mount | grep '/dev/root on / type squashfs'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/fs/test_ubi.py b/support/testing/tests/fs/test_ubi.py new file mode 100644 index 00000000..7321f83d --- /dev/null +++ b/support/testing/tests/fs/test_ubi.py @@ -0,0 +1,39 @@ +import subprocess +import os + +import infra.basetest + + +class TestUbi(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_UBIFS=y + BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x7ff80 + BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1 + BR2_TARGET_ROOTFS_UBI=y + BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x80000 + BR2_TARGET_ROOTFS_UBI_SUBSIZE=1 + """ + + # TODO: if you boot Qemu twice on the same UBI image, it fails to + # attach the image the second time, with "ubi0 error: + # ubi_read_volume_table: the layout volume was not found". + # To be investigated. + def test_run(self): + img = os.path.join(self.builddir, "images", "rootfs.ubi") + out = infra.run_cmd_on_host(self.builddir, ["file", img]) + out = out.splitlines() + self.assertIn("UBI image, version 1", out[0]) + + subprocess.call(["truncate", "-s 128M", img]) + + self.emulator.boot(arch="armv7", + kernel="builtin", + kernel_cmdline=["root=ubi0:rootfs", + "ubi.mtd=0", + "rootfstype=ubifs"], + options=["-drive", "file={},if=pflash".format(img)]) + self.emulator.login() + cmd = "mount | grep 'ubi0:rootfs on / type ubifs'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/fs/test_yaffs2.py b/support/testing/tests/fs/test_yaffs2.py new file mode 100644 index 00000000..b60e90e6 --- /dev/null +++ b/support/testing/tests/fs/test_yaffs2.py @@ -0,0 +1,15 @@ +import os + +import infra.basetest + + +class TestYaffs2(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + infra.basetest.MINIMAL_CONFIG + \ + """ + BR2_TARGET_ROOTFS_YAFFS2=y + """ + + def test_run(self): + img = os.path.join(self.builddir, "images", "rootfs.yaffs2") + self.assertTrue(os.path.exists(img)) diff --git a/support/testing/tests/init/__init__.py b/support/testing/tests/init/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/init/base.py b/support/testing/tests/init/base.py new file mode 100644 index 00000000..75cfbe9c --- /dev/null +++ b/support/testing/tests/init/base.py @@ -0,0 +1,48 @@ +import os +import subprocess +import infra.basetest + + +class InitSystemBase(infra.basetest.BRTest): + + def start_emulator(self, fs_type, kernel=None, dtb=None, init=None): + img = os.path.join(self.builddir, "images", "rootfs.{}".format(fs_type)) + subprocess.call(["truncate", "-s", "%1M", img]) + + options = ["-drive", + "file={},if=sd,format=raw".format(img), + "-M", "vexpress-a9"] + + if kernel is None: + kernel = "builtin" + else: + kernel = os.path.join(self.builddir, "images", kernel) + options.extend(["-dtb", os.path.join(self.builddir, "images", + "{}.dtb".format(dtb))]) + + kernel_cmdline = ["root=/dev/mmcblk0", + "rootfstype={}".format(fs_type), + "rootwait", + "ro", + "console=ttyAMA0"] + + if init is not None: + kernel_cmdline.extend(["init={}".format(init)]) + + self.emulator.boot(arch="armv7", + kernel=kernel, + kernel_cmdline=kernel_cmdline, + options=options) + + if init is None: + self.emulator.login() + + def check_init(self, path): + cmd = "cmp /proc/1/exe {}".format(path) + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + def check_network(self, interface, exitCode=0): + cmd = "ip addr show {} |grep inet".format(interface) + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, exitCode) diff --git a/support/testing/tests/init/systemd-factory/var/foo/bar b/support/testing/tests/init/systemd-factory/var/foo/bar new file mode 100644 index 00000000..323fae03 --- /dev/null +++ b/support/testing/tests/init/systemd-factory/var/foo/bar @@ -0,0 +1 @@ +foobar diff --git a/support/testing/tests/init/test_busybox.py b/support/testing/tests/init/test_busybox.py new file mode 100644 index 00000000..3be4dea3 --- /dev/null +++ b/support/testing/tests/init/test_busybox.py @@ -0,0 +1,64 @@ +import infra.basetest +from tests.init.base import InitSystemBase as InitSystemBase + + +class InitSystemBusyboxBase(InitSystemBase): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def check_init(self): + super(InitSystemBusyboxBase, self).check_init("/bin/busybox") + + +class TestInitSystemBusyboxRo(InitSystemBusyboxBase): + config = InitSystemBusyboxBase.config + \ + """ + # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set + BR2_TARGET_ROOTFS_SQUASHFS=y + """ + + def test_run(self): + self.start_emulator("squashfs") + self.check_init() + self.check_network("eth0", 1) + + +class TestInitSystemBusyboxRw(InitSystemBusyboxBase): + config = InitSystemBusyboxBase.config + \ + """ + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + self.start_emulator("ext2") + self.check_init() + self.check_network("eth0", 1) + + +class TestInitSystemBusyboxRoNet(InitSystemBusyboxBase): + config = InitSystemBusyboxBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set + BR2_TARGET_ROOTFS_SQUASHFS=y + """ + + def test_run(self): + self.start_emulator("squashfs") + self.check_init() + self.check_network("eth0") + + +class TestInitSystemBusyboxRwNet(InitSystemBusyboxBase): + config = InitSystemBusyboxBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + self.start_emulator("ext2") + self.check_init() + self.check_network("eth0") diff --git a/support/testing/tests/init/test_none.py b/support/testing/tests/init/test_none.py new file mode 100644 index 00000000..5b9b4e43 --- /dev/null +++ b/support/testing/tests/init/test_none.py @@ -0,0 +1,33 @@ +import pexpect + +import infra.basetest +from tests.init.base import InitSystemBase as InitSystemBase + + +class TestInitSystemNone(InitSystemBase): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_INIT_NONE=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_TARGET_ROOTFS_SQUASHFS=y + """ + + def test_run(self): + self.start_emulator(fs_type="squashfs", init="/bin/sh") + index = self.emulator.qemu.expect(["/bin/sh: can't access tty; job control turned off", pexpect.TIMEOUT], timeout=60) + if index != 0: + self.emulator.logfile.write("==> System does not boot") + raise SystemError("System does not boot") + index = self.emulator.qemu.expect(["#", pexpect.TIMEOUT], timeout=60) + if index != 0: + self.emulator.logfile.write("==> System does not boot") + raise SystemError("System does not boot") + + out, exit_code = self.emulator.run("sh -c 'echo $PPID'") + self.assertEqual(exit_code, 0) + self.assertEqual(out[0], "1") + + _, exit_code = self.emulator.run("mount -t proc none /proc") + self.assertEqual(exit_code, 0) + + self.check_init("/bin/sh") diff --git a/support/testing/tests/init/test_openrc.py b/support/testing/tests/init/test_openrc.py new file mode 100644 index 00000000..14839434 --- /dev/null +++ b/support/testing/tests/init/test_openrc.py @@ -0,0 +1,50 @@ +from tests.init.base import InitSystemBase as InitSystemBase + + +class InitSystemOpenrcBase(InitSystemBase): + config = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_INIT_OPENRC=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.5.7" + BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_DTS_SUPPORT=y + BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def check_init(self): + super(InitSystemOpenrcBase, self).check_init('/sbin/openrc-init') + + # Test all services are OK + output, _ = self.emulator.run("rc-status -c") + self.assertEqual(len(output), 0) + + +class TestInitSystemOpenrcRoFull(InitSystemOpenrcBase): + config = InitSystemOpenrcBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set + BR2_TARGET_ROOTFS_SQUASHFS=y + """ + + def test_run(self): + self.start_emulator("squashfs", "zImage", "vexpress-v2p-ca9") + self.check_init() + + +class TestInitSystemOpenrcRwFull(InitSystemOpenrcBase): + config = InitSystemOpenrcBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + self.start_emulator("ext2", "zImage", "vexpress-v2p-ca9") + self.check_init() diff --git a/support/testing/tests/init/test_systemd.py b/support/testing/tests/init/test_systemd.py new file mode 100644 index 00000000..c0ef5e12 --- /dev/null +++ b/support/testing/tests/init/test_systemd.py @@ -0,0 +1,161 @@ +import infra.basetest +from tests.init.base import InitSystemBase as InitSystemBase + + +class InitSystemSystemdBase(InitSystemBase): + config = \ + """ + BR2_arm=y + BR2_cortex_a9=y + BR2_ARM_ENABLE_VFP=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_INIT_SYSTEMD=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.3" + BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}" + BR2_LINUX_KERNEL_DTS_SUPPORT=y + BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + # BR2_TARGET_ROOTFS_TAR is not set + """.format(infra.filepath("conf/binfmt-misc-kernel-fragment.config")) + + def check_init(self): + super(InitSystemSystemdBase, self).check_init("/lib/systemd/systemd") + + # Test all units are OK + output, _ = self.emulator.run("systemctl --no-pager --failed --no-legend") + self.assertEqual(len(output), 0) + + # Test we can reach the DBus daemon + _, exit_code = self.emulator.run("busctl --no-pager") + self.assertEqual(exit_code, 0) + + # Test we can read at least one line from the journal + output, _ = self.emulator.run("journalctl --no-pager --lines 1 --quiet") + self.assertEqual(len(output), 1) + + +class TestInitSystemSystemdRoNetworkd(InitSystemSystemdBase): + config = InitSystemSystemdBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set + BR2_ROOTFS_OVERLAY="{}" + BR2_TARGET_ROOTFS_SQUASHFS=y + """.format(infra.filepath("tests/init/systemd-factory")) + + def test_run(self): + self.start_emulator("squashfs", "zImage", "vexpress-v2p-ca9") + self.check_init() + self.check_network("eth0") + + # This one must be executed on the target, to check that + # the factory feature works as expected + out, exit_code = self.emulator.run("cat /var/foo/bar") + self.assertEqual(exit_code, 0) + self.assertEqual(out[0], "foobar") + + +class TestInitSystemSystemdRwNetworkd(InitSystemSystemdBase): + config = InitSystemSystemdBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + self.start_emulator("ext2", "zImage", "vexpress-v2p-ca9") + self.check_init() + self.check_network("eth0") + + +class TestInitSystemSystemdRoIfupdown(InitSystemSystemdBase): + config = InitSystemSystemdBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + # BR2_PACKAGE_SYSTEMD_NETWORKD is not set + # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set + BR2_TARGET_ROOTFS_SQUASHFS=y + """ + + def test_run(self): + self.start_emulator("squashfs", "zImage", "vexpress-v2p-ca9") + self.check_init() + self.check_network("eth0") + + +class TestInitSystemSystemdRwIfupdown(InitSystemSystemdBase): + config = InitSystemSystemdBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + # BR2_PACKAGE_SYSTEMD_NETWORKD is not set + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + self.start_emulator("ext2", "zImage", "vexpress-v2p-ca9") + self.check_init() + self.check_network("eth0") + + +class TestInitSystemSystemdRoFull(InitSystemSystemdBase): + config = InitSystemSystemdBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set + BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE=y + BR2_PACKAGE_SYSTEMD_BACKLIGHT=y + BR2_PACKAGE_SYSTEMD_BINFMT=y + BR2_PACKAGE_SYSTEMD_COREDUMP=y + BR2_PACKAGE_SYSTEMD_FIRSTBOOT=y + BR2_PACKAGE_SYSTEMD_HIBERNATE=y + BR2_PACKAGE_SYSTEMD_IMPORTD=y + BR2_PACKAGE_SYSTEMD_LOCALED=y + BR2_PACKAGE_SYSTEMD_LOGIND=y + BR2_PACKAGE_SYSTEMD_MACHINED=y + BR2_PACKAGE_SYSTEMD_POLKIT=y + BR2_PACKAGE_SYSTEMD_QUOTACHECK=y + BR2_PACKAGE_SYSTEMD_RANDOMSEED=y + BR2_PACKAGE_SYSTEMD_RFKILL=y + BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT=y + BR2_PACKAGE_SYSTEMD_SYSUSERS=y + BR2_PACKAGE_SYSTEMD_VCONSOLE=y + BR2_TARGET_ROOTFS_SQUASHFS=y + """ + + def test_run(self): + self.start_emulator("squashfs", "zImage", "vexpress-v2p-ca9") + self.check_init() + self.check_network("eth0") + + +class TestInitSystemSystemdRwFull(InitSystemSystemdBase): + config = InitSystemSystemdBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE=y + BR2_PACKAGE_SYSTEMD_BACKLIGHT=y + BR2_PACKAGE_SYSTEMD_BINFMT=y + BR2_PACKAGE_SYSTEMD_COREDUMP=y + BR2_PACKAGE_SYSTEMD_FIRSTBOOT=y + BR2_PACKAGE_SYSTEMD_HIBERNATE=y + BR2_PACKAGE_SYSTEMD_IMPORTD=y + BR2_PACKAGE_SYSTEMD_LOCALED=y + BR2_PACKAGE_SYSTEMD_LOGIND=y + BR2_PACKAGE_SYSTEMD_MACHINED=y + BR2_PACKAGE_SYSTEMD_POLKIT=y + BR2_PACKAGE_SYSTEMD_QUOTACHECK=y + BR2_PACKAGE_SYSTEMD_RANDOMSEED=y + BR2_PACKAGE_SYSTEMD_RFKILL=y + BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT=y + BR2_PACKAGE_SYSTEMD_SYSUSERS=y + BR2_PACKAGE_SYSTEMD_VCONSOLE=y + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + self.start_emulator("ext2", "zImage", "vexpress-v2p-ca9") + self.check_init() + self.check_network("eth0") diff --git a/support/testing/tests/init/test_systemd_selinux.py b/support/testing/tests/init/test_systemd_selinux.py new file mode 100644 index 00000000..73604cfc --- /dev/null +++ b/support/testing/tests/init/test_systemd_selinux.py @@ -0,0 +1,76 @@ +import os + +import infra.basetest + + +class TestSELinuxSystemd(infra.basetest.BRTest): + config = \ + """ + BR2_x86_64=y + BR2_x86_corei7=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_INIT_SYSTEMD=y + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.12" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux.config" + BR2_PACKAGE_LIBSELINUX=y + BR2_PACKAGE_REFPOLICY=y + """ + + def wait_boot(self): + # The complete boot with systemd takes more time than what the default multipler permits + self.emulator.timeout_multiplier *= 10 + self.emulator.login() + + def run_tests(self, fstype): + kernel = os.path.join(self.builddir, "images", "bzImage") + rootfs = os.path.join(self.builddir, "images", "rootfs.{}".format(fstype)) + + self.emulator.boot(arch="x86_64", kernel=kernel, + kernel_cmdline=["root=/dev/vda", "rootfstype={}".format(fstype), + "console=ttyS0", "security=selinux"], + options=["-cpu", "Nehalem", + "-drive", "file={},if=virtio,format=raw".format(rootfs)]) + self.wait_boot() + + # Test the reported SELinux mode. + out, ret = self.emulator.run("getenforce") + self.assertEqual(ret, 0) + self.assertEqual(out[0], "Permissive") + + # Check the extended arguments are correctly set. + out, ret = self.emulator.run("ls -dZ /") + self.assertEqual(ret, 0) + self.assertEqual(out[0].split()[0], "system_u:object_r:root_t") + + # Check init's attributes. + out, ret = self.emulator.run("cat /proc/1/attr/current") + self.assertEqual(ret, 0) + self.assertEqual(out[0], "system_u:system_r:init_t\0") + + +class TestSELinuxSystemdExt4(TestSELinuxSystemd): + config = TestSELinuxSystemd.config + \ + """ + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_4=y + BR2_TARGET_ROOTFS_EXT2_SIZE="100M" + """ + + def test_run(self): + self.run_tests("ext4") + + +class TestSELinuxSystemdSquashfs(TestSELinuxSystemd): + config = TestSELinuxSystemd.config + \ + """ + BR2_TARGET_ROOTFS_SQUASHFS=y + BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}" + """.format( + infra.filepath("tests/init/test_systemd_selinux/linux-squashfs.fragment"), + ) + + def test_run(self): + self.run_tests("squashfs") diff --git a/support/testing/tests/init/test_systemd_selinux/linux-squashfs.fragment b/support/testing/tests/init/test_systemd_selinux/linux-squashfs.fragment new file mode 100644 index 00000000..7a89d006 --- /dev/null +++ b/support/testing/tests/init/test_systemd_selinux/linux-squashfs.fragment @@ -0,0 +1 @@ +CONFIG_SQUASHFS=y diff --git a/support/testing/tests/package/__init__.py b/support/testing/tests/package/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/support/testing/tests/package/br2-external/openjdk/Config.in b/support/testing/tests/package/br2-external/openjdk/Config.in new file mode 100644 index 00000000..2588b340 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/Config.in @@ -0,0 +1,2 @@ +source "$BR2_EXTERNAL_OPENJDK_PATH/package/openjdk-hello-world/Config.in" +source "$BR2_EXTERNAL_OPENJDK_PATH/package/openjdk-jni-test/Config.in" diff --git a/support/testing/tests/package/br2-external/openjdk/external.desc b/support/testing/tests/package/br2-external/openjdk/external.desc new file mode 100644 index 00000000..f28ba506 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/external.desc @@ -0,0 +1 @@ +name: OPENJDK diff --git a/support/testing/tests/package/br2-external/openjdk/external.mk b/support/testing/tests/package/br2-external/openjdk/external.mk new file mode 100644 index 00000000..54c24e8c --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/external.mk @@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_OPENJDK_PATH)/package/*/*.mk)) diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/Config.in b/support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/Config.in new file mode 100644 index 00000000..c37346a4 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_OPENJDK_HELLO_WORLD + bool "openjdk hello world" + depends on BR2_PACKAGE_OPENJDK + help + Simple class for testing openjdk diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/HelloWorld.java b/support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/HelloWorld.java new file mode 100644 index 00000000..37489e44 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/HelloWorld.java @@ -0,0 +1,7 @@ +public class HelloWorld +{ + public static void main(String[] args) + { + System.out.println("Hello, World"); + } +} diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/openjdk-hello-world.mk b/support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/openjdk-hello-world.mk new file mode 100644 index 00000000..ddd5e388 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-hello-world/openjdk-hello-world.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# openjdk hello world +# +################################################################################ + +OPENJDK_HELLO_WORLD_DEPENDENCIES = openjdk + +define OPENJDK_HELLO_WORLD_BUILD_CMDS + $(INSTALL) -D $(OPENJDK_HELLO_WORLD_PKGDIR)/HelloWorld.java $(@D)/HelloWorld.java + $(JAVAC) $(@D)/HelloWorld.java +endef + +define OPENJDK_HELLO_WORLD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/HelloWorld.class $(TARGET_DIR)/usr/bin/HelloWorld.class +endef + +$(eval $(generic-package)) diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/Config.in b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/Config.in new file mode 100644 index 00000000..22cd0c0a --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_OPENJDK_JNI_TEST + bool "openjdk JNI test" + depends on BR2_PACKAGE_OPENJDK + help + Tests openjdk JNI support diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniHelper.java b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniHelper.java new file mode 100644 index 00000000..9e2a0387 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniHelper.java @@ -0,0 +1,9 @@ +public class JniHelper +{ + public void HelloManagedWorld() + { + stringMember = "Hello, Managed World"; + } + + public String stringMember = "Set from Java"; +} diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniTest.java b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniTest.java new file mode 100644 index 00000000..3d6c17b7 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniTest.java @@ -0,0 +1,92 @@ +public class JniTest +{ + private static void Test( + String name, + Object actual, + Object expected, + String actualAsString, + String expectedAsString) + { + if (!actual.equals(expected)) + { + System.out.println(String.format( + "Test: %s failed\nExpected: \"%s\", Actual: \"%s\"", + name, + expected, + actual)); + JniTest.exitCode = -1; + } + else + { + System.out.println(String.format("Test: %s passed", name)); + } + } + + private static void Test( + String name, + String actual, + String expected) + { + JniTest.Test(name, actual, expected, actual, expected); + } + + public static void main(String[] args) + { + var actualVersion = JniWrapper.get_jni_version(); + var expectedVersion = 0x000A0000; + JniTest.Test( + "Get JNI Version", + actualVersion, + expectedVersion, + String.format("0x%08X", actualVersion), + String.format("0x%08X", expectedVersion)); + + JniTest.Test( + "Read Native String Constant", + JniWrapper.read_constant_string(), + "Hello from C"); + + JniTest.Test( + "Write Java String to Native Library", + JniWrapper.write_string("Hello from Java"), + "Hello from Java"); + + JniTest.Test( + "Write Java Char Array to Native Library", + JniWrapper.write_char_array("Hello from Java".toCharArray()), + "Hello from Java"); + + var helper = new JniHelper(); + JniTest.Test( + "Write String Member to Native Library", + JniWrapper.write_string_member(helper), + "Set from Java"); + + JniWrapper.set_string_member(helper); + JniTest.Test( + "Set String Member from Native Library", + helper.stringMember, + "Set from C"); + + JniWrapper.execute_java_function(helper); + JniTest.Test( + "Execeute Java Function from Native Library", + helper.stringMember, + "Hello, Managed World"); + + helper = JniWrapper.instantiate_java_class(); + JniTest.Test( + "Instantiate Java Class", + helper.stringMember, + "Instantiated from C"); + + JniTest.Test( + "Call Native Library to Set System Time", + JniWrapper.set_and_write_time_in_seconds(1000), + "1000"); + + System.exit(exitCode); + } + + public static int exitCode = 0; +} diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniWrapper.c b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniWrapper.c new file mode 100644 index 00000000..0dde4e0c --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniWrapper.c @@ -0,0 +1,50 @@ +#include "JniWrapper.h" +#include "jni_helper.h" + +// Proxies the generated function calls to the jni_helper + +JNIEXPORT jint JNICALL Java_JniWrapper_get_1jni_1version + (JNIEnv* env, jclass class) +{ + return get_jni_version(env); +} +JNIEXPORT jstring JNICALL Java_JniWrapper_read_1constant_1string + (JNIEnv* env, jclass class) +{ + return read_constant_jstring(env); +} +JNIEXPORT jstring JNICALL Java_JniWrapper_write_1string + (JNIEnv* env, jclass class, jstring string) +{ + return write_jstring(env, string); +} +JNIEXPORT jstring JNICALL Java_JniWrapper_write_1char_1array + (JNIEnv* env, jclass class, jcharArray chars) +{ + return write_jchar_array(env, chars); +} +JNIEXPORT jstring JNICALL Java_JniWrapper_write_1string_1member + (JNIEnv* env, jclass class, jobject helper) +{ + return write_string_member(env, helper); +} +JNIEXPORT void JNICALL Java_JniWrapper_set_1string_1member + (JNIEnv* env, jclass class, jobject helper) +{ + set_string_member(env, helper); +} +JNIEXPORT void JNICALL Java_JniWrapper_execute_1java_1function + (JNIEnv* env, jclass class, jobject helper) +{ + execute_java_function(env, helper); +} +JNIEXPORT jobject JNICALL Java_JniWrapper_instantiate_1java_1class + (JNIEnv* env, jclass class) +{ + return instantiate_java_class(env); +} +JNIEXPORT jstring JNICALL Java_JniWrapper_set_1and_1write_1time_1in_1seconds + (JNIEnv* env, jclass class, jint seconds) +{ + return set_and_write_time_in_seconds(env, seconds); +} diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniWrapper.java b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniWrapper.java new file mode 100644 index 00000000..d11e99bf --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniWrapper.java @@ -0,0 +1,17 @@ +public class JniWrapper +{ + static + { + System.loadLibrary("jni_native"); + } + + public static native int get_jni_version(); + public static native String read_constant_string(); + public static native String write_string(String string); + public static native String write_char_array(char[] string); + public static native String write_string_member(JniHelper helper); + public static native void set_string_member(JniHelper helper); + public static native void execute_java_function(JniHelper helper); + public static native JniHelper instantiate_java_class(); + public static native String set_and_write_time_in_seconds(int seconds); +} diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/jni_helper.c b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/jni_helper.c new file mode 100644 index 00000000..e6e2eec8 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/jni_helper.c @@ -0,0 +1,94 @@ +#include "jni_helper.h" +#include "native.h" + +// Handles Java/C interop + +jint get_jni_version(JNIEnv* env) +{ + return (*env)->GetVersion(env); +} +jstring read_constant_jstring(JNIEnv* env) +{ + return (*env)->NewStringUTF(env, read_constant_string()); +} +static jstring read_internal_string_as_jstring(JNIEnv* env) +{ + return (*env)->NewStringUTF(env, read_internal_string()); +} +jstring write_jstring(JNIEnv* env, jstring string) +{ + const char* utf8_string = (*env)->GetStringUTFChars(env, string, NULL); + write_internal_string(utf8_string); + + (*env)->ReleaseStringUTFChars(env, string, utf8_string); + return read_internal_string_as_jstring(env); +} +jstring write_jchar_array(JNIEnv* env, jcharArray chars) +{ + jsize length = (*env)->GetArrayLength(env, chars); + jchar* body = (*env)->GetCharArrayElements(env, chars, NULL); + jstring input = (*env)->NewString(env, body, length); + jstring output = write_jstring(env, input); + + (*env)->ReleaseCharArrayElements(env, chars, body, JNI_ABORT); + return output; +} +static jfieldID get_string_member_field(JNIEnv* env, jobject helper) +{ + jclass class = (*env)->GetObjectClass(env, helper); + return (*env)->GetFieldID(env, class, "stringMember", "Ljava/lang/String;"); +} +jstring write_string_member(JNIEnv* env, jobject helper) +{ + jfieldID fieldID = get_string_member_field(env, helper); + jstring string = (*env)->GetObjectField(env, helper, fieldID); + + return write_jstring(env, string); +} +static void set_string_member_helper(JNIEnv* env, jobject helper, const char* utf8_string) +{ + jfieldID fieldID = get_string_member_field(env, helper); + jstring string = (*env)->NewStringUTF(env, utf8_string); + (*env)->SetObjectField(env, helper, fieldID, string); +} +void set_string_member(JNIEnv* env, jobject helper) +{ + char stringBuffer[256]; + write_external_string(stringBuffer, 256); + set_string_member_helper(env, helper, stringBuffer); +} + +typedef struct +{ + JNIEnv* env; + jobject object; + jmethodID methodID; +} method_parameters; +static void call_void_java_method(void* context) +{ + method_parameters* parameters = (method_parameters*)context; + (*parameters->env)->CallVoidMethod(parameters->env, parameters->object, parameters->methodID); +} +void execute_java_function(JNIEnv* env, jobject helper) +{ + jclass class = (*env)->GetObjectClass(env, helper); + jmethodID methodID = (*env)->GetMethodID(env, class, "HelloManagedWorld", "()V"); + + method_parameters parameters = {env, helper, methodID}; + execute_function(call_void_java_method, (void*)¶meters); +} +jobject instantiate_java_class(JNIEnv* env) +{ + jclass class = (*env)->FindClass(env, "JniHelper"); + jmethodID methodID = (*env)->GetMethodID(env, class, "", "()V"); + + jobject object =(*env)->NewObject(env, class, methodID); + set_string_member_helper(env, object, "Instantiated from C"); + return object; +} +jstring set_and_write_time_in_seconds(JNIEnv* env, jint seconds) +{ + set_time_in_seconds((int)seconds); + write_internal_time_in_seconds(); + return read_internal_string_as_jstring(env); +} diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/jni_helper.h b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/jni_helper.h new file mode 100644 index 00000000..4c9aab3b --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/jni_helper.h @@ -0,0 +1,13 @@ +#pragma once + +#include + +jint get_jni_version(JNIEnv* env); +jstring read_constant_jstring(JNIEnv* env); +jstring write_jstring(JNIEnv* env, jstring string); +jstring write_jchar_array(JNIEnv* env, jcharArray chars); +jstring write_string_member(JNIEnv* env, jobject helper); +void set_string_member(JNIEnv* env, jobject helper); +void execute_java_function(JNIEnv* env, jobject helper); +jobject instantiate_java_class(JNIEnv* env); +jstring set_and_write_time_in_seconds(JNIEnv* env, jint seconds); diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c new file mode 100644 index 00000000..ed87e345 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.c @@ -0,0 +1,39 @@ +#include "native.h" +#include +#include + +// Pure native functions + +#define CHAR_BUFFER_SIZE 256 +static char buffer[CHAR_BUFFER_SIZE]; + +const char* read_constant_string() +{ + return "Hello from C"; +} +const char* read_internal_string() +{ + return buffer; +} +void write_internal_string(const char* string) +{ + snprintf(buffer, CHAR_BUFFER_SIZE, "%s", string); +} +void write_external_string(char* string, size_t maxLength) +{ + snprintf(string, maxLength, "Set from C"); +} +void execute_function(void(*function)(void*), void* context) +{ + function(context); +} +void set_time_in_seconds(int seconds) +{ + time_t timeToSet = seconds; + stime(&timeToSet); +} +void write_internal_time_in_seconds() +{ + time_t systemTime = time(NULL); + snprintf(buffer, CHAR_BUFFER_SIZE, "%u", systemTime); +} diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.h b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.h new file mode 100644 index 00000000..a25f1779 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/native.h @@ -0,0 +1,11 @@ +#pragma once + +#include + +const char* read_constant_string(); +const char* read_internal_string(); +void write_internal_string(const char* string); +void write_external_string(char* string, size_t maxLength); +void execute_function(void(*function)(void*), void* context); +void set_time_in_seconds(int seconds); +void write_internal_time_in_seconds(); diff --git a/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/openjdk-jni-test.mk b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/openjdk-jni-test.mk new file mode 100644 index 00000000..2028ad40 --- /dev/null +++ b/support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/openjdk-jni-test.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# openjdk jni test +# +################################################################################ + +OPENJDK_JNI_TEST_DEPENDENCIES = openjdk + +JNI_INCLUDE_PATH = $(BUILD_DIR)/openjdk-$(OPENJDK_VERSION)/build/linux-aarch64-server-release/jdk/include + +define OPENJDK_JNI_TEST_BUILD_CMDS + # Compile Java classes and generate native headers + $(JAVAC) -d $(@D) -h $(@D) \ + $(OPENJDK_JNI_TEST_PKGDIR)/JniTest.java \ + $(OPENJDK_JNI_TEST_PKGDIR)/JniWrapper.java \ + $(OPENJDK_JNI_TEST_PKGDIR)/JniHelper.java + + # Compile shared library + $(TARGET_MAKE_ENV) $(TARGET_CC) -shared -fPIC \ + -I$(JNI_INCLUDE_PATH) -I$(JNI_INCLUDE_PATH)/linux -I$(@D) \ + -o $(@D)/libjni_native.so \ + $(OPENJDK_JNI_TEST_PKGDIR)/JniWrapper.c \ + $(OPENJDK_JNI_TEST_PKGDIR)/jni_helper.c \ + $(OPENJDK_JNI_TEST_PKGDIR)/native.c +endef + +define OPENJDK_JNI_TEST_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/JniTest.class $(TARGET_DIR)/usr/bin/JniTest.class + $(INSTALL) -D -m 755 $(@D)/JniWrapper.class $(TARGET_DIR)/usr/bin/JniWrapper.class + $(INSTALL) -D -m 755 $(@D)/JniHelper.class $(TARGET_DIR)/usr/bin/JniHelper.class + $(INSTALL) -D -m 755 $(@D)/libjni_native.so $(TARGET_DIR)/usr/lib/libjni_native.so +endef + +$(eval $(generic-package)) diff --git a/support/testing/tests/package/copy-sample-script-to-target.sh b/support/testing/tests/package/copy-sample-script-to-target.sh new file mode 100755 index 00000000..6448a80d --- /dev/null +++ b/support/testing/tests/package/copy-sample-script-to-target.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +shift +for file in "$@"; do + cp -f "${file}" "${TARGET_DIR}/root/" +done diff --git a/support/testing/tests/package/sample_gst1_python.py b/support/testing/tests/package/sample_gst1_python.py new file mode 100644 index 00000000..fab7e74f --- /dev/null +++ b/support/testing/tests/package/sample_gst1_python.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +"""A simple test that uses gst1-python to run a fake videotestsrc for 100 +frames +""" +import sys +import gi +gi.require_version('Gst', '1.0') +from gi.repository import Gst, GLib # noqa: E402 + + +def on_message(bus, message, loop): + print('Received Gst.Message.type: {}'.format(message.type)) + if message.type == Gst.MessageType.EOS: + loop.quit() + return True + + +def main(): + # Initializes Gstreamer + Gst.init(sys.argv) + pipeline = Gst.parse_launch("videotestsrc num-buffers=100 ! fakevideosink") + bus = pipeline.get_bus() + bus.add_signal_watch() + pipeline.set_state(Gst.State.PLAYING) + loop = GLib.MainLoop() + bus.connect("message", on_message, loop) + loop.run() + pipeline.set_state(Gst.State.NULL) + + +if __name__ == '__main__': + main() diff --git a/support/testing/tests/package/sample_libftdi1.py b/support/testing/tests/package/sample_libftdi1.py new file mode 100644 index 00000000..2da6124b --- /dev/null +++ b/support/testing/tests/package/sample_libftdi1.py @@ -0,0 +1 @@ +import ftdi1 # noqa diff --git a/support/testing/tests/package/sample_python_argh.py b/support/testing/tests/package/sample_python_argh.py new file mode 100644 index 00000000..48247bf6 --- /dev/null +++ b/support/testing/tests/package/sample_python_argh.py @@ -0,0 +1,10 @@ +import argh + + +@argh.arg("foo", help="help for foo") +@argh.arg("--bar", help="help for bar") +def main(foo, bar=False): + print("{}, {}".format(foo, bar)) + + +argh.dispatch_command(main) diff --git a/support/testing/tests/package/sample_python_attrs.py b/support/testing/tests/package/sample_python_attrs.py new file mode 100644 index 00000000..f2249449 --- /dev/null +++ b/support/testing/tests/package/sample_python_attrs.py @@ -0,0 +1,15 @@ +import attr + + +@attr.s +class Obj(object): + x = attr.ib() + y = attr.ib(default=1) + + +obj1 = Obj(2) +assert(obj1.x == 2) +assert(obj1.y == 1) +obj2 = Obj(3, 4) +assert(obj2.x == 3) +assert(obj2.y == 4) diff --git a/support/testing/tests/package/sample_python_autobahn.py b/support/testing/tests/package/sample_python_autobahn.py new file mode 100644 index 00000000..8189b6a6 --- /dev/null +++ b/support/testing/tests/package/sample_python_autobahn.py @@ -0,0 +1 @@ +import autobahn.wamp # noqa diff --git a/support/testing/tests/package/sample_python_automat.py b/support/testing/tests/package/sample_python_automat.py new file mode 100644 index 00000000..baf536f9 --- /dev/null +++ b/support/testing/tests/package/sample_python_automat.py @@ -0,0 +1,27 @@ +from automat import MethodicalMachine + + +class Led(object): + _machine = MethodicalMachine() + + @_machine.state() + def led_on(self): + "led is on" + + @_machine.state(initial=True) + def led_off(self): + "led is off" + + @_machine.input() + def turn_on(self): + "turn the led on" + + @_machine.output() + def _light(self): + print("light") + + led_off.upon(turn_on, enter=led_on, outputs=[_light]) + + +led = Led() +led.turn_on() diff --git a/support/testing/tests/package/sample_python_avro.py b/support/testing/tests/package/sample_python_avro.py new file mode 100644 index 00000000..79d2dcdb --- /dev/null +++ b/support/testing/tests/package/sample_python_avro.py @@ -0,0 +1,23 @@ +from io import BytesIO +from avro.schema import Parse +from avro.io import DatumReader, BinaryDecoder + +schema = Parse("""{ +"namespace": "org.buildroot.package.python_avro", +"type": "record", +"name": "Developer", +"fields": [ + {"name": "email", "type": "string"}, + {"name": "maintainer_of", "type": "string"} +] +}""") + +example = b' RESULT.FAIL.value) +assert(RESULT.get(-5) == RESULT.FAIL) diff --git a/support/testing/tests/package/sample_python_crossbar.py b/support/testing/tests/package/sample_python_crossbar.py new file mode 100644 index 00000000..374cccd8 --- /dev/null +++ b/support/testing/tests/package/sample_python_crossbar.py @@ -0,0 +1,5 @@ +import os +import crossbar + +os.environ["AUTOBAHN_USE_UMSGPACK"] = "1" +crossbar.run(["version"]) diff --git a/support/testing/tests/package/sample_python_cryptography.py b/support/testing/tests/package/sample_python_cryptography.py new file mode 100644 index 00000000..ec9883dc --- /dev/null +++ b/support/testing/tests/package/sample_python_cryptography.py @@ -0,0 +1,3 @@ +from cryptography.fernet import Fernet +key = Fernet.generate_key() +f = Fernet(key) diff --git a/support/testing/tests/package/sample_python_django.py b/support/testing/tests/package/sample_python_django.py new file mode 100644 index 00000000..c2bad566 --- /dev/null +++ b/support/testing/tests/package/sample_python_django.py @@ -0,0 +1 @@ +import django # noqa: F401 diff --git a/support/testing/tests/package/sample_python_gitdb2.py b/support/testing/tests/package/sample_python_gitdb2.py new file mode 100644 index 00000000..4a82fdf5 --- /dev/null +++ b/support/testing/tests/package/sample_python_gitdb2.py @@ -0,0 +1 @@ +from gitdb import * # noqa diff --git a/support/testing/tests/package/sample_python_gobject.py b/support/testing/tests/package/sample_python_gobject.py new file mode 100644 index 00000000..50564aa7 --- /dev/null +++ b/support/testing/tests/package/sample_python_gobject.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +"""A simple test that uses python-gobject to find the path of sh.""" +from gi.repository import GLib + + +def main(): + sh_path = GLib.find_program_in_path('sh') + if sh_path == "/bin/sh": + return True + return False + + +if __name__ == '__main__': + main() diff --git a/support/testing/tests/package/sample_python_gpiozero.py b/support/testing/tests/package/sample_python_gpiozero.py new file mode 100644 index 00000000..b95df07f --- /dev/null +++ b/support/testing/tests/package/sample_python_gpiozero.py @@ -0,0 +1,5 @@ +from gpiozero import pi_info + +piBoardInfo = pi_info('a020d3') # 3B+ + +assert(piBoardInfo.model == '3B+') diff --git a/support/testing/tests/package/sample_python_incremental.py b/support/testing/tests/package/sample_python_incremental.py new file mode 100644 index 00000000..b6e2aa80 --- /dev/null +++ b/support/testing/tests/package/sample_python_incremental.py @@ -0,0 +1,3 @@ +import incremental +v = incremental.Version("package", 1, 2, 3, release_candidate=4) +assert(str(v) == "[package, version 1.2.3rc4]") diff --git a/support/testing/tests/package/sample_python_passlib.py b/support/testing/tests/package/sample_python_passlib.py new file mode 100644 index 00000000..3ab348b9 --- /dev/null +++ b/support/testing/tests/package/sample_python_passlib.py @@ -0,0 +1,5 @@ +from passlib.hash import pbkdf2_sha256 + +hash = pbkdf2_sha256.hash("password") +assert(pbkdf2_sha256.verify("passWord", hash) is False) +assert(pbkdf2_sha256.verify("password", hash) is True) diff --git a/support/testing/tests/package/sample_python_pexpect.py b/support/testing/tests/package/sample_python_pexpect.py new file mode 100644 index 00000000..cfe395fc --- /dev/null +++ b/support/testing/tests/package/sample_python_pexpect.py @@ -0,0 +1,8 @@ +import pexpect + +p = pexpect.spawn(["login"]) +p.expect("login:") +p.sendline("wrong") +p.expect("Password:") +p.sendline("wrong") +p.expect("Login incorrect") diff --git a/support/testing/tests/package/sample_python_pynacl.py b/support/testing/tests/package/sample_python_pynacl.py new file mode 100644 index 00000000..d17c50eb --- /dev/null +++ b/support/testing/tests/package/sample_python_pynacl.py @@ -0,0 +1,3 @@ +import nacl.utils + +nonce = nacl.utils.random(16) diff --git a/support/testing/tests/package/sample_python_pytest.py b/support/testing/tests/package/sample_python_pytest.py new file mode 100644 index 00000000..870cc851 --- /dev/null +++ b/support/testing/tests/package/sample_python_pytest.py @@ -0,0 +1,25 @@ +import pytest + + +x = 1 + + +@pytest.fixture() +def f1(): + global x + x = 2 + yield 15 + x = 3 + + +def test_1(): + assert x == 1 + + +def test_2(f1): + assert x == 2 + assert f1 == 15 + + +def test_3(): + assert x == 3 diff --git a/support/testing/tests/package/sample_python_pytest_asyncio.py b/support/testing/tests/package/sample_python_pytest_asyncio.py new file mode 100644 index 00000000..cdb8cd9f --- /dev/null +++ b/support/testing/tests/package/sample_python_pytest_asyncio.py @@ -0,0 +1,31 @@ +import asyncio +import pytest + + +x = 1 + + +@pytest.fixture() +def f1(): + global x + x = 2 + yield 15 + x = 3 + + +@pytest.mark.asyncio +async def test_1(): + assert x == 1 + + +@pytest.mark.asyncio +async def test_2(f1): + assert x == 2 + assert f1 == 15 + + +@pytest.mark.asyncio +async def test_3(): + assert x == 3 + await asyncio.sleep(0.1) + assert x == 3 diff --git a/support/testing/tests/package/sample_python_pyyaml_dec.py b/support/testing/tests/package/sample_python_pyyaml_dec.py new file mode 100644 index 00000000..9ab89311 --- /dev/null +++ b/support/testing/tests/package/sample_python_pyyaml_dec.py @@ -0,0 +1,10 @@ +import yaml + +with open("/tmp/data.yml", "rb") as f: + serialized = f.read() +data = yaml.load(serialized) +print(data) +assert(data["name"] == "python-pyyaml") +assert(data["versions"] == ["1", "2"]) +assert(data["group"]["is_a_package"] is True) +assert(data["group"]["value"] == 42) diff --git a/support/testing/tests/package/sample_python_pyyaml_enc.py b/support/testing/tests/package/sample_python_pyyaml_enc.py new file mode 100644 index 00000000..30759949 --- /dev/null +++ b/support/testing/tests/package/sample_python_pyyaml_enc.py @@ -0,0 +1,14 @@ +import yaml + +data = { + "name": "python-pyyaml", + "versions": ["1", "2"], + "group": { + "is_a_package": True, + "value": 42 + } +} +serialized = yaml.dump(data, default_flow_style=False) +print(serialized) +with open("/tmp/data.yml", "w") as f: + f.write(serialized) diff --git a/support/testing/tests/package/sample_python_rpi_gpio.py b/support/testing/tests/package/sample_python_rpi_gpio.py new file mode 100644 index 00000000..5f0d884e --- /dev/null +++ b/support/testing/tests/package/sample_python_rpi_gpio.py @@ -0,0 +1,6 @@ +try: + import RPi.GPIO # noqa +except RuntimeError as e: + assert(str(e) == 'This module can only be run on a Raspberry Pi!') +else: + raise RuntimeError('Import succeeded when it should not have!') diff --git a/support/testing/tests/package/sample_python_service_identity.py b/support/testing/tests/package/sample_python_service_identity.py new file mode 100644 index 00000000..3184b6c5 --- /dev/null +++ b/support/testing/tests/package/sample_python_service_identity.py @@ -0,0 +1,2 @@ +from service_identity import VerificationError # noqa +from service_identity.pyopenssl import verify_hostname # noqa diff --git a/support/testing/tests/package/sample_python_smmap2.py b/support/testing/tests/package/sample_python_smmap2.py new file mode 100644 index 00000000..494fc26e --- /dev/null +++ b/support/testing/tests/package/sample_python_smmap2.py @@ -0,0 +1,6 @@ +# Taken from smmap/test/test_tutorial.py + +import smmap +mman = smmap.SlidingWindowMapManager() +assert mman.num_file_handles() == 0 +assert mman.mapped_memory_size() == 0 diff --git a/support/testing/tests/package/sample_python_subprocess32.py b/support/testing/tests/package/sample_python_subprocess32.py new file mode 100644 index 00000000..8579745c --- /dev/null +++ b/support/testing/tests/package/sample_python_subprocess32.py @@ -0,0 +1,6 @@ +import subprocess32 + +output = subprocess32.check_output(["ls", "-l", "/dev/null"]) +print(output) +assert("/dev/null" in output) +assert("No such" not in output) diff --git a/support/testing/tests/package/sample_python_treq.py b/support/testing/tests/package/sample_python_treq.py new file mode 100644 index 00000000..974fdcd8 --- /dev/null +++ b/support/testing/tests/package/sample_python_treq.py @@ -0,0 +1,16 @@ +from twisted.internet import reactor +import treq + + +def done(response): + print(response.code) + reactor.stop() + + +def err(fail): + print(fail.value) + reactor.stop() + + +treq.get("https://localhost").addCallback(done).addErrback(err) +reactor.run() diff --git a/support/testing/tests/package/sample_python_twisted.py b/support/testing/tests/package/sample_python_twisted.py new file mode 100644 index 00000000..47d6c5de --- /dev/null +++ b/support/testing/tests/package/sample_python_twisted.py @@ -0,0 +1,9 @@ +from twisted.internet import protocol, reactor, endpoints + + +class F(protocol.Factory): + pass + + +endpoints.serverFromString(reactor, "tcp:1234").listen(F()) +reactor.run() diff --git a/support/testing/tests/package/sample_python_txaio_asyncio.py b/support/testing/tests/package/sample_python_txaio_asyncio.py new file mode 100644 index 00000000..77f11ed8 --- /dev/null +++ b/support/testing/tests/package/sample_python_txaio_asyncio.py @@ -0,0 +1,3 @@ +import txaio +txaio.use_asyncio() +f0 = txaio.create_future() diff --git a/support/testing/tests/package/sample_python_txaio_twisted.py b/support/testing/tests/package/sample_python_txaio_twisted.py new file mode 100644 index 00000000..13ea82a9 --- /dev/null +++ b/support/testing/tests/package/sample_python_txaio_twisted.py @@ -0,0 +1,3 @@ +import txaio +txaio.use_twisted() +f0 = txaio.create_future() diff --git a/support/testing/tests/package/sample_python_txtorcon.py b/support/testing/tests/package/sample_python_txtorcon.py new file mode 100644 index 00000000..c4a2ae6f --- /dev/null +++ b/support/testing/tests/package/sample_python_txtorcon.py @@ -0,0 +1 @@ +import txtorcon # noqa diff --git a/support/testing/tests/package/sample_python_ubjson_dec.py b/support/testing/tests/package/sample_python_ubjson_dec.py new file mode 100644 index 00000000..12ccdfd5 --- /dev/null +++ b/support/testing/tests/package/sample_python_ubjson_dec.py @@ -0,0 +1,10 @@ +import ubjson + +with open("/tmp/data.json", "rb") as f: + serialized = f.read() +data = ubjson.loadb(serialized) +print(data) +assert(data["name"] == "python-ubjson") +assert(data["versions"] == ["1", "2"]) +assert(data["group"]["is_a_package"] is True) +assert(data["group"]["value"] == 42) diff --git a/support/testing/tests/package/sample_python_ubjson_enc.py b/support/testing/tests/package/sample_python_ubjson_enc.py new file mode 100644 index 00000000..9a2140ef --- /dev/null +++ b/support/testing/tests/package/sample_python_ubjson_enc.py @@ -0,0 +1,14 @@ +import ubjson + +data = { + "name": "python-ubjson", + "versions": ["1", "2"], + "group": { + "is_a_package": True, + "value": 42 + } +} +serialized = ubjson.dumpb(data) +print(serialized) +with open("/tmp/data.json", "wb") as f: + f.write(serialized) diff --git a/support/testing/tests/package/test_atop.py b/support/testing/tests/package/test_atop.py new file mode 100644 index 00000000..1da1ac7c --- /dev/null +++ b/support/testing/tests/package/test_atop.py @@ -0,0 +1,41 @@ +import os + +import infra.basetest + +BASIC_TOOLCHAIN_CONFIG_HEADERS_AT_LEAST_3_14 = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.05.1.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y + BR2_TOOLCHAIN_EXTERNAL_LOCALE=y + # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set + BR2_TOOLCHAIN_EXTERNAL_CXX=y + """ + + +class TestAtop(infra.basetest.BRTest): + config = BASIC_TOOLCHAIN_CONFIG_HEADERS_AT_LEAST_3_14 + \ + """ + BR2_PACKAGE_ATOP=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + cmd = "atop -V | grep '^Version'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "atop -a 1 2 | grep '% *atop *$'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/package/test_crudini.py b/support/testing/tests/package/test_crudini.py new file mode 100644 index 00000000..e320d320 --- /dev/null +++ b/support/testing/tests/package/test_crudini.py @@ -0,0 +1,49 @@ +import os +from tests.package.test_python import TestPythonPackageBase + + +INI_FILE_CONTENT = """ +[section] +param = this-is-the-magic-value +other = dont care +""" + + +class TestCrudiniBase(TestPythonPackageBase): + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_CRUDINI=y + """ + + def test_run(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", kernel="builtin", + options=["-initrd", img]) + + self.emulator.login() + + # 1. Create some sample .ini file + cmd = "echo -e '%s' > config.ini" % INI_FILE_CONTENT + _, ret = self.emulator.run(cmd) + self.assertEqual(ret, 0) + + # 2. Attempt to get the value + out, ret = self.emulator.run("crudini --get config.ini section param") + self.assertEqual(ret, 0) + self.assertEqual(out, ['this-is-the-magic-value']) + + +class TestCrudiniPy2(TestCrudiniBase): + __test__ = True + config = TestCrudiniBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + """ + + +class TestCrudiniPy3(TestCrudiniBase): + __test__ = True + config = TestCrudiniBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + """ diff --git a/support/testing/tests/package/test_docker_compose.py b/support/testing/tests/package/test_docker_compose.py new file mode 100644 index 00000000..737dbf39 --- /dev/null +++ b/support/testing/tests/package/test_docker_compose.py @@ -0,0 +1,66 @@ +import os + +import infra.basetest + + +class TestDockerCompose(infra.basetest.BRTest): + config = \ + """ + BR2_x86_64=y + BR2_x86_core2=y + BR2_TOOLCHAIN_BUILDROOT_GLIBC=y + BR2_KERNEL_HEADERS_4_19=y + BR2_TOOLCHAIN_BUILDROOT_CXX=y + BR2_SYSTEM_DHCP="eth0" + BR2_ROOTFS_POST_BUILD_SCRIPT="{}" + BR2_ROOTFS_POST_SCRIPT_ARGS="{}" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="{}" + BR2_PACKAGE_CA_CERTIFICATES=y + BR2_PACKAGE_DOCKER_CLI=y + BR2_PACKAGE_DOCKER_COMPOSE=y + BR2_PACKAGE_DOCKER_ENGINE=y + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_SIZE="512M" + # BR2_TARGET_ROOTFS_TAR is not set + """.format( + infra.filepath("tests/package/copy-sample-script-to-target.sh"), + infra.filepath("conf/docker-compose.yml"), + infra.filepath("conf/docker-compose-kernel.config")) + + def wait_for_dockerd(self): + # dockerd takes a while to start up + _, _ = self.emulator.run('while [ ! -e /var/run/docker.sock ]; do sleep 1; done', 120) + + def docker_test(self): + # will download container if not available, which may take some time + _, exit_code = self.emulator.run('docker run --rm -p 8888:8888 busybox:latest /bin/true', 120) + self.assertEqual(exit_code, 0) + + def docker_compose_test(self): + # will download container if not available, which may take some time + self.assertRunOk('docker-compose up -d', 120) + # container may take some time to start + self.assertRunOk('while ! docker inspect root_busybox_1 2>&1 >/dev/null; do sleep 1; done', 120) + self.assertRunOk('wget -O /tmp/busybox http://127.0.0.1/busybox', 120) + self.assertRunOk('cmp /bin/busybox /tmp/busybox', 120) + + def test_run(self): + kernel = os.path.join(self.builddir, "images", "bzImage") + rootfs = os.path.join(self.builddir, "images", "rootfs.ext2") + self.emulator.boot(arch="x86_64", + kernel=kernel, + kernel_cmdline=["root=/dev/vda", "console=ttyS0"], + options=["-cpu", "core2duo", + "-m", "512M", + "-device", "virtio-rng-pci", + "-drive", "file={},format=raw,if=virtio".format(rootfs), + "-net", "nic,model=virtio", + "-net", "user"]) + self.emulator.login() + self.wait_for_dockerd() + self.docker_test() + self.docker_compose_test() diff --git a/support/testing/tests/package/test_dropbear.py b/support/testing/tests/package/test_dropbear.py new file mode 100644 index 00000000..bfec8701 --- /dev/null +++ b/support/testing/tests/package/test_dropbear.py @@ -0,0 +1,32 @@ +import os + +import infra.basetest + + +class TestDropbear(infra.basetest.BRTest): + passwd = "testpwd" + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_GENERIC_ROOT_PASSWD="{}" + BR2_SYSTEM_DHCP="eth0" + BR2_PACKAGE_DROPBEAR=y + BR2_PACKAGE_SSHPASS=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """.format(passwd) + + def test_run(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", img, + "-net", "nic", + "-net", "user"]) + self.emulator.login(self.passwd) + cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:22" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "sshpass -p {} ssh -y localhost /bin/true".format(self.passwd) + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/package/test_glxinfo.py b/support/testing/tests/package/test_glxinfo.py new file mode 100644 index 00000000..f37236d1 --- /dev/null +++ b/support/testing/tests/package/test_glxinfo.py @@ -0,0 +1,62 @@ +import os + +import infra.basetest + +GLXINFO_TIMEOUT = 120 + + +class TestGlxinfo(infra.basetest.BRTest): + config = \ + """ + BR2_x86_core2=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs/x86-core2--glibc--bleeding-edge-2018.11-1.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_8=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y + BR2_TOOLCHAIN_EXTERNAL_CXX=y + BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux.config" + BR2_PACKAGE_MESA3D_DEMOS=y + BR2_PACKAGE_MESA3D=y + BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y + BR2_PACKAGE_MESA3D_OPENGL_GLX=y + BR2_PACKAGE_XORG7=y + BR2_PACKAGE_XSERVER_XORG_SERVER=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + BR2_TARGET_ROOTFS_EXT2=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def wait_for_xserver(self): + # xserver takes some time to start up + # The test case fail here if for some reason xserver is not properly installed + _, _ = self.emulator.run('while [ ! -e /var/run/xorg.pid ]; do sleep 1; done', 120) + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.ext2") + kern = os.path.join(self.builddir, "images", "bzImage") + # glxinfo overallocate memory and the minimum that seemed to work was 512MB + self.emulator.boot(arch="i386", + kernel=kern, + kernel_cmdline=["root=/dev/vda console=ttyS0"], + options=["-M", "pc", "-m", "512", "-drive", "file={},if=virtio,format=raw".format(img)]) + self.emulator.login() + + def test_run(self): + self.login() + self.wait_for_xserver() + + # The test case verifies that the xserver with GLX is working + cmd = "glxinfo -B -display :0" + output, exit_code = self.emulator.run(cmd, GLXINFO_TIMEOUT) + self.assertEqual(exit_code, 0) + for line in output: + self.assertNotIn("Error", line) + # Error case: "Error: couldn't find RGB GLX visual or fbconfig" diff --git a/support/testing/tests/package/test_gst1_python.py b/support/testing/tests/package/test_gst1_python.py new file mode 100644 index 00000000..caae3e6b --- /dev/null +++ b/support/testing/tests/package/test_gst1_python.py @@ -0,0 +1,31 @@ +import os +from tests.package.test_python import TestPythonPackageBase + + +class TestGst1Python(TestPythonPackageBase): + __test__ = True + config = \ + """ + BR2_arm=y + BR2_cortex_a9=y + BR2_ARM_ENABLE_VFP=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM=y + BR2_PACKAGE_GSTREAMER1=y + BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC=y + BR2_PACKAGE_GST1_PLUGINS_BAD=y + BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS=y + BR2_PACKAGE_GST1_PYTHON=y + BR2_PACKAGE_PYTHON3=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def login(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv7", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + sample_scripts = ["tests/package/sample_gst1_python.py"] + timeout = 200 diff --git a/support/testing/tests/package/test_ipython.py b/support/testing/tests/package/test_ipython.py new file mode 100644 index 00000000..50b00da7 --- /dev/null +++ b/support/testing/tests/package/test_ipython.py @@ -0,0 +1,22 @@ +from tests.package.test_python import TestPythonBase +# +# The following pythong tests are not being used here: +# +# - version_test: IPython does not support --version option +# +# - zlib_test: IPython does not return a non-zero code the way CPython +# does, so this test ends up being a false-negative + + +class TestIPythonPy3(TestPythonBase): + config = TestPythonBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_IPYTHON=y + """ + interpreter = "ipython" + + def test_run(self): + self.login() + self.math_floor_test(40) + self.libc_time_test(40) diff --git a/support/testing/tests/package/test_libftdi1.py b/support/testing/tests/package/test_libftdi1.py new file mode 100644 index 00000000..78c92848 --- /dev/null +++ b/support/testing/tests/package/test_libftdi1.py @@ -0,0 +1,25 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Libftdi1(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_LIBFTDI1=y + BR2_PACKAGE_LIBFTDI1_PYTHON_BINDINGS=y + """ + sample_scripts = ["tests/package/sample_libftdi1.py"] + timeout = 40 + + +class TestPythonPy3Libftdi1(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_LIBFTDI1=y + BR2_PACKAGE_LIBFTDI1_PYTHON_BINDINGS=y + """ + sample_scripts = ["tests/package/sample_libftdi1.py"] + timeout = 40 diff --git a/support/testing/tests/package/test_lpeg.py b/support/testing/tests/package/test_lpeg.py new file mode 100644 index 00000000..4e1ee343 --- /dev/null +++ b/support/testing/tests/package/test_lpeg.py @@ -0,0 +1,27 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLPeg(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LPEG=y + """ + + def test_run(self): + self.login() + self.module_test("lpeg") + self.module_test("re") + + +class TestLuajitLPeg(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LPEG=y + """ + + def test_run(self): + self.login() + self.module_test("lpeg") + self.module_test("re") diff --git a/support/testing/tests/package/test_lsqlite3.py b/support/testing/tests/package/test_lsqlite3.py new file mode 100644 index 00000000..d8747746 --- /dev/null +++ b/support/testing/tests/package/test_lsqlite3.py @@ -0,0 +1,25 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLsqlite3(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LSQLITE3=y + """ + + def test_run(self): + self.login() + self.module_test("lsqlite3") + + +class TestLuajitLsqlite3(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LSQLITE3=y + """ + + def test_run(self): + self.login() + self.module_test("lsqlite3") diff --git a/support/testing/tests/package/test_lua.py b/support/testing/tests/package/test_lua.py new file mode 100644 index 00000000..66ae85c9 --- /dev/null +++ b/support/testing/tests/package/test_lua.py @@ -0,0 +1,59 @@ +import os + +import infra.basetest + + +class TestLuaBase(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def login(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + def version_test(self, version): + cmd = "lua -v" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertIn(version, output[0]) + + def g_version_test(self, expected): + cmd = "lua -e 'print(_G._VERSION)'" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertEqual(output[0], expected) + + def module_test(self, module, script="a=1"): + cmd = "lua -l {} -e '{}'".format(module, script) + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + +class TestLua(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + """ + + def test_run(self): + self.login() + self.version_test('Lua 5.3') + self.g_version_test('Lua 5.3') + + +class TestLuajit(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + """ + + def test_run(self): + self.login() + self.version_test('LuaJIT 2') + self.g_version_test('Lua 5.1') diff --git a/support/testing/tests/package/test_lua_cqueues.py b/support/testing/tests/package/test_lua_cqueues.py new file mode 100644 index 00000000..e823651c --- /dev/null +++ b/support/testing/tests/package/test_lua_cqueues.py @@ -0,0 +1,59 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaCqueues(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_CQUEUES=y + """ + + def test_run(self): + self.login() + self.module_test("_cqueues") + self.module_test("cqueues") + self.module_test("cqueues.auxlib") + self.module_test("cqueues.condition") + self.module_test("cqueues.dns") + self.module_test("cqueues.dns.config") + self.module_test("cqueues.dns.hints") + self.module_test("cqueues.dns.hosts") + self.module_test("cqueues.dns.packet") + self.module_test("cqueues.dns.record") + self.module_test("cqueues.dns.resolver") + self.module_test("cqueues.dns.resolvers") + self.module_test("cqueues.errno") + self.module_test("cqueues.notify") + self.module_test("cqueues.promise") + self.module_test("cqueues.signal") + self.module_test("cqueues.socket") + self.module_test("cqueues.thread") + + +class TestLuajitLuaCqueues(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUA_CQUEUES=y + """ + + def test_run(self): + self.login() + self.module_test("_cqueues") + self.module_test("cqueues") + self.module_test("cqueues.auxlib") + self.module_test("cqueues.condition") + self.module_test("cqueues.dns") + self.module_test("cqueues.dns.config") + self.module_test("cqueues.dns.hints") + self.module_test("cqueues.dns.hosts") + self.module_test("cqueues.dns.packet") + self.module_test("cqueues.dns.record") + self.module_test("cqueues.dns.resolver") + self.module_test("cqueues.dns.resolvers") + self.module_test("cqueues.errno") + self.module_test("cqueues.notify") + self.module_test("cqueues.promise") + self.module_test("cqueues.signal") + self.module_test("cqueues.socket") + self.module_test("cqueues.thread") diff --git a/support/testing/tests/package/test_lua_curl.py b/support/testing/tests/package/test_lua_curl.py new file mode 100644 index 00000000..08130394 --- /dev/null +++ b/support/testing/tests/package/test_lua_curl.py @@ -0,0 +1,27 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuacURL(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_CURL=y + """ + + def test_run(self): + self.login() + self.module_test("cURL") + self.module_test("lcurl") + + +class TestLuajitLuacURL(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUA_CURL=y + """ + + def test_run(self): + self.login() + self.module_test("cURL") + self.module_test("lcurl") diff --git a/support/testing/tests/package/test_lua_gd.py b/support/testing/tests/package/test_lua_gd.py new file mode 100644 index 00000000..f79f2086 --- /dev/null +++ b/support/testing/tests/package/test_lua_gd.py @@ -0,0 +1,31 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaGD(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_GD=y + BR2_PACKAGE_FONTCONFIG=y + BR2_PACKAGE_JPEG=y + BR2_PACKAGE_LIBPNG=y + """ + + def test_run(self): + self.login() + self.module_test("gd") + + +class TestLuajitLuaGD(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUA_GD=y + BR2_PACKAGE_FONTCONFIG=y + BR2_PACKAGE_JPEG=y + BR2_PACKAGE_LIBPNG=y + """ + + def test_run(self): + self.login() + self.module_test("gd") diff --git a/support/testing/tests/package/test_lua_http.py b/support/testing/tests/package/test_lua_http.py new file mode 100644 index 00000000..ba6096a1 --- /dev/null +++ b/support/testing/tests/package/test_lua_http.py @@ -0,0 +1,37 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaHttp(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_HTTP=y + """ + + def test_run(self): + self.login() + self.module_test("http.version", script="local ver=require[[http.version]]; print(ver.name, ver.version)") + self.module_test("http.client") + self.module_test("http.cookie") + self.module_test("http.proxies") + self.module_test("http.server") + self.module_test("http.socks") + self.module_test("http.websocket") + + +class TestLuajitHttp(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUA_HTTP=y + """ + + def test_run(self): + self.login() + self.module_test("http.version", script="local ver=require[[http.version]]; print(ver.name, ver.version)") + self.module_test("http.client") + self.module_test("http.cookie") + self.module_test("http.proxies") + self.module_test("http.server") + self.module_test("http.socks") + self.module_test("http.websocket") diff --git a/support/testing/tests/package/test_lua_lyaml.py b/support/testing/tests/package/test_lua_lyaml.py new file mode 100644 index 00000000..ece3c675 --- /dev/null +++ b/support/testing/tests/package/test_lua_lyaml.py @@ -0,0 +1,27 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaLyaml(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_LYAML=y + """ + + def test_run(self): + self.login() + self.module_test("yaml") + self.module_test("lyaml") + + +class TestLuajitLuaLyaml(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUA_LYAML=y + """ + + def test_run(self): + self.login() + self.module_test("yaml") + self.module_test("lyaml") diff --git a/support/testing/tests/package/test_lua_sdl2.py b/support/testing/tests/package/test_lua_sdl2.py new file mode 100644 index 00000000..22c4087f --- /dev/null +++ b/support/testing/tests/package/test_lua_sdl2.py @@ -0,0 +1,41 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaSDL2(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_SDL2=y + BR2_PACKAGE_SDL2_IMAGE=y + BR2_PACKAGE_SDL2_MIXER=y + BR2_PACKAGE_SDL2_NET=y + BR2_PACKAGE_SDL2_TTF=y + """ + + def test_run(self): + self.login() + self.module_test("SDL") + self.module_test("SDL.image") + self.module_test("SDL.mixer") + self.module_test("SDL.net") + self.module_test("SDL.ttf") + + +class TestLuajitLuaSDL2(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUA_SDL2=y + BR2_PACKAGE_SDL2_IMAGE=y + BR2_PACKAGE_SDL2_MIXER=y + BR2_PACKAGE_SDL2_NET=y + BR2_PACKAGE_SDL2_TTF=y + """ + + def test_run(self): + self.login() + self.module_test("SDL") + self.module_test("SDL.image") + self.module_test("SDL.mixer") + self.module_test("SDL.net") + self.module_test("SDL.ttf") diff --git a/support/testing/tests/package/test_lua_utf8.py b/support/testing/tests/package/test_lua_utf8.py new file mode 100644 index 00000000..5946a439 --- /dev/null +++ b/support/testing/tests/package/test_lua_utf8.py @@ -0,0 +1,25 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaUtf8(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_UTF8=y + """ + + def test_run(self): + self.login() + self.module_test("lua-utf8") + + +class TestLuajitUtf8(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUA_UTF8=y + """ + + def test_run(self): + self.login() + self.module_test("lua-utf8") diff --git a/support/testing/tests/package/test_luaexpat.py b/support/testing/tests/package/test_luaexpat.py new file mode 100644 index 00000000..c71c3fad --- /dev/null +++ b/support/testing/tests/package/test_luaexpat.py @@ -0,0 +1,25 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaExpat(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUAEXPAT=y + """ + + def test_run(self): + self.login() + self.module_test("lxp") + + +class TestLuajitLuaExpat(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUAEXPAT=y + """ + + def test_run(self): + self.login() + self.module_test("lxp") diff --git a/support/testing/tests/package/test_luafilesystem.py b/support/testing/tests/package/test_luafilesystem.py new file mode 100644 index 00000000..a84c1f30 --- /dev/null +++ b/support/testing/tests/package/test_luafilesystem.py @@ -0,0 +1,25 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaFileSystem(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUAFILESYSTEM=y + """ + + def test_run(self): + self.login() + self.module_test("lfs") + + +class TestLuajitLuaFileSystem(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUAFILESYSTEM=y + """ + + def test_run(self): + self.login() + self.module_test("lfs") diff --git a/support/testing/tests/package/test_lualdap.py b/support/testing/tests/package/test_lualdap.py new file mode 100644 index 00000000..2ec0d582 --- /dev/null +++ b/support/testing/tests/package/test_lualdap.py @@ -0,0 +1,25 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaLdap(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUALDAP=y + """ + + def test_run(self): + self.login() + self.module_test("lualdap") + + +class TestLuajitLuaLdap(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUALDAP=y + """ + + def test_run(self): + self.login() + self.module_test("lualdap") diff --git a/support/testing/tests/package/test_luaossl.py b/support/testing/tests/package/test_luaossl.py new file mode 100644 index 00000000..f9f9ab4e --- /dev/null +++ b/support/testing/tests/package/test_luaossl.py @@ -0,0 +1,27 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaossl(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUAOSSL=y + """ + + def test_run(self): + self.login() + self.module_test("openssl") + self.module_test("_openssl") + + +class TestLuajitLuaossl(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUAOSSL=y + """ + + def test_run(self): + self.login() + self.module_test("openssl") + self.module_test("_openssl") diff --git a/support/testing/tests/package/test_luaposix.py b/support/testing/tests/package/test_luaposix.py new file mode 100644 index 00000000..2918ee61 --- /dev/null +++ b/support/testing/tests/package/test_luaposix.py @@ -0,0 +1,83 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaPosix(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUAPOSIX=y + """ + + def test_run(self): + self.login() + self.module_test("posix.version", "print(require[[posix.version]])") + self.module_test("posix.ctype") + self.module_test("posix.dirent") + self.module_test("posix.errno") + self.module_test("posix.fcntl") + self.module_test("posix.fnmatch") + self.module_test("posix.glob") + self.module_test("posix.grp") + self.module_test("posix.libgen") + self.module_test("posix.poll") + self.module_test("posix.pwd") + self.module_test("posix.sched") + self.module_test("posix.signal") + self.module_test("posix.stdio") + self.module_test("posix.stdlib") + self.module_test("posix.sys.msg") + self.module_test("posix.sys.resource") + self.module_test("posix.sys.socket") + self.module_test("posix.sys.stat") + self.module_test("posix.sys.statvfs") + self.module_test("posix.sys.time") + self.module_test("posix.sys.times") + self.module_test("posix.sys.utsname") + self.module_test("posix.sys.wait") + self.module_test("posix.syslog") + self.module_test("posix.termio") + self.module_test("posix.time") + self.module_test("posix.unistd") + self.module_test("posix.utime") + self.module_test("posix") + + +class TestLuajitLuaPosix(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUAPOSIX=y + """ + + def test_run(self): + self.login() + self.module_test("posix.version", "print(require[[posix.version]])") + self.module_test("posix.ctype") + self.module_test("posix.dirent") + self.module_test("posix.errno") + self.module_test("posix.fcntl") + self.module_test("posix.fnmatch") + self.module_test("posix.glob") + self.module_test("posix.grp") + self.module_test("posix.libgen") + self.module_test("posix.poll") + self.module_test("posix.pwd") + self.module_test("posix.sched") + self.module_test("posix.signal") + self.module_test("posix.stdio") + self.module_test("posix.stdlib") + self.module_test("posix.sys.msg") + self.module_test("posix.sys.resource") + self.module_test("posix.sys.socket") + self.module_test("posix.sys.stat") + self.module_test("posix.sys.statvfs") + self.module_test("posix.sys.time") + self.module_test("posix.sys.times") + self.module_test("posix.sys.utsname") + self.module_test("posix.sys.wait") + self.module_test("posix.syslog") + self.module_test("posix.termio") + self.module_test("posix.time") + self.module_test("posix.unistd") + self.module_test("posix.utime") + self.module_test("posix") diff --git a/support/testing/tests/package/test_luasec.py b/support/testing/tests/package/test_luasec.py new file mode 100644 index 00000000..f8732636 --- /dev/null +++ b/support/testing/tests/package/test_luasec.py @@ -0,0 +1,25 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaSec(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUASEC=y + """ + + def test_run(self): + self.login() + self.module_test("ssl") + + +class TestLuajitLuaSec(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUASEC=y + """ + + def test_run(self): + self.login() + self.module_test("ssl") diff --git a/support/testing/tests/package/test_luasocket.py b/support/testing/tests/package/test_luasocket.py new file mode 100644 index 00000000..3d21df1d --- /dev/null +++ b/support/testing/tests/package/test_luasocket.py @@ -0,0 +1,29 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaSocket(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUASOCKET=y + """ + + def test_run(self): + self.login() + self.module_test("ltn12") + self.module_test("mime") + self.module_test("socket") + + +class TestLuajitLuaSocket(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUASOCKET=y + """ + + def test_run(self): + self.login() + self.module_test("ltn12") + self.module_test("mime") + self.module_test("socket") diff --git a/support/testing/tests/package/test_luasyslog.py b/support/testing/tests/package/test_luasyslog.py new file mode 100644 index 00000000..158b95cb --- /dev/null +++ b/support/testing/tests/package/test_luasyslog.py @@ -0,0 +1,27 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuasyslog(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUASYSLOG=y + """ + + def test_run(self): + self.login() + self.module_test("lsyslog") + self.module_test("logging.syslog") + + +class TestLuajitLuasyslog(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUASYSLOG=y + """ + + def test_run(self): + self.login() + self.module_test("lsyslog") + self.module_test("logging.syslog") diff --git a/support/testing/tests/package/test_luvi.py b/support/testing/tests/package/test_luvi.py new file mode 100644 index 00000000..a85a6f4d --- /dev/null +++ b/support/testing/tests/package/test_luvi.py @@ -0,0 +1,36 @@ +import os + +import infra.basetest + + +class TestLuvi(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUVI=y + BR2_PACKAGE_OPENSSL=y + BR2_PACKAGE_PCRE=y + BR2_PACKAGE_ZLIB=y + """ + + def login(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv7", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + def version_test(self): + cmd = "luvi -v" + output, exit_code = self.emulator.run(cmd) + self.assertIn('luvi', output[0]) + self.assertIn('zlib', output[1]) + self.assertIn('rex', output[2]) + self.assertIn('libuv', output[3]) + self.assertIn('ssl', output[4]) + + def test_run(self): + self.login() + self.version_test() diff --git a/support/testing/tests/package/test_lxc.py b/support/testing/tests/package/test_lxc.py new file mode 100644 index 00000000..b32b7a20 --- /dev/null +++ b/support/testing/tests/package/test_lxc.py @@ -0,0 +1,58 @@ +import os + +import infra.basetest + + +class TestLxc(infra.basetest.BRTest): + config = \ + """ + BR2_arm=y + BR2_cortex_a9=y + BR2_ARM_ENABLE_VFP=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.79" + BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_DTS_SUPPORT=y + BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}" + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_INIT_SYSTEMD=y + BR2_PACKAGE_LXC=y + BR2_PACKAGE_TINI=y + BR2_PACKAGE_IPERF3=y + BR2_ROOTFS_OVERLAY="{}" + BR2_TARGET_ROOTFS_CPIO=y + """.format( + infra.filepath("tests/package/test_lxc/lxc-kernel.config"), + infra.filepath("tests/package/test_lxc/rootfs-overlay")) + + def run_ok(self, cmd): + self.assertRunOk(cmd, 120) + + def wait_boot(self): + # the complete boot with systemd takes more time than what the default multipler permits + self.emulator.timeout_multiplier *= 10 + self.emulator.login() + + def setup_run_test_container(self): + self.run_ok("lxc-create -n lxc_iperf3 -t none -f /usr/share/lxc/config/minimal-iperf3.conf") + self.run_ok("lxc-start -l trace -n lxc_iperf3 -o /tmp/lxc.log -L /tmp/lxc.console.log") + # need to wait for the container to be fully started + self.run_ok("sleep 2") + self.run_ok("iperf3 -c 192.168.1.2 -t 2") + # if the test fails, just cat /tmp/*.log + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + kernel_file = os.path.join(self.builddir, "images", "zImage") + dtb_file = os.path.join(self.builddir, "images", "vexpress-v2p-ca9.dtb") + self.emulator.boot(arch="armv7", kernel=kernel_file, + kernel_cmdline=[ + "console=ttyAMA0,115200"], + options=["-initrd", cpio_file, + "-dtb", dtb_file, + "-M", "vexpress-a9"]) + self.wait_boot() + self.setup_run_test_container() diff --git a/support/testing/tests/package/test_lxc/lxc-kernel.config b/support/testing/tests/package/test_lxc/lxc-kernel.config new file mode 100644 index 00000000..32f8bdd6 --- /dev/null +++ b/support/testing/tests/package/test_lxc/lxc-kernel.config @@ -0,0 +1,20 @@ +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_BLK_CGROUP=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_DEBUG=y +CONFIG_NETFILTER_XT_MATCH_CGROUP=y +CONFIG_SOCK_CGROUP_DATA=y +CONFIG_CGROUP_NET_PRIO=y +CONFIG_CGROUP_NET_CLASSID=y +CONFIG_NAMESPACES=y +CONFIG_IPC_NS=y +CONFIG_PID_NS=y +CONFIG_UTS_NS=y +CONFIG_USER_NS=y +CONFIG_NET_NS=y +CONFIG_BRIDGE=y +CONFIG_VETH=y diff --git a/support/testing/tests/package/test_lxc/rootfs-overlay/usr/bin/iperf3.sh b/support/testing/tests/package/test_lxc/rootfs-overlay/usr/bin/iperf3.sh new file mode 100755 index 00000000..7045ca48 --- /dev/null +++ b/support/testing/tests/package/test_lxc/rootfs-overlay/usr/bin/iperf3.sh @@ -0,0 +1,2 @@ +#!/bin/sh +iperf3 -s -1 > /tmp/iperf3.serv.log 2>&1 diff --git a/support/testing/tests/package/test_lxc/rootfs-overlay/usr/share/lxc/config/minimal-iperf3.conf b/support/testing/tests/package/test_lxc/rootfs-overlay/usr/share/lxc/config/minimal-iperf3.conf new file mode 100644 index 00000000..41cc5311 --- /dev/null +++ b/support/testing/tests/package/test_lxc/rootfs-overlay/usr/share/lxc/config/minimal-iperf3.conf @@ -0,0 +1,4 @@ +lxc.include = /usr/share/lxc/config/minimal.conf +lxc.hook.version = 1 +lxc.hook.start-host = ip a add 192.168.1.1/24 dev lxc0 +lxc.init.cmd = tini -g iperf3.sh diff --git a/support/testing/tests/package/test_lxc/rootfs-overlay/usr/share/lxc/config/minimal.conf b/support/testing/tests/package/test_lxc/rootfs-overlay/usr/share/lxc/config/minimal.conf new file mode 100644 index 00000000..73198215 --- /dev/null +++ b/support/testing/tests/package/test_lxc/rootfs-overlay/usr/share/lxc/config/minimal.conf @@ -0,0 +1,6 @@ +lxc.autodev = 0 +lxc.net.0.type = veth +lxc.net.0.veth.pair = lxc0 +lxc.net.0.name = eth0 +lxc.net.0.flags = up +lxc.net.0.ipv4.address = 192.168.1.2/24 diff --git a/support/testing/tests/package/test_lzlib.py b/support/testing/tests/package/test_lzlib.py new file mode 100644 index 00000000..84e76791 --- /dev/null +++ b/support/testing/tests/package/test_lzlib.py @@ -0,0 +1,14 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLzlib(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LZLIB=y + """ + + def test_run(self): + self.login() + self.module_test("zlib") + self.module_test("gzip") diff --git a/support/testing/tests/package/test_netdata.py b/support/testing/tests/package/test_netdata.py new file mode 100644 index 00000000..7418b762 --- /dev/null +++ b/support/testing/tests/package/test_netdata.py @@ -0,0 +1,23 @@ +import os + +import infra.basetest + + +class TestNetdata(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_PACKAGE_NETDATA=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + cmd = "wget localhost:19999 -O - | grep 'netdata dashboard'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/package/test_openjdk.py b/support/testing/tests/package/test_openjdk.py new file mode 100644 index 00000000..26b7f9ee --- /dev/null +++ b/support/testing/tests/package/test_openjdk.py @@ -0,0 +1,48 @@ +import os + +import infra.basetest + + +class TestOpenJdk(infra.basetest.BRTest): + br2_external = [infra.filepath("tests/package/br2-external/openjdk")] + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.34" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" + BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + BR2_TARGET_ROOTFS_CPIO=y + BR2_TARGET_ROOTFS_CPIO_GZIP=y + BR2_PACKAGE_XORG7=y + BR2_PACKAGE_OPENJDK=y + BR2_PACKAGE_OPENJDK_HELLO_WORLD=y + BR2_PACKAGE_OPENJDK_JNI_TEST=y + """ + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio.gz") + kern = os.path.join(self.builddir, "images", "Image") + self.emulator.boot(arch="aarch64", + kernel=kern, + kernel_cmdline=["console=ttyAMA0"], + options=["-M", "virt", "-cpu", "cortex-a57", "-m", "512M", "-initrd", img]) + self.emulator.login() + + def test_run(self): + self.login() + + cmd = "java -cp /usr/bin HelloWorld" + output, exit_code = self.emulator.run(cmd, 120) + print(output) + self.assertEqual(exit_code, 0) + self.assertEqual(output, ["Hello, World"]) + + cmd = "java -cp /usr/bin JniTest" + output, exit_code = self.emulator.run(cmd, 120) + print(output) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/package/test_openssh.py b/support/testing/tests/package/test_openssh.py new file mode 100644 index 00000000..2ae5030d --- /dev/null +++ b/support/testing/tests/package/test_openssh.py @@ -0,0 +1,60 @@ +import os + +import infra.basetest + + +class TestOpensshBase(infra.basetest.BRTest): + passwd = "testpwd" + opensshconfig = \ + """ + BR2_TARGET_GENERIC_ROOT_PASSWD="{}" + BR2_PACKAGE_OPENSSH=y + BR2_PACKAGE_SSHPASS=y + BR2_ROOTFS_POST_BUILD_SCRIPT="{}" + # BR2_TARGET_ROOTFS_TAR is not set + """.format( + passwd, + infra.filepath("tests/package/test_openssh/post-build.sh")) + + def openssh_test(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", img, + "-net", "none"]) + self.emulator.login(self.passwd) + + cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:22" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "sshpass -p {} ssh -oStrictHostKeyChecking=no localhost /bin/true".format(self.passwd) + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + +class TestOpenSshuClibc(TestOpensshBase): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + TestOpensshBase.opensshconfig + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + """ + + def test_run(self): + self.openssh_test() + + +class TestOpenSshGlibc(TestOpensshBase): + config = \ + TestOpensshBase.opensshconfig + \ + """ + BR2_arm=y + BR2_TOOLCHAIN_BUILDROOT_GLIBC=y + BR2_KERNEL_HEADERS_4_19=y + BR2_TOOLCHAIN_BUILDROOT_CXX=y + BR2_PACKAGE_RNG_TOOLS=y + BR2_TARGET_ROOTFS_CPIO=y + """ + + def test_run(self): + self.openssh_test() diff --git a/support/testing/tests/package/test_openssh/post-build.sh b/support/testing/tests/package/test_openssh/post-build.sh new file mode 100755 index 00000000..5a81ede5 --- /dev/null +++ b/support/testing/tests/package/test_openssh/post-build.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +cat <<_EOF_ >>"${TARGET_DIR}/etc/ssh/sshd_config" +PermitRootLogin yes +PasswordAuthentication yes +_EOF_ diff --git a/support/testing/tests/package/test_opkg.py b/support/testing/tests/package/test_opkg.py new file mode 100644 index 00000000..aa937082 --- /dev/null +++ b/support/testing/tests/package/test_opkg.py @@ -0,0 +1,65 @@ +import os + +import infra.basetest + + +class TestOpkg(infra.basetest.BRTest): + # The snmpd service is used as an example for this test of a set of files + # that can be archived up and deployed/removed to test opkg + # + # The post build script uses an ipk-build template and assembles the test + # package. + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_PACKAGE_NETSNMP=y + # BR2_PACKAGE_NETSNMP_CLIENTS is not set + # BR2_PACKAGE_NETSNMP_ENABLE_MIBS is not set + BR2_PACKAGE_OPKG=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_PACKAGE_HOST_OPKG_UTILS=y + BR2_ROOTFS_POST_BUILD_SCRIPT="{}" + """.format(infra.filepath("tests/package/test_opkg/post-build.sh")) + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + # This test sequence tests the install and removal of a running + # service and configuration files. It also exercises the postinst + # and prerm scripting provided in the package archive. + + cmd = "opkg install example-snmpd-package_1.0_arm.ipk" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "opkg list-installed | grep example-snmpd-package" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + # Check that postinst script ran to start the services + cmd = "ps aux | grep [s]nmpd" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + # If successful, the prerm script ran to stop the service prior to + # the removal of the service scripting and files + cmd = "opkg remove example-snmpd-package" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + # Verify after package removal that the services is not + # running, but let's give it some time to really stop + # (otherwise a [snmpd] process might show up in the ps output) + cmd = "sleep 1 && ps aux | grep [s]nmpd" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 1) + + # This folder for configs is provided by the package install and + # should no longer be present after package removal + cmd = "ls /etc/snmp" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 1) diff --git a/support/testing/tests/package/test_opkg/post-build.sh b/support/testing/tests/package/test_opkg/post-build.sh new file mode 100755 index 00000000..1a6981b5 --- /dev/null +++ b/support/testing/tests/package/test_opkg/post-build.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +IPK_BUILD=${BUILD_DIR}/ipk-build + +# Pull the files for the snmpd service out of the target to create a install archive +# and setup a basic configuration so that the startup script works. +mkdir -p ${IPK_BUILD}/CONTROL \ + ${IPK_BUILD}/etc/init.d/ \ + ${IPK_BUILD}/usr/sbin \ + ${IPK_BUILD}/etc/snmp \ + ${IPK_BUILD}/etc/default +mv -f ${TARGET_DIR}/etc/init.d/S59snmpd ${IPK_BUILD}/etc/init.d/ +mv -f ${TARGET_DIR}/usr/sbin/snmpd ${IPK_BUILD}/usr/sbin/ +echo "agentuser nobody" > ${IPK_BUILD}/etc/snmp/snmpd.conf +echo "SNMPDRUN=yes" > ${IPK_BUILD}/etc/default/snmpd + +# build the control file +cat <${IPK_BUILD}/CONTROL/control +Package: example-snmpd-package +Version: 1.0 +Architecture: arm +Maintainer: user@domain.tld +Section: extras +Priority: optional +Source: http://example.com +Description: This is an example IPK package for installing snmpd +EOM + +# preinst script is not created to run before the install for this test example + +# postinst script is ran after install completes to start the services +cat <${IPK_BUILD}/CONTROL/postinst +#!/bin/sh +/etc/init.d/S59snmpd start +EOM +chmod +x ${IPK_BUILD}/CONTROL/postinst + +# prerm script is ran before removal so that the services isn't in use +cat <${IPK_BUILD}/CONTROL/prerm +#!/bin/sh +/etc/init.d/S59snmpd stop +EOM +chmod +x ${IPK_BUILD}/CONTROL/prerm + +# build the archive from template and pkg files +${HOST_DIR}/bin/opkg-build -Z gzip ${IPK_BUILD} ${TARGET_DIR}/root/ +rm -fr ${IPK_BUILD} diff --git a/support/testing/tests/package/test_perl.py b/support/testing/tests/package/test_perl.py new file mode 100644 index 00000000..37e7390a --- /dev/null +++ b/support/testing/tests/package/test_perl.py @@ -0,0 +1,66 @@ +import os + +import infra.basetest + + +class TestPerlBase(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def login(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + def module_test(self, module, script="1"): + cmd = "perl -M{} -e '{}'".format(module, script) + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + +class TestPerl(TestPerlBase): + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + """ + + def version_test(self): + cmd = "perl -v" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertIn("This is perl 5", output[1]) + + def core_modules_test(self): + self.module_test("Cwd") + self.module_test("Data::Dumper") + self.module_test("Devel::Peek") + self.module_test("Digest::MD5") + self.module_test("Digest::SHA") + self.module_test("Encode") + self.module_test("Fcntl") + self.module_test("File::Glob") + self.module_test("Hash::Util") + self.module_test("I18N::Langinfo") + self.module_test("IO::Handle") + self.module_test("IPC::SysV") + self.module_test("List::Util") + self.module_test("MIME::Base64") + self.module_test("POSIX") + self.module_test("Socket") + self.module_test("Storable") + self.module_test("Sys::Hostname") + self.module_test("Sys::Syslog") + self.module_test("Time::HiRes") + self.module_test("Time::Piece") + self.module_test("Unicode::Collate") + self.module_test("Unicode::Normalize") + + def test_run(self): + self.login() + self.version_test() + self.core_modules_test() diff --git a/support/testing/tests/package/test_perl_class_load.py b/support/testing/tests/package/test_perl_class_load.py new file mode 100644 index 00000000..04229700 --- /dev/null +++ b/support/testing/tests/package/test_perl_class_load.py @@ -0,0 +1,29 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlClassLoad(TestPerlBase): + """ + package: + Class-Load + direct dependencies: + Data-OptList + Module-Implementation + Module-Runtime + Package-Stash + Try-Tiny + indirect dependencies: + Dist-CheckConflicts + Params-Util XS + Sub-Install + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_CLASS_LOAD=y + """ + + def test_run(self): + self.login() + self.module_test("Params::Util") + self.module_test("Class::Load") diff --git a/support/testing/tests/package/test_perl_dbd_mysql.py b/support/testing/tests/package/test_perl_dbd_mysql.py new file mode 100644 index 00000000..f8fe832b --- /dev/null +++ b/support/testing/tests/package/test_perl_dbd_mysql.py @@ -0,0 +1,21 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlDBDmysql(TestPerlBase): + """ + package: + DBD-mysql XS + direct dependencies: + DBI XS + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_DBD_MYSQL=y + """ + + def test_run(self): + self.login() + self.module_test("DBI") + self.module_test("DBD::mysql") diff --git a/support/testing/tests/package/test_perl_encode_detect.py b/support/testing/tests/package/test_perl_encode_detect.py new file mode 100644 index 00000000..4b33fee0 --- /dev/null +++ b/support/testing/tests/package/test_perl_encode_detect.py @@ -0,0 +1,20 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlEncodeDetect(TestPerlBase): + """ + package: + Encode-Detect XS + direct dependencies: + Module-Build + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_ENCODE_DETECT=y + """ + + def test_run(self): + self.login() + self.module_test("Encode::Detect") diff --git a/support/testing/tests/package/test_perl_gdgraph.py b/support/testing/tests/package/test_perl_gdgraph.py new file mode 100644 index 00000000..23ddbca4 --- /dev/null +++ b/support/testing/tests/package/test_perl_gdgraph.py @@ -0,0 +1,22 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlGDGraph(TestPerlBase): + """ + package: + GDGraph + direct dependencies: + GD XS + GDTextUtil + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_GDGRAPH=y + """ + + def test_run(self): + self.login() + self.module_test("GD") + self.module_test("GD::Graph") diff --git a/support/testing/tests/package/test_perl_html_parser.py b/support/testing/tests/package/test_perl_html_parser.py new file mode 100644 index 00000000..64316334 --- /dev/null +++ b/support/testing/tests/package/test_perl_html_parser.py @@ -0,0 +1,20 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlHTMLParser(TestPerlBase): + """ + package: + HTML-Parser XS + direct dependencies: + HTML-Tagset + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_HTML_PARSER=y + """ + + def test_run(self): + self.login() + self.module_test("HTML::Parser") diff --git a/support/testing/tests/package/test_perl_io_socket_multicast.py b/support/testing/tests/package/test_perl_io_socket_multicast.py new file mode 100644 index 00000000..48a086a6 --- /dev/null +++ b/support/testing/tests/package/test_perl_io_socket_multicast.py @@ -0,0 +1,21 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlIOSocketMulticast(TestPerlBase): + """ + package: + IO-Socket-Multicast XS + direct dependencies: + IO-Interface XS + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_IO_SOCKET_MULTICAST=y + """ + + def test_run(self): + self.login() + self.module_test("IO::Interface") + self.module_test("IO::Socket::Multicast") diff --git a/support/testing/tests/package/test_perl_io_socket_ssl.py b/support/testing/tests/package/test_perl_io_socket_ssl.py new file mode 100644 index 00000000..51663e83 --- /dev/null +++ b/support/testing/tests/package/test_perl_io_socket_ssl.py @@ -0,0 +1,21 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlIOSocketSSL(TestPerlBase): + """ + package: + IO-Socket-SSL + direct dependencies: + Net-SSLeay XS + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_IO_SOCKET_SSL=y + """ + + def test_run(self): + self.login() + self.module_test("Net::SSLeay") + self.module_test("IO::Socket::SSL") diff --git a/support/testing/tests/package/test_perl_libwww_perl.py b/support/testing/tests/package/test_perl_libwww_perl.py new file mode 100644 index 00000000..7b30e4b9 --- /dev/null +++ b/support/testing/tests/package/test_perl_libwww_perl.py @@ -0,0 +1,42 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerllibwwwperl(TestPerlBase): + """ + package: + libwww-perl + direct dependencies: + Encode-Locale + File-Listing + HTML-Parser XS + HTTP-Cookies + HTTP-Daemon + HTTP-Date + HTTP-Message + HTTP-Negotiate + LWP-MediaTypes + Net-HTTP + Try-Tiny + URI + WWW-RobotRules + indirect dependencies: + HTML-Tagset + IO-HTML + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_LIBWWW_PERL=y + """ + + def test_run(self): + self.login() + self.module_test("LWP") + self.module_test("LWP::UserAgent") + self.module_test("LWP::Authen::Basic") + self.module_test("LWP::Authen::Digest") + self.module_test("HTML::Parser") + self.module_test("HTTP::Message") + self.module_test("HTTP::Daemon") + self.module_test("WWW::RobotRules") diff --git a/support/testing/tests/package/test_perl_lwp_protocol_https.py b/support/testing/tests/package/test_perl_lwp_protocol_https.py new file mode 100644 index 00000000..35437459 --- /dev/null +++ b/support/testing/tests/package/test_perl_lwp_protocol_https.py @@ -0,0 +1,42 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlLWPProtocolhttps(TestPerlBase): + """ + package: + LWP-Protocol-https + direct dependencies: + IO-Socket-SSL + Mozilla-CA + Net-HTTP + libwww-perl + indirect dependencies: + Encode-Locale + File-Listing + HTML-Parser XS + HTML-Tagset + HTTP-Cookies + HTTP-Daemon + HTTP-Date + HTTP-Message + HTTP-Negotiate + IO-HTML + LWP-MediaTypes + Net-SSLeay XS + TimeDate + Try-Tiny + URI + WWW-RobotRules + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_LWP_PROTOCOL_HTTPS=y + """ + + def test_run(self): + self.login() + self.module_test("HTML::Parser") + self.module_test("Net::SSLeay") + self.module_test("LWP::Protocol::https") diff --git a/support/testing/tests/package/test_perl_mail_dkim.py b/support/testing/tests/package/test_perl_mail_dkim.py new file mode 100644 index 00000000..cd9e7579 --- /dev/null +++ b/support/testing/tests/package/test_perl_mail_dkim.py @@ -0,0 +1,30 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlMailDKIM(TestPerlBase): + """ + package: + Mail-DKIM + direct dependencies: + Crypt-OpenSSL-RSA XS + MailTools + Net-DNS + Net-DNS-Resolver-Mock + YAML-LibYAML XS + indirect dependencies: + Crypt-OpenSSL-Random XS + Digest-HMAC + TimeDate + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_MAIL_DKIM=y + """ + + def test_run(self): + self.login() + self.module_test("Crypt::OpenSSL::Random") + self.module_test("Crypt::OpenSSL::RSA") + self.module_test("Mail::DKIM") diff --git a/support/testing/tests/package/test_perl_x10.py b/support/testing/tests/package/test_perl_x10.py new file mode 100644 index 00000000..b587804a --- /dev/null +++ b/support/testing/tests/package/test_perl_x10.py @@ -0,0 +1,23 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlX10(TestPerlBase): + """ + package: + X10 + direct dependencies: + Astro-SunTime + Device-SerialPort XS + Time-ParseDate + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_X10=y + """ + + def test_run(self): + self.login() + self.module_test("Device::SerialPort") + self.module_test("X10") diff --git a/support/testing/tests/package/test_perl_xml_libxml.py b/support/testing/tests/package/test_perl_xml_libxml.py new file mode 100644 index 00000000..faace5dd --- /dev/null +++ b/support/testing/tests/package/test_perl_xml_libxml.py @@ -0,0 +1,22 @@ +from tests.package.test_perl import TestPerlBase + + +class TestPerlXMLLibXML(TestPerlBase): + """ + package: + XML-LibXML XS + direct dependencies: + XML-NamespaceSupport + XML-SAX + XML-SAX-Base + """ + + config = TestPerlBase.config + \ + """ + BR2_PACKAGE_PERL=y + BR2_PACKAGE_PERL_XML_LIBXML=y + """ + + def test_run(self): + self.login() + self.module_test("XML::LibXML") diff --git a/support/testing/tests/package/test_prosody.py b/support/testing/tests/package/test_prosody.py new file mode 100644 index 00000000..8ef8ff95 --- /dev/null +++ b/support/testing/tests/package/test_prosody.py @@ -0,0 +1,48 @@ +from tests.package.test_lua import TestLuaBase + + +class TestProsody(TestLuaBase): + def lua_dependencies_test(self): + self.module_test('bit') # luabitop + self.module_test('lfs') # luafilesystem + self.module_test('lxp') # luaexpat + self.module_test('socket') # luasocket + self.module_test('ssl') # luasec + + def prosody_test(self): + # prosody was launched as service + cmd = "prosodyctl status" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertIn("Prosody is running", output[0]) + + +class TestProsodyLua51(TestProsody): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_5_1=y + BR2_PACKAGE_PROSODY=y + """ + + def test_run(self): + self.login() + self.version_test('Lua 5.1') + self.g_version_test('Lua 5.1') + self.lua_dependencies_test() + self.prosody_test() + + +class TestProsodyLuajit(TestProsody): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_PROSODY=y + """ + + def test_run(self): + self.login() + self.version_test('LuaJIT 2') + self.g_version_test('Lua 5.1') + self.lua_dependencies_test() + self.prosody_test() diff --git a/support/testing/tests/package/test_python.py b/support/testing/tests/package/test_python.py new file mode 100644 index 00000000..bcd363ad --- /dev/null +++ b/support/testing/tests/package/test_python.py @@ -0,0 +1,125 @@ +import os + +import infra.basetest + + +class TestPythonBase(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + interpreter = "python" + + def login(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + def version_test(self, version, timeout=-1): + cmd = self.interpreter + " --version 2>&1 | grep '^{}'".format(version) + _, exit_code = self.emulator.run(cmd, timeout) + self.assertEqual(exit_code, 0) + + def math_floor_test(self, timeout=-1): + cmd = self.interpreter + " -c 'import math; math.floor(12.3)'" + _, exit_code = self.emulator.run(cmd, timeout) + self.assertEqual(exit_code, 0) + + def libc_time_test(self, timeout=-1): + cmd = self.interpreter + " -c 'from __future__ import print_function;" + cmd += "import ctypes;" + cmd += "libc = ctypes.cdll.LoadLibrary(\"libc.so.1\");" + cmd += "print(libc.time(None))'" + _, exit_code = self.emulator.run(cmd, timeout) + self.assertEqual(exit_code, 0) + + def zlib_test(self, timeout=-1): + cmd = self.interpreter + " -c 'import zlib'" + _, exit_code = self.emulator.run(cmd, timeout) + self.assertEqual(exit_code, 1) + + +class TestPython2(TestPythonBase): + config = TestPythonBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + """ + + def test_run(self): + self.login() + self.version_test("Python 2") + self.math_floor_test() + self.libc_time_test() + self.zlib_test() + + +class TestPython3(TestPythonBase): + config = TestPythonBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + """ + + def test_run(self): + self.login() + self.version_test("Python 3") + self.math_floor_test() + self.libc_time_test() + self.zlib_test() + + +class TestPythonPackageBase(TestPythonBase): + """Common class to test a python package. + + Build an image containing the scripts listed in sample_scripts, start the + emulator, login to it and for each sample script in the image run the python + interpreter passing the name of the script and check the status code is 0. + + Each test case that inherits from this class must have: + __test__ = True - to let nose2 know that it is a test case + config - defconfig fragment with the packages to run the test + It also can have: + sample_scripts - list of scripts to add to the image and run on the target + timeout - timeout to the script to run when the default from the + test infra is not enough + When custom commands need be issued on the target the method + run_sample_scripts can be overridden. + """ + + __test__ = False + config_sample_scripts = \ + """ + BR2_ROOTFS_POST_BUILD_SCRIPT="{}" + BR2_ROOTFS_POST_SCRIPT_ARGS="{}" + """.format(infra.filepath("tests/package/copy-sample-script-to-target.sh"), + "{sample_scripts}") + sample_scripts = None + timeout = -1 + + def __init__(self, names): + """Add the scripts to the target in build time.""" + super(TestPythonPackageBase, self).__init__(names) + if self.sample_scripts: + scripts = [infra.filepath(s) for s in self.sample_scripts] + self.config += self.config_sample_scripts.format(sample_scripts=" ".join(scripts)) + + def check_sample_scripts_exist(self): + """Check the scripts were really added to the image.""" + scripts = [os.path.basename(s) for s in self.sample_scripts] + cmd = "md5sum " + " ".join(scripts) + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + def run_sample_scripts(self): + """Run each script previously added to the image.""" + for script in self.sample_scripts: + cmd = self.interpreter + " " + os.path.basename(script) + _, exit_code = self.emulator.run(cmd, timeout=self.timeout) + self.assertEqual(exit_code, 0) + + def test_run(self): + self.login() + self.check_sample_scripts_exist() + self.run_sample_scripts() diff --git a/support/testing/tests/package/test_python_argh.py b/support/testing/tests/package/test_python_argh.py new file mode 100644 index 00000000..de4b4cbe --- /dev/null +++ b/support/testing/tests/package/test_python_argh.py @@ -0,0 +1,45 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonArgh(TestPythonPackageBase): + config = TestPythonPackageBase.config + sample_scripts = ["tests/package/sample_python_argh.py"] + + def run_sample_scripts(self): + cmd = self.interpreter + " sample_python_argh.py -h" + output, exit_code = self.emulator.run(cmd) + self.assertIn("usage:", output[0]) + self.assertEqual(exit_code, 0) + + cmd = self.interpreter + " sample_python_argh.py 123" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(output[0], "123, False") + self.assertEqual(exit_code, 0) + + cmd = self.interpreter + " sample_python_argh.py --bar 456" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(output[0], "456, True") + self.assertEqual(exit_code, 0) + + cmd = self.interpreter + " sample_python_argh.py" + output, exit_code = self.emulator.run(cmd) + self.assertIn("usage:", output[0]) + self.assertEqual(exit_code, 2) + + +class TestPythonPy2Argh(TestPythonArgh): + __test__ = True + config = TestPythonArgh.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_ARGH=y + """ + + +class TestPythonPy3Argh(TestPythonArgh): + __test__ = True + config = TestPythonArgh.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_ARGH=y + """ diff --git a/support/testing/tests/package/test_python_attrs.py b/support/testing/tests/package/test_python_attrs.py new file mode 100644 index 00000000..9f597034 --- /dev/null +++ b/support/testing/tests/package/test_python_attrs.py @@ -0,0 +1,21 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Attrs(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_ATTRS=y + """ + sample_scripts = ["tests/package/sample_python_attrs.py"] + + +class TestPythonPy3Attrs(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_ATTRS=y + """ + sample_scripts = ["tests/package/sample_python_attrs.py"] diff --git a/support/testing/tests/package/test_python_autobahn.py b/support/testing/tests/package/test_python_autobahn.py new file mode 100644 index 00000000..a237ce46 --- /dev/null +++ b/support/testing/tests/package/test_python_autobahn.py @@ -0,0 +1,11 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Autobahn(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_AUTOBAHN=y + """ + sample_scripts = ["tests/package/sample_python_autobahn.py"] diff --git a/support/testing/tests/package/test_python_automat.py b/support/testing/tests/package/test_python_automat.py new file mode 100644 index 00000000..00a7ed65 --- /dev/null +++ b/support/testing/tests/package/test_python_automat.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Automat(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_AUTOMAT=y + """ + sample_scripts = ["tests/package/sample_python_automat.py"] + timeout = 30 + + +class TestPythonPy3Automat(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_AUTOMAT=y + """ + sample_scripts = ["tests/package/sample_python_automat.py"] + timeout = 30 diff --git a/support/testing/tests/package/test_python_avro.py b/support/testing/tests/package/test_python_avro.py new file mode 100644 index 00000000..6eee2760 --- /dev/null +++ b/support/testing/tests/package/test_python_avro.py @@ -0,0 +1,11 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonAvro(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_AVRO=y + """ + sample_scripts = ["tests/package/sample_python_avro.py"] diff --git a/support/testing/tests/package/test_python_bitstring.py b/support/testing/tests/package/test_python_bitstring.py new file mode 100644 index 00000000..63b3fdb6 --- /dev/null +++ b/support/testing/tests/package/test_python_bitstring.py @@ -0,0 +1,21 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Bitstring(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_BITSTRING=y + """ + sample_scripts = ["tests/package/sample_python_bitstring.py"] + + +class TestPythonPy3Bitstring(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_BITSTRING=y + """ + sample_scripts = ["tests/package/sample_python_bitstring.py"] diff --git a/support/testing/tests/package/test_python_can.py b/support/testing/tests/package/test_python_can.py new file mode 100644 index 00000000..d509d05d --- /dev/null +++ b/support/testing/tests/package/test_python_can.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Can(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_CAN=y + """ + sample_scripts = ["tests/package/sample_python_can.py"] + timeout = 40 + + +class TestPythonPy3Can(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_CAN=y + """ + sample_scripts = ["tests/package/sample_python_can.py"] + timeout = 40 diff --git a/support/testing/tests/package/test_python_cbor.py b/support/testing/tests/package/test_python_cbor.py new file mode 100644 index 00000000..9da35037 --- /dev/null +++ b/support/testing/tests/package/test_python_cbor.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Cbor(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_CBOR=y + """ + sample_scripts = ["tests/package/sample_python_cbor_enc.py", + "tests/package/sample_python_cbor_dec.py"] + + +class TestPythonPy3Cbor(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_CBOR=y + """ + sample_scripts = ["tests/package/sample_python_cbor_enc.py", + "tests/package/sample_python_cbor_dec.py"] diff --git a/support/testing/tests/package/test_python_click.py b/support/testing/tests/package/test_python_click.py new file mode 100644 index 00000000..db57d3aa --- /dev/null +++ b/support/testing/tests/package/test_python_click.py @@ -0,0 +1,44 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonClick(TestPythonPackageBase): + sample_scripts = ["tests/package/sample_python_click.py"] + + def run_sample_scripts(self): + cmd = self.interpreter + " sample_python_click.py --help" + output, exit_code = self.emulator.run(cmd) + self.assertIn("Usage:", output[0]) + self.assertEqual(exit_code, 0) + + cmd = self.interpreter + " sample_python_click.py 123" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(output[0], "123, False") + self.assertEqual(exit_code, 0) + + cmd = self.interpreter + " sample_python_click.py --bar 456" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(output[0], "456, True") + self.assertEqual(exit_code, 0) + + cmd = self.interpreter + " sample_python_click.py" + output, exit_code = self.emulator.run(cmd) + self.assertIn("Usage:", output[0]) + self.assertEqual(exit_code, 2) + + +class TestPythonPy2Click(TestPythonClick): + __test__ = True + config = TestPythonClick.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_CLICK=y + """ + + +class TestPythonPy3Click(TestPythonClick): + __test__ = True + config = TestPythonClick.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_CLICK=y + """ diff --git a/support/testing/tests/package/test_python_colorzero.py b/support/testing/tests/package/test_python_colorzero.py new file mode 100644 index 00000000..b7c228ac --- /dev/null +++ b/support/testing/tests/package/test_python_colorzero.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Colorzero(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_COLORZERO=y + """ + sample_scripts = ["tests/package/sample_python_colorzero.py"] + timeout = 30 + + +class TestPythonPy3Colorzero(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_COLORZERO=y + """ + sample_scripts = ["tests/package/sample_python_colorzero.py"] + timeout = 30 diff --git a/support/testing/tests/package/test_python_constantly.py b/support/testing/tests/package/test_python_constantly.py new file mode 100644 index 00000000..5be01c4f --- /dev/null +++ b/support/testing/tests/package/test_python_constantly.py @@ -0,0 +1,21 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Constantly(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_CONSTANTLY=y + """ + sample_scripts = ["tests/package/sample_python_constantly.py"] + + +class TestPythonPy3Constantly(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_CONSTANTLY=y + """ + sample_scripts = ["tests/package/sample_python_constantly.py"] diff --git a/support/testing/tests/package/test_python_crossbar.py b/support/testing/tests/package/test_python_crossbar.py new file mode 100644 index 00000000..d7843ddd --- /dev/null +++ b/support/testing/tests/package/test_python_crossbar.py @@ -0,0 +1,12 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Crossbar(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_CROSSBAR=y + """ + sample_scripts = ["tests/package/sample_python_crossbar.py"] + timeout = 60 diff --git a/support/testing/tests/package/test_python_cryptography.py b/support/testing/tests/package/test_python_cryptography.py new file mode 100644 index 00000000..14515fcd --- /dev/null +++ b/support/testing/tests/package/test_python_cryptography.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Cryptography(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y + """ + sample_scripts = ["tests/package/sample_python_cryptography.py"] + timeout = 40 + + +class TestPythonPy3Cryptography(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y + """ + sample_scripts = ["tests/package/sample_python_cryptography.py"] + timeout = 40 diff --git a/support/testing/tests/package/test_python_django.py b/support/testing/tests/package/test_python_django.py new file mode 100644 index 00000000..0b7d35bb --- /dev/null +++ b/support/testing/tests/package/test_python_django.py @@ -0,0 +1,35 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonDjango(TestPythonPackageBase): + config = TestPythonPackageBase.config + sample_scripts = ["tests/package/sample_python_django.py"] + + def run_sample_scripts(self): + timeout = 35 * self.emulator.timeout_multiplier + + cmd = "cd /opt && /usr/bin/django-admin startproject testsite" + self.assertRunOk(cmd, timeout=timeout) + + cmd = "cd /opt/testsite && " + self.interpreter + " ./manage.py migrate" + output, exit_code = self.emulator.run(cmd, timeout=timeout) + self.assertIn("Operations to perform:", output[0]) + self.assertEqual(exit_code, 0) + + cmd = "cd /opt/testsite && " + self.interpreter + " ./manage.py runserver 0.0.0.0:1234 & " + # give some time to setup the server + cmd += "sleep {}".format(str(30 * self.emulator.timeout_multiplier)) + self.assertRunOk(cmd, timeout=timeout) + + cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:1234" + self.assertRunOk(cmd) + + +class TestPythonPy3Django(TestPythonDjango): + __test__ = True + config = TestPythonDjango.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_DJANGO=y + BR2_PACKAGE_PYTHON3_SQLITE=y + """ diff --git a/support/testing/tests/package/test_python_gitdb2.py b/support/testing/tests/package/test_python_gitdb2.py new file mode 100644 index 00000000..fc55f208 --- /dev/null +++ b/support/testing/tests/package/test_python_gitdb2.py @@ -0,0 +1,21 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Gitdb2(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_GITDB2=y + """ + sample_scripts = ["tests/package/sample_python_gitdb2.py"] + + +class TestPythonPy3Gitdb2(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_GITDB2=y + """ + sample_scripts = ["tests/package/sample_python_gitdb2.py"] diff --git a/support/testing/tests/package/test_python_gobject.py b/support/testing/tests/package/test_python_gobject.py new file mode 100644 index 00000000..cd8a4325 --- /dev/null +++ b/support/testing/tests/package/test_python_gobject.py @@ -0,0 +1,27 @@ +import os +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Gobject(TestPythonPackageBase): + __test__ = True + config = \ + """ + BR2_arm=y + BR2_ARM_ENABLE_VFP=y + BR2_cortex_a9=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_PACKAGE_GOBJECT_INTROSPECTION=y + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_GOBJECT=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv7", + kernel="builtin", + options=["-initrd", img]) + self.emulator.login() + + sample_scripts = ["tests/package/sample_python_gobject.py"] diff --git a/support/testing/tests/package/test_python_gpiozero.py b/support/testing/tests/package/test_python_gpiozero.py new file mode 100644 index 00000000..2498a555 --- /dev/null +++ b/support/testing/tests/package/test_python_gpiozero.py @@ -0,0 +1,32 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonGpiozero(TestPythonPackageBase): + config = TestPythonPackageBase.config + sample_scripts = ["tests/package/sample_python_gpiozero.py"] + + def run_sample_scripts(self): + cmd = self.interpreter + " sample_python_gpiozero.py" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "pinout -r a020d3 -m | cat" + self.assertRunOk(cmd) + + +class TestPythonPy2Gpiozero(TestPythonGpiozero): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_GPIOZERO=y + """ + + +class TestPythonPy3Gpiozero(TestPythonGpiozero): + __test__ = True + config = TestPythonGpiozero.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_GPIOZERO=y + """ diff --git a/support/testing/tests/package/test_python_incremental.py b/support/testing/tests/package/test_python_incremental.py new file mode 100644 index 00000000..49800d89 --- /dev/null +++ b/support/testing/tests/package/test_python_incremental.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Incremental(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_INCREMENTAL=y + """ + sample_scripts = ["tests/package/sample_python_incremental.py"] + timeout = 30 + + +class TestPythonPy3Incremental(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_INCREMENTAL=y + """ + sample_scripts = ["tests/package/sample_python_incremental.py"] + timeout = 30 diff --git a/support/testing/tests/package/test_python_passlib.py b/support/testing/tests/package/test_python_passlib.py new file mode 100644 index 00000000..7c85882b --- /dev/null +++ b/support/testing/tests/package/test_python_passlib.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Passlib(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_PASSLIB=y + """ + sample_scripts = ["tests/package/sample_python_passlib.py"] + timeout = 30 + + +class TestPythonPy3Passlib(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PASSLIB=y + """ + sample_scripts = ["tests/package/sample_python_passlib.py"] + timeout = 30 diff --git a/support/testing/tests/package/test_python_pexpect.py b/support/testing/tests/package/test_python_pexpect.py new file mode 100644 index 00000000..ba31cdbd --- /dev/null +++ b/support/testing/tests/package/test_python_pexpect.py @@ -0,0 +1,21 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Pexpect(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_PEXPECT=y + """ + sample_scripts = ["tests/package/sample_python_pexpect.py"] + + +class TestPythonPy3Pexpect(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PEXPECT=y + """ + sample_scripts = ["tests/package/sample_python_pexpect.py"] diff --git a/support/testing/tests/package/test_python_pynacl.py b/support/testing/tests/package/test_python_pynacl.py new file mode 100644 index 00000000..f4dd5494 --- /dev/null +++ b/support/testing/tests/package/test_python_pynacl.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Pynacl(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_PYNACL=y + """ + sample_scripts = ["tests/package/sample_python_pynacl.py"] + timeout = 10 + + +class TestPythonPy3Pynacl(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PYNACL=y + """ + sample_scripts = ["tests/package/sample_python_pynacl.py"] + timeout = 10 diff --git a/support/testing/tests/package/test_python_pytest.py b/support/testing/tests/package/test_python_pytest.py new file mode 100644 index 00000000..7fa7e440 --- /dev/null +++ b/support/testing/tests/package/test_python_pytest.py @@ -0,0 +1,19 @@ +import os + +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Pytest(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PYTEST=y + """ + sample_scripts = ["tests/package/sample_python_pytest.py"] + + def run_sample_scripts(self): + for script in self.sample_scripts: + cmd = self.interpreter + " -m pytest " + os.path.basename(script) + _, exit_code = self.emulator.run(cmd, timeout=self.timeout) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/package/test_python_pytest_asyncio.py b/support/testing/tests/package/test_python_pytest_asyncio.py new file mode 100644 index 00000000..caf034be --- /dev/null +++ b/support/testing/tests/package/test_python_pytest_asyncio.py @@ -0,0 +1,20 @@ +import os + +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3PytestAsyncio(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PYTEST=y + BR2_PACKAGE_PYTHON_PYTEST_ASYNCIO=y + """ + sample_scripts = ["tests/package/sample_python_pytest_asyncio.py"] + + def run_sample_scripts(self): + for script in self.sample_scripts: + cmd = self.interpreter + " -m pytest " + os.path.basename(script) + _, exit_code = self.emulator.run(cmd, timeout=self.timeout) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/package/test_python_pyyaml.py b/support/testing/tests/package/test_python_pyyaml.py new file mode 100644 index 00000000..cd45a57b --- /dev/null +++ b/support/testing/tests/package/test_python_pyyaml.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Pyyaml(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_PYYAML=y + """ + sample_scripts = ["tests/package/sample_python_pyyaml_enc.py", + "tests/package/sample_python_pyyaml_dec.py"] + + +class TestPythonPy3Pyyaml(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PYYAML=y + """ + sample_scripts = ["tests/package/sample_python_pyyaml_enc.py", + "tests/package/sample_python_pyyaml_dec.py"] diff --git a/support/testing/tests/package/test_python_rpi_gpio.py b/support/testing/tests/package/test_python_rpi_gpio.py new file mode 100644 index 00000000..c938ea39 --- /dev/null +++ b/support/testing/tests/package/test_python_rpi_gpio.py @@ -0,0 +1,11 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3RpiGpio(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_RPI_GPIO=y + """ + sample_scripts = ["tests/package/sample_python_rpi_gpio.py"] diff --git a/support/testing/tests/package/test_python_service_identity.py b/support/testing/tests/package/test_python_service_identity.py new file mode 100644 index 00000000..6aeb77de --- /dev/null +++ b/support/testing/tests/package/test_python_service_identity.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2ServiceIdentity(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_SERVICE_IDENTITY=y + """ + sample_scripts = ["tests/package/sample_python_service_identity.py"] + timeout = 30 + + +class TestPythonPy3ServiceIdentity(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_SERVICE_IDENTITY=y + """ + sample_scripts = ["tests/package/sample_python_service_identity.py"] + timeout = 30 diff --git a/support/testing/tests/package/test_python_smmap2.py b/support/testing/tests/package/test_python_smmap2.py new file mode 100644 index 00000000..07c0e662 --- /dev/null +++ b/support/testing/tests/package/test_python_smmap2.py @@ -0,0 +1,21 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Smmap2(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_SMMAP2=y + """ + sample_scripts = ["tests/package/sample_python_smmap2.py"] + + +class TestPythonPy3Smmap2(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_SMMAP2=y + """ + sample_scripts = ["tests/package/sample_python_smmap2.py"] diff --git a/support/testing/tests/package/test_python_subprocess32.py b/support/testing/tests/package/test_python_subprocess32.py new file mode 100644 index 00000000..d2878046 --- /dev/null +++ b/support/testing/tests/package/test_python_subprocess32.py @@ -0,0 +1,11 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Subprocess32(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_SUBPROCESS32=y + """ + sample_scripts = ["tests/package/sample_python_subprocess32.py"] diff --git a/support/testing/tests/package/test_python_treq.py b/support/testing/tests/package/test_python_treq.py new file mode 100644 index 00000000..e24ae845 --- /dev/null +++ b/support/testing/tests/package/test_python_treq.py @@ -0,0 +1,30 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonTreq(TestPythonPackageBase): + sample_scripts = ["tests/package/sample_python_treq.py"] + + def run_sample_scripts(self): + cmd = self.interpreter + " sample_python_treq.py" + output, exit_code = self.emulator.run(cmd, timeout=20) + refuse_msgs = [1 for l in output if "Connection refused" in l] + self.assertGreater(sum(refuse_msgs), 0) + self.assertEqual(exit_code, 0) + + +class TestPythonPy2Treq(TestPythonTreq): + __test__ = True + config = TestPythonTreq.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_TREQ=y + """ + + +class TestPythonPy3Treq(TestPythonTreq): + __test__ = True + config = TestPythonTreq.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_TREQ=y + """ diff --git a/support/testing/tests/package/test_python_twisted.py b/support/testing/tests/package/test_python_twisted.py new file mode 100644 index 00000000..a458ee45 --- /dev/null +++ b/support/testing/tests/package/test_python_twisted.py @@ -0,0 +1,39 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonTwisted(TestPythonPackageBase): + config = TestPythonPackageBase.config + sample_scripts = ["tests/package/sample_python_twisted.py"] + + def run_sample_scripts(self): + cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:1234" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 1) + + cmd = self.interpreter + " sample_python_twisted.py &" + # give some time to setup the server + cmd += "sleep 30" + _, exit_code = self.emulator.run(cmd, timeout=35) + self.assertEqual(exit_code, 0) + + cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:1234" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + +class TestPythonPy2Twisted(TestPythonTwisted): + __test__ = True + config = TestPythonTwisted.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_TWISTED=y + """ + + +class TestPythonPy3Twisted(TestPythonTwisted): + __test__ = True + config = TestPythonTwisted.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_TWISTED=y + """ diff --git a/support/testing/tests/package/test_python_txaio.py b/support/testing/tests/package/test_python_txaio.py new file mode 100644 index 00000000..f1bb2c79 --- /dev/null +++ b/support/testing/tests/package/test_python_txaio.py @@ -0,0 +1,11 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Txaio(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_TXAIO=y + """ + sample_scripts = ["tests/package/sample_python_txaio_asyncio.py"] diff --git a/support/testing/tests/package/test_python_txtorcon.py b/support/testing/tests/package/test_python_txtorcon.py new file mode 100644 index 00000000..1ac2f691 --- /dev/null +++ b/support/testing/tests/package/test_python_txtorcon.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Txtorcon(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_TXTORCON=y + """ + sample_scripts = ["tests/package/sample_python_txtorcon.py"] + timeout = 30 + + +class TestPythonPy3Txtorcon(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_TXTORCON=y + """ + sample_scripts = ["tests/package/sample_python_txtorcon.py"] + timeout = 30 diff --git a/support/testing/tests/package/test_python_ubjson.py b/support/testing/tests/package/test_python_ubjson.py new file mode 100644 index 00000000..85c707e2 --- /dev/null +++ b/support/testing/tests/package/test_python_ubjson.py @@ -0,0 +1,23 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy2Ubjson(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_UBJSON=y + """ + sample_scripts = ["tests/package/sample_python_ubjson_enc.py", + "tests/package/sample_python_ubjson_dec.py"] + + +class TestPythonPy3Ubjson(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_UBJSON=y + """ + sample_scripts = ["tests/package/sample_python_ubjson_enc.py", + "tests/package/sample_python_ubjson_dec.py"] diff --git a/support/testing/tests/package/test_redis.py b/support/testing/tests/package/test_redis.py new file mode 100644 index 00000000..d7999851 --- /dev/null +++ b/support/testing/tests/package/test_redis.py @@ -0,0 +1,24 @@ +import os + +import infra.basetest + + +class TestRedis(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + """ + BR2_TARGET_ROOTFS_CPIO=y + BR2_PACKAGE_REDIS=y + """ + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + _, exit_code = self.emulator.run("redis-cli SET hello world") + self.assertEqual(exit_code, 0) + + output, exit_code = self.emulator.run("redis-cli GET hello") + self.assertEqual(exit_code, 0) + self.assertEqual(output[0].strip(), '"world"') diff --git a/support/testing/tests/package/test_rings.py b/support/testing/tests/package/test_rings.py new file mode 100644 index 00000000..be9765f1 --- /dev/null +++ b/support/testing/tests/package/test_rings.py @@ -0,0 +1,25 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaRings(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_RINGS=y + """ + + def test_run(self): + self.login() + self.module_test("rings") + + +class TestLuajitRings(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_RINGS=y + """ + + def test_run(self): + self.login() + self.module_test("rings") diff --git a/support/testing/tests/package/test_rust.py b/support/testing/tests/package/test_rust.py new file mode 100644 index 00000000..15bb93dd --- /dev/null +++ b/support/testing/tests/package/test_rust.py @@ -0,0 +1,112 @@ +import os +import tempfile +import subprocess +import shutil + +import infra.basetest + + +class TestRustBase(infra.basetest.BRTest): + + target = 'armv7-unknown-linux-gnueabihf' + crate = 'hello-world' + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv7", + kernel="builtin", + options=["-initrd", img]) + self.emulator.login() + + def build_test_prog(self): + hostdir = os.path.join(self.builddir, 'host') + env = os.environ.copy() + env["USER"] = "br-user" + env["PATH"] = "{}:".format(os.path.join(hostdir, 'bin')) + env["PATH"] + env["CARGO_HOME"] = os.path.join(hostdir, 'usr', 'share', 'cargo') + env["RUST_TARGET_PATH"] = os.path.join(hostdir, 'etc', 'rustc') + cargo = os.path.join(hostdir, 'bin', 'cargo') + workdir = os.path.join(tempfile.mkdtemp(suffix='-br2-testing-rust'), + self.crate) + manifest = os.path.join(workdir, 'Cargo.toml') + prog = os.path.join(workdir, 'target', self.target, 'debug', self.crate) + + cmd = [cargo, 'init', '--bin', '--vcs', 'none', '-vv', workdir] + ret = subprocess.call(cmd, + stdout=self.b.logfile, + stderr=self.b.logfile, + env=env) + if ret != 0: + raise SystemError("Cargo init failed") + + cmd = [ + cargo, 'build', '-vv', '--target', self.target, + '--manifest-path', manifest + ] + ret = subprocess.call(cmd, + stdout=self.b.logfile, + stderr=self.b.logfile, + env=env) + if ret != 0: + raise SystemError("Cargo build failed") + + shutil.copy(prog, os.path.join(self.builddir, 'target', 'usr', 'bin')) + self.b.build() + shutil.rmtree(workdir) + + +class TestRustBin(TestRustBase): + config = \ + """ + BR2_arm=y + BR2_cortex_a9=y + BR2_ARM_ENABLE_NEON=y + BR2_ARM_ENABLE_VFP=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_SYSTEM_DHCP="eth0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.3" + BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_DTS_SUPPORT=y + BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_PACKAGE_HOST_RUSTC=y + """ + + def test_run(self): + self.build_test_prog() + self.login() + _, exit_code = self.emulator.run(self.crate) + self.assertEqual(exit_code, 0) + + +class TestRust(TestRustBase): + config = \ + """ + BR2_arm=y + BR2_cortex_a9=y + BR2_ARM_ENABLE_NEON=y + BR2_ARM_ENABLE_VFP=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_SYSTEM_DHCP="eth0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.3" + BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_DTS_SUPPORT=y + BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_PACKAGE_HOST_RUSTC=y + BR2_PACKAGE_HOST_RUST=y + """ + + def test_run(self): + self.build_test_prog() + self.login() + _, exit_code = self.emulator.run(self.crate) + self.assertEqual(exit_code, 0) diff --git a/support/testing/tests/package/test_syslog_ng.py b/support/testing/tests/package/test_syslog_ng.py new file mode 100644 index 00000000..3fb0be5f --- /dev/null +++ b/support/testing/tests/package/test_syslog_ng.py @@ -0,0 +1,38 @@ +import os + +import infra.basetest + + +class TestSyslogNg(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y + BR2_PACKAGE_SYSLOG_NG=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + cmd = "grep 'syslog-ng starting' /var/log/messages" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "logger my-message && " + cmd += "sleep 1 && " + cmd += "grep my-message /var/log/messages" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "syslog-ng-ctl reload && " + cmd += "sleep 1" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + cmd = "grep -i 'syslog-ng.*warning' /var/log/messages" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 1) diff --git a/support/testing/tests/package/test_tmux.py b/support/testing/tests/package/test_tmux.py new file mode 100644 index 00000000..b31854ca --- /dev/null +++ b/support/testing/tests/package/test_tmux.py @@ -0,0 +1,41 @@ +import os + +import infra.basetest + + +class TestTmux(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_PACKAGE_TMUX=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + cmd = "tmux -V" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "tmux -C = 3.10, host and target gcc >= 5" + depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_TOOLCHAIN_HAS_SSP || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_5 || \ + !BR2_HOST_GCC_AT_LEAST_5 + +config BR2_INIT_NONE + bool "None" + select BR2_PACKAGE_SKELETON_INIT_NONE if BR2_ROOTFS_SKELETON_DEFAULT + help + Buildroot will not install any init system. You will + have to provide your own, either with a new package + or with a rootfs-overlay. + +# Init systems from br2-external trees, if any +source "$BR2_BASE_DIR/.br2-external.in.init" + +endchoice + +choice + prompt "/dev management" if !BR2_INIT_SYSTEMD + default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS + +config BR2_ROOTFS_DEVICE_CREATION_STATIC + bool "Static using device table" + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS + bool "Dynamic using devtmpfs only" + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV + bool "Dynamic using devtmpfs + mdev" + select BR2_PACKAGE_BUSYBOX + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV + bool "Dynamic using devtmpfs + eudev" + depends on BR2_USE_WCHAR # eudev + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # eudev + select BR2_PACKAGE_EUDEV + +comment "eudev needs a toolchain w/ wchar, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS + +endchoice + +comment "/dev management using udev (from systemd)" + depends on BR2_INIT_SYSTEMD + +config BR2_ROOTFS_DEVICE_TABLE + string "Path to the permission tables" + default "system/device_table.txt" + help + Specify a space-separated list of permission table locations, + that will be passed to the makedevs utility to assign + correct owners and permissions on various files in the + target filesystem. + + See package/makedevs/README for details on the usage and + syntax of these files. + +config BR2_ROOTFS_STATIC_DEVICE_TABLE + string "Path to the device tables" + default "system/device_table_dev.txt" + depends on BR2_ROOTFS_DEVICE_CREATION_STATIC + help + Specify a space-separated list of device table locations, + that will be passed to the makedevs utility to create all + the special device files under /dev. + + See package/makedevs/README for details on the usage and + syntax of these files. + +config BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES + bool "support extended attributes in device tables" + help + Support extended attributes handling in device tables + +config BR2_ROOTFS_MERGED_USR + bool "Use symlinks to /usr for /bin, /sbin and /lib" + help + If you say 'n' here, then /bin, /sbin and /lib and their + counterparts in /usr will be separate directories. This + is the historical UNIX way. In this case, /usr can be a + filesystem on a partition separate from / . + + If you say 'y' here, then /bin, /sbin and /lib will be + symlinks to their counterparts in /usr. In this case, /usr can + not be a separate filesystem. + +if BR2_ROOTFS_SKELETON_DEFAULT + +config BR2_TARGET_ENABLE_ROOT_LOGIN + bool "Enable root login with password" + default y + select BR2_PACKAGE_HOST_MKPASSWD if BR2_TARGET_GENERIC_ROOT_PASSWD != "" + help + Allow root to log in with a password. + + If not enabled, root will not be able to log in with a + password. However, if you have an ssh server and you add an + ssh key, you can still allow root to log in. Alternatively, + you can use sudo to become root. + +config BR2_TARGET_GENERIC_ROOT_PASSWD + string "Root password" + default "" + depends on BR2_TARGET_ENABLE_ROOT_LOGIN + help + Set the initial root password. + + If set to empty (the default), then no root password will be + set, and root will need no password to log in. + + If the password starts with any of $1$, $5$ or $6$, it is + considered to be already crypt-encoded with respectively md5, + sha256 or sha512. Any other value is taken to be a clear-text + value, and is crypt-encoded as per the "Passwords encoding" + scheme, above. + + Note: "$" signs in the hashed password must be doubled. For + example, if the hashed password is + "$1$longsalt$v35DIIeMo4yUfI23yditq0", then you must enter it + as "$$1$$longsalt$$v35DIIeMo4yUfI23yditq0" (this is necessary + otherwise make would attempt to interpret the $ as a variable + expansion). + + WARNING! WARNING! + The password appears as-is in the .config file, and may appear + in the build log! Avoid using a valuable password if either + the .config file or the build log may be distributed, or at + the very least use a strong cryptographic hash for your + password! + +choice + bool "/bin/sh" + default BR2_SYSTEM_BIN_SH_DASH if !BR2_PACKAGE_BUSYBOX + help + Select which shell will provide /bin/sh. + +# busybox has shells that work on noMMU +config BR2_SYSTEM_BIN_SH_BUSYBOX + bool "busybox' default shell" + depends on BR2_PACKAGE_BUSYBOX + +config BR2_SYSTEM_BIN_SH_BASH + bool "bash" + depends on BR2_USE_MMU # bash + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_BASH + +config BR2_SYSTEM_BIN_SH_DASH + bool "dash" + depends on BR2_USE_MMU # dash + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_DASH + +config BR2_SYSTEM_BIN_SH_MKSH + bool "mksh" + depends on BR2_USE_MMU # mksh + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_MKSH + +config BR2_SYSTEM_BIN_SH_ZSH + bool "zsh" + depends on BR2_USE_MMU # zsh + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_ZSH + +comment "bash, dash, mksh, zsh need BR2_PACKAGE_BUSYBOX_SHOW_OTHERS" + depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS && BR2_PACKAGE_BUSYBOX + +config BR2_SYSTEM_BIN_SH_NONE + bool "none" + +endchoice # /bin/sh + +config BR2_SYSTEM_BIN_SH + string + default "bash" if BR2_SYSTEM_BIN_SH_BASH + default "dash" if BR2_SYSTEM_BIN_SH_DASH + default "mksh" if BR2_SYSTEM_BIN_SH_MKSH + default "zsh" if BR2_SYSTEM_BIN_SH_ZSH + +menuconfig BR2_TARGET_GENERIC_GETTY + bool "Run a getty (login prompt) after boot" + default y + +config BR2_TARGET_GENERIC_GETTY_AUTOLOGIN + bool "all getty auto login as root after boot" + depends on BR2_INIT_BUSYBOX || BR2_INIT_SYSTEMD + default y + help + as file serial@getty.service or getty@.service + you can set ExecStart var + -a root switch -o '-p -- \\u' + you can switch to autologin + else disable autologin + when 221011 add busybox auto login support + busybox support just getty add param about -l and -n + -l ls-autologin + ls-autologin just will instead of /bin/login + and login have a param is -f + login -f root + will login be root + so ls-autologin content is login -f -root + +config BR2_TARGET_TTY0_GETTY_ENABLE + bool "enable tty0 getty" + depends on BR2_INIT_BUSYBOX || BR2_INIT_SYSTEMD + default y + help + select this function + will create getty@tty0.service in rootfs /usr/lib/systemd/system/ + just a link file which link /usr/lib/systemd/system/getty@.service + so when rootfs boot + if board have a screen, will see a screen up a getty and can operate it like serial getty + when 221011 add busybox support + busybox as init process + need add new line in /etc/inittab like a line which contain ttyS*::* + +if BR2_TARGET_GENERIC_GETTY +config BR2_TARGET_GENERIC_GETTY_PORT + string "TTY port" + default "console" + help + Specify a port to run a getty on. + +choice + prompt "Baudrate" + default BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP + help + Select a baudrate to use. + +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP + bool "keep kernel default" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 + bool "9600" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 + bool "19200" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 + bool "38400" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 + bool "57600" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 + bool "115200" +endchoice + +config BR2_TARGET_GENERIC_GETTY_BAUDRATE + string + default "0" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP + default "9600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 + default "19200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 + default "38400" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 + default "57600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 + default "115200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 + +config BR2_TARGET_GENERIC_GETTY_TERM + string "TERM environment variable" + default "vt100" + # currently observed by all but systemd + depends on !BR2_INIT_SYSTEMD + help + Specify a TERM type. + +config BR2_TARGET_GENERIC_GETTY_OPTIONS + string "other options to pass to getty" + default "" + # currently observed by all but systemd + depends on !BR2_INIT_SYSTEMD + help + Any other flags you want to pass to getty, + Refer to getty --help for details. +endif + +config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW + bool "remount root filesystem read-write during boot" + default y + help + The root filesystem is typically mounted read-only at boot. + By default, buildroot remounts it in read-write mode early + during the boot process. + Say no here if you would rather like your root filesystem to + remain read-only. + If unsure, say Y. + +config BR2_SYSTEM_DHCP + string "Network interface to configure through DHCP" + default "" + depends on BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ + BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC + help + Enter here the name of the network interface (E.G. eth0) to + automatically configure through DHCP at bootup. + + If left empty, no automatic DHCP requests will take place. + + For more complicated network setups use an overlay to + overwrite /etc/network/interfaces or add a networkd + configuration file. + +comment "automatic network configuration via DHCP needs ifupdown or busybox or networkd or netifrc" + depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ + BR2_PACKAGE_SYSTEMD_NETWORKD || BR2_PACKAGE_NETIFRC) + +endif # BR2_ROOTFS_SKELETON_DEFAULT + +config BR2_SYSTEM_DEFAULT_PATH + string "Set the system's default PATH" + default "/usr/bin:/usr/sbin" if BR2_ROOTFS_MERGED_USR + default "/bin:/sbin:/usr/bin:/usr/sbin" if !BR2_ROOTFS_MERGED_USR + help + Sets the system's default PATH. It is being used in + /etc/profile in the skeleton-init-common package and by some + daemons. + + The default should work in most cases. + +config BR2_ENABLE_LOCALE_PURGE + bool "Purge unwanted locales" + default y + help + Explicitly specify what locales to install on target. If N + then all locales supported by packages are installed. + +config BR2_ENABLE_LOCALE_WHITELIST + string "Locales to keep" + default "C en_US" + depends on BR2_ENABLE_LOCALE_PURGE + help + Whitespace seperated list of locales to allow on target. + Locales not listed here will be removed from the target. + See 'locale -a' on your host for a list of locales available + on your build host, or have a look in /usr/share/locale in + the target file system for available locales. + + Notice that listing a locale here doesn't guarantee that it + will be available on the target - That purely depends on the + support for that locale in the selected packages. + +config BR2_GENERATE_LOCALE + string "Generate locale data" + default "" + depends on \ + (BR2_TOOLCHAIN_BUILDROOT_UCLIBC && BR2_ENABLE_LOCALE) || \ + BR2_TOOLCHAIN_USES_GLIBC + help + Generate support for a list of locales. Locales can be + specified with or without encoding, when no encoding is + specified, UTF-8 is assumed. Examples of locales: en_US, + fr_FR.UTF-8. + +config BR2_SYSTEM_ENABLE_NLS + bool "Enable Native Language Support (NLS)" + depends on BR2_USE_WCHAR + # - glibc has built-in NLS support, but anyway doesn't + # support static linking + # - musl and uclibc support static linking, but they don't + # have built-in NLS support, which is provided by the + # libintl library from gettext. The fact that it is a + # separate library causes too many problems for static + # linking. + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_GETTEXT if !BR2_TOOLCHAIN_HAS_FULL_GETTEXT + help + This option will enable Native Language Support, which will + allow software packages to support translations. + +comment "NLS support needs a toolchain w/ wchar, dynamic library" + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS + +config BR2_TARGET_TZ_INFO + bool "Install timezone info" + select BR2_PACKAGE_TZDATA if BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_TZDATA if BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_TZ if BR2_TOOLCHAIN_USES_UCLIBC + help + Say 'y' here to install timezone info. + +if BR2_TARGET_TZ_INFO + +config BR2_TARGET_TZ_ZONELIST + string "timezone list" + default "default" + help + Space-separated list of time zones to compile. + + The value "default" includes all commonly used time zones. + Note that this set consumes around 5.5M for glibc and 2.1M for + uClibc. + + The full list is the list of files in the time zone database + source, not including the build and .tab files. + +config BR2_TARGET_LOCALTIME + string "default local time" + default "Etc/UTC" + help + The time zone to install as the default local time, expressed + as a tzdata location, such as: + Etc/UTC (the default) + GMT + Europe/Paris + America/New_York + Pacific/Wallis + ... + + Set to empty to not install a default time zone. + +endif # BR2_TARGET_TZ_INFO + +config BR2_ROOTFS_USERS_TABLES + string "Path to the users tables" + help + Specify a space-separated list of users table locations, + that will be passed to the mkusers utility to create + users on the system, with home directory, password, etc. + + See manual for details on the usage and syntax of these files. + +config BR2_ROOTFS_OVERLAY + string "Root filesystem overlay directories" + default "" + help + Specify a list of directories that are copied over the target + root filesystem after the build has finished and before it is + packed into the selected filesystem images. + + They are copied as-is into the rootfs, excluding files ending + with ~ and .git, .svn and .hg directories. + +config BR2_ROOTFS_POST_BUILD_SCRIPT + string "Custom scripts to run before creating filesystem images" + default "" + help + Specify a space-separated list of scripts to be run after the + build has finished and before Buildroot starts packing the + files into selected filesystem images. + + This gives users the opportunity to do board-specific + cleanups, add-ons and the like, so the generated files can be + used directly without further processing. + + These scripts are called with the target directory name as + first argument. Make sure the exit code of those scripts are + 0, otherwise make will stop after calling them. + +config BR2_ROOTFS_POST_FAKEROOT_SCRIPT + string "Custom scripts to run inside the fakeroot environment" + default "" + help + Specify a space-separated list of scripts to be run at the end + of the fakeroot script right before the image(s) are actually + generated. + + This gives users the opportunity to do customisations of the + content of the rootfs, which would otherwise require root + rights. + + These scripts are called with the target directory name as + first argument. The build will fail on the first scripts that + exits with a non-zero exit code. + + Note that Buildroot already provides mechanisms to customise + the content of the rootfs: + + - BR2_ROOTFS_STATIC_DEVICE_TABLE + to create arbitrary entries statically in /dev + + - BR2_ROOTFS_DEVICE_TABLE + to set arbitrary permissions as well as extended + attributes (such as capabilities) on files and + directories, + + - BR2_ROOTFS_USERS_TABLES: + to create arbitrary users and their home directories + + It is highly recommended to use those mechanisms if possible, + rather than using custom fakeroot scripts. + +config BR2_ROOTFS_POST_IMAGE_SCRIPT + string "Custom scripts to run after creating filesystem images" + default "" + help + Specify a space-separated list of scripts to be run after + the build has finished and after Buildroot has packed the + files into selected filesystem images. + + This can for example be used to call a tool building a + firmware image from different images generated by Buildroot, + or automatically extract the tarball root filesystem image + into some location exported by NFS, or any other custom + action. + + These scripts are called with the images directory name as + first argument. The script is executed from the main Buildroot + source directory as the current directory. + +config BR2_ROOTFS_POST_SCRIPT_ARGS + string "Extra arguments passed to custom scripts" + depends on BR2_ROOTFS_POST_BUILD_SCRIPT != "" \ + || BR2_ROOTFS_POST_FAKEROOT_SCRIPT != "" \ + || BR2_ROOTFS_POST_IMAGE_SCRIPT != "" + help + Pass these additional arguments to each post-build or + post-image scripts. + + Note that all the post-build and post-image scripts will be + passed the same set of arguments, you can not pass different + arguments to each script. + + Note also, as stated in their respective help text, that the + first argument to each post-build or post-image script is the + target directory / images directory. The arguments in this + option will be passed *after* those. + +config BR2_BUSYBOX_PROFILE + bool "generate /etc/profile" + depends on BR2_PACKAGE_BUSYBOX + default y + help + generate a /etc/profile + +config BR2_BUSYBOX_UBIFS_NAND_DATA_PART + bool "nand data part mount" + select BR2_PACKAGE_MTD + select BR2_PACKAGE_MTD_UBIMKVOL + select BR2_PACKAGE_MTD_UBIFORMAT + select BR2_PACKAGE_MTD_UBIDETACH + select BR2_PACKAGE_MTD_UBIATTACH + default n + help + if nand too big and scan bad block too slow + can spilt nand kernel rootfs data(about mtdparts property in cmdline) + rootfs just small and boot fast + and data part mount after system boot + +config BR2_BUSYBOX_UBIFS_NAND_DATA_PART_DELAY + bool "nand data part mount delay 5s" + depends on BR2_BUSYBOX_UBIFS_NAND_DATA_PART + default y + help + if want to run a process after boot + nand data part mount will capture nand controller + process will start slower + +config BR2_BUSYBOX_WPA_WLAN_AUTO_LINK + bool "wpa wlan auto link" + select BR2_PACKAGE_WPA_SUPPLICANT + default n + help + if select wpa and want auto link wifi + just can select this option + and you will look /root/init_shell/wpa_wlan_auto_link.sh + +config BR2_BUSYBOX_WPA_WLAN_AUTO_LINK_DELAY + bool "wpa wlan auto link delay 5s" + depends on BR2_BUSYBOX_WPA_WLAN_AUTO_LINK + default y + help + if want to run a process after boot + wifi link will start slower + +endmenu diff --git a/system/device_table.txt b/system/device_table.txt new file mode 100644 index 00000000..dc1af518 --- /dev/null +++ b/system/device_table.txt @@ -0,0 +1,21 @@ +# See package/makedevs/README for details +# +# This device table is used to assign proper ownership and permissions +# on various files. It doesn't create any device file, as it is used +# in both static device configurations (where /dev/ is static) and in +# dynamic configurations (where devtmpfs, mdev or udev are used). +# +# +/dev d 755 0 0 - - - - - +/tmp d 1777 0 0 - - - - - +/etc d 755 0 0 - - - - - +/root d 700 0 0 - - - - - +/var/www d 755 33 33 - - - - - +/etc/shadow f 600 0 0 - - - - - +/etc/passwd f 644 0 0 - - - - - +/etc/network/if-up.d d 755 0 0 - - - - - +/etc/network/if-pre-up.d d 755 0 0 - - - - - +/etc/network/if-down.d d 755 0 0 - - - - - +/etc/network/if-post-down.d d 755 0 0 - - - - - +# uncomment this to allow starting x as non-root +#/usr/X11R6/bin/Xfbdev f 4755 0 0 - - - - - diff --git a/system/device_table_dev.txt b/system/device_table_dev.txt new file mode 100644 index 00000000..4f0b6377 --- /dev/null +++ b/system/device_table_dev.txt @@ -0,0 +1,133 @@ +# See package/makedevs/README for details +# +# This device table is used only to create device files when a static +# device configuration is used (entries in /dev are static). +# +# + +# Normal system devices +/dev/mem c 640 0 0 1 1 0 0 - +/dev/kmem c 640 0 0 1 2 0 0 - +/dev/null c 666 0 0 1 3 0 0 - +/dev/zero c 666 0 0 1 5 0 0 - +/dev/random c 666 0 0 1 8 0 0 - +/dev/urandom c 666 0 0 1 9 0 0 - +/dev/ram b 640 0 0 1 1 0 0 - +/dev/ram b 640 0 0 1 0 0 1 4 +/dev/loop b 640 0 0 7 0 0 1 2 +/dev/rtc c 640 0 0 10 135 - - - +/dev/console c 666 0 0 5 1 - - - +/dev/tty c 666 0 0 5 0 - - - +/dev/tty c 666 0 0 4 0 0 1 8 +/dev/ttyp c 666 0 0 3 0 0 1 10 +/dev/ptyp c 666 0 0 2 0 0 1 10 +/dev/ptmx c 666 0 0 5 2 - - - +/dev/ttyP c 666 0 0 57 0 0 1 4 +/dev/ttyS c 666 0 0 4 64 0 1 4 +/dev/fb c 640 0 5 29 0 0 1 4 +#/dev/ttySA c 666 0 0 204 5 0 1 3 +/dev/psaux c 666 0 0 10 1 0 0 - +#/dev/ppp c 666 0 0 108 0 - - - +/dev/ttyAM c 666 0 0 204 16 0 1 3 +/dev/ttyCPM c 666 0 0 204 46 0 1 4 +/dev/ttyAMA c 666 0 0 204 64 0 1 4 +/dev/ttyBF c 666 0 0 204 64 0 1 2 +/dev/ttySAC c 666 0 0 204 64 0 1 4 +/dev/ttySC c 666 0 0 204 8 0 1 8 +/dev/ttyPSC c 666 0 0 204 148 0 1 4 +/dev/ttyUL c 666 0 0 204 187 0 1 4 +/dev/ttymxc c 666 0 0 207 16 0 1 4 +/dev/hvc c 640 0 0 229 0 0 1 4 + +# Input stuff +/dev/input d 755 0 0 - - - - - +/dev/input/mice c 640 0 0 13 63 0 0 - +/dev/input/mouse c 660 0 0 13 32 0 1 4 +/dev/input/event c 660 0 0 13 64 0 1 4 +#/dev/input/js c 660 0 0 13 0 0 1 4 + + +# MTD stuff +/dev/mtd c 640 0 0 90 0 0 2 4 +/dev/mtdblock b 640 0 0 31 0 0 1 4 + +#Tun/tap driver +/dev/net d 755 0 0 - - - - - +/dev/net/tun c 660 0 0 10 200 - - - + +# Audio stuff +#/dev/audio c 666 0 29 14 4 - - - +#/dev/audio1 c 666 0 29 14 20 - - - +#/dev/dsp c 666 0 29 14 3 - - - +#/dev/dsp1 c 666 0 29 14 19 - - - +#/dev/sndstat c 666 0 29 14 6 - - - + +# User-mode Linux stuff +#/dev/ubda b 640 0 0 98 0 0 0 - +#/dev/ubda b 640 0 0 98 1 1 1 15 + +# IDE Devices +/dev/hda b 640 0 0 3 0 0 0 - +/dev/hda b 640 0 0 3 1 1 1 15 +/dev/hdb b 640 0 0 3 64 0 0 - +/dev/hdb b 640 0 0 3 65 1 1 15 +#/dev/hdc b 640 0 0 22 0 0 0 - +#/dev/hdc b 640 0 0 22 1 1 1 15 +#/dev/hdd b 640 0 0 22 64 0 0 - +#/dev/hdd b 640 0 0 22 65 1 1 15 +#/dev/hde b 640 0 0 33 0 0 0 - +#/dev/hde b 640 0 0 33 1 1 1 15 +#/dev/hdf b 640 0 0 33 64 0 0 - +#/dev/hdf b 640 0 0 33 65 1 1 15 +#/dev/hdg b 640 0 0 34 0 0 0 - +#/dev/hdg b 640 0 0 34 1 1 1 15 +#/dev/hdh b 640 0 0 34 64 0 0 - +#/dev/hdh b 640 0 0 34 65 1 1 15 + +# SCSI Devices +/dev/sda b 640 0 0 8 0 0 0 - +/dev/sda b 640 0 0 8 1 1 1 15 +/dev/sdb b 640 0 0 8 16 0 0 - +/dev/sdb b 640 0 0 8 17 1 1 15 +#/dev/sdc b 640 0 0 8 32 0 0 - +#/dev/sdc b 640 0 0 8 33 1 1 15 +#/dev/sdd b 640 0 0 8 48 0 0 - +#/dev/sdd b 640 0 0 8 49 1 1 15 +#/dev/sde b 640 0 0 8 64 0 0 - +#/dev/sde b 640 0 0 8 65 1 1 15 +#/dev/sdf b 640 0 0 8 80 0 0 - +#/dev/sdf b 640 0 0 8 81 1 1 15 +#/dev/sdg b 640 0 0 8 96 0 0 - +#/dev/sdg b 640 0 0 8 97 1 1 15 +#/dev/sdh b 640 0 0 8 112 0 0 - +#/dev/sdh b 640 0 0 8 113 1 1 15 +#/dev/sg c 640 0 0 21 0 0 1 15 +#/dev/scd b 640 0 0 11 0 0 1 15 +#/dev/st c 640 0 0 9 0 0 1 8 +#/dev/nst c 640 0 0 9 128 0 1 8 +#/dev/st c 640 0 0 9 32 1 1 4 +#/dev/st c 640 0 0 9 64 1 1 4 +#/dev/st c 640 0 0 9 96 1 1 4 + +# USB block devices (ub driver) +/dev/uba b 640 0 0 180 0 0 0 - +/dev/uba b 640 0 0 180 1 1 1 6 +/dev/ubb b 640 0 0 180 8 0 0 - +/dev/ubb b 640 0 0 180 65 1 1 6 + +# Floppy disk devices +#/dev/fd b 640 0 0 2 0 0 1 2 +#/dev/fd0d360 b 640 0 0 2 4 0 0 - +#/dev/fd1d360 b 640 0 0 2 5 0 0 - +#/dev/fd0h1200 b 640 0 0 2 8 0 0 - +#/dev/fd1h1200 b 640 0 0 2 9 0 0 - +#/dev/fd0u1440 b 640 0 0 2 28 0 0 - +#/dev/fd1u1440 b 640 0 0 2 29 0 0 - +#/dev/fd0u2880 b 640 0 0 2 32 0 0 - +#/dev/fd1u2880 b 640 0 0 2 33 0 0 - + +# I2C device nodes +/dev/i2c- c 666 0 0 89 0 0 1 4 + +# v4l device nodes +/dev/video c 666 0 0 81 0 0 1 4 diff --git a/system/skeleton/dev/.empty b/system/skeleton/dev/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/dev/fd b/system/skeleton/dev/fd new file mode 120000 index 00000000..10e8ab73 --- /dev/null +++ b/system/skeleton/dev/fd @@ -0,0 +1 @@ +../proc/self/fd \ No newline at end of file diff --git a/system/skeleton/dev/stderr b/system/skeleton/dev/stderr new file mode 120000 index 00000000..c67586eb --- /dev/null +++ b/system/skeleton/dev/stderr @@ -0,0 +1 @@ +../proc/self/fd/2 \ No newline at end of file diff --git a/system/skeleton/dev/stdin b/system/skeleton/dev/stdin new file mode 120000 index 00000000..2825dc0f --- /dev/null +++ b/system/skeleton/dev/stdin @@ -0,0 +1 @@ +../proc/self/fd/0 \ No newline at end of file diff --git a/system/skeleton/dev/stdout b/system/skeleton/dev/stdout new file mode 120000 index 00000000..35e0f620 --- /dev/null +++ b/system/skeleton/dev/stdout @@ -0,0 +1 @@ +../proc/self/fd/1 \ No newline at end of file diff --git a/system/skeleton/etc/group b/system/skeleton/etc/group new file mode 100644 index 00000000..6822a277 --- /dev/null +++ b/system/skeleton/etc/group @@ -0,0 +1,26 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +kmem:x:9: +wheel:x:10:root +cdrom:x:11: +dialout:x:18: +floppy:x:19: +video:x:28: +audio:x:29: +tape:x:32: +www-data:x:33: +operator:x:37: +utmp:x:43: +plugdev:x:46: +staff:x:50: +lock:x:54: +netdev:x:82: +users:x:100: +nobody:x:65534: diff --git a/system/skeleton/etc/hosts b/system/skeleton/etc/hosts new file mode 100644 index 00000000..ba712fe0 --- /dev/null +++ b/system/skeleton/etc/hosts @@ -0,0 +1 @@ +127.0.0.1 localhost diff --git a/system/skeleton/etc/mtab b/system/skeleton/etc/mtab new file mode 120000 index 00000000..5c4677a6 --- /dev/null +++ b/system/skeleton/etc/mtab @@ -0,0 +1 @@ +../proc/self/mounts \ No newline at end of file diff --git a/system/skeleton/etc/passwd b/system/skeleton/etc/passwd new file mode 100644 index 00000000..d8281d25 --- /dev/null +++ b/system/skeleton/etc/passwd @@ -0,0 +1,9 @@ +root:x:0:0:root:/root:/bin/sh +daemon:x:1:1:daemon:/usr/sbin:/bin/false +bin:x:2:2:bin:/bin:/bin/false +sys:x:3:3:sys:/dev:/bin/false +sync:x:4:100:sync:/bin:/bin/sync +mail:x:8:8:mail:/var/spool/mail:/bin/false +www-data:x:33:33:www-data:/var/www:/bin/false +operator:x:37:37:Operator:/var:/bin/false +nobody:x:65534:65534:nobody:/home:/bin/false diff --git a/system/skeleton/etc/profile b/system/skeleton/etc/profile new file mode 100644 index 00000000..05452770 --- /dev/null +++ b/system/skeleton/etc/profile @@ -0,0 +1,19 @@ +export PATH=@PATH@ + +if [ "$PS1" ]; then + if [ "`id -u`" -eq 0 ]; then + export PS1='# ' + else + export PS1='$ ' + fi +fi + +export EDITOR='/bin/vi' + +# Source configuration files from /etc/profile.d +for i in /etc/profile.d/*.sh ; do + if [ -r "$i" ]; then + . $i + fi +done +unset i diff --git a/system/skeleton/etc/profile.d/umask.sh b/system/skeleton/etc/profile.d/umask.sh new file mode 100644 index 00000000..8e71ad5d --- /dev/null +++ b/system/skeleton/etc/profile.d/umask.sh @@ -0,0 +1 @@ +umask 022 diff --git a/system/skeleton/etc/protocols b/system/skeleton/etc/protocols new file mode 100644 index 00000000..cfdd5adb --- /dev/null +++ b/system/skeleton/etc/protocols @@ -0,0 +1,61 @@ +# Internet (IP) protocols +# +# Updated from http://www.iana.org/assignments/protocol-numbers and other +# sources. + +ip 0 IP # internet protocol, pseudo protocol number +hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883] +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # Internet Group Management +ggp 3 GGP # gateway-gateway protocol +ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') +st 5 ST # ST datagram mode +tcp 6 TCP # transmission control protocol +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco) +pup 12 PUP # PARC universal packet protocol +udp 17 UDP # user datagram protocol +hmp 20 HMP # host monitoring protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +rdp 27 RDP # "reliable datagram" protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905] +dccp 33 DCCP # Datagram Congestion Control Prot. [RFC4340] +xtp 36 XTP # Xpress Transfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport +ipv6 41 IPv6 # Internet Protocol, version 6 +ipv6-route 43 IPv6-Route # Routing Header for IPv6 +ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Reservation Protocol +gre 47 GRE # General Routing Encapsulation +esp 50 IPSEC-ESP # Encap Security Payload [RFC2406] +ah 51 IPSEC-AH # Authentication Header [RFC2402] +skip 57 SKIP # SKIP +ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6 +ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6 +ipv6-opts 60 IPv6-Opts # Destination Options for IPv6 +rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB) +vmtp 81 VMTP # Versatile Message Transport +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +ax.25 93 AX.25 # AX.25 frames +ipip 94 IPIP # IP-within-IP Encapsulation Protocol +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378] +encap 98 ENCAP # Yet Another IP encapsulation [RFC1241] +# 99 # any private encryption scheme +pim 103 PIM # Protocol Independent Multicast +ipcomp 108 IPCOMP # IP Payload Compression Protocol +vrrp 112 VRRP # Virtual Router Redundancy Protocol [RFC5798] +l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661] +isis 124 ISIS # IS-IS over IPv4 +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel +mobility-header 135 Mobility-Header # Mobility Support for IPv6 [RFC3775] +udplite 136 UDPLite # UDP-Lite [RFC3828] +mpls-in-ip 137 MPLS-in-IP # MPLS-in-IP [RFC4023] +manet 138 # MANET Protocols [RFC5498] +hip 139 HIP # Host Identity Protocol +shim6 140 Shim6 # Shim6 Protocol [RFC5533] +wesp 141 WESP # Wrapped Encapsulating Security Payload +rohc 142 ROHC # Robust Header Compression diff --git a/system/skeleton/etc/resolv.conf b/system/skeleton/etc/resolv.conf new file mode 120000 index 00000000..71f6f965 --- /dev/null +++ b/system/skeleton/etc/resolv.conf @@ -0,0 +1 @@ +../tmp/resolv.conf \ No newline at end of file diff --git a/system/skeleton/etc/services b/system/skeleton/etc/services new file mode 100644 index 00000000..b287b63e --- /dev/null +++ b/system/skeleton/etc/services @@ -0,0 +1,302 @@ +# /etc/services: +# $Id: services,v 1.1 2004/10/09 02:49:18 andersen Exp $ +# +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, most entries here have two entries +# even if the protocol doesn't support UDP operations. +# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports +# are included, only the more common ones. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +msp 18/tcp # message send protocol +msp 18/udp # message send protocol +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh 22/tcp # SSH Remote Login Protocol +ssh 22/udp # SSH Remote Login Protocol +telnet 23/tcp +# 24 - private +smtp 25/tcp mail +# 26 - unassigned +time 37/tcp timserver +time 37/udp timserver +rlp 39/udp resource # resource location +nameserver 42/tcp name # IEN 116 +whois 43/tcp nicname +re-mail-ck 50/tcp # Remote Mail Checking Protocol +re-mail-ck 50/udp # Remote Mail Checking Protocol +domain 53/tcp nameserver # name-domain server +domain 53/udp nameserver +mtp 57/tcp # deprecated +bootps 67/tcp # BOOTP server +bootps 67/udp +bootpc 68/tcp # BOOTP client +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +gopher 70/udp +rje 77/tcp netrjs +finger 79/tcp +www 80/tcp http # WorldWideWeb HTTP +www 80/udp # HyperText Transfer Protocol +link 87/tcp ttylink +kerberos 88/tcp kerberos5 krb5 # Kerberos v5 +kerberos 88/udp kerberos5 krb5 # Kerberos v5 +supdup 95/tcp +# 100 - reserved +hostnames 101/tcp hostname # usually from sri-nic +iso-tsap 102/tcp tsap # part of ISODE. +csnet-ns 105/tcp cso-ns # also used by CSO name server +csnet-ns 105/udp cso-ns +# unfortunately the poppassd (Eudora) uses a port which has already +# been assigned to a different service. We list the poppassd as an +# alias here. This should work for programs asking for this service. +# (due to a bug in inetd the 3com-tsmux line is disabled) +#3com-tsmux 106/tcp poppassd +#3com-tsmux 106/udp poppassd +rtelnet 107/tcp # Remote Telnet +rtelnet 107/udp +pop-2 109/tcp postoffice # POP version 2 +pop-2 109/udp +pop-3 110/tcp # POP version 3 +pop-3 110/udp +sunrpc 111/tcp portmapper # RPC 4.0 portmapper TCP +sunrpc 111/udp portmapper # RPC 4.0 portmapper UDP +auth 113/tcp authentication tap ident +sftp 115/tcp +uucp-path 117/tcp +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/tcp +ntp 123/udp # Network Time Protocol +netbios-ns 137/tcp # NETBIOS Name Service +netbios-ns 137/udp +netbios-dgm 138/tcp # NETBIOS Datagram Service +netbios-dgm 138/udp +netbios-ssn 139/tcp # NETBIOS session service +netbios-ssn 139/udp +imap2 143/tcp # Interim Mail Access Proto v2 +imap2 143/udp +snmp 161/udp # Simple Net Mgmt Proto +snmp-trap 162/udp snmptrap # Traps for SNMP +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +xdmcp 177/tcp # X Display Mgr. Control Proto +xdmcp 177/udp +nextstep 178/tcp NeXTStep NextStep # NeXTStep window +nextstep 178/udp NeXTStep NextStep # server +bgp 179/tcp # Border Gateway Proto. +bgp 179/udp +prospero 191/tcp # Cliff Neuman's Prospero +prospero 191/udp +irc 194/tcp # Internet Relay Chat +irc 194/udp +smux 199/tcp # SNMP Unix Multiplexer +smux 199/udp +at-rtmp 201/tcp # AppleTalk routing +at-rtmp 201/udp +at-nbp 202/tcp # AppleTalk name binding +at-nbp 202/udp +at-echo 204/tcp # AppleTalk echo +at-echo 204/udp +at-zis 206/tcp # AppleTalk zone information +at-zis 206/udp +qmtp 209/tcp # The Quick Mail Transfer Protocol +qmtp 209/udp # The Quick Mail Transfer Protocol +z3950 210/tcp wais # NISO Z39.50 database +z3950 210/udp wais +ipx 213/tcp # IPX +ipx 213/udp +imap3 220/tcp # Interactive Mail Access +imap3 220/udp # Protocol v3 +ulistserv 372/tcp # UNIX Listserv +ulistserv 372/udp +https 443/tcp # MCom +https 443/udp # MCom +snpp 444/tcp # Simple Network Paging Protocol +snpp 444/udp # Simple Network Paging Protocol +saft 487/tcp # Simple Asynchronous File Transfer +saft 487/udp # Simple Asynchronous File Transfer +npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS +npmp-local 610/udp dqs313_qmaster # npmp-local / DQS +npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS +npmp-gui 611/udp dqs313_execd # npmp-gui / DQS +hmmp-ind 612/tcp dqs313_intercell# HMMP Indication / DQS +hmmp-ind 612/udp dqs313_intercell# HMMP Indication / DQS +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +timed 525/udp timeserver +tempo 526/tcp newdate +courier 530/tcp rpc +conference 531/tcp chat +netnews 532/tcp readnews +netwall 533/udp # -for emergency broadcasts +uucp 540/tcp uucpd # uucp daemon +afpovertcp 548/tcp # AFP over TCP +afpovertcp 548/udp # AFP over TCP +remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +webster 765/tcp # Network dictionary +webster 765/udp +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +nfsdstatus 1110/tcp +nfsd-keepalive 1110/udp + +ingreslock 1524/tcp +ingreslock 1524/udp +prospero-np 1525/tcp # Prospero non-privileged +prospero-np 1525/udp +datametrics 1645/tcp old-radius # datametrics / old radius entry +datametrics 1645/udp old-radius # datametrics / old radius entry +sa-msg-port 1646/tcp old-radacct # sa-msg-port / old radacct entry +sa-msg-port 1646/udp old-radacct # sa-msg-port / old radacct entry +radius 1812/tcp # Radius +radius 1812/udp # Radius +radacct 1813/tcp # Radius Accounting +radacct 1813/udp # Radius Accounting +nfsd 2049/tcp nfs +nfsd 2049/udp nfs +cvspserver 2401/tcp # CVS client/server operations +cvspserver 2401/udp # CVS client/server operations +mysql 3306/tcp # MySQL +mysql 3306/udp # MySQL +rfe 5002/tcp # Radio Free Ethernet +rfe 5002/udp # Actually uses UDP only +cfengine 5308/tcp # CFengine +cfengine 5308/udp # CFengine +bbs 7000/tcp # BBS service +# +# +# Kerberos (Project Athena/MIT) services +# Note that these are for Kerberos v4, and are unofficial. Sites running +# v4 should uncomment these and comment out the v5 entries above. +# +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) udp +kerberos4 750/tcp kerberos-iv kdc # Kerberos (server) tcp +kerberos_master 751/udp # Kerberos authentication +kerberos_master 751/tcp # Kerberos authentication +passwd_server 752/udp # Kerberos passwd server +krb_prop 754/tcp # Kerberos slave propagation +krbupdate 760/tcp kreg # Kerberos registration +kpasswd 761/tcp kpwd # Kerberos "passwd" +kpop 1109/tcp # Pop with Kerberos +knetd 2053/tcp # Kerberos de-multiplexor +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +eklogin 2105/tcp # Kerberos encrypted rlogin +# +# Unofficial but necessary (for NetBSD) services +# +supfilesrv 871/tcp # SUP server +supfiledbg 1127/tcp # SUP debugging +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol +# +# Services added for the Debian GNU/Linux distribution +poppassd 106/tcp # Eudora +poppassd 106/udp # Eudora +mailq 174/tcp # Mailer transport queue for Zmailer +mailq 174/tcp # Mailer transport queue for Zmailer +omirr 808/tcp omirrd # online mirror +omirr 808/udp omirrd # online mirror +rmtcfg 1236/tcp # Gracilis Packeten remote config server +xtel 1313/tcp # french minitel +coda_opcons 1355/udp # Coda opcons (Coda fs) +coda_venus 1363/udp # Coda venus (Coda fs) +coda_auth 1357/udp # Coda auth (Coda fs) +coda_udpsrv 1359/udp # Coda udpsrv (Coda fs) +coda_filesrv 1361/udp # Coda filesrv (Coda fs) +codacon 1423/tcp venus.cmu # Coda Console (Coda fs) +coda_aux1 1431/tcp # coda auxiliary service (Coda fs) +coda_aux1 1431/udp # coda auxiliary service (Coda fs) +coda_aux2 1433/tcp # coda auxiliary service (Coda fs) +coda_aux2 1433/udp # coda auxiliary service (Coda fs) +coda_aux3 1435/tcp # coda auxiliary service (Coda fs) +coda_aux3 1435/udp # coda auxiliary service (Coda fs) +cfinger 2003/tcp # GNU Finger +afbackup 2988/tcp # Afbackup system +afbackup 2988/udp # Afbackup system +icp 3130/tcp # Internet Cache Protocol (Squid) +icp 3130/udp # Internet Cache Protocol (Squid) +postgres 5432/tcp # POSTGRES +postgres 5432/udp # POSTGRES +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +noclog 5354/tcp # noclogd with TCP (nocol) +noclog 5354/udp # noclogd with UDP (nocol) +hostmon 5355/tcp # hostmon uses TCP (nocol) +hostmon 5355/udp # hostmon uses TCP (nocol) +ircd 6667/tcp # Internet Relay Chat +ircd 6667/udp # Internet Relay Chat +webcache 8080/tcp # WWW caching service +webcache 8080/udp # WWW caching service +tproxy 8081/tcp # Transparent Proxy +tproxy 8081/udp # Transparent Proxy +mandelspawn 9359/udp mandelbrot # network mandelbrot +amanda 10080/udp # amanda backup services +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +isdnlog 20011/tcp # isdn logging system +isdnlog 20011/udp # isdn logging system +vboxd 20012/tcp # voice box system +vboxd 20012/udp # voice box system +binkp 24554/tcp # Binkley +binkp 24554/udp # Binkley +asp 27374/tcp # Address Search Protocol +asp 27374/udp # Address Search Protocol +tfido 60177/tcp # Ifmail +tfido 60177/udp # Ifmail +fido 60179/tcp # Ifmail +fido 60179/udp # Ifmail + +# Local services + diff --git a/system/skeleton/etc/shadow b/system/skeleton/etc/shadow new file mode 100644 index 00000000..37de977c --- /dev/null +++ b/system/skeleton/etc/shadow @@ -0,0 +1,9 @@ +root:::::::: +daemon:*::::::: +bin:*::::::: +sys:*::::::: +sync:*::::::: +mail:*::::::: +www-data:*::::::: +operator:*::::::: +nobody:*::::::: diff --git a/system/skeleton/media/.empty b/system/skeleton/media/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/mnt/.empty b/system/skeleton/mnt/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/opt/.empty b/system/skeleton/opt/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/proc/.empty b/system/skeleton/proc/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/root/.empty b/system/skeleton/root/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/run/.empty b/system/skeleton/run/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/sys/.empty b/system/skeleton/sys/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/tmp/.empty b/system/skeleton/tmp/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/usr/bin/.empty b/system/skeleton/usr/bin/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/usr/lib/.empty b/system/skeleton/usr/lib/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/skeleton/usr/sbin/.empty b/system/skeleton/usr/sbin/.empty new file mode 100644 index 00000000..e69de29b diff --git a/system/system.mk b/system/system.mk new file mode 100644 index 00000000..62d6cb6f --- /dev/null +++ b/system/system.mk @@ -0,0 +1,102 @@ +################################################################################ +# +# system-related variables and macros +# +################################################################################ + +# This file exists to define variables and macros that pertain to the system +# settings, like rsyncing a directory for skeletons, or the /lib vs. /usr/lib +# symlink handling. +# +# Some variables may be used as conditions in Makefile code, so they must be +# defined properly before they are used; this file is included early, before +# any package is. + +# - SYSTEM_USR_SYMLINKS_OR_DIRS +# create /lib, /bin and /sbin, either as directories or as symlinks to +# their /usr conterparts +# +# - SYSTEM_RSYNC +# rsync $(1) to $(2), with proper exclusions and rights +# +# - SYSTEM_LIB_SYMLINK +# create the appropriate /lib{32,64} symlinks +# +# - SYSTEM_GETTY_PORT +# - SYSTEM_GETTY_BAUDRATE +# - SYSTEM_GETTY_TERM +# - SYSTEM_GETTY_OPTIONS +# the un-quoted getty setting +# +# - SYSTEM_REMOUNT_ROOT_INITTAB +# set inittab to remount root read-write or read-only +# + +# This function handles the merged or non-merged /usr cases +ifeq ($(BR2_ROOTFS_MERGED_USR),y) +define SYSTEM_USR_SYMLINKS_OR_DIRS + ln -snf usr/bin $(1)/bin + ln -snf usr/sbin $(1)/sbin + ln -snf usr/lib $(1)/lib +endef +else +define SYSTEM_USR_SYMLINKS_OR_DIRS + $(INSTALL) -d -m 0755 $(1)/bin + $(INSTALL) -d -m 0755 $(1)/sbin + $(INSTALL) -d -m 0755 $(1)/lib +endef +endif + +# This function rsyncs the skeleton directory in $(1) to the destination +# in $(2), which should be either $(TARTGET_DIR) or $(STAGING_DIR) +define SYSTEM_RSYNC + rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \ + --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \ + $(1)/ $(2)/ +endef + +# Make a symlink lib32->lib or lib64->lib as appropriate. +# MIPS64/n32 requires lib32 even though it's a 64-bit arch. However, since gcc +# 5.1.0 internal compiler paths in sysroot are relative to lib64, so we must +# create both. +# $(1): base dir (either staging or target) +ifeq ($(BR2_MIPS_NABI32),y) +define SYSTEM_LIB_SYMLINK + ln -snf lib $(1)/lib64 + ln -snf lib $(1)/usr/lib64 + ln -snf lib $(1)/lib32 + ln -snf lib $(1)/usr/lib32 +endef +else ifeq ($(BR2_ARCH_IS_64),y) +define SYSTEM_LIB_SYMLINK + ln -snf lib $(1)/lib64 + ln -snf lib $(1)/usr/lib64 +endef +else +define SYSTEM_LIB_SYMLINK + ln -snf lib $(1)/lib32 + ln -snf lib $(1)/usr/lib32 +endef +endif + +SYSTEM_GETTY_PORT = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) +SYSTEM_GETTY_AUTOLOGIN = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_AUTOLOGIN)) +SYSTEM_GETTY_BAUDRATE = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) +SYSTEM_GETTY_TERM = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM)) +SYSTEM_GETTY_OPTIONS = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_OPTIONS)) + +ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y) +# Find commented line, if any, and remove leading '#'s +define SYSTEM_REMOUNT_ROOT_INITTAB + $(SED) '/^#.*-o remount,rw \/$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab +endef +else +# Find uncommented line, if any, and add a leading '#' +define SYSTEM_REMOUNT_ROOT_INITTAB + $(SED) '/^[^#].*-o remount,rw \/$$/s~^~#~' $(TARGET_DIR)/etc/inittab +endef +endif + +ifeq ($(BR_BUILDING)$(BR2_SYSTEM_DEFAULT_PATH),y"") +$(error BR2_SYSTEM_DEFAULT_PATH can't be empty) +endif diff --git a/toolchain/Config.in b/toolchain/Config.in new file mode 100644 index 00000000..9dafa173 --- /dev/null +++ b/toolchain/Config.in @@ -0,0 +1,758 @@ +menu "Toolchain" + +# Invisible option that makes sure the toolchain package always gets +# built +config BR2_TOOLCHAIN + bool + default y + +# Should be selected for glibc or eglibc +config BR2_TOOLCHAIN_USES_GLIBC + bool + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_TOOLCHAIN_HAS_FULL_GETTEXT + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_HAS_UCONTEXT + select BR2_TOOLCHAIN_SUPPORTS_PIE + +config BR2_TOOLCHAIN_USES_UCLIBC + bool + # ucontext is only available for a subset of the supported + # architectures + select BR2_TOOLCHAIN_HAS_UCONTEXT if BR2_ARM_CPU_HAS_ARM || BR2_i386 \ + || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el \ + || BR2_sparc || BR2_x86_64 + select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_m68k && !BR2_microblaze && !BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_USES_MUSL + bool + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_HAS_UCONTEXT + select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS + +choice + prompt "Toolchain type" + help + Select whether to use the toolchain provided by buildroot + or an external toolchain. + + Some vendors provide toolchains in binary form, some in + source form. + +config BR2_TOOLCHAIN_BUILDROOT + bool "Buildroot toolchain" + depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT + +config BR2_TOOLCHAIN_EXTERNAL + bool "External toolchain" + help + Select if you want to use an existing cross-compiling + toolchain. Buildroot can either download automatically a + toolchain, or use an already installed toolchain. + +endchoice + +source "toolchain/toolchain-buildroot/Config.in" +source "toolchain/toolchain-external/Config.in" + +# Generic toolchain options + +# we want gdb config in the middle of both source and external +# toolchains, but mconf won't let us source the same file twice, +# so put it here instead +source "package/gdb/Config.in.host" + +comment "Toolchain Generic Options" + +# https://sourceware.org/bugzilla/show_bug.cgi?id=21464 +# Affect toolchains built with binutils 2.31.1, still not fixed. +config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 + bool + default y if BR2_or1k + +# https://sourceware.org/bugzilla/show_bug.cgi?id=27597 +# Affect toolchains built with binutils 2.36.1, still not fixed. +config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 + bool + default y if BR2_nios2 + +# Atomic types can be: +# - never lock-free +# - sometimes lock-free +# - always lock-free +# see https://en.cppreference.com/w/c/atomic/ATOMIC_LOCK_FREE_consts +# +# On most architectures, gcc provides "always lock-free" atomic types, +# but a few architectures are limited to "sometimes lock-free" +# types. This hidden option allows to know if the architecture +# provides "always lock-free" atomic types. +config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS + bool + default y + depends on !BR2_nios2 + depends on !BR2_ARM_CPU_ARMV4 + depends on !BR2_ARM_CPU_ARMV5 + depends on !BR2_sparc_v8 + depends on !BR2_m68k_cf5208 + +# GCC uses thunk functions to adjust the 'this' pointer when calling +# C++ member functions in classes derived with multiple inheritance. +# Generation of thunk functions requires support from the compiler +# back end. In the absence of that support target-independent code +# in the C++ front end is used to generate thunk functions, but it +# does not support vararg functions. +# or1k will support it in the gcc mainline starting with gcc-9. +config BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK + bool + default y + depends on !BR2_or1k + depends on !BR2_xtensa + +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. This bug no +# longer exists in gcc 8.x. +config BR2_TOOLCHAIN_HAS_GCC_BUG_63261 + bool + default y if BR2_microblaze + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 + +# Prior to gcc 7.x, exception_ptr, nested_exception and future from +# libstdc++ would only be provided on architectures that support +# always lock-free atomic ints. See +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735. This issue has +# been removed in GCC 7.x, where exception propagation is now +# supported without lock-free atomic int. +config BR2_TOOLCHAIN_HAS_GCC_BUG_64735 + bool + default y if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 + +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. This bug still +# exists in gcc 9.x +config BR2_TOOLCHAIN_HAS_GCC_BUG_68485 + bool + default y if BR2_microblaze + +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no +# longer exists in gcc 8.x. +config BR2_TOOLCHAIN_HAS_GCC_BUG_85180 + bool + default y if BR2_microblaze + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 + +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862 +# An infinite loop exists in the find_base_term() logic of 6.x +# on microblaze. http://autobuild.buildroot.net/results/158e8ebb39713e1b436a5cc1a1916f46c30694df/ +config BR2_TOOLCHAIN_HAS_GCC_BUG_85862 + bool + default y if BR2_microblaze + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7 + +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620 +# ICE: in do_output_reload, at reload1.c:7978 on microblaze. +# This bug no longer exists in gcc 10.x +config BR2_TOOLCHAIN_HAS_GCC_BUG_90620 + bool + default y if BR2_microblaze + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 + +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847 +# ICE: compiler error: Segmentation fault on Nios II. This bug +# no longer exists in gcc 9.x. +config BR2_TOOLCHAIN_HAS_GCC_BUG_93847 + bool + default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99410 +# Error: branch offset out of range on Nios II. This bug +# no longer exists in gcc >= 8.x. +config BR2_TOOLCHAIN_HAS_GCC_BUG_99140 + bool + default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_8 + +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737 +# ICE: SH4 -Os causes internal compiler error. This bug +# still exists in gcc = 11.1.0 +config BR2_TOOLCHAIN_HAS_GCC_BUG_101737 + bool + default y if BR2_sh4 + +config BR2_TOOLCHAIN_HAS_NATIVE_RPC + bool + +config BR2_USE_WCHAR + bool + +config BR2_ENABLE_LOCALE + bool + +config BR2_INSTALL_LIBSTDCPP + bool + +config BR2_TOOLCHAIN_HAS_DLANG + bool + +config BR2_TOOLCHAIN_HAS_FORTRAN + bool + +config BR2_TOOLCHAIN_HAS_THREADS + bool + +config BR2_TOOLCHAIN_HAS_THREADS_DEBUG + bool + +config BR2_TOOLCHAIN_HAS_THREADS_NPTL + bool + +config BR2_TOOLCHAIN_HAS_SSP + bool + +config BR2_TOOLCHAIN_HAS_SSP_STRONG + bool + default y if BR2_TOOLCHAIN_HAS_SSP && BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_TOOLCHAIN_HAS_UCONTEXT + bool + +config BR2_TOOLCHAIN_HAS_OPENMP + bool + +config BR2_TOOLCHAIN_SUPPORTS_PIE + bool + +config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY + bool "Copy gconv libraries" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + The gconv libraries are used to convert between different + character sets (charsets). + + Say 'y' if you need to store and/or display different + charsets. + +config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST + string "Gconv libraries to copy" + depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY + help + Set to the list of gconv libraries to copy. + Leave empty to copy all gconv libraries. + + Specify only the basename of the libraries, leave + out the .so extension. Eg.: + IBM850 ISO8859-15 UNICODE + + Note: the full set of gconv libs are ~8MiB (on ARM). + +config BR2_TOOLCHAIN_EXTRA_LIBS + string "Extra toolchain libraries to be copied to target" + default BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS if BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS != "" # legacy + depends on !BR2_STATIC_LIBS + help + If your toolchain provides extra libraries that need to be + copied to the target filesystem, enter them here, separated + by spaces. The library should not include a suffix or any + type of pre/post wildcard. + + Examples where this can be useful is for adding debug + libraries to the target like the GCC libsanitizer. + e.g. "libasan liblsan libtsan libubsan" + +# This boolean is true if the toolchain provides a built-in full +# featured gettext implementation (glibc), and false if only a stub +# gettext implementation is provided (uclibc, musl) +config BR2_TOOLCHAIN_HAS_FULL_GETTEXT + bool + +config BR2_USE_MMU + bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL + default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY + help + If your target has a MMU, you should say Y here. If you + are unsure, just say Y. + +config BR2_TARGET_OPTIMIZATION + string "Target Optimizations" + default "" + help + Optimizations to use when building for the target host. + NOTE: gcc optimization level is defined in build options. + +config BR2_TARGET_LDFLAGS + string "Target linker options" + help + Extra options to pass to the linker when building for the + target. + + Note that options with a '$' sign (eg. + -Wl,-rpath='$ORIGIN/../lib') are not supported. + +config BR2_ECLIPSE_REGISTER + bool "Register toolchain within Eclipse Buildroot plug-in" + help + This options tells Buildroot to generate the necessary + configuration files to make your toolchain appear within + Eclipse, through the Eclipse Buildroot plugin. + +# Options for packages to depend on, if they require at least a +# specific version of the kernel headers. +# Toolchains should choose the adequate option (ie. the highest +# version, not all of them). +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + bool + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_6 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_6 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9 + select BR2_TOOLCHAIN_HEADERS_LATEST + +# This should be selected by the latest version, above, to indicate that +# Buildroot does not know of more recent headers than the ones selected. +# This allows using toolchains with headers more recent than Buildroot +# knows about, while still enforcing strict check for older headers. +config BR2_TOOLCHAIN_HEADERS_LATEST + bool + +# This order guarantees that the highest version is set, as kconfig +# stops affecting a value on the first matching default. +config BR2_TOOLCHAIN_HEADERS_AT_LEAST + string + default "5.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 + default "5.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9 + default "5.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8 + default "5.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7 + default "5.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_6 + default "5.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5 + default "5.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + default "5.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 + default "5.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2 + default "5.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 + default "5.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 + default "4.20" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20 + default "4.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + default "4.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 + default "4.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 + default "4.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16 + default "4.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15 + default "4.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 + default "4.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 + default "4.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 + default "4.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 + default "4.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10 + default "4.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + default "4.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8 + default "4.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7 + default "4.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6 + default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 + default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 + default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 + default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + default "2.6" + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + bool + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_5 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_6 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_7 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_6 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_8 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_7 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_9 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_8 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_10 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + +# This order guarantees that the highest version is set, as kconfig +# stops affecting a value on the first matching default. +config BR2_TOOLCHAIN_GCC_AT_LEAST + string + default "10" if BR2_TOOLCHAIN_GCC_AT_LEAST_10 + default "9" if BR2_TOOLCHAIN_GCC_AT_LEAST_9 + default "8" if BR2_TOOLCHAIN_GCC_AT_LEAST_8 + default "7" if BR2_TOOLCHAIN_GCC_AT_LEAST_7 + default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6 + default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5 + default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 + default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + +config BR2_TOOLCHAIN_HAS_MNAN_OPTION + bool + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_TOOLCHAIN_HAS_SYNC_1 + bool + default y + depends on !BR2_m68k_cf + depends on !BR2_microblaze + depends on !BR2_sparc + depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) + +config BR2_TOOLCHAIN_HAS_SYNC_2 + bool + default y if BR2_TOOLCHAIN_HAS_SYNC_1 + +config BR2_TOOLCHAIN_HAS_SYNC_4 + bool + default y + depends on !BR2_m68k_cf + depends on !BR2_sparc + depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) + +# The availability of __sync for 8-byte types on ARM is somewhat +# complicated: +# +# - It appeared in gcc starting with gcc 4.7. +# +# - On ARMv7, there is no problem, it can be directly implemented in +# userspace. +# +# - On < ARMv7, it requires help from the kernel. Unfortunately, the +# libgcc code implementing 8-byte __sync with the help from the +# kernel calls __write() when a failure occurs, which is a function +# internal to glibc, not available in uClibc and musl. This means +# that the 8-byte __sync operations are not available on < ARMv7 +# with uClibc and musl. This problem was fixed as part of gcc +# PR68059, which was backported to the gcc 5 branch, but isn't yet +# part of any gcc 5.x release. +# +config BR2_TOOLCHAIN_ARM_HAS_SYNC_8 + bool + default y + depends on BR2_arm || BR2_armeb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A + +# 8-byte intrinsics available on most x86 CPUs, except a few old ones +config BR2_TOOLCHAIN_X86_HAS_SYNC_8 + bool + default y + depends on BR2_i386 + depends on !BR2_x86_i486 + depends on !BR2_x86_c3 + depends on !BR2_x86_winchip_c6 + depends on !BR2_x86_winchip2 + +# 8-byte intrinsics available: +# - On all 64 bits architecture +# - On a certain combinations of ARM platforms +# - On certain x86 32 bits CPUs +config BR2_TOOLCHAIN_HAS_SYNC_8 + bool + default y if BR2_ARCH_IS_64 + default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8 + default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8 + +# libatomic is available since gcc 4.8, when thread support is +# enabled. Also, libatomic doesn't recognize "uclinux" as a valid OS +# part of the tuple, and is therefore not build on uclinux targets, +# which is why BR2_BINFMT_FLAT configurations are excluded. +config BR2_TOOLCHAIN_HAS_LIBATOMIC + bool + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \ + !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 && \ + BR2_TOOLCHAIN_HAS_THREADS && \ + !BR2_BINFMT_FLAT + +# __atomic intrinsics are available: +# - with gcc 4.8, either through built-ins or libatomic, on all +# architectures. Since we don't want to separate the cases where +# libatomic is needed vs. not needed, we simplify thing and only +# support situations where libatomic is available, even if on some +# architectures libatomic is not strictly needed as all __atomic +# intrinsics might be built-in. The only case where libatomic is +# missing entirely is when the toolchain does not have support for +# threads. However, a package that does not need threads but still +# uses atomics is quite a corner case, which does not warrant the +# added complexity. +# - with gcc 4.7, libatomic did not exist, so only built-ins are +# available. This means that __atomic can only be used in a subset +# of the architectures +config BR2_TOOLCHAIN_HAS_ATOMIC + bool + default y if BR2_TOOLCHAIN_HAS_LIBATOMIC + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64 + +# - libquadmath is not needed/available on all architectures (but gcc +# correctly handles this already). +# - At least, libquadmath is available on: +# - i*86 +# - x86_64 +# - When available, libquadmath requires wchar support. +config BR2_TOOLCHAIN_HAS_LIBQUADMATH + bool + default y if BR2_i386 || BR2_x86_64 + +endmenu diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk new file mode 100644 index 00000000..17bc159f --- /dev/null +++ b/toolchain/helpers.mk @@ -0,0 +1,532 @@ +# This Makefile fragment declares toolchain related helper functions. + +# The copy_toolchain_lib_root function copies a toolchain library and +# its symbolic links from the sysroot directory to the target +# directory. Note that this function is used both by the external +# toolchain logic, and the glibc package, so care must be taken when +# changing this function. +# +# $1: library name pattern (can include glob wildcards) +# +copy_toolchain_lib_root = \ + LIBPATTERN="$(strip $1)"; \ + LIBPATHS=`find $(STAGING_DIR)/ -name "$${LIBPATTERN}" 2>/dev/null` ; \ + for LIBPATH in $${LIBPATHS} ; do \ + while true ; do \ + LIBNAME=`basename $${LIBPATH}`; \ + DESTDIR=`echo $${LIBPATH} | sed "s,^$(STAGING_DIR)/,," | xargs dirname` ; \ + mkdir -p $(TARGET_DIR)/$${DESTDIR}; \ + rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \ + if test -h $${LIBPATH} ; then \ + cp -d $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \ + LIBPATH="`readlink -f $${LIBPATH}`"; \ + elif test -f $${LIBPATH}; then \ + $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \ + break ; \ + else \ + exit -1; \ + fi; \ + done; \ + done + +# +# Copy the full external toolchain sysroot directory to the staging +# dir. The operation of this function is rendered a little bit +# complicated by the support for multilib toolchains. +# +# We start by copying etc, 'lib', sbin, usr and usr/'lib' from the +# sysroot of the selected architecture variant (as pointed to by +# ARCH_SYSROOT_DIR). This allows to import into the staging directory +# the C library and companion libraries for the correct architecture +# variant. 'lib' may not be literally 'lib' but could be something else, +# e.g. lib32-fp (as determined by ARCH_LIB_DIR) and we only want to copy +# that lib directory and no other. When copying usr, we therefore need +# to be extra careful not to include usr/lib* but we _do_ want to +# include usr/libexec. +# We are selective in the directories we copy since other directories +# might exist for other architecture variants (on Codesourcery +# toolchain, the sysroot for the default architecture variant contains +# the armv4t and thumb2 subdirectories, which are the sysroot for the +# corresponding architecture variants), and we don't want to import +# them. +# +# If ARCH_LIB_DIR is not a singular directory component, e.g. +# 'lib32/octeon2', then symbolic links in ARCH_LIB_DIR and +# usr/ARCH_LIB_DIR may be broken because Buildroot will flatten the +# directory structure (e.g. lib32/octeon2/foo is actually stored in +# lib/foo). This is only relevant for links that contain one or more ../ +# components, as links to the current directory are always fine. +# We need to fix the broken links by removing the right amount of ../ +# dots from the link destination. +# Once the link destination is valid again, it can be simplified to +# remove the dependency on intermediate directory symlinks. +# +# It is possible that ARCH_LIB_DIR does not contain the dynamic loader +# (ld*.so or similar) because it (or the main symlink to it) normally +# resides in /lib while ARCH_LIB_DIR may be something else (e.g. lib64, +# lib/, ...). Therefore, copy the dynamic loader separately. +# +# Then, if the selected architecture variant is not the default one +# (i.e, if SYSROOT_DIR != ARCH_SYSROOT_DIR), then we : +# +# * Import the header files from the default architecture +# variant. Header files are typically shared between the sysroots +# for the different architecture variants. If we use the +# non-default one, header files were not copied by the previous +# step, so we copy them here from the sysroot of the default +# architecture variant. +# +# * Create a symbolic link that matches the name of the subdirectory +# for the architecture variant in the original sysroot. This is +# required as the compiler will by default look in +# sysroot_dir/arch_variant/ for libraries and headers, when the +# non-default architecture variant is used. Without this, the +# compiler fails to find libraries and headers. +# +# Some toolchains (i.e Linaro binary toolchains) store support +# libraries (libstdc++, libgcc_s) outside of the sysroot, so we simply +# copy all the libraries from the "support lib directory" into our +# sysroot. +# +# Note that the 'locale' directories are not copied. They are huge +# (400+MB) in CodeSourcery toolchains, and they are not really useful. +# +# $1: main sysroot directory of the toolchain +# $2: arch specific sysroot directory of the toolchain +# $3: arch specific subdirectory in the sysroot +# $4: directory of libraries ('lib', 'lib32' or 'lib64') +# $5: support lib directories (for toolchains storing libgcc_s, +# libstdc++ and other gcc support libraries outside of the +# sysroot) +copy_toolchain_sysroot = \ + SYSROOT_DIR="$(strip $1)"; \ + ARCH_SYSROOT_DIR="$(strip $2)"; \ + ARCH_SUBDIR="$(strip $3)"; \ + ARCH_LIB_DIR="$(strip $4)" ; \ + SUPPORT_LIB_DIR="$(strip $5)" ; \ + for i in etc $${ARCH_LIB_DIR} sbin usr usr/$${ARCH_LIB_DIR}; do \ + if [ ! -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \ + continue ; \ + fi ; \ + if [ "$$i" = "usr" ]; then \ + rsync -au --chmod=u=rwX,go=rX --exclude 'locale/' \ + --include '/libexec*/' --exclude '/lib*/' \ + $${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \ + else \ + rsync -au --chmod=u=rwX,go=rX --exclude 'locale/' \ + $${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \ + fi ; \ + done ; \ + for link in $$(find $(STAGING_DIR) -type l); do \ + target=$$(readlink $${link}) ; \ + if [ "$${target}" == "$${target$(SHARP_SIGN)/}" ] ; then \ + continue ; \ + fi ; \ + relpath="$(call relpath_prefix,$${target$(SHARP_SIGN)/})" ; \ + echo "Fixing symlink $${link} from $${target} to $${relpath}$${target$(SHARP_SIGN)/}" ; \ + ln -sf $${relpath}$${target$(SHARP_SIGN)/} $${link} ; \ + done ; \ + relpath="$(call relpath_prefix,$${ARCH_LIB_DIR})" ; \ + if [ "$${relpath}" != "" ]; then \ + for i in $$(find -H $(STAGING_DIR)/$${ARCH_LIB_DIR} $(STAGING_DIR)/usr/$${ARCH_LIB_DIR} -type l -xtype l); do \ + LINKTARGET=`readlink $$i` ; \ + NEWLINKTARGET=$${LINKTARGET\#$$relpath} ; \ + ln -sf $${NEWLINKTARGET} $$i ; \ + $(call simplify_symlink,$$i,$(STAGING_DIR)) ; \ + done ; \ + fi ; \ + if [ ! -e $(STAGING_DIR)/lib/ld*.so.* ]; then \ + if [ -e $${ARCH_SYSROOT_DIR}/lib/ld*.so.* ]; then \ + cp -a $${ARCH_SYSROOT_DIR}/lib/ld*.so.* $(STAGING_DIR)/lib/ ; \ + fi ; \ + fi ; \ + if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \ + if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \ + cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \ + fi ; \ + mkdir -p `dirname $(STAGING_DIR)/$${ARCH_SUBDIR}` ; \ + relpath="$(call relpath_prefix,$${ARCH_SUBDIR})./" ; \ + ln -s $${relpath} $(STAGING_DIR)/$${ARCH_SUBDIR} ; \ + echo "Symlinking $(STAGING_DIR)/$${ARCH_SUBDIR} -> $${relpath}" ; \ + fi ; \ + if test -n "$${SUPPORT_LIB_DIR}" ; then \ + cp -a $${SUPPORT_LIB_DIR}/* $(STAGING_DIR)/lib/ ; \ + fi ; \ + find $(STAGING_DIR) -type d | xargs chmod 755 + +# +# Check the specified kernel headers version actually matches the +# version in the toolchain. +# +# $1: build directory +# $2: sysroot directory +# $3: kernel version string, in the form: X.Y +# $4: test to do for the latest kernel version, 'strict' or 'loose' +# always 'strict' if this is not the latest version. +# +check_kernel_headers_version = \ + if ! support/scripts/check-kernel-headers.sh $(1) $(2) $(3) \ + $(if $(BR2_TOOLCHAIN_HEADERS_LATEST),$(4),strict); \ + then \ + exit 1; \ + fi + +# +# Check the specific gcc version actually matches the version in the +# toolchain +# +# $1: path to gcc +# $2: expected gcc version +# +check_gcc_version = \ + expected_version="$(strip $2)" ; \ + if [ -z "$${expected_version}" ]; then \ + exit 0 ; \ + fi; \ + real_version=`$(1) -dumpversion` ; \ + if [[ ! "$${real_version}." =~ ^$${expected_version}\. ]] ; then \ + printf "Incorrect selection of gcc version: expected %s.x, got %s\n" \ + "$${expected_version}" "$${real_version}" ; \ + exit 1 ; \ + fi + +# +# Check the availability of a particular glibc feature. This function +# is used to check toolchain options that are always supported by +# glibc, so we simply check that the corresponding option is properly +# enabled. +# +# $1: Buildroot option name +# $2: feature description +# +check_glibc_feature = \ + if [ "$($(1))" != "y" ] ; then \ + echo "$(2) available in C library, please enable $(1)" ; \ + exit 1 ; \ + fi + +# +# Check the availability of RPC support in a glibc toolchain +# +# $1: sysroot directory +# +check_glibc_rpc_feature = \ + IS_IN_LIBC=`test -f $(1)/usr/include/rpc/rpc.h && echo y` ; \ + if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \ + echo "RPC support available in C library, please enable BR2_TOOLCHAIN_EXTERNAL_INET_RPC" ; \ + exit 1 ; \ + fi ; \ + if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \ + echo "RPC support not available in C library, please disable BR2_TOOLCHAIN_EXTERNAL_INET_RPC" ; \ + exit 1 ; \ + fi + +# +# Check the correctness of a glibc external toolchain configuration. +# 1. Check that the C library selected in Buildroot matches the one +# of the external toolchain +# 2. Check that all the C library-related features are enabled in the +# config, since glibc always supports all of them +# +# $1: sysroot directory +# +check_glibc = \ + SYSROOT_DIR="$(strip $1)"; \ + if test `find -L $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \ + echo "Incorrect selection of the C library"; \ + exit -1; \ + fi; \ + $(call check_glibc_feature,BR2_USE_MMU,MMU support) ;\ + $(call check_glibc_rpc_feature,$${SYSROOT_DIR}) + +# +# Check that the selected C library really is musl +# +# $1: cross-gcc path +# $2: cross-readelf path +check_musl = \ + __CROSS_CC=$(strip $1) ; \ + libc_a_path=`$${__CROSS_CC} -print-file-name=libc.a` ; \ + if ! strings $${libc_a_path} | grep -q MUSL_LOCPATH ; then \ + echo "Incorrect selection of the C library" ; \ + exit -1; \ + fi + +# +# Check the conformity of Buildroot configuration with regard to the +# uClibc configuration of the external toolchain, for a particular +# feature. +# +# If 'Buildroot option name' ($2) is empty it means the uClibc option +# is mandatory. +# +# $1: uClibc macro name +# $2: Buildroot option name +# $3: uClibc config file +# $4: feature description +# +check_uclibc_feature = \ + IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \ + if [ -z "$(2)" ] ; then \ + if [ "$${IS_IN_LIBC}" != "y" ] ; then \ + echo "$(4) not available in C library, toolchain unsuitable for Buildroot" ; \ + exit 1 ; \ + fi ; \ + else \ + if [ "$($(2))" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \ + echo "$(4) available in C library, please enable $(2)" ; \ + exit 1 ; \ + fi ; \ + if [ "$($(2))" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \ + echo "$(4) not available in C library, please disable $(2)" ; \ + exit 1 ; \ + fi ; \ + fi + +# +# Check the correctness of a uclibc external toolchain configuration +# 1. Check that the C library selected in Buildroot matches the one +# of the external toolchain +# 2. Check that the features enabled in the Buildroot configuration +# match the features available in the uClibc of the external +# toolchain +# +# $1: sysroot directory +# +check_uclibc = \ + SYSROOT_DIR="$(strip $1)"; \ + if ! test -f $${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; then \ + echo "Incorrect selection of the C library"; \ + exit -1; \ + fi; \ + UCLIBC_CONFIG_FILE=$${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; \ + $(call check_uclibc_feature,__ARCH_USE_MMU__,BR2_USE_MMU,$${UCLIBC_CONFIG_FILE},MMU support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_LFS__,,$${UCLIBC_CONFIG_FILE},Large file support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_TOOLCHAIN_HAS_NATIVE_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\ + $(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_THREADS_NATIVE__,BR2_TOOLCHAIN_HAS_THREADS_NPTL,$${UCLIBC_CONFIG_FILE},NPTL thread support) + +# +# Check that the Buildroot configuration of the ABI matches the +# configuration of the external toolchain. +# +# $1: cross-gcc path +# $2: cross-readelf path +# +check_arm_abi = \ + __CROSS_CC=$(strip $1) ; \ + EXT_TOOLCHAIN_TARGET=`LANG=C $${__CROSS_CC} -v 2>&1 | grep ^Target | cut -f2 -d ' '` ; \ + if ! echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi(hf)?$$' ; then \ + echo "External toolchain uses the unsuported OABI" ; \ + exit 1 ; \ + fi ; \ + if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o $(BUILD_DIR)/.br-toolchain-test.tmp - ; then \ + rm -f $(BUILD_DIR)/.br-toolchain-test.tmp*; \ + abistr_$(BR2_ARM_EABI)='EABI'; \ + abistr_$(BR2_ARM_EABIHF)='EABIhf'; \ + echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \ + exit 1 ; \ + fi ; \ + rm -f $(BUILD_DIR)/.br-toolchain-test.tmp* + +# +# Check that the external toolchain supports C++ +# +# $1: cross-g++ path +# +check_cplusplus = \ + __CROSS_CXX=$(strip $1) ; \ + $${__CROSS_CXX} -v > /dev/null 2>&1 ; \ + if test $$? -ne 0 ; then \ + echo "C++ support is selected but is not available in external toolchain" ; \ + exit 1 ; \ + fi + +# +# +# Check that the external toolchain supports D language +# +# $1: cross-gdc path +# +check_dlang = \ + __CROSS_GDC=$(strip $1) ; \ + __o=$(BUILD_DIR)/.br-toolchain-test-dlang.tmp ; \ + printf 'import std.stdio;\nvoid main() { writeln("Hello World!"); }\n' | \ + $${__CROSS_GDC} -x d -o $${__o} - ; \ + if test $$? -ne 0 ; then \ + rm -f $${__o}* ; \ + echo "D language support is selected but is not available in external toolchain" ; \ + exit 1 ; \ + fi ; \ + rm -f $${__o}* \ + +# +# +# Check that the external toolchain supports Fortran +# +# $1: cross-gfortran path +# +check_fortran = \ + __CROSS_FC=$(strip $1) ; \ + __o=$(BUILD_DIR)/.br-toolchain-test-fortran.tmp ; \ + printf 'program hello\n\tprint *, "Hello Fortran!\\n"\nend program hello\n' | \ + $${__CROSS_FC} -x f95 -o $${__o} - ; \ + if test $$? -ne 0 ; then \ + rm -f $${__o}* ; \ + echo "Fortran support is selected but is not available in external toolchain" ; \ + exit 1 ; \ + fi ; \ + rm -f $${__o}* \ + +# +# +# Check that the external toolchain supports OpenMP +# +# $1: cross-gcc path +# +check_openmp = \ + __CROSS_CC=$(strip $1) ; \ + __o=$(BUILD_DIR)/.br-toolchain-test-openmp.tmp ; \ + printf '\#include \nint main(void) { return omp_get_thread_num(); }' | \ + $${__CROSS_CC} -fopenmp -x c -o $${__o} - ; \ + if test $$? -ne 0 ; then \ + rm -f $${__o}* ; \ + echo "OpenMP support is selected but is not available in external toolchain"; \ + exit 1 ; \ + fi ; \ + rm -f $${__o}* \ + +# +# Check that the cross-compiler given in the configuration exists +# +# $1: cross-gcc path +# +check_cross_compiler_exists = \ + __CROSS_CC=$(strip $1) ; \ + $${__CROSS_CC} -v > /dev/null 2>&1 ; \ + if test $$? -ne 0 ; then \ + echo "Cannot execute cross-compiler '$${__CROSS_CC}'" ; \ + exit 1 ; \ + fi + +# +# Check for toolchains known not to work with Buildroot. +# - For the Angstrom toolchains, we check by looking at the vendor part of +# the host tuple. +# - Exclude distro-class toolchains which are not relocatable. +# - Exclude broken toolchains which return "libc.a" with -print-file-name. +# - Exclude toolchains which doesn't support --sysroot option. +# +# $1: cross-gcc path +# +check_unusable_toolchain = \ + __CROSS_CC=$(strip $1) ; \ + vendor=`$${__CROSS_CC} -dumpmachine | cut -f2 -d'-'` ; \ + if test "$${vendor}" = "angstrom" ; then \ + echo "Angstrom toolchains are not pure toolchains: they contain" ; \ + echo "many other libraries than just the C library, which makes" ; \ + echo "them unsuitable as external toolchains for build systems" ; \ + echo "such as Buildroot." ; \ + exit 1 ; \ + fi; \ + with_sysroot=`$${__CROSS_CC} -v 2>&1 |sed -r -e '/.* --with-sysroot=([^[:space:]]+)[[:space:]].*/!d; s//\1/'`; \ + if test "$${with_sysroot}" = "/" ; then \ + echo "Distribution toolchains are unsuitable for use by Buildroot," ; \ + echo "as they were configured in a way that makes them non-relocatable,"; \ + echo "and contain a lot of pre-built libraries that would conflict with"; \ + echo "the ones Buildroot wants to build."; \ + exit 1; \ + fi; \ + libc_a_path=`$${__CROSS_CC} -print-file-name=libc.a` ; \ + if test "$${libc_a_path}" = "libc.a" ; then \ + echo "Unable to detect the toolchain sysroot, Buildroot cannot use this toolchain." ; \ + exit 1 ; \ + fi ; \ + sysroot_dir="$(call toolchain_find_sysroot,$${__CROSS_CC})" ; \ + if test -z "$${sysroot_dir}" ; then \ + echo "External toolchain doesn't support --sysroot. Cannot use." ; \ + exit 1 ; \ + fi + +# +# Check if the toolchain has SSP (stack smashing protector) support +# +# $1: cross-gcc path +# $2: gcc ssp option +# +check_toolchain_ssp = \ + __CROSS_CC=$(strip $1) ; \ + __HAS_SSP=`echo 'void main(){}' | $${__CROSS_CC} -Werror -fstack-protector -x c - -o $(BUILD_DIR)/.br-toolchain-test.tmp >/dev/null 2>&1 && echo y` ; \ + if [ "$(BR2_TOOLCHAIN_HAS_SSP)" != "y" -a "$${__HAS_SSP}" = "y" ] ; then \ + echo "SSP support available in this toolchain, please enable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP" ; \ + exit 1 ; \ + fi ; \ + if [ "$(BR2_TOOLCHAIN_HAS_SSP)" = "y" -a "$${__HAS_SSP}" != "y" ] ; then \ + echo "SSP support not available in this toolchain, please disable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP" ; \ + exit 1 ; \ + fi ; \ + __SSP_OPTION=$(2); \ + if [ -n "$${__SSP_OPTION}" ] ; then \ + if ! echo 'void main(){}' | $${__CROSS_CC} -Werror $${__SSP_OPTION} -x c - -o $(BUILD_DIR)/.br-toolchain-test.tmp >/dev/null 2>&1 ; then \ + echo "SSP option $${__SSP_OPTION} not available in this toolchain, please select another SSP level" ; \ + exit 1 ; \ + fi; \ + fi; \ + rm -f $(BUILD_DIR)/.br-toolchain-test.tmp* + +# +# Generate gdbinit file for use with Buildroot +# +gen_gdbinit_file = \ + mkdir -p $(STAGING_DIR)/usr/share/buildroot/ ; \ + echo "set sysroot $(STAGING_DIR)" > $(STAGING_DIR)/usr/share/buildroot/gdbinit + +# Given a path, determine the relative prefix (../) needed to return to the +# root level. Note that the last component is treated as a file component; use a +# trailing slash to force treating it as a directory. Examples: +# relpath_prefix(lib32) = "" +# relpath_prefix(lib32/octeon2) = "../" +# relpath_prefix(lib32/octeon2/) = "../../" +# +# $1: input path +define relpath_prefix +$$( \ + prefix="" ; \ + nbslashs=`printf $1 | sed 's%[^/]%%g' | wc -c` ; \ + for slash in `seq 1 $${nbslashs}` ; do \ + prefix=$${prefix}"../" ; \ + done ; \ + printf "$$prefix" ; \ +) +endef + +# Replace the destination of a symbolic link with a simpler version +# For example, +# usr/lib/libfoo.so -> ../../lib32/libfoo.so.1 +# becomes +# usr/lib/libfoo.so -> ../../lib/libfoo.so.1 +# since 'lib32' is a symlink to 'lib'. +# +# Likewise, +# usr/lib/octeon2/libbar.so -> ../../../lib32/octeon2/libbar.so.1 +# becomes +# usr/lib/octeon2/libbar.so -> ../../lib/libbar.so.1 +# assuming lib32->lib and lib/octeon2->lib. +# +# $1: symlink +# $2: base path +define simplify_symlink +( \ + FULL_SRC="$$(readlink -f $$(dirname $1))/$$(basename $1)" ; \ + FULL_DEST="$$(readlink -f $1)" ; \ + FULL_BASE="$$(readlink -f $2)" ; \ + REL_SRC="$${FULL_SRC#$${FULL_BASE}/}" ; \ + REL_DEST="$${FULL_DEST#$${FULL_BASE}/}" ; \ + DOTS="$(call relpath_prefix,$${REL_SRC})" ; \ + ln -sf "$${DOTS}$${REL_DEST}" "$${FULL_SRC}" ; \ +) +endef diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in new file mode 100644 index 00000000..4004c0ed --- /dev/null +++ b/toolchain/toolchain-buildroot/Config.in @@ -0,0 +1,117 @@ +# Config entries for internal toolchain backend + +if BR2_TOOLCHAIN_BUILDROOT + +comment "Toolchain Buildroot Options" + +config BR2_TOOLCHAIN_BUILDROOT_VENDOR + string "custom toolchain vendor name" + default "buildroot" + help + This option allows to customize the "vendor" part of the + toolchain tuple, where the toolchain tuple has the form + ---. The default value, "buildroot", + is fine for most cases, except in very specific situations + where gcc might make different decisions based on the vendor + part of the tuple. The value "unknown" is not allowed, as the + cross-compiling toolchain might then be confused with the + native toolchain when the target and host architecture are + identical. The value can not be empty either. + + If you're not sure, just leave the default "buildroot" value. + +choice + prompt "C library" + default BR2_TOOLCHAIN_BUILDROOT_UCLIBC + default BR2_TOOLCHAIN_BUILDROOT_GLIBC if BR2_powerpc64 + +config BR2_TOOLCHAIN_BUILDROOT_UCLIBC + bool "uClibc-ng" + depends on BR2_aarch64 || BR2_aarch64_be || BR2_arcle || BR2_arceb || \ + BR2_arm || BR2_armeb || \ + BR2_i386 || BR2_m68k || BR2_microblaze || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_or1k || BR2_powerpc || BR2_RISCV_64 || BR2_sh2a || \ + BR2_sh4 || BR2_sh4eb || BR2_sparc || BR2_xtensa || \ + BR2_x86_64 + select BR2_TOOLCHAIN_USES_UCLIBC + help + This option selects uClibc-ng as the C library for the + cross-compilation toolchain. + + http://uclibc-ng.org + +config BR2_TOOLCHAIN_BUILDROOT_GLIBC + bool "glibc" + depends on BR2_arm || BR2_armeb || BR2_aarch64 || \ + BR2_aarch64_be || BR2_i386 || BR2_mips || \ + BR2_mipsel || BR2_mips64 || BR2_mips64el|| \ + BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ + BR2_riscv || BR2_s390x || BR2_sh || \ + BR2_sparc64 || BR2_x86_64 || BR2_microblaze || \ + BR2_nios2 || (BR2_arc && BR2_ARC_ATOMIC_EXT) || BR2_csky + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 || !BR2_powerpc64le + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 || !BR2_RISCV_64 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 || !BR2_arc + depends on !BR2_powerpc_SPE + depends on BR2_RISCV_ISA_RVA || !BR2_riscv + select BR2_TOOLCHAIN_USES_GLIBC + help + This option selects glibc as the C library for the + cross-compilation toolchain. + + http://www.gnu.org/software/libc/ + +comment "glibc needs a toolchain w/ dynamic library, kernel headers >= 3.2" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + +# glibc >= 2.26 require kernel headers >= 3.10 on powerpc64le. +comment "glibc on powerpc64le needs a toolchain w/ headers >= 3.10" + depends on BR2_powerpc64le + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + +# Support for MIPS NAN2008 needs headers >= 4.5 +comment "glibc on MIPS w/ NAN2008 needs a toolchain w/ headers >= 4.5" + depends on BR2_MIPS_NAN_2008 + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 + +config BR2_TOOLCHAIN_BUILDROOT_MUSL + bool "musl" + depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \ + BR2_microblaze || BR2_mips || BR2_mipsel || BR2_mips64 || \ + BR2_mips64el || BR2_or1k || BR2_powerpc || BR2_powerpc64 || \ + BR2_powerpc64le || BR2_RISCV_64 || BR2_sh || BR2_x86_64 + depends on !BR2_powerpc_SPE # not supported, build breaks + depends on !(BR2_powerpc64 || BR2_powerpc64le) || BR2_POWERPC_CPU_HAS_ALTIVEC + # sh2 nommu is supported by musl, but we don't have support + # for it in Buildroot. + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_USES_MUSL + help + This option selects musl as the C library for the + cross-compilation toolchain. + + https://www.musl-libc.org/ + +endchoice + +config BR2_TOOLCHAIN_BUILDROOT_LIBC + string + default "uclibc" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + default "glibc" if BR2_TOOLCHAIN_BUILDROOT_GLIBC + default "musl" if BR2_TOOLCHAIN_BUILDROOT_MUSL + +source "package/linux-headers/Config.in.host" +source "package/linux-headers/Config.in" +source "package/musl/Config.in" +source "package/uclibc/Config.in" +source "package/glibc/Config.in" +source "package/binutils/Config.in.host" +source "package/gcc/Config.in.host" +source "package/elf2flt/Config.in.host" +endif diff --git a/toolchain/toolchain-buildroot/toolchain-buildroot.mk b/toolchain/toolchain-buildroot/toolchain-buildroot.mk new file mode 100644 index 00000000..b30cc332 --- /dev/null +++ b/toolchain/toolchain-buildroot/toolchain-buildroot.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# toolchain-buildroot +# +################################################################################ + +BR_LIBC = $(call qstrip,$(BR2_TOOLCHAIN_BUILDROOT_LIBC)) + +# Triggering the build of the host-gcc-final will automatically do the +# build of binutils, uClibc, kernel headers and all the intermediate +# gcc steps. + +TOOLCHAIN_BUILDROOT_DEPENDENCIES = host-gcc-final + +TOOLCHAIN_BUILDROOT_ADD_TOOLCHAIN_DEPENDENCY = NO + +$(eval $(virtual-package)) diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in new file mode 100644 index 00000000..2177e6a6 --- /dev/null +++ b/toolchain/toolchain-external/Config.in @@ -0,0 +1,165 @@ +if BR2_TOOLCHAIN_EXTERNAL + +comment "Toolchain External Options" + +choice + prompt "Toolchain" + +comment "glibc toolchains only available with shared lib support" + depends on BR2_STATIC_LIBS + +# Kept toolchains sorted by architecture in order to use some toolchain +# as default choice + +# Aarch64 (use ARM toolchain by default) +source "toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in" +source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in" +source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in" + +# Aarch64 big-endian +source "toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in" +source "toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in" + +# ARC +source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in" + +# Andes +source "toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in" + +# ARM (use ARM toolchain by default) +source "toolchain/toolchain-external/toolchain-external-arm-arm/Config.in" +source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in" +source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in" + +# ARM big-endian +source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in" + +# MIPS (use codesourcery toolchain by default) +source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in" +source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in" +source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in" + +# NIOSII +source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in" + +# Bootlin toolchains, available for virtually all architectures +source "toolchain/toolchain-external/toolchain-external-bootlin/Config.in" + +# Kept last, so it remains the non-default choice, unless there isn't +# any available toolchain profile for the currently selected +# architecture, but before toolchains from br2-external trees. +source "toolchain/toolchain-external/toolchain-external-custom/Config.in" + +# Toolchains from br2-external trees, if any +source "$BR2_BASE_DIR/.br2-external.in.toolchains" + +endchoice + +choice + prompt "Toolchain origin" + # Keep compatibility with old defconfig files that are using + # custom toolchains, and which are therefore assuming that + # "preinstalled" in the default choice. + default BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED if BR2_TOOLCHAIN_EXTERNAL_CUSTOM + +config BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + bool "Toolchain to be downloaded and installed" + help + Select this option if you want Buildroot to download and + install the toolchain. If you have selected a custom + toolchain, specify the URL in BR2_TOOLCHAIN_EXTERNAL_URL. + +config BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED + bool "Pre-installed toolchain" + help + Select this option if you want to use a pre-installed + toolchain. Specify the path to this toolchain in + BR2_TOOLCHAIN_EXTERNAL_PATH. + +endchoice + +config BR2_TOOLCHAIN_EXTERNAL_PATH + string "Toolchain path" + default "" + depends on BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED + help + Path to where the external toolchain is installed. The + compiler itself is expected to be in the "bin" subdirectory + of this path. + + If empty, the compiler will be searched in $PATH. + +config BR2_TOOLCHAIN_EXTERNAL_GLIBC + bool + select BR2_TOOLCHAIN_USES_GLIBC + +config BR2_TOOLCHAIN_EXTERNAL_UCLIBC + bool + select BR2_TOOLCHAIN_USES_UCLIBC + +config BR2_TOOLCHAIN_EXTERNAL_MUSL + bool + select BR2_TOOLCHAIN_USES_MUSL + # Compatibility headers: cdefs.h, queue.h + select BR2_PACKAGE_MUSL_COMPAT_HEADERS + +# Make sure the virtual-package infra checks the provider +config BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL + bool + default y + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + string + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + string + +# Kept toolchains sorted as in the choice above +# The toolchain Config.in.options must define +# BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL and BR2_TOOLCHAIN_EXTERNAL_PREFIX + +# Aarch64 +source "toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in.options" +source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options" +source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options" + +# Aarch64 big-endian +source "toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in.options" +source "toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in.options" + +# ARC +source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options" + +# Andes +source "toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options" + +# ARM +source "toolchain/toolchain-external/toolchain-external-arm-arm/Config.in.options" +source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options" +source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options" + +# ARM big-endian +source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options" + +# MIPS +source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options" +source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options" +source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options" + +# NIOSII +source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options" + +# Bootlin toolchains +source "toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options" + +# Custom toolchains +source "toolchain/toolchain-external/toolchain-external-custom/Config.in.options" + +config BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + bool "Copy gdb server to the Target" + depends on BR2_TOOLCHAIN_EXTERNAL + help + Copy the gdbserver provided by the external toolchain to the + target. + +endif # BR2_TOOLCHAIN_EXTERNAL diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk new file mode 100644 index 00000000..6d91cb5d --- /dev/null +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk @@ -0,0 +1,611 @@ +################################################################################ +# External toolchain package infrastructure +# +# This package infrastructure implements the support for external +# toolchains, i.e toolchains that are available pre-built, ready to +# use. Such toolchain may either be readily available on the Web +# (Linaro, Sourcery CodeBench, from processor vendors) or may be built +# with tools like Crosstool-NG or Buildroot itself. So far, we have +# tested this with: +# +# * Toolchains generated by Crosstool-NG +# * Toolchains generated by Buildroot +# * Toolchains provided by Linaro for the ARM and AArch64 +# architectures +# * Sourcery CodeBench toolchains (from Mentor Graphics) for the ARM, +# MIPS, PowerPC, x86_64 and NIOS 2 architectures. For the MIPS +# toolchain, the -muclibc variant isn't supported yet, only the +# default glibc-based variant is. +# * Synopsys DesignWare toolchains for ARC cores +# +# The basic principle is the following +# +# 1. If the toolchain is not pre-installed, download and extract it +# in $(TOOLCHAIN_EXTERNAL_INSTALL_DIR). Otherwise, +# $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) points to were the toolchain has +# already been installed by the user. +# +# 2. For all external toolchains, perform some checks on the +# conformity between the toolchain configuration described in the +# Buildroot menuconfig system, and the real configuration of the +# external toolchain. This is for example important to make sure that +# the Buildroot configuration system knows whether the toolchain +# supports RPC, IPv6, locales, large files, etc. Unfortunately, these +# things cannot be detected automatically, since the value of these +# options (such as BR2_TOOLCHAIN_HAS_NATIVE_RPC) are needed at +# configuration time because these options are used as dependencies +# for other options. And at configuration time, we are not able to +# retrieve the external toolchain configuration. +# +# 3. Copy the libraries needed at runtime to the target directory, +# $(TARGET_DIR). Obviously, things such as the C library, the dynamic +# loader and a few other utility libraries are needed if dynamic +# applications are to be executed on the target system. +# +# 4. Copy the libraries and headers to the staging directory. This +# will allow all further calls to gcc to be made using --sysroot +# $(STAGING_DIR), which greatly simplifies the compilation of the +# packages when using external toolchains. So in the end, only the +# cross-compiler binaries remains external, all libraries and headers +# are imported into the Buildroot tree. +# +# 5. Build a toolchain wrapper which executes the external toolchain +# with a number of arguments (sysroot/march/mtune/..) hardcoded, +# so we're sure the correct configuration is always used and the +# toolchain behaves similar to an internal toolchain. +# This toolchain wrapper and symlinks are installed into +# $(HOST_DIR)/bin like for the internal toolchains, and the rest +# of Buildroot is handled identical for the 2 toolchain types. +################################################################################ + +# +# Definitions of where the toolchain can be found +# + +TOOLCHAIN_EXTERNAL_PREFIX = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)) +TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) +TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR) +else +TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)) +endif + +ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),) +ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) +# if no path set, figure it out from path +TOOLCHAIN_EXTERNAL_BIN := $(dir $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc)) +endif +else +TOOLCHAIN_EXTERNAL_REL_BIN_PATH = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH)) +ifeq ($(TOOLCHAIN_EXTERNAL_REL_BIN_PATH),) +TOOLCHAIN_EXTERNAL_REL_BIN_PATH = bin +endif +TOOLCHAIN_EXTERNAL_BIN = $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_REL_BIN_PATH) +endif + +# If this is a buildroot toolchain, it already has a wrapper which we want to +# bypass. Since this is only evaluated after it has been extracted, we can use +# $(wildcard ...) here. +TOOLCHAIN_EXTERNAL_SUFFIX = \ + $(if $(wildcard $(TOOLCHAIN_EXTERNAL_BIN)/*.br_real),.br_real) + +TOOLCHAIN_EXTERNAL_CROSS = $(TOOLCHAIN_EXTERNAL_BIN)/$(TOOLCHAIN_EXTERNAL_PREFIX)- +TOOLCHAIN_EXTERNAL_CC = $(TOOLCHAIN_EXTERNAL_CROSS)gcc$(TOOLCHAIN_EXTERNAL_SUFFIX) +TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++$(TOOLCHAIN_EXTERNAL_SUFFIX) +TOOLCHAIN_EXTERNAL_GDC = $(TOOLCHAIN_EXTERNAL_CROSS)gdc$(TOOLCHAIN_EXTERNAL_SUFFIX) +TOOLCHAIN_EXTERNAL_FC = $(TOOLCHAIN_EXTERNAL_CROSS)gfortran$(TOOLCHAIN_EXTERNAL_SUFFIX) +TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf + +# Normal handling of downloaded toolchain tarball extraction. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) +# As a regular package, the toolchain gets extracted in $(@D), but +# since it's actually a fairly special package, we need it to be moved +# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR. +define TOOLCHAIN_EXTERNAL_MOVE + rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR) + mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR) + mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/ +endef +endif + +# +# Definitions of the list of libraries that should be copied to the target. +# + +TOOLCHAIN_EXTERNAL_LIBS += ld*.so.* libgcc_s.so.* libatomic.so.* + +ifneq ($(BR2_SSP_NONE),y) +TOOLCHAIN_EXTERNAL_LIBS += libssp.so.* +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) +TOOLCHAIN_EXTERNAL_LIBS += libc.so.* libcrypt.so.* libdl.so.* libm.so.* libnsl.so.* libresolv.so.* librt.so.* libutil.so.* +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +TOOLCHAIN_EXTERNAL_LIBS += libpthread.so.* +ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),) +TOOLCHAIN_EXTERNAL_LIBS += libthread_db.so.* +endif # gdbserver +endif # ! no threads +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y) +TOOLCHAIN_EXTERNAL_LIBS += libnss_files.so.* libnss_dns.so.* libmvec.so.* libanl.so.* +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y) +TOOLCHAIN_EXTERNAL_LIBS += libc.so +endif + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +TOOLCHAIN_EXTERNAL_LIBS += libstdc++.so.* +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y) +TOOLCHAIN_EXTERNAL_LIBS += libgfortran.so.* +# fortran needs quadmath on x86 and x86_64 +ifeq ($(BR2_TOOLCHAIN_HAS_LIBQUADMATH),y) +TOOLCHAIN_EXTERNAL_LIBS += libquadmath.so* +endif +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_OPENMP),y) +TOOLCHAIN_EXTERNAL_LIBS += libgomp.so.* +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_DLANG),y) +TOOLCHAIN_EXTERNAL_LIBS += libgdruntime.so* libgphobos.so* +endif + +TOOLCHAIN_EXTERNAL_LIBS += $(addsuffix .so*,$(call qstrip,$(BR2_TOOLCHAIN_EXTRA_LIBS))) + + +# +# Definition of the CFLAGS to use with the external toolchain, as well as the +# common toolchain wrapper build arguments +# + +# march/mtune/floating point mode needs to be passed to the external toolchain +# to select the right multilib variant +ifeq ($(BR2_x86_64),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -m64 +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_64 +endif +ifneq ($(GCC_TARGET_ARCH),) +TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(GCC_TARGET_ARCH) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ARCH='"$(GCC_TARGET_ARCH)"' +endif +ifneq ($(GCC_TARGET_CPU),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(GCC_TARGET_CPU) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_CPU='"$(GCC_TARGET_CPU)"' +endif +ifneq ($(GCC_TARGET_ABI),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(GCC_TARGET_ABI) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ABI='"$(GCC_TARGET_ABI)"' +endif +ifeq ($(BR2_TOOLCHAIN_HAS_MNAN_OPTION),y) +ifneq ($(GCC_TARGET_NAN),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mnan=$(GCC_TARGET_NAN) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_NAN='"$(GCC_TARGET_NAN)"' +endif +endif +ifneq ($(GCC_TARGET_FP32_MODE),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mfp$(GCC_TARGET_FP32_MODE) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FP32_MODE='"$(GCC_TARGET_FP32_MODE)"' +endif +ifneq ($(GCC_TARGET_FPU),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mfpu=$(GCC_TARGET_FPU) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FPU='"$(GCC_TARGET_FPU)"' +endif +ifneq ($(GCC_TARGET_FLOAT_ABI),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mfloat-abi=$(GCC_TARGET_FLOAT_ABI) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FLOAT_ABI='"$(GCC_TARGET_FLOAT_ABI)"' +endif +ifneq ($(GCC_TARGET_MODE),) +TOOLCHAIN_EXTERNAL_CFLAGS += -m$(GCC_TARGET_MODE) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MODE='"$(GCC_TARGET_MODE)"' +endif +ifeq ($(BR2_BINFMT_FLAT),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -Wl,-elf2flt +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_BINFMT_FLAT +endif +ifeq ($(BR2_mipsel)$(BR2_mips64el),y) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MIPS_TARGET_LITTLE_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EL +endif +ifeq ($(BR2_mips)$(BR2_mips64),y) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MIPS_TARGET_BIG_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EB +endif +ifeq ($(BR2_arceb),y) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ARC_TARGET_BIG_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EB +endif + +TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION)) + +ifeq ($(BR2_SOFT_FLOAT),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_SOFTFLOAT=1 +endif + +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \ + -DBR_CROSS_PATH_SUFFIX='"$(TOOLCHAIN_EXTERNAL_SUFFIX)"' + +ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),) +# TOOLCHAIN_EXTERNAL_BIN points outside HOST_DIR => absolute path +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \ + -DBR_CROSS_PATH_ABS='"$(TOOLCHAIN_EXTERNAL_BIN)"' +else +# TOOLCHAIN_EXTERNAL_BIN points inside HOST_DIR => relative path +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \ + -DBR_CROSS_PATH_REL='"$(TOOLCHAIN_EXTERNAL_BIN:$(HOST_DIR)/%=%)"' +endif + + +# +# The following functions creates the symbolic links needed to get the +# cross-compilation tools visible in $(HOST_DIR)/bin. Some of +# links are done directly to the corresponding tool in the external +# toolchain installation directory, while some other links are done to +# the toolchain wrapper (preprocessor, C, C++ and Fortran compiler) +# +# We skip gdb symlink when we are building our own gdb to prevent two +# gdb's in $(HOST_DIR)/bin. +# +# The LTO support in gcc creates wrappers for ar, ranlib and nm which load +# the lto plugin. These wrappers are called *-gcc-ar, *-gcc-ranlib, and +# *-gcc-nm and should be used instead of the real programs when -flto is +# used. However, we should not add the toolchain wrapper for them, and they +# match the *cc-* pattern. Therefore, an additional case is added for *-ar, +# *-ranlib and *-nm. +define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER + $(Q)cd $(HOST_DIR)/bin; \ + for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \ + base=$${i##*/}; \ + case "$$base" in \ + *-ar|*-ranlib|*-nm) \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \ + ;; \ + *cc|*cc-*|*++|*++-*|*cpp|*-gfortran|*-gdc) \ + ln -sf toolchain-wrapper $$base; \ + ;; \ + *gdb|*gdbtui) \ + if test "$(BR2_PACKAGE_HOST_GDB)" != "y"; then \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \ + fi \ + ;; \ + *) \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \ + ;; \ + esac; \ + done +endef + + +# Various utility functions used by the external toolchain package +# infrastructure. Those functions are mainly responsible for: +# +# - installation the toolchain libraries to $(TARGET_DIR) +# - copying the toolchain sysroot to $(STAGING_DIR) +# - installing a gdbinit file +# +# Details about sysroot directory selection. +# +# To find the sysroot directory, we use the trick of looking for the +# 'libc.a' file with the -print-file-name gcc option, and then +# mangling the path to find the base directory of the sysroot. +# +# Note that we do not use the -print-sysroot option, because it is +# only available since gcc 4.4.x, and we only recently dropped support +# for 4.2.x and 4.3.x. +# +# When doing this, we don't pass any option to gcc that could select a +# multilib variant (such as -march) as we want the "main" sysroot, +# which contains all variants of the C library in the case of multilib +# toolchains. We use the TARGET_CC_NO_SYSROOT variable, which is the +# path of the cross-compiler, without the --sysroot=$(STAGING_DIR), +# since what we want to find is the location of the original toolchain +# sysroot. This "main" sysroot directory is stored in SYSROOT_DIR. +# +# Then, multilib toolchains are a little bit more complicated, since +# they in fact have multiple sysroots, one for each variant supported +# by the toolchain. So we need to find the particular sysroot we're +# interested in. +# +# To do so, we ask the compiler where its sysroot is by passing all +# flags (including -march and al.), except the --sysroot flag since we +# want to the compiler to tell us where its original sysroot +# is. ARCH_SUBDIR will contain the subdirectory, in the main +# SYSROOT_DIR, that corresponds to the selected architecture +# variant. ARCH_SYSROOT_DIR will contain the full path to this +# location. +# +# One might wonder why we don't just bother with ARCH_SYSROOT_DIR. The +# fact is that in multilib toolchains, the header files are often only +# present in the main sysroot, and only the libraries are available in +# each variant-specific sysroot directory. + + +# toolchain_find_sysroot returns the sysroot location for the given +# compiler + flags. We need to handle cases where libc.a is in: +# +# - lib/ +# - usr/lib/ +# - lib32/ +# - lib64/ +# - lib32-fp/ (Cavium toolchain) +# - lib64-fp/ (Cavium toolchain) +# - usr/lib// (Linaro toolchain) +# +# And variations on these. +define toolchain_find_sysroot +$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:/(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a:/:') +endef + +# Returns the lib subdirectory for the given compiler + flags (i.e +# typically lib32 or lib64 for some toolchains) +define toolchain_find_libdir +$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?(/[^/]*)?)/libc.a:\2:') +endef + +# Returns the location of the libc.a file for the given compiler + flags +define toolchain_find_libc_a +$$(readlink -f $$(LANG=C $(1) -print-file-name=libc.a)) +endef + +# Integration of the toolchain into Buildroot: find the main sysroot +# and the variant-specific sysroot, then copy the needed libraries to +# the $(TARGET_DIR) and copy the whole sysroot (libraries and headers) +# to $(STAGING_DIR). +# +# Variables are defined as follows: +# +# SYSROOT_DIR: the main sysroot directory, deduced from the location of +# the libc.a file in the default multilib variant, by +# removing the usr/lib[32|64]/libc.a part of the path. +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/ +# +# ARCH_SYSROOT_DIR: the sysroot of the selected multilib variant, +# deduced from the location of the libc.a file in the +# selected multilib variant (taking into account the +# CFLAGS), by removing usr/lib[32|64]/libc.a at the end +# of the path. +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/ +# +# ARCH_LIB_DIR: 'lib', 'lib32' or 'lib64' depending on where libraries +# are stored. Deduced from the location of the libc.a file +# in the selected multilib variant, by looking at +# usr/lib??/libc.a. +# Ex: lib +# +# ARCH_SUBDIR: the relative location of the sysroot of the selected +# multilib variant compared to the main sysroot. +# Ex: mips16/soft-float/el +# +# SUPPORT_LIB_DIR: some toolchains, such as recent Linaro toolchains, +# store GCC support libraries (libstdc++, +# libgcc_s, etc.) outside of the sysroot. In +# this case, SUPPORT_LIB_DIR is set to a +# non-empty value, and points to the directory +# where these support libraries are +# available. Those libraries will be copied to +# our sysroot, and the directory will also be +# considered when searching libraries for copy +# to the target filesystem. +# +# Please be very careful to check the major toolchain sources: +# Buildroot, Crosstool-NG, CodeSourcery and Linaro +# before doing any modification on the below logic. + +ifeq ($(BR2_STATIC_LIBS),) +define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS + $(Q)$(call MESSAGE,"Copying external toolchain libraries to target...") + $(Q)for libpattern in $(TOOLCHAIN_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$$libpattern); \ + done +endef +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),y) +define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER + $(Q)$(call MESSAGE,"Copying gdbserver") + $(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + gdbserver_found=0 ; \ + for d in $${ARCH_SYSROOT_DIR}/usr \ + $${ARCH_SYSROOT_DIR}/../debug-root/usr \ + $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \ + $(TOOLCHAIN_EXTERNAL_INSTALL_DIR); do \ + if test -f $${d}/bin/gdbserver ; then \ + install -m 0755 -D $${d}/bin/gdbserver $(TARGET_DIR)/usr/bin/gdbserver ; \ + gdbserver_found=1 ; \ + break ; \ + fi ; \ + done ; \ + if [ $${gdbserver_found} -eq 0 ] ; then \ + echo "Could not find gdbserver in external toolchain" ; \ + exit 1 ; \ + fi +endef +endif + +define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS + $(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \ + ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + SUPPORT_LIB_DIR="" ; \ + if test `find $${ARCH_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \ + LIBSTDCPP_A_LOCATION=$$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \ + if [ -e "$${LIBSTDCPP_A_LOCATION}" ]; then \ + SUPPORT_LIB_DIR=`readlink -f $${LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \ + fi ; \ + fi ; \ + if [ "$${SYSROOT_DIR}" == "$${ARCH_SYSROOT_DIR}" ] ; then \ + ARCH_SUBDIR="" ; \ + elif [ "`dirname $${ARCH_SYSROOT_DIR}`" = "`dirname $${SYSROOT_DIR}`" ] ; then \ + SYSROOT_DIR_DIRNAME=`dirname $${SYSROOT_DIR}`/ ; \ + ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR_DIRNAME}(.*)/$$:\1:"` ; \ + else \ + ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \ + fi ; \ + $(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \ + $(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR}) +endef + +# Create a symlink from (usr/)$(ARCH_LIB_DIR) to lib. +# Note: the skeleton package additionally creates lib32->lib or lib64->lib +# (as appropriate) +# +# $1: destination directory (TARGET_DIR / STAGING_DIR) +create_lib_symlinks = \ + $(Q)DESTDIR="$(strip $1)" ; \ + ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + if [ ! -e "$${DESTDIR}/$${ARCH_LIB_DIR}" -a ! -e "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ]; then \ + relpath="$(call relpath_prefix,$${ARCH_LIB_DIR})" ; \ + ln -snf $${relpath}lib "$${DESTDIR}/$${ARCH_LIB_DIR}" ; \ + ln -snf $${relpath}lib "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ; \ + fi + +define TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK + $(call create_lib_symlinks,$(STAGING_DIR)) +endef + +define TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK + $(call create_lib_symlinks,$(TARGET_DIR)) +endef + +# +# Generate gdbinit file for use with Buildroot +# +define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT + $(Q)if test -f $(TARGET_CROSS)gdb ; then \ + $(call MESSAGE,"Installing gdbinit"); \ + $(gen_gdbinit_file); \ + fi +endef + +# uClibc-ng dynamic loader is called ld-uClibc.so.1, but gcc is not +# patched specifically for uClibc-ng, so it continues to generate +# binaries that expect the dynamic loader to be named ld-uClibc.so.0, +# like with the original uClibc. Therefore, we create an additional +# symbolic link to make uClibc-ng systems work properly. +define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO + $(Q)if test -e $(TARGET_DIR)/lib/ld-uClibc.so.1; then \ + ln -sf ld-uClibc.so.1 $(TARGET_DIR)/lib/ld-uClibc.so.0 ; \ + fi + $(Q)if test -e $(TARGET_DIR)/lib/ld64-uClibc.so.1; then \ + ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \ + fi +endef + +define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LDD + $(Q)if test -f $(STAGING_DIR)/usr/bin/ldd ; then \ + $(INSTALL) -D $(STAGING_DIR)/usr/bin/ldd $(TARGET_DIR)/usr/bin/ldd ; \ + $(SED) 's:.*/bin/bash:#!/bin/sh:' $(TARGET_DIR)/usr/bin/ldd ; \ + fi +endef + +################################################################################ +# inner-toolchain-external-package -- defines the generic installation rules +# for external toolchain packages +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +################################################################################ +define inner-toolchain-external-package + +$(2)_INSTALL_STAGING = YES +$(2)_ADD_TOOLCHAIN_DEPENDENCY = NO + +# In fact, we don't need to download the toolchain, since it is already +# available on the system, so force the site and source to be empty so +# that nothing will be downloaded/extracted. +ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y) +$(2)_SITE = +$(2)_SOURCE = +endif + +ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) +$(2)_EXCLUDES = usr/lib/locale/* + +$(2)_POST_EXTRACT_HOOKS += \ + TOOLCHAIN_EXTERNAL_MOVE +endif + +# Checks for an already installed toolchain: check the toolchain +# location, check that it is usable, and then verify that it +# matches the configuration provided in Buildroot: ABI, C++ support, +# kernel headers version, type of C library and all C library features. +define $(2)_CONFIGURE_CMDS + $$(Q)$$(call check_cross_compiler_exists,$$(TOOLCHAIN_EXTERNAL_CC)) + $$(Q)$$(call check_unusable_toolchain,$$(TOOLCHAIN_EXTERNAL_CC)) + $$(Q)SYSROOT_DIR="$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC))" ; \ + $$(call check_kernel_headers_version,\ + $$(BUILD_DIR),\ + $$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC)),\ + $$(call qstrip,$$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)),\ + $$(if $$(BR2_TOOLCHAIN_EXTERNAL_CUSTOM),loose,strict)); \ + $$(call check_gcc_version,$$(TOOLCHAIN_EXTERNAL_CC),\ + $$(call qstrip,$$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \ + if test "$$(BR2_arm)" = "y" ; then \ + $$(call check_arm_abi,\ + "$$(TOOLCHAIN_EXTERNAL_CC) $$(TOOLCHAIN_EXTERNAL_CFLAGS)") ; \ + fi ; \ + if test "$$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \ + $$(call check_cplusplus,$$(TOOLCHAIN_EXTERNAL_CXX)) ; \ + fi ; \ + if test "$$(BR2_TOOLCHAIN_HAS_DLANG)" = "y" ; then \ + $$(call check_dlang,$$(TOOLCHAIN_EXTERNAL_GDC)) ; \ + fi ; \ + if test "$$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \ + $$(call check_fortran,$$(TOOLCHAIN_EXTERNAL_FC)) ; \ + fi ; \ + if test "$$(BR2_TOOLCHAIN_HAS_OPENMP)" = "y" ; then \ + $$(call check_openmp,$$(TOOLCHAIN_EXTERNAL_CC)) ; \ + fi ; \ + if test "$$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \ + $$(call check_uclibc,$$$${SYSROOT_DIR}) ; \ + elif test "$$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \ + $$(call check_musl,\ + "$$(TOOLCHAIN_EXTERNAL_CC) $$(TOOLCHAIN_EXTERNAL_CFLAGS)") ; \ + else \ + $$(call check_glibc,$$$${SYSROOT_DIR}) ; \ + fi + $$(Q)$$(call check_toolchain_ssp,$$(TOOLCHAIN_EXTERNAL_CC),$(BR2_SSP_OPTION)) +endef + +$(2)_TOOLCHAIN_WRAPPER_ARGS += $$(TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS) + +$(2)_BUILD_CMDS = $$(TOOLCHAIN_WRAPPER_BUILD) + +define $(2)_INSTALL_STAGING_CMDS + $$(TOOLCHAIN_WRAPPER_INSTALL) + $$(TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK) + $$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS) + $$(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER) + $$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT) +endef + +# Even though we're installing things in both the staging, the host +# and the target directory, we do everything within the +# install-staging step, arbitrarily. +define $(2)_INSTALL_TARGET_CMDS + $$(TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK) + $$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS) + $$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER) + $$(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO) + $$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LDD) +endef + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4)) + +endef + +toolchain-external-package = $(call inner-toolchain-external-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) diff --git a/toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in b/toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in new file mode 100644 index 00000000..9c937b8c --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in @@ -0,0 +1,15 @@ +config BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32 + bool "Andes nds32" + depends on BR2_nds32 + depends on !BR2_STATIC_LIBS + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_8 + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HAS_SSP + help + nds32 toolchain for the nds32 architecture. It uses GCC + 8.2.1, GDB 8.1.1, glibc 2.28, Binutils 2.30. It generates + code that runs on ae3xx platform diff --git a/toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options b/toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options new file mode 100644 index 00000000..7d11ae20 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-andes-nds32/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32 + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "nds32le-linux" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-andes-nds32" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds32.hash b/toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds32.hash new file mode 100644 index 00000000..4314bb1f --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds32.hash @@ -0,0 +1,2 @@ +# From https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz +sha256 6050601df85ad93a4c211c1d57ed3773edb62aa505f7e07d7d555652e83af2cc nds32le-linux-glibc-v3-upstream.tar.gz diff --git a/toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds32.mk b/toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds32.mk new file mode 100644 index 00000000..fa29490b --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-andes-nds32/toolchain-external-andes-nds32.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# toolchain-external-andes-nds32 +# +################################################################################ + +TOOLCHAIN_EXTERNAL_ANDES_NDS32_SITE = https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521 +TOOLCHAIN_EXTERNAL_ANDES_NDS32_SOURCE = nds32le-linux-glibc-v3-upstream.tar.gz + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in new file mode 100644 index 00000000..bbd6a070 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in @@ -0,0 +1,20 @@ +config BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE + bool "Arm AArch64 BE 2020.11" + depends on BR2_aarch64_be + depends on BR2_HOSTARCH = "x86_64" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_OPENMP + help + Arm toolchain for the AArch64 Big Endian architecture. + + This is the same toolchain that was previously distributed by + Linaro. + + https://developer.arm.com/open-source/gnu-toolchain diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in.options b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in.options new file mode 100644 index 00000000..745af8a2 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "aarch64_be-none-linux-gnu" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-arm-aarch64-be" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.hash b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.hash new file mode 100644 index 00000000..8e67a965 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.hash @@ -0,0 +1,4 @@ +# From https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64_be-none-linux-gnu.tar.xz.asc +md5 5da75bca337de5adade5b339709f8b16 gcc-arm-10.2-2020.11-x86_64-aarch64_be-none-linux-gnu.tar.xz +# locally calculated +sha256 78a472aeb80f6ff56bfdef57ce165b233bac4af7aa2e12f454900518a30ddf20 gcc-arm-10.2-2020.11-x86_64-aarch64_be-none-linux-gnu.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.mk b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.mk new file mode 100644 index 00000000..384fc2ef --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# toolchain-external-arm-aarch64-be +# +################################################################################ + +TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_VERSION = 2020.11 +TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_VERSION)/binrel + +TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_SOURCE = gcc-arm-10.2-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_BE_VERSION)-x86_64-aarch64_be-none-linux-gnu.tar.xz + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in new file mode 100644 index 00000000..b6062846 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in @@ -0,0 +1,20 @@ +config BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64 + bool "Arm AArch64 2020.11" + depends on BR2_aarch64 + depends on BR2_HOSTARCH = "x86_64" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_OPENMP + help + Arm toolchain for the AArch64 architecture. + + This is the same toolchain that was previously distributed by + Linaro. + + https://developer.arm.com/open-source/gnu-toolchain diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in.options b/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in.options new file mode 100644 index 00000000..dcc38a6a --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64 + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "aarch64-none-linux-gnu" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-arm-aarch64" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.hash b/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.hash new file mode 100644 index 00000000..90abe56d --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.hash @@ -0,0 +1,4 @@ +# From https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz.asc +md5 d6e6676d31c51405ae0fc7687ef0a224 gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz +# locally calculated +sha256 fe7f72330216612de44891ebe5e228eed7c0c051ac090c395b2b33115c6f5408 gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.mk b/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.mk new file mode 100644 index 00000000..583e4a76 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-aarch64/toolchain-external-arm-aarch64.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# toolchain-external-arm-aarch64 +# +################################################################################ + +TOOLCHAIN_EXTERNAL_ARM_AARCH64_VERSION = 2020.11 +TOOLCHAIN_EXTERNAL_ARM_AARCH64_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_VERSION)/binrel + +TOOLCHAIN_EXTERNAL_ARM_AARCH64_SOURCE = gcc-arm-10.2-$(TOOLCHAIN_EXTERNAL_ARM_AARCH64_VERSION)-x86_64-aarch64-none-linux-gnu.tar.xz + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-arm-arm/Config.in b/toolchain/toolchain-external/toolchain-external-arm-arm/Config.in new file mode 100644 index 00000000..e3bac38b --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-arm/Config.in @@ -0,0 +1,32 @@ +comment "Arm toolchains available for Cortex-A with NEON + EABIhf" + depends on BR2_arm + depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF || !BR2_ARM_CPU_HAS_NEON + depends on !BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_EXTERNAL_ARM_ARM + bool "Arm ARM 2020.11" + depends on BR2_arm + depends on BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8A + depends on BR2_ARM_CPU_HAS_NEON + depends on BR2_HOSTARCH = "x86_64" + depends on BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_OPENMP + help + Arm toolchain for the ARM architecture. It uses GCC 10.2, + GDB 10.1, glibc 2.31, Binutils 2.35.1. It generates code + that runs on all Cortex-A profile devices. The code + generated uses the hard floating point calling convention, + and uses the NEON FPU instructions. + + This is the same toolchain that was previously distributed by + Linaro. + + https://developer.arm.com/open-source/gnu-toolchain diff --git a/toolchain/toolchain-external/toolchain-external-arm-arm/Config.in.options b/toolchain/toolchain-external/toolchain-external-arm-arm/Config.in.options new file mode 100644 index 00000000..f2ce0f45 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-arm/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_ARM_ARM + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "arm-none-linux-gnueabihf" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-arm-arm" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-arm-arm/toolchain-external-arm-arm.hash b/toolchain/toolchain-external/toolchain-external-arm-arm/toolchain-external-arm-arm.hash new file mode 100644 index 00000000..a46ed4e4 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-arm/toolchain-external-arm-arm.hash @@ -0,0 +1,4 @@ +# From https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz.asc +md5 14f706db78cfb43aafed9056174572b0 gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz +# locally calculated +sha256 102825ae56c9e00142d06f35d2bdd3299edb6060e84a275a25b095e66fd3fc2a gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external-arm-arm/toolchain-external-arm-arm.mk b/toolchain/toolchain-external/toolchain-external-arm-arm/toolchain-external-arm-arm.mk new file mode 100644 index 00000000..88b6ae34 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-arm-arm/toolchain-external-arm-arm.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# toolchain-external-arm-arm +# +################################################################################ + +TOOLCHAIN_EXTERNAL_ARM_ARM_VERSION = 2020.11 +TOOLCHAIN_EXTERNAL_ARM_ARM_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-$(TOOLCHAIN_EXTERNAL_ARM_ARM_VERSION)/binrel + +TOOLCHAIN_EXTERNAL_ARM_ARM_SOURCE = gcc-arm-10.2-$(TOOLCHAIN_EXTERNAL_ARM_ARM_VERSION)-x86_64-arm-none-linux-gnueabihf.tar.xz + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-bootlin/Config.in b/toolchain/toolchain-external/toolchain-external-bootlin/Config.in new file mode 100644 index 00000000..6552da9a --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-bootlin/Config.in @@ -0,0 +1,9 @@ +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN + bool "Bootlin toolchains" + depends on BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCH_SUPPORTS + depends on BR2_HOSTARCH = "x86_64" + help + Bootlin toolchains are built using Buildroot for a large + number of architectures and C libraries configurations. + + https://toolchains.bootlin.com diff --git a/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options b/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options new file mode 100644 index 00000000..61ead9b8 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options @@ -0,0 +1,4303 @@ +# This file was auto-generated by support/scripts/gen-bootlin-toolchains +# Do not edit +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCH_SUPPORTS + bool + default y if BR2_aarch64 + default y if BR2_aarch64_be + default y if BR2_arcle && BR2_arc750d + default y if BR2_arcle && BR2_archs38 + default y if BR2_ARM_CPU_ARMV5 && BR2_ARM_EABI + default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABIHF + default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF + default y if BR2_ARM_CPU_ARMV7M + default y if BR2_m68k_m68k + default y if BR2_m68k_cf + default y if BR2_microblazebe + default y if BR2_microblazeel + default y if BR2_mips && BR2_mips_32 && !BR2_MIPS_SOFT_FLOAT + default y if BR2_mipsel && BR2_mips_32 && !BR2_MIPS_SOFT_FLOAT + default y if BR2_mipsel && BR2_mips_32r5 && !BR2_MIPS_SOFT_FLOAT + default y if BR2_mipsel && BR2_mips_32r6 && !BR2_MIPS_SOFT_FLOAT + default y if BR2_mips64 && BR2_mips_64 && !BR2_MIPS_SOFT_FLOAT + default y if BR2_mips64 && BR2_mips_64 && BR2_MIPS_NABI32 && !BR2_MIPS_SOFT_FLOAT + default y if BR2_mips64el && BR2_mips_64 && BR2_MIPS_NABI32 && !BR2_MIPS_SOFT_FLOAT + default y if BR2_mips64el && BR2_mips_64r6 && BR2_MIPS_NABI32 && !BR2_MIPS_SOFT_FLOAT + default y if BR2_nios2 + default y if BR2_or1k + default y if BR2_powerpc && BR2_powerpc_440fp + default y if BR2_powerpc && BR2_powerpc_e300c3 + default y if BR2_powerpc && BR2_powerpc_e500mc + default y if BR2_powerpc64 && BR2_powerpc_e5500 + default y if BR2_powerpc64 && BR2_powerpc_e6500 + default y if BR2_powerpc64 && BR2_powerpc_power8 + default y if BR2_powerpc64le && BR2_powerpc_power8 + default y if BR2_riscv && BR2_riscv_g && BR2_RISCV_32 && BR2_RISCV_ABI_ILP32D + default y if BR2_riscv && BR2_riscv_g && BR2_RISCV_64 && BR2_RISCV_ABI_LP64 + default y if BR2_sh && BR2_sh4 + default y if BR2_sh && BR2_sh4aeb + default y if BR2_sparc64 && BR2_sparc_v9 + default y if BR2_sparc && BR2_sparc_v8 + default y if BR2_x86_64 && BR2_X86_CPU_HAS_MMX && BR2_X86_CPU_HAS_SSE && BR2_X86_CPU_HAS_SSE2 && BR2_X86_CPU_HAS_SSE3 && BR2_X86_CPU_HAS_SSSE3 && BR2_X86_CPU_HAS_SSE4 && BR2_X86_CPU_HAS_SSE42 + default y if BR2_i386 && BR2_X86_CPU_HAS_MMX && BR2_X86_CPU_HAS_SSE && BR2_X86_CPU_HAS_SSE2 && BR2_X86_CPU_HAS_SSE3 && BR2_X86_CPU_HAS_SSSE3 + default y if BR2_i386 && !BR2_x86_i486 && !BR2_x86_i586 && !BR2_x86_x1000 + default y if BR2_xtensa && BR2_XTENSA_CUSTOM && BR2_XTENSA_LITTLE_ENDIAN + +if BR2_TOOLCHAIN_EXTERNAL_BOOTLIN + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "$(ARCH)-linux" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-bootlin" + +choice + prompt "Bootlin toolchain variant" +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_BLEEDING_EDGE + bool "aarch64 glibc bleeding-edge 2020.08-1" + depends on BR2_aarch64 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the aarch64 architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE + bool "aarch64 glibc stable 2020.08-1" + depends on BR2_aarch64 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the aarch64 architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_MUSL_BLEEDING_EDGE + bool "aarch64 musl bleeding-edge 2020.08-1" + depends on BR2_aarch64 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the aarch64 architecture, using the + musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_MUSL_STABLE + bool "aarch64 musl stable 2020.08-1" + depends on BR2_aarch64 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the aarch64 architecture, using the + musl C library. This is a stable version, which means it is + using stable and proven versions of gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_UCLIBC_BLEEDING_EDGE + bool "aarch64 uclibc bleeding-edge 2020.08-1" + depends on BR2_aarch64 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the aarch64 architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_UCLIBC_STABLE + bool "aarch64 uclibc stable 2020.08-1" + depends on BR2_aarch64 + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the aarch64 architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64BE_GLIBC_BLEEDING_EDGE + bool "aarch64be glibc bleeding-edge 2020.08-1" + depends on BR2_aarch64_be + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the aarch64be architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64BE_GLIBC_STABLE + bool "aarch64be glibc stable 2020.08-1" + depends on BR2_aarch64_be + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the aarch64be architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64BE_UCLIBC_BLEEDING_EDGE + bool "aarch64be uclibc bleeding-edge 2020.08-1" + depends on BR2_aarch64_be + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the aarch64be architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64BE_UCLIBC_STABLE + bool "aarch64be uclibc stable 2020.08-1" + depends on BR2_aarch64_be + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the aarch64be architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_750D_UCLIBC_BLEEDING_EDGE + bool "arcle-750d uclibc bleeding-edge 2020.08-1" + depends on BR2_arcle + depends on BR2_arc750d + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the arcle-750d architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_750D_UCLIBC_STABLE + bool "arcle-750d uclibc stable 2020.08-1" + depends on BR2_arcle + depends on BR2_arc750d + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the arcle-750d architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_GLIBC_BLEEDING_EDGE + bool "arcle-hs38 glibc bleeding-edge 2020.08-1" + depends on BR2_arcle + depends on BR2_archs38 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the arcle-hs38 architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_GLIBC_STABLE + bool "arcle-hs38 glibc stable 2020.08-1" + depends on BR2_arcle + depends on BR2_archs38 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the arcle-hs38 architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_UCLIBC_BLEEDING_EDGE + bool "arcle-hs38 uclibc bleeding-edge 2020.08-1" + depends on BR2_arcle + depends on BR2_archs38 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the arcle-hs38 architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_UCLIBC_STABLE + bool "arcle-hs38 uclibc stable 2020.08-1" + depends on BR2_arcle + depends on BR2_archs38 + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the arcle-hs38 architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_BLEEDING_EDGE + bool "armv5-eabi glibc bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV5 + depends on BR2_ARM_EABI + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the armv5-eabi architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE + bool "armv5-eabi glibc stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV5 + depends on BR2_ARM_EABI + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the armv5-eabi architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_MUSL_BLEEDING_EDGE + bool "armv5-eabi musl bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV5 + depends on BR2_ARM_EABI + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the armv5-eabi architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_MUSL_STABLE + bool "armv5-eabi musl stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV5 + depends on BR2_ARM_EABI + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the armv5-eabi architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_UCLIBC_BLEEDING_EDGE + bool "armv5-eabi uclibc bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV5 + depends on BR2_ARM_EABI + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the armv5-eabi architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_UCLIBC_STABLE + bool "armv5-eabi uclibc stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV5 + depends on BR2_ARM_EABI + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the armv5-eabi architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_GLIBC_BLEEDING_EDGE + bool "armv6-eabihf glibc bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV6 + depends on BR2_ARM_EABIHF + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the armv6-eabihf architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_GLIBC_STABLE + bool "armv6-eabihf glibc stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV6 + depends on BR2_ARM_EABIHF + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the armv6-eabihf architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_MUSL_BLEEDING_EDGE + bool "armv6-eabihf musl bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV6 + depends on BR2_ARM_EABIHF + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the armv6-eabihf architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_MUSL_STABLE + bool "armv6-eabihf musl stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV6 + depends on BR2_ARM_EABIHF + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the armv6-eabihf architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_UCLIBC_BLEEDING_EDGE + bool "armv6-eabihf uclibc bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV6 + depends on BR2_ARM_EABIHF + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the armv6-eabihf architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_UCLIBC_STABLE + bool "armv6-eabihf uclibc stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV6 + depends on BR2_ARM_EABIHF + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the armv6-eabihf architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_BLEEDING_EDGE + bool "armv7-eabihf glibc bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_ARM_EABIHF + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the armv7-eabihf architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_STABLE + bool "armv7-eabihf glibc stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_ARM_EABIHF + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the armv7-eabihf architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_BLEEDING_EDGE + bool "armv7-eabihf musl bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_ARM_EABIHF + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the armv7-eabihf architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE + bool "armv7-eabihf musl stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_ARM_EABIHF + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the armv7-eabihf architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_UCLIBC_BLEEDING_EDGE + bool "armv7-eabihf uclibc bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_ARM_EABIHF + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the armv7-eabihf architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_UCLIBC_STABLE + bool "armv7-eabihf uclibc stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_ARM_EABIHF + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the armv7-eabihf architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7M_UCLIBC_BLEEDING_EDGE + bool "armv7m uclibc bleeding-edge 2020.08-1" + depends on BR2_ARM_CPU_ARMV7M + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the armv7m architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7M_UCLIBC_STABLE + bool "armv7m uclibc stable 2020.08-1" + depends on BR2_ARM_CPU_ARMV7M + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the armv7m architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_68XXX_UCLIBC_BLEEDING_EDGE + bool "m68k-68xxx uclibc bleeding-edge 2020.08-1" + depends on BR2_m68k_m68k + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the m68k-68xxx architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_68XXX_UCLIBC_STABLE + bool "m68k-68xxx uclibc stable 2020.08-1" + depends on BR2_m68k_m68k + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the m68k-68xxx architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_COLDFIRE_UCLIBC_BLEEDING_EDGE + bool "m68k-coldfire uclibc bleeding-edge 2020.08-1" + depends on BR2_m68k_cf + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the m68k-coldfire architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_COLDFIRE_UCLIBC_STABLE + bool "m68k-coldfire uclibc stable 2020.08-1" + depends on BR2_m68k_cf + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the m68k-coldfire architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_GLIBC_BLEEDING_EDGE + bool "microblazebe glibc bleeding-edge 2020.08-1" + depends on BR2_microblazebe + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the microblazebe architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_GLIBC_STABLE + bool "microblazebe glibc stable 2020.08-1" + depends on BR2_microblazebe + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the microblazebe architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_MUSL_BLEEDING_EDGE + bool "microblazebe musl bleeding-edge 2020.08-1" + depends on BR2_microblazebe + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the microblazebe architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_MUSL_STABLE + bool "microblazebe musl stable 2020.08-1" + depends on BR2_microblazebe + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the microblazebe architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_UCLIBC_BLEEDING_EDGE + bool "microblazebe uclibc bleeding-edge 2020.08-1" + depends on BR2_microblazebe + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the microblazebe architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_UCLIBC_STABLE + bool "microblazebe uclibc stable 2020.08-1" + depends on BR2_microblazebe + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the microblazebe architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_GLIBC_BLEEDING_EDGE + bool "microblazeel glibc bleeding-edge 2020.08-1" + depends on BR2_microblazeel + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the microblazeel architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_GLIBC_STABLE + bool "microblazeel glibc stable 2020.08-1" + depends on BR2_microblazeel + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the microblazeel architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_MUSL_BLEEDING_EDGE + bool "microblazeel musl bleeding-edge 2020.08-1" + depends on BR2_microblazeel + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the microblazeel architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_MUSL_STABLE + bool "microblazeel musl stable 2020.08-1" + depends on BR2_microblazeel + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the microblazeel architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_UCLIBC_BLEEDING_EDGE + bool "microblazeel uclibc bleeding-edge 2020.08-1" + depends on BR2_microblazeel + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the microblazeel architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_UCLIBC_STABLE + bool "microblazeel uclibc stable 2020.08-1" + depends on BR2_microblazeel + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the microblazeel architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_GLIBC_BLEEDING_EDGE + bool "mips32 glibc bleeding-edge 2020.08-1" + depends on BR2_mips + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips32 architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_GLIBC_STABLE + bool "mips32 glibc stable 2020.08-1" + depends on BR2_mips + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips32 architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_MUSL_BLEEDING_EDGE + bool "mips32 musl bleeding-edge 2020.08-1" + depends on BR2_mips + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips32 architecture, using the + musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_MUSL_STABLE + bool "mips32 musl stable 2020.08-1" + depends on BR2_mips + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips32 architecture, using the + musl C library. This is a stable version, which means it is + using stable and proven versions of gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_UCLIBC_BLEEDING_EDGE + bool "mips32 uclibc bleeding-edge 2020.08-1" + depends on BR2_mips + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips32 architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_UCLIBC_STABLE + bool "mips32 uclibc stable 2020.08-1" + depends on BR2_mips + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips32 architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_GLIBC_BLEEDING_EDGE + bool "mips32el glibc bleeding-edge 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips32el architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_GLIBC_STABLE + bool "mips32el glibc stable 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips32el architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_MUSL_BLEEDING_EDGE + bool "mips32el musl bleeding-edge 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips32el architecture, using the + musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_MUSL_STABLE + bool "mips32el musl stable 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips32el architecture, using the + musl C library. This is a stable version, which means it is + using stable and proven versions of gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_UCLIBC_BLEEDING_EDGE + bool "mips32el uclibc bleeding-edge 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips32el architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_UCLIBC_STABLE + bool "mips32el uclibc stable 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips32el architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_GLIBC_BLEEDING_EDGE + bool "mips32r5el glibc bleeding-edge 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r5 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips32r5el architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_GLIBC_STABLE + bool "mips32r5el glibc stable 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r5 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips32r5el architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_MUSL_BLEEDING_EDGE + bool "mips32r5el musl bleeding-edge 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r5 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips32r5el architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_MUSL_STABLE + bool "mips32r5el musl stable 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r5 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips32r5el architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_UCLIBC_BLEEDING_EDGE + bool "mips32r5el uclibc bleeding-edge 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r5 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips32r5el architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_UCLIBC_STABLE + bool "mips32r5el uclibc stable 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r5 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips32r5el architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_GLIBC_BLEEDING_EDGE + bool "mips32r6el glibc bleeding-edge 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r6 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips32r6el architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_GLIBC_STABLE + bool "mips32r6el glibc stable 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r6 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips32r6el architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_MUSL_BLEEDING_EDGE + bool "mips32r6el musl bleeding-edge 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r6 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips32r6el architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_MUSL_STABLE + bool "mips32r6el musl stable 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r6 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips32r6el architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_UCLIBC_BLEEDING_EDGE + bool "mips32r6el uclibc bleeding-edge 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r6 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips32r6el architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_UCLIBC_STABLE + bool "mips32r6el uclibc stable 2020.08-1" + depends on BR2_mipsel + depends on BR2_mips_32r6 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips32r6el architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_GLIBC_BLEEDING_EDGE + bool "mips64-n32 glibc bleeding-edge 2020.08-1" + depends on BR2_mips64 + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips64-n32 architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_GLIBC_STABLE + bool "mips64-n32 glibc stable 2020.08-1" + depends on BR2_mips64 + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips64-n32 architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_MUSL_BLEEDING_EDGE + bool "mips64-n32 musl bleeding-edge 2020.08-1" + depends on BR2_mips64 + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips64-n32 architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_MUSL_STABLE + bool "mips64-n32 musl stable 2020.08-1" + depends on BR2_mips64 + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips64-n32 architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_UCLIBC_BLEEDING_EDGE + bool "mips64-n32 uclibc bleeding-edge 2020.08-1" + depends on BR2_mips64 + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips64-n32 architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_UCLIBC_STABLE + bool "mips64-n32 uclibc stable 2020.08-1" + depends on BR2_mips64 + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips64-n32 architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_GLIBC_BLEEDING_EDGE + bool "mips64el-n32 glibc bleeding-edge 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips64el-n32 architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_GLIBC_STABLE + bool "mips64el-n32 glibc stable 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips64el-n32 architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_MUSL_BLEEDING_EDGE + bool "mips64el-n32 musl bleeding-edge 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips64el-n32 architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_MUSL_STABLE + bool "mips64el-n32 musl stable 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips64el-n32 architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_UCLIBC_BLEEDING_EDGE + bool "mips64el-n32 uclibc bleeding-edge 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips64el-n32 architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_UCLIBC_STABLE + bool "mips64el-n32 uclibc stable 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips64el-n32 architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_GLIBC_BLEEDING_EDGE + bool "mips64r6el-n32 glibc bleeding-edge 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64r6 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips64r6el-n32 architecture, + using the glibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_GLIBC_STABLE + bool "mips64r6el-n32 glibc stable 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64r6 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the mips64r6el-n32 architecture, + using the glibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_MUSL_BLEEDING_EDGE + bool "mips64r6el-n32 musl bleeding-edge 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64r6 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips64r6el-n32 architecture, + using the musl C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_MUSL_STABLE + bool "mips64r6el-n32 musl stable 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64r6 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the mips64r6el-n32 architecture, + using the musl C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_UCLIBC_BLEEDING_EDGE + bool "mips64r6el-n32 uclibc bleeding-edge 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64r6 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips64r6el-n32 architecture, + using the uclibc C library. This is a bleeding-edge + version, which means it is using the latest versions of + gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_UCLIBC_STABLE + bool "mips64r6el-n32 uclibc stable 2020.08-1" + depends on BR2_mips64el + depends on BR2_mips_64r6 + depends on BR2_MIPS_NABI32 + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the mips64r6el-n32 architecture, + using the uclibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_NIOS2_GLIBC_BLEEDING_EDGE + bool "nios2 glibc bleeding-edge 2020.08-1" + depends on BR2_nios2 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the nios2 architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_NIOS2_GLIBC_STABLE + bool "nios2 glibc stable 2020.08-1" + depends on BR2_nios2 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the nios2 architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_MUSL_BLEEDING_EDGE + bool "openrisc musl bleeding-edge 2020.08-1" + depends on BR2_or1k + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the openrisc architecture, using the + musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_MUSL_STABLE + bool "openrisc musl stable 2020.08-1" + depends on BR2_or1k + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the openrisc architecture, using the + musl C library. This is a stable version, which means it is + using stable and proven versions of gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_UCLIBC_BLEEDING_EDGE + bool "openrisc uclibc bleeding-edge 2020.08-1" + depends on BR2_or1k + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the openrisc architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_UCLIBC_STABLE + bool "openrisc uclibc stable 2020.08-1" + depends on BR2_or1k + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the openrisc architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_GLIBC_BLEEDING_EDGE + bool "powerpc-440fp glibc bleeding-edge 2020.08-2" + depends on BR2_powerpc + depends on BR2_powerpc_440fp + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + help + Bootlin toolchain for the powerpc-440fp architecture, using + the glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_GLIBC_STABLE + bool "powerpc-440fp glibc stable 2020.08-2" + depends on BR2_powerpc + depends on BR2_powerpc_440fp + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + help + Bootlin toolchain for the powerpc-440fp architecture, using + the glibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_MUSL_BLEEDING_EDGE + bool "powerpc-440fp musl bleeding-edge 2020.08-2" + depends on BR2_powerpc + depends on BR2_powerpc_440fp + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc-440fp architecture, using + the musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_MUSL_STABLE + bool "powerpc-440fp musl stable 2020.08-2" + depends on BR2_powerpc + depends on BR2_powerpc_440fp + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc-440fp architecture, using + the musl C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_UCLIBC_BLEEDING_EDGE + bool "powerpc-440fp uclibc bleeding-edge 2020.08-2" + depends on BR2_powerpc + depends on BR2_powerpc_440fp + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the powerpc-440fp architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_UCLIBC_STABLE + bool "powerpc-440fp uclibc stable 2020.08-2" + depends on BR2_powerpc + depends on BR2_powerpc_440fp + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the powerpc-440fp architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_GLIBC_BLEEDING_EDGE + bool "powerpc-e300c3 glibc bleeding-edge 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e300c3 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc-e300c3 architecture, + using the glibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_GLIBC_STABLE + bool "powerpc-e300c3 glibc stable 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e300c3 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc-e300c3 architecture, + using the glibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_MUSL_BLEEDING_EDGE + bool "powerpc-e300c3 musl bleeding-edge 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e300c3 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc-e300c3 architecture, + using the musl C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_MUSL_STABLE + bool "powerpc-e300c3 musl stable 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e300c3 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc-e300c3 architecture, + using the musl C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_UCLIBC_BLEEDING_EDGE + bool "powerpc-e300c3 uclibc bleeding-edge 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e300c3 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the powerpc-e300c3 architecture, + using the uclibc C library. This is a bleeding-edge + version, which means it is using the latest versions of + gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_UCLIBC_STABLE + bool "powerpc-e300c3 uclibc stable 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e300c3 + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the powerpc-e300c3 architecture, + using the uclibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_GLIBC_BLEEDING_EDGE + bool "powerpc-e500mc glibc bleeding-edge 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e500mc + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc-e500mc architecture, + using the glibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_GLIBC_STABLE + bool "powerpc-e500mc glibc stable 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e500mc + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc-e500mc architecture, + using the glibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_MUSL_BLEEDING_EDGE + bool "powerpc-e500mc musl bleeding-edge 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e500mc + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc-e500mc architecture, + using the musl C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_MUSL_STABLE + bool "powerpc-e500mc musl stable 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e500mc + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc-e500mc architecture, + using the musl C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_UCLIBC_BLEEDING_EDGE + bool "powerpc-e500mc uclibc bleeding-edge 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e500mc + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the powerpc-e500mc architecture, + using the uclibc C library. This is a bleeding-edge + version, which means it is using the latest versions of + gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_UCLIBC_STABLE + bool "powerpc-e500mc uclibc stable 2020.08-1" + depends on BR2_powerpc + depends on BR2_powerpc_e500mc + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the powerpc-e500mc architecture, + using the uclibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E5500_GLIBC_BLEEDING_EDGE + bool "powerpc64-e5500 glibc bleeding-edge 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_e5500 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc64-e5500 architecture, + using the glibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E5500_GLIBC_STABLE + bool "powerpc64-e5500 glibc stable 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_e5500 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc64-e5500 architecture, + using the glibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E6500_GLIBC_BLEEDING_EDGE + bool "powerpc64-e6500 glibc bleeding-edge 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_e6500 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc64-e6500 architecture, + using the glibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E6500_GLIBC_STABLE + bool "powerpc64-e6500 glibc stable 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_e6500 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc64-e6500 architecture, + using the glibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E6500_MUSL_BLEEDING_EDGE + bool "powerpc64-e6500 musl bleeding-edge 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_e6500 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc64-e6500 architecture, + using the musl C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E6500_MUSL_STABLE + bool "powerpc64-e6500 musl stable 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_e6500 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc64-e6500 architecture, + using the musl C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_POWER8_GLIBC_BLEEDING_EDGE + bool "powerpc64-power8 glibc bleeding-edge 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_power8 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc64-power8 architecture, + using the glibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_POWER8_GLIBC_STABLE + bool "powerpc64-power8 glibc stable 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_power8 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc64-power8 architecture, + using the glibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_POWER8_MUSL_BLEEDING_EDGE + bool "powerpc64-power8 musl bleeding-edge 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_power8 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc64-power8 architecture, + using the musl C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_POWER8_MUSL_STABLE + bool "powerpc64-power8 musl stable 2020.08-1" + depends on BR2_powerpc64 + depends on BR2_powerpc_power8 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc64-power8 architecture, + using the musl C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_GLIBC_BLEEDING_EDGE + bool "powerpc64le-power8 glibc bleeding-edge 2020.08-1" + depends on BR2_powerpc64le + depends on BR2_powerpc_power8 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc64le-power8 architecture, + using the glibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_GLIBC_STABLE + bool "powerpc64le-power8 glibc stable 2020.08-1" + depends on BR2_powerpc64le + depends on BR2_powerpc_power8 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the powerpc64le-power8 architecture, + using the glibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_MUSL_BLEEDING_EDGE + bool "powerpc64le-power8 musl bleeding-edge 2020.08-1" + depends on BR2_powerpc64le + depends on BR2_powerpc_power8 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc64le-power8 architecture, + using the musl C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_MUSL_STABLE + bool "powerpc64le-power8 musl stable 2020.08-1" + depends on BR2_powerpc64le + depends on BR2_powerpc_power8 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the powerpc64le-power8 architecture, + using the musl C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV32_ILP32D_GLIBC_BLEEDING_EDGE + bool "riscv32-ilp32d glibc bleeding-edge 2020.08-1" + depends on BR2_riscv + depends on BR2_riscv_g + depends on BR2_RISCV_32 + depends on BR2_RISCV_ABI_ILP32D + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + help + Bootlin toolchain for the riscv32-ilp32d architecture, + using the glibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_GLIBC_BLEEDING_EDGE + bool "riscv64 glibc bleeding-edge 2020.08-1" + depends on BR2_riscv + depends on BR2_riscv_g + depends on BR2_RISCV_64 + depends on BR2_RISCV_ABI_LP64 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the riscv64 architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_MUSL_BLEEDING_EDGE + bool "riscv64 musl bleeding-edge 2020.08-1" + depends on BR2_riscv + depends on BR2_riscv_g + depends on BR2_RISCV_64 + depends on BR2_RISCV_ABI_LP64 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the riscv64 architecture, using the + musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_GLIBC_BLEEDING_EDGE + bool "sh-sh4 glibc bleeding-edge 2020.08-1" + depends on BR2_sh + depends on BR2_sh4 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the sh-sh4 architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_GLIBC_STABLE + bool "sh-sh4 glibc stable 2020.08-1" + depends on BR2_sh + depends on BR2_sh4 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the sh-sh4 architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_MUSL_BLEEDING_EDGE + bool "sh-sh4 musl bleeding-edge 2020.08-1" + depends on BR2_sh + depends on BR2_sh4 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the sh-sh4 architecture, using the + musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_MUSL_STABLE + bool "sh-sh4 musl stable 2020.08-1" + depends on BR2_sh + depends on BR2_sh4 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the sh-sh4 architecture, using the + musl C library. This is a stable version, which means it is + using stable and proven versions of gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_UCLIBC_BLEEDING_EDGE + bool "sh-sh4 uclibc bleeding-edge 2020.08-1" + depends on BR2_sh + depends on BR2_sh4 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the sh-sh4 architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_UCLIBC_STABLE + bool "sh-sh4 uclibc stable 2020.08-1" + depends on BR2_sh + depends on BR2_sh4 + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the sh-sh4 architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4AEB_GLIBC_BLEEDING_EDGE + bool "sh-sh4aeb glibc bleeding-edge 2020.08-1" + depends on BR2_sh + depends on BR2_sh4aeb + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the sh-sh4aeb architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4AEB_GLIBC_STABLE + bool "sh-sh4aeb glibc stable 2020.08-1" + depends on BR2_sh + depends on BR2_sh4aeb + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the sh-sh4aeb architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4AEB_MUSL_BLEEDING_EDGE + bool "sh-sh4aeb musl bleeding-edge 2020.08-1" + depends on BR2_sh + depends on BR2_sh4aeb + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the sh-sh4aeb architecture, using the + musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4AEB_MUSL_STABLE + bool "sh-sh4aeb musl stable 2020.08-1" + depends on BR2_sh + depends on BR2_sh4aeb + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the sh-sh4aeb architecture, using the + musl C library. This is a stable version, which means it is + using stable and proven versions of gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARC64_GLIBC_BLEEDING_EDGE + bool "sparc64 glibc bleeding-edge 2020.08-1" + depends on BR2_sparc64 + depends on BR2_sparc_v9 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the sparc64 architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARC64_GLIBC_STABLE + bool "sparc64 glibc stable 2020.08-1" + depends on BR2_sparc64 + depends on BR2_sparc_v9 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the sparc64 architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARCV8_UCLIBC_BLEEDING_EDGE + bool "sparcv8 uclibc bleeding-edge 2020.08-1" + depends on BR2_sparc + depends on BR2_sparc_v8 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the sparcv8 architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARCV8_UCLIBC_STABLE + bool "sparcv8 uclibc stable 2020.08-1" + depends on BR2_sparc + depends on BR2_sparc_v8 + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the sparcv8 architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_GLIBC_BLEEDING_EDGE + bool "x86-64-core-i7 glibc bleeding-edge 2020.08-1" + depends on BR2_x86_64 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_X86_CPU_HAS_SSE4 + depends on BR2_X86_CPU_HAS_SSE42 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the x86-64-core-i7 architecture, + using the glibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_GLIBC_STABLE + bool "x86-64-core-i7 glibc stable 2020.08-1" + depends on BR2_x86_64 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_X86_CPU_HAS_SSE4 + depends on BR2_X86_CPU_HAS_SSE42 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the x86-64-core-i7 architecture, + using the glibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_MUSL_BLEEDING_EDGE + bool "x86-64-core-i7 musl bleeding-edge 2020.08-1" + depends on BR2_x86_64 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_X86_CPU_HAS_SSE4 + depends on BR2_X86_CPU_HAS_SSE42 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the x86-64-core-i7 architecture, + using the musl C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_MUSL_STABLE + bool "x86-64-core-i7 musl stable 2020.08-1" + depends on BR2_x86_64 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_X86_CPU_HAS_SSE4 + depends on BR2_X86_CPU_HAS_SSE42 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the x86-64-core-i7 architecture, + using the musl C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_UCLIBC_BLEEDING_EDGE + bool "x86-64-core-i7 uclibc bleeding-edge 2020.08-1" + depends on BR2_x86_64 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_X86_CPU_HAS_SSE4 + depends on BR2_X86_CPU_HAS_SSE42 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the x86-64-core-i7 architecture, + using the uclibc C library. This is a bleeding-edge + version, which means it is using the latest versions of + gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_UCLIBC_STABLE + bool "x86-64-core-i7 uclibc stable 2020.08-1" + depends on BR2_x86_64 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_X86_CPU_HAS_SSE4 + depends on BR2_X86_CPU_HAS_SSE42 + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the x86-64-core-i7 architecture, + using the uclibc C library. This is a stable version, which + means it is using stable and proven versions of gcc, gdb + and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_GLIBC_BLEEDING_EDGE + bool "x86-core2 glibc bleeding-edge 2020.08-1" + depends on BR2_i386 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the x86-core2 architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_GLIBC_STABLE + bool "x86-core2 glibc stable 2020.08-1" + depends on BR2_i386 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the x86-core2 architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_MUSL_BLEEDING_EDGE + bool "x86-core2 musl bleeding-edge 2020.08-1" + depends on BR2_i386 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the x86-core2 architecture, using the + musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_MUSL_STABLE + bool "x86-core2 musl stable 2020.08-1" + depends on BR2_i386 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the x86-core2 architecture, using the + musl C library. This is a stable version, which means it is + using stable and proven versions of gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_UCLIBC_BLEEDING_EDGE + bool "x86-core2 uclibc bleeding-edge 2020.08-1" + depends on BR2_i386 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the x86-core2 architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_UCLIBC_STABLE + bool "x86-core2 uclibc stable 2020.08-1" + depends on BR2_i386 + depends on BR2_X86_CPU_HAS_MMX + depends on BR2_X86_CPU_HAS_SSE + depends on BR2_X86_CPU_HAS_SSE2 + depends on BR2_X86_CPU_HAS_SSE3 + depends on BR2_X86_CPU_HAS_SSSE3 + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the x86-core2 architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_GLIBC_BLEEDING_EDGE + bool "x86-i686 glibc bleeding-edge 2020.08-1" + depends on BR2_i386 + depends on !BR2_x86_i486 + depends on !BR2_x86_i586 + depends on !BR2_x86_x1000 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the x86-i686 architecture, using the + glibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_GLIBC_STABLE + bool "x86-i686 glibc stable 2020.08-1" + depends on BR2_i386 + depends on !BR2_x86_i486 + depends on !BR2_x86_i586 + depends on !BR2_x86_x1000 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Bootlin toolchain for the x86-i686 architecture, using the + glibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_BLEEDING_EDGE + bool "x86-i686 musl bleeding-edge 2020.08-1" + depends on BR2_i386 + depends on !BR2_x86_i486 + depends on !BR2_x86_i586 + depends on !BR2_x86_x1000 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the x86-i686 architecture, using the + musl C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_STABLE + bool "x86-i686 musl stable 2020.08-1" + depends on BR2_i386 + depends on !BR2_x86_i486 + depends on !BR2_x86_i586 + depends on !BR2_x86_x1000 + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Bootlin toolchain for the x86-i686 architecture, using the + musl C library. This is a stable version, which means it is + using stable and proven versions of gcc, gdb and binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_UCLIBC_BLEEDING_EDGE + bool "x86-i686 uclibc bleeding-edge 2020.08-1" + depends on BR2_i386 + depends on !BR2_x86_i486 + depends on !BR2_x86_i586 + depends on !BR2_x86_x1000 + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the x86-i686 architecture, using the + uclibc C library. This is a bleeding-edge version, which + means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_UCLIBC_STABLE + bool "x86-i686 uclibc stable 2020.08-1" + depends on BR2_i386 + depends on !BR2_x86_i486 + depends on !BR2_x86_i586 + depends on !BR2_x86_x1000 + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the x86-i686 architecture, using the + uclibc C library. This is a stable version, which means it + is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_XTENSA_LX60_UCLIBC_BLEEDING_EDGE + bool "xtensa-lx60 uclibc bleeding-edge 2020.08-1" + depends on BR2_xtensa + depends on BR2_XTENSA_CUSTOM + depends on BR2_XTENSA_LITTLE_ENDIAN + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the xtensa-lx60 architecture, using + the uclibc C library. This is a bleeding-edge version, + which means it is using the latest versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +config BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_XTENSA_LX60_UCLIBC_STABLE + bool "xtensa-lx60 uclibc stable 2020.08-1" + depends on BR2_xtensa + depends on BR2_XTENSA_CUSTOM + depends on BR2_XTENSA_LITTLE_ENDIAN + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Bootlin toolchain for the xtensa-lx60 architecture, using + the uclibc C library. This is a stable version, which means + it is using stable and proven versions of gcc, gdb and + binutils. + + https://toolchains.bootlin.com/ + +endchoice +endif diff --git a/toolchain/toolchain-external/toolchain-external-bootlin/toolchain-external-bootlin.hash b/toolchain/toolchain-external/toolchain-external-bootlin/toolchain-external-bootlin.hash new file mode 100644 index 00000000..3e6eb99c --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-bootlin/toolchain-external-bootlin.hash @@ -0,0 +1,340 @@ +# This file was auto-generated by support/scripts/gen-bootlin-toolchains +# Do not edit +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--glibc--bleeding-edge-2020.08-1.sha256 +sha256 212f3c05f3b2263b0e2f902d055aecc2755eba10c0011927788a38faee8fc9aa aarch64--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--glibc--stable-2020.08-1.sha256 +sha256 8ab7a2f17cb96621b048ab0a872650dd62faa54cd74c961b9902b8c04bff7dd1 aarch64--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--musl--bleeding-edge-2020.08-1.sha256 +sha256 3cf00c1ccaf16d0fbc526529789791de1cf98b918ff812e779f8400d40b6c048 aarch64--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--musl--stable-2020.08-1.sha256 +sha256 8319d27e3e637f32ecbdf49ceee2e9b7768b32d3ec7c92c888ff52e6f062bde4 aarch64--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 57fe5cecf37778b35dd09d9a016a1d6d9d7bb0e96ffcc5565e0aa483a46ea3db aarch64--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--uclibc--stable-2020.08-1.sha256 +sha256 04176f56ac977215c5257c307cece2d32e03770b96380e09c50379d4d84a5b39 aarch64--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs/aarch64be--glibc--bleeding-edge-2020.08-1.sha256 +sha256 9631a57809d2fc2c7bb82bdd79d7647ccabe193126cc59ff9721a573d8870510 aarch64be--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs/aarch64be--glibc--stable-2020.08-1.sha256 +sha256 71e24a2a205726d7d8ec56ead13b7eb427d5aed0e057a94ee06688334a07e6dd aarch64be--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs/aarch64be--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 76017614f0e7770499b5d18943398e51ae1c36d075cf8fba90ea050a29cad747 aarch64be--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs/aarch64be--uclibc--stable-2020.08-1.sha256 +sha256 a3bff78e98b2e17ab142ec630f9184f0cd4be6f1f313fdc112d89a843d92cedc aarch64be--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-750d/tarballs/arcle-750d--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 e33570bdddc08d01b0da81ef6c3b240c6e0a4948f0100314b0be63c18c5f75db arcle-750d--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-750d/tarballs/arcle-750d--uclibc--stable-2020.08-1.sha256 +sha256 bae0cbcab3b3b0149503aef6003dd816102b261461e37d89d32ffe9eb7f5dab9 arcle-750d--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-hs38/tarballs/arcle-hs38--glibc--bleeding-edge-2020.08-1.sha256 +sha256 219be8c5390da6830e7529cb0a611996a8c9451bfa1560d7bda4ed5b182f7744 arcle-hs38--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-hs38/tarballs/arcle-hs38--glibc--stable-2020.08-1.sha256 +sha256 ca73399803b6bb46cf27aa2bef5f98eae05fb2fa547403777354067117b44f2f arcle-hs38--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-hs38/tarballs/arcle-hs38--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 65e1408112518c1b31350285838f000a78a0dcd78880842933ef80d64d023967 arcle-hs38--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-hs38/tarballs/arcle-hs38--uclibc--stable-2020.08-1.sha256 +sha256 f0839aa541fe3f29660387c731b52e495bf1b285127b9fba91350b5b67f8ff3e arcle-hs38--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--glibc--bleeding-edge-2020.08-1.sha256 +sha256 261e73520fb211f63a88ecce0689d3647acf295527bd6bd16e88e1bd65b3c603 armv5-eabi--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--glibc--stable-2020.08-1.sha256 +sha256 ed175329057693e496b0d6dbac1ff9db8f8f34737530ab38b5ed677afaefad03 armv5-eabi--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--musl--bleeding-edge-2020.08-1.sha256 +sha256 486b2424321b9866c2677e1dccd3a999394a86f890542c0c63edd5f9456bc4f9 armv5-eabi--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--musl--stable-2020.08-1.sha256 +sha256 732edab571d017c550d74b8c53dc703fc650de7aab66e68c70a0bc19d66d0a22 armv5-eabi--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 5e11ec24b910c43f24577b41a38cded192e443c0606be60944fe85b0fbf4b2dd armv5-eabi--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--uclibc--stable-2020.08-1.sha256 +sha256 cf6a668d4f30a4a2e76a0e88177e1301342cc011e94ea399353e77ede0efbb22 armv5-eabi--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs/armv6-eabihf--glibc--bleeding-edge-2020.08-1.sha256 +sha256 0c66147f05b21529311338e246ed285f9f0f4830af0d4db28e401160a81d1b4f armv6-eabihf--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs/armv6-eabihf--glibc--stable-2020.08-1.sha256 +sha256 539e31b3bdcf76c3d6710951c74fbe682e2de8da4d110b981e9108b656890f4a armv6-eabihf--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs/armv6-eabihf--musl--bleeding-edge-2020.08-1.sha256 +sha256 e8c05fb7b909dfd5a42f6de78d1b20605c453a9aea219981966d213ee98968e2 armv6-eabihf--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs/armv6-eabihf--musl--stable-2020.08-1.sha256 +sha256 68e43e3cd0e1fdd5c2b3ab718368f6ee24824725c641e148ef0a0da57f872034 armv6-eabihf--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs/armv6-eabihf--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 749bb97f7535414c3096564f6e790d1e43ab8c406282480937d8f34478ac7a35 armv6-eabihf--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs/armv6-eabihf--uclibc--stable-2020.08-1.sha256 +sha256 680a3bf708cb792c74561514dcba882727086c9317397e8a3ebece1b50fbea4e armv6-eabihf--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--glibc--bleeding-edge-2020.08-1.sha256 +sha256 9f5c703cea20834276e1a81e2e54483d0f4fe0e57063ba4d058338ef9c858eb2 armv7-eabihf--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--glibc--stable-2020.08-1.sha256 +sha256 7b6682603af9a9b5c0e46fd57165723483bb68295e827d14d238e63f33a147a8 armv7-eabihf--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--musl--bleeding-edge-2020.08-1.sha256 +sha256 d9e71499cfb1790a31056ca9199981f699c7e4966b5854f7780d97f5a74d601e armv7-eabihf--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--musl--stable-2020.08-1.sha256 +sha256 5c4c9bce5a2a46a9ad46e49e86df708893a8907e702a8ee1b5febd3950e030ed armv7-eabihf--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 7c3ee9f3d6bd4eda38ec94a686a9e348b0f800214f1225c68d172e4ac6b81066 armv7-eabihf--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--stable-2020.08-1.sha256 +sha256 f61866b0e60da62eff92b197f0e2a72e8d023bf944a25eb97efc9f5d93680ed9 armv7-eabihf--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv7m/tarballs/armv7m--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 9ce29bbcbc0a2c4925e814a6332c2c71e9a13476040e1db0a5495c68d1566bee armv7m--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/armv7m/tarballs/armv7m--uclibc--stable-2020.08-1.sha256 +sha256 c20df31191b88df09d8ff225ca82e3bb769b2b7ffd3827f6dbf77a6d23230339 armv7m--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/m68k-68xxx/tarballs/m68k-68xxx--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 49e26c831694d15bb023a0a36cf9d3967e0ab75c555d8d07bba3317a0a18aa40 m68k-68xxx--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/m68k-68xxx/tarballs/m68k-68xxx--uclibc--stable-2020.08-1.sha256 +sha256 b133663f5589c71315224792b7e542cfa578e4c354e4a2ac8afcd5ee77fd6f45 m68k-68xxx--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/m68k-coldfire/tarballs/m68k-coldfire--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 3efa687ca5d1c5f1ec53032e05a12467ec148c2328836754841f74be217bb035 m68k-coldfire--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/m68k-coldfire/tarballs/m68k-coldfire--uclibc--stable-2020.08-1.sha256 +sha256 f9879a167e2279fe925a3dc963d349d3d84c85866ec91512b5a7ce667318d716 m68k-coldfire--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs/microblazebe--glibc--bleeding-edge-2020.08-1.sha256 +sha256 d9fb4403d14f53d5f4be18f38e9604244042ea33ad980ebf0b0057b70d603d16 microblazebe--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs/microblazebe--glibc--stable-2020.08-1.sha256 +sha256 ea466445240a25ba98cd7b34f748afca151fc2479b187566f2faa98f586bfd93 microblazebe--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs/microblazebe--musl--bleeding-edge-2020.08-1.sha256 +sha256 0157d051ac5e8b46b4eed7333c9323d1c1602ad5e958e2c12fe9b8dc3b6781c7 microblazebe--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs/microblazebe--musl--stable-2020.08-1.sha256 +sha256 ec51b07f63cf6d0af1eaed10641d8690a350d879e4b74addca2b3f7992186ee2 microblazebe--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs/microblazebe--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 3aaaab352ca31b2263e29c363609a363a38931f9733c8ad3a386c5cbb791f8e1 microblazebe--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs/microblazebe--uclibc--stable-2020.08-1.sha256 +sha256 d2b31177c9c009cd70a9ad4af6e903dfdb5254e3f49fe9389e0e11af7a98e6b6 microblazebe--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs/microblazeel--glibc--bleeding-edge-2020.08-1.sha256 +sha256 83a451601b24b6a9c609630119e100ef9f18408bdfe1241cc53a904d540e6936 microblazeel--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs/microblazeel--glibc--stable-2020.08-1.sha256 +sha256 c168737ec92889e632673f826b13cf74cfe4ba3ad06cc9e328ee20268ec439e9 microblazeel--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs/microblazeel--musl--bleeding-edge-2020.08-1.sha256 +sha256 47660f8a4d84c7b8cd7610b8ba9df5bbfba043b35ebc07d96468c950b282f44d microblazeel--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs/microblazeel--musl--stable-2020.08-1.sha256 +sha256 6a51e38fe3f72765ad1172488321b60c59867253edce7b6680500c4193a542f7 microblazeel--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs/microblazeel--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 6005fa2b229be380a2e4b8227daa0b4be4739b7cda628679de6d0e048755c769 microblazeel--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs/microblazeel--uclibc--stable-2020.08-1.sha256 +sha256 845a4795cab5f88d96679945f7147c5dfe0dd19751b88734ef786bfd5ee5db67 microblazeel--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs/mips32--glibc--bleeding-edge-2020.08-1.sha256 +sha256 63baffcf0a94d7f1b7421ad61ddb56ce5c05595acd09f482dffe13ddf17efd81 mips32--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs/mips32--glibc--stable-2020.08-1.sha256 +sha256 90e300a2d224ea79b69cae68e93b0aab70858381b0d11bac846458c625d72653 mips32--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs/mips32--musl--bleeding-edge-2020.08-1.sha256 +sha256 4ebc20461eafca9c9b50e36f81e13095229aac0cd1dd98a985060f2e95665983 mips32--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs/mips32--musl--stable-2020.08-1.sha256 +sha256 1a544242e9aaaee75c240439a31d2f4304b97705ed2d9e9e38ca552c5f03dced mips32--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs/mips32--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 4e0e1bf24e74746775992efd8b8bafbf5b6dd56bfdd1421b2207e1ea23ba2eb3 mips32--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs/mips32--uclibc--stable-2020.08-1.sha256 +sha256 4c1da37d131f4e66b07536707c6d1be3de29719f228346d4c860c4b3cb4fef31 mips32--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs/mips32el--glibc--bleeding-edge-2020.08-1.sha256 +sha256 617c845261bb0a00571c68f250c5a369e60a09164dd3316ab8126c327d911c4b mips32el--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs/mips32el--glibc--stable-2020.08-1.sha256 +sha256 87875c25075b3850526a54c5e828ce489355d0d50107c262539ee5f577f38d6d mips32el--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs/mips32el--musl--bleeding-edge-2020.08-1.sha256 +sha256 4c81898f2e484c1e1e7d7ac1ae80e0aca5619ef01190df37e41ca459a147e682 mips32el--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs/mips32el--musl--stable-2020.08-1.sha256 +sha256 02155c88e0bf92f63105803767ce457790bfd920297ef326c9920853b5a3fe20 mips32el--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs/mips32el--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 024b0e27fd0c9792bad1944e052768e03173b133079d7c95bf30435d05620152 mips32el--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs/mips32el--uclibc--stable-2020.08-1.sha256 +sha256 8398010ea3dbd43ee99b6be0e3340db44b32228bf063a9c13bf43a359e3d1f6e mips32el--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs/mips32r5el--glibc--bleeding-edge-2020.08-1.sha256 +sha256 f000e8a78a24671a6f87909156e0c2a7403ab5864001c1388faf60190f8594c8 mips32r5el--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs/mips32r5el--glibc--stable-2020.08-1.sha256 +sha256 a52a115b852afce04732aa9460c58f30fbfdb17601f9bf32ea97a77d1a073a53 mips32r5el--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs/mips32r5el--musl--bleeding-edge-2020.08-1.sha256 +sha256 2620edf1045c61ddaf12f979a86719fa83b6598eb10f358a379e52462bb734ba mips32r5el--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs/mips32r5el--musl--stable-2020.08-1.sha256 +sha256 0e03a5f2a7d8ba739f3ef53538d73c33bfc55f45522d4515688ebcb58005e5a1 mips32r5el--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs/mips32r5el--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 585e252971553b52833d3970f709196707d908a84a5e1be8360e3019d6bb0da9 mips32r5el--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs/mips32r5el--uclibc--stable-2020.08-1.sha256 +sha256 7ffccb1f86e7b0f1dd0d87f455ff5f2619a58724850b0b9f106b6545d4de8b3f mips32r5el--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs/mips32r6el--glibc--bleeding-edge-2020.08-1.sha256 +sha256 d6376aeb2b243a58a98c415f2ecf131e14ccdce849a76c0f01902ca4b02fc0ba mips32r6el--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs/mips32r6el--glibc--stable-2020.08-1.sha256 +sha256 8640635116e26e51d57b6d5dc1e3213528f742f0cf97cd326af4f5d8e17a63f2 mips32r6el--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs/mips32r6el--musl--bleeding-edge-2020.08-1.sha256 +sha256 2647d34cb990bdab77efbcc6b4e3d5b1fd02c5032837b7a64bc52cef64aba4ec mips32r6el--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs/mips32r6el--musl--stable-2020.08-1.sha256 +sha256 24b1adfa2eb31f49ae5b4fce9ee9fcb30205ca6f29e423f77bd851070baaa255 mips32r6el--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs/mips32r6el--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 18dee7e9de84f6e7d6c9d083decdd465ab08979ebd661d82efbe5dc93f11dcb0 mips32r6el--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs/mips32r6el--uclibc--stable-2020.08-1.sha256 +sha256 28999f7474a84c3ec36b504c47cf671fc6e82d9b38580a0e2ebe495850ada097 mips32r6el--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs/mips64-n32--glibc--bleeding-edge-2020.08-1.sha256 +sha256 b5d90c06c894d841677da5f81e395113d22a79c53f934e12151128660dd08e76 mips64-n32--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs/mips64-n32--glibc--stable-2020.08-1.sha256 +sha256 7ed7a81f1a086e47ddb79d0bdc7142a6b7349feea20b05393be133cc4cf1fff5 mips64-n32--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs/mips64-n32--musl--bleeding-edge-2020.08-1.sha256 +sha256 937ce7ffda61c93489862122fe6dbfd53445afbdbfb615c06805b05497f336fb mips64-n32--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs/mips64-n32--musl--stable-2020.08-1.sha256 +sha256 2a2acf732498b0acb22f815e1ce7c3ca8124719131febe95c723b1cbab76d947 mips64-n32--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs/mips64-n32--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 16ac2a957757f56e0414a638bb3bd526b2d1c3055dd7e036dcdec4bf950f0d1b mips64-n32--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs/mips64-n32--uclibc--stable-2020.08-1.sha256 +sha256 10d9fb894e5e548e47e2930139117de9549ea49b971ca9fad12f56ef6d188b77 mips64-n32--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs/mips64el-n32--glibc--bleeding-edge-2020.08-1.sha256 +sha256 7de65f68b14350670adbd0249562d69e75f7fc65b749284303c32f88112cb6b4 mips64el-n32--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs/mips64el-n32--glibc--stable-2020.08-1.sha256 +sha256 a6eea19d94a7a953cac84670dcac3adb42dd3eb8950b1f7ca0f1ef37abc7e33f mips64el-n32--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs/mips64el-n32--musl--bleeding-edge-2020.08-1.sha256 +sha256 7cff57dd6d0ee7778c5b764a388bf9e997ba2349da5274b8d8598173030618be mips64el-n32--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs/mips64el-n32--musl--stable-2020.08-1.sha256 +sha256 3c42d88c84689703d5b1380f4cf5ad20872611d08ce5fac1a4375bfec80a6b27 mips64el-n32--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs/mips64el-n32--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 5553a979238f6a25c4e965e18cfbebe36018041ba46968174063328c25e485fc mips64el-n32--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs/mips64el-n32--uclibc--stable-2020.08-1.sha256 +sha256 80e8fa6cca6e0267dad5376bca79ce7457b8d345d43a0d409e4820a791965db9 mips64el-n32--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs/mips64r6el-n32--glibc--bleeding-edge-2020.08-1.sha256 +sha256 0f09da21d6069642064f767a25e64c89caad80660ea184345652301c41a30ac9 mips64r6el-n32--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs/mips64r6el-n32--glibc--stable-2020.08-1.sha256 +sha256 7100d3862983c5fb8237386ff4148f6e550e6b299c8b7946a349dedef60f75c9 mips64r6el-n32--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs/mips64r6el-n32--musl--bleeding-edge-2020.08-1.sha256 +sha256 a692687149e59fdb7ad780cfc51e4a7307ed599433280369fe9e43c63453e4ec mips64r6el-n32--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs/mips64r6el-n32--musl--stable-2020.08-1.sha256 +sha256 e7a35e063fcd748df6f347e5aa97d081f4422480fb02ce6925c4c351c9aca318 mips64r6el-n32--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs/mips64r6el-n32--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 69d4287cb32413e054684db9545e6898c09cb90c86a0dce8bb9999498eb798ab mips64r6el-n32--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs/mips64r6el-n32--uclibc--stable-2020.08-1.sha256 +sha256 4d9eb8900b99871e02ae17b823341189dce3aa592ee82864c73ca3164948aaae mips64r6el-n32--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/nios2/tarballs/nios2--glibc--bleeding-edge-2020.08-1.sha256 +sha256 b3c7c24e08759af3ea13fc39e8bddb52e4528a05d4aee3c2f75733e067d12edc nios2--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/nios2/tarballs/nios2--glibc--stable-2020.08-1.sha256 +sha256 a46d5ff90e3623d159f3b5be53493e13a2e78ebb733a1ccb68e829d6e28aa129 nios2--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/openrisc/tarballs/openrisc--musl--bleeding-edge-2020.08-1.sha256 +sha256 382ec04511d51f99028b6c568c909e4e010bcfe1d4a4c1ff6f10c7c07c24b3b2 openrisc--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/openrisc/tarballs/openrisc--musl--stable-2020.08-1.sha256 +sha256 697ef122917022f400003931bc6da75fe07bb5234ef8186cbe027e560f04a168 openrisc--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/openrisc/tarballs/openrisc--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 e45d02c9272c909db1c92b6403ed1e0813889ef0c22b2f5166d2675f62d3f20f openrisc--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/openrisc/tarballs/openrisc--uclibc--stable-2020.08-1.sha256 +sha256 62c60f9f99828a01f3a16060ceba74b8e2603a8ca3585649434a66f721ecdf75 openrisc--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs/powerpc-440fp--glibc--bleeding-edge-2020.08-2.sha256 +sha256 7b7c2f66ccd3d44cd8a829b5879277be9cfb17f34a26d5055b29a6bab40ff9df powerpc-440fp--glibc--bleeding-edge-2020.08-2.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs/powerpc-440fp--glibc--stable-2020.08-2.sha256 +sha256 ae7b3d06090dfcf54b1e3b4bd4fda9ae5aaaf34aba9118820e6e9d8f1b70c0c4 powerpc-440fp--glibc--stable-2020.08-2.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs/powerpc-440fp--musl--bleeding-edge-2020.08-2.sha256 +sha256 a6def102659538e3e5838bf4267cd33486d795db753a7109b5e413499ef5df89 powerpc-440fp--musl--bleeding-edge-2020.08-2.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs/powerpc-440fp--musl--stable-2020.08-2.sha256 +sha256 76de0310078633ff34654c8c54d7e80a609c58521a7f2a8041ae4a574889d38a powerpc-440fp--musl--stable-2020.08-2.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs/powerpc-440fp--uclibc--bleeding-edge-2020.08-2.sha256 +sha256 abbe38fc92a71d568c08452f99fe3470e5ded9a666c6829d9104fcf06b984503 powerpc-440fp--uclibc--bleeding-edge-2020.08-2.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs/powerpc-440fp--uclibc--stable-2020.08-2.sha256 +sha256 d4346ce563ddfbd4946b2dfbc766cafebbf4b09488dc8b398ab8bb242bac9268 powerpc-440fp--uclibc--stable-2020.08-2.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs/powerpc-e300c3--glibc--bleeding-edge-2020.08-1.sha256 +sha256 fe4b9817f060d84118fff5b7d855eacac472975f2adfececb641d2999f94a7ea powerpc-e300c3--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs/powerpc-e300c3--glibc--stable-2020.08-1.sha256 +sha256 77d215d650850af65c3ac1792dcf100322f3dfea78ba174118197ec0c8a49807 powerpc-e300c3--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs/powerpc-e300c3--musl--bleeding-edge-2020.08-1.sha256 +sha256 4aa2b5c3c2c3263edfdf95284f0774aed8a47446b7a362ee44dc24d83db06896 powerpc-e300c3--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs/powerpc-e300c3--musl--stable-2020.08-1.sha256 +sha256 129d9aab59e9edfc68739b612f2ee4abce5679830250fbcd50b89ec3d2c865c5 powerpc-e300c3--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs/powerpc-e300c3--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 54e6960edd6419bb268b651ffedc24af73a72ad9dd145c1849a6e0fb6f997b15 powerpc-e300c3--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs/powerpc-e300c3--uclibc--stable-2020.08-1.sha256 +sha256 1057b488623a80037558a1439555b1a15b25a4d7f42dc49d0169349592ad5b3e powerpc-e300c3--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs/powerpc-e500mc--glibc--bleeding-edge-2020.08-1.sha256 +sha256 8cab4fbb645be782a6eaeb7b6afd75fda4c0dc8ca9a4095b0be9b6eeb29a9759 powerpc-e500mc--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs/powerpc-e500mc--glibc--stable-2020.08-1.sha256 +sha256 5bb9f6b10b9d2d1a90a1a96a477b90eea32a269c1afccd89284a38a63d7f1c82 powerpc-e500mc--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs/powerpc-e500mc--musl--bleeding-edge-2020.08-1.sha256 +sha256 36636df56a04e44ddb5bba2e0a30b1f3986618399381278cdb2be207a25825c0 powerpc-e500mc--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs/powerpc-e500mc--musl--stable-2020.08-1.sha256 +sha256 7f924fc3cc3c9070ea1c9d270fea71715bd52beac14649d8a00416dfde1b897b powerpc-e500mc--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs/powerpc-e500mc--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 262a2bddd29d6c24cbc32a873e78895499732624923195a5e7ffe16b487dc461 powerpc-e500mc--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs/powerpc-e500mc--uclibc--stable-2020.08-1.sha256 +sha256 e817af2d5a0fba654e7766dcad89380e278af9feb35c2d0591a0f8d893defa48 powerpc-e500mc--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e5500/tarballs/powerpc64-e5500--glibc--bleeding-edge-2020.08-1.sha256 +sha256 418b79f8313ac4ff29cb6c2d639848eb74a0245666142a307374513cffd472e6 powerpc64-e5500--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e5500/tarballs/powerpc64-e5500--glibc--stable-2020.08-1.sha256 +sha256 a51ddba944394de41b2f7c001772bb68074175d65a0976749da5289a5e705f23 powerpc64-e5500--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e6500/tarballs/powerpc64-e6500--glibc--bleeding-edge-2020.08-1.sha256 +sha256 c537c2ef618f767762295806658bb0add514453068ea72ce2bd6e6e805e64af5 powerpc64-e6500--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e6500/tarballs/powerpc64-e6500--glibc--stable-2020.08-1.sha256 +sha256 1d8aaf1492f69496b01fc930fa928ffd3144d1465c7c954128ed31ce576306b6 powerpc64-e6500--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e6500/tarballs/powerpc64-e6500--musl--bleeding-edge-2020.08-1.sha256 +sha256 c46c7595384929211ce2f54655ceb4eb1d32054923892cd5d10913be364fa6f2 powerpc64-e6500--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e6500/tarballs/powerpc64-e6500--musl--stable-2020.08-1.sha256 +sha256 a295073db591ed16eec90caf5fdef62ccff5550166d36496ab24aa993bdb2a42 powerpc64-e6500--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-power8/tarballs/powerpc64-power8--glibc--bleeding-edge-2020.08-1.sha256 +sha256 cbe65abf36fa807176a01488751a2e45800791534400b803c024e4c29357862c powerpc64-power8--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-power8/tarballs/powerpc64-power8--glibc--stable-2020.08-1.sha256 +sha256 a670ec95dbfb53a812e9f21aec2ad880a3349125f19219b9a0d139a7d5b9e83b powerpc64-power8--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-power8/tarballs/powerpc64-power8--musl--bleeding-edge-2020.08-1.sha256 +sha256 1f5b3da078534f9e493f29956d3a1f31ad0539d26b8f83e55c271b6671021928 powerpc64-power8--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-power8/tarballs/powerpc64-power8--musl--stable-2020.08-1.sha256 +sha256 12043ab87cd4ae0c4339cddcb3eb017eaae406bbb332bf3edebfd7f70ecd0a31 powerpc64-power8--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs/powerpc64le-power8--glibc--bleeding-edge-2020.08-1.sha256 +sha256 14e3ff4afbf363decb2c0ddc33b75e41aad9748a65a445cc176215853d0d6185 powerpc64le-power8--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs/powerpc64le-power8--glibc--stable-2020.08-1.sha256 +sha256 342442f0773cdf5091443ab06ecf9c3d3c05cf8e2464b82a54707bec90d2a358 powerpc64le-power8--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs/powerpc64le-power8--musl--bleeding-edge-2020.08-1.sha256 +sha256 fab5f4bc6d219f53f8b15e0d49aea27cdbac9e08e05946577440329c003fc216 powerpc64le-power8--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs/powerpc64le-power8--musl--stable-2020.08-1.sha256 +sha256 47d184beca271c67bdb544fac87cb2126ea2b397d076a79dfaf9667e999fbccd powerpc64le-power8--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/riscv32-ilp32d/tarballs/riscv32-ilp32d--glibc--bleeding-edge-2020.08-1.sha256 +sha256 18a47b0c221137f40720df08e9bbdc0bcb6e68cde3a30906681e4dec83eb7547 riscv32-ilp32d--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/riscv64/tarballs/riscv64--glibc--bleeding-edge-2020.08-1.sha256 +sha256 09818eccb414359b1df87ec347d94e7bfccc45f8a5eafe8791fddf8110fcc581 riscv64--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/riscv64/tarballs/riscv64--musl--bleeding-edge-2020.08-1.sha256 +sha256 2af03e220070eacf6eaf63ccb7442ca5af805caf96ae52fb3eb15370988f12cf riscv64--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs/sh-sh4--glibc--bleeding-edge-2020.08-1.sha256 +sha256 277e78c999c2cba42b25660bbbe0d105a80277c986e0807cfa16a6595af6ce9e sh-sh4--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs/sh-sh4--glibc--stable-2020.08-1.sha256 +sha256 256064f35b2759c71ac1bb6c9fe74a7c7c62f070746cfeb35ff0ecb40a91c2b4 sh-sh4--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs/sh-sh4--musl--bleeding-edge-2020.08-1.sha256 +sha256 34bf211ea0456ef86bbe914e0755f18681531a015e33b8c26b97ca68e29a3ed5 sh-sh4--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs/sh-sh4--musl--stable-2020.08-1.sha256 +sha256 d335189728a6bebd5d180c58c6dabd049500d57ae60fcc8fc51ba5aafafb21d3 sh-sh4--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs/sh-sh4--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 89e42b9e7bc3f67660656690899b2fad4015af5c9084dad6624315c39b486d76 sh-sh4--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs/sh-sh4--uclibc--stable-2020.08-1.sha256 +sha256 13a60cd5653c24491748388284080d5b8da649a63090c0d308c3a3b069b04f21 sh-sh4--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs/sh-sh4aeb--glibc--bleeding-edge-2020.08-1.sha256 +sha256 fe063dd95c71ab41145412faf5e4c2a1386efdda5d944ecc83121fb9b4e213f2 sh-sh4aeb--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs/sh-sh4aeb--glibc--stable-2020.08-1.sha256 +sha256 054e669a3165aff35539d3fb7cbde2650c79e5aa88a90a844488ba175a645a07 sh-sh4aeb--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs/sh-sh4aeb--musl--bleeding-edge-2020.08-1.sha256 +sha256 aa2c560ed4cf4dac8a8803b3fccf846472a226a1a22833c1cbe0d7fd347af3a7 sh-sh4aeb--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs/sh-sh4aeb--musl--stable-2020.08-1.sha256 +sha256 89e7fa5792ed1c35bd57c65935888beafce9a81f84c7d73508b1582539415a3b sh-sh4aeb--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sparc64/tarballs/sparc64--glibc--bleeding-edge-2020.08-1.sha256 +sha256 abba04fcfa11a1eedbf5f5ff38d69d793d394f08998f8374723358b3123cc113 sparc64--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sparc64/tarballs/sparc64--glibc--stable-2020.08-1.sha256 +sha256 57184f6edfba03ae9c098ad0bab6635475bb45a874982ad11c0b91bf6043dbc4 sparc64--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sparcv8/tarballs/sparcv8--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 210defc0781683a240bac25295ff612d6b6c875c7d938d11512f8ec9472245bc sparcv8--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/sparcv8/tarballs/sparcv8--uclibc--stable-2020.08-1.sha256 +sha256 14d508510bf0ed813f6436718486cce7fc6ebfb29b46eea5e52a474b2d5eaa00 sparcv8--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs/x86-64-core-i7--glibc--bleeding-edge-2020.08-1.sha256 +sha256 77935109bbd1bdb84813a588b807052823033ed9094131fdd56f558023a3de08 x86-64-core-i7--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs/x86-64-core-i7--glibc--stable-2020.08-1.sha256 +sha256 3dd408e857f5c8e579748995477f2783fcf5ad0aac89719ea3c5c75446dfa63c x86-64-core-i7--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs/x86-64-core-i7--musl--bleeding-edge-2020.08-1.sha256 +sha256 5d2d13d56a76db30ec28a11a3d6219fe407c3d1b9bbcd4a7255a783da4fcdfcb x86-64-core-i7--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs/x86-64-core-i7--musl--stable-2020.08-1.sha256 +sha256 26ea3cc16c294663b64123c15a95d53f00419ef0f6bcdef489865835c6022650 x86-64-core-i7--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs/x86-64-core-i7--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 d1ff16cde93c727b4b39844877f93d865d6945185e71dba4b6c07d2d725e2576 x86-64-core-i7--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs/x86-64-core-i7--uclibc--stable-2020.08-1.sha256 +sha256 0fdcb93add6ff697b536198da76b4e93bd81efd67793d6640fd6bc1b216abc00 x86-64-core-i7--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs/x86-core2--glibc--bleeding-edge-2020.08-1.sha256 +sha256 10e7b362008fc3057e9eb42a3fab5f0dc430e05b285dc4f2ec3367d5f36a3094 x86-core2--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs/x86-core2--glibc--stable-2020.08-1.sha256 +sha256 18bbabb672df24bbc2646d94d23c47d16a6c0d8342d910bf441021fad4a82ce3 x86-core2--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs/x86-core2--musl--bleeding-edge-2020.08-1.sha256 +sha256 81edcbd69f2fd479d9a25597d0515d42c9c891e1a534d947e87a2e9a3dc67924 x86-core2--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs/x86-core2--musl--stable-2020.08-1.sha256 +sha256 9e23de3364e1aaec50945c70089273a025ff44815ce4632324d1950e7ba07e9a x86-core2--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs/x86-core2--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 717b6c103e8e50202a45277eef8f9b41b978b17a0110cacddd52a01b7eba3039 x86-core2--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs/x86-core2--uclibc--stable-2020.08-1.sha256 +sha256 e23812719fa1027fa0e2a161216cf97ff14bf3bcc19bb400281060a40e762a0d x86-core2--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--glibc--bleeding-edge-2020.08-1.sha256 +sha256 9e8c83479dc91e516ee66fe21ff8693afa380cfdb3192c5c1351430a035ab92a x86-i686--glibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--glibc--stable-2020.08-1.sha256 +sha256 77362d37279636371a42b09bab4f8f1a51a786ed7ec316221786b279389c8008 x86-i686--glibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--musl--bleeding-edge-2020.08-1.sha256 +sha256 ccb6896f02be3444d6cabff0966a0b6f866ebc6d32b483031541626c2fc748fe x86-i686--musl--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--musl--stable-2020.08-1.sha256 +sha256 bbbf8b7946e65f35366cb0371910fe3e95e6399c4e6a9cac8b0a4674bcadc36b x86-i686--musl--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 bd57d5cd7958ba7469d74abdf93db1993042f30c774ec3d1fceff57d522a489c x86-i686--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs/x86-i686--uclibc--stable-2020.08-1.sha256 +sha256 139c31c25f9834137bbbb4aadc9d78def2819d2c1b9e89dd2300b11fb4879bb4 x86-i686--uclibc--stable-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/xtensa-lx60/tarballs/xtensa-lx60--uclibc--bleeding-edge-2020.08-1.sha256 +sha256 46801fc1ae89f380c1b6e1bf8ea723f9d7b1590eea3a2d1218a0307cd4325bc8 xtensa-lx60--uclibc--bleeding-edge-2020.08-1.tar.bz2 +# From https://toolchains.bootlin.com/downloads/releases/toolchains/xtensa-lx60/tarballs/xtensa-lx60--uclibc--stable-2020.08-1.sha256 +sha256 b4b28d855594290c853292c9cce43bba573d4187ecb47d78f25411a7f4300d49 xtensa-lx60--uclibc--stable-2020.08-1.tar.bz2 diff --git a/toolchain/toolchain-external/toolchain-external-bootlin/toolchain-external-bootlin.mk b/toolchain/toolchain-external/toolchain-external-bootlin/toolchain-external-bootlin.mk new file mode 100644 index 00000000..cfe44742 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-bootlin/toolchain-external-bootlin.mk @@ -0,0 +1,1023 @@ +################################################################################ +# +# toolchain-external-bootlin +# +################################################################################ + +# This file was auto-generated by support/scripts/gen-bootlin-toolchains +# Do not edit +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64BE_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64be--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64BE_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64be--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64BE_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64be--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64BE_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = aarch64be--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_750D_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = arcle-750d--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-750d/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_750D_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = arcle-750d--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-750d/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = arcle-hs38--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-hs38/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = arcle-hs38--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-hs38/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = arcle-hs38--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-hs38/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCLE_HS38_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = arcle-hs38--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/arcle-hs38/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv5-eabi--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv5-eabi--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv5-eabi--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv5-eabi--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv5-eabi--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv5-eabi--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv6-eabihf--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv6-eabihf--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv6-eabihf--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv6-eabihf--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv6-eabihf--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV6_EABIHF_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv6-eabihf--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv7-eabihf--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv7-eabihf--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv7-eabihf--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv7-eabihf--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv7-eabihf--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv7-eabihf--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7M_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv7m--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv7m/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7M_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = armv7m--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/armv7m/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_68XXX_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = m68k-68xxx--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/m68k-68xxx/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_68XXX_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = m68k-68xxx--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/m68k-68xxx/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_COLDFIRE_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = m68k-coldfire--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/m68k-coldfire/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_M68K_COLDFIRE_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = m68k-coldfire--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/m68k-coldfire/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazebe--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazebe--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazebe--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazebe--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazebe--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEBE_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazebe--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazebe/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazeel--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazeel--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazeel--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazeel--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazeel--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MICROBLAZEEL_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = microblazeel--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/microblazeel/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32el--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32el--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32el--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32el--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32el--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32EL_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32el--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r5el--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r5el--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r5el--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r5el--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r5el--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R5EL_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r5el--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r5el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r6el--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r6el--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r6el--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r6el--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r6el--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS32R6EL_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips32r6el--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips32r6el/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64-n32--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64-n32--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64-n32--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64-n32--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64-n32--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64_N32_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64-n32--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64el-n32--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64el-n32--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64el-n32--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64el-n32--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64el-n32--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64EL_N32_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64el-n32--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64r6el-n32--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64r6el-n32--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64r6el-n32--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64r6el-n32--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64r6el-n32--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_MIPS64R6EL_N32_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = mips64r6el-n32--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/mips64r6el-n32/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_NIOS2_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = nios2--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/nios2/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_NIOS2_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = nios2--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/nios2/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = openrisc--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/openrisc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = openrisc--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/openrisc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = openrisc--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/openrisc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_OPENRISC_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = openrisc--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/openrisc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-440fp--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-440fp--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-440fp--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-440fp--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-440fp--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_440FP_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-440fp--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-440fp/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e300c3--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e300c3--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e300c3--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e300c3--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e300c3--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E300C3_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e300c3--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e500mc--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e500mc--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e500mc--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e500mc--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e500mc--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC_E500MC_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc-e500mc--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e500mc/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E5500_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-e5500--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e5500/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E5500_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-e5500--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e5500/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E6500_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-e6500--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e6500/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E6500_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-e6500--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e6500/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E6500_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-e6500--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e6500/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_E6500_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-e6500--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-e6500/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_POWER8_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-power8--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-power8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_POWER8_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-power8--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-power8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_POWER8_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-power8--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-power8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64_POWER8_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64-power8--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64-power8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64le-power8--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64le-power8--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64le-power8--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_POWERPC64LE_POWER8_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = powerpc64le-power8--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV32_ILP32D_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = riscv32-ilp32d--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/riscv32-ilp32d/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = riscv64--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/riscv64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = riscv64--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/riscv64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4AEB_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4aeb--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4AEB_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4aeb--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4AEB_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4aeb--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SH_SH4AEB_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sh-sh4aeb--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARC64_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sparc64--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sparc64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARC64_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sparc64--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sparc64/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARCV8_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sparcv8--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sparcv8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_SPARCV8_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = sparcv8--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/sparcv8/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-64-core-i7--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-64-core-i7--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-64-core-i7--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-64-core-i7--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-64-core-i7--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_64_CORE_I7_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-64-core-i7--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-64-core-i7/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-core2--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-core2--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-core2--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-core2--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-core2--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_CORE2_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-core2--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_GLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-i686--glibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_GLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-i686--glibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-i686--musl--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-i686--musl--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-i686--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = x86-i686--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_XTENSA_LX60_UCLIBC_BLEEDING_EDGE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = xtensa-lx60--uclibc--bleeding-edge-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/xtensa-lx60/tarballs +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_XTENSA_LX60_UCLIBC_STABLE),y) +TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION = 2020.08-1 +TOOLCHAIN_EXTERNAL_BOOTLIN_SOURCE = xtensa-lx60--uclibc--stable-$(TOOLCHAIN_EXTERNAL_BOOTLIN_VERSION).tar.bz2 +TOOLCHAIN_EXTERNAL_BOOTLIN_SITE = https://toolchains.bootlin.com/downloads/releases/toolchains/xtensa-lx60/tarballs +endif + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in new file mode 100644 index 00000000..2341d088 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in @@ -0,0 +1,65 @@ +config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS + bool "Codescape IMG GNU Linux Toolchain 2018.09" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_7 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_MIPS_CPU_MIPS32R6 || (BR2_MIPS_CPU_MIPS64R6 && !BR2_MIPS_SOFT_FLOAT) + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7 + select BR2_TOOLCHAIN_GCC_AT_LEAST_6 + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_OPENMP + help + Codescape IMG GNU Linux Toolchain 2018.09 for the MIPS + architecture, from MIPS Tech LLC. It uses gcc 6.3.0, + binutils 2.28.51, glibc 2.20, gdb 7.9.1 and kernel headers + 4.7. It has support for the following variants: + - MIPS32r6 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Disable 'Use soft-float' + - MIPS32r6 - Big-Endian, Soft-Float, 2008 NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Enable 'Use soft-float' + - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Disable 'Use soft-float' + - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Enable 'Use soft-float' + - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, + microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Disable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mmicromips' + - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI, + microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Enable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mmicromips' + - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n32 ABI + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r6' Target Architecture Variant + Select 'n32' Target ABI + Disable 'Use soft-float' + - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n32 ABI + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r6' Target Architecture Variant + Select 'n32' Target ABI + Disable 'Use soft-float' + - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n64 ABI + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r6' Target Architecture Variant + Select 'n64' Target ABI + Disable 'Use soft-float' + - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n64 ABI + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r6' Target Architecture Variant + Select 'n64' Target ABI + Disable 'Use soft-float' diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options new file mode 100644 index 00000000..3eaa2a95 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "mips-img-linux-gnu" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-codescape-img-mips" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash new file mode 100644 index 00000000..b540164a --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash @@ -0,0 +1,4 @@ +# Codescape toolchains from MIPS Tech LLC +# From: https://codescape.mips.com/components/toolchain/nanomips/2018.09-02/downloads.html +sha256 ac035f3b6a8767522977963d8e1490520d58bccca7956f4503a1eefff6492b71 Codescape.GNU.Tools.Package.2018.09-02.for.MIPS.IMG.Linux.CentOS-6.x86.tar.gz +sha256 09280f4fcbb993607905bf9a43bf5f3db2beed85726f0675b8453e19a9ddc429 Codescape.GNU.Tools.Package.2018.09-02.for.MIPS.IMG.Linux.CentOS-6.x86_64.tar.gz diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk new file mode 100644 index 00000000..55424918 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# toolchain-external-codescape-img-mips +# +################################################################################ + +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION = 2018.09-02 +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SITE = https://codescape.mips.com/components/toolchain/$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION) +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STRIP_COMPONENTS = 2 + +ifeq ($(HOSTARCH),x86) +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION).for.MIPS.IMG.Linux.CentOS-6.x86.tar.gz +else +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION).for.MIPS.IMG.Linux.CentOS-6.x86_64.tar.gz +endif + +# Special fixup for Codescape MIPS toolchains, that have bin- and +# sbin- directories. We create symlinks bin -> bin- and sbin +# -> sbin- so that the rest of Buildroot can find the toolchain +# tools in the appropriate location. +ifeq ($(BR2_MIPS_OABI32),y) +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = o32 +else ifeq ($(BR2_MIPS_NABI32),y) +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = n32 +else ifeq ($(BR2_MIPS_NABI64),y) +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = n64 +endif + +define TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STAGING_FIXUPS + rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin + ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin + ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin +endef + +# The Codescape toolchain uses a sysroot layout that places them +# side-by-side instead of nested like multilibs. A symlink is needed +# much like for the nested sysroots which are handled in +# copy_toolchain_sysroot but there is not enough information in there +# to determine whether the sysroot layout was nested or side-by-side. +# Add the symlink here for now. +define TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SYMLINK + $(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))"; \ + ARCH_SUBDIR=`basename $${ARCH_SYSROOT_DIR}`; \ + ln -snf . $(STAGING_DIR)/$${ARCH_SUBDIR} +endef + +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_POST_INSTALL_STAGING_HOOKS += \ + TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STAGING_FIXUPS \ + TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SYMLINK + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in new file mode 100644 index 00000000..c58c5511 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in @@ -0,0 +1,76 @@ +config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS + bool "Codescape MTI GNU Linux Toolchain 2018.09" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_7 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_MIPS_CPU_MIPS32R2 || (BR2_MIPS_CPU_MIPS64R2 && !BR2_MIPS_SOFT_FLOAT) || \ + BR2_MIPS_CPU_MIPS32R5 || (BR2_MIPS_CPU_MIPS64R5 && !BR2_MIPS_SOFT_FLOAT) + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7 + select BR2_TOOLCHAIN_GCC_AT_LEAST_6 + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_OPENMP + help + Codescape MTI GNU Linux Toolchain 2018.09 for the MIPS + architecture, from MIPS Tech LLC. It uses gcc 6.3.0, + binutils 2.28.51, glibc 2.20, gdb 7.9.1 and kernel headers + 4.7. It has support for the following variants: + - MIPS32r2 - Big-Endian, Hard-Float, Legacy NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + - MIPS32r2 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008' + - MIPS32r2 - Big-Endian, Soft-Float, Legacy NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Enable 'Use soft-float' + - MIPS32r2 - Little-Endian, Hard-Float, Legacy NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008' + - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Enable 'Use soft-float' + - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, + microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Enable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mmicromips' + - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI, + microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mmicromips' + - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n32 ABI + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n32' Target ABI + Disable 'Use soft-float' + - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n32 ABI + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n32' Target ABI + Disable 'Use soft-float' + - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n64 ABI + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n64' Target ABI + Disable 'Use soft-float' + - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n64 ABI + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n64' Target ABI + Disable 'Use soft-float' diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options new file mode 100644 index 00000000..464c9b84 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "mips-mti-linux-gnu" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-codescape-mti-mips" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash new file mode 100644 index 00000000..8e70af50 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash @@ -0,0 +1,4 @@ +# Codescape toolchains from MIPS Tech LLC +# From: https://codescape.mips.com/components/toolchain/nanomips/2018.09-02/downloads.html +sha256 c883a404fd7ea5718e2249a530802e223381f2be52265f88e9b1ce7035c232f3 Codescape.GNU.Tools.Package.2018.09-02.for.MIPS.MTI.Linux.CentOS-6.x86.tar.gz +sha256 d6310a970b0a8a19ad8e0a2b3ead8c38ee90d0e284a9b2511200ce447f460d2c Codescape.GNU.Tools.Package.2018.09-02.for.MIPS.MTI.Linux.CentOS-6.x86_64.tar.gz diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk new file mode 100644 index 00000000..9bee1ab8 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# toolchain-external-codescape-mti-mips +# +################################################################################ + +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION = 2018.09-02 +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SITE = https://codescape.mips.com/components/toolchain/$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION) +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STRIP_COMPONENTS = 2 + +ifeq ($(HOSTARCH),x86) +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION).for.MIPS.MTI.Linux.CentOS-6.x86.tar.gz +else +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION).for.MIPS.MTI.Linux.CentOS-6.x86_64.tar.gz +endif + +# Special fixup for Codescape MIPS toolchains, that have bin- and +# sbin- directories. We create symlinks bin -> bin- and sbin +# -> sbin- so that the rest of Buildroot can find the toolchain +# tools in the appropriate location. +ifeq ($(BR2_MIPS_OABI32),y) +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = o32 +else ifeq ($(BR2_MIPS_NABI32),y) +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n32 +else ifeq ($(BR2_MIPS_NABI64),y) +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n64 +endif + +define TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS + rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin + ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin + ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin +endef + +# The Codescape toolchain uses a sysroot layout that places them +# side-by-side instead of nested like multilibs. A symlink is needed +# much like for the nested sysroots which are handled in +# copy_toolchain_sysroot but there is not enough information in there +# to determine whether the sysroot layout was nested or side-by-side. +# Add the symlink here for now. +define TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SYMLINK + $(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))"; \ + ARCH_SUBDIR=`basename $${ARCH_SYSROOT_DIR}`; \ + ln -snf . $(STAGING_DIR)/$${ARCH_SUBDIR} +endef + +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_POST_INSTALL_STAGING_HOOKS += \ + TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS \ + TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SYMLINK + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in new file mode 100644 index 00000000..24cbcffa --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in @@ -0,0 +1,20 @@ +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 + bool "CodeSourcery AArch64 2014.11" + depends on BR2_aarch64 + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_5 + # a57/a53 and a72/a53 appeared in gcc-6 or were broken before + depends on !BR2_cortex_a57_a53 && !BR2_cortex_a72_a53 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Sourcery CodeBench toolchain for the AArch64 architecture, + from Mentor Graphics. It uses gcc 4.9.1, binutils + 2.24.51.20140217, glibc 2.20, gdb 7.7.50 and kernel headers + 3.16.2. diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options new file mode 100644 index 00000000..1eab8392 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "aarch64-amd-linux-gnu" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-codesourcery-aarch64" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash new file mode 100644 index 00000000..f7d3f29f --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 405aada821146755c5f2df566375c2a682456d6b8451ee47b88cf1a52b093676 aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 3f50dd6ee433eb5b6992a1071b988e50379a738f54f58722bc60081613764716 aarch64-amd-2014.11-95-aarch64-amd-linux-gnu.src.tar.bz2 diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk new file mode 100644 index 00000000..192763a0 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# toolchain-external-codesourcery-aarch64 +# +################################################################################ + +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION = 2014.11-95 +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SOURCE = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2 +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_ACTUAL_SOURCE_TARBALL = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2 + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in new file mode 100644 index 00000000..bdbe2aca --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in @@ -0,0 +1,37 @@ +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM + bool "Sourcery CodeBench ARM 2014.05" + depends on BR2_arm + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABI + # Unsupported ARM cores + depends on !BR2_cortex_a12 && !BR2_cortex_a17 && !BR2_ARM_CPU_ARMV8A + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + help + Sourcery CodeBench toolchain for the ARM architecture, from + Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc + 2.18 and gdb 7.7.50, kernel headers 3.13. It has support + for the following variants: + - ARMv5TE, little endian, soft-float, glibc + Select ARM926T, ARM10T, XScale or another ARMv5 core + Select BR2_SOFT_FLOAT + - ARMv4T, little endian, soft-float, glibc + Select ARM720T, ARM920T, ARM922T or another ARMv4 core + Select BR2_SOFT_FLOAT + - ARMv7-A, Thumb 2, little endian, soft-float, glibc + Select Cortex-A8, Cortex-A9 or another ARMv7-A core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mthumb + +comment "Sourcery CodeBench toolchains available for the EABI ABI" + depends on BR2_arm + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9 + depends on !BR2_ARM_EABI + depends on !BR2_STATIC_LIBS diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options new file mode 100644 index 00000000..7f3654dc --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "arm-none-linux-gnueabi" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-codesourcery-arm" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash new file mode 100644 index 00000000..535f4aaf --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 39ee0e789034334ecc89af94e838e3a4815400ac5ff980f808f466b04778532e arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +sha256 e16a5b1e41d7ff1e74161f9405182001bc8d1360d89564e73911032e6966cc0d arm-2014.05-29-arm-none-linux-gnueabi.src.tar.bz2 diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk new file mode 100644 index 00000000..f15a50c4 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# toolchain-external-codesourcery-arm +# +################################################################################ + +TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION = 2014.05-29 + +TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) +TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SOURCE = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2 +TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_ACTUAL_SOURCE_TARBALL = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2 + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in new file mode 100644 index 00000000..1a3bdc93 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in @@ -0,0 +1,96 @@ +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS + bool "Sourcery CodeBench MIPS 2016.05" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + depends on BR2_MIPS_CPU_MIPS32R2 || BR2_MIPS_CPU_MIPS64R2 + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_6 + # Unsupported MIPS cores + depends on !BR2_mips_interaptiv + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_MIPS_NABI32 + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HAS_OPENMP + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + help + Sourcery CodeBench toolchain for the MIPS architecture, from + Mentor Graphics. It uses gcc 5.3, binutils 2.25.51, glibc + 2.23, uClibc 0.9.30 and gdb 7.10.50, kernel headers 4.4.1. It + has support for the following variants: + - MIPS32r2 - Big-Endian, 2008 NaN, O32 + Select MIPS (big endian) core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mnan=2008 + - MIPS32r2 - Big-Endian, O32 + Select MIPS (big endian) core + Disable BR2_SOFT_FLOAT + - MIPS32r2 - Big-Endian, O32, MIPS16 + Select MIPS (big endian) core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32r2 - Big-Endian, Soft-Float, O32 + Select MIPS (big endian) core + Select BR2_SOFT_FLOAT + - MIPS32r2 - Big-Endian, Soft-Float, O32, MIPS16 + Select MIPS (big endian) core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32r2 - Little-Endian, 2008 NaN, O32 + Select MIPS (little endian) core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mnan=2008 + - MIPS32r2 - Little-Endian, O32 + Select MIPS (little endian) core + Disable BR2_SOFT_FLOAT + - MIPS32r2 - Little-Endian, O32, MIPS16 + Select MIPS (little endian) core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32r2 - Little-Endian, Soft-Float, O32 + Select MIPS (little endian) core + Select BR2_SOFT_FLOAT + - MIPS32r2 - Little-Endian, Soft-Float, O32, MIPS16 + Select MIPS (little endian) core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32r2 - Little-Endian, Soft-Float, O32, microMIPS + Select MIPS (little endian) core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mmicromips + - MIPS32r2 - uClibc, Big-Endian, 2008 NaN, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Big-Endian, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Big-Endian, Soft-Float, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Little-Endian, 2008 NaN, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Little-Endian, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Little-Endian, Soft-Float, O32 + Not usable in Buildroot yet. + - MIPS64r2 - Big-Endian, N64 + Select MIPS64 (big endian) core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS64r2 - Big-Endian, Soft-Float, N64 + Select MIPS64 (big endian) core + Select the n64 ABI + Select BR2_SOFT_FLOAT + - MIPS64r2 - Little-Endian, N64 + Select MIPS64 (little endian) core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS64r2 - Little-Endian, Soft-Float, N64 + Select MIPS64 (little endian) core + Select the n64 ABI + Select BR2_SOFT_FLOAT + +comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64" + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_6 + depends on BR2_MIPS_NABI32 + depends on !BR2_STATIC_LIBS diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options new file mode 100644 index 00000000..677cc67d --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "mips-linux-gnu" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-codesourcery-mips" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash new file mode 100644 index 00000000..2d80338e --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 d354447c4c5160439dafd5464fa3a0266dd41e79f973477238e4f0215a6b5397 mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 2658e55d5b71bba25d6f77e868e18b200ea5f75c8add7ed3a9266e716d9adfff mips-2016.05-8-mips-linux-gnu.src.tar.bz2 diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk new file mode 100644 index 00000000..94fbbff5 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# toolchain-external-codesourcery-mips +# +################################################################################ + +TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION = 2016.05-8 + +TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) +TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SOURCE = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2 +TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_ACTUAL_SOURCE_TARBALL = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2 + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in new file mode 100644 index 00000000..9d785a4b --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in @@ -0,0 +1,17 @@ +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII + bool "Sourcery CodeBench Nios-II 2018.05" + depends on BR2_nios2 + depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_8 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15 + select BR2_TOOLCHAIN_GCC_AT_LEAST_7 + help + Sourcery CodeBench toolchain for the Nios-II architecture, + from Mentor Graphics. It uses gcc 7.3, binutils 2.28, + glibc 2.27, gdb 8.0.1 and kernel headers 4.15.5. diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options new file mode 100644 index 00000000..07cc5ede --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "nios2-linux-gnu" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-codesourcery-niosII" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash new file mode 100644 index 00000000..518e677f --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash @@ -0,0 +1,6 @@ +# From https://sourcery.mentor.com/GNUToolchain/release3374 +md5 4f536b3b9b4e00f483e82e304c0a27ae sourceryg++-2018.05-5-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 +md5 be42ab83da2e8db7b73dc890c2549570 sourceryg++-2018.05-5-nios2-linux-gnu.src.tar.bz2 +# Locally calculated +sha256 c19afb432b5b23f8d5d639831d3a423a3ea3c9cc62e0015020d20ea2eb36dd1b sourceryg++-2018.05-5-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 d73a6364106dd62352711f932d3be8e97fdaaa548995678b5d38d9f21e22437a sourceryg++-2018.05-5-nios2-linux-gnu.src.tar.bz2 diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk new file mode 100644 index 00000000..cb0fe760 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# toolchain-external-codesourcery-niosII +# +################################################################################ + +TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION = 2018.05-5 + +TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX) +TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SOURCE = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2 +TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_ACTUAL_SOURCE_TARBALL = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2 + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in b/toolchain/toolchain-external/toolchain-external-custom/Config.in new file mode 100644 index 00000000..a913feb3 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in @@ -0,0 +1,5 @@ +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM + bool "Custom toolchain" + help + Use this option to use a custom toolchain pre-installed on + your system. diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options new file mode 100644 index 00000000..992fd2c1 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options @@ -0,0 +1,494 @@ +if BR2_TOOLCHAIN_EXTERNAL_CUSTOM + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-custom" + +config BR2_TOOLCHAIN_EXTERNAL_URL + string "Toolchain URL" + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + help + URL of the custom toolchain tarball to download and install. + +config BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH + string "Toolchain relative binary path" + default "bin" + depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + help + Path to where the binaries (e.g. the compiler) can be found, + relative to the downloaded toolchain root directory. The + default is "bin" and is correct for most toolchains. + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX + string "Toolchain prefix" + default "$(ARCH)-linux" + +choice + bool "External toolchain gcc version" + help + Set to the gcc version that is used by your external + toolchain. + +config BR2_TOOLCHAIN_EXTERNAL_GCC_10 + bool "10.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_10 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_9 + bool "9.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_8 + bool "8.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_8 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_7 + bool "7.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_7 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_6 + bool "6.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_6 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_5 + bool "5.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9 + bool "4.9.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8 + bool "4.8.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7 + bool "4.7.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6 + bool "4.6.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5 + bool "4.5.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4 + bool "4.4.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3 + bool "4.3.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_OLD + bool "older" + help + Use this option if your GCC version is older than any of the + above. + + Note that the Buildroot community doesn't do any testing with + such old toolchains. Some packages may fail to build in + surprising ways, or the generated root filesystem may not + work at all. Use such old toolchains at your own risk. + +endchoice + +comment "GCC older than 4.8 is not tested by Buildroot. Use at your own risk." + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +choice + bool "External toolchain kernel headers series" + default BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD + help + Set to the kernel headers version that were used to build + this external toolchain. + + This is used to hide/show some packages that have strict + requirements on the version of kernel headers. + + If unsure what version your toolchain is using, you can look + at the value of LINUX_VERSION_CODE in linux/version.h in your + toolchain. The Linux version is M.m.p, with: + M = ( LINUX_VERSION_CODE >> 16 ) & 0xFF + m = ( LINUX_VERSION_CODE >> 8 ) & 0xFF + p = ( LINUX_VERSION_CODE >> 0 ) & 0xFF + + If your toolchain uses headers newer than the latest version + in the choice, then select the latest version. + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_10 + bool "5.10.x or later" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9 + bool "5.9.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_8 + bool "5.8.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_7 + bool "5.7.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_6 + bool "5.6.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_6 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_5 + bool "5.5.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_4 + bool "5.4.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_3 + bool "5.3.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_2 + bool "5.2.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_1 + bool "5.1.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_0 + bool "5.0.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_20 + bool "4.20.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_20 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_19 + bool "4.19.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_18 + bool "4.18.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_17 + bool "4.17.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_16 + bool "4.16.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_15 + bool "4.15.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14 + bool "4.14.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_13 + bool "4.13.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_12 + bool "4.12.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_11 + bool "4.11.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_10 + bool "4.10.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9 + bool "4.9.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_8 + bool "4.8.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_7 + bool "4.7.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_6 + bool "4.6.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_5 + bool "4.5.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4 + bool "4.4.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_3 + bool "4.3.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_2 + bool "4.2.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1 + bool "4.1.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0 + bool "4.0.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_19 + bool "3.19.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_18 + bool "3.18.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17 + bool "3.17.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16 + bool "3.16.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_15 + bool "3.15.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14 + bool "3.14.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13 + bool "3.13.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12 + bool "3.12.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_11 + bool "3.11.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10 + bool "3.10.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_9 + bool "3.9.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_8 + bool "3.8.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_7 + bool "3.7.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_6 + bool "3.6.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_5 + bool "3.5.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4 + bool "3.4.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_3 + bool "3.3.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2 + bool "3.2.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1 + bool "3.1.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_0 + bool "3.0.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD + bool "2.6.x" + +endchoice + +comment "Kernel headers older than 3.13 is not tested by Buildroot. Use at your own risk." + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + +choice + prompt "External toolchain C library" + default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC + bool "uClibc/uClibc-ng" + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + help + Select this option if your external toolchain uses the + uClibc (available from http://www.uclibc.org/) + or uClibc-ng (available from http://www.uclibc-ng.org) + C library. + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC + bool "glibc/eglibc" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + help + Select this option if your external toolchain uses the GNU C + library (available from https://www.gnu.org/software/libc/) + or its variant the eglibc library (http://www.eglibc.org/). + + Note: eglibc is a variant of glibc that (among other things) + can be configured to exclude some of its features. Using a + toolchain with eglibc configured to exclude key features may + cause build failures to some packages. + +comment "(e)glibc only available with shared lib support" + depends on BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL + bool "musl (experimental)" + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Select this option if your external toolchain uses the + 'musl' C library, available from http://www.musl-libc.org/. + +endchoice + +if BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC + +config BR2_TOOLCHAIN_EXTERNAL_WCHAR + bool "Toolchain has WCHAR support?" + select BR2_USE_WCHAR + help + Select this option if your external toolchain supports + WCHAR. If you don't know, leave the default value, Buildroot + will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_LOCALE + bool "Toolchain has locale support?" + select BR2_TOOLCHAIN_EXTERNAL_WCHAR + select BR2_ENABLE_LOCALE + help + Select this option if your external toolchain has locale + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS + bool "Toolchain has threads support?" + default y + select BR2_TOOLCHAIN_HAS_THREADS + help + Select this option if your external toolchain has thread + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +if BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS + +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG + bool "Toolchain has threads debugging support?" + default y + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + help + Select this option if your external toolchain has thread + debugging support. If you don't know, leave the default + value, Buildroot will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL + bool "Toolchain has NPTL threads support?" + default y + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + help + Select this option if your external toolchain uses the NPTL + (Native Posix Thread Library) implementation of Posix + threads. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +endif # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS + +endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC + +config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP + bool "Toolchain has SSP support?" + default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC + default y if BR2_TOOLCHAIN_EXTERNAL_MUSL + select BR2_TOOLCHAIN_HAS_SSP + help + Select this option if your external toolchain has Stack + Smashing Protection support enabled. If you don't know, + leave the default value, Buildroot will tell you if it's + correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP_STRONG + bool "Toolchain has SSP strong support?" + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 && BR2_TOOLCHAIN_EXTERNAL_GLIBC + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 && BR2_TOOLCHAIN_EXTERNAL_MUSL + depends on BR2_TOOLCHAIN_EXTERNAL_HAS_SSP + select BR2_TOOLCHAIN_HAS_SSP_STRONG + help + Select this option if your external toolchain has strong + Stack Smashing Protection support enabled. If you don't + know, leave the default value, Buildroot will tell you if + it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_INET_RPC + bool "Toolchain has RPC support?" + default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC + depends on !BR2_TOOLCHAIN_EXTERNAL_MUSL + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Select this option if your external toolchain supports + RPC. If you don't know, leave the default value, Buildroot + will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_CXX + bool "Toolchain has C++ support?" + select BR2_INSTALL_LIBSTDCPP + help + Select this option if your external toolchain has C++ + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_DLANG + bool "Toolchain has D support?" + select BR2_TOOLCHAIN_HAS_DLANG + help + Select this option if your external toolchain has D + support. + +config BR2_TOOLCHAIN_EXTERNAL_FORTRAN + bool "Toolchain has Fortran support?" + select BR2_TOOLCHAIN_HAS_FORTRAN + help + Select this option if your external toolchain has Fortran + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_OPENMP + bool "Toolchain has OpenMP support?" + select BR2_TOOLCHAIN_HAS_OPENMP + help + Select this option if your external toolchain has OpenMP + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +endif diff --git a/toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk b/toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk new file mode 100644 index 00000000..c4ae6125 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# toolchain-external-custom +# +################################################################################ + +TOOLCHAIN_EXTERNAL_CUSTOM_SITE = $(patsubst %/,%,$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))) +TOOLCHAIN_EXTERNAL_CUSTOM_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CUSTOM),y) +# We can't check hashes for custom downloaded toolchains +BR_NO_CHECK_HASH_FOR += $(TOOLCHAIN_EXTERNAL_SOURCE) +endif + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in new file mode 100644 index 00000000..bac90374 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in @@ -0,0 +1,16 @@ +config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE + bool "Linaro AArch64 BE 2018.05" + depends on BR2_aarch64_be + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10 + select BR2_TOOLCHAIN_GCC_AT_LEAST_7 + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_OPENMP + help + Toolchain for the AArch64 Big Endian architecture, from + http://www.linaro.org/engineering/armv8/ diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in.options new file mode 100644 index 00000000..d44750ff --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "aarch64_be-linux-gnu" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-linaro-aarch64-be" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/toolchain-external-linaro-aarch64-be.hash b/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/toolchain-external-linaro-aarch64-be.hash new file mode 100644 index 00000000..f93642ec --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/toolchain-external-linaro-aarch64-be.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 412da19c1d1bff0f3172bc19fd2c024207d8d716dbe7a8dad4bf9e3d6b71d149 gcc-linaro-7.3.1-2018.05-i686_aarch64_be-linux-gnu.tar.xz +sha256 277c1483f8dbd6007c945ffeb706fa1ba1da8ec1c397cf5cf1e29c25081426e5 gcc-linaro-7.3.1-2018.05-x86_64_aarch64_be-linux-gnu.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/toolchain-external-linaro-aarch64-be.mk b/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/toolchain-external-linaro-aarch64-be.mk new file mode 100644 index 00000000..7a01151b --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/toolchain-external-linaro-aarch64-be.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# toolchain-external-linaro-aarch64-be +# +################################################################################ + +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE_VERSION = 2018.05 +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE_SITE = https://releases.linaro.org/components/toolchain/binaries/7.3-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE_VERSION)/aarch64_be-linux-gnu + +ifeq ($(HOSTARCH),x86) +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE_SOURCE = gcc-linaro-7.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE_VERSION)-i686_aarch64_be-linux-gnu.tar.xz +else +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE_SOURCE = gcc-linaro-7.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_BE_VERSION)-x86_64_aarch64_be-linux-gnu.tar.xz +endif + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in new file mode 100644 index 00000000..824eb76c --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in @@ -0,0 +1,16 @@ +config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 + bool "Linaro AArch64 2018.05" + depends on BR2_aarch64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10 + select BR2_TOOLCHAIN_GCC_AT_LEAST_7 + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_OPENMP + help + Toolchain for the AArch64 architecture, from + http://www.linaro.org/engineering/armv8/ diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options new file mode 100644 index 00000000..099c6c0d --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "aarch64-linux-gnu" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-linaro-aarch64" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash new file mode 100644 index 00000000..938e37c7 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 466b801a60491ae1e2ce9952e0615cf04cf611596c6ffd5bfe8a89ef5be47e03 gcc-linaro-7.3.1-2018.05-i686_aarch64-linux-gnu.tar.xz +sha256 73eed74e593e2267504efbcf3678918bb22409ab7afa3dc7c135d2c6790c2345 gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk new file mode 100644 index 00000000..1015d630 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# toolchain-external-linaro-aarch64 +# +################################################################################ + +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION = 2018.05 +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SITE = https://releases.linaro.org/components/toolchain/binaries/7.3-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)/aarch64-linux-gnu + +ifeq ($(HOSTARCH),x86) +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-7.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)-i686_aarch64-linux-gnu.tar.xz +else +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-7.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)-x86_64_aarch64-linux-gnu.tar.xz +endif + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in new file mode 100644 index 00000000..beb38609 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in @@ -0,0 +1,28 @@ +comment "Linaro toolchains available for Cortex-A + EABIhf" + depends on BR2_arm + depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM + bool "Linaro ARM 2018.05" + depends on BR2_arm + depends on BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8A + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10 + select BR2_TOOLCHAIN_GCC_AT_LEAST_7 + select BR2_TOOLCHAIN_HAS_FORTRAN + select BR2_TOOLCHAIN_HAS_OPENMP + help + Linaro toolchain for the ARM architecture. It uses Linaro + GCC 2018.05 (based on gcc 7.3.1), Linaro GDB 2018.05 (based on + GDB 8.1), glibc 2.25, Binutils 2018.05 (based on 2.28). It + generates code that runs on all Cortex-A profile devices, + but tuned for the Cortex-A9. The code generated is Thumb 2, + with the hard floating point calling convention, and uses + the VFPv3-D16 FPU instructions. diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options new file mode 100644 index 00000000..dcbc6599 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "arm-linux-gnueabihf" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-linaro-arm" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash new file mode 100644 index 00000000..bd09cb5a --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 0613b5be14eb7d50a772bbd72069c428558e6e53fa5fce7201d75a13a475ffff gcc-linaro-7.3.1-2018.05-i686_arm-linux-gnueabihf.tar.xz +sha256 7248bf105d0d468887a9b8a7120bb281ac8ad0223d9cb3d00dc7c2d498485d91 gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk new file mode 100644 index 00000000..fda356bc --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# toolchain-external-linaro-arm +# +################################################################################ + +TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION = 2018.05 +TOOLCHAIN_EXTERNAL_LINARO_ARM_SITE = https://releases.linaro.org/components/toolchain/binaries/7.3-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)/arm-linux-gnueabihf + +ifeq ($(HOSTARCH),x86) +TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-7.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)-i686_arm-linux-gnueabihf.tar.xz +else +TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-7.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)-x86_64_arm-linux-gnueabihf.tar.xz +endif + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in new file mode 100644 index 00000000..aa21e448 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in @@ -0,0 +1,27 @@ +comment "Linaro toolchains available for Cortex-A + EABIhf" + depends on BR2_armeb + depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB + bool "Linaro armeb 2018.05" + depends on BR2_armeb + depends on BR2_ARM_CPU_ARMV7A || BR2_ARM_CPU_ARMV8A + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HAS_OPENMP + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10 + select BR2_TOOLCHAIN_GCC_AT_LEAST_7 + help + Linaro toolchain for the ARM big endian architecture. It + uses Linaro GCC 2018.05 (based on gcc 7.3.1), Linaro GDB + 2018.05 (based on GDB 8.1), glibc 2.25, Binutils 2018.05 + (based on 2.28). It generates code that runs on all Cortex-A + profile devices, but tuned for the Cortex-A9. The code + generated is Thumb 2, with the hard floating point calling + convention, and uses the VFPv3-D16 FPU instructions. diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options new file mode 100644 index 00000000..225e90f0 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options @@ -0,0 +1,9 @@ +if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "armeb-linux-gnueabihf" + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-linaro-armeb" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash new file mode 100644 index 00000000..a3b6b88b --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 60bf9924a0c039c94deb85cb9b129d0f28b28eadbb1fb3f7e2e227679cc43fc9 gcc-linaro-7.3.1-2018.05-i686_armeb-linux-gnueabihf.tar.xz +sha256 c1bbd598b78458d6b7ea1c971fddf736c00d57890c7131fdafd4e789289c42f9 gcc-linaro-7.3.1-2018.05-x86_64_armeb-linux-gnueabihf.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk new file mode 100644 index 00000000..b8ea80ff --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# toolchain-external-linaro-armeb +# +################################################################################ + +TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION = 2018.05 + +TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SITE = https://releases.linaro.org/components/toolchain/binaries/7.3-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)/armeb-linux-gnueabihf + +ifeq ($(HOSTARCH),x86) +TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-7.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)-i686_armeb-linux-gnueabihf.tar.xz +else +TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-7.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)-x86_64_armeb-linux-gnueabihf.tar.xz +endif + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in new file mode 100644 index 00000000..c3483f33 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in @@ -0,0 +1,17 @@ +config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC + bool "Synopsys ARC 2019.09 toolchain" + depends on BR2_arc + depends on BR2_HOSTARCH = "x86_64" + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_ENABLE_LOCALE + select BR2_USE_WCHAR + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15 + select BR2_TOOLCHAIN_GCC_AT_LEAST_9 + help + Toolchain for the ARC cores, from + https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options new file mode 100644 index 00000000..ceb7dd00 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options @@ -0,0 +1,10 @@ +if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + default "arc-linux" if BR2_arcle + default "arceb-linux" if BR2_arceb + +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + default "toolchain-external-synopsys-arc" + +endif diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash new file mode 100644 index 00000000..3ce6bbcb --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash @@ -0,0 +1,5 @@ +# From https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2019.09-release +sha256 f7cbf68ef251943db7baf63535e0ec98dafbdf5d925017b4e1d4fc64d9b38a26 arc_gnu_2019.09_prebuilt_uclibc_le_arc700_linux_install.tar.gz +sha256 ac09f0a21f9d50146a5e542f4a6abc93e5a1dcb0a1372cb5c3ba86bbefaaec7d arc_gnu_2019.09_prebuilt_uclibc_be_arc700_linux_install.tar.gz +sha256 245ca49fe8ea2456617541b18bb96e52e6c0dc619f00e293fcaad519fc436c35 arc_gnu_2019.09_prebuilt_uclibc_le_archs_linux_install.tar.gz +sha256 6f039a0158c03af398ada31fae96009e47f0d7b7f7d52e12eb419492fc3f27e7 arc_gnu_2019.09_prebuilt_uclibc_be_archs_linux_install.tar.gz diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk new file mode 100644 index 00000000..c8f141e4 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# toolchain-external-synopsys-arc +# +################################################################################ + +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION = 2019.09 +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION)-release + +ifeq ($(BR2_arc750d)$(BR2_arc770d),y) +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE = arc700 +else +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE = archs +endif + +ifeq ($(BR2_arcle),y) +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS = le +else +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS = be +endif + +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_SOURCE = arc_gnu_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION)_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE)_linux_install.tar.gz + +$(eval $(toolchain-external-package)) diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk new file mode 100644 index 00000000..dd07884c --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# toolchain-external +# +################################################################################ + +TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO + +# musl does not provide an implementation for sys/queue.h or sys/cdefs.h. +# So, add the musl-compat-headers package that will install those files, +# into the staging directory: +# sys/queue.h: header from NetBSD +# sys/cdefs.h: minimalist header bundled in Buildroot +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers +endif + +$(eval $(virtual-package)) + +# Ensure the external-toolchain package has a prefix defined. +# This comes after the virtual-package definition, which checks the provider. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +ifeq ($(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)),) +$(error No prefix selected for external toolchain package $(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL). Configuration error) +endif +endif + +include $(sort $(wildcard toolchain/toolchain-external/*/*.mk)) diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c new file mode 100644 index 00000000..0fb6064b --- /dev/null +++ b/toolchain/toolchain-wrapper.c @@ -0,0 +1,553 @@ +/** + * Buildroot wrapper for toolchains. This simply executes the real toolchain + * with a number of arguments (sysroot/arch/..) hardcoded, to ensure the + * toolchain uses the correct configuration. + * The hardcoded path arguments are defined relative to the actual location + * of the binary. + * + * (C) 2011 Peter Korsgaard + * (C) 2011 Daniel Nyström + * (C) 2012 Arnout Vandecappelle (Essensium/Mind) + * (C) 2013 Spenser Gilliland + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BR_CCACHE +static char ccache_path[PATH_MAX]; +#endif +static char path[PATH_MAX]; +static char sysroot[PATH_MAX]; +/* As would be defined by gcc: + * https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html + * sizeof() on string literals includes the terminating \0. */ +static char _time_[sizeof("-D__TIME__=\"HH:MM:SS\"")]; +static char _date_[sizeof("-D__DATE__=\"MMM DD YYYY\"")]; + +/** + * GCC errors out with certain combinations of arguments (examples are + * -mfloat-abi={hard|soft} and -m{little|big}-endian), so we have to ensure + * that we only pass the predefined one to the real compiler if the inverse + * option isn't in the argument list. + * This specifies the worst case number of extra arguments we might pass + * Currently, we may have: + * -mfloat-abi= + * -march= + * -mcpu= + * -D__TIME__= + * -D__DATE__= + * -Wno-builtin-macro-redefined + * -Wl,-z,now + * -Wl,-z,relro + * -fPIE + * -pie + */ +#define EXCLUSIVE_ARGS 10 + +static char *predef_args[] = { +#ifdef BR_CCACHE + ccache_path, +#endif + path, + "--sysroot", sysroot, +#ifdef BR_ABI + "-mabi=" BR_ABI, +#endif +#ifdef BR_NAN + "-mnan=" BR_NAN, +#endif +#ifdef BR_FPU + "-mfpu=" BR_FPU, +#endif +#ifdef BR_SOFTFLOAT + "-msoft-float", +#endif /* BR_SOFTFLOAT */ +#ifdef BR_MODE + "-m" BR_MODE, +#endif +#ifdef BR_64 + "-m64", +#endif +#ifdef BR_OMIT_LOCK_PREFIX + "-Wa,-momit-lock-prefix=yes", +#endif +#ifdef BR_NO_FUSED_MADD + "-mno-fused-madd", +#endif +#ifdef BR_FP_CONTRACT_OFF + "-ffp-contract=off", +#endif +#ifdef BR_BINFMT_FLAT + "-Wl,-elf2flt", +#endif +#ifdef BR_MIPS_TARGET_LITTLE_ENDIAN + "-EL", +#endif +#if defined(BR_MIPS_TARGET_BIG_ENDIAN) || defined(BR_ARC_TARGET_BIG_ENDIAN) + "-EB", +#endif +#ifdef BR_ADDITIONAL_CFLAGS + BR_ADDITIONAL_CFLAGS +#endif +}; + +/* A {string,length} tuple, to avoid computing strlen() on constants. + * - str must be a \0-terminated string + * - len does not account for the terminating '\0' + */ +struct str_len_s { + const char *str; + size_t len; +}; + +/* Define a {string,length} tuple. Takes an unquoted constant string as + * parameter. sizeof() on a string literal includes the terminating \0, + * but we don't want to count it. + */ +#define STR_LEN(s) { #s, sizeof(#s)-1 } + +/* List of paths considered unsafe for cross-compilation. + * + * An unsafe path is one that points to a directory with libraries or + * headers for the build machine, which are not suitable for the target. + */ +static const struct str_len_s unsafe_paths[] = { + STR_LEN(/lib), + STR_LEN(/usr/include), + STR_LEN(/usr/lib), + STR_LEN(/usr/local/include), + STR_LEN(/usr/local/lib), + STR_LEN(/usr/X11R6/include), + STR_LEN(/usr/X11R6/lib), + { NULL, 0 }, +}; + +/* Unsafe options are options that specify a potentialy unsafe path, + * that will be checked by check_unsafe_path(), below. + */ +static const struct str_len_s unsafe_opts[] = { + STR_LEN(-I), + STR_LEN(-idirafter), + STR_LEN(-iquote), + STR_LEN(-isystem), + STR_LEN(-L), + { NULL, 0 }, +}; + +/* Check if path is unsafe for cross-compilation. Unsafe paths are those + * pointing to the standard native include or library paths. + * + * We print the arguments leading to the failure. For some options, gcc + * accepts the path to be concatenated to the argument (e.g. -I/foo/bar) + * or separated (e.g. -I /foo/bar). In the first case, we need only print + * the argument as it already contains the path (arg_has_path), while in + * the second case we need to print both (!arg_has_path). + * + * If paranoid, exit in error instead of just printing a warning. + */ +static void check_unsafe_path(const char *arg, + const char *path, + int paranoid, + int arg_has_path) +{ + const struct str_len_s *p; + + for (p=unsafe_paths; p->str; p++) { + if (strncmp(path, p->str, p->len)) + continue; + fprintf(stderr, + "%s: %s: unsafe header/library path used in cross-compilation: '%s%s%s'\n", + program_invocation_short_name, + paranoid ? "ERROR" : "WARNING", + arg, + arg_has_path ? "" : "' '", /* close single-quote, space, open single-quote */ + arg_has_path ? "" : path); /* so that arg and path are properly quoted. */ + if (paranoid) + exit(1); + } +} + +#ifdef BR_NEED_SOURCE_DATE_EPOCH +/* Returns false if SOURCE_DATE_EPOCH was not defined in the environment. + * + * Returns true if SOURCE_DATE_EPOCH is in the environment and represent + * a valid timestamp, in which case the timestamp is formatted into the + * global variables _date_ and _time_. + * + * Aborts if SOURCE_DATE_EPOCH was set in the environment but did not + * contain a valid timestamp. + * + * Valid values are defined in the spec: + * https://reproducible-builds.org/specs/source-date-epoch/ + * but we further restrict them to be positive or null. + */ +bool parse_source_date_epoch_from_env(void) +{ + char *epoch_env, *endptr; + time_t epoch; + struct tm epoch_tm; + + if ((epoch_env = getenv("SOURCE_DATE_EPOCH")) == NULL) + return false; + errno = 0; + epoch = (time_t) strtoll(epoch_env, &endptr, 10); + /* We just need to test if it is incorrect, but we do not + * care why it is incorrect. + */ + if ((errno != 0) || !*epoch_env || *endptr || (epoch < 0)) { + fprintf(stderr, "%s: invalid SOURCE_DATE_EPOCH='%s'\n", + program_invocation_short_name, + epoch_env); + exit(1); + } + tzset(); /* For localtime_r(), below. */ + if (localtime_r(&epoch, &epoch_tm) == NULL) { + fprintf(stderr, "%s: cannot parse SOURCE_DATE_EPOCH=%s\n", + program_invocation_short_name, + getenv("SOURCE_DATE_EPOCH")); + exit(1); + } + if (!strftime(_time_, sizeof(_time_), "-D__TIME__=\"%T\"", &epoch_tm)) { + fprintf(stderr, "%s: cannot set time from SOURCE_DATE_EPOCH=%s\n", + program_invocation_short_name, + getenv("SOURCE_DATE_EPOCH")); + exit(1); + } + if (!strftime(_date_, sizeof(_date_), "-D__DATE__=\"%b %e %Y\"", &epoch_tm)) { + fprintf(stderr, "%s: cannot set date from SOURCE_DATE_EPOCH=%s\n", + program_invocation_short_name, + getenv("SOURCE_DATE_EPOCH")); + exit(1); + } + return true; +} +#else +bool parse_source_date_epoch_from_env(void) +{ + /* The compiler is recent enough to handle SOURCE_DATE_EPOCH itself + * so we do not need to do anything here. + */ + return false; +} +#endif + +int main(int argc, char **argv) +{ + char **args, **cur, **exec_args; + char *relbasedir, *absbasedir; + char *progpath = argv[0]; + char *basename; + char *env_debug; + char *paranoid_wrapper; + int paranoid; + int ret, i, count = 0, debug = 0, found_shared = 0; + + /* Debug the wrapper to see arguments it was called with. + * If environment variable BR2_DEBUG_WRAPPER is: + * unset, empty, or 0: do not trace + * set to 1 : trace all arguments on a single line + * set to 2 : trace one argument per line + */ + if ((env_debug = getenv("BR2_DEBUG_WRAPPER"))) { + debug = atoi(env_debug); + } + if (debug > 0) { + fprintf(stderr, "Toolchain wrapper was called with:"); + for (i = 0; i < argc; i++) + fprintf(stderr, "%s'%s'", + (debug == 2) ? "\n " : " ", argv[i]); + fprintf(stderr, "\n"); + } + + /* Calculate the relative paths */ + basename = strrchr(progpath, '/'); + if (basename) { + *basename = '\0'; + basename++; + relbasedir = malloc(strlen(progpath) + 7); + if (relbasedir == NULL) { + perror(__FILE__ ": malloc"); + return 2; + } + sprintf(relbasedir, "%s/..", argv[0]); + absbasedir = realpath(relbasedir, NULL); + } else { + basename = progpath; + absbasedir = malloc(PATH_MAX + 1); + ret = readlink("/proc/self/exe", absbasedir, PATH_MAX); + if (ret < 0) { + perror(__FILE__ ": readlink"); + return 2; + } + absbasedir[ret] = '\0'; + for (i = ret; i > 0; i--) { + if (absbasedir[i] == '/') { + absbasedir[i] = '\0'; + if (++count == 2) + break; + } + } + } + if (absbasedir == NULL) { + perror(__FILE__ ": realpath"); + return 2; + } + + /* Fill in the relative paths */ +#ifdef BR_CROSS_PATH_REL + ret = snprintf(path, sizeof(path), "%s/" BR_CROSS_PATH_REL "/%s" BR_CROSS_PATH_SUFFIX, absbasedir, basename); +#elif defined(BR_CROSS_PATH_ABS) + ret = snprintf(path, sizeof(path), BR_CROSS_PATH_ABS "/%s" BR_CROSS_PATH_SUFFIX, basename); +#else + ret = snprintf(path, sizeof(path), "%s/bin/%s" BR_CROSS_PATH_SUFFIX, absbasedir, basename); +#endif + if (ret >= sizeof(path)) { + perror(__FILE__ ": overflow"); + return 3; + } +#ifdef BR_CCACHE + ret = snprintf(ccache_path, sizeof(ccache_path), "%s/bin/ccache", absbasedir); + if (ret >= sizeof(ccache_path)) { + perror(__FILE__ ": overflow"); + return 3; + } +#endif + ret = snprintf(sysroot, sizeof(sysroot), "%s/" BR_SYSROOT, absbasedir); + if (ret >= sizeof(sysroot)) { + perror(__FILE__ ": overflow"); + return 3; + } + + cur = args = malloc(sizeof(predef_args) + + (sizeof(char *) * (argc + EXCLUSIVE_ARGS))); + if (args == NULL) { + perror(__FILE__ ": malloc"); + return 2; + } + + /* start with predefined args */ + memcpy(cur, predef_args, sizeof(predef_args)); + cur += sizeof(predef_args) / sizeof(predef_args[0]); + +#ifdef BR_FLOAT_ABI + /* add float abi if not overridden in args */ + for (i = 1; i < argc; i++) { + if (!strncmp(argv[i], "-mfloat-abi=", strlen("-mfloat-abi=")) || + !strcmp(argv[i], "-msoft-float") || + !strcmp(argv[i], "-mhard-float")) + break; + } + + if (i == argc) + *cur++ = "-mfloat-abi=" BR_FLOAT_ABI; +#endif + +#ifdef BR_FP32_MODE + /* add fp32 mode if soft-float is not args or hard-float overrides soft-float */ + int add_fp32_mode = 1; + for (i = 1; i < argc; i++) { + if (!strcmp(argv[i], "-msoft-float")) + add_fp32_mode = 0; + else if (!strcmp(argv[i], "-mhard-float")) + add_fp32_mode = 1; + } + + if (add_fp32_mode == 1) + *cur++ = "-mfp" BR_FP32_MODE; +#endif + +#if defined(BR_ARCH) || \ + defined(BR_CPU) + /* Add our -march/cpu flags, but only if none of + * -march/mtune/mcpu are already specified on the commandline + */ + for (i = 1; i < argc; i++) { + if (!strncmp(argv[i], "-march=", strlen("-march=")) || + !strncmp(argv[i], "-mtune=", strlen("-mtune=")) || + !strncmp(argv[i], "-mcpu=", strlen("-mcpu=" ))) + break; + } + if (i == argc) { +#ifdef BR_ARCH + *cur++ = "-march=" BR_ARCH; +#endif +#ifdef BR_CPU + *cur++ = "-mcpu=" BR_CPU; +#endif + } +#endif /* ARCH || CPU */ + + if (parse_source_date_epoch_from_env()) { + *cur++ = _time_; + *cur++ = _date_; + /* This has existed since gcc-4.4.0. */ + *cur++ = "-Wno-builtin-macro-redefined"; + } + +#ifdef BR2_PIC_PIE + /* Patterned after Fedora/Gentoo hardening approaches. + * https://fedoraproject.org/wiki/Changes/Harden_All_Packages + * https://wiki.gentoo.org/wiki/Hardened/Toolchain#Position_Independent_Executables_.28PIEs.29 + * + * A few checks are added to allow disabling of PIE + * 1) -fno-pie and -no-pie are used by other distros to disable PIE in + * cases where the compiler enables it by default. The logic below + * maintains that behavior. + * Ref: https://wiki.ubuntu.com/SecurityTeam/PIE + * 2) A check for -fno-PIE has been used in older Linux Kernel builds + * in a similar way to -fno-pie or -no-pie. + * 3) A check is added for Kernel and U-boot defines + * (-D__KERNEL__ and -D__UBOOT__). + */ + for (i = 1; i < argc; i++) { + /* Apply all incompatible link flag and disable checks first */ + if (!strcmp(argv[i], "-r") || + !strcmp(argv[i], "-Wl,-r") || + !strcmp(argv[i], "-static") || + !strcmp(argv[i], "-D__KERNEL__") || + !strcmp(argv[i], "-D__UBOOT__") || + !strcmp(argv[i], "-fno-pie") || + !strcmp(argv[i], "-fno-PIE") || + !strcmp(argv[i], "-no-pie")) + break; + /* Record that shared was present which disables -pie but don't + * break out of loop as a check needs to occur that possibly + * still allows -fPIE to be set + */ + if (!strcmp(argv[i], "-shared")) + found_shared = 1; + } + + if (i == argc) { + /* Compile and link condition checking have been kept split + * between these two loops, as there maybe already are valid + * compile flags set for position independence. In that case + * the wrapper just adds the -pie for link. + */ + for (i = 1; i < argc; i++) { + if (!strcmp(argv[i], "-fpie") || + !strcmp(argv[i], "-fPIE") || + !strcmp(argv[i], "-fpic") || + !strcmp(argv[i], "-fPIC")) + break; + } + /* Both args below can be set at compile/link time + * and are ignored correctly when not used + */ + if (i == argc) + *cur++ = "-fPIE"; + + if (!found_shared) + *cur++ = "-pie"; + } +#endif + /* Are we building the Linux Kernel or U-Boot? */ + for (i = 1; i < argc; i++) { + if (!strcmp(argv[i], "-D__KERNEL__") || + !strcmp(argv[i], "-D__UBOOT__")) + break; + } + if (i == argc) { + /* https://wiki.gentoo.org/wiki/Hardened/Toolchain#Mark_Read-Only_Appropriate_Sections */ +#ifdef BR2_RELRO_PARTIAL + *cur++ = "-Wl,-z,relro"; +#endif +#ifdef BR2_RELRO_FULL + *cur++ = "-Wl,-z,now"; + *cur++ = "-Wl,-z,relro"; +#endif + } + + paranoid_wrapper = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); + if (paranoid_wrapper && strlen(paranoid_wrapper) > 0) + paranoid = 1; + else + paranoid = 0; + + /* Check for unsafe library and header paths */ + for (i = 1; i < argc; i++) { + const struct str_len_s *opt; + for (opt=unsafe_opts; opt->str; opt++ ) { + /* Skip any non-unsafe option. */ + if (strncmp(argv[i], opt->str, opt->len)) + continue; + + /* Handle both cases: + * - path is a separate argument, + * - path is concatenated with option. + */ + if (argv[i][opt->len] == '\0') { + i++; + if (i == argc) + break; + check_unsafe_path(argv[i-1], argv[i], paranoid, 0); + } else + check_unsafe_path(argv[i], argv[i] + opt->len, paranoid, 1); + } + } + + /* append forward args */ + memcpy(cur, &argv[1], sizeof(char *) * (argc - 1)); + cur += argc - 1; + + /* finish with NULL termination */ + *cur = NULL; + + exec_args = args; +#ifdef BR_CCACHE + if (getenv("BR_NO_CCACHE")) + /* Skip the ccache call */ + exec_args++; +#endif + + /* Debug the wrapper to see final arguments passed to the real compiler. */ + if (debug > 0) { + fprintf(stderr, "Toolchain wrapper executing:"); +#ifdef BR_CCACHE_HASH + fprintf(stderr, "%sCCACHE_COMPILERCHECK='string:" BR_CCACHE_HASH "'", + (debug == 2) ? "\n " : " "); +#endif +#ifdef BR_CCACHE_BASEDIR + fprintf(stderr, "%sCCACHE_BASEDIR='" BR_CCACHE_BASEDIR "'", + (debug == 2) ? "\n " : " "); +#endif + for (i = 0; exec_args[i]; i++) + fprintf(stderr, "%s'%s'", + (debug == 2) ? "\n " : " ", exec_args[i]); + fprintf(stderr, "\n"); + } + +#ifdef BR_CCACHE_HASH + /* Allow compilercheck to be overridden through the environment */ + if (setenv("CCACHE_COMPILERCHECK", "string:" BR_CCACHE_HASH, 0)) { + perror(__FILE__ ": Failed to set CCACHE_COMPILERCHECK"); + return 3; + } +#endif +#ifdef BR_CCACHE_BASEDIR + /* Allow compilercheck to be overridden through the environment */ + if (setenv("CCACHE_BASEDIR", BR_CCACHE_BASEDIR, 0)) { + perror(__FILE__ ": Failed to set CCACHE_BASEDIR"); + return 3; + } +#endif + + if (execv(exec_args[0], exec_args)) + perror(path); + + free(args); + + return 2; +} diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk new file mode 100644 index 00000000..8b551e3a --- /dev/null +++ b/toolchain/toolchain-wrapper.mk @@ -0,0 +1,92 @@ +################################################################################ +# +# definition of the toolchain wrapper build commands +# +################################################################################ + +# We use --hash-style=both to increase the compatibility of the generated +# binary with older platforms, except for MIPS, where the only acceptable +# hash style is 'sysv' +ifeq ($(findstring mips,$(HOSTARCH)),mips) +TOOLCHAIN_WRAPPER_HASH_STYLE = sysv +else +TOOLCHAIN_WRAPPER_HASH_STYLE = both +endif + +TOOLCHAIN_WRAPPER_ARGS = $($(PKG)_TOOLCHAIN_WRAPPER_ARGS) +TOOLCHAIN_WRAPPER_ARGS += -DBR_SYSROOT='"$(STAGING_SUBDIR)"' + +TOOLCHAIN_WRAPPER_OPTS = \ + $(ARCH_TOOLCHAIN_WRAPPER_OPTS) \ + $(call qstrip,$(BR2_SSP_OPTION)) \ + $(call qstrip,$(BR2_TARGET_OPTIMIZATION)) + +ifeq ($(BR2_REPRODUCIBLE),y) +TOOLCHAIN_WRAPPER_OPTS += -Wl,--build-id=none +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y) +TOOLCHAIN_WRAPPER_OPTS += -ffile-prefix-map=$(BASE_DIR)=buildroot +else +TOOLCHAIN_WRAPPER_OPTS += -D__FILE__=\"\" -D__BASE_FILE__=\"\" -Wno-builtin-macro-redefined +endif +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_7),) +TOOLCHAIN_WRAPPER_OPTS += -DBR_NEED_SOURCE_DATE_EPOCH +endif +endif + +# Disable -ftree-loop-distribute-patterns on microblaze to +# workaround a compiler bug with gcc 10 and -O2, -Os or -O3. +# https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=5879ab5fafedc8f6f9bfe95a4cf8501b0df90edd +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97208 +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_10)$(BR2_microblaze),yy) +TOOLCHAIN_WRAPPER_OPTS += -fno-tree-loop-distribute-patterns +endif + +# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each flag is a +# separate argument when used in execv() by the toolchain wrapper. +TOOLCHAIN_WRAPPER_ARGS += \ + -DBR_ADDITIONAL_CFLAGS='$(foreach f,$(TOOLCHAIN_WRAPPER_OPTS),"$(f)"$(comma))' + +ifeq ($(BR2_CCACHE),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE +endif + +ifeq ($(BR2_x86_x1000),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR_OMIT_LOCK_PREFIX +endif + +# Avoid FPU bug on XBurst CPUs +ifeq ($(BR2_mips_xburst),y) +# Before gcc 4.6, -mno-fused-madd was needed, after -ffp-contract is +# needed +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_6),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR_FP_CONTRACT_OFF +else +TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD +endif +endif + +ifeq ($(BR2_CCACHE_USE_BASEDIR),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"' +endif + +ifeq ($(BR2_PIC_PIE),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR2_PIC_PIE +endif + +ifeq ($(BR2_RELRO_PARTIAL),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR2_RELRO_PARTIAL +else ifeq ($(BR2_RELRO_FULL),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR2_RELRO_FULL +endif + +define TOOLCHAIN_WRAPPER_BUILD + $(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_WRAPPER_ARGS) \ + -s -Wl,--hash-style=$(TOOLCHAIN_WRAPPER_HASH_STYLE) \ + toolchain/toolchain-wrapper.c \ + -o $(@D)/toolchain-wrapper +endef + +define TOOLCHAIN_WRAPPER_INSTALL + $(INSTALL) -D -m 0755 $(@D)/toolchain-wrapper \ + $(HOST_DIR)/bin/toolchain-wrapper +endef diff --git a/toolchain/toolchain.mk b/toolchain/toolchain.mk new file mode 100644 index 00000000..08d16496 --- /dev/null +++ b/toolchain/toolchain.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# toolchain-related customisation of the content of the target/ directory +# +################################################################################ + +# Those customisations are added to the TARGET_FINALIZE_HOOKS, to be applied +# just after all packages have been built. + +# Install the gconv modules +ifeq ($(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY),y) +TOOLCHAIN_GLIBC_GCONV_LIBS = $(call qstrip,$(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST)) +define TOOLCHAIN_GLIBC_COPY_GCONV_LIBS + $(Q)found_gconv=no; \ + for d in $(TOOLCHAIN_EXTERNAL_PREFIX) ''; do \ + [ -d "$(STAGING_DIR)/usr/lib/$${d}/gconv" ] || continue; \ + found_gconv=yes; \ + break; \ + done; \ + if [ "$${found_gconv}" = "no" ]; then \ + printf "Unable to find gconv modules\n" >&2; \ + exit 1; \ + fi; \ + if [ -z "$(TOOLCHAIN_GLIBC_GCONV_LIBS)" ]; then \ + $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/gconv-modules \ + $(TARGET_DIR)/usr/lib/gconv/gconv-modules && \ + $(INSTALL) -m 0644 $(STAGING_DIR)/usr/lib/$${d}/gconv/*.so \ + $(TARGET_DIR)/usr/lib/gconv \ + || exit 1; \ + else \ + for l in $(TOOLCHAIN_GLIBC_GCONV_LIBS); do \ + $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/$${l}.so \ + $(TARGET_DIR)/usr/lib/gconv/$${l}.so \ + || exit 1; \ + $(TARGET_READELF) -d $(STAGING_DIR)/usr/lib/$${d}/gconv/$${l}.so |\ + sort -u |\ + sed -e '/.*(NEEDED).*\[\(.*\.so\)\]$$/!d; s//\1/;' |\ + while read lib; do \ + $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/$${lib} \ + $(TARGET_DIR)/usr/lib/gconv/$${lib} \ + || exit 1; \ + done; \ + done; \ + ./support/scripts/expunge-gconv-modules "$(TOOLCHAIN_GLIBC_GCONV_LIBS)" \ + <$(STAGING_DIR)/usr/lib/$${d}/gconv/gconv-modules \ + >$(TARGET_DIR)/usr/lib/gconv/gconv-modules; \ + fi +endef +TOOLCHAIN_TARGET_FINALIZE_HOOKS += TOOLCHAIN_GLIBC_COPY_GCONV_LIBS +endif diff --git a/toolchain/toolchain/toolchain.mk b/toolchain/toolchain/toolchain.mk new file mode 100644 index 00000000..0afb12c0 --- /dev/null +++ b/toolchain/toolchain/toolchain.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# toolchain +# +################################################################################ + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) +TOOLCHAIN_DEPENDENCIES += toolchain-buildroot +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +TOOLCHAIN_DEPENDENCIES += toolchain-external +endif + +TOOLCHAIN_ADD_TOOLCHAIN_DEPENDENCY = NO +TOOLCHAIN_INSTALL_STAGING = YES + +# Apply a hack that Rick Felker suggested[1] to avoid conflicts between libc +# headers and kernel headers. This is needed for kernel headers older than +# 4.15. Kernel headers 4.15 and newer don't require __GLIBC__ to be defined. +# +# Augment the original suggestion with __USE_MISC since recent kernels +# (older than 4.15) require this glibc internal macro. Also, as musl defines +# IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO, add another macro to suppress +# them in the kernel header, and avoid macro/enum conflict. +# +# Kernel version 3.12 introduced the libc-compat.h header. +# +# [1] http://www.openwall.com/lists/musl/2015/10/08/2 +ifeq ($(BR2_TOOLCHAIN_USES_MUSL)$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15),yy:) +define TOOLCHAIN_MUSL_KERNEL_HEADERS_COMPATIBILITY_HACK + $(SED) 's/^#if defined(__GLIBC__)$$/#if 1/' \ + $(STAGING_DIR)/usr/include/linux/libc-compat.h + $(SED) '1s/^/#define __USE_MISC\n/' \ + $(STAGING_DIR)/usr/include/linux/libc-compat.h + $(SED) '1s/^/#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0\n/' \ + $(STAGING_DIR)/usr/include/linux/libc-compat.h +endef +TOOLCHAIN_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_MUSL_KERNEL_HEADERS_COMPATIBILITY_HACK +endif + +# Install default nsswitch.conf file if the skeleton doesn't provide it +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) +define GLIBC_COPY_NSSWITCH_FILE + @if [ ! -f "$(TARGET_DIR)/etc/nsswitch.conf" ]; then \ + $(INSTALL) -D -m 0644 package/glibc/nsswitch.conf $(TARGET_DIR)/etc/nsswitch.conf ; \ + fi +endef +TOOLCHAIN_POST_INSTALL_TARGET_HOOKS += GLIBC_COPY_NSSWITCH_FILE +endif + +$(eval $(virtual-package))