From b0f643aa87936c09faddc9af3f1ac85b2db1baf0 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 10 Jan 2018 20:55:06 +0800 Subject: [PATCH] update to R7.5.3 stable to fix firewall freeze --- feeds.conf.default | 8 +- include/target.mk | 2 +- package/Makefile | 10 +- package/base-files/Makefile | 32 +- package/base-files/files/bin/config_generate | 10 +- package/base-files/files/etc/group | 1 - package/base-files/files/etc/init.d/led | 1 - package/base-files/files/etc/init.d/system | 2 +- package/base-files/files/etc/openwrt_release | 3 +- package/base-files/files/etc/rc.common | 21 +- package/base-files/files/etc/sysctl.conf | 1 - package/base-files/files/lib/functions.sh | 25 +- .../base-files/files/lib/functions/leds.sh | 12 - .../files/lib/functions/uci-defaults.sh | 318 +- .../files/lib/preinit/10_indicate_preinit | 2 +- .../lib/preinit/{02_sysinfo => 10_sysinfo} | 0 .../files/lib/preinit/40_run_failsafe_hook | 6 +- .../files/lib/preinit/99_10_failsafe_login | 11 +- .../base-files/files/lib/upgrade/common.sh | 192 +- package/base-files/files/lib/upgrade/stage2 | 150 - package/base-files/files/sbin/sysupgrade | 106 +- package/base-files/files/usr/lib/os-release | 6 +- package/base-files/image-config.in | 19 +- package/boot/apex/Makefile | 3 +- .../boot/arm-trusted-firmware-sunxi/Makefile | 52 - package/boot/at91bootstrap/Makefile | 94 - package/boot/at91bootstrap/at91bootstrap.mk | 88 - package/boot/grub2/Makefile | 1 - package/boot/kexec-tools/Config.in | 9 +- package/boot/kexec-tools/Makefile | 80 +- package/boot/kexec-tools/files/kdump.config | 7 - package/boot/kexec-tools/files/kdump.defaults | 11 - package/boot/kexec-tools/files/kdump.init | 182 - .../boot/kobs-ng/patches/001-compile.patch | 3 +- package/boot/rbcfg/Makefile | 2 +- package/boot/rbcfg/src/main.c | 137 +- package/boot/rbcfg/src/rbcfg.h | 10 - package/boot/uboot-ar71xx/Makefile | 84 +- .../board/zyxel/nbg460n/Makefile | 0 .../board/zyxel/nbg460n/config.mk | 0 .../board/zyxel/nbg460n/lowlevel_init.S | 0 .../board/zyxel/nbg460n/nbg460n.c | 0 .../board/zyxel/nbg460n/u-boot.lds | 0 .../{src => files}/cpu/mips/ar71xx_serial.c | 0 .../{src => files}/drivers/net/ag71xx.c | 0 .../{src => files}/drivers/net/ag71xx.h | 0 .../{src => files}/drivers/net/phy/rtl8366.h | 0 .../drivers/net/phy/rtl8366_mii.c | 0 .../{src => files}/drivers/spi/ar71xx_spi.c | 0 .../{src => files}/include/asm-mips/ar71xx.h | 0 .../include/asm-mips/ar71xx_gpio.h | 0 .../{src => files}/include/configs/nbg460n.h | 0 package/boot/uboot-at91/Makefile | 136 +- package/boot/uboot-envtools/Makefile | 6 +- package/boot/uboot-envtools/files/ar71xx | 13 +- package/boot/uboot-envtools/files/cns3xxx | 3 +- package/boot/uboot-envtools/files/imx6 | 3 +- package/boot/uboot-envtools/files/ipq | 24 +- package/boot/uboot-envtools/files/kirkwood | 5 +- package/boot/uboot-envtools/files/lantiq | 10 +- package/boot/uboot-envtools/files/mvebu | 3 +- package/boot/uboot-envtools/files/mxs | 3 +- package/boot/uboot-envtools/files/oxnas | 3 +- package/boot/uboot-envtools/files/pistachio | 27 - package/boot/uboot-envtools/files/ramips | 11 +- package/boot/uboot-fritz4040/Makefile | 54 - .../uboot-fritz4040/files/upload-to-f4040.sh | 41 - .../patches/100-private-libgcc.patch | 274 - .../patches/110-portability.patch | 32 - package/boot/uboot-imx6/Makefile | 117 +- package/boot/uboot-kirkwood/Makefile | 126 +- ...-add-CONFIG_SYS_GENERIC_BOARD-define.patch | 27 + ...r-add-CONFIG_SYS_GENERIC_BOARD-defin.patch | 23 + ...ome-add-CONFIG_SYS_GENERIC_BOARD-def.patch | 23 + ...t-add-CONFIG_SYS_GENERIC_BOARD-defin.patch | 23 + ...2-add-CONFIG_SYS_GENERIC_BOARD-defin.patch | 23 + ...lug-add-CONFIG_SYS_GENERIC_BOARD-def.patch | 23 + .../patches/007-nsa310-uboot-generic.patch | 697 -- .../patches/008-nsa325-uboot-generic.patch | 683 -- .../uboot-kirkwood/patches/110-dockstar.patch | 19 +- .../uboot-kirkwood/patches/120-iconnect.patch | 8 +- .../uboot-kirkwood/patches/130-ib62x0.patch | 2 +- .../patches/140-pogoplug_e02.patch | 2 +- .../patches/150-goflexhome.patch | 5 +- .../patches/200-openwrt-config.patch | 130 +- package/boot/uboot-lantiq/Makefile | 474 +- ...IPS-add-support-for-Lantiq-XWAY-SoCs.patch | 10 +- ...support-for-Lantiq-XWAY-ARX100-SoC-f.patch | 3 +- ...18-tools-lantiq-add-NAND-SPL-support.patch | 6 +- ...PS-lantiq-add-default-openwrt-config.patch | 3 +- .../patches/100-portability.patch | 18 - package/boot/uboot-layerscape-32b/Makefile | 98 + .../boot/uboot-layerscape-armv8_32b/Makefile | 53 - package/boot/uboot-layerscape/Makefile | 119 +- ...add-LEDE-boot-support-in-environment.patch | 51 - ...-add-LEDE-boot-support-in-environmen.patch | 57 - ...-add-LEDE-boot-support-in-environmen.patch | 51 - ...-add-LEDE-boot-support-in-environmen.patch | 58 - ...-add-LEDE-boot-support-in-environmen.patch | 54 - ...m-add-LEDE-boot-support-in-environme.patch | 49 - package/boot/uboot-mvebu/Makefile | 91 +- ...clearfog-generate-random-MAC-address.patch | 28 - ...003-clearfog-enable-distro-boot-code.patch | 97 - ...og-enable-setexpr-command-by-default.patch | 24 - .../patches/001-use-dtc-in-kernel.patch | 11 + ...011-rsa-Fix-build-with-OpenSSL-1.1.x.patch | 153 - ...wbimage-fix-build-with-OpenSSL-1.1.x.patch | 96 - .../patches/002-enable_random_mac_addr.patch | 10 + .../uboot-mvebu/patches/003-boot_script.patch | 32 + ...learfog-reset-usom-onboard-1512-phy.patch} | 9 +- package/boot/uboot-mxs/Makefile | 87 +- package/boot/uboot-omap/Makefile | 104 +- .../boot/uboot-omap/files/uEnv-default.txt | 8 - ...ream_image_c_fix_non_android_booting.patch | 33 + .../100-disable_thumb_unknown_errata.patch | 11 + .../patches/101-disable-thumb-omap3.patch | 14 - .../uboot-omap/patches/101-disable_ext.patch | 10 + .../uboot-omap/patches/102-minify-spl.patch | 44 - .../patches/103-disable-fat-write-spl.patch | 27 - .../104-omap3-overo-enable-thumb.patch | 18 - package/boot/uboot-oxnas/Makefile | 90 +- .../arch/arm/cpu/arm1136/nas782x/Makefile | 0 .../arch/arm/cpu/arm1136/nas782x/clock.c | 0 .../arch/arm/cpu/arm1136/nas782x/pinmux.c | 0 .../arch/arm/cpu/arm1136/nas782x/reset.c | 0 .../arch/arm/cpu/arm1136/nas782x/timer.c | 0 .../arch/arm/include/asm/arch-nas782x/clock.h | 0 .../arch/arm/include/asm/arch-nas782x/cpu.h | 0 .../arm/include/asm/arch-nas782x/hardware.h | 0 .../arm/include/asm/arch-nas782x/pinmux.h | 0 .../arch/arm/include/asm/arch-nas782x/spl.h | 0 .../arm/include/asm/arch-nas782x/sysctl.h | 0 .../arch/arm/include/asm/arch-nas782x/timer.h | 0 .../{src => files}/board/ox820/Kconfig | 0 .../{src => files}/board/ox820/MAINTAINERS | 0 .../{src => files}/board/ox820/Makefile | 0 .../{src => files}/board/ox820/ddr.c | 0 .../{src => files}/board/ox820/ddr.h | 0 .../board/ox820/lowlevel_init.S | 0 .../{src => files}/board/ox820/ox820.c | 0 .../{src => files}/board/ox820/spl_start.S | 0 .../{src => files}/board/ox820/u-boot-spl.lds | 0 .../{src => files}/common/env_ext4.c | 0 .../{src => files}/common/spl/spl_block.c | 0 .../{src => files}/configs/ox820_defconfig | 0 .../drivers/block/plxsata_ide.c | 0 .../drivers/usb/host/ehci-oxnas.c | 0 .../{src => files}/include/configs/ox820.h | 0 .../{src => files}/tools/mkox820crc.c | 0 package/boot/uboot-pxa/Makefile | 91 + .../001-squashfs_rootfstype_cmdline.patch | 13 + package/boot/uboot-sunxi/Makefile | 263 +- .../patches/001-use-dtc-in-kernel.patch | 11 + .../patches/002-add-olimex-a13-som.patch | 3 +- .../003-add-theobroma-a31-pangolin.patch | 22 +- .../010-dt-sync-files-with-kernel.patch | 1403 ++++ .../011-dt-sync-dts-files-with-kernel.patch | 7211 +++++++++++++++++ .../012-sun6i-fix-clock_twi_onoff.patch | 38 + .../patches/013-enable-realtek-phy.patch | 24 + .../patches/014-fix-gmac-init.patch | 127 + .../015-fix-2nd-usb-ctrler-on-sun47i.patch | 78 + .../patches/016-spl-print-mmc-slot.patch | 31 + ...17-usb-add-support-for-usb3-vbus-pin.patch | 39 + ...8-usb-specify-vbus-pins-on-orangepis.patch | 31 + ...19-sid-add-efuse-support-for-h3-a83t.patch | 33 + ...-boot-display-board-model-on-startup.patch | 23 + ...t-for-Olimex-A20-OLinuXino-LIME2-eMM.patch | 76 - ...ange-node-name-for-pwrseq-pin-on-Oli.patch | 31 - .../patches/062-A20-improve-gmac-upload.patch | 12 - ...1-sun6i-sync-PLL1-multdiv-with-Boot1.patch | 6 +- .../093-sun6i-fix-PLL-LDO-voltselect.patch | 15 +- .../100-sun6i-alternate-on-UART2.patch | 4 +- .../101-sun6i-support-console-on-UART2.patch | 8 +- ...2-sunxi-make_CONS_INDEX-configurable.patch | 6 +- ...-environment-for-dtc-binary-location.patch | 35 - ...ile-Build-python-libfdt-library-if-n.patch | 89 - ...akefile.lib-Always-have-.-u-boot.dts.patch | 26 - ...ert-Avoid-non-portable-sed-construct.patch | 21 - ...rt-sunxi-Use-binman-for-sunxi-boards.patch | 58 - ...d-device-tree-for-Orange-Pi-R1-board.patch | 182 - .../301-sunxi-add-orangepi-R1-defconfig.patch | 48 - ...nxi-Fix-CONFIG_SUNXI_GMAC-references.patch | 83 - package/boot/uboot-sunxi/uEnv-a64.txt | 5 - package/boot/uboot-zynq/Makefile | 115 +- package/devel/binutils/Makefile | 1 - package/devel/gdb-arc/Makefile | 6 +- package/devel/gdb/Makefile | 10 +- .../001-gdb-pr14523-mips-signal-number.patch | 2 +- package/devel/gdb/patches/100-musl_fix.patch | 2 +- .../devel/gdb/patches/110-shared_libgcc.patch | 76 - .../120-sigprocmask-invalid-call.patch | 38 - package/devel/perf/Makefile | 5 +- package/devel/strace/Makefile | 6 +- package/devel/valgrind/Makefile | 1 - package/lean/default-settings/Makefile | 2 +- .../files/zzz-default-settings | 5 +- .../lean/luci-app-shadowsocksr-pro/Makefile | 2 +- .../root/etc/uci-defaults/shadowsocksr | 3 - .../patches/001-throw-in-funcdef.patch | 16 +- package/libs/{wolfssl => cyassl}/Config.in | 26 +- package/libs/{wolfssl => cyassl}/Makefile | 49 +- .../patches/001-CVE-2017-13099.patch | 0 .../400-additional_compatibility.patch | 0 package/libs/elfutils/Makefile | 1 - package/libs/gettext-full/Makefile | 1 - .../patches/000-relocatable.patch | 8 +- package/libs/libevent2/Makefile | 1 - package/libs/libiconv-full/Makefile | 2 +- package/libs/libjson-c/Makefile | 3 +- package/libs/libnetfilter-conntrack/Makefile | 12 +- package/libs/libnetfilter-queue/Makefile | 8 +- .../patches/100-checksum_computation.patch | 18 +- package/libs/libnftnl/Makefile | 8 +- package/libs/libnl/Makefile | 16 +- ...-of-strerror_l-if-it-doesn-t-exist-i.patch | 105 + ...ivate-field-in-libnl-pkg-config-file.patch | 30 - ...workaround-to-the-libc-compat.h-copy.patch | 103 - ...ild-enable-building-cli-during-tests.patch | 115 - package/libs/libpcap/Makefile | 3 +- .../libs/{readline => libreadline}/Makefile | 3 - .../patches/001-install_perm.patch | 0 package/libs/libtool/Makefile | 1 - package/libs/libubox/Makefile | 4 +- package/libs/libunwind/Makefile | 1 - package/libs/libusb-compat/Makefile | 6 +- package/libs/lzo/Makefile | 4 + package/libs/mbedtls/Makefile | 1 - package/libs/mbedtls/patches/200-config.patch | 9 + package/libs/ncurses/Makefile | 20 - package/libs/nghttp2/Makefile | 45 - package/libs/openssl/Config.in | 5 - package/libs/openssl/Makefile | 23 +- .../patches/110-optimize-for-size.patch | 3 +- .../patches/160-disable_doc_tests.patch | 4 +- .../openssl/patches/200-parallel_build.patch | 10 +- package/libs/toolchain/Makefile | 51 +- package/libs/ustream-ssl/Makefile | 14 +- .../patches/100-disable-hardening-check.patch | 11 - package/network/config/firewall/Makefile | 6 +- package/network/config/gre/Makefile | 2 +- package/network/config/gre/files/gre.sh | 11 +- package/network/config/ltq-adsl-app/Makefile | 11 +- .../config/ltq-adsl-app/files/10-adsl_rename | 7 - .../config/ltq-adsl-app/files/10_atm.sh | 31 - .../config/ltq-adsl-app/files/10_ptm.sh | 29 - .../config/ltq-adsl-app/files/dsl_control | 19 +- .../100-add-more-script-notifications.patch | 42 - package/network/config/ltq-vdsl-app/Makefile | 8 +- .../config/ltq-vdsl-app/files/10-xdsl_rename | 7 - .../config/ltq-vdsl-app/files/10_atm.sh | 16 - .../config/ltq-vdsl-app/files/10_ptm.sh | 14 - .../config/ltq-vdsl-app/files/dsl_control | 48 +- .../files/vdsl_cpe_control_wrapper | 11 + package/network/config/qos-scripts/Makefile | 1 - package/network/config/vti/Makefile | 2 +- package/network/config/vti/files/vti.sh | 7 +- package/network/config/vxlan/Makefile | 32 - package/network/config/vxlan/files/vxlan.sh | 148 - package/network/ipv6/6rd/Makefile | 2 +- package/network/ipv6/6rd/files/6rd.sh | 8 +- package/network/ipv6/map/Makefile | 2 +- package/network/ipv6/map/files/map.sh | 17 +- package/network/ipv6/map/src/mapcalc.c | 2 +- package/network/ipv6/odhcp6c/Makefile | 13 +- .../network/ipv6/odhcp6c/files/dhcpv6.script | 17 - package/network/ipv6/odhcp6c/files/dhcpv6.sh | 7 +- package/network/services/dnsmasq/Makefile | 32 +- .../services/dnsmasq/files/dhcp-script.sh | 46 - .../network/services/dnsmasq/files/dhcp.conf | 2 +- .../services/dnsmasq/files/dnsmasq.init | 388 +- .../services/dnsmasq/files/dnsmasq_acl.json | 4 - .../services/dnsmasq/files/rfc6761.conf | 15 - .../services/dnsmasq/patches/240-ubus.patch | 128 - package/network/services/dropbear/Makefile | 3 +- .../patches/120-openwrt_options.patch | 6 +- package/network/services/hostapd/Makefile | 10 +- .../hostapd/files/hostapd-full.config | 262 +- .../hostapd/files/hostapd-mini.config | 256 +- .../network/services/hostapd/files/hostapd.sh | 66 +- .../hostapd/files/wpa_supplicant-full.config | 373 +- .../hostapd/files/wpa_supplicant-mini.config | 392 +- .../hostapd/files/wpa_supplicant-p2p.config | 369 +- ...on-between-AssocResp-callback-and-4a.patch | 83 + ...Reassociation-Request-frame-dropping.patch | 36 + ...-clearing-on-Authentication-frame-RX.patch | 40 + ...ibility-to-send-debug-messages-to-sy.patch | 145 + ...-key-reinstallation-in-FT-handshake.patch} | 60 +- ...ation-of-an-already-in-use-group-ke.patch} | 22 +- ...-of-GTK-IGTK-reinstallation-of-WNM-.patch} | 31 +- ...vent-installation-of-an-all-zero-TK.patch} | 16 +- ...K-rekeying-to-generate-a-new-ANonce.patch} | 4 +- ...-TDLS-Reject-TPK-TK-reconfiguration.patch} | 4 +- ...eep-Mode-Response-without-pending-r.patch} | 0 ...ultiple-Reassociation-Response-fram.patch} | 16 +- ...ons-wpa_group_update_count-and-wpa_p.patch | 305 + ...-against-PTK-reinstalls-in-4-way-ha.patch} | 0 ...and-check-for-this-when-deriving-PT.patch} | 0 ...workaround-for-key-reinstallation-a.patch} | 34 +- ...tentcy-checks-for-PTK-component-len.patch} | 22 +- ...mation-in-supplicant-state-machine-.patch} | 0 ...eep-Mode-Request-in-wnm_sleep_mode-.patch} | 0 .../hostapd/patches/100-daemonize_fix.patch | 2 +- .../hostapd/patches/110-no_eapol_fix.patch | 2 +- ...120-disable_bridge_packet_workaround.patch | 2 +- .../hostapd/patches/200-multicall.patch | 57 +- .../services/hostapd/patches/300-noscan.patch | 6 +- .../patches/310-rescan_immediately.patch | 2 +- .../patches/330-nl80211_fix_set_freq.patch | 2 +- .../patches/340-reload_freq_change.patch | 6 +- .../patches/350-nl80211_del_beacon_bss.patch | 46 +- .../patches/360-ctrl_iface_reload.patch | 8 +- .../hostapd/patches/370-ap_sta_support.patch | 20 +- .../patches/380-disable_ctrl_iface_mib.patch | 32 +- .../patches/390-wpa_ie_cap_workaround.patch | 4 +- .../patches/420-indicate-features.patch | 4 +- .../patches/430-hostapd_cli_ifdef.patch | 16 +- ...dd-new-config-params-to-be-used-with.patch | 16 +- ...-use-new-parameters-during-ibss-join.patch | 4 +- .../462-wpa_s-support-htmode-param.patch | 156 + .../patches/463-add-mcast_rate-to-11s.patch | 6 +- .../patches/464-fix-mesh-obss-check.patch | 19 - .../patches/470-survey_data_fallback.patch | 2 +- .../hostapd/patches/600-ubus_support.patch | 113 +- .../services/hostapd/src/src/ap/ubus.c | 220 - .../services/hostapd/src/src/ap/ubus.h | 5 - package/network/services/ipset-dns/Makefile | 6 +- .../patches/100-simultaneous-ipv4-ipv6.patch | 57 + package/network/services/lldpd/Makefile | 4 +- .../network/services/lldpd/files/lldpd.config | 2 +- .../network/services/lldpd/files/lldpd.init | 2 +- package/network/services/odhcpd/Makefile | 96 +- .../services/odhcpd/files/odhcpd.defaults | 1 - .../services/openvpn-easy-rsa/Makefile | 41 +- .../openvpn-easy-rsa/files/easy-rsa.index | 0 .../openvpn-easy-rsa/files/easy-rsa.serial | 1 + .../files/openvpn-easy-rsa.upgrade | 1 - .../patches/100-run-ootb.patch | 152 + package/network/services/openvpn/Makefile | 1 - package/network/services/ppp/Makefile | 2 +- package/network/services/ppp/files/ppp.sh | 9 - .../ppp/patches/140-pppoe_compile_fix.patch | 62 +- .../ppp/patches/500-add-pptp-plugin.patch | 3 +- .../services/ppp/patches/511-syncppp.patch | 214 - .../services/ppp/patches/520-uniq.patch | 12 +- package/network/services/samba36/Makefile | 34 +- .../services/samba36/files/samba.config | 4 +- .../network/services/samba36/files/samba.init | 6 +- package/network/services/shellsync/Makefile | 34 - .../services/shellsync/src/shellsync.c | 106 - package/network/services/uhttpd/Makefile | 19 +- .../services/uhttpd/files/uhttpd.config | 6 +- .../network/services/uhttpd/files/uhttpd.init | 2 +- package/network/services/umdns/Makefile | 6 +- .../network/utils/adb-enablemodem/Makefile | 26 - .../adb-enablemodem/files/adb-enablemodem | 64 - package/network/utils/arptables/Makefile | 2 +- package/network/utils/comgt/Makefile | 2 +- package/network/utils/comgt/files/ncm.json | 11 - package/network/utils/comgt/files/ncm.sh | 27 +- .../network/utils/conntrack-tools/Makefile | 13 +- package/network/utils/curl/Config.in | 8 +- package/network/utils/curl/Makefile | 28 +- .../patches/001-curl-https-openssl-fix.patch | 34 + .../curl/patches/100-CVE-2017-2629.patch | 33 + .../curl/patches/101-CVE-2017-7407.patch | 165 + .../curl/patches/102-CVE-2017-7468.patch | 264 + .../curl/patches/103-CVE-2017-1000100.patch | 41 + .../curl/patches/104-CVE-2017-1000101.patch | 33 + .../curl/patches/105-CVE-2017-8816.patch | 67 + .../curl/patches/106-CVE-2017-8817.patch | 141 + .../curl/patches/200-no_docs_tests.patch | 28 +- ...bedtls-disable-runtime-version-check.patch | 4 +- package/network/utils/ebtables/Makefile | 2 +- package/network/utils/iperf/Makefile | 13 +- package/network/utils/iperf3/Makefile | 40 +- .../010-iperf-3.3-fix-build-warnings.patch | 300 - package/network/utils/iproute2/Makefile | 83 +- .../utils/iproute2/patches/001-config.patch | 4 +- .../iproute2/patches/004-darwin_fixes.patch | 2 +- .../utils/iproute2/patches/006-no_sctp.patch | 4 +- .../utils/iproute2/patches/007-no_arpd.patch | 6 +- .../utils/iproute2/patches/008-no_netem.patch | 8 +- .../patches/009-keep_libmnl_optional.patch | 11 - .../iproute2/patches/010-type_fixes.patch | 396 + .../patches/100-allow_pfifo_fast.patch | 2 +- .../iproute2/patches/110-extra-ccopts.patch | 2 +- .../iproute2/patches/120-libnetlink-pic.patch | 7 +- .../patches/130-missing_include.patch | 20 + ...bc-compat.h-do-not-rely-on-__GLIBC__.patch | 107 - ...prevent-redefinition-of-struct-ethhd.patch | 67 - .../utils/iproute2/patches/300-ip_tiny.patch | 45 +- .../patches/900-drop_FAILED_POLICY.patch | 33 +- .../910-sanitize_headers_for_musl.patch | 10 + .../patches/911-fix_in_h_include.patch | 30 + .../iproute2/patches/950-add-cake-to-tc.patch | 10 +- ...-monitor-can-t-work-when-NET_NS-is-n.patch | 35 + package/network/utils/ipset/Makefile | 23 +- ...t-reference-to-u_int8_t-with-uint8_t.patch | 25 - package/network/utils/iptables/Makefile | 66 +- .../020-iptables-disable-modprobe.patch | 4 +- .../patches/030-no-libnfnetlink.patch | 94 + .../iptables/patches/050-optional-xml.patch | 2 +- .../iptables/patches/100-bash-location.patch | 8 + .../patches/200-configurable_builtin.patch | 45 +- .../iptables/patches/300-musl_fixes.patch | 127 + .../iptables/patches/600-shared-libext.patch | 60 +- .../700-disable-legacy-revisions.patch | 51 +- package/network/utils/iputils/Makefile | 1 - package/network/utils/iw/Makefile | 3 +- .../utils/iw/patches/001-nl80211_h_sync.patch | 407 +- package/network/utils/iwinfo/Makefile | 6 +- .../network/utils/layerscape/restool/Makefile | 38 - ...ripts-move-shebang-on-the-first-line.patch | 35 - ...ull-path-option-to-dprc-list-command.patch | 151 - ...03-scripts-remove-unnecessary-arrays.patch | 62 - ...scripts-use-restool-full-path-option.patch | 111 - ...e-proper-arithmetic-operation-syntax.patch | 26 - ...cripts-use-strings-instead-of-arrays.patch | 79 - ...-use-Bourne-shell-s-pattern-matching.patch | 126 - ...pts-use-Bourne-shell-instead-of-bash.patch | 32 - ...nd-for-a-improper-sed-substitution-T.patch | 36 - ...pts-use-proper-arithmetic-operations.patch | 44 - ...ompare-strings-with-regexp-expressio.patch | 27 - ...nproc-with-cross-platform-implementa.patch | 27 - package/network/utils/linux-atm/Makefile | 1 - package/network/utils/nftables/Makefile | 8 +- ...atement-fix-print-of-ip-dnat-address.patch | 76 - package/network/utils/tcpdump/Makefile | 1 - .../tcpdump/patches/100-tcpdump_mini.patch | 37 +- .../utils/uqmi/files/lib/netifd/proto/qmi.sh | 2 - package/network/utils/wpan-tools/Makefile | 1 - ...h-fix-compatibility-with-libnl-3.3.0.patch | 44 - package/network/utils/wwan/files/wwan.sh | 26 +- package/network/utils/xtables-addons/Makefile | 10 +- .../patches/201-fix-lua-packetscript.patch | 20 - package/system/fstools/Makefile | 21 +- package/system/fstools/files/blockd.init | 21 - package/system/fstools/files/snapshot | 16 +- package/system/mountd/Makefile | 45 + package/system/mountd/files/mountd.config | 3 + package/system/mountd/files/mountd.init | 22 + package/system/opkg/Makefile | 24 +- package/system/procd/Makefile | 51 +- .../system/procd/files/hotplug-preinit.json | 8 +- package/system/procd/files/hotplug.json | 22 +- package/system/procd/files/nand-preinit.sh | 21 + .../upgrade => system/procd/files}/nand.sh | 100 +- package/system/procd/files/procd.sh | 36 +- package/system/ubox/Makefile | 16 +- package/system/ubus/Makefile | 6 +- package/system/uci/Makefile | 4 +- package/system/uci/files/lib/config/uci.sh | 5 +- package/utils/adb/Makefile | 2 +- package/utils/busybox/Config-defaults.in | 1576 ++-- package/utils/busybox/Makefile | 92 +- package/utils/busybox/config/Config.in | 410 +- .../utils/busybox/config/archival/Config.in | 189 +- .../busybox/config/console-tools/Config.in | 153 +- .../utils/busybox/config/coreutils/Config.in | 1297 +-- .../busybox/config/debianutils/Config.in | 20 +- .../utils/busybox/config/editors/Config.in | 37 +- .../utils/busybox/config/findutils/Config.in | 40 +- package/utils/busybox/config/init/Config.in | 56 +- package/utils/busybox/config/libbb/Config.in | 179 +- .../utils/busybox/config/loginutils/Config.in | 36 +- .../utils/busybox/config/mailutils/Config.in | 18 +- .../utils/busybox/config/miscutils/Config.in | 971 ++- .../utils/busybox/config/modutils/Config.in | 239 +- .../utils/busybox/config/networking/Config.in | 1576 ++-- .../busybox/config/networking/udhcp/Config.in | 86 +- package/utils/busybox/config/procps/Config.in | 288 +- package/utils/busybox/config/runit/Config.in | 7 - .../utils/busybox/config/selinux/Config.in | 41 +- package/utils/busybox/config/shell/Config.in | 457 +- .../utils/busybox/config/sysklogd/Config.in | 3 +- .../utils/busybox/config/util-linux/Config.in | 1062 ++- .../config/util-linux/volume_id/Config.in | 137 +- ...om-do-not-require-that-to-should-hav.patch | 37 + .../patches/102-trylink_mktemp_fix.patch | 20 + .../patches/120-remove_uclibc_rpc_check.patch | 12 + .../patches/200-udhcpc_reduce_msgs.patch | 4 +- .../patches/201-udhcpc_changed_ifindex.patch | 2 +- .../203-udhcpc_renew_no_deconfig.patch | 2 +- .../busybox/patches/210-add_netmsg_util.patch | 54 +- .../busybox/patches/220-add_lock_util.patch | 54 +- .../patches/230-add_nslookup_lede.patch | 24 +- .../busybox/patches/240-telnetd_intr.patch | 2 +- .../busybox/patches/250-date-k-flag.patch | 12 +- .../301-ip-link-fix-netlink-msg-size.patch | 2 +- ...02-ip-rule-add-suppress-prefixlength.patch | 145 + .../patches/302-netlink-alignment.patch | 100 + .../303-ip-route-fix-high-table-ids.patch | 486 ++ ...ch-file-with-x-when-modified_count-0.patch | 100 + ...g-a-new-file-with-ZZ-when-no-editing.patch | 53 + .../500-move-traceroute-applets-to-bin.patch | 13 - .../510-move-passwd-applet-to-bin.patch | 11 - .../busybox/patches/600-cve-2017-16544.patch | 35 - package/utils/bzip2/Makefile | 1 - package/utils/ct-bugcheck/src/bugcheck.sh | 2 +- package/utils/e2fsprogs/Makefile | 24 +- package/utils/f2fs-tools/Makefile | 9 +- ...fs-f2fs-segment.c-718-update_sit_ent.patch | 66 + package/utils/fritz-tools/Makefile | 45 - package/utils/fritz-tools/README.md | 50 - package/utils/fritz-tools/src/CMakeLists.txt | 15 - .../utils/fritz-tools/src/fritz_cal_extract.c | 259 - .../utils/fritz-tools/src/fritz_tffs_read.c | 379 - package/utils/fuse/Makefile | 1 - .../010-lua-5.1.3-lnum-full-260308.patch | 47 +- ...2-lnum-fix-ltle-relational-operators.patch | 4 +- .../utils/lua/patches/020-shared_liblua.patch | 2 +- .../utils/lua/patches/050-honor-cflags.patch | 2 +- .../lua/patches/300-opcode_performance.patch | 32 +- package/utils/otrx/src/otrx.c | 73 +- package/utils/ugps/Makefile | 6 +- package/utils/usbmode/Makefile | 6 +- package/utils/util-linux/Makefile | 14 +- .../001-uclibc_add_libm_to_scriptreplay.patch | 24 + .../patches/003-fix_pkgconfig_files.patch | 4 +- .../util-linux/patches/100-use_urandom.patch | 14 - package/utils/xfsprogs/Makefile | 27 +- .../patches/001-automake-compat.patch | 78 + .../xfsprogs/patches/100-no-selftest.patch | 14 - .../utils/xfsprogs/patches/100-no_aio.patch | 19 + .../utils/xfsprogs/patches/110-subdirs.patch | 12 - .../patches/110-uclibc_no_ustat.patch | 32 + .../xfsprogs/patches/120-disable_assert.patch | 12 - .../xfsprogs/patches/120-portability.patch | 45 + .../patches/130-uclibc_no_xattr.patch | 32 + .../utils/xfsprogs/patches/140-no_po.patch | 19 + .../xfsprogs/patches/150-include_fixes.patch | 72 + .../patches/160-format-security.patch | 29 + 532 files changed, 21439 insertions(+), 17626 deletions(-) rename package/base-files/files/lib/preinit/{02_sysinfo => 10_sysinfo} (100%) delete mode 100755 package/base-files/files/lib/upgrade/stage2 delete mode 100644 package/boot/arm-trusted-firmware-sunxi/Makefile delete mode 100644 package/boot/at91bootstrap/Makefile delete mode 100644 package/boot/at91bootstrap/at91bootstrap.mk delete mode 100644 package/boot/kexec-tools/files/kdump.config delete mode 100644 package/boot/kexec-tools/files/kdump.defaults delete mode 100755 package/boot/kexec-tools/files/kdump.init rename package/boot/uboot-ar71xx/{src => files}/board/zyxel/nbg460n/Makefile (100%) rename package/boot/uboot-ar71xx/{src => files}/board/zyxel/nbg460n/config.mk (100%) rename package/boot/uboot-ar71xx/{src => files}/board/zyxel/nbg460n/lowlevel_init.S (100%) rename package/boot/uboot-ar71xx/{src => files}/board/zyxel/nbg460n/nbg460n.c (100%) rename package/boot/uboot-ar71xx/{src => files}/board/zyxel/nbg460n/u-boot.lds (100%) rename package/boot/uboot-ar71xx/{src => files}/cpu/mips/ar71xx_serial.c (100%) rename package/boot/uboot-ar71xx/{src => files}/drivers/net/ag71xx.c (100%) rename package/boot/uboot-ar71xx/{src => files}/drivers/net/ag71xx.h (100%) rename package/boot/uboot-ar71xx/{src => files}/drivers/net/phy/rtl8366.h (100%) rename package/boot/uboot-ar71xx/{src => files}/drivers/net/phy/rtl8366_mii.c (100%) rename package/boot/uboot-ar71xx/{src => files}/drivers/spi/ar71xx_spi.c (100%) rename package/boot/uboot-ar71xx/{src => files}/include/asm-mips/ar71xx.h (100%) rename package/boot/uboot-ar71xx/{src => files}/include/asm-mips/ar71xx_gpio.h (100%) rename package/boot/uboot-ar71xx/{src => files}/include/configs/nbg460n.h (100%) delete mode 100644 package/boot/uboot-envtools/files/pistachio delete mode 100644 package/boot/uboot-fritz4040/Makefile delete mode 100755 package/boot/uboot-fritz4040/files/upload-to-f4040.sh delete mode 100644 package/boot/uboot-fritz4040/patches/100-private-libgcc.patch delete mode 100644 package/boot/uboot-fritz4040/patches/110-portability.patch create mode 100644 package/boot/uboot-kirkwood/patches/0001-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch create mode 100644 package/boot/uboot-kirkwood/patches/0002-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch create mode 100644 package/boot/uboot-kirkwood/patches/0003-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch create mode 100644 package/boot/uboot-kirkwood/patches/0004-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch create mode 100644 package/boot/uboot-kirkwood/patches/0005-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch create mode 100644 package/boot/uboot-kirkwood/patches/0006-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch delete mode 100644 package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch delete mode 100644 package/boot/uboot-kirkwood/patches/008-nsa325-uboot-generic.patch delete mode 100644 package/boot/uboot-lantiq/patches/100-portability.patch create mode 100644 package/boot/uboot-layerscape-32b/Makefile delete mode 100644 package/boot/uboot-layerscape-armv8_32b/Makefile delete mode 100644 package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch delete mode 100644 package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch delete mode 100644 package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch delete mode 100644 package/boot/uboot-layerscape/patches/0004-armv8-ls1088ardb-add-LEDE-boot-support-in-environmen.patch delete mode 100644 package/boot/uboot-layerscape/patches/0005-armv8-ls2088ardb-add-LEDE-boot-support-in-environmen.patch delete mode 100644 package/boot/uboot-layerscape/patches/0006-armv8-ls1012afrdm-add-LEDE-boot-support-in-environme.patch delete mode 100644 package/boot/uboot-mvebu/patches/0001-clearfog-generate-random-MAC-address.patch delete mode 100644 package/boot/uboot-mvebu/patches/0003-clearfog-enable-distro-boot-code.patch delete mode 100644 package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch create mode 100644 package/boot/uboot-mvebu/patches/001-use-dtc-in-kernel.patch delete mode 100644 package/boot/uboot-mvebu/patches/0011-rsa-Fix-build-with-OpenSSL-1.1.x.patch delete mode 100644 package/boot/uboot-mvebu/patches/0012-tools-kwbimage-fix-build-with-OpenSSL-1.1.x.patch create mode 100644 package/boot/uboot-mvebu/patches/002-enable_random_mac_addr.patch create mode 100644 package/boot/uboot-mvebu/patches/003-boot_script.patch rename package/boot/uboot-mvebu/patches/{0002-clearfog-reset-usom-onboard-1512-phy.patch => 200-clearfog-reset-usom-onboard-1512-phy.patch} (81%) delete mode 100644 package/boot/uboot-omap/files/uEnv-default.txt create mode 100644 package/boot/uboot-omap/patches/001-backport_upstream_image_c_fix_non_android_booting.patch create mode 100644 package/boot/uboot-omap/patches/100-disable_thumb_unknown_errata.patch delete mode 100644 package/boot/uboot-omap/patches/101-disable-thumb-omap3.patch create mode 100644 package/boot/uboot-omap/patches/101-disable_ext.patch delete mode 100644 package/boot/uboot-omap/patches/102-minify-spl.patch delete mode 100644 package/boot/uboot-omap/patches/103-disable-fat-write-spl.patch delete mode 100644 package/boot/uboot-omap/patches/104-omap3-overo-enable-thumb.patch rename package/boot/uboot-oxnas/{src => files}/arch/arm/cpu/arm1136/nas782x/Makefile (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/cpu/arm1136/nas782x/clock.c (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/cpu/arm1136/nas782x/pinmux.c (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/cpu/arm1136/nas782x/reset.c (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/cpu/arm1136/nas782x/timer.c (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/include/asm/arch-nas782x/clock.h (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/include/asm/arch-nas782x/cpu.h (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/include/asm/arch-nas782x/hardware.h (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/include/asm/arch-nas782x/pinmux.h (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/include/asm/arch-nas782x/spl.h (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/include/asm/arch-nas782x/sysctl.h (100%) rename package/boot/uboot-oxnas/{src => files}/arch/arm/include/asm/arch-nas782x/timer.h (100%) rename package/boot/uboot-oxnas/{src => files}/board/ox820/Kconfig (100%) rename package/boot/uboot-oxnas/{src => files}/board/ox820/MAINTAINERS (100%) rename package/boot/uboot-oxnas/{src => files}/board/ox820/Makefile (100%) rename package/boot/uboot-oxnas/{src => files}/board/ox820/ddr.c (100%) rename package/boot/uboot-oxnas/{src => files}/board/ox820/ddr.h (100%) rename package/boot/uboot-oxnas/{src => files}/board/ox820/lowlevel_init.S (100%) rename package/boot/uboot-oxnas/{src => files}/board/ox820/ox820.c (100%) rename package/boot/uboot-oxnas/{src => files}/board/ox820/spl_start.S (100%) rename package/boot/uboot-oxnas/{src => files}/board/ox820/u-boot-spl.lds (100%) rename package/boot/uboot-oxnas/{src => files}/common/env_ext4.c (100%) rename package/boot/uboot-oxnas/{src => files}/common/spl/spl_block.c (100%) rename package/boot/uboot-oxnas/{src => files}/configs/ox820_defconfig (100%) rename package/boot/uboot-oxnas/{src => files}/drivers/block/plxsata_ide.c (100%) rename package/boot/uboot-oxnas/{src => files}/drivers/usb/host/ehci-oxnas.c (100%) rename package/boot/uboot-oxnas/{src => files}/include/configs/ox820.h (100%) rename package/boot/uboot-oxnas/{src => files}/tools/mkox820crc.c (100%) create mode 100644 package/boot/uboot-pxa/Makefile create mode 100644 package/boot/uboot-pxa/patches/001-squashfs_rootfstype_cmdline.patch create mode 100644 package/boot/uboot-sunxi/patches/001-use-dtc-in-kernel.patch create mode 100644 package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch create mode 100644 package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch create mode 100644 package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch create mode 100644 package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch create mode 100644 package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch create mode 100644 package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch create mode 100644 package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch create mode 100644 package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch create mode 100644 package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch create mode 100644 package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch create mode 100644 package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch delete mode 100644 package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch delete mode 100644 package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch delete mode 100644 package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch delete mode 100644 package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch delete mode 100644 package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch delete mode 100644 package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch delete mode 100644 package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch delete mode 100644 package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch delete mode 100644 package/boot/uboot-sunxi/patches/300-sunxi-add-device-tree-for-Orange-Pi-R1-board.patch delete mode 100644 package/boot/uboot-sunxi/patches/301-sunxi-add-orangepi-R1-defconfig.patch delete mode 100644 package/boot/uboot-sunxi/patches/302-sunxi-Fix-CONFIG_SUNXI_GMAC-references.patch delete mode 100644 package/boot/uboot-sunxi/uEnv-a64.txt delete mode 100644 package/devel/gdb/patches/110-shared_libgcc.patch delete mode 100644 package/devel/gdb/patches/120-sigprocmask-invalid-call.patch rename package/libs/{wolfssl => cyassl}/Config.in (63%) rename package/libs/{wolfssl => cyassl}/Makefile (69%) rename package/libs/{wolfssl => cyassl}/patches/001-CVE-2017-13099.patch (100%) rename package/libs/{wolfssl => cyassl}/patches/400-additional_compatibility.patch (100%) create mode 100644 package/libs/libnl/patches/0001-lib-Escape-usage-of-strerror_l-if-it-doesn-t-exist-i.patch delete mode 100644 package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch delete mode 100644 package/libs/libnl/patches/101-add-musl-workaround-to-the-libc-compat.h-copy.patch delete mode 100644 package/libs/libnl/patches/102-revert-build-enable-building-cli-during-tests.patch rename package/libs/{readline => libreadline}/Makefile (95%) rename package/libs/{readline => libreadline}/patches/001-install_perm.patch (100%) delete mode 100644 package/libs/nghttp2/Makefile delete mode 100644 package/libs/wolfssl/patches/100-disable-hardening-check.patch delete mode 100644 package/network/config/ltq-adsl-app/files/10-adsl_rename delete mode 100755 package/network/config/ltq-adsl-app/files/10_atm.sh delete mode 100755 package/network/config/ltq-adsl-app/files/10_ptm.sh delete mode 100644 package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch delete mode 100644 package/network/config/ltq-vdsl-app/files/10-xdsl_rename delete mode 100755 package/network/config/ltq-vdsl-app/files/10_atm.sh delete mode 100755 package/network/config/ltq-vdsl-app/files/10_ptm.sh create mode 100644 package/network/config/ltq-vdsl-app/files/vdsl_cpe_control_wrapper delete mode 100644 package/network/config/vxlan/Makefile delete mode 100755 package/network/config/vxlan/files/vxlan.sh delete mode 100755 package/network/services/dnsmasq/files/dhcp-script.sh delete mode 100644 package/network/services/dnsmasq/files/dnsmasq_acl.json delete mode 100644 package/network/services/dnsmasq/files/rfc6761.conf delete mode 100644 package/network/services/dnsmasq/patches/240-ubus.patch create mode 100644 package/network/services/hostapd/patches/001-Fix-race-condition-between-AssocResp-callback-and-4a.patch create mode 100644 package/network/services/hostapd/patches/002-Fix-duplicate-Reassociation-Request-frame-dropping.patch create mode 100644 package/network/services/hostapd/patches/003-RSN-IBSS-Fix-TK-clearing-on-Authentication-frame-RX.patch create mode 100644 package/network/services/hostapd/patches/004-hostapd-Add-possibility-to-send-debug-messages-to-sy.patch rename package/network/services/hostapd/patches/{000-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch => 005-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch} (84%) rename package/network/services/hostapd/patches/{001-Prevent-reinstallation-of-an-already-in-use-group-ke.patch => 006-Prevent-reinstallation-of-an-already-in-use-group-ke.patch} (91%) rename package/network/services/hostapd/patches/{002-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch => 007-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch} (84%) rename package/network/services/hostapd/patches/{003-Prevent-installation-of-an-all-zero-TK.patch => 008-Prevent-installation-of-an-all-zero-TK.patch} (76%) rename package/network/services/hostapd/patches/{004-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch => 009-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch} (94%) rename package/network/services/hostapd/patches/{005-TDLS-Reject-TPK-TK-reconfiguration.patch => 010-TDLS-Reject-TPK-TK-reconfiguration.patch} (97%) rename package/network/services/hostapd/patches/{006-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch => 011-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch} (100%) rename package/network/services/hostapd/patches/{007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch => 012-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch} (84%) create mode 100644 package/network/services/hostapd/patches/013-Add-hostapd-options-wpa_group_update_count-and-wpa_p.patch rename package/network/services/hostapd/patches/{008-WPA-Extra-defense-against-PTK-reinstalls-in-4-way-ha.patch => 014-WPA-Extra-defense-against-PTK-reinstalls-in-4-way-ha.patch} (100%) rename package/network/services/hostapd/patches/{009-Clear-PMK-length-and-check-for-this-when-deriving-PT.patch => 015-Clear-PMK-length-and-check-for-this-when-deriving-PT.patch} (100%) rename package/network/services/hostapd/patches/{010-Optional-AP-side-workaround-for-key-reinstallation-a.patch => 016-Optional-AP-side-workaround-for-key-reinstallation-a.patch} (90%) rename package/network/services/hostapd/patches/{011-Additional-consistentcy-checks-for-PTK-component-len.patch => 017-Additional-consistentcy-checks-for-PTK-component-len.patch} (81%) rename package/network/services/hostapd/patches/{012-Clear-BSSID-information-in-supplicant-state-machine-.patch => 018-Clear-BSSID-information-in-supplicant-state-machine-.patch} (100%) rename package/network/services/hostapd/patches/{013-WNM-Ignore-WNM-Sleep-Mode-Request-in-wnm_sleep_mode-.patch => 019-WNM-Ignore-WNM-Sleep-Mode-Request-in-wnm_sleep_mode-.patch} (100%) create mode 100644 package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch delete mode 100644 package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch create mode 100644 package/network/services/ipset-dns/patches/100-simultaneous-ipv4-ipv6.patch create mode 100644 package/network/services/openvpn-easy-rsa/files/easy-rsa.index create mode 100644 package/network/services/openvpn-easy-rsa/files/easy-rsa.serial delete mode 100644 package/network/services/openvpn-easy-rsa/files/openvpn-easy-rsa.upgrade create mode 100644 package/network/services/openvpn-easy-rsa/patches/100-run-ootb.patch delete mode 100644 package/network/services/ppp/patches/511-syncppp.patch delete mode 100644 package/network/services/shellsync/Makefile delete mode 100644 package/network/services/shellsync/src/shellsync.c delete mode 100644 package/network/utils/adb-enablemodem/Makefile delete mode 100644 package/network/utils/adb-enablemodem/files/adb-enablemodem create mode 100644 package/network/utils/curl/patches/001-curl-https-openssl-fix.patch create mode 100644 package/network/utils/curl/patches/100-CVE-2017-2629.patch create mode 100644 package/network/utils/curl/patches/101-CVE-2017-7407.patch create mode 100644 package/network/utils/curl/patches/102-CVE-2017-7468.patch create mode 100644 package/network/utils/curl/patches/103-CVE-2017-1000100.patch create mode 100644 package/network/utils/curl/patches/104-CVE-2017-1000101.patch create mode 100644 package/network/utils/curl/patches/105-CVE-2017-8816.patch create mode 100644 package/network/utils/curl/patches/106-CVE-2017-8817.patch delete mode 100644 package/network/utils/iperf3/patches/010-iperf-3.3-fix-build-warnings.patch delete mode 100644 package/network/utils/iproute2/patches/009-keep_libmnl_optional.patch create mode 100644 package/network/utils/iproute2/patches/010-type_fixes.patch create mode 100644 package/network/utils/iproute2/patches/130-missing_include.patch delete mode 100644 package/network/utils/iproute2/patches/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch delete mode 100644 package/network/utils/iproute2/patches/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch create mode 100644 package/network/utils/iproute2/patches/910-sanitize_headers_for_musl.patch create mode 100644 package/network/utils/iproute2/patches/911-fix_in_h_include.patch create mode 100644 package/network/utils/iproute2/patches/960-ipmonitor-fix-ip-monitor-can-t-work-when-NET_NS-is-n.patch delete mode 100644 package/network/utils/ipset/patches/001-Replace-the-last-reference-to-u_int8_t-with-uint8_t.patch create mode 100644 package/network/utils/iptables/patches/030-no-libnfnetlink.patch create mode 100644 package/network/utils/iptables/patches/100-bash-location.patch create mode 100644 package/network/utils/iptables/patches/300-musl_fixes.patch delete mode 100644 package/network/utils/layerscape/restool/Makefile delete mode 100644 package/network/utils/layerscape/restool/patches/0001-scripts-move-shebang-on-the-first-line.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0002-dprc-add-full-path-option-to-dprc-list-command.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0003-scripts-remove-unnecessary-arrays.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0004-scripts-use-restool-full-path-option.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0005-scripts-use-proper-arithmetic-operation-syntax.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0006-scripts-use-strings-instead-of-arrays.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0007-scripts-use-Bourne-shell-s-pattern-matching.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0008-scripts-use-Bourne-shell-instead-of-bash.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0009-scripts-workaround-for-a-improper-sed-substitution-T.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0010-scripts-use-proper-arithmetic-operations.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0011-scripts-do-not-compare-strings-with-regexp-expressio.patch delete mode 100644 package/network/utils/layerscape/restool/patches/0012-scripts-replace-nproc-with-cross-platform-implementa.patch delete mode 100644 package/network/utils/nftables/patches/101-nftables-statement-fix-print-of-ip-dnat-address.patch delete mode 100644 package/network/utils/wpan-tools/patches/001-src-nl_extras.h-fix-compatibility-with-libnl-3.3.0.patch delete mode 100755 package/system/fstools/files/blockd.init create mode 100644 package/system/mountd/Makefile create mode 100644 package/system/mountd/files/mountd.config create mode 100755 package/system/mountd/files/mountd.init create mode 100644 package/system/procd/files/nand-preinit.sh rename package/{base-files/files/lib/upgrade => system/procd/files}/nand.sh (79%) create mode 100644 package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch create mode 100644 package/utils/busybox/patches/102-trylink_mktemp_fix.patch create mode 100644 package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch create mode 100644 package/utils/busybox/patches/302-ip-rule-add-suppress-prefixlength.patch create mode 100644 package/utils/busybox/patches/302-netlink-alignment.patch create mode 100644 package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch create mode 100644 package/utils/busybox/patches/401-vi-don-t-touch-file-with-x-when-modified_count-0.patch create mode 100644 package/utils/busybox/patches/402-vi-avoid-touching-a-new-file-with-ZZ-when-no-editing.patch delete mode 100644 package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch delete mode 100644 package/utils/busybox/patches/510-move-passwd-applet-to-bin.patch delete mode 100644 package/utils/busybox/patches/600-cve-2017-16544.patch create mode 100644 package/utils/f2fs-tools/patches/100-f2fs-WARNING-at-fs-f2fs-segment.c-718-update_sit_ent.patch delete mode 100644 package/utils/fritz-tools/Makefile delete mode 100644 package/utils/fritz-tools/README.md delete mode 100644 package/utils/fritz-tools/src/CMakeLists.txt delete mode 100644 package/utils/fritz-tools/src/fritz_cal_extract.c delete mode 100644 package/utils/fritz-tools/src/fritz_tffs_read.c create mode 100644 package/utils/util-linux/patches/001-uclibc_add_libm_to_scriptreplay.patch delete mode 100644 package/utils/util-linux/patches/100-use_urandom.patch create mode 100644 package/utils/xfsprogs/patches/001-automake-compat.patch delete mode 100644 package/utils/xfsprogs/patches/100-no-selftest.patch create mode 100644 package/utils/xfsprogs/patches/100-no_aio.patch delete mode 100644 package/utils/xfsprogs/patches/110-subdirs.patch create mode 100644 package/utils/xfsprogs/patches/110-uclibc_no_ustat.patch delete mode 100644 package/utils/xfsprogs/patches/120-disable_assert.patch create mode 100644 package/utils/xfsprogs/patches/120-portability.patch create mode 100644 package/utils/xfsprogs/patches/130-uclibc_no_xattr.patch create mode 100644 package/utils/xfsprogs/patches/140-no_po.patch create mode 100644 package/utils/xfsprogs/patches/150-include_fixes.patch create mode 100644 package/utils/xfsprogs/patches/160-format-security.patch diff --git a/feeds.conf.default b/feeds.conf.default index 040dbdc55..2327d961e 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,7 +1,7 @@ -src-git packages https://git.lede-project.org/feed/packages.git -src-git luci https://git.lede-project.org/project/luci.git -src-git routing https://git.lede-project.org/feed/routing.git -src-git telephony https://git.lede-project.org/feed/telephony.git +src-git packages https://git.lede-project.org/feed/packages.git;lede-17.01 +src-git luci https://git.lede-project.org/project/luci.git;lede-17.01 +src-git routing https://git.lede-project.org/feed/routing.git;lede-17.01 +src-git telephony https://git.lede-project.org/feed/telephony.git;lede-17.01 #src-git video https://github.com/openwrt/video.git #src-git targets https://github.com/openwrt/targets.git #src-git management https://github.com/openwrt-management/packages.git diff --git a/include/target.mk b/include/target.mk index 40fa7c15c..5decd771f 100644 --- a/include/target.mk +++ b/include/target.mk @@ -13,7 +13,7 @@ __target_inc=1 DEVICE_TYPE?=router # Default packages - the really basic set -DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd \ +DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd ip-full \ iptables-mod-nat-extra kmod-nf-nathelper kmod-nf-nathelper-extra kmod-macvlan block-mount automount \ default-settings ipset-lists luci luci-app-ddns luci-app-sqm luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \ luci-app-filetransfer luci-app-shadowsocksr-pro luci-app-usb-printer luci-app-vsftpd \ diff --git a/package/Makefile b/package/Makefile index 4fdf41504..cc1e9d4b6 100644 --- a/package/Makefile +++ b/package/Makefile @@ -10,8 +10,8 @@ curdir:=package include $(INCLUDE_DIR)/rootfs.mk -include $(TMP_DIR)/.packagedeps -$(curdir)/autoremove:=1 $(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m)) +$(curdir)/builddirs-install:=. $(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m)) $(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m)) ifdef CHECK_ALL @@ -56,14 +56,10 @@ $(curdir)/merge: $(curdir)/merge-index: $(curdir)/merge (cd $(PACKAGE_DIR_ALL) && $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages; ) -ifndef SDK - $(curdir)/compile: $(curdir)/system/opkg/host/compile -endif - -$(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index) +$(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/compile $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index) - find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755 rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG) - mkdir -p $(TARGET_DIR)/tmp + [ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp $(call opkg,$(TARGET_DIR)) install \ $(call opkg_package_files,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null)) @for file in $(PACKAGE_INSTALL_FILES); do \ diff --git a/package/base-files/Makefile b/package/base-files/Makefile index a7cc4ca48..3fcf20a84 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -9,10 +9,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/version.mk -include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=181 +PKG_RELEASE:=173.3 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ @@ -20,14 +19,7 @@ PKG_BUILD_DEPENDS:=usign/host PKG_LICENSE:=GPL-2.0 # Extend depends from version.mk -PKG_CONFIG_DEPENDS += \ - CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \ - CONFIG_NAND_SUPPORT \ - CONFIG_CLEAN_IPKG \ - CONFIG_PER_FEED_REPO \ - CONFIG_PER_FEED_REPO_ADD_DISABLED \ - CONFIG_PER_FEED_REPO_ADD_COMMENTED \ - $(foreach feed,$(FEEDS_INSTALLED),CONFIG_FEED_$(feed)) +PKG_CONFIG_DEPENDS += CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE include $(INCLUDE_DIR)/package.mk @@ -39,8 +31,8 @@ endif define Package/base-files SECTION:=base CATEGORY:=Base system - DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool - TITLE:=Base filesystem for OpenWrt + DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +fstools +fwtool + TITLE:=Base filesystem for Lede URL:=http://openwrt.org/ VERSION:=$(PKG_RELEASE)-$(REVISION) endef @@ -115,16 +107,9 @@ ifdef CONFIG_SIGNED_PACKAGES endef endif -ifeq ($(CONFIG_NAND_SUPPORT),) - define Package/base-files/nand-support - rm -f $(1)/lib/upgrade/nand.sh - endef -endif - define Package/base-files/install $(CP) ./files/* $(1)/ $(Package/base-files/install-key) - $(Package/base-files/nand-support) if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \ $(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \ fi @@ -186,15 +171,6 @@ define Package/base-files/install echo "$$$${conffile##$(1)}" >> $(1)/CONTROL/conffiles; \ fi \ done - - $(if $(CONFIG_INCLUDE_CONFIG), \ - echo -e "# Build configuration for board $(BOARD)/$(SUBTARGET)/$(PROFILE)\n" >$(1)/etc/build.config; \ - cat $(BIN_DIR)/config.seed >>$(1)/etc/build.config) - - $(if $(CONFIG_CLEAN_IPKG),, \ - mkdir -p $(1)/etc/opkg; \ - $(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \ - $(VERSION_SED) $(1)/etc/opkg/distfeeds.conf) endef ifneq ($(DUMP),1) diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index bbed567de..a8311fc59 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -223,7 +223,7 @@ generate_static_system() { uci -q batch <<-EOF delete system.@system[0] add system system - set system.@system[-1].hostname='OpenWrt' + set system.@system[-1].hostname='LEDE' set system.@system[-1].timezone='UTC' set system.@system[-1].ttylogin='0' set system.@system[-1].log_size='64' @@ -233,10 +233,10 @@ generate_static_system() { set system.ntp='timeserver' set system.ntp.enabled='1' set system.ntp.enable_server='0' - add_list system.ntp.server='0.openwrt.pool.ntp.org' - add_list system.ntp.server='1.openwrt.pool.ntp.org' - add_list system.ntp.server='2.openwrt.pool.ntp.org' - add_list system.ntp.server='3.openwrt.pool.ntp.org' + add_list system.ntp.server='0.lede.pool.ntp.org' + add_list system.ntp.server='1.lede.pool.ntp.org' + add_list system.ntp.server='2.lede.pool.ntp.org' + add_list system.ntp.server='3.lede.pool.ntp.org' EOF if json_is_a system object; then diff --git a/package/base-files/files/etc/group b/package/base-files/files/etc/group index e8e2adf4a..d36685139 100644 --- a/package/base-files/files/etc/group +++ b/package/base-files/files/etc/group @@ -1,7 +1,6 @@ root:x:0: daemon:x:1: adm:x:4: -tty:x:5: mail:x:8: audio:x:29: www-data:x:33: diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index c790e3e18..7c2a18501 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -72,7 +72,6 @@ load_led() { [ -n "$dev" ] && { echo $dev > /sys/class/leds/${sysfs}/device_name echo $mode > /sys/class/leds/${sysfs}/mode - echo $interval > /sys/class/leds/${sysfs}/interval } ;; diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system index 531aa8cbc..8c5f67729 100755 --- a/package/base-files/files/etc/init.d/system +++ b/package/base-files/files/etc/init.d/system @@ -7,7 +7,7 @@ USE_PROCD=1 validate_system_section() { uci_validate_section system system "${1}" \ - 'hostname:string:OpenWrt' \ + 'hostname:string:lede' \ 'conloglevel:uinteger' \ 'buffersize:uinteger' \ 'timezone:string:UTC' \ diff --git a/package/base-files/files/etc/openwrt_release b/package/base-files/files/etc/openwrt_release index d03400ca0..da86208f7 100644 --- a/package/base-files/files/etc/openwrt_release +++ b/package/base-files/files/etc/openwrt_release @@ -1,7 +1,8 @@ DISTRIB_ID='%D' DISTRIB_RELEASE='%V' DISTRIB_REVISION='%R' +DISTRIB_CODENAME='%n' DISTRIB_TARGET='%S' DISTRIB_ARCH='%A' -DISTRIB_DESCRIPTION='%D %V %C' +DISTRIB_DESCRIPTION='%D %N %V %C' DISTRIB_TAINTS='%t' diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index 3e237170b..e80af891e 100755 --- a/package/base-files/files/etc/rc.common +++ b/package/base-files/files/etc/rc.common @@ -41,15 +41,14 @@ disable() { } enable() { - err=1 name="$(basename "${initscript}")" - [ "$START" ] && \ - ln -sf "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" && \ - err=0 - [ "$STOP" ] && \ - ln -sf "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}" && \ - err=0 - return $err + disable + [ -n "$START" -o -n "$STOP" ] || { + echo "/etc/init.d/$name does not have a START or STOP value" + return 1 + } + [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" + [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}" } enabled() { @@ -89,10 +88,6 @@ service_triggers() { return 0 } -service_data() { - return 0 -} - service_running() { return 0 } @@ -127,14 +122,12 @@ ${INIT_TRACE:+set -x} } stop() { - procd_lock stop_service "$@" procd_kill "$(basename ${basescript:-$initscript})" "$1" } reload() { if eval "type reload_service" 2>/dev/null >/dev/null; then - procd_lock reload_service "$@" else start diff --git a/package/base-files/files/etc/sysctl.conf b/package/base-files/files/etc/sysctl.conf index ddc7a9bf6..91a3ac9a0 100644 --- a/package/base-files/files/etc/sysctl.conf +++ b/package/base-files/files/etc/sysctl.conf @@ -1,6 +1,5 @@ kernel.panic=3 kernel.core_pattern=/tmp/%e.%t.%p.%s.core -fs.suid_dumpable=2 net.ipv4.conf.default.arp_ignore=1 net.ipv4.conf.all.arp_ignore=1 diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index dfadfdb2d..bea5f0f96 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -202,7 +202,7 @@ add_group_and_user() { if [ -n "$gname" ] && [ -n "$gid" ]; then group_exists "$gname" || group_add "$gname" "$gid" elif [ -n "$gname" ]; then - gid="$(group_add_next "$gname")" + group_add_next "$gname"; gid=$? fi if [ -n "$uname" ]; then @@ -235,10 +235,6 @@ default_postinst() { rm -fR $root/rootfs-overlay/ fi - if [ -z "$root" ] && grep -q -s "^/etc/modules.d/" "/usr/lib/opkg/info/${pkgname}.list"; then - kmodloader - fi - if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"; then . /lib/functions/system.sh [ -d /tmp/.uci ] || mkdir -p /tmp/.uci @@ -296,7 +292,9 @@ group_add() { [ -f "${IPKG_INSTROOT}/etc/group" ] || return 1 [ -n "$IPKG_INSTROOT" ] || lock /var/lock/group echo "${name}:x:${gid}:" >> ${IPKG_INSTROOT}/etc/group + rc=$? [ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/group + return $rc } group_exists() { @@ -306,17 +304,14 @@ group_exists() { group_add_next() { local gid gids gid=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group | cut -d: -f3) - if [ -n "$gid" ]; then - echo $gid - return - fi + [ -n "$gid" ] && return $gid gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3) - gid=65536 - while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do + gid=100 + while [ -n "$(echo $gids | grep $gid)" ] ; do gid=$((gid + 1)) done group_add $1 $gid - echo $gid + return $gid } group_add_user() { @@ -339,8 +334,8 @@ user_add() { local rc [ -z "$uid" ] && { uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3) - uid=65536 - while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do + uid=100 + while [ -n "$(echo $uids | grep $uid)" ] ; do uid=$((uid + 1)) done } @@ -349,7 +344,9 @@ user_add() { [ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd echo "${name}:x:${uid}:${gid}:${desc}:${home}:${shell}" >> ${IPKG_INSTROOT}/etc/passwd echo "${name}:x:0:0:99999:7:::" >> ${IPKG_INSTROOT}/etc/shadow + rc=$? [ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd + return $rc } user_exists() { diff --git a/package/base-files/files/lib/functions/leds.sh b/package/base-files/files/lib/functions/leds.sh index 83e775fad..857e7e539 100644 --- a/package/base-files/files/lib/functions/leds.sh +++ b/package/base-files/files/lib/functions/leds.sh @@ -1,18 +1,6 @@ #!/bin/sh # Copyright (C) 2013 OpenWrt.org -get_dt_led() { - local label - local ledpath - local basepath="/proc/device-tree" - local nodepath="$basepath/aliases/led-$1" - - [ -f "$nodepath" ] && ledpath=$(cat "$nodepath") - [ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label") - - echo "$label" -} - led_set_attr() { [ -f "/sys/class/leds/$1/$2" ] && echo "$3" > "/sys/class/leds/$1/$2" } diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 82ac1d2a4..7cc63ffc8 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -160,7 +160,7 @@ _ucidef_finish_switch_roles() { json_select .. json_select .. - if [ ${need_tag:-0} -eq 1 -o ${want_untag:-0} -ne 1 ]; then + if [ $n_vlan -gt $n_cpu -o ${need_tag:-0} -eq 1 ]; then num="${num}t" device="${device}.${index}" fi @@ -358,59 +358,19 @@ ucidef_add_vdsl_modem() { json_select .. } -ucidef_set_led_ataport() { - _ucidef_set_led_trigger "$1" "$2" "$3" ata"$4" -} - -_ucidef_set_led_common() { +ucidef_set_led_netdev() { local cfg="led_$1" local name="$2" local sysfs="$3" + local dev="$4" + local mode="${5:-link tx rx}" json_select_object led json_select_object "$1" json_add_string name "$name" - json_add_string sysfs "$sysfs" -} - -ucidef_set_led_default() { - local default="$4" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string default "$default" - json_select .. - - json_select .. -} - -ucidef_set_led_gpio() { - local gpio="$4" - local inverted="$5" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string trigger "$trigger" - json_add_string type gpio - json_add_int gpio "$gpio" - json_add_boolean inverted "$inverted" - json_select .. - - json_select .. -} - -ucidef_set_led_ide() { - _ucidef_set_led_trigger "$1" "$2" "$3" ide-disk -} - -ucidef_set_led_netdev() { - local dev="$4" - local mode="${5:-link tx rx}" - - _ucidef_set_led_common "$1" "$2" "$3" - json_add_string type netdev + json_add_string sysfs "$sysfs" json_add_string device "$dev" json_add_string mode "$mode" json_select .. @@ -418,106 +378,24 @@ ucidef_set_led_netdev() { json_select .. } -ucidef_set_led_oneshot() { - _ucidef_set_led_timer $1 $2 $3 "oneshot" $4 $5 -} - -ucidef_set_led_portstate() { - local port_state="$4" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string trigger port_state - json_add_string type portstate - json_add_string port_state "$port_state" - json_select .. - - json_select .. -} - -ucidef_set_led_rssi() { - local iface="$4" - local minq="$5" - local maxq="$6" - local offset="${7:-0}" - local factor="${8:-1}" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string type rssi - json_add_string name "$name" - json_add_string iface "$iface" - json_add_string minq "$minq" - json_add_string maxq "$maxq" - json_add_string offset "$offset" - json_add_string factor "$factor" - json_select .. - - json_select .. -} - -ucidef_set_led_switch() { - local trigger_name="$4" - local port_mask="$5" - local speed_mask="$6" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string trigger "$trigger_name" - json_add_string type switch - json_add_string port_mask "$port_mask" - json_add_string speed_mask "$speed_mask" - json_select .. - - json_select .. -} - -_ucidef_set_led_timer() { - local trigger_name="$4" - local delayon="$5" - local delayoff="$6" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string trigger "$trigger_name" - json_add_int delayon "$delayon" - json_add_int delayoff "$delayoff" - json_select .. - - json_select .. -} - -ucidef_set_led_timer() { - _ucidef_set_led_timer $1 $2 $3 "timer" $4 $5 -} - -_ucidef_set_led_trigger() { - local trigger_name="$4" - - _ucidef_set_led_common "$1" "$2" "$3" - - json_add_string trigger "$trigger_name" - json_select .. - - json_select .. -} - ucidef_set_led_usbdev() { + local cfg="led_$1" + local name="$2" + local sysfs="$3" local dev="$4" - _ucidef_set_led_common "$1" "$2" "$3" + json_select_object led + json_select_object "$1" + json_add_string name "$name" json_add_string type usb + json_add_string sysfs "$sysfs" json_add_string device "$dev" json_select .. json_select .. } -ucidef_set_led_usbhost() { - _ucidef_set_led_trigger "$1" "$2" "$3" usb-host -} - ucidef_set_led_usbport() { local obj="$1" local name="$2" @@ -526,9 +404,12 @@ ucidef_set_led_usbport() { shift shift - _ucidef_set_led_common "$obj" "$name" "$sysfs" + json_select_object led + json_select_object "$obj" + json_add_string name "$name" json_add_string type usbport + json_add_string sysfs "$sysfs" json_select_array ports for port in "$@"; do json_add_string port "$port" @@ -540,7 +421,171 @@ ucidef_set_led_usbport() { } ucidef_set_led_wlan() { - _ucidef_set_led_trigger "$1" "$2" "$3" "$4" + local cfg="led_$1" + local name="$2" + local sysfs="$3" + local trigger="$4" + + json_select_object led + + json_select_object "$1" + json_add_string name "$name" + json_add_string type trigger + json_add_string sysfs "$sysfs" + json_add_string trigger "$trigger" + json_select .. + + json_select .. +} + +ucidef_set_led_switch() { + local cfg="led_$1" + local name="$2" + local sysfs="$3" + local trigger="$4" + local port_mask="$5" + local speed_mask="$6" + + json_select_object led + + json_select_object "$1" + json_add_string name "$name" + json_add_string type switch + json_add_string sysfs "$sysfs" + json_add_string trigger "$trigger" + json_add_string port_mask "$port_mask" + json_add_string speed_mask "$speed_mask" + json_select .. + + json_select .. +} + +ucidef_set_led_portstate() { + local cfg="led_$1" + local name="$2" + local sysfs="$3" + local port_state="$4" + + json_select_object led + + json_select_object "$1" + json_add_string name "$name" + json_add_string type portstate + json_add_string sysfs "$sysfs" + json_add_string trigger port_state + json_add_string port_state "$port_state" + json_select .. + + json_select .. +} + +ucidef_set_led_default() { + local cfg="led_$1" + local name="$2" + local sysfs="$3" + local default="$4" + + json_select_object led + + json_select_object "$1" + json_add_string name "$name" + json_add_string sysfs "$sysfs" + json_add_string default "$default" + json_select .. + + json_select .. +} + +ucidef_set_led_gpio() { + local cfg="led_$1" + local name="$2" + local sysfs="$3" + local gpio="$4" + local inverted="$5" + + json_select_object led + + json_select_object "$1" + json_add_string type gpio + json_add_string name "$name" + json_add_string sysfs "$sysfs" + json_add_string trigger "$trigger" + json_add_int gpio "$gpio" + json_add_boolean inverted "$inverted" + json_select .. + + json_select .. +} + +ucidef_set_led_ide() { + local cfg="led_$1" + local name="$2" + local sysfs="$3" + + json_select_object led + + json_select_object "$1" + json_add_string name "$name" + json_add_string sysfs "$sysfs" + json_add_string trigger ide-disk + json_select .. + + json_select .. +} + +__ucidef_set_led_timer() { + local cfg="led_$1" + local name="$2" + local sysfs="$3" + local trigger="$4" + local delayon="$5" + local delayoff="$6" + + json_select_object led + + json_select_object "$1" + json_add_string type "$trigger" + json_add_string name "$name" + json_add_string sysfs "$sysfs" + json_add_int delayon "$delayon" + json_add_int delayoff "$delayoff" + json_select .. + + json_select .. +} + +ucidef_set_led_oneshot() { + __ucidef_set_led_timer $1 $2 $3 "oneshot" $4 $5 +} + +ucidef_set_led_timer() { + __ucidef_set_led_timer $1 $2 $3 "timer" $4 $5 +} + +ucidef_set_led_rssi() { + local cfg="led_$1" + local name="$2" + local sysfs="$3" + local iface="$4" + local minq="$5" + local maxq="$6" + local offset="$7" + local factor="$8" + + json_select_object led + + json_select_object "$1" + json_add_string type rssi + json_add_string name "$name" + json_add_string iface "$iface" + json_add_string sysfs "$sysfs" + json_add_string minq "$minq" + json_add_string maxq "$maxq" + json_add_string offset "$offset" + json_add_string factor "$factor" + json_select .. + + json_select .. } ucidef_set_rssimon() { @@ -556,6 +601,7 @@ ucidef_set_rssimon() { json_select .. json_select .. + } ucidef_add_gpio_switch() { diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit index c3ec7bfdf..5442a749b 100644 --- a/package/base-files/files/lib/preinit/10_indicate_preinit +++ b/package/base-files/files/lib/preinit/10_indicate_preinit @@ -113,7 +113,7 @@ preinit_ip() { preinit_config_board fi - preinit_net_echo "Doing OpenWrt Preinit\n" + preinit_net_echo "Doing Lede Preinit\n" } preinit_ip_deconfig() { diff --git a/package/base-files/files/lib/preinit/02_sysinfo b/package/base-files/files/lib/preinit/10_sysinfo similarity index 100% rename from package/base-files/files/lib/preinit/02_sysinfo rename to package/base-files/files/lib/preinit/10_sysinfo diff --git a/package/base-files/files/lib/preinit/40_run_failsafe_hook b/package/base-files/files/lib/preinit/40_run_failsafe_hook index 533b0a977..7301f7734 100644 --- a/package/base-files/files/lib/preinit/40_run_failsafe_hook +++ b/package/base-files/files/lib/preinit/40_run_failsafe_hook @@ -5,12 +5,8 @@ run_failsafe_hook() { [ "$pi_preinit_no_failsafe" = "y" ] && return if [ "$FAILSAFE" = "true" ]; then - lock /tmp/.failsafe boot_run_hook failsafe - while [ ! -e /tmp/sysupgrade ]; do - lock -w /tmp/.failsafe - done - exit + lock -w /tmp/.failsafe fi } diff --git a/package/base-files/files/lib/preinit/99_10_failsafe_login b/package/base-files/files/lib/preinit/99_10_failsafe_login index 728c63b2e..3147cdc5a 100644 --- a/package/base-files/files/lib/preinit/99_10_failsafe_login +++ b/package/base-files/files/lib/preinit/99_10_failsafe_login @@ -8,13 +8,10 @@ failsafe_netlogin () { } failsafe_shell() { - local console="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | head -1 | sed -e 's/^console=//' -e 's/,.*//')" - [ -n "$console" ] || console=console - [ -c "/dev/$console" ] || return 0 - while true; do - ash --login <"/dev/$console" >"/dev/$console" 2>"/dev/$console" - sleep 1 - done & + lock /tmp/.failsafe + ash --login + echo "Please reboot system when done with failsafe network logins" + while true; do sleep 1; done } boot_hook_add failsafe failsafe_netlogin diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 71cffc858..3ddd1e746 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -6,33 +6,143 @@ RAM_ROOT=/tmp/root libs() { ldd $* 2>/dev/null | sed -r 's/(.* => )?(.*) .*/\2/'; } install_file() { # [ ... ] - local target dest dir for file in "$@"; do - if [ -L "$file" ]; then - target="$(readlink -f "$file")" - dest="$RAM_ROOT/$file" - [ ! -f "$dest" ] && { - dir="$(dirname "$dest")" - mkdir -p "$dir" - ln -s "$target" "$dest" - } - file="$target" - fi dest="$RAM_ROOT/$file" - [ -f "$file" -a ! -f "$dest" ] && { - dir="$(dirname "$dest")" + [ -f $file -a ! -f $dest ] && { + dir="$(dirname $dest)" mkdir -p "$dir" - cp "$file" "$dest" + cp $file $dest } done } -install_bin() { - local src files +install_bin() { # [ ... ] src=$1 files=$1 [ -x "$src" ] && files="$src $(libs $src)" install_file $files + shift + for link in "$@"; do { + dest="$RAM_ROOT/$link" + dir="$(dirname $dest)" + mkdir -p "$dir" + [ -f "$dest" ] || ln -s $src $dest + }; done +} + +supivot() { # + /bin/mount | grep "on $1 type" 2>&- 1>&- || /bin/mount -o bind $1 $1 + mkdir -p $1$2 $1/proc $1/sys $1/dev $1/tmp $1/overlay && \ + /bin/mount -o noatime,move /proc $1/proc && \ + pivot_root $1 $1$2 || { + /bin/umount -l $1 $1 + return 1 + } + + /bin/mount -o noatime,move $2/sys /sys + /bin/mount -o noatime,move $2/dev /dev + /bin/mount -o noatime,move $2/tmp /tmp + /bin/mount -o noatime,move $2/overlay /overlay 2>&- + return 0 +} + +run_ramfs() { # [...] + install_bin /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount \ + /sbin/pivot_root /sbin/reboot /bin/sync /bin/dd /bin/grep \ + /bin/cp /bin/mv /bin/tar /usr/bin/md5sum "/usr/bin/[" /bin/dd \ + /bin/vi /bin/ls /bin/cat /usr/bin/awk /usr/bin/hexdump \ + /bin/sleep /bin/zcat /usr/bin/bzcat /usr/bin/printf /usr/bin/wc \ + /bin/cut /usr/bin/printf /bin/sync /bin/mkdir /bin/rmdir \ + /bin/rm /usr/bin/basename /bin/kill /bin/chmod /usr/bin/find \ + /bin/mknod + + install_bin /bin/uclient-fetch /bin/wget + install_bin /sbin/mtd + install_bin /sbin/mount_root + install_bin /sbin/snapshot + install_bin /sbin/snapshot_tool + install_bin /usr/sbin/ubiupdatevol + install_bin /usr/sbin/ubiattach + install_bin /usr/sbin/ubiblock + install_bin /usr/sbin/ubiformat + install_bin /usr/sbin/ubidetach + install_bin /usr/sbin/ubirsvol + install_bin /usr/sbin/ubirmvol + install_bin /usr/sbin/ubimkvol + install_bin /usr/sbin/partx + install_bin /usr/sbin/losetup + install_bin /usr/sbin/mkfs.ext4 + for file in $RAMFS_COPY_BIN; do + install_bin ${file//:/ } + done + install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh /lib/upgrade/*.sh $RAMFS_COPY_DATA + + [ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64 + + supivot $RAM_ROOT /mnt || { + echo "Failed to switch over to ramfs. Please reboot." + exit 1 + } + + /bin/mount -o remount,ro /mnt + /bin/umount -l /mnt + + grep /overlay /proc/mounts > /dev/null && { + /bin/mount -o noatime,remount,ro /overlay + /bin/umount -l /overlay + } + + # spawn a new shell from ramdisk to reduce the probability of cache issues + exec /bin/busybox ash -c "$*" +} + +kill_remaining() { # [ ] + local sig="${1:-TERM}" + echo -n "Sending $sig to remaining processes ... " + + local my_pid=$$ + local my_ppid=$(cut -d' ' -f4 /proc/$my_pid/stat) + local my_ppisupgraded= + grep -q upgraded /proc/$my_ppid/cmdline >/dev/null && { + local my_ppisupgraded=1 + } + + local stat + for stat in /proc/[0-9]*/stat; do + [ -f "$stat" ] || continue + + local pid name state ppid rest + read pid name state ppid rest < $stat + name="${name#(}"; name="${name%)}" + + local cmdline + read cmdline < /proc/$pid/cmdline + + # Skip kernel threads + [ -n "$cmdline" ] || continue + + if [ $$ -eq 1 ] || [ $my_ppid -eq 1 ] && [ -n "$my_ppisupgraded" ]; then + # Running as init process, kill everything except me + if [ $pid -ne $$ ] && [ $pid -ne $my_ppid ]; then + echo -n "$name " + kill -$sig $pid 2>/dev/null + fi + else + case "$name" in + # Skip essential services + *procd*|*ash*|*init*|*watchdog*|*ssh*|*dropbear*|*telnet*|*login*|*hostapd*|*wpa_supplicant*|*nas*|*relayd*) : ;; + + # Killable process + *) + if [ $pid -ne $$ ] && [ $ppid -ne $$ ]; then + echo -n "$name " + kill -$sig $pid 2>/dev/null + fi + ;; + esac + fi + done + echo "" } run_hooks() { @@ -65,31 +175,28 @@ v() { [ "$VERBOSE" -ge 1 ] && echo "$@" } -json_string() { - local v="$1" - v="${v//\\/\\\\}" - v="${v//\"/\\\"}" - echo "\"$v\"" -} - rootfs_type() { /bin/mount | awk '($3 ~ /^\/$/) && ($5 !~ /rootfs/) { print $5 }' } get_image() { # [ ] local from="$1" - local cat="$2" + local conc="$2" + local cmd - if [ -z "$cat" ]; then - local magic="$(dd if="$from" bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')" + case "$from" in + http://*|ftp://*) cmd="wget -O- -q";; + *) cmd="cat";; + esac + if [ -z "$conc" ]; then + local magic="$(eval $cmd \"$from\" 2>/dev/null | dd bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')" case "$magic" in - 1f8b) cat="zcat";; - 425a) cat="bzcat";; - *) cat="cat";; + 1f8b) conc="zcat";; + 425a) conc="bzcat";; esac fi - $cat "$from" 2>/dev/null + eval "$cmd \"$from\" 2>/dev/null ${conc:+| $conc}" } get_magic_word() { @@ -221,14 +328,12 @@ default_do_upgrade() { fi } -do_upgrade_stage2() { +do_upgrade() { v "Performing system upgrade..." - if [ -n "$do_upgrade" ]; then - eval "$do_upgrade" - elif type 'platform_do_upgrade' >/dev/null 2>/dev/null; then - platform_do_upgrade "$IMAGE" + if type 'platform_do_upgrade' >/dev/null 2>/dev/null; then + platform_do_upgrade "$ARGV" else - default_do_upgrade "$IMAGE" + default_do_upgrade "$ARGV" fi if [ "$SAVE_CONFIG" -eq 1 ] && type 'platform_copy_config' >/dev/null 2>/dev/null; then @@ -236,11 +341,12 @@ do_upgrade_stage2() { fi v "Upgrade completed" - sleep 1 - - v "Rebooting system..." - umount -a - reboot -f - sleep 5 - echo b 2>/dev/null >/proc/sysrq-trigger + [ -n "$DELAY" ] && sleep "$DELAY" + ask_bool 1 "Reboot" && { + v "Rebooting system..." + umount -a + reboot -f + sleep 5 + echo b 2>/dev/null >/proc/sysrq-trigger + } } diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2 deleted file mode 100755 index 3985d8fd7..000000000 --- a/package/base-files/files/lib/upgrade/stage2 +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh -. /lib/functions/system.sh - -export IMAGE="$1" -COMMAND="$2" - -export ARGV="$IMAGE" -export ARGC=1 - -export SAVE_CONFIG=1 -export SAVE_PARTITIONS=1 - -export INTERACTIVE=0 -export VERBOSE=1 -export CONFFILES=/tmp/sysupgrade.conffiles -export CONF_TAR=/tmp/sysupgrade.tgz - -RAMFS_COPY_BIN= # extra programs for temporary ramfs root -RAMFS_COPY_DATA= # extra data files - - -[ -f "$CONF_TAR" ] || export SAVE_CONFIG=0 -[ -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap ] && export SAVE_PARTITIONS=0 - -include /lib/upgrade - - -supivot() { # - /bin/mount | grep "on $1 type" 2>&- 1>&- || /bin/mount -o bind $1 $1 - mkdir -p $1$2 $1/proc $1/sys $1/dev $1/tmp $1/overlay && \ - /bin/mount -o noatime,move /proc $1/proc && \ - pivot_root $1 $1$2 || { - /bin/umount -l $1 $1 - return 1 - } - - /bin/mount -o noatime,move $2/sys /sys - /bin/mount -o noatime,move $2/dev /dev - /bin/mount -o noatime,move $2/tmp /tmp - /bin/mount -o noatime,move $2/overlay /overlay 2>&- - return 0 -} - -switch_to_ramfs() { - for binary in \ - /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount \ - pivot_root mount_root reboot sync kill sleep \ - md5sum hexdump cat zcat bzcat dd tar \ - ls basename find cp mv rm mkdir rmdir mknod touch chmod \ - '[' printf wc grep awk sed cut \ - mtd partx losetup mkfs.ext4 \ - ubiupdatevol ubiattach ubiblock ubiformat \ - ubidetach ubirsvol ubirmvol ubimkvol \ - snapshot snapshot_tool \ - $RAMFS_COPY_BIN - do - local file="$(which "$binary" 2>/dev/null)" - [ -n "$file" ] && install_bin "$file" - done - install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh /lib/upgrade/*.sh $RAMFS_COPY_DATA - - [ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64 - - supivot $RAM_ROOT /mnt || { - echo "Failed to switch over to ramfs. Please reboot." - exit 1 - } - - /bin/mount -o remount,ro /mnt - /bin/umount -l /mnt - - grep /overlay /proc/mounts > /dev/null && { - /bin/mount -o noatime,remount,ro /overlay - /bin/umount -l /overlay - } -} - -kill_remaining() { # [ [ ] ] - local loop_limit=10 - - local sig="${1:-TERM}" - local loop="${2:-0}" - local run=true - local stat - local proc_ppid=$(cut -d' ' -f4 /proc/$$/stat) - - echo -n "Sending $sig to remaining processes ... " - - while $run; do - run=false - for stat in /proc/[0-9]*/stat; do - [ -f "$stat" ] || continue - - local pid name state ppid rest - read pid name state ppid rest < $stat - name="${name#(}"; name="${name%)}" - - # Skip PID1, our parent, ourself and our children - [ $pid -ne 1 -a $pid -ne $proc_ppid -a $pid -ne $$ -a $ppid -ne $$ ] || continue - - local cmdline - read cmdline < /proc/$pid/cmdline - - # Skip kernel threads - [ -n "$cmdline" ] || continue - - echo -n "$name " - kill -$sig $pid 2>/dev/null - - [ $loop -eq 1 ] && run=true - done - - let loop_limit-- - [ $loop_limit -eq 0 ] && { - echo - echo "Failed to kill all processes." - exit 1 - } - done - echo -} - - -killall -9 telnetd -killall -9 dropbear -killall -9 ash - -kill_remaining TERM -sleep 3 -kill_remaining KILL 1 - -sleep 1 - - -if [ -n "$IMAGE" ] && type 'platform_pre_upgrade' >/dev/null 2>/dev/null; then - IS_PRE_UPGRADE=1 platform_pre_upgrade "$IMAGE" - - # Needs to be unset again because of busybox weirdness ... - IS_PRE_UPGRADE= -fi - -if [ -n "$(rootfs_type)" ]; then - echo "Switching to ramdisk..." - switch_to_ramfs -fi - -# Exec new shell from ramfs -exec /bin/busybox ash -c "$COMMAND" diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 3fd612c37..c095ca81c 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -1,15 +1,17 @@ #!/bin/sh - . /lib/functions.sh . /lib/functions/system.sh # initialize defaults +RAMFS_COPY_BIN="" # extra programs for temporary ramfs root +RAMFS_COPY_DATA="" # extra data files export MTD_CONFIG_ARGS="" export INTERACTIVE=0 export VERBOSE=1 export SAVE_CONFIG=1 export SAVE_OVERLAY=0 export SAVE_PARTITIONS=1 +export DELAY= export CONF_IMAGE= export CONF_BACKUP_LIST=0 export CONF_BACKUP= @@ -23,6 +25,7 @@ export TEST=0 while [ -n "$1" ]; do case "$1" in -i) export INTERACTIVE=1;; + -d) export DELAY="$2"; shift;; -v) export VERBOSE="$(($VERBOSE + 1))";; -q) export VERBOSE="$(($VERBOSE - 1))";; -n) export SAVE_CONFIG=0;; @@ -47,9 +50,10 @@ done export CONFFILES=/tmp/sysupgrade.conffiles export CONF_TAR=/tmp/sysupgrade.tgz -IMAGE="$1" +export ARGV="$*" +export ARGC="$#" -[ -z "$IMAGE" -a -z "$NEED_IMAGE" -o $HELP -gt 0 ] && { +[ -z "$ARGV" -a -z "$NEED_IMAGE" -o $HELP -gt 0 ] && { cat <...] $0 [-q] [-i] @@ -86,7 +90,7 @@ EOF exit 1 } -[ -n "$IMAGE" -a -n "$NEED_IMAGE" ] && { +[ -n "$ARGV" -a -n "$NEED_IMAGE" ] && { cat <<-EOF -b|--create-backup and -r|--restore-backup do not perform a firmware upgrade. Do not specify both -b|-r and a firmware image. @@ -108,8 +112,14 @@ add_uci_conffiles() { add_overlayfiles() { local file="$1" - find /overlay/upper/etc/ -type f -o -type l | sed \ + if [ -d /overlay/upper ]; then + local overlaydir="/overlay/upper" + else + local overlaydir="/overlay" + fi + find $overlaydir/etc/ -type f -o -type l | sed \ -e 's,^/overlay\/upper/,/,' \ + -e 's,^/overlay/,/,' \ -e '\,/META_[a-zA-Z0-9]*$,d' \ -e '\,/functions.sh$,d' \ -e '\,/[^/]*-opkg$,d' \ @@ -120,26 +130,20 @@ add_overlayfiles() { # hooks sysupgrade_image_check="fwtool_check_image platform_check_image" sysupgrade_pre_upgrade="fwtool_pre_upgrade" - -if [ $SAVE_OVERLAY = 1 ]; then - [ ! -d /overlay/upper/etc ] && { - echo "Cannot find '/overlay/upper/etc', required for '-c'" - exit 1 - } +[ $SAVE_OVERLAY = 0 -o ! -d /overlay/etc ] && \ + sysupgrade_init_conffiles="add_uci_conffiles" || \ sysupgrade_init_conffiles="add_overlayfiles" -else - sysupgrade_init_conffiles="add_uci_conffiles" -fi include /lib/upgrade +[ "$1" = "nand" ] && nand_upgrade_stage2 $@ + do_save_conffiles() { local conf_tar="${1:-$CONF_TAR}" [ -z "$(rootfs_type)" ] && { echo "Cannot save config while running from ramdisk." ask_bool 0 "Abort" && exit - rm -f "$conf_tar" return 0 } run_hooks "$CONFFILES" $sysupgrade_init_conffiles @@ -153,7 +157,7 @@ do_save_conffiles() { } if [ $CONF_BACKUP_LIST -eq 1 ]; then - run_hooks "$CONFFILES" $sysupgrade_init_conffiles + add_uci_conffiles "$CONFFILES" cat "$CONFFILES" rm -f "$CONFFILES" exit 0 @@ -180,33 +184,8 @@ type platform_check_image >/dev/null 2>/dev/null || { exit 1 } -case "$IMAGE" in - http://*) - wget -O/tmp/sysupgrade.img "$IMAGE" - IMAGE=/tmp/sysupgrade.img - ;; -esac - -IMAGE="$(readlink -f "$IMAGE")" - -case "$IMAGE" in - '') - echo "Image file not found." - exit 1 - ;; - /tmp/*) ;; - *) - v "Image not in /tmp, copying..." - cp -f "$IMAGE" /tmp/sysupgrade.img - IMAGE=/tmp/sysupgrade.img - ;; -esac - -export ARGV="$IMAGE" -export ARGC=1 - for check in $sysupgrade_image_check; do - ( $check "$IMAGE" ) || { + ( eval "$check \"\$ARGV\"" ) || { if [ $FORCE -eq 1 ]; then echo "Image check '$check' failed but --force given - will update anyway!" break @@ -232,7 +211,6 @@ elif ask_bool $SAVE_CONFIG "Keep config files over reflash"; then [ $TEST -eq 1 ] || do_save_conffiles export SAVE_CONFIG=1 else - [ $TEST -eq 1 ] || rm -f "$CONF_TAR" export SAVE_CONFIG=0 fi @@ -240,26 +218,28 @@ if [ $TEST -eq 1 ]; then exit 0 fi -if [ $SAVE_PARTITIONS -eq 0 ]; then - touch /tmp/sysupgrade.always.overwrite.bootdisk.partmap -else - rm -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap -fi - run_hooks "" $sysupgrade_pre_upgrade -install_bin /sbin/upgraded -v "Commencing upgrade. All shell sessions will be closed now." - -COMMAND='. /lib/functions.sh; include /lib/upgrade; do_upgrade_stage2' - -if [ -n "$FAILSAFE" ]; then - printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade - lock -u /tmp/.failsafe -else - ubus call system sysupgrade "{ - \"prefix\": $(json_string "$RAM_ROOT"), - \"path\": $(json_string "$IMAGE"), - \"command\": $(json_string "$COMMAND") - }" +# Some platforms/devices may want different sysupgrade process, e.g. without +# killing processes yet or calling ubus system upgrade method. +# This is needed e.g. on NAND devices where we just want to trigger stage1 at +# this point. +if type 'platform_pre_upgrade' >/dev/null 2>/dev/null; then + platform_pre_upgrade "$ARGV" +fi + +ubus call system upgrade +touch /tmp/sysupgrade + +if [ ! -f /tmp/failsafe ] ; then + kill_remaining TERM + sleep 3 + kill_remaining KILL +fi + +if [ -n "$(rootfs_type)" ]; then + v "Switching to ramdisk..." + run_ramfs '. /lib/functions.sh; include /lib/upgrade; do_upgrade' +else + do_upgrade fi diff --git a/package/base-files/files/usr/lib/os-release b/package/base-files/files/usr/lib/os-release index 82ade5940..21abf969e 100644 --- a/package/base-files/files/usr/lib/os-release +++ b/package/base-files/files/usr/lib/os-release @@ -1,8 +1,8 @@ NAME="%D" -VERSION="%V" +VERSION="%V, %N" ID="%d" ID_LIKE="lede openwrt" -PRETTY_NAME="%D %V" +PRETTY_NAME="%D %N %V" VERSION_ID="%v" HOME_URL="%m" BUG_URL="%b" @@ -15,4 +15,4 @@ LEDE_DEVICE_MANUFACTURER="%M" LEDE_DEVICE_MANUFACTURER_URL="%m" LEDE_DEVICE_PRODUCT="%P" LEDE_DEVICE_REVISION="%h" -LEDE_RELEASE="%D %V %C" +LEDE_RELEASE="%D %N %V %C" diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index dbbd60b15..b60053046 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -158,11 +158,18 @@ if VERSIONOPT config VERSION_DIST string prompt "Release distribution" - default "OpenWrt" + default "LEDE" help This is the name of the release distribution. If unspecified, it defaults to OpenWrt. + config VERSION_NICK + string + prompt "Release version nickname" + help + This is the release codename embedded in the image. + If unspecified, it defaults to the name of source branch. + config VERSION_NUMBER string prompt "Release version number" @@ -183,7 +190,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "http://downloads.lede-project.org/snapshots" + default "http://downloads.lede-project.org/releases/17.01-SNAPSHOT" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -192,13 +199,15 @@ if VERSIONOPT %v .. Configured release version number or "snapshot", lowercase %C .. Configured release revision code or value of %R, uppercase %c .. Configured release revision code or value of %R, lowercase - %D .. Distribution name or "OpenWrt", uppercase - %d .. Distribution name or "openwrt", lowercase + %N .. Release name, uppercase + %n .. Release name, lowercase + %D .. Distribution name or "Lede", uppercase + %d .. Distribution name or "lede", lowercase %T .. Target name %S .. Target/Subtarget name %A .. Package architecture %t .. Build taint flags, e.g. "no-all busybox" - %M .. Manufacturer name or "OpenWrt" + %M .. Manufacturer name or "Lede" %P .. Product name or "Generic" %h .. Hardware revision or "v0" diff --git a/package/boot/apex/Makefile b/package/boot/apex/Makefile index d90df8e58..fb3c77c37 100644 --- a/package/boot/apex/Makefile +++ b/package/boot/apex/Makefile @@ -56,8 +56,7 @@ define Package/apex/install endef define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(CP) $(PKG_BUILD_DIR)/out/*.bin $(STAGING_DIR_IMAGE)/ + $(CP) $(PKG_BUILD_DIR)/out/*.bin $(KERNEL_BUILD_DIR) endef $(eval $(call BuildPackage,apex)) diff --git a/package/boot/arm-trusted-firmware-sunxi/Makefile b/package/boot/arm-trusted-firmware-sunxi/Makefile deleted file mode 100644 index 88d4f6efa..000000000 --- a/package/boot/arm-trusted-firmware-sunxi/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2017 Hauke Mehrtens -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=arm-trusted-firmware-sunxi -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=https://github.com/apritzel/arm-trusted-firmware -PKG_SOURCE_DATE:=2016-07-12 -PKG_SOURCE_VERSION:=87e8aedd80e6448a55b2328768d956fcb5f5d410 -PKG_MIRROR_HASH:=4e71a7d4bc0613533854c646b0fa574b18503c0ab28621aac67c70b9827562d8 - -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=license.md - -PKG_MAINTAINER:=Hauke Mehrtens - -include $(INCLUDE_DIR)/package.mk - - -define Package/arm-trusted-firmware-sunxi - SECTION:=boot - CATEGORY:=Boot Loaders - TITLE:=ARM Trusted Firmware for Allwinner - DEPENDS:=@TARGET_sunxi_cortexa53 -endef - -export GCC_HONOUR_COPTS=s - -MAKE_VARS = \ - CROSS_COMPILE="$(TARGET_CROSS)" - -MAKE_FLAGS += \ - PLAT=sun50iw1p1 \ - DEBUG=1 \ - bl31 - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(CP) $(PKG_BUILD_DIR)/build/sun50iw1p1/debug/bl31.bin $(STAGING_DIR_IMAGE)/bl31.bin -endef - -define Package/arm-trusted-firmware-sunxi/install -endef - -$(eval $(call BuildPackage,arm-trusted-firmware-sunxi)) diff --git a/package/boot/at91bootstrap/Makefile b/package/boot/at91bootstrap/Makefile deleted file mode 100644 index 4571fedc0..000000000 --- a/package/boot/at91bootstrap/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# -# Copyright (C) 2016 Microchip Technology Inc. -# -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=at91bootstrap -PKG_VERSION:=v3.8.8 -PKG_RELEASE:= - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/linux4sam/at91bootstrap.git -PKG_SOURCE_VERSION:=3d33a4e0707c61007a5278f6620453502f7500db - -PKG_BUILD_DIR = \ - $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include at91bootstrap.mk -include $(INCLUDE_DIR)/package.mk - -define AT91Bootstrap/Default - BUILD_TARGET:=at91 - BUILD_SUBTARGET:=sama5 - AT91BOOTSTRAP_IMAGE:=at91bootstrap.bin -endef - -define at91bootstrap/sama5d2_xplaineddf_uboot - TITLE:=AT91Bootstrap for the SAMA5D2 Xplained board (SPI Flash) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d2_xplained -endef - -define at91bootstrap/sama5d2_xplaineddf_qspi_uboot - TITLE:=AT91Bootstrap for the SAMA5D2 Xplained board (QSPI Flash) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d2_xplained -endef - -define at91bootstrap/sama5d2_xplainedsd_uboot - TITLE:=AT91Bootstrap for the SAMA5D2 Xplained board (SDcard/EMMC) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d2_xplained -endef - -define at91bootstrap/sama5d3_xplainednf_uboot - TITLE:=AT91Bootstrap for the SAMA5D3 Xplained board (Nand Flash) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d3_xplained -endef - -define at91bootstrap/sama5d3_xplainedsd_uboot - TITLE:=AT91Bootstrap for the SAMA5D3 Xplained board (SDcard) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d3_xplained -endef - -define at91bootstrap/sama5d4_xplainednf_uboot - TITLE:=AT91Bootstrap for the SAMA5D4 Xplained board (Nand Flash) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d4_xplained -endef - -define at91bootstrap/sama5d4_xplaineddf_uboot_secure - TITLE:=AT91Bootstrap for the SAMA5D4 Xplained board (SPI Flash) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d4_xplained -endef - -define at91bootstrap/sama5d4_xplainedsd_uboot_secure - TITLE:=AT91Bootstrap for the SAMA5D4 Xplained board (SDcard) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d4_xplained -endef - -AT91BOOTSTRAP_TARGETS := \ - sama5d2_xplaineddf_uboot \ - sama5d2_xplaineddf_qspi_uboot \ - sama5d2_xplainedsd_uboot \ - sama5d3_xplainednf_uboot \ - sama5d3_xplainedsd_uboot \ - sama5d4_xplainednf_uboot_secure \ - sama5d4_xplaineddf_uboot_secure \ - sama5d4_xplainedsd_uboot_secure - -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - CROSS_COMPILE=$(TARGET_CROSS) -endef - -$(eval $(call BuildPackage/AT91Bootstrap)) diff --git a/package/boot/at91bootstrap/at91bootstrap.mk b/package/boot/at91bootstrap/at91bootstrap.mk deleted file mode 100644 index dda5fa4e9..000000000 --- a/package/boot/at91bootstrap/at91bootstrap.mk +++ /dev/null @@ -1,88 +0,0 @@ - -PKG_TARGETS := bin -PKG_FLAGS:=nonshared - -export GCC_HONOUR_COPTS=s - -define Package/at91bootstrap/install/default - $(CP) $(PKG_BUILD_DIR)/binaries/*uboot* $(1)/ -endef - -Package/at91bootstrap/install = $(Package/at91bootstrap/install/default) - -define AT91Bootstrap/Init - BUILD_TARGET:= - BUILD_SUBTARGET:= - BUILD_DEVICES:= - NAME:= - DEPENDS:= - HIDDEN:= - DEFAULT:= - VARIANT:=$(1) - AT91BOOTSTRAP_CONFIG:=$(1) -endef - -TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET)) - -AT91BOOTSTRAP_MAKE_FLAGS = \ - HOSTCC="$(HOSTCC)" \ - HOSTCFLAGS='$(HOST_CFLAGS) $$$$(HOSTCPPFLAGS)' \ - HOSTLDFLAGS="" - -define Build/AT91Bootstrap/Target - $(eval $(call AT91Bootstrap/Init,$(1))) - $(eval $(call AT91Bootstrap/Default,$(1))) - $(eval $(call AT91Bootstrap/$(1),$(1))) - - define Package/at91bootstrap-$(1) - SECTION:=boot - CATEGORY:=Boot Loaders - TITLE:= .$(NAME) - VARIANT:=$(VARIANT) - DEPENDS:=@!IN_SDK $(DEPENDS) - HIDDEN:=$(HIDDEN) - ifneq ($(BUILD_TARGET),) - DEPENDS += @$(TARGET_DEP) - ifneq ($(BUILD_DEVICES),) - DEFAULT := y if ($(TARGET_DEP)_Default \ - $(patsubst %,|| $(TARGET_DEP)_DEVICE_%,$(BUILD_DEVICES)) \ - $(patsubst %,|| $(patsubst TARGET_%,TARGET_DEVICE_%, \ - $(TARGET_DEP))_DEVICE_%,$(BUILD_DEVICES))) - endif - endif - $(if $(DEFAULT),DEFAULT:=$(DEFAULT)) - URL:=https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap - endef - - define Package/at91bootstrap-$(1)/install - $$(Package/at91bootstrap/install) - endef -endef - -define Build/Configure/AT91Bootstrap - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - $(AT91BOOTSTRAP_CONFIG)_defconfig -endef - - -define Build/Compile/AT91Bootstrap - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - CROSS_COMPILE=$(TARGET_CROSS) \ - $(AT91BOOTSTRAP_MAKE_FLAGS) -endef - -define BuildPackage/AT91Bootstrap/Defaults - Build/Configure/Default = $$$$(Build/Configure/AT91Bootstrap) - Build/Compile/Default = $$$$(Build/Compile/AT91Bootstrap) -endef - -define BuildPackage/AT91Bootstrap - $(eval $(call BuildPackage/AT91Bootstrap/Defaults)) - $(foreach type,$(if $(DUMP),$(AT91BOOTSTRAP_TARGETS),$(BUILD_VARIANT)), \ - $(eval $(call Build/AT91Bootstrap/Target,$(type))) - ) - $(eval $(call Build/DefaultTargets)) - $(foreach type,$(if $(DUMP),$(AT91BOOTSTRAP_TARGETS),$(BUILD_VARIANT)), \ - $(call BuildPackage,at91bootstrap-$(type)) - ) -endef diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile index 8cfc0dcff..b9e79e102 100644 --- a/package/boot/grub2/Makefile +++ b/package/boot/grub2/Makefile @@ -9,7 +9,6 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=grub -PKG_CPE_ID:=cpe:/a:gnu:grub2 PKG_VERSION:=2.02 PKG_RELEASE:=1 diff --git a/package/boot/kexec-tools/Config.in b/package/boot/kexec-tools/Config.in index 068c27e41..03bc6ee80 100644 --- a/package/boot/kexec-tools/Config.in +++ b/package/boot/kexec-tools/Config.in @@ -1,5 +1,12 @@ menu "Configuration" - depends on PACKAGE_kexec + depends on PACKAGE_kexec-tools + +config KEXEC_TOOLS_kdump + bool + prompt "kdump support" + default n + help + Include the kdump utility. config KEXEC_ZLIB bool diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile index 1c686a254..ecd2a6ea1 100644 --- a/package/boot/kexec-tools/Makefile +++ b/package/boot/kexec-tools/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kexec-tools -PKG_VERSION:=2.0.14 +PKG_VERSION:=2.0.14-rc1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec -PKG_HASH:=ffb2e7e99d9d08754c6bc1922aed3c000094f318665d82a72ecc76c4ff1c0dc6 +PKG_HASH:=3fc505ff8d8a2d24c68aac5e6b4783997d5a086966ff3de8b05a0ceb27e5e23b PKG_FIXUP:=autoreconf @@ -21,49 +21,22 @@ PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA include $(INCLUDE_DIR)/package.mk -define Package/kexec-tools/Default +define Package/kexec-tools SECTION:=utils CATEGORY:=Utilities + DEPENDS:=@armeb||@arm||@i386||@x86_64||@powerpc64||@mipsel||@mips +KEXEC_ZLIB:zlib +KEXEC_LZMA:liblzma + TITLE:=Kernel boots kernel URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/ MAINTAINER:=Florian Fainelli -endef - -define Package/kexec-tools - $(call Package/kexec-tools/Default) - TITLE:=kexec-tools transition meta package - DEPENDS:=+kexec + MENU:=1 endef define Package/kexec-tools/description - kexec is a set of system calls that allows you to load + kexec is a set of systems call that allows you to load another kernel from the currently executing Linux kernel. - The kexec utility allows to load and boot another kernel. endef -define Package/kexec - $(call Package/kexec-tools/Default) - TITLE:=Kernel boots kernel - DEPENDS:=\ - @armeb||@arm||@i386||@x86_64||@powerpc64||@mipsel||@mips \ - +KEXEC_ZLIB:zlib +KEXEC_LZMA:liblzma @KERNEL_KEXEC -endef - -define Package/kexec/description - The kexec utility allows to load and boot another kernel. -endef - -define Package/kdump - $(call Package/kexec-tools/Default) - TITLE:=Kernel crash analysis - DEPENDS:=+kexec @i386||@x86_64||@arm @KERNEL_CRASH_DUMP -endef - -define Package/kdump/description - The kdump package allows to automatically boot into a - special kernel for analyzing kernel crashes using kdump. -endef - -define Package/kexec/config +define Package/kexec-tools/config source "$(SOURCE)/Config.in" endef @@ -92,45 +65,24 @@ CONFIGURE_VARS += \ BUILD_CC="$(HOSTCC)" \ TARGET_CC="$(TARGET_CC)" +kexec-extra-sbin-$(CONFIG_KEXEC_TOOLS_kdump) += kdump + define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install endef define Package/kexec-tools/install - : -endef - -define Package/kexec/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kexec $(1)/usr/sbin + $(INSTALL_BIN) \ + $(addprefix $(PKG_INSTALL_DIR)/usr/sbin/, \ + $(kexec-extra-sbin-y)) \ + $(kexec-extra-bin-y) \ + $(PKG_INSTALL_DIR)/usr/sbin/kexec \ + $(1)/usr/sbin # make a link for compatability with other distros $(INSTALL_DIR) $(1)/sbin $(LN) ../usr/sbin/kexec $(1)/sbin/kexec endef -define Package/kdump/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config $(1)/etc/uci-defaults - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdump $(PKG_INSTALL_DIR)/usr/sbin/vmcore-dmesg $(1)/usr/sbin - $(INSTALL_BIN) ./files/kdump.init $(1)/etc/init.d/kdump - $(INSTALL_BIN) ./files/kdump.defaults $(1)/etc/uci-defaults/kdump - $(INSTALL_CONF) ./files/kdump.config $(1)/etc/config/kdump -endef - -define Package/kdump/prerm -#!/bin/sh - -case $$(uname -m) in - i?86|x86_64) - if grep -q " crashkernel=" /boot/grub/grub.cfg; then - mount /boot -o remount,rw - sed -i 's/ crashkernel=[^ ]*//' /boot/grub/grub.cfg - mount /boot -o remount,ro - fi - ;; -esac -endef - $(eval $(call BuildPackage,kexec-tools)) -$(eval $(call BuildPackage,kexec)) -$(eval $(call BuildPackage,kdump)) diff --git a/package/boot/kexec-tools/files/kdump.config b/package/boot/kexec-tools/files/kdump.config deleted file mode 100644 index dc6054ffd..000000000 --- a/package/boot/kexec-tools/files/kdump.config +++ /dev/null @@ -1,7 +0,0 @@ - -config kdump - option enabled '1' - option save_dmesg '1' - option save_vmcore '0' -# using an external partition to store vmcore is highly recommended! -# option path '/mnt/crashdump' diff --git a/package/boot/kexec-tools/files/kdump.defaults b/package/boot/kexec-tools/files/kdump.defaults deleted file mode 100644 index 2f15e757b..000000000 --- a/package/boot/kexec-tools/files/kdump.defaults +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -case $(uname -m) in - i?86|x86_64) - if ! grep -q crashkernel /boot/grub/grub.cfg; then - mount /boot -o remount,rw - sed -i 's/linux.*/& crashkernel=32M@32M/' /boot/grub/grub.cfg - mount /boot -o remount,ro - fi - ;; -esac diff --git a/package/boot/kexec-tools/files/kdump.init b/package/boot/kexec-tools/files/kdump.init deleted file mode 100755 index 057b8cc17..000000000 --- a/package/boot/kexec-tools/files/kdump.init +++ /dev/null @@ -1,182 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=41 -STOP=98 - -EXTRA_COMMANDS="status" -EXTRA_HELP=" status Print crashkernel status" - -verify_kdump() { - local cfg="$1" - local enabled - local path - local save_vmcore - local save_dmesg - - config_get_bool enabled "$cfg" enabled 1 - config_get_bool save_dmesg "$cfg" save_dmesg 1 - config_get_bool save_vmcore "$cfg" save_vmcore 0 - - [ "$enabled" -gt 0 ] || return 2 - - [ "$save_dmesg" -gt 0 ] || [ "$save_vmcore" -gt 0 ] || return 2 - - config_get path "$cfg" path "/" - - [ -d "$path" ] || mkdir -p "$path" 2>/dev/null || return 1 -} - -run_kdump() { - local cfg="$1" - local enabled - local path - local save_vmcore - local save_dmesg - - config_get_bool enabled "$cfg" enabled 1 - [ "$enabled" -gt 0 ] || return - - config_get_bool save_dmesg "$cfg" save_dmesg 1 - config_get_bool save_vmcore "$cfg" save_vmcore 0 - config_get path "$cfg" path "/" - - timestamp=$(date "+%Y%m%dT%H%M%S") - - if [ "$save_vmcore" -eq 1 ]; then - # would like 'sparse' but busybox doesn't support it - dd if=/proc/vmcore of="$path/vmcore-$timestamp" conv=fsync bs=1M - fi - - if [ "$save_dmesg" -eq 1 ]; then - vmcore-dmesg /proc/vmcore > "$path/dmesg-$timestamp" - fi - - sync - reboot -f -} - -find_kernel() { - . /lib/functions.sh - local kernel - - kernel="$BOOT_IMAGE" - if [ -r "$kernel" ]; then - echo $kernel - return 0 - fi - - kernel="$(find_mtd_part kernel)" - if [ -r "$kernel" ]; then - echo $kernel - return 0 - fi - - for voldir in /sys/class/ubi/ubi*_*; do - [ ! -e "$voldir" ] && continue - if [ "$(cat "${voldir}/name")" = "kernel" ]; then - kernel="/dev/$(basename "$voldir")" - echo $kernel - return 0 - fi - done - - return 1 -} - -load_crashkernel() { - local append_cmdline - local kernel - - kernel="$(find_kernel)" - [ $? -gt 0 ] && return 1 - - case "$(uname -m)" in - i?86|x86_64) - grep -q "crashkernel=" /proc/cmdline || return 1 - append_cmdline="1 irqpoll reset_devices maxcpus=1" - ;; - arm*) - append_cmdline="1 maxcpus=1 reset_devices" - ;; - esac - kexec -p "$kernel" --reuse-cmdline --append="$append_cmdline" - return $? -} - -start() { - local retval - - if [ ! -e /sys/kernel/kexec_crash_loaded ]; then - return 1 - fi - - if [ -e /proc/vmcore ]; then - config_load kdump - config_foreach run_kdump kdump - else - config_load kdump - config_foreach verify_kdump kdump - retval=$? - [ $retval = 1 ] && return 1 - [ $retval = 0 ] && load_crashkernel - return $? - fi -} - -stop() { - [ "$(cat /sys/kernel/kexec_crash_loaded)" = "1" ] || return - - if [ -e "$BOOT_IMAGE" ]; then - kexec -p -u "$BOOT_IMAGE" - fi -} - -status() { - local retval kernel - - if [ ! -e /sys/kernel/kexec_crash_loaded ]; then - echo "crashdump not supported by kernel" - return - fi - - if [ $(cat /sys/kernel/kexec_crash_size) -eq 0 ]; then - echo "memory for crashdump kernel not reserved!" - echo "check crashkernel= kernel cmdline parameter" - echo "(a reboot is required after installing kdump)" - return - fi - - kernel="$(find_kernel)" - if [ $? -gt 0 ]; then - echo "cannot find kernel image" - return - else - echo "using kernel image $kernel" - fi - - echo -n "kdump configuration is " - config_load kdump - retval=$? - if [ $retval = 0 ]; then - if [ "$(config_foreach echo kdump)" ]; then - config_foreach verify_kdump kdump - retval=$? - else - retval=1 - fi - fi - - if [ $retval = 0 ]; then - echo "valid" - elif [ $retval = 2 ]; then - echo "disabled" - else - echo "BROKEN" - fi - - echo -n "kexec crash kernel " - if [ "$(cat /sys/kernel/kexec_crash_loaded)" = "0" ]; then - echo -n "not " - fi - echo "loaded" -} diff --git a/package/boot/kobs-ng/patches/001-compile.patch b/package/boot/kobs-ng/patches/001-compile.patch index 8648dc8b9..67da93a32 100644 --- a/package/boot/kobs-ng/patches/001-compile.patch +++ b/package/boot/kobs-ng/patches/001-compile.patch @@ -10,14 +10,13 @@ #include --- a/src/mtd.h +++ b/src/mtd.h -@@ -25,8 +25,11 @@ +@@ -25,8 +25,10 @@ #ifndef MTD_H #define MTD_H +#define _GNU_SOURCE #include #include -+#include +#include #include "BootControlBlocks.h" diff --git a/package/boot/rbcfg/Makefile b/package/boot/rbcfg/Makefile index 9d9b97524..412f7ab11 100644 --- a/package/boot/rbcfg/Makefile +++ b/package/boot/rbcfg/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rbcfg -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) diff --git a/package/boot/rbcfg/src/main.c b/package/boot/rbcfg/src/main.c index 2acbfbd8c..b7cf79ffa 100644 --- a/package/boot/rbcfg/src/main.c +++ b/package/boot/rbcfg/src/main.c @@ -2,7 +2,6 @@ * RouterBOOT configuration utility * * Copyright (C) 2010 Gabor Juhos - * Copyright (C) 2017 Thibaut VARENE * * 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 @@ -30,7 +29,6 @@ #define RB_ERR_INVALID 2 #define RB_ERR_NOMEM 3 #define RB_ERR_IO 4 -#define RB_ERR_NOTWANTED 5 #define ARRAY_SIZE(_a) (sizeof((_a)) / sizeof((_a)[0])) @@ -69,11 +67,6 @@ struct rbcfg_command { int (*exec)(int argc, const char *argv[]); }; -struct rbcfg_soc { - const char *needle; - const int type; -}; - static void usage(void); /* Globals */ @@ -108,10 +101,6 @@ static const struct rbcfg_value rbcfg_boot_device[] = { RB_BOOT_DEVICE_ETHONCE), CFG_U32("nand", "boot from NAND only", RB_BOOT_DEVICE_NANDONLY), - CFG_U32("flash", "boot in flash configuration mode", - RB_BOOT_DEVICE_FLASHCFG), - CFG_U32("flashnand", "boot in flash configuration mode once, then NAND", - RB_BOOT_DEVICE_FLSHONCE), }; static const struct rbcfg_value rbcfg_boot_key[] = { @@ -142,32 +131,12 @@ static const struct rbcfg_value rbcfg_cpu_mode[] = { RB_CPU_MODE_REGULAR), }; -static const struct rbcfg_value rbcfg_cpu_freq_dummy[] = { -}; - -static const struct rbcfg_value rbcfg_cpu_freq_qca953x[] = { - CFG_U32("-2", "-100MHz", RB_CPU_FREQ_L2), - CFG_U32("-1", "- 50MHz", RB_CPU_FREQ_L1), - CFG_U32("0", "Factory", RB_CPU_FREQ_N0), - CFG_U32("+1", "+ 50MHz", RB_CPU_FREQ_H1), - CFG_U32("+2", "+100MHz", RB_CPU_FREQ_H2), -}; - -static const struct rbcfg_value rbcfg_cpu_freq_ar9344[] = { - CFG_U32("-2", "-100MHz", RB_CPU_FREQ_L2), - CFG_U32("-1", "- 50MHz", RB_CPU_FREQ_L1), - CFG_U32("0", "Factory", RB_CPU_FREQ_N0), - CFG_U32("+1", "+ 50MHz", RB_CPU_FREQ_H1), - CFG_U32("+2", "+100MHz", RB_CPU_FREQ_H2), - CFG_U32("+3", "+150MHz", RB_CPU_FREQ_H3), -}; - static const struct rbcfg_value rbcfg_booter[] = { CFG_U32("regular", "load regular booter", RB_BOOTER_REGULAR), CFG_U32("backup", "force backup-booter loading", RB_BOOTER_BACKUP), }; -static struct rbcfg_env rbcfg_envs[] = { +static const struct rbcfg_env rbcfg_envs[] = { { .name = "boot_delay", .id = RB_ID_BOOT_DELAY, @@ -204,12 +173,6 @@ static struct rbcfg_env rbcfg_envs[] = { .type = RBCFG_ENV_TYPE_U32, .values = rbcfg_cpu_mode, .num_values = ARRAY_SIZE(rbcfg_cpu_mode), - }, { - .name = "cpu_freq", - .id = RB_ID_CPU_FREQ, - .type = RBCFG_ENV_TYPE_U32, - .values = rbcfg_cpu_freq_dummy, - .num_values = ARRAY_SIZE(rbcfg_cpu_freq_dummy), }, { .name = "uart_speed", .id = RB_ID_UART_SPEED, @@ -273,10 +236,8 @@ rbcfg_find_tag(struct rbcfg_ctx *ctx, uint16_t tag_id, uint16_t *tag_len, buf += 2; buflen -= 2; - if (id == RB_ID_TERMINATOR) { - ret = RB_ERR_NOTWANTED; + if (id == RB_ID_TERMINATOR) break; - } if (buflen < len) break; @@ -292,7 +253,7 @@ rbcfg_find_tag(struct rbcfg_ctx *ctx, uint16_t tag_id, uint16_t *tag_len, buflen -= len; } - if (RB_ERR_NOTFOUND == ret) + if (ret) fprintf(stderr, "no tag found with id=%u\n", tag_id); return ret; @@ -783,96 +744,6 @@ usage(void) fprintf(stderr, "\n"); } -#define RBCFG_SOC_UNKNOWN 0 -#define RBCFG_SOC_QCA953X 1 -#define RBCFG_SOC_AR9344 2 - -static const struct rbcfg_soc rbcfg_socs[] = { - { - .needle = "QCA953", - .type = RBCFG_SOC_QCA953X, - }, { - .needle = "AR9344", - .type = RBCFG_SOC_AR9344, - }, -}; - -#define CPUINFO_BUFSIZE 128 /* lines of interest are < 80 chars */ - -static int cpuinfo_find_soc(void) -{ - FILE *fp; - char temp[CPUINFO_BUFSIZE]; - char *haystack, *needle; - int i, found = 0, soc_type = RBCFG_SOC_UNKNOWN; - - fp = fopen("/proc/cpuinfo", "r"); - if (!fp) - goto end; - - /* first, extract the system type line */ - needle = "system type"; - while(fgets(temp, CPUINFO_BUFSIZE, fp)) { - if (!strncmp(temp, needle, strlen(needle))) { - found = 1; - break; - } - } - - fclose(fp); - - /* failsafe in case cpuinfo format changes */ - if (!found) - goto end; - - /* skip the field header */ - haystack = strchr(temp, ':'); - - /* then, try to identify known SoC, stop at first match */ - for (i = 0; i < ARRAY_SIZE(rbcfg_socs); i++) { - if ((strstr(haystack, rbcfg_socs[i].needle))) { - soc_type = rbcfg_socs[i].type; - break; - } - } - -end: - return soc_type; -} - -static void fixup_rbcfg_envs(void) -{ - int i, num_val, soc_type; - const struct rbcfg_value * env_value; - - /* detect SoC */ - soc_type = cpuinfo_find_soc(); - - /* update rbcfg_envs */ - switch (soc_type) { - case RBCFG_SOC_QCA953X: - env_value = rbcfg_cpu_freq_qca953x; - num_val = ARRAY_SIZE(rbcfg_cpu_freq_qca953x); - break; - case RBCFG_SOC_AR9344: - env_value = rbcfg_cpu_freq_ar9344; - num_val = ARRAY_SIZE(rbcfg_cpu_freq_ar9344); - break; - } - - for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) { - if (RB_ID_CPU_FREQ == rbcfg_envs[i].id) { - if (RBCFG_SOC_UNKNOWN == soc_type) - rbcfg_envs[i].id = RB_ID_TERMINATOR; - else { - rbcfg_envs[i].values = env_value; - rbcfg_envs[i].num_values = num_val; - } - break; - } - } -} - int main(int argc, const char *argv[]) { const struct rbcfg_command *cmd = NULL; @@ -881,8 +752,6 @@ int main(int argc, const char *argv[]) rbcfg_name = (char *) argv[0]; - fixup_rbcfg_envs(); - if (argc < 2) { usage(); return EXIT_FAILURE; diff --git a/package/boot/rbcfg/src/rbcfg.h b/package/boot/rbcfg/src/rbcfg.h index 88acc13dc..899161a10 100644 --- a/package/boot/rbcfg/src/rbcfg.h +++ b/package/boot/rbcfg/src/rbcfg.h @@ -32,7 +32,6 @@ #define RB_ID_BOOT_PROTOCOL 9 #define RB_ID_SOFT_10 10 #define RB_ID_SOFT_11 11 -#define RB_ID_CPU_FREQ 12 #define RB_ID_BOOTER 13 #define RB_UART_SPEED_115200 0 @@ -60,8 +59,6 @@ #define RB_BOOT_DEVICE_CFCARD 2 #define RB_BOOT_DEVICE_ETHONCE 3 #define RB_BOOT_DEVICE_NANDONLY 5 -#define RB_BOOT_DEVICE_FLASHCFG 7 -#define RB_BOOT_DEVICE_FLSHONCE 8 #define RB_BOOT_KEY_ANY 0 #define RB_BOOT_KEY_DEL 1 @@ -72,13 +69,6 @@ #define RB_BOOT_PROTOCOL_BOOTP 0 #define RB_BOOT_PROTOCOL_DHCP 1 -#define RB_CPU_FREQ_L2 (0 << 3) -#define RB_CPU_FREQ_L1 (1 << 3) -#define RB_CPU_FREQ_N0 (2 << 3) -#define RB_CPU_FREQ_H1 (3 << 3) -#define RB_CPU_FREQ_H2 (4 << 3) -#define RB_CPU_FREQ_H3 (5 << 3) - #define RB_BOOTER_REGULAR 0 #define RB_BOOTER_BACKUP 1 diff --git a/package/boot/uboot-ar71xx/Makefile b/package/boot/uboot-ar71xx/Makefile index e6e6cbbd4..70f96713e 100644 --- a/package/boot/uboot-ar71xx/Makefile +++ b/package/boot/uboot-ar71xx/Makefile @@ -6,28 +6,90 @@ # include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk +PKG_NAME:=u-boot PKG_VERSION:=2010.03 PKG_RELEASE:=1 +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_HASH:=902d1b2c15787df55186fae4033685fb0c5a5a12755a08383e97c4a3e255925b +PKG_SOURCE_URL:= \ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot +PKG_TARGETS:=bin + +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README -include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=ar71xx - BUILD_SUBTARGET:=generic +define uboot/Default + TITLE:= + CONFIG:= + IMAGE:= endef -define U-Boot/nbg460n_550n_550nh - TITLE:=NBG460N/550N/550NH routers - BUILD_DEVICES:=NBG_460N_550N_550NH - HIDDEN:=y +define uboot/nbg460n_550n_550nh + TITLE:=U-boot for the NBG460N/550N/550NH routers + DEFAULT:=y if (TARGET_ar71xx_generic_DEVICE_NBG_460N_550N_550NH || TARGET_DEVICE_ar71xx_generic_DEVICE_NBG_460N_550N_550NH || TARGET_ar71xx_generic_Default) endef -UBOOT_MAKE_FLAGS := +UBOOTS:=nbg460n_550n_550nh -UBOOT_TARGETS:=nbg460n_550n_550nh +define Package/uboot/template +define Package/uboot-ar71xx-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + TITLE:=$(2) + DEPENDS:=@TARGET_ar71xx_generic + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) +endef +endef -$(eval $(call BuildPackage/U-Boot)) +define BuildUbootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) +endef + + +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin) +endif + +define Build/Prepare + $(call Build/Prepare/Default) + $(CP) ./files/* $(PKG_BUILD_DIR) + find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf +endef + +define Build/Configure + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(UBOOT_CONFIG)_config +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) +endef + +define Package/uboot/install/template +define Package/uboot-ar71xx-$(1)/install + $(INSTALL_DIR) $$(1) + $(CP) $(PKG_BUILD_DIR)/u-boot.bin $(BIN_DIR)/$(2) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),openwrt-$(BOARD)-$(SUBTARGET)-$(u)-u-boot.bin)) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUbootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-ar71xx-$(u))) \ +) diff --git a/package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/Makefile b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/Makefile similarity index 100% rename from package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/Makefile rename to package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/Makefile diff --git a/package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/config.mk b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/config.mk similarity index 100% rename from package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/config.mk rename to package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/config.mk diff --git a/package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/lowlevel_init.S b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/lowlevel_init.S similarity index 100% rename from package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/lowlevel_init.S rename to package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/lowlevel_init.S diff --git a/package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/nbg460n.c b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/nbg460n.c similarity index 100% rename from package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/nbg460n.c rename to package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/nbg460n.c diff --git a/package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/u-boot.lds b/package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/u-boot.lds similarity index 100% rename from package/boot/uboot-ar71xx/src/board/zyxel/nbg460n/u-boot.lds rename to package/boot/uboot-ar71xx/files/board/zyxel/nbg460n/u-boot.lds diff --git a/package/boot/uboot-ar71xx/src/cpu/mips/ar71xx_serial.c b/package/boot/uboot-ar71xx/files/cpu/mips/ar71xx_serial.c similarity index 100% rename from package/boot/uboot-ar71xx/src/cpu/mips/ar71xx_serial.c rename to package/boot/uboot-ar71xx/files/cpu/mips/ar71xx_serial.c diff --git a/package/boot/uboot-ar71xx/src/drivers/net/ag71xx.c b/package/boot/uboot-ar71xx/files/drivers/net/ag71xx.c similarity index 100% rename from package/boot/uboot-ar71xx/src/drivers/net/ag71xx.c rename to package/boot/uboot-ar71xx/files/drivers/net/ag71xx.c diff --git a/package/boot/uboot-ar71xx/src/drivers/net/ag71xx.h b/package/boot/uboot-ar71xx/files/drivers/net/ag71xx.h similarity index 100% rename from package/boot/uboot-ar71xx/src/drivers/net/ag71xx.h rename to package/boot/uboot-ar71xx/files/drivers/net/ag71xx.h diff --git a/package/boot/uboot-ar71xx/src/drivers/net/phy/rtl8366.h b/package/boot/uboot-ar71xx/files/drivers/net/phy/rtl8366.h similarity index 100% rename from package/boot/uboot-ar71xx/src/drivers/net/phy/rtl8366.h rename to package/boot/uboot-ar71xx/files/drivers/net/phy/rtl8366.h diff --git a/package/boot/uboot-ar71xx/src/drivers/net/phy/rtl8366_mii.c b/package/boot/uboot-ar71xx/files/drivers/net/phy/rtl8366_mii.c similarity index 100% rename from package/boot/uboot-ar71xx/src/drivers/net/phy/rtl8366_mii.c rename to package/boot/uboot-ar71xx/files/drivers/net/phy/rtl8366_mii.c diff --git a/package/boot/uboot-ar71xx/src/drivers/spi/ar71xx_spi.c b/package/boot/uboot-ar71xx/files/drivers/spi/ar71xx_spi.c similarity index 100% rename from package/boot/uboot-ar71xx/src/drivers/spi/ar71xx_spi.c rename to package/boot/uboot-ar71xx/files/drivers/spi/ar71xx_spi.c diff --git a/package/boot/uboot-ar71xx/src/include/asm-mips/ar71xx.h b/package/boot/uboot-ar71xx/files/include/asm-mips/ar71xx.h similarity index 100% rename from package/boot/uboot-ar71xx/src/include/asm-mips/ar71xx.h rename to package/boot/uboot-ar71xx/files/include/asm-mips/ar71xx.h diff --git a/package/boot/uboot-ar71xx/src/include/asm-mips/ar71xx_gpio.h b/package/boot/uboot-ar71xx/files/include/asm-mips/ar71xx_gpio.h similarity index 100% rename from package/boot/uboot-ar71xx/src/include/asm-mips/ar71xx_gpio.h rename to package/boot/uboot-ar71xx/files/include/asm-mips/ar71xx_gpio.h diff --git a/package/boot/uboot-ar71xx/src/include/configs/nbg460n.h b/package/boot/uboot-ar71xx/files/include/configs/nbg460n.h similarity index 100% rename from package/boot/uboot-ar71xx/src/include/configs/nbg460n.h rename to package/boot/uboot-ar71xx/files/include/configs/nbg460n.h diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile index 7c420f126..cbce85967 100644 --- a/package/boot/uboot-at91/Makefile +++ b/package/boot/uboot-at91/Makefile @@ -7,83 +7,68 @@ include $(TOPDIR)/rules.mk +PKG_NAME:=u-boot PKG_VERSION:=2016.05 PKG_RELEASE:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot PKG_HASH:=87d02275615aaf0cd007b54cbe9fbadceef2bee7c79e6c323ea1ae8956dcb171 -include $(INCLUDE_DIR)/u-boot.mk +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + +PKG_BUILD_PARALLEL:=1 + include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=at91 - UBOOT_IMAGE:=u-boot.bin boot.bin +define uboot/Default + TITLE:= endef -define U-Boot/at91sam9m10g45ek_nandflash - NAME:=AT91SAM9M10G45-EK board (NandFlash) - BUILD_SUBTARGET:=legacy - BUILD_DEVICES:=at91sam9m10g45ek +define uboot/at91sam9m10g45ek_nandflash + TITLE:=U-Boot for the AT91SAM9M10G45-EK board (NandFlash) endef -define U-Boot/at91sam9x5ek_nandflash - NAME:=AT91SAM9X5-EK board (NandFlash) - BUILD_SUBTARGET:=legacy - BUILD_DEVICES:=at91sam9g15ek at91sam9g25ek at91sam9g35ek at91sam9x25ek at91sam9x35ek +define uboot/at91sam9x5ek_nandflash + TITLE:=U-Boot for the AT91SAM9X5-EK board (NandFlash) endef -define U-Boot/sama5d3_xplained_nandflash - NAME:=SAMA5D3 Xplained board (NandFlash) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d3_xplained -endef - -define U-Boot/sama5d3_xplained_mmc - NAME:=SAMA5D3 Xplained board (SDcard) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d3_xplained -endef - -define U-Boot/sama5d2_xplained_spiflash - NAME:=SAMA5D2 Xplained board (SPI Flash) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d2_xplained -endef - -define U-Boot/sama5d2_xplained_mmc - NAME:=SAMA5D2 Xplained board (SDcard/EMMC) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d2_xplained -endef - -define U-Boot/sama5d4_xplained_spiflash - NAME:=SAMA5D4 Xplained board (SPI Flash) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d4_xplained -endef - -define U-Boot/sama5d4_xplained_mmc - NAME:=SAMA5D4 Xplained board (SDcard) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d4_xplained -endef - -define U-Boot/sama5d4_xplained_nandflash - NAME:=SAMA5D4 Xplained board (NandFlash) - BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=at91-sama5d4_xplained -endef - -UBOOT_TARGETS := \ +UBOOTS := \ at91sam9m10g45ek_nandflash \ - at91sam9x5ek_nandflash \ - sama5d3_xplained_nandflash \ - sama5d3_xplained_mmc \ - sama5d2_xplained_mmc \ - sama5d2_xplained_spiflash \ - sama5d4_xplained_mmc \ - sama5d4_xplained_spiflash \ - sama5d4_xplained_nandflash + at91sam9x5ek_nandflash + +define Package/uboot/template +define Package/uboot-at91-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_at91 + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) + MAINTAINER:=Ben Whitten +endef +endef + +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) +endef + +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),lede-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin) +endif + +define Build/Configure + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(UBOOT_CONFIG)_config +endef define Build/Compile +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ @@ -91,4 +76,27 @@ define Build/Compile KCFLAGS="$(filter-out -fstack-protector, $(TARGET_CFLAGS))" endef -$(eval $(call BuildPackage/U-Boot)) +define Package/uboot/install/default + $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) + + $(CP) $(PKG_BUILD_DIR)/u-boot.bin \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.bin + + $(CP) $(PKG_BUILD_DIR)/boot.bin \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/boot.bin +endef + +define Package/uboot/install/template +define Package/uboot-at91-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-at91-$(u))) \ +) diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 57a2ec539..784fc6423 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -19,7 +19,7 @@ PKG_SOURCE_URL:=\ ftp://ftp.denx.de/pub/u-boot PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955 -PKG_BUILD_DEPENDS:=fstools +PKG_BUILD_DEPENDS:=+fstools PKG_LICENSE:=GPL-2.0 GPL-2.0+ PKG_LICENSE_FILES:=Licenses/README @@ -112,10 +112,6 @@ ifneq ($(CONFIG_TARGET_oxnas),) $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/oxnas $(1)/etc/uci-defaults/30_uboot-envtools endif -ifneq ($(CONFIG_TARGET_pistachio),) - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_DATA) ./files/pistachio $(1)/etc/uci-defaults/30_uboot-envtools -endif ifneq ($(CONFIG_TARGET_ramips),) $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 6acfa6969..25bec7eb3 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -7,10 +7,11 @@ touch /etc/config/ubootenv +. /lib/ar71xx.sh . /lib/uboot-envtools.sh . /lib/functions.sh -board=$(board_name) +board=$(ar71xx_board_name) case "$board" in a40|\ @@ -19,7 +20,6 @@ alfa-ap120c|\ all0258n|\ ap121f|\ ap90q|\ -arduino-yun|\ cap324|\ cap4200ag|\ carambola2|\ @@ -28,7 +28,6 @@ cpe870|\ cr3000|\ cr5000|\ eap300v2|\ -ens202ext|\ gl-ar300m|\ hornet-ub|\ hornet-ub-x2|\ @@ -66,20 +65,12 @@ dap-2695-a1|\ wzr-hp-ag300h) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000" ;; -dr342|\ dr531) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000" ;; -rambutan) - ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" - ubootenv_add_uci_config "/dev/mtd1" "0x100000" "0x20000" "0x20000" - ;; qihoo-c301) ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000" ;; -wi2a-ac200i) - ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x8000" "0x10000" - ;; esac config_load ubootenv diff --git a/package/boot/uboot-envtools/files/cns3xxx b/package/boot/uboot-envtools/files/cns3xxx index f998de463..a56be15c5 100644 --- a/package/boot/uboot-envtools/files/cns3xxx +++ b/package/boot/uboot-envtools/files/cns3xxx @@ -7,10 +7,11 @@ touch /etc/config/ubootenv +. /lib/cns3xxx.sh . /lib/uboot-envtools.sh . /lib/functions.sh -board=$(board_name) +board=$(cns3xxx_board_name) case "$board" in laguna) diff --git a/package/boot/uboot-envtools/files/imx6 b/package/boot/uboot-envtools/files/imx6 index fec8ce0aa..a78c4fbe5 100644 --- a/package/boot/uboot-envtools/files/imx6 +++ b/package/boot/uboot-envtools/files/imx6 @@ -7,10 +7,11 @@ touch /etc/config/ubootenv +. /lib/imx6.sh . /lib/uboot-envtools.sh . /lib/functions.sh -board=$(board_name) +board=$(imx6_board_name) case "$board" in *gw5*) diff --git a/package/boot/uboot-envtools/files/ipq b/package/boot/uboot-envtools/files/ipq index b7162807f..16c7ba6bb 100644 --- a/package/boot/uboot-envtools/files/ipq +++ b/package/boot/uboot-envtools/files/ipq @@ -7,33 +7,13 @@ touch /etc/config/ubootenv +. /lib/ipq806x.sh . /lib/uboot-envtools.sh . /lib/functions.sh -board=$(board_name) - -ubootenv_mtdinfo () { - UBOOTENV_PART=$(cat /proc/mtd | grep APPSBLENV) - mtd_dev=$(echo $UBOOTENV_PART | awk '{print $1}' | sed 's/:$//') - mtd_size=$(echo $UBOOTENV_PART | awk '{print "0x"$2}') - mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}') - nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev}) - - if [ -n "$nor_flash" ]; then - ubootenv_size=$mtd_size - else - # size is fixed to 0x40000 in u-boot - ubootenv_size=0x40000 - fi - - sectors=$(( $ubootenv_size / $mtd_erase )) - echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors -} +board=$(ipq806x_board_name) case "$board" in -ap148 | db149) - ubootenv_add_uci_config $(ubootenv_mtdinfo) - ;; ea8500) ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x20000" "0x20000" ;; diff --git a/package/boot/uboot-envtools/files/kirkwood b/package/boot/uboot-envtools/files/kirkwood index 3b770c12f..055e0eba4 100644 --- a/package/boot/uboot-envtools/files/kirkwood +++ b/package/boot/uboot-envtools/files/kirkwood @@ -7,18 +7,17 @@ touch /etc/config/ubootenv +. /lib/kirkwood.sh . /lib/uboot-envtools.sh . /lib/functions.sh -board=$(board_name) +board=$(kirkwood_board_name) case "$board" in dockstar|\ guruplug-server-plus|\ ib62x0|\ linksys-viper|\ -nsa310b|\ -nsa325|\ pogo_e02|\ sheevaplug|\ sheevaplug-esata) diff --git a/package/boot/uboot-envtools/files/lantiq b/package/boot/uboot-envtools/files/lantiq index f4541a559..d1a6668e8 100644 --- a/package/boot/uboot-envtools/files/lantiq +++ b/package/boot/uboot-envtools/files/lantiq @@ -13,19 +13,19 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in -bt,homehub-v2b) +BTHOMEHUBV2B) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1" ;; -bt,homehub-v3a) +BTHOMEHUBV3A) ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1" ;; -siemens,gigaset-sx76x) +GIGASX76X) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1" ;; -zyxel,p-2812hnu-f1) +P2812HNUF1) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1" ;; -buffalo,wbmr-300hpd) +WBMR300) idx="$(find_mtd_index ubootconfig)" [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2" diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index e33830e0a..2bbbc2366 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -8,10 +8,11 @@ touch /etc/config/ubootenv +. /lib/mvebu.sh . /lib/uboot-envtools.sh . /lib/functions.sh -board=$(board_name) +board=$(mvebu_board_name) case "$board" in armada-385-linksys-caiman|\ diff --git a/package/boot/uboot-envtools/files/mxs b/package/boot/uboot-envtools/files/mxs index 37d3c96ed..ab8b4ef93 100644 --- a/package/boot/uboot-envtools/files/mxs +++ b/package/boot/uboot-envtools/files/mxs @@ -7,10 +7,11 @@ touch /etc/config/ubootenv +. /lib/mxs.sh . /lib/uboot-envtools.sh . /lib/functions.sh -board=$(board_name) +board=$(mxs_board_name) case "$board" in duckbill) diff --git a/package/boot/uboot-envtools/files/oxnas b/package/boot/uboot-envtools/files/oxnas index 70b0f1663..ac4744e3e 100644 --- a/package/boot/uboot-envtools/files/oxnas +++ b/package/boot/uboot-envtools/files/oxnas @@ -7,10 +7,11 @@ touch /etc/config/ubootenv +. /lib/oxnas.sh . /lib/uboot-envtools.sh . /lib/functions.sh -board=$(board_name) +board=$(oxnas_board_name) case "$board" in akitio|\ diff --git a/package/boot/uboot-envtools/files/pistachio b/package/boot/uboot-envtools/files/pistachio deleted file mode 100644 index e4aa7b0cd..000000000 --- a/package/boot/uboot-envtools/files/pistachio +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -[ -e /etc/config/ubootenv ] && exit 0 - -touch /etc/config/ubootenv - -. /lib/uboot-envtools.sh -. /lib/functions.sh - -board=$(board_name) - -case "$board" in -img,pistachio-marduk) - ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x2000" "0x1000" - ;; -esac - -config_load ubootenv -config_foreach ubootenv_add_app_config ubootenv - -exit 0 diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index ce200a1ff..3216b300c 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -7,19 +7,21 @@ touch /etc/config/ubootenv +. /lib/ramips.sh . /lib/uboot-envtools.sh . /lib/functions.sh -board=$(board_name) +board=$(ramips_board_name) case "$board" in all0239-3g|\ -all0256n-4M|\ -all0256n-8M|\ +all0256n|\ all5002) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" ;; +br-6425|\ linkits7688|\ +linkits7688d|\ miwifi-nano|\ sk-wb8|\ wsr-1166|\ @@ -27,9 +29,6 @@ wsr-600|\ zbt-wg2626) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ;; -mir3g) - ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" - ;; esac config_load ubootenv diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile deleted file mode 100644 index 9f9b4e05f..000000000 --- a/package/boot/uboot-fritz4040/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (C) 2013-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=6946ebbaf7b12a4a092d763c8f0c87a25984f103 -PKG_SOURCE_DATE:=2017-01-29 -PKG_MIRROR_HASH:=5c2394f51a083dca2a2bf9cb36fa717f252112fc792c9eeae64f6383ad08987b - -PKG_RELEASE:=1 - -include $(INCLUDE_DIR)/u-boot.mk -include $(INCLUDE_DIR)/package.mk - -define U-Boot/Default - BUILD_TARGET:=ipq806x - UBOOT_IMAGE:=uboot-fritz4040.bin -endef - -define U-Boot/fritz4040 - NAME:=FritzBox 4040 -endef - -UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes -UBOOT_MAKE_FLAGS += USE_PRIVATE_LIBGCC=yes -export DTC - -define Build/Configure - $(Build/Configure/U-Boot) - $(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/lzma2eva $(PKG_BUILD_DIR)/fritz/src/lzma2eva.c -lz - $(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/tichksum $(PKG_BUILD_DIR)/fritz/src/tichksum.c - ln -sf $(STAGING_DIR_HOST)/bin/lzma $(PKG_BUILD_DIR)/fritz -endef - -define Build/Compile - $(Build/Compile/U-Boot) - (cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh;) -endef - -define Package/u-boot/install - $(Package/u-boot/install/default) - $(INSTALL_BIN) ./files/upload-to-f4040.sh $(1)/ -endef - -UBOOT_TARGETS := fritz4040 - -$(eval $(call BuildPackage/U-Boot)) diff --git a/package/boot/uboot-fritz4040/files/upload-to-f4040.sh b/package/boot/uboot-fritz4040/files/upload-to-f4040.sh deleted file mode 100755 index 64f493190..000000000 --- a/package/boot/uboot-fritz4040/files/upload-to-f4040.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -die() { - echo $1 - exit 1 -} - -FRITZBOX='192.168.178.1' -USER='adam2' -PASSWD='adam2' -FILE='uboot-fritz4040.bin' - -ping -q -4 -w 1 -c 1 "$FRITZBOX" &> /dev/null || die "Fritzbox at $FRITZBOX is not reachable. aborting" - -cat << EOS - -This will take ages (2 minutes)! If you want a -status bar: Attach a serial to the device and look there. - -Note: If this fails, you need to use AVM\' recover -utility to get your box back. However this step -should not damage your box.... - -Also it doesn't terminate.. :/ - -(Note: Make sure that you connected the router on -the yellow LAN ports and not the blue WAN). - -EOS - -ftp -n -4 "$FRITZBOX" << END_SCRIPT -quote USER $USER -quote PASS $PASSWD -quote MEDIA FLSH -binary -passive -put $FILE mtd1 -quote check mtd1 -bye -END_SCRIPT -exit 0 diff --git a/package/boot/uboot-fritz4040/patches/100-private-libgcc.patch b/package/boot/uboot-fritz4040/patches/100-private-libgcc.patch deleted file mode 100644 index 6fec563da..000000000 --- a/package/boot/uboot-fritz4040/patches/100-private-libgcc.patch +++ /dev/null @@ -1,274 +0,0 @@ ---- a/arch/arm/lib/Makefile -+++ b/arch/arm/lib/Makefile -@@ -26,7 +26,6 @@ include $(TOPDIR)/config.mk - LIB = $(obj)lib$(ARCH).o - LIBGCC = $(obj)libgcc.o - --ifndef CONFIG_SPL_BUILD - GLSOBJS += _ashldi3.o - GLSOBJS += _ashrdi3.o - GLSOBJS += _divsi3.o -@@ -34,9 +33,11 @@ GLSOBJS += _lshrdi3.o - GLSOBJS += _modsi3.o - GLSOBJS += _udivsi3.o - GLSOBJS += _umodsi3.o -+GLSOBJS += uldivmod.o - - GLCOBJS += div0.o - -+ifndef CONFIG_SPL_BUILD - COBJS-y += board.o - COBJS-y += bootm.o - COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o ---- /dev/null -+++ b/arch/arm/lib/uldivmod.S -@@ -0,0 +1,249 @@ -+/* -+ * Copyright 2010, Google Inc. -+ * -+ * Brought in from coreboot uldivmod.S -+ * -+ * SPDX-License-Identifier: GPL-2.0 -+ */ -+ -+#include -+#include -+ -+/* -+ * A, Q = r0 + (r1 << 32) -+ * B, R = r2 + (r3 << 32) -+ * A / B = Q ... R -+ */ -+ -+#define ARM(x...) x -+#define THUMB(x...) -+ -+A_0 .req r0 -+A_1 .req r1 -+B_0 .req r2 -+B_1 .req r3 -+C_0 .req r4 -+C_1 .req r5 -+D_0 .req r6 -+D_1 .req r7 -+ -+Q_0 .req r0 -+Q_1 .req r1 -+R_0 .req r2 -+R_1 .req r3 -+ -+THUMB( -+TMP .req r8 -+) -+ -+.pushsection .text.__aeabi_uldivmod, "ax" -+ENTRY(__aeabi_uldivmod) -+ -+ stmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) lr} -+ @ Test if B == 0 -+ orrs ip, B_0, B_1 @ Z set -> B == 0 -+ beq L_div_by_0 -+ @ Test if B is power of 2: (B & (B - 1)) == 0 -+ subs C_0, B_0, #1 -+ sbc C_1, B_1, #0 -+ tst C_0, B_0 -+ tsteq B_1, C_1 -+ beq L_pow2 -+ @ Test if A_1 == B_1 == 0 -+ orrs ip, A_1, B_1 -+ beq L_div_32_32 -+ -+L_div_64_64: -+/* CLZ only exists in ARM architecture version 5 and above. */ -+#ifdef HAVE_CLZ -+ mov C_0, #1 -+ mov C_1, #0 -+ @ D_0 = clz A -+ teq A_1, #0 -+ clz D_0, A_1 -+ clzeq ip, A_0 -+ addeq D_0, D_0, ip -+ @ D_1 = clz B -+ teq B_1, #0 -+ clz D_1, B_1 -+ clzeq ip, B_0 -+ addeq D_1, D_1, ip -+ @ if clz B - clz A > 0 -+ subs D_0, D_1, D_0 -+ bls L_done_shift -+ @ B <<= (clz B - clz A) -+ subs D_1, D_0, #32 -+ rsb ip, D_0, #32 -+ movmi B_1, B_1, lsl D_0 -+ARM( orrmi B_1, B_1, B_0, lsr ip ) -+THUMB( lsrmi TMP, B_0, ip ) -+THUMB( orrmi B_1, B_1, TMP ) -+ movpl B_1, B_0, lsl D_1 -+ mov B_0, B_0, lsl D_0 -+ @ C = 1 << (clz B - clz A) -+ movmi C_1, C_1, lsl D_0 -+ARM( orrmi C_1, C_1, C_0, lsr ip ) -+THUMB( lsrmi TMP, C_0, ip ) -+THUMB( orrmi C_1, C_1, TMP ) -+ movpl C_1, C_0, lsl D_1 -+ mov C_0, C_0, lsl D_0 -+L_done_shift: -+ mov D_0, #0 -+ mov D_1, #0 -+ @ C: current bit; D: result -+#else -+ @ C: current bit; D: result -+ mov C_0, #1 -+ mov C_1, #0 -+ mov D_0, #0 -+ mov D_1, #0 -+L_lsl_4: -+ cmp B_1, #0x10000000 -+ cmpcc B_1, A_1 -+ cmpeq B_0, A_0 -+ bcs L_lsl_1 -+ @ B <<= 4 -+ mov B_1, B_1, lsl #4 -+ orr B_1, B_1, B_0, lsr #28 -+ mov B_0, B_0, lsl #4 -+ @ C <<= 4 -+ mov C_1, C_1, lsl #4 -+ orr C_1, C_1, C_0, lsr #28 -+ mov C_0, C_0, lsl #4 -+ b L_lsl_4 -+L_lsl_1: -+ cmp B_1, #0x80000000 -+ cmpcc B_1, A_1 -+ cmpeq B_0, A_0 -+ bcs L_subtract -+ @ B <<= 1 -+ mov B_1, B_1, lsl #1 -+ orr B_1, B_1, B_0, lsr #31 -+ mov B_0, B_0, lsl #1 -+ @ C <<= 1 -+ mov C_1, C_1, lsl #1 -+ orr C_1, C_1, C_0, lsr #31 -+ mov C_0, C_0, lsl #1 -+ b L_lsl_1 -+#endif -+L_subtract: -+ @ if A >= B -+ cmp A_1, B_1 -+ cmpeq A_0, B_0 -+ bcc L_update -+ @ A -= B -+ subs A_0, A_0, B_0 -+ sbc A_1, A_1, B_1 -+ @ D |= C -+ orr D_0, D_0, C_0 -+ orr D_1, D_1, C_1 -+L_update: -+ @ if A == 0: break -+ orrs ip, A_1, A_0 -+ beq L_exit -+ @ C >>= 1 -+ movs C_1, C_1, lsr #1 -+ movs C_0, C_0, rrx -+ @ if C == 0: break -+ orrs ip, C_1, C_0 -+ beq L_exit -+ @ B >>= 1 -+ movs B_1, B_1, lsr #1 -+ mov B_0, B_0, rrx -+ b L_subtract -+L_exit: -+ @ Note: A, B & Q, R are aliases -+ mov R_0, A_0 -+ mov R_1, A_1 -+ mov Q_0, D_0 -+ mov Q_1, D_1 -+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc} -+ -+L_div_32_32: -+ @ Note: A_0 & r0 are aliases -+ @ Q_1 r1 -+ mov r1, B_0 -+ bl __aeabi_uidivmod -+ mov R_0, r1 -+ mov R_1, #0 -+ mov Q_1, #0 -+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc} -+ -+L_pow2: -+#ifdef HAVE_CLZ -+ @ Note: A, B and Q, R are aliases -+ @ R = A & (B - 1) -+ and C_0, A_0, C_0 -+ and C_1, A_1, C_1 -+ @ Q = A >> log2(B) -+ @ Note: B must not be 0 here! -+ clz D_0, B_0 -+ add D_1, D_0, #1 -+ rsbs D_0, D_0, #31 -+ bpl L_1 -+ clz D_0, B_1 -+ rsb D_0, D_0, #31 -+ mov A_0, A_1, lsr D_0 -+ add D_0, D_0, #32 -+L_1: -+ movpl A_0, A_0, lsr D_0 -+ARM( orrpl A_0, A_0, A_1, lsl D_1 ) -+THUMB( lslpl TMP, A_1, D_1 ) -+THUMB( orrpl A_0, A_0, TMP ) -+ mov A_1, A_1, lsr D_0 -+ @ Mov back C to R -+ mov R_0, C_0 -+ mov R_1, C_1 -+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc} -+#else -+ @ Note: A, B and Q, R are aliases -+ @ R = A & (B - 1) -+ and C_0, A_0, C_0 -+ and C_1, A_1, C_1 -+ @ Q = A >> log2(B) -+ @ Note: B must not be 0 here! -+ @ Count the leading zeroes in B. -+ mov D_0, #0 -+ orrs B_0, B_0, B_0 -+ @ If B is greater than 1 << 31, divide A and B by 1 << 32. -+ moveq A_0, A_1 -+ moveq A_1, #0 -+ moveq B_0, B_1 -+ @ Count the remaining leading zeroes in B. -+ movs B_1, B_0, lsl #16 -+ addeq D_0, #16 -+ moveq B_0, B_0, lsr #16 -+ tst B_0, #0xff -+ addeq D_0, #8 -+ moveq B_0, B_0, lsr #8 -+ tst B_0, #0xf -+ addeq D_0, #4 -+ moveq B_0, B_0, lsr #4 -+ tst B_0, #0x3 -+ addeq D_0, #2 -+ moveq B_0, B_0, lsr #2 -+ tst B_0, #0x1 -+ addeq D_0, #1 -+ @ Shift A to the right by the appropriate amount. -+ rsb D_1, D_0, #32 -+ mov Q_0, A_0, lsr D_0 -+ ARM( orr Q_0, Q_0, A_1, lsl D_1 ) -+ THUMB( lsl A_1, D_1 ) -+ THUMB( orr Q_0, A_1 ) -+ mov Q_1, A_1, lsr D_0 -+ @ Move C to R -+ mov R_0, C_0 -+ mov R_1, C_1 -+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc} -+#endif -+ -+L_div_by_0: -+ bl __div0 -+ @ As wrong as it could be -+ mov Q_0, #0 -+ mov Q_1, #0 -+ mov R_0, #0 -+ mov R_1, #0 -+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc} -+ENDPROC(__aeabi_uldivmod) -+.popsection diff --git a/package/boot/uboot-fritz4040/patches/110-portability.patch b/package/boot/uboot-fritz4040/patches/110-portability.patch deleted file mode 100644 index 08ab88912..000000000 --- a/package/boot/uboot-fritz4040/patches/110-portability.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: u-boot-2017-01-29-6946ebba/fritz/fritzcreator.sh -=================================================================== ---- u-boot-2017-01-29-6946ebba.orig/fritz/fritzcreator.sh -+++ u-boot-2017-01-29-6946ebba/fritz/fritzcreator.sh -@@ -1,4 +1,4 @@ --#!/bin/sh -xe -+#!/bin/bash -xe - - # A helpful - # -@@ -11,6 +11,7 @@ UBOOT_FRITZ4040="uboot-fritz4040.bin" - FRITZ_DTS="fritz/fritz4040.dts" - FRITZ_DTB="fritz4040.dtb" - UBOOT_LOADADDR=0x841FFFF8 -+DTC="${DTC:-dtc}" - - rm -f "$UBOOT_FRITZ4040" - -@@ -44,11 +45,11 @@ printf "\x00\x00\x00\xea\xf8\x01\x33\xc4 - cat "$UBOOT_BIN" >> "$UBOOT_FRITZ4040" - - # Pad file to 1M --dd if="$UBOOT_FRITZ4040" of="$UBOOT_FRITZ4040.new" bs=1M count=1 conv=sync -+dd if="$UBOOT_FRITZ4040" of="$UBOOT_FRITZ4040.new" bs=1024k count=1 conv=sync - mv "$UBOOT_FRITZ4040.new" "$UBOOT_FRITZ4040" - - # Compile DTS --dtc "$FRITZ_DTS" -o "$FRITZ_DTB" --space 49152 -+$DTC "$FRITZ_DTS" -o "$FRITZ_DTB" --space 49152 - - # Append the compiled DTBs - cat "$FRITZ_DTB" "$FRITZ_DTB" "$FRITZ_DTB" "$FRITZ_DTB" >> $UBOOT_FRITZ4040 diff --git a/package/boot/uboot-imx6/Makefile b/package/boot/uboot-imx6/Makefile index 8d422758d..884d8c034 100644 --- a/package/boot/uboot-imx6/Makefile +++ b/package/boot/uboot-imx6/Makefile @@ -7,63 +7,68 @@ include $(TOPDIR)/rules.mk +PKG_NAME:=u-boot PKG_VERSION:=2014.04 PKG_RELEASE:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot PKG_HASH:=7b6444bd23eb61068c43bd1d44ec7e7bfdbce5cadeca20c833eee186b4d3fd31 -include $(INCLUDE_DIR)/u-boot.mk +PKG_BUILD_PARALLEL:=1 + include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=imx6 - UBOOT_IMAGE:=u-boot.imx +define uboot/Default + TITLE:= + CONFIG:= + IMAGE:= endef -define U-Boot/mx6qsabresd - NAME:=SABRE i.MX6Quad board +define uboot/mx6qsabresd + TITLE:=U-Boot for SABRE i.MX6Quad board endef -define U-Boot/nitrogen6dl - NAME:=Nitrogen6x i.MX6Dual-Lite 1GB board +define uboot/nitrogen6dl + TITLE:=U-Boot for Nitrogen6x i.MX6Dual-Lite 1GB board endef -define U-Boot/nitrogen6dl2g - NAME:=Nitrogen6x i.MX6Dual-Lite 2GB board +define uboot/nitrogen6dl2g + TITLE:=U-Boot for Nitrogen6x i.MX6Dual-Lite 2GB board endef -define U-Boot/nitrogen6q - NAME:=Nitrogen6x/SABRE Lite (MX6Q/1GB) +define uboot/nitrogen6q + TITLE:=U-Boot for Nitrogen6x/SABRE Lite (MX6Q/1GB) endef -define U-Boot/nitrogen6q2g - NAME:=Nitrogen6x i.MX6Quad 2GB board +define uboot/nitrogen6q2g + TITLE:=U-Boot for Nitrogen6x i.MX6Quad 2GB board endef -define U-Boot/nitrogen6s - NAME:=Nitrogen6x i.MX6Solo 512MB board +define uboot/nitrogen6s + TITLE:=U-Boot for Nitrogen6x i.MX6Solo 512MB board endef -define U-Boot/nitrogen6s1g - NAME:=Nitrogen6x i.MX6Solo 1GB board +define uboot/nitrogen6s1g + TITLE:=U-Boot for Nitrogen6x i.MX6Solo 1GB board endef -define U-Boot/wandboard_dl - NAME:=Wandboard Dual Lite - BUILD_DEVICES:=wandboard +define uboot/wandboard_dl + TITLE:=U-Boot for the Wandboard Dual Lite endef -define U-Boot/wandboard_quad - NAME:=Wandboard Quad - BUILD_DEVICES:=wandboard +define uboot/wandboard_quad + TITLE:=U-Boot for the Wandboard Quad endef -define U-Boot/wandboard_solo - NAME:=Wandboard Solo - BUILD_DEVICES:=wandboard +define uboot/wandboard_solo + TITLE:=U-Boot for the Wandboard Solo endef -UBOOT_TARGETS := \ +UBOOTS := \ mx6qsabresd \ nitrogen6dl \ nitrogen6dl2g \ @@ -75,4 +80,58 @@ UBOOT_TARGETS := \ wandboard_quad \ wandboard_solo -$(eval $(call BuildPackage/U-Boot)) +define Package/uboot/template +define Package/uboot-imx6-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_imx6 + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) + MAINTAINER:=Luka Perkov +endef +endef + +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) +endef + +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin) +endif + +define Build/Configure + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(UBOOT_CONFIG)_config +endef + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) +endef + +define Package/uboot/install/default + $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) + $(CP) \ + $(PKG_BUILD_DIR)/u-boot.imx \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.imx +endef + +define Package/uboot/install/template +define Package/uboot-imx6-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-imx6-$(u))) \ +) diff --git a/package/boot/uboot-kirkwood/Makefile b/package/boot/uboot-kirkwood/Makefile index 929fca6ae..74b9f0fde 100644 --- a/package/boot/uboot-kirkwood/Makefile +++ b/package/boot/uboot-kirkwood/Makefile @@ -7,77 +7,94 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=2017.09 +PKG_NAME:=u-boot +PKG_VERSION:=2016.09.01 PKG_RELEASE:=1 -PKG_HASH:=b2d15f2cf5f72e706025cde73d67247c6da8cd35f7e10891eefe7d9095089744 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=\ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot +PKG_HASH:=95728e89dd476d17428f94080752ab48884be477b6a678941582aeef618b70bb +PKG_TARGETS:=bin + +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + +PKG_BUILD_PARALLEL:=1 -include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=kirkwood - BUILD_DEVICES:=$(patsubst %_second_stage,%,$(1)) +define uboot/Default + TITLE:= endef -define U-Boot/dockstar - NAME:=Seagate DockStar +define uboot/dockstar + TITLE:=U-Boot for Seagate DockStar endef -define U-Boot/dockstar_second_stage - NAME:=Seagate DockStar (second stage) +define uboot/dockstar_second_stage + TITLE:=second stage U-Boot for Seagate DockStar endef -define U-Boot/goflexhome - NAME:=the Seagate GoFlexHome/GoFlexNet +define uboot/goflexhome + TITLE:=U-Boot for the Seagate GoFlexHome/GoFlexNet endef -define U-Boot/ib62x0 - NAME:=RaidSonic ICY BOX NAS6210 and NAS6220 +define uboot/ib62x0 + TITLE:=U-Boot for RaidSonic ICY BOX NAS6210 and NAS6220 endef -define U-Boot/ib62x0_second_stage - NAME:=RaidSonic ICY BOX NAS6210 and NAS6220 (second stage) +define uboot/ib62x0_second_stage + TITLE:=second stage U-Boot for RaidSonic ICY BOX NAS6210 and NAS6220 endef -define U-Boot/iconnect - NAME:=Iomega iConnect Wireless +define uboot/iconnect + TITLE:=U-Boot for Iomega iConnect Wireless endef -define U-Boot/iconnect_second_stage - NAME:=Iomega iConnect Wireless (second stage) +define uboot/iconnect_second_stage + TITLE:=second stage U-Boot for Iomega iConnect Wireless endef -define U-Boot/nsa310 - NAME:=Zyxel NSA310 +define uboot/pogo_e02 + TITLE:=U-Boot for Cloud Engines Pogoplug E02 endef -define U-Boot/nsa325 - NAME:=Zyxel NSA325v1 and v2 +define uboot/pogo_e02_second_stage + TITLE:=second stage U-Boot for Cloud Engines Pogoplug E02 endef -define U-Boot/pogo_e02 - NAME:=Cloud Engines Pogoplug E02 +define uboot/sheevaplug + TITLE:=U-Boot for SheevaPlug endef -define U-Boot/pogo_e02_second_stage - NAME:=Cloud Engines Pogoplug E02 (second stage) -endef - -define U-Boot/sheevaplug - NAME:=SheevaPlug -endef - -UBOOT_TARGETS := \ +UBOOTS:= \ dockstar dockstar_second_stage \ goflexhome \ ib62x0 ib62x0_second_stage \ iconnect iconnect_second_stage \ - nsa310 \ - nsa325 \ pogo_e02 pogo_e02_second_stage \ sheevaplug +define Package/uboot/template +define Package/uboot-kirkwood-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_kirkwood + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) +endef +endef + +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) +endef + define Build/Configure $(if $(findstring _second_stage,$(BUILD_VARIANT)), $(CP) \ @@ -95,21 +112,34 @@ define Build/Compile CROSS_COMPILE=$(TARGET_CROSS) mkimage -A $(ARCH) -O linux -T kernel -C none \ -a 0x600000 -e 0x600000 \ - -n 'U-Boot uImage' \ + -n 'OpenWrt Das U-Boot uImage' \ -d $(PKG_BUILD_DIR)/u-boot.bin $(PKG_BUILD_DIR)/u-boot.img endef -define Package/u-boot/install - $(CP) \ - $(PKG_BUILD_DIR)/u-boot.bin \ - $(PKG_BUILD_DIR)/u-boot.kwb \ - $(PKG_BUILD_DIR)/u-boot.img \ - $(1)/ +define Package/uboot/install/default + $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) + $(CP) $(PKG_BUILD_DIR)/u-boot.bin \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin + $(CP) $(PKG_BUILD_DIR)/u-boot.kwb \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.kwb + $(CP) $(PKG_BUILD_DIR)/u-boot.img \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.img + $(INSTALL_DIR) $(BIN_DIR)/u-boot-kwboot/ + $(CP) $(PKG_BUILD_DIR)/tools/kwboot \ + $(BIN_DIR)/u-boot-kwboot/ endef -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/kwboot $(STAGING_DIR_HOST)/bin/ +define Package/uboot/install/template +define Package/uboot-kirkwood-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef endef -$(eval $(call BuildPackage/U-Boot)) +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-kirkwood-$(u))) \ +) diff --git a/package/boot/uboot-kirkwood/patches/0001-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch b/package/boot/uboot-kirkwood/patches/0001-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch new file mode 100644 index 000000000..65ae63f34 --- /dev/null +++ b/package/boot/uboot-kirkwood/patches/0001-kirkwood-ib62x0-add-CONFIG_SYS_GENERIC_BOARD-define.patch @@ -0,0 +1,27 @@ +From 280b03ba28b4287de677d4c4b097918364395b5e Mon Sep 17 00:00:00 2001 +From: Luka Perkov +Date: Wed, 2 Jul 2014 01:47:23 +0200 +Subject: [PATCH 4/9] kirkwood: ib62x0: add CONFIG_SYS_GENERIC_BOARD define + +Signed-off-by: Luka Perkov +CC: Prafulla Wadaskar +CC: Stefan Roese +--- +This is patch was sent already in July: + +http://lists.denx.de/pipermail/u-boot/2014-July/182900.html +--- + include/configs/ib62x0.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/configs/ib62x0.h ++++ b/include/configs/ib62x0.h +@@ -9,6 +9,8 @@ + #ifndef _CONFIG_IB62x0_H + #define _CONFIG_IB62x0_H + ++#define CONFIG_SYS_GENERIC_BOARD ++ + /* + * Version number information + */ diff --git a/package/boot/uboot-kirkwood/patches/0002-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch b/package/boot/uboot-kirkwood/patches/0002-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch new file mode 100644 index 000000000..6ec605229 --- /dev/null +++ b/package/boot/uboot-kirkwood/patches/0002-kirkwood-dockstar-add-CONFIG_SYS_GENERIC_BOARD-defin.patch @@ -0,0 +1,23 @@ +From 5f9e6f640098e6963ff9b470cd5d2ab9f6a3579e Mon Sep 17 00:00:00 2001 +From: Luka Perkov +Date: Sun, 30 Nov 2014 02:40:37 +0100 +Subject: [PATCH 5/9] kirkwood: dockstar: add CONFIG_SYS_GENERIC_BOARD define + +Signed-off-by: Luka Perkov +CC: Prafulla Wadaskar +CC: Stefan Roese +--- + include/configs/dockstar.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/configs/dockstar.h ++++ b/include/configs/dockstar.h +@@ -12,6 +12,8 @@ + #ifndef _CONFIG_DOCKSTAR_H + #define _CONFIG_DOCKSTAR_H + ++#define CONFIG_SYS_GENERIC_BOARD ++ + /* + * Version number information + */ diff --git a/package/boot/uboot-kirkwood/patches/0003-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch b/package/boot/uboot-kirkwood/patches/0003-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch new file mode 100644 index 000000000..ac0bc0d2a --- /dev/null +++ b/package/boot/uboot-kirkwood/patches/0003-kirkwood-goflexhome-add-CONFIG_SYS_GENERIC_BOARD-def.patch @@ -0,0 +1,23 @@ +From 0d0a6606396f0cc1a4f2966d167ef9e85d533650 Mon Sep 17 00:00:00 2001 +From: Luka Perkov +Date: Sun, 30 Nov 2014 02:40:51 +0100 +Subject: [PATCH 6/9] kirkwood: goflexhome: add CONFIG_SYS_GENERIC_BOARD define + +Signed-off-by: Luka Perkov +CC: Prafulla Wadaskar +CC: Stefan Roese +--- + include/configs/goflexhome.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/configs/goflexhome.h ++++ b/include/configs/goflexhome.h +@@ -15,6 +15,8 @@ + #ifndef _CONFIG_GOFLEXHOME_H + #define _CONFIG_GOFLEXHOME_H + ++#define CONFIG_SYS_GENERIC_BOARD ++ + /* + * Version number information + */ diff --git a/package/boot/uboot-kirkwood/patches/0004-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch b/package/boot/uboot-kirkwood/patches/0004-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch new file mode 100644 index 000000000..ab23481f7 --- /dev/null +++ b/package/boot/uboot-kirkwood/patches/0004-kirkwood-iconnect-add-CONFIG_SYS_GENERIC_BOARD-defin.patch @@ -0,0 +1,23 @@ +From 45ba20427135e526cfa528773de0cfe215f4dc40 Mon Sep 17 00:00:00 2001 +From: Luka Perkov +Date: Sun, 30 Nov 2014 02:41:04 +0100 +Subject: [PATCH 7/9] kirkwood: iconnect: add CONFIG_SYS_GENERIC_BOARD define + +Signed-off-by: Luka Perkov +CC: Prafulla Wadaskar +CC: Stefan Roese +--- + include/configs/iconnect.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/configs/iconnect.h ++++ b/include/configs/iconnect.h +@@ -9,6 +9,8 @@ + #ifndef _CONFIG_ICONNECT_H + #define _CONFIG_ICONNECT_H + ++#define CONFIG_SYS_GENERIC_BOARD ++ + /* + * Version number information + */ diff --git a/package/boot/uboot-kirkwood/patches/0005-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch b/package/boot/uboot-kirkwood/patches/0005-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch new file mode 100644 index 000000000..40918d473 --- /dev/null +++ b/package/boot/uboot-kirkwood/patches/0005-kirkwood-pogo_e02-add-CONFIG_SYS_GENERIC_BOARD-defin.patch @@ -0,0 +1,23 @@ +From bd862f4e7a559e38763a5280e35bf7ff14b535f1 Mon Sep 17 00:00:00 2001 +From: Luka Perkov +Date: Sun, 30 Nov 2014 02:41:19 +0100 +Subject: [PATCH 8/9] kirkwood: pogo_e02: add CONFIG_SYS_GENERIC_BOARD define + +Signed-off-by: Luka Perkov +CC: Prafulla Wadaskar +CC: Stefan Roese +--- + include/configs/pogo_e02.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/configs/pogo_e02.h ++++ b/include/configs/pogo_e02.h +@@ -13,6 +13,8 @@ + #ifndef _CONFIG_POGO_E02_H + #define _CONFIG_POGO_E02_H + ++#define CONFIG_SYS_GENERIC_BOARD ++ + /* + * Machine type definition and ID + */ diff --git a/package/boot/uboot-kirkwood/patches/0006-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch b/package/boot/uboot-kirkwood/patches/0006-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch new file mode 100644 index 000000000..d976bbc02 --- /dev/null +++ b/package/boot/uboot-kirkwood/patches/0006-kirkwood-sheevaplug-add-CONFIG_SYS_GENERIC_BOARD-def.patch @@ -0,0 +1,23 @@ +From 787e23179708ddad7ecd9dcd6c841546689864b0 Mon Sep 17 00:00:00 2001 +From: Luka Perkov +Date: Sun, 30 Nov 2014 02:41:49 +0100 +Subject: [PATCH 9/9] kirkwood: sheevaplug: add CONFIG_SYS_GENERIC_BOARD define + +Signed-off-by: Luka Perkov +CC: Prafulla Wadaskar +CC: Stefan Roese +--- + include/configs/sheevaplug.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/configs/sheevaplug.h ++++ b/include/configs/sheevaplug.h +@@ -10,6 +10,8 @@ + #ifndef _CONFIG_SHEEVAPLUG_H + #define _CONFIG_SHEEVAPLUG_H + ++#define CONFIG_SYS_GENERIC_BOARD ++ + /* + * Version number information + */ diff --git a/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch b/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch deleted file mode 100644 index 10d8d4405..000000000 --- a/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch +++ /dev/null @@ -1,697 +0,0 @@ - -arm: kirkwood: add ZyXEL NSA310 device - -This patch add ZyXEL NSA310 1-Bay Media Server - -The ZyXEL NSA310 device is a Kirkwood based NAS: - -- SoC: Marvell 88F6702 1200Mhz -- SDRAM memory: 256MB DDR2 400Mhz -- Gigabit ethernet: PHY Realtek -- Flash memory: 128MB -- 1 Power button -- 1 Power LED (blue) -- 5 Status LED (green/red) -- 1 Copy/Sync button -- 1 Reset button -- 2 SATA II port (1 internal and 1 external eSata) -- 2 USB 2.0 ports (1 front and 1 back) -- Smart fan - -Signed-off-by: Alberto Bursi - -NOTE: this patch is ready for upstream, LEDE-specific parts are in - another patch - -diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig -index 9205b1e..819bd3b 100644 ---- a/arch/arm/mach-kirkwood/Kconfig -+++ b/arch/arm/mach-kirkwood/Kconfig -@@ -56,6 +56,9 @@ config TARGET_GOFLEXHOME - config TARGET_NAS220 - bool "BlackArmor NAS220" - -+config TARGET_NSA310 -+ bool "Zyxel NSA310 Board" -+ - config TARGET_NSA310S - bool "Zyxel NSA310S" - -@@ -80,6 +83,7 @@ source "board/raidsonic/ib62x0/Kconfig" - source "board/Seagate/dockstar/Kconfig" - source "board/Seagate/goflexhome/Kconfig" - source "board/Seagate/nas220/Kconfig" -+source "board/zyxel/nsa310/Kconfig" - source "board/zyxel/nsa310s/Kconfig" - - endif -diff --git a/board/zyxel/nsa310/Kconfig b/board/zyxel/nsa310/Kconfig -new file mode 100644 -index 0000000..145ade6 ---- /dev/null -+++ b/board/zyxel/nsa310/Kconfig -@@ -0,0 +1,12 @@ -+if TARGET_NSA310 -+ -+config SYS_BOARD -+ default "nsa310" -+ -+config SYS_VENDOR -+ default "zyxel" -+ -+config SYS_CONFIG_NAME -+ default "nsa310" -+ -+endif -diff --git a/board/zyxel/nsa310/MAINTAINERS b/board/zyxel/nsa310/MAINTAINERS -new file mode 100644 -index 0000000..d09f1ab ---- /dev/null -+++ b/board/zyxel/nsa310/MAINTAINERS -@@ -0,0 +1,6 @@ -+NSA310 BOARD -+M: Alberto Bursi -+S: Maintained -+F: board/zyxel/nsa310/ -+F: include/configs/nsa310.h -+F: configs/nsa310_defconfig -diff --git a/board/zyxel/nsa310/Makefile b/board/zyxel/nsa310/Makefile -new file mode 100644 -index 0000000..dfe93cc ---- /dev/null -+++ b/board/zyxel/nsa310/Makefile -@@ -0,0 +1,12 @@ -+# -+# (C) Copyright 2015 bodhi -+# -+# Based on -+# (C) Copyright 2009 -+# Marvell Semiconductor -+# Written-by: Prafulla Wadaskar -+# -+# SPDX-License-Identifier: GPL-2.0+ -+# -+ -+obj-y := nsa310.o -diff --git a/board/zyxel/nsa310/kwbimage.cfg b/board/zyxel/nsa310/kwbimage.cfg -new file mode 100644 -index 0000000..f60e1d2 ---- /dev/null -+++ b/board/zyxel/nsa310/kwbimage.cfg -@@ -0,0 +1,166 @@ -+# -+# Copyright (C) 2013 Rafal Kazmierowski -+# -+# Based on guruplug.c originally written by -+# Siddarth Gore -+# (C) Copyright 2009 -+# Marvell Semiconductor -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# 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., 51 Franklin Street, Fifth Floor, Boston, -+# MA 02110-1301 USA -+# -+# Refer docs/README.kwimage for more details about how-to configure -+# and create kirkwood boot image -+# -+ -+# Boot Media configurations -+BOOT_FROM nand -+#BOOT_FROM uart -+NAND_ECC_MODE default -+NAND_PAGE_SIZE 0x0800 -+ -+# SOC registers configuration using bootrom header extension -+# Maximum KWBIMAGE_MAX_CONFIG configurations allowed -+ -+# Configure RGMII-0 interface pad voltage to 1.8V -+DATA 0xFFD100e0 0x1b1b1b9b -+ -+#Dram initalization for SINGLE x16 CL=5 @ 400MHz -+DATA 0xFFD01400 0x43010c30 # DDR Configuration register -+# bit13-0: 0xc30 (3120 DDR2 clks refresh rate) -+# bit23-14: zero -+# bit24: 1= enable exit self refresh mode on DDR access -+# bit25: 1 required -+# bit29-26: zero -+# bit31-30: 01 -+ -+DATA 0xFFD01404 0x37543000 # DDR Controller Control Low -+# bit 4: 0=addr/cmd in smame cycle -+# bit 5: 0=clk is driven during self refresh, we don't care for APX -+# bit 6: 0=use recommended falling edge of clk for addr/cmd -+# bit14: 0=input buffer always powered up -+# bit18: 1=cpu lock transaction enabled -+# bit23-20: 5=recommended value for CL=5 and STARTBURST_DEL disabled bit31=0 -+# bit27-24: 7= CL+2, STARTBURST sample stages, for freqs 400MHz, unbuffered DIMM -+# bit30-28: 3 required -+# bit31: 0=no additional STARTBURST delay -+ -+DATA 0xFFD01408 0x22125451 # DDR Timing (Low) (active cycles value +1) -+# bit3-0: TRAS lsbs -+# bit7-4: TRCD -+# bit11- 8: TRP -+# bit15-12: TWR -+# bit19-16: TWTR -+# bit20: TRAS msb -+# bit23-21: 0x0 -+# bit27-24: TRRD -+# bit31-28: TRTP -+ -+DATA 0xFFD0140C 0x00000a33 # DDR Timing (High) -+# bit6-0: TRFC -+# bit8-7: TR2R -+# bit10-9: TR2W -+# bit12-11: TW2W -+# bit31-13: zero required -+ -+DATA 0xFFD01410 0x0000000c # DDR Address Control -+# bit1-0: 01, Cs0width=x8 -+# bit3-2: 10, Cs0size=1Gb -+# bit5-4: 01, Cs1width=x8 -+# bit7-6: 10, Cs1size=1Gb -+# bit9-8: 00, Cs2width=nonexistent -+# bit11-10: 00, Cs2size =nonexistent -+# bit13-12: 00, Cs3width=nonexistent -+# bit15-14: 00, Cs3size =nonexistent -+# bit16: 0, Cs0AddrSel -+# bit17: 0, Cs1AddrSel -+# bit18: 0, Cs2AddrSel -+# bit19: 0, Cs3AddrSel -+# bit31-20: 0 required -+ -+DATA 0xFFD01414 0x00000000 # DDR Open Pages Control -+# bit0: 0, OpenPage enabled -+# bit31-1: 0 required -+ -+DATA 0xFFD01418 0x00000000 # DDR Operation -+# bit3-0: 0x0, DDR cmd -+# bit31-4: 0 required -+ -+DATA 0xFFD0141C 0x00000652 # DDR Mode -+# bit2-0: 2, BurstLen=2 required -+# bit3: 0, BurstType=0 required -+# bit6-4: 4, CL=5 -+# bit7: 0, TestMode=0 normal -+# bit8: 0, DLL reset=0 normal -+# bit11-9: 6, auto-precharge write recovery ???????????? -+# bit12: 0, PD must be zero -+# bit31-13: 0 required -+ -+DATA 0xFFD01420 0x00000004 # DDR Extended Mode -+# bit0: 0, DDR DLL enabled -+# bit1: 0, DDR drive strenght normal -+# bit2: 0, DDR ODT control lsd (disabled) -+# bit5-3: 000, required -+# bit6: 1, DDR ODT control msb, (disabled) -+# bit9-7: 000, required -+# bit10: 0, differential DQS enabled -+# bit11: 0, required -+# bit12: 0, DDR output buffer enabled -+# bit31-13: 0 required -+ -+DATA 0xFFD01424 0x0000F17F # DDR Controller Control High -+# bit2-0: 111, required -+# bit3 : 1 , MBUS Burst Chop disabled -+# bit6-4: 111, required -+# bit7 : 0 -+# bit8 : 1 , add writepath sample stage, must be 1 for DDR freq >= 300MHz -+# bit9 : 0 , no half clock cycle addition to dataout -+# bit10 : 0 , 1/4 clock cycle skew enabled for addr/ctl signals -+# bit11 : 0 , 1/4 clock cycle skew disabled for write mesh -+# bit15-12: 1111 required -+# bit31-16: 0 required -+ -+DATA 0xFFD01428 0x00085520 # DDR2 ODT Read Timing (default values) -+DATA 0xFFD0147C 0x00008552 # DDR2 ODT Write Timing (default values) -+ -+ -+DATA 0xFFD01504 0x0FFFFFF1 # CS[0]n Size -+#DATA 0xFFD01500 0x00000000 # CS[0]n Base address to 0x0 -+# bit0: 1, Window enabled -+# bit1: 0, Write Protect disabled -+# bit3-2: 00, CS0 hit selected -+# bit23-4: ones, required -+# bit31-24: 0x0F, Size (i.e. 256MB) -+ -+DATA 0xFFD01508 0x10000000 # CS[1]n Base address to 256Mb -+DATA 0xFFD0150C 0x00000000 # CS[2]n Size, window disabled KAZ z 400db -+DATA 0xFFD01514 0x00000000 # CS[3]n Size, window disabled -+ -+DATA 0xFFD0151C 0x00000000 # DDR ODT Control (Low) -+DATA 0xFFD01494 0x00120012 # DDR ODT Control (High) KAZ z nowy STATIC_SDRAM_ODT_CTRL_LOW -+# bit1-0: 00, ODT0 controlled by ODT Control (low) register above -+# bit3-2: 01, ODT1 active NEVER! -+# bit31-4: zero, required -+ -+DATA 0xFFD01498 0x00000000 # CPU ODT Control KAZ STATIC_SDRAM_ODT_CTRL_HI -+DATA 0xFFD0149C 0x0000E403 # DDR Initialization Control KAZ STATIC_SDRAM_DUNIT_ODT_CTRL -+DATA 0xFFD01480 0x00000001 # DDR Initialization Control -+#bit0=1, enable DDR init upon this register write -+ -+# End of Header extension -+DATA 0x0 0x0 -diff --git a/board/zyxel/nsa310/nsa310.c b/board/zyxel/nsa310/nsa310.c -new file mode 100644 -index 0000000..eee3f1a ---- /dev/null -+++ b/board/zyxel/nsa310/nsa310.c -@@ -0,0 +1,190 @@ -+/* -+ * Copyright (C) 2013 Rafal Kazmierowski -+ * -+ * Based on NSA320.c Peter Schildmann -+ * originally written by -+ * Marvell Semiconductor -+ * Written-by: Prafulla Wadaskar -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * 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., 51 Franklin Street, Fifth Floor, Boston, -+ * MA 02110-1301 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include "nsa310.h" -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+int board_early_init_f(void) -+{ -+ /* -+ * default gpio configuration -+ * There are maximum 64 gpios controlled through 2 sets of registers -+ * the below configuration configures mainly initial LED status -+ */ -+ mvebu_config_gpio(NSA310_VAL_LOW, NSA310_VAL_HIGH, -+ NSA310_OE_LOW, NSA310_OE_HIGH); -+ -+ /* Multi-Purpose Pins Functionality configuration */ -+ /* (all LEDs & power off active high) */ -+ static const u32 kwmpp_config[] = { -+ MPP0_NF_IO2, -+ MPP1_NF_IO3, -+ MPP2_NF_IO4, -+ MPP3_NF_IO5, -+ MPP4_NF_IO6, -+ MPP5_NF_IO7, -+ MPP6_SYSRST_OUTn, -+ MPP7_GPO, -+ MPP8_TW_SDA, /* PCF8563 RTC chip */ -+ MPP9_TW_SCK, /* connected to TWSI */ -+ MPP10_UART0_TXD, -+ MPP11_UART0_RXD, -+ MPP12_GPO, /* SATA2 LED (green) */ -+ MPP13_GPIO, /* SATA2 LED (red) */ -+ MPP14_GPIO, /* MCU DATA pin (in) */ -+ MPP15_GPIO, /* USB LED (green) */ -+ MPP16_GPIO, /* MCU CLK pin (out) */ -+ MPP17_GPIO, /* MCU ACT pin (out) */ -+ MPP18_NF_IO0, -+ MPP19_NF_IO1, -+ MPP20_GPIO, -+ MPP21_GPIO, /* USB LED (red)-Power*/ -+ MPP22_GPIO, -+ MPP23_GPIO, -+ MPP24_GPIO, -+ MPP25_GPIO, -+ MPP26_GPIO, -+ MPP27_GPIO, -+ MPP28_GPIO, /* SYS LED (green) */ -+ MPP29_GPIO, /* SYS LED (red) */ -+ MPP30_GPIO, -+ MPP31_GPIO, -+ MPP32_GPIO, -+ MPP33_GPIO, -+ MPP34_GPIO, -+ MPP35_GPIO, -+ MPP36_GPIO, /* Reset button */ -+ MPP37_GPIO, /* Copy button */ -+ MPP38_GPIO, /* VID B0 */ -+ MPP39_GPIO, /* COPY LED (green) */ -+ MPP40_GPIO, /* COPY LED (red) */ -+ MPP41_GPIO, /* SATA1 LED (green) */ -+ MPP42_GPIO, /* SATA1 LED (red) */ -+ MPP43_GPIO, /* HTP pin */ -+ MPP44_GPIO, /* Buzzer */ -+ MPP45_GPIO, /* VID B1 */ -+ MPP46_GPIO, /* Power button */ -+ MPP47_GPIO, /* Power resume data */ -+ MPP48_GPIO, /* Power off */ -+ MPP49_GPIO, /* Power resume clock */ -+ 0 -+ }; -+ kirkwood_mpp_conf(kwmpp_config,NULL); -+ return 0; -+} -+ -+int board_init(void) -+{ -+ /* address of boot parameters */ -+ gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100; -+ -+ return 0; -+} -+ -+#ifdef CONFIG_RESET_PHY_R -+/* Configure and enable MV88E1318 PHY */ -+void reset_phy(void) -+{ -+ u16 reg; -+ u16 devadr; -+ char *name = "egiga0"; -+ -+ if (miiphy_set_current_dev(name)) -+ return; -+ -+ /* command to read PHY dev address */ -+ if (miiphy_read(name, 0xEE, 0xEE, (u16 *) &devadr)) { -+ printf("Err..%s could not read PHY dev address\n", -+ __FUNCTION__); -+ return; -+ } -+ -+ /* Set RGMII delay */ -+ miiphy_write(name, devadr, MV88E1318_PGADR_REG, 2); -+ miiphy_read(name, devadr, MV88E1318_MAC_CTRL_REG, ®); -+ reg |= (MV88E1318_RGMII_RXTM_CTRL | MV88E1318_RGMII_TXTM_CTRL); -+ miiphy_write(name, devadr, MV88E1318_MAC_CTRL_REG, reg); -+ miiphy_write(name, devadr, MV88E1318_PGADR_REG, 0); -+ -+ /* reset the phy */ -+ miiphy_reset(name, devadr); -+ -+ printf("MV88E1318 PHY initialized on %s\n", name); -+} -+#endif /* CONFIG_RESET_PHY_R */ -+ -+#ifdef CONFIG_SHOW_BOOT_PROGRESS -+void show_boot_progress(int val) -+{ -+ struct kwgpio_registers *gpio0 = (struct kwgpio_registers *)MVEBU_GPIO0_BASE; -+ u32 dout0 = readl(&gpio0->dout); -+ u32 blen0 = readl(&gpio0->blink_en); -+ -+ struct kwgpio_registers *gpio1 = (struct kwgpio_registers *)MVEBU_GPIO1_BASE; -+ u32 dout1 = readl(&gpio1->dout); -+ u32 blen1 = readl(&gpio1->blink_en); -+ -+ switch (val) { -+ case BOOTSTAGE_ID_DECOMP_IMAGE: -+ writel(blen0 & ~(SYS_GREEN_LED | SYS_RED_LED), &gpio0->blink_en); -+ writel((dout0 & ~SYS_GREEN_LED) | SYS_RED_LED, &gpio0->dout); -+ break; -+ case BOOTSTAGE_ID_RUN_OS: -+ writel(dout0 & ~SYS_RED_LED, &gpio0->dout); -+ writel(blen0 | SYS_GREEN_LED, &gpio0->blink_en); -+ break; -+ case BOOTSTAGE_ID_NET_START: -+ writel(dout1 & ~COPY_RED_LED, &gpio1->dout); -+ writel((blen1 & ~COPY_RED_LED) | COPY_GREEN_LED, &gpio1->blink_en); -+ break; -+ case BOOTSTAGE_ID_NET_LOADED: -+ writel(blen1 & ~(COPY_RED_LED | COPY_GREEN_LED), &gpio1->blink_en); -+ writel((dout1 & ~COPY_RED_LED) | COPY_GREEN_LED, &gpio1->dout); -+ break; -+ case -BOOTSTAGE_ID_NET_NETLOOP_OK: -+ case -BOOTSTAGE_ID_NET_LOADED: -+ writel(dout1 & ~COPY_GREEN_LED, &gpio1->dout); -+ writel((blen1 & ~COPY_GREEN_LED) | COPY_RED_LED, &gpio1->blink_en); -+ break; -+ default: -+ if (val < 0) { -+ /* error */ -+ printf("Error occured, error code = %d\n", -val); -+ writel(dout0 & ~SYS_GREEN_LED, &gpio0->dout); -+ writel(blen0 | SYS_RED_LED, &gpio0->blink_en); -+ } -+ break; -+ } -+} -+#endif -diff --git a/board/zyxel/nsa310/nsa310.h b/board/zyxel/nsa310/nsa310.h -new file mode 100644 -index 0000000..6634a4f ---- /dev/null -+++ b/board/zyxel/nsa310/nsa310.h -@@ -0,0 +1,56 @@ -+/* -+ * Copyright (C) 2013 Rafal Kazmierowski -+ * -+ * Based on Peter Schildmann -+ * and guruplug.h originally written by -+ * Siddarth Gore -+ * (C) Copyright 2009 -+ * Marvell Semiconductor -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * 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., 51 Franklin Street, Fifth Floor, Boston, -+ * MA 02110-1301 USA -+ */ -+ -+#ifndef __NSA310_H -+#define __NSA310_H -+ -+/* GPIO's */ -+#define SYS_GREEN_LED (1 << 28) -+#define SYS_RED_LED (1 << 29) -+#define SATA1_GREEN_LED (1 << 41) -+#define SATA1_RED_LED (1 << 42) -+#define SATA2_GREEN_LED (1 << 12) -+#define SATA2_RED_LED (1 << 13) -+#define USB_GREEN_LED (1 << 15) -+#define USB_RED_LED (1 << 21) -+#define COPY_GREEN_LED (1 << 39) -+#define COPY_RED_LED (1 << 40) -+ -+#define NSA310_OE_LOW (0) -+#define NSA310_VAL_LOW (SYS_GREEN_LED) -+#define NSA310_OE_HIGH ((COPY_GREEN_LED | COPY_RED_LED | \ -+ SATA1_GREEN_LED | SATA1_RED_LED)) -+#define NSA310_VAL_HIGH (0) -+ -+/* PHY related */ -+#define MV88E1318_MAC_CTRL_REG 21 -+#define MV88E1318_PGADR_REG 22 -+#define MV88E1318_RGMII_TXTM_CTRL (1 << 4) -+#define MV88E1318_RGMII_RXTM_CTRL (1 << 5) -+ -+#endif /* __NSA310_H */ -diff --git a/configs/nsa310_defconfig b/configs/nsa310_defconfig -new file mode 100644 -index 0000000..d26ef35 ---- /dev/null -+++ b/configs/nsa310_defconfig -@@ -0,0 +1,34 @@ -+CONFIG_ARM=y -+CONFIG_KIRKWOOD=y -+CONFIG_TARGET_NSA310=y -+CONFIG_IDENT_STRING="\nZyXEL NSA310 1-Bay Power Media Server" -+CONFIG_BOOTDELAY=3 -+CONFIG_SYS_PROMPT="NSA310> " -+# CONFIG_CMD_IMLS is not set -+# CONFIG_CMD_FLASH is not set -+CONFIG_SYS_NS16550=y -+CONFIG_CMD_FDT=y -+CONFIG_OF_LIBFDT=y -+CONFIG_CMD_SETEXPR=y -+CONFIG_CMD_DHCP=y -+CONFIG_CMD_MII=y -+CONFIG_CMD_PING=y -+CONFIG_CMD_DNS=y -+CONFIG_CMD_SNTP=y -+CONFIG_CMD_USB=y -+CONFIG_CMD_DATE=y -+CONFIG_CMD_EXT2=y -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_FAT=y -+CONFIG_CMD_JFFS2=y -+CONFIG_CMD_MTDPARTS=y -+CONFIG_CMD_ENV=y -+CONFIG_CMD_NAND=y -+CONFIG_EFI_PARTITION=y -+CONFIG_ENV_IS_IN_NAND=y -+CONFIG_CMD_UBI=y -+CONFIG_USB=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_STORAGE=y -+CONFIG_LZMA=y -+CONFIG_LZO=y -diff --git a/include/configs/nsa310.h b/include/configs/nsa310.h -new file mode 100644 -index 0000000..86ef825 ---- /dev/null -+++ b/include/configs/nsa310.h -@@ -0,0 +1,126 @@ -+/* Copyright (C) 2015-2016 bodhi -+ * -+ * Based on -+ * Copyright (C) 2012 Peter Schildmann -+ * -+ * Based on guruplug.h originally written by -+ * Siddarth Gore -+ * (C) Copyright 2009 -+ * Marvell Semiconductor -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * 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., 51 Franklin Street, Fifth Floor, Boston, -+ * MA 02110-1301 USA -+ */ -+ -+#ifndef _CONFIG_NSA310_H -+#define _CONFIG_NSA310_H -+ -+/* -+ * High Level Configuration Options (easy to change) -+ */ -+#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ -+#define CONFIG_KW88F6281 /* SOC Name */ -+ -+#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ -+ -+/* -+ * Misc Configuration Options -+ */ -+#define CONFIG_SHOW_BOOT_PROGRESS 1 /* boot progess display (LED's) */ -+ -+/* -+ * Commands configuration -+ */ -+#define CONFIG_SYS_LONGHELP -+#define CONFIG_PREBOOT -+ -+/* -+ * mv-common.h should be defined after CMD configs since it used them -+ * to enable certain macros -+ */ -+#include "mv-common.h" -+ -+/* -+ * Environment variables configurations -+ */ -+#ifdef CONFIG_CMD_NAND -+#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */ -+#endif -+ -+/* max 4k env size is enough, but in case of nand -+ * it has to be rounded to sector size -+ */ -+#define CONFIG_ENV_SIZE 0x20000 /* 128k */ -+#define CONFIG_ENV_ADDR 0xc0000 -+#define CONFIG_ENV_OFFSET 0xc0000 /* env starts here */ -+ -+/* -+ * Default environment variables -+ */ -+#define CONFIG_BOOTCOMMAND \ -+ "ubi part ubi; " \ -+ "ubi read 0x800000 kernel; " \ -+ "bootm 0x800000" -+ -+#define CONFIG_MTDPARTS \ -+ "mtdparts=orion_nand:" \ -+ "0x0c0000(uboot)," \ -+ "0x80000(uboot_env)," \ -+ "0x7ec0000(ubi)\0" -+ -+#define CONFIG_EXTRA_ENV_SETTINGS \ -+ "console=console=ttyS0,115200\0" \ -+ "mtdids=nand0=orion_nand\0" \ -+ "mtdparts="CONFIG_MTDPARTS \ -+ "bootargs_root=\0" -+ -+/* -+ * Ethernet Driver configuration -+ */ -+#ifdef CONFIG_CMD_NET -+#define CONFIG_NETCONSOLE -+#define CONFIG_NET_MULTI -+#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ -+#define CONFIG_PHY_BASE_ADR 0x1 -+#define CONFIG_RESET_PHY_R -+#endif /* CONFIG_CMD_NET */ -+ -+/* -+ * SATA Driver configuration -+ */ -+#ifdef CONFIG_MVSATA_IDE -+#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET -+#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET -+#endif /* CONFIG_MVSATA_IDE */ -+ -+/* -+ * File system -+ */ -+#define CONFIG_JFFS2_NAND -+#define CONFIG_JFFS2_LZO -+#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ -+#define CONFIG_MTD_PARTITIONS -+ -+/* -+ * Date Time -+ */ -+#ifdef CONFIG_CMD_DATE -+#define CONFIG_RTC_MV -+#endif /* CONFIG_CMD_DATE */ -+ -+#endif /* _CONFIG_NSA310_H */ diff --git a/package/boot/uboot-kirkwood/patches/008-nsa325-uboot-generic.patch b/package/boot/uboot-kirkwood/patches/008-nsa325-uboot-generic.patch deleted file mode 100644 index 4b4356e5d..000000000 --- a/package/boot/uboot-kirkwood/patches/008-nsa325-uboot-generic.patch +++ /dev/null @@ -1,683 +0,0 @@ -diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig -index 819bd3b..6a2d578 100644 ---- a/arch/arm/mach-kirkwood/Kconfig -+++ b/arch/arm/mach-kirkwood/Kconfig -@@ -62,6 +62,9 @@ config TARGET_NSA310 - config TARGET_NSA310S - bool "Zyxel NSA310S" - -+config TARGET_NSA325 -+ bool "Zyxel NSA325 board" -+ - endchoice - - config SYS_SOC -@@ -85,5 +88,6 @@ source "board/Seagate/goflexhome/Kconfig - source "board/Seagate/nas220/Kconfig" - source "board/zyxel/nsa310/Kconfig" - source "board/zyxel/nsa310s/Kconfig" -+source "board/zyxel/nsa325/Kconfig" - - endif -diff --git a/board/zyxel/nsa325/Kconfig b/board/zyxel/nsa325/Kconfig -new file mode 100644 -index 0000000..1fe5ead ---- /dev/null -+++ b/board/zyxel/nsa325/Kconfig -@@ -0,0 +1,12 @@ -+if TARGET_NSA325 -+ -+config SYS_BOARD -+ default "nsa325" -+ -+config SYS_VENDOR -+ default "zyxel" -+ -+config SYS_CONFIG_NAME -+ default "nsa325" -+ -+endif -diff --git a/board/zyxel/nsa325/MAINTAINERS b/board/zyxel/nsa325/MAINTAINERS -new file mode 100644 -index 0000000..130b4d9 ---- /dev/null -+++ b/board/zyxel/nsa325/MAINTAINERS -@@ -0,0 +1,6 @@ -+NSA325 BOARD -+M: Alberto Bursi -+S: Maintained -+F: board/zyxel/nsa325/ -+F: include/configs/nsa325.h -+F: configs/nsa325_defconfig -diff --git a/board/zyxel/nsa325/Makefile b/board/zyxel/nsa325/Makefile -new file mode 100644 -index 0000000..4ee953b ---- /dev/null -+++ b/board/zyxel/nsa325/Makefile -@@ -0,0 +1,13 @@ -+# -+# (C) Copyright 2015 bodhi -+# -+# Based on -+# (C) Copyright 2009 -+# Marvell Semiconductor -+# Written-by: Prafulla Wadaskar -+# -+# SPDX-License-Identifier: GPL-2.0+ -+# -+ -+obj-y := nsa325.o -+ -diff --git a/board/zyxel/nsa325/kwbimage.cfg b/board/zyxel/nsa325/kwbimage.cfg -new file mode 100644 -index 0000000..5a27d38 ---- /dev/null -+++ b/board/zyxel/nsa325/kwbimage.cfg -@@ -0,0 +1,78 @@ -+# Copyright (C) 2015 bodhi -+# -+# Extracted from Zyxel GPL source for u-boot-1.1.4_NSA325v2 -+# -+# See file CREDITS for list of people who contributed to this -+# project. -+# -+# 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., 51 Franklin Street, Fifth Floor, Boston, -+# MA 02110-1301 USA -+# -+# Refer docs/README.kwimage for more details about how-to configure -+# and create kirkwood boot image -+# -+ -+# Boot Media configurations -+#BOOT_FROM uart -+BOOT_FROM nand -+NAND_ECC_MODE default -+NAND_PAGE_SIZE 0x0800 -+ -+# SOC registers configuration using bootrom header extension -+# Maximum KWBIMAGE_MAX_CONFIG configurations allowed -+ -+# Configure RGMII-0 interface pad voltage to 1.8V -+DATA 0xFFD100e0 0x1b1b1b9b -+ -+#Dram initalization -+DATA 0xFFD01400 0x4301503E # DDR Configuration register -+DATA 0xFFD01404 0xB9843000 # DDR Controller Control Low -+DATA 0xFFD01408 0x33137777 # DDR Timing (Low) -+DATA 0xFFD0140C 0x16000C55 # DDR Timing (High) -+DATA 0xFFD01410 0x04000000 # DDR Address Control -+DATA 0xFFD01414 0x00000000 # DDR Open Pages Control -+DATA 0xFFD01418 0x00000000 # DDR Operation -+DATA 0xFFD0141C 0x00000672 # DDR Mode -+DATA 0xFFD01420 0x00000004 # DDR Extended Mode -+DATA 0xFFD01424 0x0000F14F # DDR Controller Control High -+DATA 0xFFD01428 0x000D6720 # DDR3 ODT Read Timing -+DATA 0xFFD0147C 0x0000B571 # DDR2 ODT Write Timing -+DATA 0xFFD01504 0x1FFFFFF1 # CS[0]n Size -+DATA 0xFFD01508 0x20000000 # CS[1]n Base address to 512Mb -+DATA 0xFFD0150C 0x1FFFFFF4 # CS[1]n Size 512Mb Window enabled for CS1 -+DATA 0xFFD01514 0x00000000 # CS[2]n Size, window disabled -+DATA 0xFFD0151C 0x00000000 # CS[3]n Size, window disabled -+DATA 0xFFD01494 0x00120000 # DDR ODT Control (Low) -+DATA 0xFFD01498 0x00000000 # DDR ODT Control (High) -+DATA 0xFFD0149C 0x0000E803 # CPU ODT Control -+ -+DATA 0xFFD015D0 0x00000630 -+DATA 0xFFD015D4 0x00000046 -+DATA 0xFFD015D8 0x00000008 -+DATA 0xFFD015DC 0x00000000 -+DATA 0xFFD015E0 0x00000023 -+DATA 0xFFD015E4 0x00203C18 -+DATA 0xFFD01620 0x00384800 -+DATA 0xFFD01480 0x00000001 -+DATA 0xFFD20134 0x66666666 -+DATA 0xFFD20138 0x00066666 -+ -+#Disable nsa325 hardware watchdog to allow successful kwbooting -+DATA 0xFFD10100 0x00004000 # set GPIO 14 to high to disable the watchdog -+DATA 0xFFD10104 0xFFFFBFFF # set GPIO 14 to output (to block any other input to it) -+ -+# End of Header extension -+DATA 0x0 0x0 -+ -diff --git a/board/zyxel/nsa325/nsa325.c b/board/zyxel/nsa325/nsa325.c -new file mode 100644 -index 0000000..4cd1c0f ---- /dev/null -+++ b/board/zyxel/nsa325/nsa325.c -@@ -0,0 +1,265 @@ -+/* -+ * Copyright (C) 2015 bodhi -+ * -+ * Based on -+ * Copyright (C) 2014 Jason Plum -+ * -+ * Based on nsa320.c originall written by -+ * Copyright (C) 2012 Peter Schildmann -+ * -+ * Based on guruplug.c originally written by -+ * Siddarth Gore -+ * (C) Copyright 2009 -+ * Marvell Semiconductor -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * 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., 51 Franklin Street, Fifth Floor, Boston, -+ * MA 02110-1301 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include "nsa325.h" -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+int board_early_init_f(void) -+{ -+ /* -+ * default gpio configuration -+ * There are maximum 64 gpios controlled through 2 sets of registers -+ * the below configuration configures mainly initial LED status -+ */ -+ mvebu_config_gpio(NSA325_VAL_LOW, NSA325_VAL_HIGH, -+ NSA325_OE_LOW, NSA325_OE_HIGH); -+ -+ /* Multi-Purpose Pins Functionality configuration */ -+ /* (all LEDs & power off active high) */ -+ u32 kwmpp_config[] = { -+ MPP0_NF_IO2, -+ MPP1_NF_IO3, -+ MPP2_NF_IO4, -+ MPP3_NF_IO5, -+ MPP4_NF_IO6, -+ MPP5_NF_IO7, -+ MPP6_SYSRST_OUTn, -+ MPP7_GPO, -+ MPP8_TW_SDA, /* PCF8563 RTC chip */ -+ MPP9_TW_SCK, /* connected to TWSI */ -+ MPP10_UART0_TXD, -+ MPP11_UART0_RXD, -+ MPP12_GPO, /* HDD2 LED (green) */ -+ MPP13_GPIO, /* HDD2 LED (red) */ -+ MPP14_GPIO, /* MCU DATA pin (in) */ -+ MPP15_GPIO, /* USB LED (green) */ -+ MPP16_GPIO, /* MCU CLK pin (out) */ -+ MPP17_GPIO, /* MCU ACT pin (out) */ -+ MPP18_NF_IO0, -+ MPP19_NF_IO1, -+ MPP20_GPIO, -+ MPP21_GPIO, /* USB power */ -+ MPP22_GPIO, -+ MPP23_GPIO, -+ MPP24_GPIO, -+ MPP25_GPIO, -+ MPP26_GPIO, -+ MPP27_GPIO, -+ MPP28_GPIO, /* SYS LED (green) */ -+ MPP29_GPIO, /* SYS LED (orange) */ -+ MPP30_GPIO, -+ MPP31_GPIO, -+ MPP32_GPIO, -+ MPP33_GPIO, -+ MPP34_GPIO, -+ MPP35_GPIO, -+ MPP36_GPIO, /* reset button */ -+ MPP37_GPIO, /* copy button */ -+ MPP38_GPIO, /* VID B0 */ -+ MPP39_GPIO, /* COPY LED (green) */ -+ MPP40_GPIO, /* COPY LED (red) */ -+ MPP41_GPIO, /* HDD1 LED (green) */ -+ MPP42_GPIO, /* HDD1 LED (red) */ -+ MPP43_GPIO, /* HTP pin */ -+ MPP44_GPIO, /* buzzer */ -+ MPP45_GPIO, /* VID B1 */ -+ MPP46_GPIO, /* power button */ -+ MPP47_GPIO, /* HDD2 power */ -+ MPP48_GPIO, /* power off */ -+ 0 -+ }; -+ kirkwood_mpp_conf(kwmpp_config, NULL); -+ return 0; -+} -+ -+int board_init(void) -+{ -+ -+ /* address of boot parameters */ -+ gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100; -+ -+ /* This disables the hardware watchdog in the mcu on this board. */ -+ kw_gpio_set_valid(14, 1); -+ kw_gpio_direction_output(14, 0); -+ kw_gpio_set_value(14, 1); -+ -+ return 0; -+} -+ -+#ifdef CONFIG_RESET_PHY_R -+/* Configure and enable MV88E1318 PHY */ -+void reset_phy(void) -+{ -+ u16 reg; -+ u16 devadr; -+ char *name = "egiga0"; -+ -+ if (miiphy_set_current_dev(name)) -+ return; -+ -+ /* command to read PHY dev address */ -+ if (miiphy_read(name, 0xEE, 0xEE, (u16 *) &devadr)) { -+ printf("Err..%s could not read PHY dev address\n", -+ __FUNCTION__); -+ return; -+ } -+ -+ /* Set RGMII delay */ -+ miiphy_write(name, devadr, MV88E1318_PGADR_REG, MV88E1318_MAC_CTRL_PG); -+ miiphy_read(name, devadr, MV88E1318_MAC_CTRL_REG, ®); -+ reg |= (MV88E1318_RGMII_RXTM_CTRL | MV88E1318_RGMII_TXTM_CTRL); -+ miiphy_write(name, devadr, MV88E1318_MAC_CTRL_REG, reg); -+ miiphy_write(name, devadr, MV88E1318_PGADR_REG, 0); -+ -+ /* reset the phy */ -+ miiphy_reset(name, devadr); -+ -+ /* The ZyXEL NSA325 uses the 88E1310S Alaska (interface identical to 88E1318) */ -+ /* and has an MCU attached to the LED[2] via tristate interrupt */ -+ reg = 0; -+ -+ /* switch to LED register page */ -+ miiphy_write(name, devadr, MV88E1318_PGADR_REG, MV88E1318_LED_PG); -+ /* read out LED polarity register */ -+ miiphy_read(name, devadr, MV88E1318_LED_POL_REG, ®); -+ /* clear 4, set 5 - LED2 low, tri-state */ -+ reg &= ~(MV88E1318_LED2_4); -+ reg |= (MV88E1318_LED2_5); -+ /* write back LED polarity register */ -+ miiphy_write(name, devadr, MV88E1318_LED_POL_REG, reg); -+ /* jump back to page 0, per the PHY chip documenation. */ -+ miiphy_write(name, devadr, MV88E1318_PGADR_REG, 0); -+ -+ /* Set the phy back to auto-negotiation mode. Onboard mcu sets it as 10Mbits/s on poweroff for WoL function */ -+ miiphy_write(name, devadr, 0x4, 0x1e1); -+ miiphy_write(name, devadr, 0x9, 0x300); -+ /* Downshift */ -+ miiphy_write(name, devadr, 0x10, 0x3860); -+ miiphy_write(name, devadr, 0x0, 0x9140); -+ -+ printf("MV88E1318 PHY initialized on %s\n", name); -+ -+} -+#endif /* CONFIG_RESET_PHY_R */ -+ -+#ifdef CONFIG_SHOW_BOOT_PROGRESS -+void show_boot_progress(int val) -+{ -+ struct kwgpio_registers *gpio0 = (struct kwgpio_registers *)MVEBU_GPIO0_BASE; -+ u32 dout0 = readl(&gpio0->dout); -+ u32 blen0 = readl(&gpio0->blink_en); -+ -+ struct kwgpio_registers *gpio1 = (struct kwgpio_registers *)MVEBU_GPIO1_BASE; -+ u32 dout1 = readl(&gpio1->dout); -+ u32 blen1 = readl(&gpio1->blink_en); -+ -+ switch (val) { -+ case BOOTSTAGE_ID_DECOMP_IMAGE: -+ writel(blen0 & ~(SYS_GREEN_LED | SYS_ORANGE_LED), &gpio0->blink_en); -+ writel((dout0 & ~SYS_GREEN_LED) | SYS_ORANGE_LED, &gpio0->dout); -+ break; -+ case BOOTSTAGE_ID_RUN_OS: -+ writel(dout0 & ~SYS_ORANGE_LED, &gpio0->dout); -+ writel(blen0 | SYS_GREEN_LED, &gpio0->blink_en); -+ break; -+ case BOOTSTAGE_ID_NET_START: -+ writel(dout1 & ~COPY_RED_LED, &gpio1->dout); -+ writel((blen1 & ~COPY_RED_LED) | COPY_GREEN_LED, &gpio1->blink_en); -+ break; -+ case BOOTSTAGE_ID_NET_LOADED: -+ writel(blen1 & ~(COPY_RED_LED | COPY_GREEN_LED), &gpio1->blink_en); -+ writel((dout1 & ~COPY_RED_LED) | COPY_GREEN_LED, &gpio1->dout); -+ break; -+ case -BOOTSTAGE_ID_NET_NETLOOP_OK: -+ case -BOOTSTAGE_ID_NET_LOADED: -+ writel(dout1 & ~COPY_GREEN_LED, &gpio1->dout); -+ writel((blen1 & ~COPY_GREEN_LED) | COPY_RED_LED, &gpio1->blink_en); -+ break; -+ default: -+ if (val < 0) { -+ /* error */ -+ printf("Error occured, error code = %d\n", -val); -+ writel(dout0 & ~SYS_GREEN_LED, &gpio0->dout); -+ writel(blen0 | SYS_ORANGE_LED, &gpio0->blink_en); -+ } -+ break; -+ } -+} -+#endif -+ -+#if defined(CONFIG_KIRKWOOD_GPIO) -+/* Return GPIO button status */ -+/* -+un-pressed: -+ gpio-36 (Reset Button ) in hi (act lo) - IRQ edge (clear ) -+ gpio-37 (Copy Button ) in hi (act lo) - IRQ edge (clear ) -+ gpio-46 (Power Button ) in lo (act hi) - IRQ edge (clear ) -+pressed -+ gpio-36 (Reset Button ) in lo (act hi) - IRQ edge (clear ) -+ gpio-37 (Copy Button ) in lo (act hi) - IRQ edge (clear ) -+ gpio-46 (Power Button ) in hi (act lo) - IRQ edge (clear ) -+*/ -+ -+static int -+do_read_button(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -+{ -+ if (strcmp(argv[1], "power") == 0) { -+ kw_gpio_set_valid(BTN_POWER, GPIO_INPUT_OK); -+ kw_gpio_direction_input(BTN_POWER); -+ return !kw_gpio_get_value(BTN_POWER); -+ } -+ else if (strcmp(argv[1], "reset") == 0) -+ return kw_gpio_get_value(BTN_RESET); -+ else if (strcmp(argv[1], "copy") == 0) -+ return kw_gpio_get_value(BTN_COPY); -+ else -+ return -1; -+} -+ -+ -+U_BOOT_CMD(button, 2, 0, do_read_button, -+ "Return GPIO button status 0=off 1=on", -+ "- button power|reset|copy: test buttons states\n" -+); -+ -+#endif -+ -diff --git a/board/zyxel/nsa325/nsa325.h b/board/zyxel/nsa325/nsa325.h -new file mode 100644 -index 0000000..996653e ---- /dev/null -+++ b/board/zyxel/nsa325/nsa325.h -@@ -0,0 +1,77 @@ -+/* -+ * Copyright (C) 2014 Jason Plum -+ * -+ * Based on nsa320.h originall written by -+ * Copyright (C) 2012 Peter Schildmann -+ * -+ * Based on guruplug.h originally written by -+ * Siddarth Gore -+ * (C) Copyright 2009 -+ * Marvell Semiconductor -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * 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., 51 Franklin Street, Fifth Floor, Boston, -+ * MA 02110-1301 USA -+ */ -+ -+#ifndef __NSA325_H -+#define __NSA325_H -+ -+/* low GPIO's */ -+#define HDD2_GREEN_LED (1 << 12) -+#define HDD2_RED_LED (1 << 13) -+#define USB_GREEN_LED (1 << 15) -+#define USB_POWER (1 << 21) -+#define SYS_GREEN_LED (1 << 28) -+#define SYS_ORANGE_LED (1 << 29) -+ -+#define PIN_USB_GREEN_LED 15 -+#define PIN_USB_POWER 21 -+ -+#define NSA325_OE_LOW (~(HDD2_GREEN_LED | HDD2_RED_LED | \ -+ USB_GREEN_LED | USB_POWER | \ -+ SYS_GREEN_LED | SYS_ORANGE_LED)) -+#define NSA325_VAL_LOW (SYS_GREEN_LED | USB_POWER) -+ -+/* high GPIO's */ -+#define COPY_GREEN_LED (1 << 7) -+#define COPY_RED_LED (1 << 8) -+#define HDD1_GREEN_LED (1 << 9) -+#define HDD1_RED_LED (1 << 10) -+#define HDD2_POWER (1 << 15) -+#define WATCHDOG_SIGNAL (1 << 14) -+ -+#define NSA325_OE_HIGH (~(COPY_GREEN_LED | COPY_RED_LED | \ -+ HDD1_GREEN_LED | HDD1_RED_LED | HDD2_POWER | WATCHDOG_SIGNAL )) -+#define NSA325_VAL_HIGH (WATCHDOG_SIGNAL | HDD2_POWER) -+ -+/* PHY related */ -+#define MV88E1318_PGADR_REG 22 -+#define MV88E1318_MAC_CTRL_PG 2 -+#define MV88E1318_MAC_CTRL_REG 21 -+#define MV88E1318_RGMII_TXTM_CTRL (1 << 4) -+#define MV88E1318_RGMII_RXTM_CTRL (1 << 5) -+#define MV88E1318_LED_PG 3 -+#define MV88E1318_LED_POL_REG 17 -+#define MV88E1318_LED2_4 (1 << 4) -+#define MV88E1318_LED2_5 (1 << 5) -+ -+#define BTN_POWER 46 -+#define BTN_RESET 36 -+#define BTN_COPY 37 -+ -+#endif /* __NSA325_H */ -diff --git a/configs/nsa325_defconfig b/configs/nsa325_defconfig -new file mode 100644 -index 0000000..48e09cc ---- /dev/null -+++ b/configs/nsa325_defconfig -@@ -0,0 +1,34 @@ -+CONFIG_ARM=y -+CONFIG_KIRKWOOD=y -+CONFIG_TARGET_NSA325=y -+CONFIG_IDENT_STRING="\nZyXEL NSA325 2-Bay Power Media Server" -+CONFIG_BOOTDELAY=3 -+CONFIG_SYS_PROMPT="NSA325> " -+# CONFIG_CMD_IMLS is not set -+# CONFIG_CMD_FLASH is not set -+CONFIG_SYS_NS16550=y -+CONFIG_CMD_FDT=y -+CONFIG_OF_LIBFDT=y -+CONFIG_CMD_SETEXPR=y -+CONFIG_CMD_DHCP=y -+CONFIG_CMD_MII=y -+CONFIG_CMD_PING=y -+CONFIG_CMD_DNS=y -+CONFIG_CMD_SNTP=y -+CONFIG_CMD_USB=y -+CONFIG_USB=y -+CONFIG_CMD_DATE=y -+CONFIG_CMD_EXT2=y -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_FAT=y -+CONFIG_CMD_JFFS2=y -+CONFIG_CMD_MTDPARTS=y -+CONFIG_CMD_ENV=y -+CONFIG_CMD_NAND=y -+CONFIG_EFI_PARTITION=y -+CONFIG_ENV_IS_IN_NAND=y -+CONFIG_CMD_UBI=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_STORAGE=y -+CONFIG_LZMA=y -+CONFIG_LZO=y -diff --git a/include/configs/nsa325.h b/include/configs/nsa325.h -new file mode 100644 -index 0000000..e5a8e2a ---- /dev/null -+++ b/include/configs/nsa325.h -@@ -0,0 +1,129 @@ -+/* -+ * (C) Copyright 2016 bodhi -+ * -+ * Based on -+ * Copyright (C) 2014 Jason Plum -+ * Based on -+ * Copyright (C) 2012 Peter Schildmann -+ * -+ * Based on guruplug.h originally written by -+ * Siddarth Gore -+ * (C) Copyright 2009 -+ * Marvell Semiconductor -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * 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., 51 Franklin Street, Fifth Floor, Boston, -+ * MA 02110-1301 USA -+ */ -+ -+#ifndef _CONFIG_NSA325_H -+#define _CONFIG_NSA325_H -+ -+/* -+ * High Level Configuration Options (easy to change) -+ */ -+#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */ -+#define CONFIG_KW88F6281 1 /* SOC Name */ -+ -+#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ -+ -+/* -+ * Misc Configuration Options -+ */ -+#define CONFIG_SHOW_BOOT_PROGRESS 1 /* boot progess display (LED's) */ -+ -+/* -+ * Commands configuration -+ */ -+#define CONFIG_SYS_LONGHELP -+#define CONFIG_PREBOOT -+ -+/* -+ * mv-common.h should be defined after CMD configs since it used them -+ * to enable certain macros -+ */ -+#include "mv-common.h" -+ -+/* -+ * Environment variables configurations -+ */ -+#ifdef CONFIG_CMD_NAND -+#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */ -+#endif -+/* -+ * max 4k env size is enough, but in case of nand -+ * it has to be rounded to sector size -+ */ -+#define CONFIG_ENV_SIZE 0x20000 /* 128k */ -+#define CONFIG_ENV_ADDR 0xc0000 -+#define CONFIG_ENV_OFFSET 0xc0000 /* env starts here */ -+ -+/* -+ * Default environment variables -+ */ -+#define CONFIG_BOOTCOMMAND \ -+ "ubi part ubi; " \ -+ "ubi read 0x800000 kernel; " \ -+ "bootm 0x800000" -+ -+#define CONFIG_MTDPARTS \ -+ "mtdparts=orion_nand:" \ -+ "0x0c0000(uboot)," \ -+ "0x80000(uboot_env)," \ -+ "0x7ec0000(ubi)\0" -+ -+#define CONFIG_EXTRA_ENV_SETTINGS \ -+ "console=console=ttyS0,115200\0" \ -+ "mtdids=nand0=orion_nand\0" \ -+ "mtdparts="CONFIG_MTDPARTS \ -+ "bootargs_root=\0" -+ -+/* -+ * Ethernet Driver configuration -+ */ -+#ifdef CONFIG_CMD_NET -+#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ -+#define CONFIG_PHY_BASE_ADR 0x1 -+#define CONFIG_NETCONSOLE -+#endif /* CONFIG_CMD_NET */ -+ -+/* -+ * SATA Driver configuration -+ */ -+#ifdef CONFIG_MVSATA_IDE -+#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET -+#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET -+#endif /* CONFIG_MVSATA_IDE */ -+ -+/* -+ * File system -+ */ -+#define CONFIG_JFFS2_NAND -+#define CONFIG_JFFS2_LZO -+#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ -+#define CONFIG_MTD_PARTITIONS -+ -+/* -+ * Date Time -+ */ -+#ifdef CONFIG_CMD_DATE -+#define CONFIG_RTC_MV -+#endif /* CONFIG_CMD_DATE */ -+ -+#define CONFIG_KIRKWOOD_GPIO /* Enable GPIO Support */ -+ -+#endif /* _CONFIG_NSA325_H */ diff --git a/package/boot/uboot-kirkwood/patches/110-dockstar.patch b/package/boot/uboot-kirkwood/patches/110-dockstar.patch index 94d62cee8..07d65de17 100644 --- a/package/boot/uboot-kirkwood/patches/110-dockstar.patch +++ b/package/boot/uboot-kirkwood/patches/110-dockstar.patch @@ -1,14 +1,14 @@ --- a/include/configs/dockstar.h +++ b/include/configs/dockstar.h -@@ -19,6 +19,7 @@ - #define CONFIG_KW88F6281 1 /* SOC Name */ - #define CONFIG_MACH_DOCKSTAR /* Machine type */ - #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ +@@ -31,6 +31,7 @@ + * Commands configuration + */ + #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ +#define CONFIG_SYS_MVFS - + #define CONFIG_CMD_ENV + #define CONFIG_CMD_NAND /* - * mv-common.h should be defined after CMD configs since it used them -@@ -37,29 +38,29 @@ +@@ -53,29 +54,29 @@ * it has to be rounded to sector size */ #define CONFIG_ENV_SIZE 0x20000 /* 128k */ @@ -26,12 +26,11 @@ - "ubifsload 0x800000 ${kernel}; " \ - "ubifsload 0x1100000 ${initrd}; " \ - "bootm 0x800000 0x1100000" -- --#define CONFIG_MTDPARTS "mtdparts=orion_nand:1m(uboot),-(root)\0" + "ubi part ubi; " \ + "ubi read 0x800000 kernel; " \ + "bootm 0x800000" -+ + +-#define CONFIG_MTDPARTS "mtdparts=orion_nand:1m(uboot),-(root)\0" +#define CONFIG_MTDPARTS \ + "mtdparts=orion_nand:" \ + "0xe0000@0x0(uboot)," \ diff --git a/package/boot/uboot-kirkwood/patches/120-iconnect.patch b/package/boot/uboot-kirkwood/patches/120-iconnect.patch index bd1dab818..102a147c2 100644 --- a/package/boot/uboot-kirkwood/patches/120-iconnect.patch +++ b/package/boot/uboot-kirkwood/patches/120-iconnect.patch @@ -1,7 +1,7 @@ --- a/include/configs/iconnect.h +++ b/include/configs/iconnect.h -@@ -44,30 +44,29 @@ - #define CONFIG_ENV_SECT_SIZE 0x20000 +@@ -59,30 +59,29 @@ + #define CONFIG_ENV_IS_NOWHERE #endif #define CONFIG_ENV_SIZE 0x20000 -#define CONFIG_ENV_OFFSET 0x80000 @@ -42,8 +42,8 @@ * Ethernet driver configuration --- a/configs/iconnect_defconfig +++ b/configs/iconnect_defconfig -@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="iconnect => " - CONFIG_CMD_NAND=y +@@ -7,6 +7,7 @@ CONFIG_SYS_PROMPT="iconnect => " + # CONFIG_CMD_FLASH is not set CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y diff --git a/package/boot/uboot-kirkwood/patches/130-ib62x0.patch b/package/boot/uboot-kirkwood/patches/130-ib62x0.patch index 58db8c8c8..f2ba8137a 100644 --- a/package/boot/uboot-kirkwood/patches/130-ib62x0.patch +++ b/package/boot/uboot-kirkwood/patches/130-ib62x0.patch @@ -1,6 +1,6 @@ --- a/include/configs/ib62x0.h +++ b/include/configs/ib62x0.h -@@ -49,27 +49,22 @@ +@@ -62,27 +62,22 @@ */ #define CONFIG_BOOTCOMMAND \ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \ diff --git a/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch b/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch index 5c8ff35be..f80346773 100644 --- a/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch +++ b/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch @@ -1,6 +1,6 @@ --- a/include/configs/pogo_e02.h +++ b/include/configs/pogo_e02.h -@@ -44,23 +44,30 @@ +@@ -54,23 +54,30 @@ #endif #define CONFIG_ENV_SIZE 0x20000 /* 128k */ diff --git a/package/boot/uboot-kirkwood/patches/150-goflexhome.patch b/package/boot/uboot-kirkwood/patches/150-goflexhome.patch index 88b833072..46a6ab561 100644 --- a/package/boot/uboot-kirkwood/patches/150-goflexhome.patch +++ b/package/boot/uboot-kirkwood/patches/150-goflexhome.patch @@ -1,15 +1,16 @@ --- a/include/configs/goflexhome.h +++ b/include/configs/goflexhome.h -@@ -70,20 +70,18 @@ +@@ -87,20 +87,18 @@ */ #define CONFIG_BOOTCOMMAND \ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \ - "ubi part root; " \ - "ubifsmount ubi:root; " \ - "ubifsload 0x800000 ${kernel}; " \ +- "bootm 0x800000" + "ubi part ubi; " \ + "ubi read 0x800000 kernel; " \ - "bootm 0x800000" ++ "bootm 0x800000" #define CONFIG_MTDPARTS \ - "mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)\0" diff --git a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch index d6246dc93..37f30d0a5 100644 --- a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch +++ b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch @@ -1,8 +1,8 @@ --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig -@@ -90,4 +90,7 @@ source "board/zyxel/nsa310/Kconfig" +@@ -74,4 +74,7 @@ source "board/Seagate/goflexhome/Kconfig + source "board/Seagate/nas220/Kconfig" source "board/zyxel/nsa310s/Kconfig" - source "board/zyxel/nsa325/Kconfig" +config SECOND_STAGE + bool "OpenWrt second stage hack" @@ -10,16 +10,16 @@ endif --- a/include/configs/dockstar.h +++ b/include/configs/dockstar.h -@@ -76,4 +76,6 @@ - #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ - #define CONFIG_MTD_PARTITIONS +@@ -98,4 +98,6 @@ + #define CONFIG_CMD_MTDPARTS + #define CONFIG_LZO +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_DOCKSTAR_H */ --- a/include/configs/ib62x0.h +++ b/include/configs/ib62x0.h -@@ -94,4 +94,6 @@ +@@ -108,4 +108,6 @@ #define CONFIG_RTC_MV #endif /* CONFIG_CMD_DATE */ @@ -28,16 +28,16 @@ #endif /* _CONFIG_IB62x0_H */ --- a/include/configs/iconnect.h +++ b/include/configs/iconnect.h -@@ -83,4 +83,6 @@ - #define CONFIG_MTD_DEVICE +@@ -103,4 +103,6 @@ #define CONFIG_MTD_PARTITIONS + #define CONFIG_CMD_MTDPARTS +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_ICONNECT_H */ --- /dev/null +++ b/include/configs/openwrt-kirkwood-common.h -@@ -0,0 +1,31 @@ +@@ -0,0 +1,40 @@ +/* + * Copyright (C) 2013 Luka Perkov + * @@ -47,6 +47,9 @@ +#ifndef __OPENWRT_KIRKWOOD_COMMON_H +#define __OPENWRT_KIRKWOOD_COMMON_H + ++/* Commands */ ++#define CONFIG_CMD_BOOTZ ++ +/* Ethernet */ +#if defined(CONFIG_CMD_NET) +#define CONFIG_SERVERIP 192.168.1.2 @@ -60,8 +63,14 @@ +#define CONFIG_ENV_IS_NOWHERE +#endif + ++/* Flattened uImage Tree */ ++#define CONFIG_FIT 1 ++#define CONFIG_FIT_VERBOSE 1 ++ +/* Various */ +#define CONFIG_BZIP2 ++#define CONFIG_LZMA ++#define CONFIG_LZO + +/* Unnecessary */ +#undef CONFIG_BOOTM_NETBSD @@ -71,119 +80,28 @@ +#endif /* __OPENWRT_KIRKWOOD_COMMON_H */ --- a/include/configs/pogo_e02.h +++ b/include/configs/pogo_e02.h -@@ -83,4 +83,6 @@ - #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ - #define CONFIG_MTD_PARTITIONS +@@ -99,4 +99,6 @@ + #define CONFIG_CMD_MTDPARTS + #define CONFIG_LZO +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_POGO_E02_H */ --- a/include/configs/sheevaplug.h +++ b/include/configs/sheevaplug.h -@@ -96,4 +96,6 @@ +@@ -109,4 +109,6 @@ #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET - #endif /* CONFIG_IDE */ + #endif /* CONFIG_CMD_IDE */ +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_SHEEVAPLUG_H */ --- a/include/configs/goflexhome.h +++ b/include/configs/goflexhome.h -@@ -105,4 +105,6 @@ +@@ -122,4 +122,6 @@ #define CONFIG_RTC_MV #endif /* CONFIG_CMD_DATE */ +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_GOFLEXHOME_H */ ---- a/include/configs/nsa310.h -+++ b/include/configs/nsa310.h -@@ -123,4 +123,6 @@ - #define CONFIG_RTC_MV - #endif /* CONFIG_CMD_DATE */ - -+#include "openwrt-kirkwood-common.h" -+ - #endif /* _CONFIG_NSA310_H */ ---- a/configs/dockstar_defconfig -+++ b/configs/dockstar_defconfig -@@ -25,3 +25,8 @@ CONFIG_USB=y - CONFIG_USB_EHCI_HCD=y - CONFIG_USB_STORAGE=y - CONFIG_OF_LIBFDT=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_LZMA=y -+CONFIG_LZO=y ---- a/configs/goflexhome_defconfig -+++ b/configs/goflexhome_defconfig -@@ -29,3 +29,8 @@ CONFIG_USB=y - CONFIG_USB_EHCI_HCD=y - CONFIG_USB_STORAGE=y - CONFIG_OF_LIBFDT=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_LZMA=y -+CONFIG_LZO=y ---- a/configs/ib62x0_defconfig -+++ b/configs/ib62x0_defconfig -@@ -27,5 +27,9 @@ CONFIG_SYS_NS16550=y - CONFIG_USB=y - CONFIG_USB_EHCI_HCD=y - CONFIG_USB_STORAGE=y --CONFIG_LZMA=y - CONFIG_OF_LIBFDT=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_LZMA=y -+CONFIG_LZO=y ---- a/configs/iconnect_defconfig -+++ b/configs/iconnect_defconfig -@@ -24,5 +24,9 @@ CONFIG_SYS_NS16550=y - CONFIG_USB=y - CONFIG_USB_EHCI_HCD=y - CONFIG_USB_STORAGE=y --CONFIG_LZMA=y - CONFIG_OF_LIBFDT=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_LZMA=y -+CONFIG_LZO=y ---- a/configs/nsa310_defconfig -+++ b/configs/nsa310_defconfig -@@ -30,5 +30,8 @@ CONFIG_CMD_UBI=y - CONFIG_USB=y - CONFIG_USB_EHCI_HCD=y - CONFIG_USB_STORAGE=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y - CONFIG_LZMA=y - CONFIG_LZO=y ---- a/configs/pogo_e02_defconfig -+++ b/configs/pogo_e02_defconfig -@@ -25,3 +25,8 @@ CONFIG_USB=y - CONFIG_USB_EHCI_HCD=y - CONFIG_USB_STORAGE=y - CONFIG_OF_LIBFDT=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_LZMA=y -+CONFIG_LZO=y ---- a/configs/sheevaplug_defconfig -+++ b/configs/sheevaplug_defconfig -@@ -28,5 +28,8 @@ CONFIG_SYS_NS16550=y - CONFIG_USB=y - CONFIG_USB_EHCI_HCD=y - CONFIG_USB_STORAGE=y --CONFIG_LZMA=y - CONFIG_OF_LIBFDT=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_LZMA=y -+CONFIG_LZO=y diff --git a/package/boot/uboot-lantiq/Makefile b/package/boot/uboot-lantiq/Makefile index 5493737d3..cbebe91c2 100644 --- a/package/boot/uboot-lantiq/Makefile +++ b/package/boot/uboot-lantiq/Makefile @@ -11,328 +11,336 @@ PKG_NAME:=u-boot PKG_VERSION:=2013.10 PKG_RELEASE:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot PKG_HASH:=0d71e62beb952b41ebafb20a7ee4df2f960db64c31b054721ceb79ff14014c55 +PKG_TARGETS:=bin + +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + +PKG_BUILD_PARALLEL:=1 FIRMWARE_LANTIQ_SOURCE:=$(TOPDIR)/target/linux/lantiq/files/firmware/lantiq -include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=lantiq +define uboot/Default + TITLE:= + SOC:= DDR_SETTINGS:= + IMAGE:= + DEPS:= endef -define U-Boot/arv4519pw_ram - NAME:=Arcadyan arv4519pw (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv4519pw +define uboot/arv4519pw_ram + TITLE:=U-Boot for Arcadyan arv4519pw (RAM) + SOC:=danube DDR_SETTINGS:=board/arcadyan/arv4519pw/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv4519pw_nor - NAME:=Arcadyan arv4519pw (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv4519pw +define uboot/arv4519pw_nor + TITLE:=U-Boot for Arcadyan arv4519pw (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv4519pw_brn - NAME:=Arcadyan arv4519pw (BRN) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv4519pw +define uboot/arv4519pw_brn + TITLE:=U-Boot for Arcadyan arv4519pw (BRN) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7506pw11_ram - NAME:=Arcadyan ARV7506PW11 (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv7506pw11 +define uboot/arv7506pw11_ram + TITLE:=U-Boot for Arcadyan ARV7506PW11 (RAM) + SOC:=danube DDR_SETTINGS:=board/arcadyan/arv7506pw11/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7506pw11_nor - NAME:=Arcadyan ARV7506PW11 (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv7506pw11 +define uboot/arv7506pw11_nor + TITLE:=U-Boot for Arcadyan ARV7506PW11 (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7506pw11_brn - NAME:=Arcadyan ARV7506PW11 (BRN) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv7506pw11 +define uboot/arv7506pw11_brn + TITLE:=U-Boot for Arcadyan ARV7506PW11 (BRN) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7510pw_ram - NAME:=Arcadyan arv7510pw (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv4510pw +define uboot/arv7510pw_ram + TITLE:=U-Boot for Arcadyan arv7510pw (RAM) + SOC:=danube DDR_SETTINGS:=board/arcadyan/arv7510pw/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7510pw_nor - NAME:=Arcadyan arv7510pw (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv4510pw +define uboot/arv7510pw_nor + TITLE:=U-Boot for Arcadyan arv7510pw (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7510pw_brn - NAME:=Arcadyan arv7510pw (BRN) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv4510pw +define uboot/arv7510pw_brn + TITLE:=U-Boot for Arcadyan arv7510pw (BRN) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7510pw22_ram - NAME:=Arcadyan arv7510pw22 (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv7510pw22 +define uboot/arv7510pw22_ram + TITLE:=U-Boot for Arcadyan arv7510pw22 (RAM) + SOC:=danube DDR_SETTINGS:=board/arcadyan/arv7510pw22/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7510pw22_nor - NAME:=Arcadyan arv7510pw22 (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv7510pw22 +define uboot/arv7510pw22_nor + TITLE:=U-Boot for Arcadyan arv7510pw22 (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7510pw22_brn - NAME:=Arcadyan arv7510pw22 (BRN) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv7510pw22 +define uboot/arv7510pw22_brn + TITLE:=U-Boot for Arcadyan arv7510pw22 (BRN) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7518pw_ram - NAME:=Arcadyan arv7518pw (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv7518pw +define uboot/arv7518pw_ram + TITLE:=U-Boot for Arcadyan arv7518pw (RAM) + SOC:=danube DDR_SETTINGS:=board/arcadyan/arv7518pw/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7518pw_nor - NAME:=Arcadyan arv7518pw (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv7518pw +define uboot/arv7518pw_nor + TITLE:=U-Boot for Arcadyan arv7518pw (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv7518pw_brn - NAME:=Arcadyan arv7518pw (BRN) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv7518pw +define uboot/arv7518pw_brn + TITLE:=U-Boot for Arcadyan arv7518pw (BRN) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv752dpw_ram - NAME:=Arcadyan arv752dpw (RAM) - BUILD_SUBTARGET:=xway +define uboot/arv752dpw_ram + TITLE:=U-Boot for Arcadyan arv752dpw (RAM) + SOC:=danube DDR_SETTINGS:=board/arcadyan/arv752dpw/ddr_settings.h - BUILD_DEVICES:=arcadyan_arv752dpw + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv752dpw_nor - NAME:=Arcadyan arv752dpw (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv752dpw +define uboot/arv752dpw_nor + TITLE:=U-Boot for Arcadyan arv752dpw (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv752dpw_brn - NAME:=Arcadyan arv752dpw (BRN) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv752dpw +define uboot/arv752dpw_brn + TITLE:=U-Boot for Arcadyan arv752dpw (BRN) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv752dpw22_ram - NAME:=Arcadyan arv752dpw22 (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv752dpw22 +define uboot/arv752dpw22_ram + TITLE:=U-Boot for Arcadyan arv752dpw22 (RAM) + SOC:=danube DDR_SETTINGS:=board/arcadyan/arv752dpw22/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv752dpw22_nor - NAME:=Arcadyan arv752dpw22 (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv752dpw22 +define uboot/arv752dpw22_nor + TITLE:=U-Boot for Arcadyan arv752dpw22 (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv752dpw22_brn - NAME:=Arcadyan arv752dpw22 (BRN) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv752dpw22 +define uboot/arv752dpw22_brn + TITLE:=U-Boot for Arcadyan arv752dpw22 (BRN) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv8539pw22_ram - NAME:=Speedport W 504V Typ A (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv8539pw22 +define uboot/arv8539pw22_ram + TITLE:=U-Boot for Speedport W 504V Typ A (RAM) + SOC:=danube DDR_SETTINGS:=board/arcadyan/arv8539pw22/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv8539pw22_nor - NAME:=Speedport W 504V Typ A (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv8539pw22 +define uboot/arv8539pw22_nor + TITLE:=U-Boot for Speedport W 504V Typ A (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/arv8539pw22_brn - NAME:=Speedport W 504V Typ A (BRN) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=arcadyan_arv8539pw22 +define uboot/arv8539pw22_brn + TITLE:=U-Boot for Speedport W 504V Typ A (BRN) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/gigasx76x_ram - NAME:=Siemens Gigaset sx76x (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=siemens_gigaset-sx76x +define uboot/gigasx76x_ram + TITLE:=U-Boot for Siemens Gigaset sx76x (RAM) + SOC:=danube DDR_SETTINGS:=board/gigaset/sx76x/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/gigasx76x_nor - NAME:=Siemens Gigaset sx76x (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=siemens_gigaset-sx76x +define uboot/gigasx76x_nor + TITLE:=U-Boot for Siemens Gigaset sx76x (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/acmp252_ram - NAME:=AudioCodes MP-252 (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=audiocodes_mp-252 +define uboot/acmp252_ram + TITLE:=U-Boot for AudioCodes MP-252 (RAM) + SOC:=danube DDR_SETTINGS:=board/audiocodes/acmp252/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/acmp252_nor - NAME:=AudioCodes MP-252 (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=audiocodes_mp-252 +define uboot/acmp252_nor + TITLE:=U-Boot for AudioCodes MP-252 (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/bthomehubv5a_ram - NAME:=BT Home Hub 5A (RAM) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=bt_homehub-v5a +define uboot/bthomehubv5a_ram + TITLE:=U-Boot for BT Home Hub 5A (RAM) + SOC:=vr9 DDR_SETTINGS:=board/bt/bthomehubv5a/ddr_settings.h + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/easy50712_ram - NAME:=Lantiq EASY50712 (RAM) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=lantiq_easy50712 +define uboot/easy50712_ram + TITLE:=U-Boot for Lantiq EASY50712 (RAM) + SOC:=danube DDR_SETTINGS:=board/lantiq/easy50712/ddr_settings.h + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/easy50712_nor - NAME:=Lantiq EASY50712 (NOR) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=lantiq_easy50712 +define uboot/easy50712_nor + TITLE:=U-Boot for Lantiq EASY50712 (NOR) + SOC:=danube + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/easy50712_norspl - NAME:=Lantiq EASY50712 (NOR SPL) - BUILD_SUBTARGET:=xway - BUILD_DEVICES:=lantiq_easy50712 - UBOOT_IMAGE:=u-boot.ltq.lzo.norspl - DEPENDS+=@BROKEN +define uboot/easy50712_norspl + TITLE:=U-Boot for Lantiq EASY50712 (NOR SPL) + SOC:=danube + IMAGE:=u-boot.ltq.lzo.norspl + DEPS:=@TARGET_lantiq_xway endef -define U-Boot/easy80920_ram - NAME:=Lantiq EASY80920 (RAM) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand +define uboot/easy80920_ram + TITLE:=U-Boot for Lantiq EASY80920 (RAM) + SOC:=vr9 DDR_SETTINGS:=board/lantiq/easy80920/ddr_settings.h + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/easy80920_nor - NAME:=Lantiq EASY80920 (NOR) - BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand - BUILD_SUBTARGET:=xrx200 +define uboot/easy80920_nor + TITLE:=U-Boot for Lantiq EASY80920 (NOR) + SOC:=vr9 + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/easy80920_norspl - NAME:=Lantiq EASY80920 (NOR SPL) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand - UBOOT_IMAGE:=u-boot.ltq.lzo.norspl - DEPENDS+=@BROKEN +define uboot/easy80920_norspl + TITLE:=U-Boot for Lantiq EASY80920 (NOR SPL) + SOC:=vr9 + IMAGE:=u-boot.ltq.lzo.norspl + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/easy80920_sfspl - NAME:=Lantiq EASY80920 (SPI SPL) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand - UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl - DEPENDS+=@BROKEN +define uboot/easy80920_sfspl + TITLE:=U-Boot for Lantiq EASY80920 (SPI SPL) + SOC:=vr9 + IMAGE:=u-boot.ltq.lzo.sfspl + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/fb3370_eva - NAME:=AVM FRITZ3370 (EVA) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=avm_fritz3370 +define uboot/fb3370_eva + TITLE:=U-Boot for AVM FRITZ3370 (EVA) + SOC:=vr9 + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/fb3370_ram - NAME:=AVM FRITZ3370 (RAM) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=avm_fritz3370 +define uboot/fb3370_ram + TITLE:=U-Boot for AVM FRITZ3370 (RAM) + SOC:=vr9 DDR_SETTINGS:=board/avm/fb3370/ddr_settings.h + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/fb3370_sfspl - NAME:=AVM FRITZ3370 (SPI SPL) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=avm_fritz3370 - UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl - DEPENDS+=@BROKEN +define uboot/fb3370_sfspl + TITLE:=U-Boot for AVM FRITZ3370 (SPI SPL) + SOC:=vr9 + IMAGE:=u-boot.ltq.lzo.sfspl + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/p2812hnufx_ram - NAME:=ZyXEL P-2812HNU-Fx (RAM) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=zyxel_p-2812hnu-f1 +define uboot/p2812hnufx_ram + TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM) + SOC:=vr9 DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/p2812hnufx_nandspl - NAME:=ZyXEL P-2812HNU-Fx (NAND SPL) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=zyxel_p-2812hnu-f1 - UBOOT_IMAGE:=u-boot.ltq.lzo.nandspl - DEPENDS+=@BROKEN +define uboot/p2812hnufx_nandspl + TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL) + SOC:=vr9 + IMAGE:=u-boot.ltq.lzo.nandspl + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/vgv7510kw22_brn - NAME:=Arcadyan VGV7510KW22 (BRN) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=arcadyan_vgv7510kw22-nor +define uboot/vgv7510kw22_brn + TITLE:=U-Boot for Arcadyan VGV7510KW22 (BRN) + SOC:=vr9 + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/vgv7510kw22_nor - NAME:=Arcadyan VGV7510KW22 (NOR) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=arcadyan_vgv7510kw22-nor +define uboot/vgv7510kw22_nor + TITLE:=U-Boot for Arcadyan VGV7510KW22 (NOR) + SOC:=vr9 + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/vgv7510kw22_ram - NAME:=Arcadyan VGV7510KW22 (RAM) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=arcadyan_vgv7510kw22-nor +define uboot/vgv7510kw22_ram + TITLE:=U-Boot for Arcadyan VGV7510KW22 (RAM) + SOC:=vr9 DDR_SETTINGS:=board/arcadyan/vgv7510kw22/ddr_settings.h + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/vgv7519_brn - NAME:=Arcadyan VGV7519 (BRN) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn +define uboot/vgv7519_brn + TITLE:=U-Boot for Arcadyan VGV7519 (BRN) + SOC:=vr9 + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/vgv7519_nor - NAME:=Arcadyan VGV7519 (NOR) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn +define uboot/vgv7519_nor + TITLE:=U-Boot for Arcadyan VGV7519 (NOR) + SOC:=vr9 + DEPS:=@TARGET_lantiq_xrx200 endef -define U-Boot/vgv7519_ram - NAME:=Arcadyan VGV7519 (RAM) - BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn +define uboot/vgv7519_ram + TITLE:=U-Boot for Arcadyan VGV7519 (RAM) + SOC:=vr9 DDR_SETTINGS:=board/arcadyan/vgv7519/ddr_settings.h + DEPS:=@TARGET_lantiq_xrx200 endef -UBOOT_TARGETS:= \ +UBOOTS:= \ arv4519pw_ram arv4519pw_nor arv4519pw_brn \ arv7506pw11_ram arv7506pw11_nor arv7506pw11_brn \ arv7510pw_ram arv7510pw_nor arv7510pw_brn \ @@ -351,6 +359,25 @@ UBOOT_TARGETS:= \ vgv7510kw22_brn vgv7510kw22_nor vgv7510kw22_ram \ vgv7519_brn vgv7519_nor vgv7519_ram +define Package/uboot/template +define Package/uboot-lantiq-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=$(3) @!IN_SDK + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) + MAINTAINER:=Luka Perkov +endef +endef + +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + DEPS:=$(uboot/$(1)/DEPS) + $(call Package/uboot/template,$(1),$(TITLE),$(DEPS)) +endef + define CompressVR9Firmware $(STAGING_DIR_HOST)/bin/lzma e \ $(FIRMWARE_LANTIQ_SOURCE)/vr9_phy$(1)_a$(2)x.bin \ @@ -366,25 +393,40 @@ define Build/Prepare $(call CompressVR9Firmware,22f,2) endef -UBOOT_MAKE_FLAGS := +define Build/Configure + $(MAKE) -C $(PKG_BUILD_DIR) $(BUILD_VARIANT)_config +endef -ifeq ($(SUBTARGET),xway) - SOC:=danube -else - SOC:=vr9 -endif +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS) +endef -define Package/u-boot/install/uart +define Package/uboot/install/default + $(CP) \ + $(PKG_BUILD_DIR)/$(2) \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.img +endef + +define Package/uboot/install/uart awk -f $(PKG_BUILD_DIR)/tools/lantiq_ram_init_uart.awk \ - -v soc=$(SOC) $(PKG_BUILD_DIR)/$(DDR_SETTINGS) \ + -v soc=$(2) $(PKG_BUILD_DIR)/$(3) \ > $(PKG_BUILD_DIR)/ddr_settings perl $(PKG_BUILD_DIR)/tools/gct.pl \ $(PKG_BUILD_DIR)/ddr_settings $(PKG_BUILD_DIR)/u-boot.srec \ - $(1)/u-boot.asc + $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.asc + endef + +define Package/uboot/install/template +define Package/uboot-lantiq-$(1)/install + $(call Package/uboot/install/default,$(1),$(if $(IMAGE),$(IMAGE),u-boot.bin)) + $(if $(DDR_SETTINGS), \ + $(call Package/uboot/install/uart,$(1),$(SOC),$(DDR_SETTINGS)) \ + ) +endef endef -define Package/u-boot/install - $(Package/u-boot/install/$(if $(DDR_SETTINGS),uart,default)) -endef - -$(eval $(call BuildPackage/U-Boot)) +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call Package/uboot/install/template,$(u))) \ + $(eval $(call BuildPackage,uboot-lantiq-$(u))) \ +) diff --git a/package/boot/uboot-lantiq/patches/0014-MIPS-add-support-for-Lantiq-XWAY-SoCs.patch b/package/boot/uboot-lantiq/patches/0014-MIPS-add-support-for-Lantiq-XWAY-SoCs.patch index cb695ffe3..08133bb08 100644 --- a/package/boot/uboot-lantiq/patches/0014-MIPS-add-support-for-Lantiq-XWAY-SoCs.patch +++ b/package/boot/uboot-lantiq/patches/0014-MIPS-add-support-for-Lantiq-XWAY-SoCs.patch @@ -1419,7 +1419,7 @@ Signed-off-by: Daniel Schwierzeck + +static int spl_uncompress_lzo(struct spl_image *spl, unsigned long loadaddr) +{ -+ size_t len = CONFIG_SYS_LOAD_SIZE; ++ size_t len; + int ret; + + spl_puts("SPL: decompressing U-Boot with LZO\n"); @@ -3237,7 +3237,7 @@ Signed-off-by: Daniel Schwierzeck +} --- /dev/null +++ b/arch/mips/include/asm/arch-danube/config.h -@@ -0,0 +1,164 @@ +@@ -0,0 +1,163 @@ +/* + * Copyright (C) 2007-2010 Lantiq Deutschland GmbH + * Copyright (C) 2011-2013 Daniel Schwierzeck, daniel.schwierzeck@gmail.com @@ -3296,7 +3296,6 @@ Signed-off-by: Daniel Schwierzeck +#define CONFIG_SYS_MEMTEST_START 0x81000000 +#define CONFIG_SYS_MEMTEST_END 0x82000000 +#define CONFIG_SYS_LOAD_ADDR 0x81000000 -+#define CONFIG_SYS_LOAD_SIZE (2 * 1024 * 1024) +#define CONFIG_SYS_INIT_SP_OFFSET 0x4000 + +/* SRAM */ @@ -3476,7 +3475,7 @@ Signed-off-by: Daniel Schwierzeck +#endif /* __DANUBE_SOC_H__ */ --- /dev/null +++ b/arch/mips/include/asm/arch-vrx200/config.h -@@ -0,0 +1,188 @@ +@@ -0,0 +1,187 @@ +/* + * Copyright (C) 2010 Lantiq Deutschland GmbH + * Copyright (C) 2011-2013 Daniel Schwierzeck, daniel.schwierzeck@gmail.com @@ -3547,7 +3546,6 @@ Signed-off-by: Daniel Schwierzeck +#define CONFIG_SYS_MEMTEST_START 0x81000000 +#define CONFIG_SYS_MEMTEST_END 0x82000000 +#define CONFIG_SYS_LOAD_ADDR 0x81000000 -+#define CONFIG_SYS_LOAD_SIZE (2 * 1024 * 1024) +#define CONFIG_SYS_INIT_SP_OFFSET (32 * 1024) + +/* SRAM */ @@ -7259,7 +7257,7 @@ Signed-off-by: Daniel Schwierzeck +static struct phy_driver pef7071_driver = { + .name = "Lantiq XWAY PEF7071", + .uid = 0xd565a400, -+ .mask = 0xFFFFFFF8, ++ .mask = 0xFFFFFFFF, + .features = PHY_GBIT_FEATURES, + .config = ltq_phy_config, + .startup = ltq_phy_startup, diff --git a/package/boot/uboot-lantiq/patches/0015-MIPS-lantiq-add-support-for-Lantiq-XWAY-ARX100-SoC-f.patch b/package/boot/uboot-lantiq/patches/0015-MIPS-lantiq-add-support-for-Lantiq-XWAY-ARX100-SoC-f.patch index a12d2ebff..acda83c27 100644 --- a/package/boot/uboot-lantiq/patches/0015-MIPS-lantiq-add-support-for-Lantiq-XWAY-ARX100-SoC-f.patch +++ b/package/boot/uboot-lantiq/patches/0015-MIPS-lantiq-add-support-for-Lantiq-XWAY-ARX100-SoC-f.patch @@ -903,7 +903,7 @@ Signed-off-by: Daniel Schwierzeck #define STATUS_LANTIQ (STATUS_MIPS34K | STATUS_MIPS32_64) --- /dev/null +++ b/arch/mips/include/asm/arch-arx100/config.h -@@ -0,0 +1,176 @@ +@@ -0,0 +1,175 @@ +/* + * Copyright (C) 2007-2010 Lantiq Deutschland GmbH + * Copyright (C) 2011-2013 Daniel Schwierzeck, daniel.schwierzeck@gmail.com @@ -967,7 +967,6 @@ Signed-off-by: Daniel Schwierzeck +#define CONFIG_SYS_MEMTEST_START 0x81000000 +#define CONFIG_SYS_MEMTEST_END 0x82000000 +#define CONFIG_SYS_LOAD_ADDR 0x81000000 -+#define CONFIG_SYS_LOAD_SIZE (2 * 1024 * 1024) +#define CONFIG_SYS_INIT_SP_OFFSET (32 * 1024) + +/* SRAM */ diff --git a/package/boot/uboot-lantiq/patches/0018-tools-lantiq-add-NAND-SPL-support.patch b/package/boot/uboot-lantiq/patches/0018-tools-lantiq-add-NAND-SPL-support.patch index 6d1b8dc69..471c902aa 100644 --- a/package/boot/uboot-lantiq/patches/0018-tools-lantiq-add-NAND-SPL-support.patch +++ b/package/boot/uboot-lantiq/patches/0018-tools-lantiq-add-NAND-SPL-support.patch @@ -21,7 +21,7 @@ Signed-off-by: Daniel Schwierzeck struct args { enum image_types type; __u32 entry_addr; -+ off_t uboot_offset; ++ loff_t uboot_offset; + unsigned int page_size; const char *uboot_bin; const char *spl_bin; @@ -121,10 +121,10 @@ Signed-off-by: Daniel Schwierzeck } -static int create_sfspl(const struct args *arg) -+static int pad_to_offset(int fd, off_t offset) ++static int pad_to_offset(int fd, loff_t offset) { - int out_fd, uboot_fd, spl_fd, ret; -+ off_t pos; ++ loff_t pos; + size_t size; + ssize_t n; + __u8 *buf; diff --git a/package/boot/uboot-lantiq/patches/0022-MIPS-lantiq-add-default-openwrt-config.patch b/package/boot/uboot-lantiq/patches/0022-MIPS-lantiq-add-default-openwrt-config.patch index 20bff445d..3b50c981c 100644 --- a/package/boot/uboot-lantiq/patches/0022-MIPS-lantiq-add-default-openwrt-config.patch +++ b/package/boot/uboot-lantiq/patches/0022-MIPS-lantiq-add-default-openwrt-config.patch @@ -8,7 +8,7 @@ Signed-off-by: Daniel Schwierzeck --- /dev/null +++ b/include/configs/openwrt-lantiq-common.h -@@ -0,0 +1,40 @@ +@@ -0,0 +1,39 @@ +/* + * Copyright (C) 2013 Luka Perkov + * @@ -21,7 +21,6 @@ Signed-off-by: Daniel Schwierzeck +/* Commands */ +#if defined(CONFIG_LTQ_SUPPORT_ETHERNET) +#define CONFIG_CMD_PING -+#define CONFIG_CMD_TFTPPUT +#endif + +/* Compression */ diff --git a/package/boot/uboot-lantiq/patches/100-portability.patch b/package/boot/uboot-lantiq/patches/100-portability.patch deleted file mode 100644 index 4539e3e88..000000000 --- a/package/boot/uboot-lantiq/patches/100-portability.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/include/image.h -+++ b/include/image.h -@@ -17,7 +17,6 @@ - #define __IMAGE_H__ - - #include "compiler.h" --#include - - /* Define this to avoid #ifdefs later on */ - struct lmb; -@@ -36,6 +35,7 @@ struct lmb; - - #include - #include -+#include - #include - - /* Take notice of the 'ignore' property for hashes */ diff --git a/package/boot/uboot-layerscape-32b/Makefile b/package/boot/uboot-layerscape-32b/Makefile new file mode 100644 index 000000000..8a338cdce --- /dev/null +++ b/package/boot/uboot-layerscape-32b/Makefile @@ -0,0 +1,98 @@ +# +# Copyright (C) 2016 Jiang Yutang +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +PKG_NAME:=uboot-layerscape-32bit +PKG_VERSION:=v1.0 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_MIRROR_HASH:=b62f4a55882ffb6b57da24ad9eaa98237141941d273e06a2244220a3e6b82ce7 +PKG_SOURCE_URL:=https://github.com/fsl-jyt/uboot-ls-32b.git +PKG_SOURCE_VERSION:=763de09cc7265e3147e2df2e15f91c73231907f4 + +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + +include $(INCLUDE_DIR)/package.mk + +define uboot/Default + TITLE:= + CONFIG:= +endef + +define uboot/ls1043ardb + TITLE:=U-Boot binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1043ardb 32b Dev Board + CONFIG=ls1043ardb-uboot.bin +endef + +define uboot/ls1046ardb + TITLE:=U-Boot binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1046ardb 32b Dev Board + CONFIG=ls1046ardb-uboot.bin +endef + +define uboot/ls1012ardb + TITLE:=U-Boot binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1012ardb 32b Dev Board + CONFIG=ls1012ardb-uboot.bin.swap +endef + +UBOOTS := \ + ls1043ardb \ + ls1046ardb \ + ls1012ardb + +define Package/uboot/template +define Package/uboot-layerscape-32b-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:= @TARGET_layerscape_32b + TITLE:=$(2) + URL:=https://github.com/fsl-jyt/uboot-ls-32b.git + VARIANT:=$(1) + MAINTAINER:=Jiang Yutang +endef +endef + +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) +endef + +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +endif + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/uboot/install/default + $(CP) $(PKG_BUILD_DIR)/$(UBOOT_CONFIG) $(KDIR)/$(1)-32b-uboot.bin +endef + +define Package/uboot/install/template +define Package/uboot-layerscape-32b-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-layerscape-32b-$(u))) \ +) diff --git a/package/boot/uboot-layerscape-armv8_32b/Makefile b/package/boot/uboot-layerscape-armv8_32b/Makefile deleted file mode 100644 index d1ca82917..000000000 --- a/package/boot/uboot-layerscape-armv8_32b/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2016 Jiang Yutang -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=uboot-layerscape-armv8_32b -PKG_SOURCE_DATE:=2017-10-24 -PKG_RELEASE:=1 - -# Layerscape ARMv8 platforms use 64-bit u-boot to support both 32-bit and 64-bit -# kernel/rootfs. Since OpenWrt could only provide 32-bit toolchain for 32-bit targets, -# 64-bit u-boot images git tree is provided here whose source code actually is -# uboot-layerscape's source code. -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/yangbolu1991/u-boot-lede.git -PKG_SOURCE_VERSION:=43cb4c0fcab237f8daa39c393cc1441b76b99fcf -PKG_MIRROR_HASH:=ff7d1fcb85dda2be6a9e3785821b5791c7189d2d412b160a9621bb2dcad24dea - -PKG_MAINTAINER:=Yangbo Lu - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/kernel.mk - -define Package/uboot-layerscape-armv8_32b - SECTION:=boot - CATEGORY:=Boot Loaders - DEPENDS:=@TARGET_layerscape_armv8_32b - TITLE:=U-Boot for ARMv8 32-bit based Layerscape boards - DEFAULT:=y - HIDDEN:=1 -endef - -define Build/Configure - -endef - -define Build/Compile - -endef - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(CP) $(PKG_BUILD_DIR)/ls1043ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1043ardb-armv8_32b-uboot.bin - $(CP) $(PKG_BUILD_DIR)/ls1046ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1046ardb-armv8_32b-uboot.bin - $(CP) $(PKG_BUILD_DIR)/ls1012ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1012ardb-armv8_32b-uboot.bin - $(CP) $(PKG_BUILD_DIR)/ls1012afrdm-uboot.bin $(STAGING_DIR_IMAGE)/ls1012afrdm-armv8_32b-uboot.bin -endef - -$(eval $(call BuildPackage,uboot-layerscape-armv8_32b)) diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index c37b335b4..6cd35b8e8 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -6,71 +6,100 @@ # include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/image.mk PKG_NAME:=uboot-layerscape -PKG_SOURCE_DATE:=2017-08-24 +PKG_VERSION:=v1.0 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/qoriq-open-source/u-boot.git -PKG_SOURCE_VERSION:=fbedf04c1bad675eadbac86febdcf759441a02af -PKG_MIRROR_HASH:=29922f83ce3e8dde163eafcfd07f3595e2779b7a3e8eb43640f058f58248718d +PKG_MIRROR_HASH:=6aba7cb32d655dacb49bd188706bf1284159ae9b1fa69056df634b90070c3768 +PKG_SOURCE_URL:=https://github.com/fsl-jyt/u-boot.git +PKG_SOURCE_VERSION:=aefcbf4c2bb36e1f0ead61181e5fe1119b5683ad + +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README -include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=layerscape - BUILD_SUBTARGET:=armv8_64b - BUILD_DEVICES:=$(1) - UBOOT_IMAGE:=u-boot-dtb.bin - HIDDEN:=y +define uboot/Default + TITLE:= + CONFIG:= + IMAGE:= endef -define U-Boot/ls1043ardb - NAME:=NXP ls1043ardb 64b Dev Board +define uboot/ls1043ardb + TITLE:=U-Boot $(PKG_NAME)-$(PKG_VERSION) for NXP ls1043ardb 64b Dev Board + CONFIG=ls1043ardb endef -define U-Boot/ls1046ardb - NAME:=NXP ls1046ardb 64b Dev Board - UBOOT_CONFIG:=ls1046ardb_qspi +define uboot/ls1046ardb + TITLE:=U-Boot $(PKG_NAME)-$(PKG_VERSION) for NXP ls1046ardb 64b Dev Board + CONFIG=ls1046ardb_qspi endef -define U-Boot/ls1012ardb - NAME:=NXP ls1012ardb 64b Dev Board - UBOOT_CONFIG:=ls1012ardb_qspi +define uboot/ls1012ardb + TITLE:=U-Boot $(PKG_NAME)-$(PKG_VERSION) for NXP ls1012ardb 64b Dev Board + CONFIG=ls1012ardb_qspi + IMAGE=u-boot-swap.bin endef -define U-Boot/ls1088ardb - NAME:=NXP ls1088ardb 64b Dev Board - UBOOT_CONFIG:=ls1088ardb_qspi -endef - -define U-Boot/ls2088ardb - NAME:=NXP ls2088ardb 64b Dev Board - UBOOT_CONFIG:=ls2080ardb -endef - -define U-Boot/ls1012afrdm - NAME:=NXP ls1012afrdm 64b Dev Board - UBOOT_CONFIG:=ls1012afrdm_qspi -endef - -UBOOT_TARGETS := \ +UBOOTS := \ ls1043ardb \ ls1046ardb \ - ls1012ardb \ - ls1088ardb \ - ls2088ardb \ - ls1012afrdm + ls1012ardb -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(BUILD_SUBTARGET)-uboot.bin +define Package/uboot/template +define Package/uboot-layerscape-64b-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:= @TARGET_layerscape_64b + TITLE:=$(2) + URL:=http://git.freescale.com/git/cgit.cgi/ppc/sdk/u-boot.git/snapshot + VARIANT:=$(1) + MAINTAINER:=Jiang Yutang +endef endef -define Package/u-boot/install/default +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) endef -$(eval $(call BuildPackage/U-Boot)) +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),u-boot-dtb.bin) +endif + +define Build/Configure + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(UBOOT_CONFIG)_config +endef + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) DTC=$(LINUX_DIR)/scripts/dtc/dtc +endef + +define Package/uboot/install/default + $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(KDIR)/$(1)-64b-uboot.bin +endef + +define Package/uboot/install/template +define Package/uboot-layerscape-64b-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-layerscape-64b-$(u))) \ +) diff --git a/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch b/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch deleted file mode 100644 index 597383166..000000000 --- a/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 74be1b50f96b3ada0a4fc18f0283659739edbadf Mon Sep 17 00:00:00 2001 -From: Yangbo Lu -Date: Fri, 22 Sep 2017 11:00:12 +0800 -Subject: [PATCH 1/3] armv8: ls1043a: add LEDE boot support in environment - -Signed-off-by: Yangbo Lu ---- - include/configs/ls1043a_common.h | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h -index 0b3fb4e..5c01111 100644 ---- a/include/configs/ls1043a_common.h -+++ b/include/configs/ls1043a_common.h -@@ -336,7 +336,19 @@ - "sd_bootcmd=echo Trying load from SD ..;" \ - "mmcinfo; mmc read $load_addr " \ - "$kernel_addr_sd $kernel_size_sd ;" \ -- " bootm $load_addr#$board\0" -+ " bootm $load_addr#$board\0" \ -+ "lede_setenv=setenv loadaddr 82000000 && " \ -+ "setenv fdtaddr 8f000000 && " \ -+ "setenv bootargs root=/dev/mtdblock8 " \ -+ "rootfstype=squashfs,jffs2 noinitrd " \ -+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ -+ "mtdparts=60000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \ -+ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \ -+ "16M(kernel),32M(rootfs),64M(otherbank)\0" \ -+ "lede_run=cp.b 60f00000 $fdtaddr 100000 && " \ -+ "cp.b 61000000 $loadaddr 1000000 && " \ -+ "bootm $loadaddr - $fdtaddr\0" \ -+ "lede_boot=run lede_setenv;run lede_run\0" - - - #undef CONFIG_BOOTCOMMAND -@@ -351,6 +363,12 @@ - "env exists secureboot && esbc_halt;" - #endif - -+#undef CONFIG_BOOTCOMMAND -+#define CONFIG_BOOTCOMMAND "run lede_boot" -+ -+#undef CONFIG_BOOTDELAY -+#define CONFIG_BOOTDELAY 3 -+ - #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \ - "earlycon=uart8250,mmio,0x21c0500 " \ - MTDPARTS_DEFAULT --- -2.7.4 - diff --git a/package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch deleted file mode 100644 index 418f6287f..000000000 --- a/package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch +++ /dev/null @@ -1,57 +0,0 @@ -From dc0e8734ea1c679738377d13bdd9bf3fa644e6b3 Mon Sep 17 00:00:00 2001 -From: Yangbo Lu -Date: Fri, 22 Sep 2017 11:36:43 +0800 -Subject: [PATCH 2/3] armv8: ls1046ardb: add LEDE boot support in environment - -Signed-off-by: Yangbo Lu ---- - include/configs/ls1046a_common.h | 15 ++++++++++++++- - include/configs/ls1046ardb.h | 6 ++++++ - 2 files changed, 20 insertions(+), 1 deletion(-) - -diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h -index 4fc2f94..53bd41b 100644 ---- a/include/configs/ls1046a_common.h -+++ b/include/configs/ls1046a_common.h -@@ -276,7 +276,20 @@ - "sd_bootcmd=echo Trying load from SD ..;" \ - "mmcinfo; mmc read $load_addr " \ - "$kernel_addr_sd $kernel_size_sd ;" \ -- " bootm $load_addr#$board\0" -+ " bootm $load_addr#$board\0" \ -+ "lede_setenv=setenv loadaddr 82000000 && " \ -+ "setenv fdtaddr 8f000000 && " \ -+ "setenv bootargs root=/dev/mtdblock9 " \ -+ "rootfstype=ext4 noinitrd " \ -+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ -+ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \ -+ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \ -+ "16M(kernel),30M(ext4rfs),2M(user)\0" \ -+ "lede_run=sf probe 0:0 && " \ -+ "sf read $fdtaddr f00000 100000 && " \ -+ "sf read $loadaddr 1000000 1000000 && " \ -+ "bootm $loadaddr - $fdtaddr\0" \ -+ "lede_boot=run lede_setenv;run lede_run\0" - - - #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \ -diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h -index f8c15a6..c3b50b1 100644 ---- a/include/configs/ls1046ardb.h -+++ b/include/configs/ls1046ardb.h -@@ -251,6 +251,12 @@ - "env exists secureboot && esbc_halt;" - #endif - -+#undef CONFIG_BOOTCOMMAND -+#define CONFIG_BOOTCOMMAND "run lede_boot" -+ -+#undef CONFIG_BOOTDELAY -+#define CONFIG_BOOTDELAY 3 -+ - #define MTDPARTS_DEFAULT "mtdparts=1550000.quadspi:1m(rcw)," \ - "15m(u-boot),48m(kernel.itb);" \ - "7e800000.flash:16m(nand_uboot)," \ --- -2.7.4 - diff --git a/package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch deleted file mode 100644 index e8bbe7faa..000000000 --- a/package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8d6efca7eb2de012b98493206c87f31ee9b9e967 Mon Sep 17 00:00:00 2001 -From: Yangbo Lu -Date: Thu, 28 Sep 2017 11:25:58 +0800 -Subject: [PATCH 3/3] armv8: ls1012ardb: add LEDE boot support in environment - -Signed-off-by: Yangbo Lu ---- - include/configs/ls1012ardb.h | 21 ++++++++++++++++++++- - 1 file changed, 20 insertions(+), 1 deletion(-) - -diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h -index 5fe3218..242cdf0 100644 ---- a/include/configs/ls1012ardb.h -+++ b/include/configs/ls1012ardb.h -@@ -127,13 +127,32 @@ - "$kernel_addr $kernel_size; env exists secureboot " \ - "&& sf read $kernelheader_addr_r $kernelheader_addr " \ - "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \ -- "bootm $load_addr#$board\0" -+ "bootm $load_addr#$board\0" \ -+ "lede_setenv=setenv loadaddr 82000000 && " \ -+ "setenv fdtaddr 8f000000 && " \ -+ "setenv bootargs root=/dev/mtdblock8 " \ -+ "rootfstype=ext4 noinitrd " \ -+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ -+ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \ -+ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \ -+ "16M(kernel),30M(ext4rfs),2M(user)\0" \ -+ "lede_run=pfe stop && sf probe 0:0 && " \ -+ "sf read $fdtaddr f00000 100000 && " \ -+ "sf read $loadaddr 1000000 1000000 && " \ -+ "bootm $loadaddr - $fdtaddr\0" \ -+ "lede_boot=run lede_setenv;run lede_run\0" - - #undef CONFIG_BOOTCOMMAND - #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) - #define CONFIG_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \ - "env exists secureboot && esbc_halt;" - #endif -+#undef CONFIG_BOOTCOMMAND -+#define CONFIG_BOOTCOMMAND "run lede_boot" -+ -+#undef CONFIG_BOOTDELAY -+#define CONFIG_BOOTDELAY 3 -+ - - #include - --- -2.7.4 - diff --git a/package/boot/uboot-layerscape/patches/0004-armv8-ls1088ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0004-armv8-ls1088ardb-add-LEDE-boot-support-in-environmen.patch deleted file mode 100644 index eaf0da283..000000000 --- a/package/boot/uboot-layerscape/patches/0004-armv8-ls1088ardb-add-LEDE-boot-support-in-environmen.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 479bf0c0bec2e99442214facf0f414c2c737ac7b Mon Sep 17 00:00:00 2001 -From: Yangbo Lu -Date: Mon, 16 Oct 2017 11:57:36 +0800 -Subject: [PATCH] armv8: ls1088ardb: add LEDE boot support in environment - -Signed-off-by: Yangbo Lu ---- - include/configs/ls1088ardb.h | 27 ++++++++++++++++++++++++++- - 1 file changed, 26 insertions(+), 1 deletion(-) - -diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h -index 7bd152d..4cefa40 100644 ---- a/include/configs/ls1088ardb.h -+++ b/include/configs/ls1088ardb.h -@@ -404,7 +404,20 @@ - "env exists secureboot && mmc read $kernelheader_addr_r " \ - "$kernelhdr_addr_sd $kernelhdr_size_sd " \ - " && esbc_validate ${kernelheader_addr_r};" \ -- "bootm $load_addr#$BOARD\0" -+ "bootm $load_addr#$BOARD\0" \ -+ "lede_setenv=setenv loadaddr 82000000 && " \ -+ "setenv fdtaddr 8f000000 && " \ -+ "setenv bootargs root=/dev/mtdblock10 " \ -+ "rootfstype=ext4 noinitrd " \ -+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ -+ "mtdparts=20c0000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \ -+ "6M(reserved-1),3M(mc),1M(dpl),1M(dpc),1M(dtb)," \ -+ "16M(kernel),30M(ext4rfs),2M(user)\0" \ -+ "lede_run=sf probe 0:0 && " \ -+ "sf read $fdtaddr f00000 100000 && " \ -+ "sf read $loadaddr 1000000 1000000 && " \ -+ "bootm $loadaddr - $fdtaddr\0" \ -+ "lede_boot=run lede_setenv;run lede_run\0" - - #undef CONFIG_BOOTCOMMAND - #if defined(CONFIG_QSPI_BOOT) -@@ -429,6 +442,18 @@ - "run distro_bootcmd;run sd_bootcmd;" \ - "env exists secureboot && esbc_halt;" - #endif -+ -+#undef CONFIG_BOOTCOMMAND -+#define CONFIG_BOOTCOMMAND \ -+ "sf probe 0:0;sf read 0x80000000 0xA00000 0x300000;" \ -+ "sf read 0x80300000 0xE00000 0x100000;" \ -+ "fsl_mc start mc 0x80000000 0x80300000;" \ -+ "sf read 0x80400000 0xd00000 0x100000;" \ -+ "fsl_mc apply dpl 0x80400000;" \ -+ "run lede_boot;" -+#undef CONFIG_BOOTDELAY -+#define CONFIG_BOOTDELAY 3 -+ - /* MAC/PHY configuration */ - #ifdef CONFIG_FSL_MC_ENET - #define CONFIG_PHYLIB_10G --- -2.7.4 - diff --git a/package/boot/uboot-layerscape/patches/0005-armv8-ls2088ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0005-armv8-ls2088ardb-add-LEDE-boot-support-in-environmen.patch deleted file mode 100644 index 6da256ab0..000000000 --- a/package/boot/uboot-layerscape/patches/0005-armv8-ls2088ardb-add-LEDE-boot-support-in-environmen.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 20f270670d1d5e14f3fd128f359535300a955ac8 Mon Sep 17 00:00:00 2001 -From: Yangbo Lu -Date: Mon, 16 Oct 2017 12:37:05 +0800 -Subject: [PATCH] armv8: ls2088ardb: add LEDE boot support in environment - -Signed-off-by: Yangbo Lu ---- - include/configs/ls2080ardb.h | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h -index 8a34990..8ae3944 100644 ---- a/include/configs/ls2080ardb.h -+++ b/include/configs/ls2080ardb.h -@@ -432,7 +432,19 @@ unsigned long get_board_sys_clk(void); - "env exists secureboot && mmc read $kernelheader_addr_r " \ - "$kernelhdr_addr_sd $kernelhdr_size_sd " \ - " && esbc_validate ${kernelheader_addr_r};" \ -- "bootm $load_addr#$board\0" -+ "bootm $load_addr#$board\0" \ -+ "lede_setenv=setenv loadaddr 82000000 && " \ -+ "setenv fdtaddr 8f000000 && " \ -+ "setenv bootargs root=/dev/mtdblock9 " \ -+ "rootfstype=squashfs,jffs2 noinitrd " \ -+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 " \ -+ "mtdparts=580000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \ -+ "6M(reserved-1),3M(mc),1M(dpl),1M(dpc),1M(dtb)," \ -+ "16M(kernel),32M(rootfs),64M(otherbank)\0" \ -+ "lede_run=cp.b 580f00000 $fdtaddr 100000 && " \ -+ "cp.b 581000000 $loadaddr 1000000 && " \ -+ "bootm $loadaddr - $fdtaddr\0" \ -+ "lede_boot=run lede_setenv;run lede_run\0" - - #undef CONFIG_BOOTCOMMAND - #ifdef CONFIG_QSPI_BOOT -@@ -463,6 +475,15 @@ unsigned long get_board_sys_clk(void); - "env exists secureboot && esbc_halt;" - #endif - -+#undef CONFIG_BOOTCOMMAND -+#define CONFIG_BOOTCOMMAND \ -+ "fsl_mc start mc 0x580a00000 0x580e00000;" \ -+ "fsl_mc apply dpl 0x580d00000;" \ -+ "run lede_boot;" -+ -+#undef CONFIG_BOOTDELAY -+#define CONFIG_BOOTDELAY 3 -+ - #undef CONFIG_BOOTARGS - #define CONFIG_BOOTARGS "console=ttyS1,115200 root=/dev/ram0 " \ - "earlycon=uart8250,mmio,0x21c0600 " \ --- -2.7.4 - diff --git a/package/boot/uboot-layerscape/patches/0006-armv8-ls1012afrdm-add-LEDE-boot-support-in-environme.patch b/package/boot/uboot-layerscape/patches/0006-armv8-ls1012afrdm-add-LEDE-boot-support-in-environme.patch deleted file mode 100644 index 45010a210..000000000 --- a/package/boot/uboot-layerscape/patches/0006-armv8-ls1012afrdm-add-LEDE-boot-support-in-environme.patch +++ /dev/null @@ -1,49 +0,0 @@ -From a5e454a3bb33a456655f08592606e4df34e40110 Mon Sep 17 00:00:00 2001 -From: Yangbo Lu -Date: Tue, 24 Oct 2017 17:48:08 +0800 -Subject: [PATCH] armv8: ls1012afrdm: add LEDE boot support in environment - -Signed-off-by: Yangbo Lu ---- - include/configs/ls1012afrdm.h | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/include/configs/ls1012afrdm.h b/include/configs/ls1012afrdm.h -index a3f8824d27..36dff19bdd 100644 ---- a/include/configs/ls1012afrdm.h -+++ b/include/configs/ls1012afrdm.h -@@ -73,12 +73,31 @@ - "qspi_bootcmd=echo Trying load from qspi..;" \ - "sf probe && sf read $load_addr " \ - "$kernel_addr $kernel_size && bootm $load_addr#$board\0" \ -+ "lede_setenv=setenv loadaddr 82000000 && " \ -+ "setenv fdtaddr 8f000000 && " \ -+ "setenv bootargs root=/dev/mtdblock8 " \ -+ "rootfstype=ext4 noinitrd " \ -+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ -+ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \ -+ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \ -+ "16M(kernel),30M(ext4rfs),2M(user)\0" \ -+ "lede_run=pfe stop && sf probe 0:0 && " \ -+ "sf read $fdtaddr f00000 100000 && " \ -+ "sf read $loadaddr 1000000 1000000 && " \ -+ "bootm $loadaddr - $fdtaddr\0" \ -+ "lede_boot=run lede_setenv;run lede_run\0" - - #undef CONFIG_BOOTCOMMAND - #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) - #define CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd" - #endif - -+#undef CONFIG_BOOTCOMMAND -+#define CONFIG_BOOTCOMMAND "run lede_boot" -+ -+#undef CONFIG_BOOTDELAY -+#define CONFIG_BOOTDELAY 3 -+ - /* - * USB - */ --- -2.14.1 - diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index b29039cd8..024230946 100644 --- a/package/boot/uboot-mvebu/Makefile +++ b/package/boot/uboot-mvebu/Makefile @@ -8,33 +8,90 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2017.03 +PKG_NAME:=u-boot +PKG_VERSION:=2016.03 PKG_RELEASE:=1 -PKG_HASH:=f54baf3f9325bf444c7905f3a5b6f83680edb1e6e1a4d5f8a5ad80abe885113f +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=\ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot +PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb + +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + +PKG_BUILD_PARALLEL:=1 -include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk -UBOOT_MAKE_FLAGS:= - -define U-Boot/Default - BUILD_TARGET:=mvebu - HIDDEN:=1 +define uboot/Default + TITLE:= endef -define U-Boot/clearfog - NAME:=SolidRun ClearFog A1 - BUILD_DEVICES:=armada-388-clearfog-base armada-388-clearfog-pro - UBOOT_IMAGE:=u-boot-spl.kwb +define uboot/clearfog + TITLE:=U-Boot for SolidRun ClearFog A1 + DEVICE:=armada-388-clearfog endef -UBOOT_TARGETS:= \ +UBOOTS:= \ clearfog -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot-spl.kwb +define Package/uboot/template +define Package/uboot-mvebu-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@(TARGET_DEVICE_mvebu_DEVICE_$(3)||TARGET_mvebu_DEVICE_$(3)||TARGET_mvebu_Default) + DEFAULT:=m + HIDDEN:=1 + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) + MAINTAINER:=Felix Fietkau +endef endef -$(eval $(call BuildPackage/U-Boot)) +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE),$(DEVICE)) +endef + +define Build/Configure + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(BUILD_VARIANT)_config +endef + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) \ + DTC_DIR=$(LINUX_DIR)/scripts/dtc/ +endef + +define Package/uboot/install/default + $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) + $(CP) $(PKG_BUILD_DIR)/u-boot-spl.kwb \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-spl.kwb + $(INSTALL_DIR) $(KERNEL_BUILD_DIR)/ + $(CP) $(PKG_BUILD_DIR)/u-boot-spl.kwb \ + $(KERNEL_BUILD_DIR)/openwrt-$(BOARD)-$(1)-u-boot-spl.kwb + $(INSTALL_DIR) $(BIN_DIR)/u-boot-kwboot/ + $(CP) $(PKG_BUILD_DIR)/tools/kwboot \ + $(BIN_DIR)/u-boot-kwboot/ +endef + +define Package/uboot/install/template +define Package/uboot-mvebu-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-mvebu-$(u))) \ +) diff --git a/package/boot/uboot-mvebu/patches/0001-clearfog-generate-random-MAC-address.patch b/package/boot/uboot-mvebu/patches/0001-clearfog-generate-random-MAC-address.patch deleted file mode 100644 index c34616292..000000000 --- a/package/boot/uboot-mvebu/patches/0001-clearfog-generate-random-MAC-address.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ee16ee20205ea374613c3ac7f50209451eb29068 Mon Sep 17 00:00:00 2001 -From: Josua Mayer -Date: Sun, 23 Apr 2017 18:02:40 +0200 -Subject: [PATCH 1/4] clearfog: generate random MAC address - -The Clearfog does not come with predetermined MACs. -Falling back to random ones ensures ethernet can still operate anyway. - -Signed-off-by: Josua Mayer >josua.mayer97@gmail.com> ---- - configs/clearfog_defconfig | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig -index 1264871e83..41e94e6daf 100644 ---- a/configs/clearfog_defconfig -+++ b/configs/clearfog_defconfig -@@ -47,6 +47,7 @@ CONFIG_DEBUG_UART=y - CONFIG_DEBUG_UART_BASE=0xd0012000 - CONFIG_DEBUG_UART_CLOCK=250000000 - CONFIG_DEBUG_UART_SHIFT=2 -+CONFIG_NET_RANDOM_ETHADDR=y - CONFIG_SYS_NS16550=y - CONFIG_USB=y - CONFIG_DM_USB=y --- -2.12.2 - diff --git a/package/boot/uboot-mvebu/patches/0003-clearfog-enable-distro-boot-code.patch b/package/boot/uboot-mvebu/patches/0003-clearfog-enable-distro-boot-code.patch deleted file mode 100644 index 97b2d1f25..000000000 --- a/package/boot/uboot-mvebu/patches/0003-clearfog-enable-distro-boot-code.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 9653921eadd5d5268afbee6c928708158fc4e844 Mon Sep 17 00:00:00 2001 -From: Josua Mayer -Date: Tue, 22 Nov 2016 16:33:23 +0100 -Subject: [PATCH 3/4] clearfog: enable distro boot code - -load addresses start at 0x02000000, leaving enough space for fdt, -boot scripts and ramdisk at the end. -Only boot from mmc, the other options are not in working order. -Removed *_high variables in good faith. They can be re-added with sane -values when, and if required. - -Signed-off-by: Josua Mayer ---- - Kconfig | 1 + - include/configs/clearfog.h | 47 +++++++++++++++++++++++++++++++++++++++++----- - 2 files changed, 43 insertions(+), 5 deletions(-) - -diff --git a/Kconfig b/Kconfig -index 81b4226463..f7aec2255b 100644 ---- a/Kconfig -+++ b/Kconfig -@@ -59,6 +59,7 @@ config DISTRO_DEFAULTS - default y if ARCH_LS2080A - default y if ARCH_MESON - default y if ARCH_ROCKCHIP -+ default y if TARGET_CLEARFOG - default n - select CMD_BOOTZ if ARM && !ARM64 - select CMD_BOOTI if ARM64 -diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h -index 0c51d2a288..890dd84b5d 100644 ---- a/include/configs/clearfog.h -+++ b/include/configs/clearfog.h -@@ -79,11 +79,6 @@ - - #define CONFIG_SYS_ALT_MEMTEST - --/* Keep device tree and initrd in lower memory so the kernel can access them */ --#define CONFIG_EXTRA_ENV_SETTINGS \ -- "fdt_high=0x10000000\0" \ -- "initrd_high=0x10000000\0" -- - /* SPL */ - /* - * Select the boot device here -@@ -128,6 +123,48 @@ - #endif - #endif - -+#ifndef CONFIG_SPL_BUILD -+/* -+ * Add standard bootenv from distro boot code: -+ * Keep device tree and initrd in lower memory so the kernel can access them -+ * Set default load addresses: -+ * - 63MiB space for kernel -+ * - 1MiB space for fdt -+ * - 1MiB space for extlinux file, or boot script -+ * - remainder for ramdisk -+ * Keep device tree and initrd in lower memory so the kernel can access them -+ * Set name of fdt file (default to Clearfog Pro) -+ * specify console device -+ */ -+#define CONFIG_EXTRA_ENV_SETTINGS \ -+ "kernel_addr_r=0x02000000\0" \ -+ "fdt_addr_r=0x05f00000\0" \ -+ "pxefile_addr_r=0x06000000\0" \ -+ "scriptaddr=0x06000000\0" \ -+ "ramdisk_addr_r=0x06100000\0" \ -+ "fdt_high=0x10000000\0" \ -+ "initrd_high=0x10000000\0" \ -+ "fdtfile=armada-388-clearfog-pro.dtb\0" \ -+ "console=ttyS0," __stringify(CONFIG_BAUDRATE) "\0" \ -+ BOOTENV -+ -+/* include distro boot code defaults */ -+#include -+ -+/* -+ * specify boot order -+ * sdcard or emmc -> usb -> network -+ */ -+#define BOOT_TARGET_DEVICES(func) \ -+ func(MMC, mmc, 0) \ -+ func(USB, usb, 0) \ -+ func(PXE, pxe, na) \ -+ func(DHCP, dhcp, na) -+ -+/* include the actual distro boot code */ -+#include -+#endif -+ - /* - * mv-common.h should be defined after CMD configs since it used them - * to enable certain macros --- -2.12.2 - diff --git a/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch b/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch deleted file mode 100644 index ca734660e..000000000 --- a/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 7b53a0f5ddf0b1201a09c368b06cd5750d5fbe3a Mon Sep 17 00:00:00 2001 -From: Josua Mayer -Date: Sun, 23 Apr 2017 17:45:11 +0200 -Subject: [PATCH 4/4] clearfog: enable setexpr command by default - -Turns out this command is pretty useful in advanced boot-scripts. --> enable - -Signed-off-by: Josua Mayer ---- - configs/clearfog_defconfig | 1 + - 1 file changed, 1 insertion(+) - ---- a/configs/clearfog_defconfig -+++ b/configs/clearfog_defconfig -@@ -23,7 +23,7 @@ CONFIG_CMD_SF=y - CONFIG_CMD_SPI=y - CONFIG_CMD_I2C=y - CONFIG_CMD_USB=y --# CONFIG_CMD_SETEXPR is not set -+CONFIG_CMD_SETEXPR=y - CONFIG_CMD_TFTPPUT=y - CONFIG_CMD_DHCP=y - CONFIG_CMD_MII=y diff --git a/package/boot/uboot-mvebu/patches/001-use-dtc-in-kernel.patch b/package/boot/uboot-mvebu/patches/001-use-dtc-in-kernel.patch new file mode 100644 index 000000000..7e46084ad --- /dev/null +++ b/package/boot/uboot-mvebu/patches/001-use-dtc-in-kernel.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -348,7 +348,7 @@ OBJDUMP = $(CROSS_COMPILE)objdump + AWK = awk + PERL = perl + PYTHON = python +-DTC = dtc ++DTC = $(DTC_DIR)dtc + CHECK = sparse + + CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ diff --git a/package/boot/uboot-mvebu/patches/0011-rsa-Fix-build-with-OpenSSL-1.1.x.patch b/package/boot/uboot-mvebu/patches/0011-rsa-Fix-build-with-OpenSSL-1.1.x.patch deleted file mode 100644 index fbbfe462b..000000000 --- a/package/boot/uboot-mvebu/patches/0011-rsa-Fix-build-with-OpenSSL-1.1.x.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 59be82ef7e7ec4be6e1597d8aef65dd3d8c3a0d9 Mon Sep 17 00:00:00 2001 -From: Jelle van der Waa -Date: Mon, 8 May 2017 21:31:19 +0200 -Subject: [PATCH 1/2] rsa: Fix build with OpenSSL 1.1.x - -The rsa_st struct has been made opaque in 1.1.x, add forward compatible -code to access the n, e, d members of rsa_struct. - -EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be -called to reinitialise an already created structure. ---- - lib/rsa/rsa-sign.c | 44 ++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 38 insertions(+), 6 deletions(-) - ---- a/lib/rsa/rsa-sign.c -+++ b/lib/rsa/rsa-sign.c -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -20,6 +21,19 @@ - #define HAVE_ERR_REMOVE_THREAD_STATE - #endif - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+static void RSA_get0_key(const RSA *r, -+ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) -+{ -+ if (n != NULL) -+ *n = r->n; -+ if (e != NULL) -+ *e = r->e; -+ if (d != NULL) -+ *d = r->d; -+} -+#endif -+ - static int rsa_err(const char *msg) - { - unsigned long sslErr = ERR_get_error(); -@@ -286,16 +300,22 @@ static int rsa_init(void) - { - int ret; - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - ret = SSL_library_init(); -+#else -+ ret = OPENSSL_init_ssl(0, NULL); -+#endif - if (!ret) { - fprintf(stderr, "Failure to init SSL library\n"); - return -1; - } -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_load_error_strings(); - - OpenSSL_add_all_algorithms(); - OpenSSL_add_all_digests(); - OpenSSL_add_all_ciphers(); -+#endif - - return 0; - } -@@ -335,12 +355,15 @@ err_set_rsa: - err_engine_init: - ENGINE_free(e); - err_engine_by_id: -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - ENGINE_cleanup(); -+#endif - return ret; - } - - static void rsa_remove(void) - { -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - #ifdef HAVE_ERR_REMOVE_THREAD_STATE -@@ -349,6 +372,7 @@ static void rsa_remove(void) - ERR_remove_state(0); - #endif - EVP_cleanup(); -+#endif - } - - static void rsa_engine_remove(ENGINE *e) -@@ -409,7 +433,11 @@ static int rsa_sign_with_key(RSA *rsa, s - ret = rsa_err("Could not obtain signature"); - goto err_sign; - } -- EVP_MD_CTX_cleanup(context); -+ #if OPENSSL_VERSION_NUMBER < 0x10100000L -+ EVP_MD_CTX_cleanup(context); -+ #else -+ EVP_MD_CTX_reset(context); -+ #endif - EVP_MD_CTX_destroy(context); - EVP_PKEY_free(key); - -@@ -479,6 +507,7 @@ static int rsa_get_exponent(RSA *key, ui - { - int ret; - BIGNUM *bn_te; -+ const BIGNUM *key_e; - uint64_t te; - - ret = -EINVAL; -@@ -487,17 +516,18 @@ static int rsa_get_exponent(RSA *key, ui - if (!e) - goto cleanup; - -- if (BN_num_bits(key->e) > 64) -+ RSA_get0_key(key, NULL, &key_e, NULL); -+ if (BN_num_bits(key_e) > 64) - goto cleanup; - -- *e = BN_get_word(key->e); -+ *e = BN_get_word(key_e); - -- if (BN_num_bits(key->e) < 33) { -+ if (BN_num_bits(key_e) < 33) { - ret = 0; - goto cleanup; - } - -- bn_te = BN_dup(key->e); -+ bn_te = BN_dup(key_e); - if (!bn_te) - goto cleanup; - -@@ -527,6 +557,7 @@ int rsa_get_params(RSA *key, uint64_t *e - { - BIGNUM *big1, *big2, *big32, *big2_32; - BIGNUM *n, *r, *r_squared, *tmp; -+ const BIGNUM *key_n; - BN_CTX *bn_ctx = BN_CTX_new(); - int ret = 0; - -@@ -548,7 +579,8 @@ int rsa_get_params(RSA *key, uint64_t *e - if (0 != rsa_get_exponent(key, exponent)) - ret = -1; - -- if (!BN_copy(n, key->n) || !BN_set_word(big1, 1L) || -+ RSA_get0_key(key, &key_n, NULL, NULL); -+ if (!BN_copy(n, key_n) || !BN_set_word(big1, 1L) || - !BN_set_word(big2, 2L) || !BN_set_word(big32, 32L)) - ret = -1; - diff --git a/package/boot/uboot-mvebu/patches/0012-tools-kwbimage-fix-build-with-OpenSSL-1.1.x.patch b/package/boot/uboot-mvebu/patches/0012-tools-kwbimage-fix-build-with-OpenSSL-1.1.x.patch deleted file mode 100644 index 882969905..000000000 --- a/package/boot/uboot-mvebu/patches/0012-tools-kwbimage-fix-build-with-OpenSSL-1.1.x.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 65030804dc57f3488e4ffe21e72fc65cd245cb98 Mon Sep 17 00:00:00 2001 -From: Jelle van der Waa -Date: Mon, 8 May 2017 21:31:20 +0200 -Subject: [PATCH 2/2] tools: kwbimage fix build with OpenSSL 1.1.x - -The rsa_st struct has been made opaque in 1.1.x, add forward compatible -code to access the n, e, d members of rsa_struct. - -EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be -called to reinitialise an already created structure. - -Signed-off-by: Jelle van der Waa ---- - tools/kwbimage.c | 36 ++++++++++++++++++++++++++++++------ - 1 file changed, 30 insertions(+), 6 deletions(-) - ---- a/tools/kwbimage.c -+++ b/tools/kwbimage.c -@@ -18,10 +18,30 @@ - #include "kwbimage.h" - - #ifdef CONFIG_KWB_SECURE -+#include - #include - #include - #include - #include -+ -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+static void RSA_get0_key(const RSA *r, -+ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) -+{ -+ if (n != NULL) -+ *n = r->n; -+ if (e != NULL) -+ *e = r->e; -+ if (d != NULL) -+ *d = r->d; -+} -+ -+#else -+void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) -+{ -+ EVP_MD_CTX_reset(ctx); -+} -+#endif - #endif - - static struct image_cfg_element *image_cfg; -@@ -470,12 +490,16 @@ static int kwb_export_pubkey(RSA *key, s - char *keyname) - { - int size_exp, size_mod, size_seq; -+ const BIGNUM *key_e, *key_n; - uint8_t *cur; - char *errmsg = "Failed to encode %s\n"; - -- if (!key || !key->e || !key->n || !dst) { -+ RSA_get0_key(key, NULL, &key_e, NULL); -+ RSA_get0_key(key, &key_n, NULL, NULL); -+ -+ if (!key || !key_e || !key_n || !dst) { - fprintf(stderr, "export pk failed: (%p, %p, %p, %p)", -- key, key->e, key->n, dst); -+ key, key_e, key_n, dst); - fprintf(stderr, errmsg, keyname); - return -EINVAL; - } -@@ -490,8 +514,8 @@ static int kwb_export_pubkey(RSA *key, s - * do the encoding manually. - */ - -- size_exp = BN_num_bytes(key->e); -- size_mod = BN_num_bytes(key->n); -+ size_exp = BN_num_bytes(key_e); -+ size_mod = BN_num_bytes(key_n); - size_seq = 4 + size_mod + 4 + size_exp; - - if (size_mod > 256) { -@@ -520,14 +544,14 @@ static int kwb_export_pubkey(RSA *key, s - *cur++ = 0x82; - *cur++ = (size_mod >> 8) & 0xFF; - *cur++ = size_mod & 0xFF; -- BN_bn2bin(key->n, cur); -+ BN_bn2bin(key_n, cur); - cur += size_mod; - /* Exponent */ - *cur++ = 0x02; /* INTEGER */ - *cur++ = 0x82; - *cur++ = (size_exp >> 8) & 0xFF; - *cur++ = size_exp & 0xFF; -- BN_bn2bin(key->e, cur); -+ BN_bn2bin(key_e, cur); - - if (hashf) { - struct hash_v1 pk_hash; diff --git a/package/boot/uboot-mvebu/patches/002-enable_random_mac_addr.patch b/package/boot/uboot-mvebu/patches/002-enable_random_mac_addr.patch new file mode 100644 index 000000000..2dd9f2828 --- /dev/null +++ b/package/boot/uboot-mvebu/patches/002-enable_random_mac_addr.patch @@ -0,0 +1,10 @@ +--- a/configs/clearfog_defconfig ++++ b/configs/clearfog_defconfig +@@ -14,6 +14,7 @@ CONFIG_DEBUG_UART=y + CONFIG_DEBUG_UART_BASE=0xd0012000 + CONFIG_DEBUG_UART_CLOCK=250000000 + CONFIG_DEBUG_UART_SHIFT=2 ++CONFIG_NET_RANDOM_ETHADDR=y + CONFIG_SYS_NS16550=y + CONFIG_USB=y + CONFIG_DM_USB=y diff --git a/package/boot/uboot-mvebu/patches/003-boot_script.patch b/package/boot/uboot-mvebu/patches/003-boot_script.patch new file mode 100644 index 000000000..2e156b7c8 --- /dev/null +++ b/package/boot/uboot-mvebu/patches/003-boot_script.patch @@ -0,0 +1,32 @@ +--- a/include/configs/clearfog.h ++++ b/include/configs/clearfog.h +@@ -107,7 +107,18 @@ + /* Keep device tree and initrd in lower memory so the kernel can access them */ + #define CONFIG_EXTRA_ENV_SETTINGS \ + "fdt_high=0x10000000\0" \ +- "initrd_high=0x10000000\0" ++ "initrd_high=0x10000000\0" \ ++ "script=boot.scr\0" \ ++ "loadaddr=0x01000000\0" \ ++ "mmcdev=0\0" \ ++ "mmcpart=1\0" \ ++ "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ ++ "bootscript=echo Running bootscript from mmc ...; source ${loadaddr}\0" ++ ++#define CONFIG_BOOTCOMMAND \ ++ "if run loadbootscript; then " \ ++ "run bootscript; " \ ++ "fi" + + /* SPL */ + /* +--- a/configs/clearfog_defconfig ++++ b/configs/clearfog_defconfig +@@ -3,6 +3,7 @@ CONFIG_ARCH_MVEBU=y + CONFIG_SYS_MALLOC_F_LEN=0x2000 + CONFIG_TARGET_CLEARFOG=y + CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog" ++CONFIG_HUSH_PARSER=y + CONFIG_SPL=y + # CONFIG_CMD_IMLS is not set + # CONFIG_CMD_FLASH is not set diff --git a/package/boot/uboot-mvebu/patches/0002-clearfog-reset-usom-onboard-1512-phy.patch b/package/boot/uboot-mvebu/patches/200-clearfog-reset-usom-onboard-1512-phy.patch similarity index 81% rename from package/boot/uboot-mvebu/patches/0002-clearfog-reset-usom-onboard-1512-phy.patch rename to package/boot/uboot-mvebu/patches/200-clearfog-reset-usom-onboard-1512-phy.patch index 164c6f3f2..3c470409e 100644 --- a/package/boot/uboot-mvebu/patches/0002-clearfog-reset-usom-onboard-1512-phy.patch +++ b/package/boot/uboot-mvebu/patches/200-clearfog-reset-usom-onboard-1512-phy.patch @@ -1,7 +1,7 @@ -From 98848106b9558244ae36a85229caabcdb57d0f7b Mon Sep 17 00:00:00 2001 +From 15d52c4067b8d8a1d7a002aec41c5e6c0a8678cd Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Fri, 23 Sep 2016 13:58:14 +0200 -Subject: [PATCH 2/4] clearfog: reset usom onboard 1512 phy +Subject: [PATCH] clearfog: reset usom onboard 1512 phy Use GPIO19 which is wired to the uSOM phy reset signal in order to reset the uSOM's 88E81512 gigabit Ethernet phy. @@ -15,8 +15,6 @@ Signed-off-by: Jonas Gorski board/solidrun/clearfog/clearfog.c | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c -index 2773f5957e..3a8257cac3 100644 --- a/board/solidrun/clearfog/clearfog.c +++ b/board/solidrun/clearfog/clearfog.c @@ -131,8 +131,12 @@ int board_init(void) @@ -32,6 +30,3 @@ index 2773f5957e..3a8257cac3 100644 mdelay(10); /* Init I2C IO expanders */ --- -2.12.2 - diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 92cf9e6b2..d00940c54 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -6,40 +6,91 @@ # include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk +PKG_NAME:=u-boot PKG_VERSION:=2016.01 PKG_RELEASE:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot PKG_HASH:=e5792fba9399d9804aa2ef667f14ff771e2cdece72367d340250265bf095a5d5 -include $(INCLUDE_DIR)/u-boot.mk +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=mxs - UBOOT_IMAGE:=u-boot.sb - DEFAULT:=y - HIDDEN:=1 +define uboot/Default + TITLE:= + CONFIG:= + IMAGE:= endef -define U-Boot/mx23_olinuxino - NAME:=Olinuxino i.MX233 +define uboot/mx23_olinuxino + TITLE:=U-Boot 2016.01 for the Olinuxino i.MX233 endef -define U-Boot/duckbill - NAME:=I2SE Duckbill +define uboot/duckbill + TITLE:=U-Boot 2016.01 for the I2SE Duckbill endef -UBOOT_TARGETS := \ +UBOOTS := \ mx23_olinuxino \ duckbill -UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE) - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE) +define Package/uboot/template +define Package/uboot-mxs-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_mxs + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) + MAINTAINER:=Zoltan HERPAI +endef endef -$(eval $(call BuildPackage/U-Boot)) +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) +endef + +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),u-boot.sb) +endif + +define Build/Configure + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(UBOOT_CONFIG)_config +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) $(UBOOT_IMAGE) +endef + +define Package/uboot/install/default + $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) + $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(BIN_DIR)/uboot-$(BOARD)-$(1)/uboot-$(BOARD)-$(1).sb +endef + +define Package/uboot/install/template +define Package/uboot-mxs-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-mxs-$(u))) \ +) diff --git a/package/boot/uboot-omap/Makefile b/package/boot/uboot-omap/Makefile index 9084f3740..547c6534c 100644 --- a/package/boot/uboot-omap/Makefile +++ b/package/boot/uboot-omap/Makefile @@ -6,52 +6,98 @@ # include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2017.01 +PKG_NAME:=u-boot +PKG_VERSION:=2015.10 PKG_RELEASE:=1 -PKG_HASH:=6c425175f93a4bcf2ec9faf5658ef279633dbd7856a293d95bd1ff516528ecf2 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot +PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955 + +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README -include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=omap - UBOOT_IMAGE:=u-boot.img MLO - UENV:=default +define uboot/Default + TITLE:= + CONFIG:= + IMAGE:= endef -define U-Boot/omap4_panda - NAME:=Pandaboard - BUILD_DEVICES:=omap4-panda +define uboot/omap4_panda + TITLE:=U-Boot for the Pandaboard endef -define U-Boot/am335x_boneblack - NAME:=TI AM335x BeagleBone Black - BUILD_DEVICES:=am335x-boneblack +define uboot/am335x_evm + TITLE:=U-Boot for the AM335x EVM endef -define U-Boot/am335x_evm - NAME:=AM335x EVM - BUILD_DEVICES:=am335x-evm +define uboot/omap3_overo + TITLE:=U-Boot for the Gumstix Overo endef -define U-Boot/omap3_overo - NAME:=Gumstix Overo +define uboot/omap3_beagle + TITLE:=U-Boot for the BeagleBoard endef -define U-Boot/omap3_beagle - NAME:=BeagleBoard - BUILD_DEVICES:=omap3-beagle +UBOOTS:=omap4_panda am335x_evm omap3_overo omap3_beagle + +define Package/uboot/template +define Package/uboot-omap-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_omap + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) + HIDDEN:=1 +endef endef -UBOOT_TARGETS:=omap4_panda am335x_evm omap3_overo omap3_beagle am335x_boneblack - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES) - $(CP) $(patsubst %,$(PKG_BUILD_DIR)/%,$(UBOOT_IMAGE)) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)/ - $(CP) ./files/uEnv-$(UENV).txt $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)/uEnv.txt +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) endef -$(eval $(call BuildPackage/U-Boot)) +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.img) +endif + +define Build/Configure + $(MAKE) -C $(PKG_BUILD_DIR) \ + USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_config +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) +endef + +define Package/uboot/install/default + $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) + $(CP) $(PKG_BUILD_DIR)/u-boot.img $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.img + $(CP) $(PKG_BUILD_DIR)/MLO $(BIN_DIR)/uboot-$(BOARD)-$(1)/MLO +endef + +define Package/uboot/install/template +define Package/uboot-omap-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-omap-$(u))) \ +) diff --git a/package/boot/uboot-omap/files/uEnv-default.txt b/package/boot/uboot-omap/files/uEnv-default.txt deleted file mode 100644 index 3584e4379..000000000 --- a/package/boot/uboot-omap/files/uEnv-default.txt +++ /dev/null @@ -1,8 +0,0 @@ -bootpart=0:1 -bootdir=/ -bootfile=zImage -fdtdir=/dtbs -uenvcmd=run loadfdt; run loadimage; run uenvbootargs ; bootz ${loadaddr} - ${fdtaddr} -loadfdt=load mmc ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile} -devtype=mmc -uenvbootargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 diff --git a/package/boot/uboot-omap/patches/001-backport_upstream_image_c_fix_non_android_booting.patch b/package/boot/uboot-omap/patches/001-backport_upstream_image_c_fix_non_android_booting.patch new file mode 100644 index 000000000..b8e65b500 --- /dev/null +++ b/package/boot/uboot-omap/patches/001-backport_upstream_image_c_fix_non_android_booting.patch @@ -0,0 +1,33 @@ +From c139b5ff0999ec3d44a02ebdb623a92e5782e53e Mon Sep 17 00:00:00 2001 +From: Tom Rini +Date: Tue, 27 Oct 2015 19:04:40 -0400 +Subject: [PATCH] image.c: Fix non-Android booting with ramdisk and/or device + tree + +In 1fec3c5 I added a check that if we had an Android image we default to +trying the kernel address for a ramdisk. However when we don't have an +Android image buf is NULL and we oops here. Ensure that we have 'buf' +to check first. + +Reported-by: elipe Balbi +Signed-off-by: Tom Rini +--- + common/image.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/common/image.c b/common/image.c +index e607109..85c4f39 100644 +--- a/common/image.c ++++ b/common/image.c +@@ -913,7 +913,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images, + * Look for an Android boot image. + */ + buf = map_sysmem(images->os.start, 0); +- if (genimg_get_format(buf) == IMAGE_FORMAT_ANDROID) ++ if (buf && genimg_get_format(buf) == IMAGE_FORMAT_ANDROID) + select = argv[0]; + #endif + +-- +1.7.10.4 + diff --git a/package/boot/uboot-omap/patches/100-disable_thumb_unknown_errata.patch b/package/boot/uboot-omap/patches/100-disable_thumb_unknown_errata.patch new file mode 100644 index 000000000..7b7bfa8fb --- /dev/null +++ b/package/boot/uboot-omap/patches/100-disable_thumb_unknown_errata.patch @@ -0,0 +1,11 @@ +--- a/include/configs/ti_armv7_common.h ++++ b/include/configs/ti_armv7_common.h +@@ -233,8 +233,6 @@ + #define CONFIG_SPL_EXT_SUPPORT + #endif + +-#define CONFIG_SYS_THUMB_BUILD +- + /* General parts of the framework, required. */ + #define CONFIG_SPL_I2C_SUPPORT + #define CONFIG_SPL_LIBCOMMON_SUPPORT diff --git a/package/boot/uboot-omap/patches/101-disable-thumb-omap3.patch b/package/boot/uboot-omap/patches/101-disable-thumb-omap3.patch deleted file mode 100644 index 8a3b024fe..000000000 --- a/package/boot/uboot-omap/patches/101-disable-thumb-omap3.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: u-boot-2017.01/include/configs/ti_omap3_common.h -=================================================================== ---- u-boot-2017.01.orig/include/configs/ti_omap3_common.h -+++ u-boot-2017.01/include/configs/ti_omap3_common.h -@@ -80,4 +80,9 @@ - /* Now bring in the rest of the common code. */ - #include - -+/* beagleboard doesnt boot with thumb */ -+#ifdef CONFIG_SYS_THUMB_BUILD -+#undef CONFIG_SYS_THUMB_BUILD -+#endif -+ - #endif /* __CONFIG_TI_OMAP3_COMMON_H__ */ diff --git a/package/boot/uboot-omap/patches/101-disable_ext.patch b/package/boot/uboot-omap/patches/101-disable_ext.patch new file mode 100644 index 000000000..9e0e47caf --- /dev/null +++ b/package/boot/uboot-omap/patches/101-disable_ext.patch @@ -0,0 +1,10 @@ +--- a/include/configs/ti_armv7_common.h ++++ b/include/configs/ti_armv7_common.h +@@ -230,7 +230,6 @@ + #define CONFIG_SPL_LIBDISK_SUPPORT + #define CONFIG_SPL_MMC_SUPPORT + #define CONFIG_SPL_FAT_SUPPORT +-#define CONFIG_SPL_EXT_SUPPORT + #endif + + /* General parts of the framework, required. */ diff --git a/package/boot/uboot-omap/patches/102-minify-spl.patch b/package/boot/uboot-omap/patches/102-minify-spl.patch deleted file mode 100644 index 66f6b6b59..000000000 --- a/package/boot/uboot-omap/patches/102-minify-spl.patch +++ /dev/null @@ -1,44 +0,0 @@ -Index: u-boot-2017.01/configs/omap3_beagle_defconfig -=================================================================== ---- u-boot-2017.01.orig/configs/omap3_beagle_defconfig -+++ u-boot-2017.01/configs/omap3_beagle_defconfig -@@ -7,7 +7,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y - CONFIG_VERSION_VARIABLE=y - CONFIG_SPL=y - CONFIG_SPL_MTD_SUPPORT=y --CONFIG_SPL_OS_BOOT=y -+# CONFIG_SPL_EXT_SUPPORT is not set - # CONFIG_CMD_IMLS is not set - CONFIG_CMD_ASKENV=y - # CONFIG_CMD_FLASH is not set -Index: u-boot-2017.01/common/Makefile -=================================================================== ---- u-boot-2017.01.orig/common/Makefile -+++ u-boot-2017.01/common/Makefile -@@ -174,8 +174,11 @@ obj-$(CONFIG_CMDLINE) += cli_simple.o - obj-y += cli.o - obj-$(CONFIG_CMDLINE) += cli_readline.o - obj-$(CONFIG_CMD_DFU) += dfu.o -+ -+ifndef CONFIG_SPL_BUILD - obj-y += command.o - obj-y += s_record.o - obj-y += xyzModem.o -+endif - - CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null) -Index: u-boot-2017.01/cmd/Makefile -=================================================================== ---- u-boot-2017.01.orig/cmd/Makefile -+++ u-boot-2017.01/cmd/Makefile -@@ -161,7 +161,10 @@ endif # !CONFIG_SPL_BUILD - - obj-$(CONFIG_CMD_BLOB) += blob.o - -+ -+# ifndef CONFIG_SPL_BUILD - # core command - obj-y += nvedit.o -+# endif # !CONFIG_SPL_BUILD - - obj-$(CONFIG_ARCH_MVEBU) += mvebu/ diff --git a/package/boot/uboot-omap/patches/103-disable-fat-write-spl.patch b/package/boot/uboot-omap/patches/103-disable-fat-write-spl.patch deleted file mode 100644 index 89b02044d..000000000 --- a/package/boot/uboot-omap/patches/103-disable-fat-write-spl.patch +++ /dev/null @@ -1,27 +0,0 @@ -Index: u-boot-2017.01/fs/fat/Makefile -=================================================================== ---- u-boot-2017.01.orig/fs/fat/Makefile -+++ u-boot-2017.01/fs/fat/Makefile -@@ -4,8 +4,8 @@ - # - - obj-$(CONFIG_FS_FAT) := fat.o --obj-$(CONFIG_FAT_WRITE):= fat_write.o - - ifndef CONFIG_SPL_BUILD -+obj-$(CONFIG_FAT_WRITE):= fat_write.o - obj-$(CONFIG_FS_FAT) += file.o - endif -Index: u-boot-2017.01/fs/fat/fat.c -=================================================================== ---- u-boot-2017.01.orig/fs/fat/fat.c -+++ u-boot-2017.01/fs/fat/fat.c -@@ -163,7 +163,7 @@ static void get_name(dir_entry *dirent, - } - - static int flush_dirty_fat_buffer(fsdata *mydata); --#if !defined(CONFIG_FAT_WRITE) -+#if !defined(CONFIG_FAT_WRITE) || defined(CONFIG_SPL_BUILD) - /* Stub for read only operation */ - int flush_dirty_fat_buffer(fsdata *mydata) - { diff --git a/package/boot/uboot-omap/patches/104-omap3-overo-enable-thumb.patch b/package/boot/uboot-omap/patches/104-omap3-overo-enable-thumb.patch deleted file mode 100644 index ca928c996..000000000 --- a/package/boot/uboot-omap/patches/104-omap3-overo-enable-thumb.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: u-boot-2017.01/include/configs/omap3_overo.h -=================================================================== ---- u-boot-2017.01.orig/include/configs/omap3_overo.h -+++ u-boot-2017.01/include/configs/omap3_overo.h -@@ -11,6 +11,13 @@ - #define CONFIG_NAND - - #include -+ -+/* try to enable thumb - unknown if it's working -+ * but otherwise it's too big for spl */ -+#ifndef CONFIG_SYS_THUMB_BUILD -+#define CONFIG_SYS_THUMB_BUILD -+#endif -+ - /* - * We are only ever GP parts and will utilize all of the "downloaded image" - * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB). diff --git a/package/boot/uboot-oxnas/Makefile b/package/boot/uboot-oxnas/Makefile index daa266ea8..d76af0ac1 100644 --- a/package/boot/uboot-oxnas/Makefile +++ b/package/boot/uboot-oxnas/Makefile @@ -8,29 +8,95 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk +PKG_NAME:=u-boot PKG_VERSION:=2014.10 PKG_RELEASE:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot + PKG_HASH:=d3b132a7a9b3f3182b7aad71c2dfbd4fc15bea83e12c76134eb3ffefc07d1c71 -include $(INCLUDE_DIR)/u-boot.mk +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=oxnas - BUILD_DEVICES:=Default - HIDDEN:=y +define uboot/Default + TITLE:= + CONFIG:= + IMAGE:= endef -define U-Boot/ox820 - NAME:=Oxford/PLX NAS7820 +define uboot/ox820 + TITLE:=U-Boot for the Oxford/PLX NAS7820 endef -UBOOT_TARGETS:=ox820 +UBOOTS:=ox820 -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(CP) $(PKG_BUILD_DIR)/u-boot.bin $(STAGING_DIR_IMAGE)/u-boot.bin +define Package/uboot/template +define Package/uboot-oxnas-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_oxnas + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) + MAINTAINER:=Daniel Golle +endef endef -$(eval $(call BuildPackage/U-Boot)) +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) +endef + +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin) +endif + +define Build/Prepare + $(call Build/Prepare/Default) + $(CP) ./files/* $(PKG_BUILD_DIR) + find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf +endef + +define Build/Configure + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(UBOOT_CONFIG)_config +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + u-boot.bin \ + CROSS_COMPILE=$(TARGET_CROSS) +endef + +define Package/uboot/install/default + $(INSTALL_DIR) $(BIN_DIR) + $(CP) $(PKG_BUILD_DIR)/u-boot.bin \ + $(BIN_DIR)/openwrt-$(BOARD)-$(1)-u-boot.bin + $(CP) $(PKG_BUILD_DIR)/u-boot.bin \ + $(KERNEL_BUILD_DIR)/u-boot.bin +endef + +define Package/uboot/install/template +define Package/uboot-oxnas-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-oxnas-$(u))) \ +) diff --git a/package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/Makefile b/package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/Makefile similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/Makefile rename to package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/Makefile diff --git a/package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/clock.c b/package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/clock.c similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/clock.c rename to package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/clock.c diff --git a/package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/pinmux.c b/package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/pinmux.c similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/pinmux.c rename to package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/pinmux.c diff --git a/package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/reset.c b/package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/reset.c similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/reset.c rename to package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/reset.c diff --git a/package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/timer.c b/package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/timer.c similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/cpu/arm1136/nas782x/timer.c rename to package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/timer.c diff --git a/package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/clock.h b/package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/clock.h similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/clock.h rename to package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/clock.h diff --git a/package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/cpu.h b/package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/cpu.h similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/cpu.h rename to package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/cpu.h diff --git a/package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/hardware.h b/package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/hardware.h similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/hardware.h rename to package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/hardware.h diff --git a/package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/pinmux.h b/package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/pinmux.h similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/pinmux.h rename to package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/pinmux.h diff --git a/package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/spl.h b/package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/spl.h similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/spl.h rename to package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/spl.h diff --git a/package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/sysctl.h b/package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/sysctl.h similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/sysctl.h rename to package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/sysctl.h diff --git a/package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/timer.h b/package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/timer.h similarity index 100% rename from package/boot/uboot-oxnas/src/arch/arm/include/asm/arch-nas782x/timer.h rename to package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/timer.h diff --git a/package/boot/uboot-oxnas/src/board/ox820/Kconfig b/package/boot/uboot-oxnas/files/board/ox820/Kconfig similarity index 100% rename from package/boot/uboot-oxnas/src/board/ox820/Kconfig rename to package/boot/uboot-oxnas/files/board/ox820/Kconfig diff --git a/package/boot/uboot-oxnas/src/board/ox820/MAINTAINERS b/package/boot/uboot-oxnas/files/board/ox820/MAINTAINERS similarity index 100% rename from package/boot/uboot-oxnas/src/board/ox820/MAINTAINERS rename to package/boot/uboot-oxnas/files/board/ox820/MAINTAINERS diff --git a/package/boot/uboot-oxnas/src/board/ox820/Makefile b/package/boot/uboot-oxnas/files/board/ox820/Makefile similarity index 100% rename from package/boot/uboot-oxnas/src/board/ox820/Makefile rename to package/boot/uboot-oxnas/files/board/ox820/Makefile diff --git a/package/boot/uboot-oxnas/src/board/ox820/ddr.c b/package/boot/uboot-oxnas/files/board/ox820/ddr.c similarity index 100% rename from package/boot/uboot-oxnas/src/board/ox820/ddr.c rename to package/boot/uboot-oxnas/files/board/ox820/ddr.c diff --git a/package/boot/uboot-oxnas/src/board/ox820/ddr.h b/package/boot/uboot-oxnas/files/board/ox820/ddr.h similarity index 100% rename from package/boot/uboot-oxnas/src/board/ox820/ddr.h rename to package/boot/uboot-oxnas/files/board/ox820/ddr.h diff --git a/package/boot/uboot-oxnas/src/board/ox820/lowlevel_init.S b/package/boot/uboot-oxnas/files/board/ox820/lowlevel_init.S similarity index 100% rename from package/boot/uboot-oxnas/src/board/ox820/lowlevel_init.S rename to package/boot/uboot-oxnas/files/board/ox820/lowlevel_init.S diff --git a/package/boot/uboot-oxnas/src/board/ox820/ox820.c b/package/boot/uboot-oxnas/files/board/ox820/ox820.c similarity index 100% rename from package/boot/uboot-oxnas/src/board/ox820/ox820.c rename to package/boot/uboot-oxnas/files/board/ox820/ox820.c diff --git a/package/boot/uboot-oxnas/src/board/ox820/spl_start.S b/package/boot/uboot-oxnas/files/board/ox820/spl_start.S similarity index 100% rename from package/boot/uboot-oxnas/src/board/ox820/spl_start.S rename to package/boot/uboot-oxnas/files/board/ox820/spl_start.S diff --git a/package/boot/uboot-oxnas/src/board/ox820/u-boot-spl.lds b/package/boot/uboot-oxnas/files/board/ox820/u-boot-spl.lds similarity index 100% rename from package/boot/uboot-oxnas/src/board/ox820/u-boot-spl.lds rename to package/boot/uboot-oxnas/files/board/ox820/u-boot-spl.lds diff --git a/package/boot/uboot-oxnas/src/common/env_ext4.c b/package/boot/uboot-oxnas/files/common/env_ext4.c similarity index 100% rename from package/boot/uboot-oxnas/src/common/env_ext4.c rename to package/boot/uboot-oxnas/files/common/env_ext4.c diff --git a/package/boot/uboot-oxnas/src/common/spl/spl_block.c b/package/boot/uboot-oxnas/files/common/spl/spl_block.c similarity index 100% rename from package/boot/uboot-oxnas/src/common/spl/spl_block.c rename to package/boot/uboot-oxnas/files/common/spl/spl_block.c diff --git a/package/boot/uboot-oxnas/src/configs/ox820_defconfig b/package/boot/uboot-oxnas/files/configs/ox820_defconfig similarity index 100% rename from package/boot/uboot-oxnas/src/configs/ox820_defconfig rename to package/boot/uboot-oxnas/files/configs/ox820_defconfig diff --git a/package/boot/uboot-oxnas/src/drivers/block/plxsata_ide.c b/package/boot/uboot-oxnas/files/drivers/block/plxsata_ide.c similarity index 100% rename from package/boot/uboot-oxnas/src/drivers/block/plxsata_ide.c rename to package/boot/uboot-oxnas/files/drivers/block/plxsata_ide.c diff --git a/package/boot/uboot-oxnas/src/drivers/usb/host/ehci-oxnas.c b/package/boot/uboot-oxnas/files/drivers/usb/host/ehci-oxnas.c similarity index 100% rename from package/boot/uboot-oxnas/src/drivers/usb/host/ehci-oxnas.c rename to package/boot/uboot-oxnas/files/drivers/usb/host/ehci-oxnas.c diff --git a/package/boot/uboot-oxnas/src/include/configs/ox820.h b/package/boot/uboot-oxnas/files/include/configs/ox820.h similarity index 100% rename from package/boot/uboot-oxnas/src/include/configs/ox820.h rename to package/boot/uboot-oxnas/files/include/configs/ox820.h diff --git a/package/boot/uboot-oxnas/src/tools/mkox820crc.c b/package/boot/uboot-oxnas/files/tools/mkox820crc.c similarity index 100% rename from package/boot/uboot-oxnas/src/tools/mkox820crc.c rename to package/boot/uboot-oxnas/files/tools/mkox820crc.c diff --git a/package/boot/uboot-pxa/Makefile b/package/boot/uboot-pxa/Makefile new file mode 100644 index 000000000..9c12ad7ed --- /dev/null +++ b/package/boot/uboot-pxa/Makefile @@ -0,0 +1,91 @@ +# +# Copyright (C) 2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=u-boot +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/ashcharles/verdex-uboot.git +PKG_SOURCE_DATE:=2011-08-25 +PKG_SOURCE_VERSION:=ca6bf3ef6ac5f5132a359b43dfa31e07076b74b7 +PKG_MIRROR_HASH:=7c92525b6c7bc0b6f065a9bfdf64d58a61583709cb44acb62a157ad3efc7c491 + +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + +include $(INCLUDE_DIR)/package.mk + +define uboot/Default + TITLE:= + CONFIG:= + IMAGE:= +endef + +define uboot/gumstix + TITLE:=U-Boot for the Gumstix Verdex +endef + +UBOOTS:=gumstix + +define Package/uboot/template +define Package/uboot-pxa-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_pxa + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) + MAINTAINER:=Florian Fainelli +endef +endef + +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) +endef + +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin) +endif + +define Build/Configure + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(UBOOT_CONFIG)_config +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + u-boot.bin \ + CROSS_COMPILE=$(TARGET_CROSS) +endef + +define Package/uboot/install/default + $(INSTALL_DIR) $(BIN_DIR) + $(CP) $(PKG_BUILD_DIR)/u-boot.bin \ + $(BIN_DIR)/openwrt-$(BOARD)-$(1)-u-boot.bin +endef + +define Package/uboot/install/template +define Package/uboot-pxa-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-pxa-$(u))) \ +) diff --git a/package/boot/uboot-pxa/patches/001-squashfs_rootfstype_cmdline.patch b/package/boot/uboot-pxa/patches/001-squashfs_rootfstype_cmdline.patch new file mode 100644 index 000000000..cfef66b8f --- /dev/null +++ b/package/boot/uboot-pxa/patches/001-squashfs_rootfstype_cmdline.patch @@ -0,0 +1,13 @@ +diff --git a/include/configs/gumstix.h b/include/configs/gumstix.h +index 319da63..5483993 100644 +--- a/include/configs/gumstix.h ++++ b/include/configs/gumstix.h +@@ -136,7 +136,7 @@ + #define CONFIG_MISC_INIT_R /* misc_init_r function in gumstix sets board serial number */ + + #define CONFIG_BOOTFILE boot/uImage +-#define CONFIG_BOOTARGS "console=ttyS0,115200n8 root=1f01 rootfstype=jffs2 reboot=cold,hard" ++#define CONFIG_BOOTARGS "console=ttyS0,115200n8 root=1f01 rootfstype=squashfs,jffs2 reboot=cold,hard" + #define CONFIG_BOOTCOMMAND "icache on; setenv stderr nulldev; setenv stdout nulldev; if pinit on && fatload ide 0 a2000000 gumstix-factory.script; then setenv stdout serial; setenv stderr serial; echo Found gumstix-factory.script on CF...; autoscr; else if mmcinit && fatload mmc 0 a2000000 gumstix-factory.script; then setenv stdout serial; setenv stderr serial; echo Found gumstix-factory.script on MMC...; autoscr; else setenv stdout serial; setenv stderr serial; katload 100000 && bootm; fi; fi" + #define CONFIG_BOOTDELAY 2 /* in seconds */ + #define CONFIG_EXTRA_ENV_SETTINGS "verify=no" diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 056300e18..bc80dcfad 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -9,217 +9,90 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2017.07 - -PKG_HASH:=5374bfdc8acb9a38c025371b1ff20f45e7533668e84e685d0df5d9e7c0e4feff - +PKG_NAME:=u-boot +PKG_VERSION:=2016.03 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot +PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb PKG_MAINTAINER:=Zoltan HERPAI +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + +PKG_BUILD_PARALLEL:=1 + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=sunxi - UBOOT_IMAGE:=u-boot-sunxi-with-spl.bin - UENV:=default - HIDDEN:=1 +define Package/uboot/template +define Package/uboot-sunxi-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_sunxi + TITLE:=U-Boot for $(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) endef -define U-Boot/A10-OLinuXino-Lime - BUILD_SUBTARGET:=cortexa8 - NAME:=A10 OLinuXino LIME - BUILD_DEVICES:=sun4i-a10-olinuxino-lime +define Package/uboot-sunxi-$(1)/install + $(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \ + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin + mkimage -C none -A arm -T script -d uEnv-$(if $(3),$(3),default).txt \ + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr endef -define U-Boot/A13-OLinuXino - BUILD_SUBTARGET:=cortexa8 - NAME:=A13 OlinuXino - BUILD_DEVICES:=sun5i-a13-olinuxino +UBOOT_SUNXI_PACKAGES += uboot-sunxi-$(1) + endef -define U-Boot/A20-OLinuXino-Lime - BUILD_SUBTARGET:=cortexa7 - NAME:=A20 OLinuXino LIME - BUILD_DEVICES:=sun7i-a20-olinuxino-lime +$(eval $(call Package/uboot/template,A10-OLinuXino-Lime,the A10 OLinuXino LIME)) +$(eval $(call Package/uboot/template,A13-OLinuXino,the A13 OlinuXino)) +$(eval $(call Package/uboot/template,A20-OLinuXino-Lime,the A20 OLinuXino LIME)) +$(eval $(call Package/uboot/template,A20-OLinuXino_MICRO,A20 OLinuXino MICRO)) +$(eval $(call Package/uboot/template,Bananapi,Bananapi)) +$(eval $(call Package/uboot/template,Bananapro,Bananapro)) +$(eval $(call Package/uboot/template,Cubieboard,Cubieboard)) +$(eval $(call Package/uboot/template,Cubieboard2,Cubieboard2)) +$(eval $(call Package/uboot/template,Cubietruck,Cubietruck)) +$(eval $(call Package/uboot/template,Hummingbird_A31,the Hummingbird A31 board)) +$(eval $(call Package/uboot/template,Mele_M9,the Mele M9 (A31))) +$(eval $(call Package/uboot/template,OLIMEX_A13_SOM,the Olimex A13 SOM)) +$(eval $(call Package/uboot/template,Linksprite_pcDuino,Linksprite pcDuino)) +$(eval $(call Package/uboot/template,Linksprite_pcDuino3,Linksprite pcDuino3)) +$(eval $(call Package/uboot/template,Lamobo_R1,Lamobo R1)) +$(eval $(call Package/uboot/template,orangepi_plus,Orange Pi Plus (H3))) +$(eval $(call Package/uboot/template,pangolin,Theobroma A31-yQ7 devboard,pangolin)) + +define Package/uboot-sunxi-all + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_sunxi + TITLE:=Meta package for selecting all variants of uboot-sunxi + URL:=http://www.denx.de/wiki/U-Boot + DEPENDS:=$(patsubst %,+%,$(UBOOT_SUNXI_PACKAGES)) endef -define U-Boot/A20-OLinuXino-Lime2 - BUILD_SUBTARGET:=cortexa7 - NAME:=A20 OLinuXino LIME2 - BUILD_DEVICES:=sun7i-a20-olinuxino-lime2 +ifdef BUILD_VARIANT +define Build/Configure + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + USE_PRIVATE_LIBGCC=yes $(BUILD_VARIANT)_defconfig endef -define U-Boot/A20-OLinuXino-Lime2-eMMC - BUILD_SUBTARGET:=cortexa7 - NAME:=A20 OLinuXino LIME2 eMMC - BUILD_DEVICES:=sun7i-a20-olinuxino-lime2-emmc +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) \ + DTCDIR=$(LINUX_DIR)/scripts/dtc/ endef - -define U-Boot/A20-OLinuXino_MICRO - BUILD_SUBTARGET:=cortexa7 - NAME:=A20 OLinuXino MICRO - BUILD_DEVICES:=sun7i-a20-olinuxino-micro +else # BUILD_VARIANT +define Build/Prepare endef - -define U-Boot/Bananapi - BUILD_SUBTARGET:=cortexa7 - NAME:=Bananapi - BUILD_DEVICES:=sun7i-a20-bananapi +define Build/Configure endef - -define U-Boot/Bananapro - BUILD_SUBTARGET:=cortexa7 - NAME:=Bananapro - BUILD_DEVICES:=sun7i-a20-bananapro +define Build/Compile endef +endif # BUILD_VARIANT -define U-Boot/Cubieboard - BUILD_SUBTARGET:=cortexa8 - NAME:=Cubieboard - BUILD_DEVICES:=sun4i-a10-cubieboard -endef - -define U-Boot/Cubieboard2 - BUILD_SUBTARGET:=cortexa7 - NAME:=Cubieboard2 - BUILD_DEVICES:=sun7i-a20-cubieboard2 -endef - -define U-Boot/Cubietruck - BUILD_SUBTARGET:=cortexa7 - NAME:=Cubietruck - BUILD_DEVICES:=sun7i-a20-cubietruck -endef - -define U-Boot/Hummingbird_A31 - BUILD_SUBTARGET:=cortexa7 - NAME:=Hummingbird A31 board -endef - -define U-Boot/Marsboard_A10 - BUILD_SUBTARGET:=cortexa8 - NAME:=Marsboard - BUILD_DEVICES:=sun4i-a10-marsboard -endef - -define U-Boot/Mele_M9 - BUILD_SUBTARGET:=cortexa7 - NAME:=Mele M9 (A31) - BUILD_DEVICES:=sun6i-a31-m9 -endef - -define U-Boot/OLIMEX_A13_SOM - BUILD_SUBTARGET:=cortexa8 - NAME:=Olimex A13 SOM - BUILD_DEVICES:=sun5i-a13-olimex-som -endef - -define U-Boot/Linksprite_pcDuino - BUILD_SUBTARGET:=cortexa8 - NAME:=Linksprite pcDuino - BUILD_DEVICES:=sun4i-a10-pcduino -endef - -define U-Boot/Linksprite_pcDuino3 - BUILD_SUBTARGET:=cortexa7 - NAME:=Linksprite pcDuino3 - BUILD_DEVICES:=sun7i-a20-pcduino3 -endef - -define U-Boot/Lamobo_R1 - BUILD_SUBTARGET:=cortexa7 - NAME:=Lamobo R1 - BUILD_DEVICES:=sun7i-a20-lamobo-r1 -endef - -define U-Boot/nanopi_m1_plus - BUILD_SUBTARGET:=cortexa7 - NAME:=NanoPi M1 Plus (H3) - BUILD_DEVICES:=sun8i-h3-nanopi-m1-plus -endef - -define U-Boot/nanopi_neo - BUILD_SUBTARGET:=cortexa7 - NAME:=U-Boot for NanoPi NEO (H3) - BUILD_DEVICES:=sun8i-h3-nanopi-neo -endef - -define U-Boot/orangepi_r1 - BUILD_SUBTARGET:=cortexa7 - NAME:=Orange Pi R1 (H2+) - BUILD_DEVICES:=sun8i-h2-plus-orangepi-r1 -endef - -define U-Boot/orangepi_plus - BUILD_SUBTARGET:=cortexa7 - NAME:=Orange Pi Plus (H3) - BUILD_DEVICES:=sun8i-h3-orangepi-plus -endef - -define U-Boot/orangepi_2 - BUILD_SUBTARGET:=cortexa7 - NAME:=Orange Pi 2 (H3) - BUILD_DEVICES:=sun8i-h3-orangepi-2 -endef - -define U-Boot/pangolin - BUILD_SUBTARGET:=cortexa7 - NAME:=Theobroma A31-yQ7 devboard - UENV:=pangolin -endef - -define U-Boot/pine64_plus - BUILD_SUBTARGET:=cortexa53 - NAME:=Pine64 Plus A64 - BUILD_DEVICES:=sun50i-a64-pine64-plus - DEPENDS:=+PACKAGE_u-boot-pine64_plus:arm-trusted-firmware-sunxi - UENV:=a64 -endef - -UBOOT_TARGETS := \ - A10-OLinuXino-Lime \ - A13-OLinuXino \ - A20-OLinuXino-Lime \ - A20-OLinuXino-Lime2 \ - A20-OLinuXino-Lime2-eMMC \ - A20-OLinuXino_MICRO \ - Bananapi \ - Bananapro \ - Cubieboard \ - Cubieboard2 \ - Cubietruck \ - Hummingbird_A31 \ - Marsboard_A10 \ - Mele_M9 \ - OLIMEX_A13_SOM \ - Linksprite_pcDuino \ - Linksprite_pcDuino3 \ - Lamobo_R1 \ - nanopi_m1_plus \ - nanopi_neo \ - orangepi_r1 \ - orangepi_plus \ - orangepi_2 \ - pangolin \ - pine64_plus - -UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes - -UBOOT_MAKE_FLAGS += \ - BL31=$(STAGING_DIR_IMAGE)/bl31.bin - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) -ifeq ($(SUBTARGET),cortexa53) - cat $(PKG_BUILD_DIR)/spl/sunxi-spl.bin $(PKG_BUILD_DIR)/u-boot.itb > $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin -else - $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin -endif - mkimage -C none -A arm -T script -d uEnv-$(UENV).txt \ - $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.scr -endef - -define Package/u-boot/install/default -endef - -$(eval $(call BuildPackage/U-Boot)) +$(foreach pkg,$(UBOOT_SUNXI_PACKAGES), \ + $(eval $(call BuildPackage,$(pkg))) \ +) +$(eval $(call BuildPackage,uboot-sunxi-all)) diff --git a/package/boot/uboot-sunxi/patches/001-use-dtc-in-kernel.patch b/package/boot/uboot-sunxi/patches/001-use-dtc-in-kernel.patch new file mode 100644 index 000000000..6471e7865 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/001-use-dtc-in-kernel.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -348,7 +348,7 @@ OBJDUMP = $(CROSS_COMPILE)objdump + AWK = awk + PERL = perl + PYTHON = python +-DTC = dtc ++DTC = $(DTCDIR)dtc + CHECK = sparse + + CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ diff --git a/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch b/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch index c19f3781d..f29ad12b7 100644 --- a/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch +++ b/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch @@ -1,7 +1,8 @@ --- /dev/null +++ b/configs/OLIMEX_A13_SOM_defconfig -@@ -0,0 +1,17 @@ +@@ -0,0 +1,18 @@ +CONFIG_SPL=y ++CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2" +CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino" +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y diff --git a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch b/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch index 2fce04828..e5a66d7eb 100644 --- a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch +++ b/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch @@ -1,16 +1,16 @@ --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -254,6 +254,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ +@@ -152,6 +152,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-m9.dtb \ sun6i-a31-mele-a1000g-quad.dtb \ sun6i-a31-mixtile-loftq.dtb \ + sun6i-a31-pangolin.dtb \ - sun6i-a31s-colorfly-e708-q1.dtb \ sun6i-a31s-cs908.dtb \ - sun6i-a31s-inet-q972.dtb \ + sun6i-a31s-primo81.dtb \ + sun6i-a31s-sinovoip-bpi-m2.dtb --- a/arch/arm/dts/sun6i-a31.dtsi +++ b/arch/arm/dts/sun6i-a31.dtsi -@@ -679,6 +679,13 @@ +@@ -643,6 +643,13 @@ allwinner,pull = ; }; @@ -358,9 +358,17 @@ +CONFIG_DM_SPI=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SUNXI_SPI=y ---- a/arch/arm/mach-sunxi/Kconfig -+++ b/arch/arm/mach-sunxi/Kconfig -@@ -746,6 +746,14 @@ config VIDEO_LCD_PANEL_I2C_SCL +--- a/board/sunxi/Kconfig ++++ b/board/sunxi/Kconfig +@@ -15,7 +15,6 @@ config SUNXI_GEN_SUN6I + separate ahb reset control registers, custom pmic bus, new style + watchdog, etc. + +- + choice + prompt "Sunxi SoC Variant" + optional +@@ -533,6 +532,14 @@ config VIDEO_LCD_PANEL_I2C_SCL Set the SCL pin for the LCD i2c interface. This takes a string in the format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. diff --git a/package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch b/package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch new file mode 100644 index 000000000..d8fa52c7e --- /dev/null +++ b/package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch @@ -0,0 +1,1403 @@ +From 4bb656e9dde2019cb42ac4c27b3a114a801ad127 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Wed, 16 Mar 2016 13:41:23 +0100 +Subject: [PATCH] include/dt-bindings: Sync some files with the kernel + +This commit syncs the dt-bindings/input/* headers with the kernel (v4.5) +and adds dt-bindings/clock/sun4i-a10-pll2.h, both are necessary for newer +sunxi dts files to build. + +Signed-off-by: Hans de Goede +Reviewed-by: Tom Rini +Acked-by: Ian Campbell +--- + include/dt-bindings/clock/sun4i-a10-pll2.h | 53 ++ + include/dt-bindings/input/input.h | 510 +--------------- + include/dt-bindings/input/linux-event-codes.h | 805 ++++++++++++++++++++++++++ + 3 files changed, 859 insertions(+), 509 deletions(-) + create mode 100644 include/dt-bindings/clock/sun4i-a10-pll2.h + create mode 100644 include/dt-bindings/input/linux-event-codes.h + +--- /dev/null ++++ b/include/dt-bindings/clock/sun4i-a10-pll2.h +@@ -0,0 +1,53 @@ ++/* ++ * Copyright 2015 Maxime Ripard ++ * ++ * Maxime Ripard ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++#ifndef __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_ ++#define __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_ ++ ++#define SUN4I_A10_PLL2_1X 0 ++#define SUN4I_A10_PLL2_2X 1 ++#define SUN4I_A10_PLL2_4X 2 ++#define SUN4I_A10_PLL2_8X 3 ++ ++#endif /* __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_ */ +--- a/include/dt-bindings/input/input.h ++++ b/include/dt-bindings/input/input.h +@@ -9,515 +9,7 @@ + #ifndef _DT_BINDINGS_INPUT_INPUT_H + #define _DT_BINDINGS_INPUT_INPUT_H + +-#define KEY_RESERVED 0 +-#define KEY_ESC 1 +-#define KEY_1 2 +-#define KEY_2 3 +-#define KEY_3 4 +-#define KEY_4 5 +-#define KEY_5 6 +-#define KEY_6 7 +-#define KEY_7 8 +-#define KEY_8 9 +-#define KEY_9 10 +-#define KEY_0 11 +-#define KEY_MINUS 12 +-#define KEY_EQUAL 13 +-#define KEY_BACKSPACE 14 +-#define KEY_TAB 15 +-#define KEY_Q 16 +-#define KEY_W 17 +-#define KEY_E 18 +-#define KEY_R 19 +-#define KEY_T 20 +-#define KEY_Y 21 +-#define KEY_U 22 +-#define KEY_I 23 +-#define KEY_O 24 +-#define KEY_P 25 +-#define KEY_LEFTBRACE 26 +-#define KEY_RIGHTBRACE 27 +-#define KEY_ENTER 28 +-#define KEY_LEFTCTRL 29 +-#define KEY_A 30 +-#define KEY_S 31 +-#define KEY_D 32 +-#define KEY_F 33 +-#define KEY_G 34 +-#define KEY_H 35 +-#define KEY_J 36 +-#define KEY_K 37 +-#define KEY_L 38 +-#define KEY_SEMICOLON 39 +-#define KEY_APOSTROPHE 40 +-#define KEY_GRAVE 41 +-#define KEY_LEFTSHIFT 42 +-#define KEY_BACKSLASH 43 +-#define KEY_Z 44 +-#define KEY_X 45 +-#define KEY_C 46 +-#define KEY_V 47 +-#define KEY_B 48 +-#define KEY_N 49 +-#define KEY_M 50 +-#define KEY_COMMA 51 +-#define KEY_DOT 52 +-#define KEY_SLASH 53 +-#define KEY_RIGHTSHIFT 54 +-#define KEY_KPASTERISK 55 +-#define KEY_LEFTALT 56 +-#define KEY_SPACE 57 +-#define KEY_CAPSLOCK 58 +-#define KEY_F1 59 +-#define KEY_F2 60 +-#define KEY_F3 61 +-#define KEY_F4 62 +-#define KEY_F5 63 +-#define KEY_F6 64 +-#define KEY_F7 65 +-#define KEY_F8 66 +-#define KEY_F9 67 +-#define KEY_F10 68 +-#define KEY_NUMLOCK 69 +-#define KEY_SCROLLLOCK 70 +-#define KEY_KP7 71 +-#define KEY_KP8 72 +-#define KEY_KP9 73 +-#define KEY_KPMINUS 74 +-#define KEY_KP4 75 +-#define KEY_KP5 76 +-#define KEY_KP6 77 +-#define KEY_KPPLUS 78 +-#define KEY_KP1 79 +-#define KEY_KP2 80 +-#define KEY_KP3 81 +-#define KEY_KP0 82 +-#define KEY_KPDOT 83 +- +-#define KEY_ZENKAKUHANKAKU 85 +-#define KEY_102ND 86 +-#define KEY_F11 87 +-#define KEY_F12 88 +-#define KEY_RO 89 +-#define KEY_KATAKANA 90 +-#define KEY_HIRAGANA 91 +-#define KEY_HENKAN 92 +-#define KEY_KATAKANAHIRAGANA 93 +-#define KEY_MUHENKAN 94 +-#define KEY_KPJPCOMMA 95 +-#define KEY_KPENTER 96 +-#define KEY_RIGHTCTRL 97 +-#define KEY_KPSLASH 98 +-#define KEY_SYSRQ 99 +-#define KEY_RIGHTALT 100 +-#define KEY_LINEFEED 101 +-#define KEY_HOME 102 +-#define KEY_UP 103 +-#define KEY_PAGEUP 104 +-#define KEY_LEFT 105 +-#define KEY_RIGHT 106 +-#define KEY_END 107 +-#define KEY_DOWN 108 +-#define KEY_PAGEDOWN 109 +-#define KEY_INSERT 110 +-#define KEY_DELETE 111 +-#define KEY_MACRO 112 +-#define KEY_MUTE 113 +-#define KEY_VOLUMEDOWN 114 +-#define KEY_VOLUMEUP 115 +-#define KEY_POWER 116 /* SC System Power Down */ +-#define KEY_KPEQUAL 117 +-#define KEY_KPPLUSMINUS 118 +-#define KEY_PAUSE 119 +-#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ +- +-#define KEY_KPCOMMA 121 +-#define KEY_HANGEUL 122 +-#define KEY_HANGUEL KEY_HANGEUL +-#define KEY_HANJA 123 +-#define KEY_YEN 124 +-#define KEY_LEFTMETA 125 +-#define KEY_RIGHTMETA 126 +-#define KEY_COMPOSE 127 +- +-#define KEY_STOP 128 /* AC Stop */ +-#define KEY_AGAIN 129 +-#define KEY_PROPS 130 /* AC Properties */ +-#define KEY_UNDO 131 /* AC Undo */ +-#define KEY_FRONT 132 +-#define KEY_COPY 133 /* AC Copy */ +-#define KEY_OPEN 134 /* AC Open */ +-#define KEY_PASTE 135 /* AC Paste */ +-#define KEY_FIND 136 /* AC Search */ +-#define KEY_CUT 137 /* AC Cut */ +-#define KEY_HELP 138 /* AL Integrated Help Center */ +-#define KEY_MENU 139 /* Menu (show menu) */ +-#define KEY_CALC 140 /* AL Calculator */ +-#define KEY_SETUP 141 +-#define KEY_SLEEP 142 /* SC System Sleep */ +-#define KEY_WAKEUP 143 /* System Wake Up */ +-#define KEY_FILE 144 /* AL Local Machine Browser */ +-#define KEY_SENDFILE 145 +-#define KEY_DELETEFILE 146 +-#define KEY_XFER 147 +-#define KEY_PROG1 148 +-#define KEY_PROG2 149 +-#define KEY_WWW 150 /* AL Internet Browser */ +-#define KEY_MSDOS 151 +-#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ +-#define KEY_SCREENLOCK KEY_COFFEE +-#define KEY_DIRECTION 153 +-#define KEY_CYCLEWINDOWS 154 +-#define KEY_MAIL 155 +-#define KEY_BOOKMARKS 156 /* AC Bookmarks */ +-#define KEY_COMPUTER 157 +-#define KEY_BACK 158 /* AC Back */ +-#define KEY_FORWARD 159 /* AC Forward */ +-#define KEY_CLOSECD 160 +-#define KEY_EJECTCD 161 +-#define KEY_EJECTCLOSECD 162 +-#define KEY_NEXTSONG 163 +-#define KEY_PLAYPAUSE 164 +-#define KEY_PREVIOUSSONG 165 +-#define KEY_STOPCD 166 +-#define KEY_RECORD 167 +-#define KEY_REWIND 168 +-#define KEY_PHONE 169 /* Media Select Telephone */ +-#define KEY_ISO 170 +-#define KEY_CONFIG 171 /* AL Consumer Control Configuration */ +-#define KEY_HOMEPAGE 172 /* AC Home */ +-#define KEY_REFRESH 173 /* AC Refresh */ +-#define KEY_EXIT 174 /* AC Exit */ +-#define KEY_MOVE 175 +-#define KEY_EDIT 176 +-#define KEY_SCROLLUP 177 +-#define KEY_SCROLLDOWN 178 +-#define KEY_KPLEFTPAREN 179 +-#define KEY_KPRIGHTPAREN 180 +-#define KEY_NEW 181 /* AC New */ +-#define KEY_REDO 182 /* AC Redo/Repeat */ +- +-#define KEY_F13 183 +-#define KEY_F14 184 +-#define KEY_F15 185 +-#define KEY_F16 186 +-#define KEY_F17 187 +-#define KEY_F18 188 +-#define KEY_F19 189 +-#define KEY_F20 190 +-#define KEY_F21 191 +-#define KEY_F22 192 +-#define KEY_F23 193 +-#define KEY_F24 194 +- +-#define KEY_PLAYCD 200 +-#define KEY_PAUSECD 201 +-#define KEY_PROG3 202 +-#define KEY_PROG4 203 +-#define KEY_DASHBOARD 204 /* AL Dashboard */ +-#define KEY_SUSPEND 205 +-#define KEY_CLOSE 206 /* AC Close */ +-#define KEY_PLAY 207 +-#define KEY_FASTFORWARD 208 +-#define KEY_BASSBOOST 209 +-#define KEY_PRINT 210 /* AC Print */ +-#define KEY_HP 211 +-#define KEY_CAMERA 212 +-#define KEY_SOUND 213 +-#define KEY_QUESTION 214 +-#define KEY_EMAIL 215 +-#define KEY_CHAT 216 +-#define KEY_SEARCH 217 +-#define KEY_CONNECT 218 +-#define KEY_FINANCE 219 /* AL Checkbook/Finance */ +-#define KEY_SPORT 220 +-#define KEY_SHOP 221 +-#define KEY_ALTERASE 222 +-#define KEY_CANCEL 223 /* AC Cancel */ +-#define KEY_BRIGHTNESSDOWN 224 +-#define KEY_BRIGHTNESSUP 225 +-#define KEY_MEDIA 226 +- +-#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video +- outputs (Monitor/LCD/TV-out/etc) */ +-#define KEY_KBDILLUMTOGGLE 228 +-#define KEY_KBDILLUMDOWN 229 +-#define KEY_KBDILLUMUP 230 +- +-#define KEY_SEND 231 /* AC Send */ +-#define KEY_REPLY 232 /* AC Reply */ +-#define KEY_FORWARDMAIL 233 /* AC Forward Msg */ +-#define KEY_SAVE 234 /* AC Save */ +-#define KEY_DOCUMENTS 235 +- +-#define KEY_BATTERY 236 +- +-#define KEY_BLUETOOTH 237 +-#define KEY_WLAN 238 +-#define KEY_UWB 239 +- +-#define KEY_UNKNOWN 240 +- +-#define KEY_VIDEO_NEXT 241 /* drive next video source */ +-#define KEY_VIDEO_PREV 242 /* drive previous video source */ +-#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ +-#define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ +-#define KEY_DISPLAY_OFF 245 /* display device to off state */ +- +-#define KEY_WIMAX 246 +-#define KEY_RFKILL 247 /* Key that controls all radios */ +- +-#define KEY_MICMUTE 248 /* Mute / unmute the microphone */ +- +-/* Code 255 is reserved for special needs of AT keyboard driver */ +- +-#define BTN_MISC 0x100 +-#define BTN_0 0x100 +-#define BTN_1 0x101 +-#define BTN_2 0x102 +-#define BTN_3 0x103 +-#define BTN_4 0x104 +-#define BTN_5 0x105 +-#define BTN_6 0x106 +-#define BTN_7 0x107 +-#define BTN_8 0x108 +-#define BTN_9 0x109 +- +-#define BTN_MOUSE 0x110 +-#define BTN_LEFT 0x110 +-#define BTN_RIGHT 0x111 +-#define BTN_MIDDLE 0x112 +-#define BTN_SIDE 0x113 +-#define BTN_EXTRA 0x114 +-#define BTN_FORWARD 0x115 +-#define BTN_BACK 0x116 +-#define BTN_TASK 0x117 +- +-#define BTN_JOYSTICK 0x120 +-#define BTN_TRIGGER 0x120 +-#define BTN_THUMB 0x121 +-#define BTN_THUMB2 0x122 +-#define BTN_TOP 0x123 +-#define BTN_TOP2 0x124 +-#define BTN_PINKIE 0x125 +-#define BTN_BASE 0x126 +-#define BTN_BASE2 0x127 +-#define BTN_BASE3 0x128 +-#define BTN_BASE4 0x129 +-#define BTN_BASE5 0x12a +-#define BTN_BASE6 0x12b +-#define BTN_DEAD 0x12f +- +-#define BTN_GAMEPAD 0x130 +-#define BTN_SOUTH 0x130 +-#define BTN_A BTN_SOUTH +-#define BTN_EAST 0x131 +-#define BTN_B BTN_EAST +-#define BTN_C 0x132 +-#define BTN_NORTH 0x133 +-#define BTN_X BTN_NORTH +-#define BTN_WEST 0x134 +-#define BTN_Y BTN_WEST +-#define BTN_Z 0x135 +-#define BTN_TL 0x136 +-#define BTN_TR 0x137 +-#define BTN_TL2 0x138 +-#define BTN_TR2 0x139 +-#define BTN_SELECT 0x13a +-#define BTN_START 0x13b +-#define BTN_MODE 0x13c +-#define BTN_THUMBL 0x13d +-#define BTN_THUMBR 0x13e +- +-#define BTN_DIGI 0x140 +-#define BTN_TOOL_PEN 0x140 +-#define BTN_TOOL_RUBBER 0x141 +-#define BTN_TOOL_BRUSH 0x142 +-#define BTN_TOOL_PENCIL 0x143 +-#define BTN_TOOL_AIRBRUSH 0x144 +-#define BTN_TOOL_FINGER 0x145 +-#define BTN_TOOL_MOUSE 0x146 +-#define BTN_TOOL_LENS 0x147 +-#define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ +-#define BTN_TOUCH 0x14a +-#define BTN_STYLUS 0x14b +-#define BTN_STYLUS2 0x14c +-#define BTN_TOOL_DOUBLETAP 0x14d +-#define BTN_TOOL_TRIPLETAP 0x14e +-#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ +- +-#define BTN_WHEEL 0x150 +-#define BTN_GEAR_DOWN 0x150 +-#define BTN_GEAR_UP 0x151 +- +-#define KEY_OK 0x160 +-#define KEY_SELECT 0x161 +-#define KEY_GOTO 0x162 +-#define KEY_CLEAR 0x163 +-#define KEY_POWER2 0x164 +-#define KEY_OPTION 0x165 +-#define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ +-#define KEY_TIME 0x167 +-#define KEY_VENDOR 0x168 +-#define KEY_ARCHIVE 0x169 +-#define KEY_PROGRAM 0x16a /* Media Select Program Guide */ +-#define KEY_CHANNEL 0x16b +-#define KEY_FAVORITES 0x16c +-#define KEY_EPG 0x16d +-#define KEY_PVR 0x16e /* Media Select Home */ +-#define KEY_MHP 0x16f +-#define KEY_LANGUAGE 0x170 +-#define KEY_TITLE 0x171 +-#define KEY_SUBTITLE 0x172 +-#define KEY_ANGLE 0x173 +-#define KEY_ZOOM 0x174 +-#define KEY_MODE 0x175 +-#define KEY_KEYBOARD 0x176 +-#define KEY_SCREEN 0x177 +-#define KEY_PC 0x178 /* Media Select Computer */ +-#define KEY_TV 0x179 /* Media Select TV */ +-#define KEY_TV2 0x17a /* Media Select Cable */ +-#define KEY_VCR 0x17b /* Media Select VCR */ +-#define KEY_VCR2 0x17c /* VCR Plus */ +-#define KEY_SAT 0x17d /* Media Select Satellite */ +-#define KEY_SAT2 0x17e +-#define KEY_CD 0x17f /* Media Select CD */ +-#define KEY_TAPE 0x180 /* Media Select Tape */ +-#define KEY_RADIO 0x181 +-#define KEY_TUNER 0x182 /* Media Select Tuner */ +-#define KEY_PLAYER 0x183 +-#define KEY_TEXT 0x184 +-#define KEY_DVD 0x185 /* Media Select DVD */ +-#define KEY_AUX 0x186 +-#define KEY_MP3 0x187 +-#define KEY_AUDIO 0x188 /* AL Audio Browser */ +-#define KEY_VIDEO 0x189 /* AL Movie Browser */ +-#define KEY_DIRECTORY 0x18a +-#define KEY_LIST 0x18b +-#define KEY_MEMO 0x18c /* Media Select Messages */ +-#define KEY_CALENDAR 0x18d +-#define KEY_RED 0x18e +-#define KEY_GREEN 0x18f +-#define KEY_YELLOW 0x190 +-#define KEY_BLUE 0x191 +-#define KEY_CHANNELUP 0x192 /* Channel Increment */ +-#define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ +-#define KEY_FIRST 0x194 +-#define KEY_LAST 0x195 /* Recall Last */ +-#define KEY_AB 0x196 +-#define KEY_NEXT 0x197 +-#define KEY_RESTART 0x198 +-#define KEY_SLOW 0x199 +-#define KEY_SHUFFLE 0x19a +-#define KEY_BREAK 0x19b +-#define KEY_PREVIOUS 0x19c +-#define KEY_DIGITS 0x19d +-#define KEY_TEEN 0x19e +-#define KEY_TWEN 0x19f +-#define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ +-#define KEY_GAMES 0x1a1 /* Media Select Games */ +-#define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ +-#define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ +-#define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ +-#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ +-#define KEY_EDITOR 0x1a6 /* AL Text Editor */ +-#define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ +-#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ +-#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ +-#define KEY_DATABASE 0x1aa /* AL Database App */ +-#define KEY_NEWS 0x1ab /* AL Newsreader */ +-#define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ +-#define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ +-#define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ +-#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ +-#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ +-#define KEY_LOGOFF 0x1b1 /* AL Logoff */ +- +-#define KEY_DOLLAR 0x1b2 +-#define KEY_EURO 0x1b3 +- +-#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ +-#define KEY_FRAMEFORWARD 0x1b5 +-#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ +-#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ +-#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ +-#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ +-#define KEY_IMAGES 0x1ba /* AL Image Browser */ +- +-#define KEY_DEL_EOL 0x1c0 +-#define KEY_DEL_EOS 0x1c1 +-#define KEY_INS_LINE 0x1c2 +-#define KEY_DEL_LINE 0x1c3 +- +-#define KEY_FN 0x1d0 +-#define KEY_FN_ESC 0x1d1 +-#define KEY_FN_F1 0x1d2 +-#define KEY_FN_F2 0x1d3 +-#define KEY_FN_F3 0x1d4 +-#define KEY_FN_F4 0x1d5 +-#define KEY_FN_F5 0x1d6 +-#define KEY_FN_F6 0x1d7 +-#define KEY_FN_F7 0x1d8 +-#define KEY_FN_F8 0x1d9 +-#define KEY_FN_F9 0x1da +-#define KEY_FN_F10 0x1db +-#define KEY_FN_F11 0x1dc +-#define KEY_FN_F12 0x1dd +-#define KEY_FN_1 0x1de +-#define KEY_FN_2 0x1df +-#define KEY_FN_D 0x1e0 +-#define KEY_FN_E 0x1e1 +-#define KEY_FN_F 0x1e2 +-#define KEY_FN_S 0x1e3 +-#define KEY_FN_B 0x1e4 +- +-#define KEY_BRL_DOT1 0x1f1 +-#define KEY_BRL_DOT2 0x1f2 +-#define KEY_BRL_DOT3 0x1f3 +-#define KEY_BRL_DOT4 0x1f4 +-#define KEY_BRL_DOT5 0x1f5 +-#define KEY_BRL_DOT6 0x1f6 +-#define KEY_BRL_DOT7 0x1f7 +-#define KEY_BRL_DOT8 0x1f8 +-#define KEY_BRL_DOT9 0x1f9 +-#define KEY_BRL_DOT10 0x1fa +- +-#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ +-#define KEY_NUMERIC_1 0x201 /* and other keypads */ +-#define KEY_NUMERIC_2 0x202 +-#define KEY_NUMERIC_3 0x203 +-#define KEY_NUMERIC_4 0x204 +-#define KEY_NUMERIC_5 0x205 +-#define KEY_NUMERIC_6 0x206 +-#define KEY_NUMERIC_7 0x207 +-#define KEY_NUMERIC_8 0x208 +-#define KEY_NUMERIC_9 0x209 +-#define KEY_NUMERIC_STAR 0x20a +-#define KEY_NUMERIC_POUND 0x20b +- +-#define KEY_CAMERA_FOCUS 0x210 +-#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ +- +-#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ +-#define KEY_TOUCHPAD_ON 0x213 +-#define KEY_TOUCHPAD_OFF 0x214 +- +-#define KEY_CAMERA_ZOOMIN 0x215 +-#define KEY_CAMERA_ZOOMOUT 0x216 +-#define KEY_CAMERA_UP 0x217 +-#define KEY_CAMERA_DOWN 0x218 +-#define KEY_CAMERA_LEFT 0x219 +-#define KEY_CAMERA_RIGHT 0x21a +- +-#define KEY_ATTENDANT_ON 0x21b +-#define KEY_ATTENDANT_OFF 0x21c +-#define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ +-#define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ +- +-#define BTN_DPAD_UP 0x220 +-#define BTN_DPAD_DOWN 0x221 +-#define BTN_DPAD_LEFT 0x222 +-#define BTN_DPAD_RIGHT 0x223 ++#include "linux-event-codes.h" + + #define MATRIX_KEY(row, col, code) \ + ((((row) & 0xFF) << 24) | (((col) & 0xFF) << 16) | ((code) & 0xFFFF)) +--- /dev/null ++++ b/include/dt-bindings/input/linux-event-codes.h +@@ -0,0 +1,805 @@ ++/* ++ * Input event codes ++ * ++ * *** IMPORTANT *** ++ * This file is not only included from C-code but also from devicetree source ++ * files. As such this file MUST only contain comments and defines. ++ * ++ * Copyright (c) 1999-2002 Vojtech Pavlik ++ * Copyright (c) 2015 Hans de Goede ++ * ++ * 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. ++ */ ++#ifndef _UAPI_INPUT_EVENT_CODES_H ++#define _UAPI_INPUT_EVENT_CODES_H ++ ++/* ++ * Device properties and quirks ++ */ ++ ++#define INPUT_PROP_POINTER 0x00 /* needs a pointer */ ++#define INPUT_PROP_DIRECT 0x01 /* direct input devices */ ++#define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ ++#define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ ++#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ ++#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ ++#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ ++ ++#define INPUT_PROP_MAX 0x1f ++#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) ++ ++/* ++ * Event types ++ */ ++ ++#define EV_SYN 0x00 ++#define EV_KEY 0x01 ++#define EV_REL 0x02 ++#define EV_ABS 0x03 ++#define EV_MSC 0x04 ++#define EV_SW 0x05 ++#define EV_LED 0x11 ++#define EV_SND 0x12 ++#define EV_REP 0x14 ++#define EV_FF 0x15 ++#define EV_PWR 0x16 ++#define EV_FF_STATUS 0x17 ++#define EV_MAX 0x1f ++#define EV_CNT (EV_MAX+1) ++ ++/* ++ * Synchronization events. ++ */ ++ ++#define SYN_REPORT 0 ++#define SYN_CONFIG 1 ++#define SYN_MT_REPORT 2 ++#define SYN_DROPPED 3 ++#define SYN_MAX 0xf ++#define SYN_CNT (SYN_MAX+1) ++ ++/* ++ * Keys and buttons ++ * ++ * Most of the keys/buttons are modeled after USB HUT 1.12 ++ * (see http://www.usb.org/developers/hidpage). ++ * Abbreviations in the comments: ++ * AC - Application Control ++ * AL - Application Launch Button ++ * SC - System Control ++ */ ++ ++#define KEY_RESERVED 0 ++#define KEY_ESC 1 ++#define KEY_1 2 ++#define KEY_2 3 ++#define KEY_3 4 ++#define KEY_4 5 ++#define KEY_5 6 ++#define KEY_6 7 ++#define KEY_7 8 ++#define KEY_8 9 ++#define KEY_9 10 ++#define KEY_0 11 ++#define KEY_MINUS 12 ++#define KEY_EQUAL 13 ++#define KEY_BACKSPACE 14 ++#define KEY_TAB 15 ++#define KEY_Q 16 ++#define KEY_W 17 ++#define KEY_E 18 ++#define KEY_R 19 ++#define KEY_T 20 ++#define KEY_Y 21 ++#define KEY_U 22 ++#define KEY_I 23 ++#define KEY_O 24 ++#define KEY_P 25 ++#define KEY_LEFTBRACE 26 ++#define KEY_RIGHTBRACE 27 ++#define KEY_ENTER 28 ++#define KEY_LEFTCTRL 29 ++#define KEY_A 30 ++#define KEY_S 31 ++#define KEY_D 32 ++#define KEY_F 33 ++#define KEY_G 34 ++#define KEY_H 35 ++#define KEY_J 36 ++#define KEY_K 37 ++#define KEY_L 38 ++#define KEY_SEMICOLON 39 ++#define KEY_APOSTROPHE 40 ++#define KEY_GRAVE 41 ++#define KEY_LEFTSHIFT 42 ++#define KEY_BACKSLASH 43 ++#define KEY_Z 44 ++#define KEY_X 45 ++#define KEY_C 46 ++#define KEY_V 47 ++#define KEY_B 48 ++#define KEY_N 49 ++#define KEY_M 50 ++#define KEY_COMMA 51 ++#define KEY_DOT 52 ++#define KEY_SLASH 53 ++#define KEY_RIGHTSHIFT 54 ++#define KEY_KPASTERISK 55 ++#define KEY_LEFTALT 56 ++#define KEY_SPACE 57 ++#define KEY_CAPSLOCK 58 ++#define KEY_F1 59 ++#define KEY_F2 60 ++#define KEY_F3 61 ++#define KEY_F4 62 ++#define KEY_F5 63 ++#define KEY_F6 64 ++#define KEY_F7 65 ++#define KEY_F8 66 ++#define KEY_F9 67 ++#define KEY_F10 68 ++#define KEY_NUMLOCK 69 ++#define KEY_SCROLLLOCK 70 ++#define KEY_KP7 71 ++#define KEY_KP8 72 ++#define KEY_KP9 73 ++#define KEY_KPMINUS 74 ++#define KEY_KP4 75 ++#define KEY_KP5 76 ++#define KEY_KP6 77 ++#define KEY_KPPLUS 78 ++#define KEY_KP1 79 ++#define KEY_KP2 80 ++#define KEY_KP3 81 ++#define KEY_KP0 82 ++#define KEY_KPDOT 83 ++ ++#define KEY_ZENKAKUHANKAKU 85 ++#define KEY_102ND 86 ++#define KEY_F11 87 ++#define KEY_F12 88 ++#define KEY_RO 89 ++#define KEY_KATAKANA 90 ++#define KEY_HIRAGANA 91 ++#define KEY_HENKAN 92 ++#define KEY_KATAKANAHIRAGANA 93 ++#define KEY_MUHENKAN 94 ++#define KEY_KPJPCOMMA 95 ++#define KEY_KPENTER 96 ++#define KEY_RIGHTCTRL 97 ++#define KEY_KPSLASH 98 ++#define KEY_SYSRQ 99 ++#define KEY_RIGHTALT 100 ++#define KEY_LINEFEED 101 ++#define KEY_HOME 102 ++#define KEY_UP 103 ++#define KEY_PAGEUP 104 ++#define KEY_LEFT 105 ++#define KEY_RIGHT 106 ++#define KEY_END 107 ++#define KEY_DOWN 108 ++#define KEY_PAGEDOWN 109 ++#define KEY_INSERT 110 ++#define KEY_DELETE 111 ++#define KEY_MACRO 112 ++#define KEY_MUTE 113 ++#define KEY_VOLUMEDOWN 114 ++#define KEY_VOLUMEUP 115 ++#define KEY_POWER 116 /* SC System Power Down */ ++#define KEY_KPEQUAL 117 ++#define KEY_KPPLUSMINUS 118 ++#define KEY_PAUSE 119 ++#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ ++ ++#define KEY_KPCOMMA 121 ++#define KEY_HANGEUL 122 ++#define KEY_HANGUEL KEY_HANGEUL ++#define KEY_HANJA 123 ++#define KEY_YEN 124 ++#define KEY_LEFTMETA 125 ++#define KEY_RIGHTMETA 126 ++#define KEY_COMPOSE 127 ++ ++#define KEY_STOP 128 /* AC Stop */ ++#define KEY_AGAIN 129 ++#define KEY_PROPS 130 /* AC Properties */ ++#define KEY_UNDO 131 /* AC Undo */ ++#define KEY_FRONT 132 ++#define KEY_COPY 133 /* AC Copy */ ++#define KEY_OPEN 134 /* AC Open */ ++#define KEY_PASTE 135 /* AC Paste */ ++#define KEY_FIND 136 /* AC Search */ ++#define KEY_CUT 137 /* AC Cut */ ++#define KEY_HELP 138 /* AL Integrated Help Center */ ++#define KEY_MENU 139 /* Menu (show menu) */ ++#define KEY_CALC 140 /* AL Calculator */ ++#define KEY_SETUP 141 ++#define KEY_SLEEP 142 /* SC System Sleep */ ++#define KEY_WAKEUP 143 /* System Wake Up */ ++#define KEY_FILE 144 /* AL Local Machine Browser */ ++#define KEY_SENDFILE 145 ++#define KEY_DELETEFILE 146 ++#define KEY_XFER 147 ++#define KEY_PROG1 148 ++#define KEY_PROG2 149 ++#define KEY_WWW 150 /* AL Internet Browser */ ++#define KEY_MSDOS 151 ++#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ ++#define KEY_SCREENLOCK KEY_COFFEE ++#define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ ++#define KEY_DIRECTION KEY_ROTATE_DISPLAY ++#define KEY_CYCLEWINDOWS 154 ++#define KEY_MAIL 155 ++#define KEY_BOOKMARKS 156 /* AC Bookmarks */ ++#define KEY_COMPUTER 157 ++#define KEY_BACK 158 /* AC Back */ ++#define KEY_FORWARD 159 /* AC Forward */ ++#define KEY_CLOSECD 160 ++#define KEY_EJECTCD 161 ++#define KEY_EJECTCLOSECD 162 ++#define KEY_NEXTSONG 163 ++#define KEY_PLAYPAUSE 164 ++#define KEY_PREVIOUSSONG 165 ++#define KEY_STOPCD 166 ++#define KEY_RECORD 167 ++#define KEY_REWIND 168 ++#define KEY_PHONE 169 /* Media Select Telephone */ ++#define KEY_ISO 170 ++#define KEY_CONFIG 171 /* AL Consumer Control Configuration */ ++#define KEY_HOMEPAGE 172 /* AC Home */ ++#define KEY_REFRESH 173 /* AC Refresh */ ++#define KEY_EXIT 174 /* AC Exit */ ++#define KEY_MOVE 175 ++#define KEY_EDIT 176 ++#define KEY_SCROLLUP 177 ++#define KEY_SCROLLDOWN 178 ++#define KEY_KPLEFTPAREN 179 ++#define KEY_KPRIGHTPAREN 180 ++#define KEY_NEW 181 /* AC New */ ++#define KEY_REDO 182 /* AC Redo/Repeat */ ++ ++#define KEY_F13 183 ++#define KEY_F14 184 ++#define KEY_F15 185 ++#define KEY_F16 186 ++#define KEY_F17 187 ++#define KEY_F18 188 ++#define KEY_F19 189 ++#define KEY_F20 190 ++#define KEY_F21 191 ++#define KEY_F22 192 ++#define KEY_F23 193 ++#define KEY_F24 194 ++ ++#define KEY_PLAYCD 200 ++#define KEY_PAUSECD 201 ++#define KEY_PROG3 202 ++#define KEY_PROG4 203 ++#define KEY_DASHBOARD 204 /* AL Dashboard */ ++#define KEY_SUSPEND 205 ++#define KEY_CLOSE 206 /* AC Close */ ++#define KEY_PLAY 207 ++#define KEY_FASTFORWARD 208 ++#define KEY_BASSBOOST 209 ++#define KEY_PRINT 210 /* AC Print */ ++#define KEY_HP 211 ++#define KEY_CAMERA 212 ++#define KEY_SOUND 213 ++#define KEY_QUESTION 214 ++#define KEY_EMAIL 215 ++#define KEY_CHAT 216 ++#define KEY_SEARCH 217 ++#define KEY_CONNECT 218 ++#define KEY_FINANCE 219 /* AL Checkbook/Finance */ ++#define KEY_SPORT 220 ++#define KEY_SHOP 221 ++#define KEY_ALTERASE 222 ++#define KEY_CANCEL 223 /* AC Cancel */ ++#define KEY_BRIGHTNESSDOWN 224 ++#define KEY_BRIGHTNESSUP 225 ++#define KEY_MEDIA 226 ++ ++#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video ++ outputs (Monitor/LCD/TV-out/etc) */ ++#define KEY_KBDILLUMTOGGLE 228 ++#define KEY_KBDILLUMDOWN 229 ++#define KEY_KBDILLUMUP 230 ++ ++#define KEY_SEND 231 /* AC Send */ ++#define KEY_REPLY 232 /* AC Reply */ ++#define KEY_FORWARDMAIL 233 /* AC Forward Msg */ ++#define KEY_SAVE 234 /* AC Save */ ++#define KEY_DOCUMENTS 235 ++ ++#define KEY_BATTERY 236 ++ ++#define KEY_BLUETOOTH 237 ++#define KEY_WLAN 238 ++#define KEY_UWB 239 ++ ++#define KEY_UNKNOWN 240 ++ ++#define KEY_VIDEO_NEXT 241 /* drive next video source */ ++#define KEY_VIDEO_PREV 242 /* drive previous video source */ ++#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ ++#define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual ++ brightness control is off, ++ rely on ambient */ ++#define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO ++#define KEY_DISPLAY_OFF 245 /* display device to off state */ ++ ++#define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ ++#define KEY_WIMAX KEY_WWAN ++#define KEY_RFKILL 247 /* Key that controls all radios */ ++ ++#define KEY_MICMUTE 248 /* Mute / unmute the microphone */ ++ ++/* Code 255 is reserved for special needs of AT keyboard driver */ ++ ++#define BTN_MISC 0x100 ++#define BTN_0 0x100 ++#define BTN_1 0x101 ++#define BTN_2 0x102 ++#define BTN_3 0x103 ++#define BTN_4 0x104 ++#define BTN_5 0x105 ++#define BTN_6 0x106 ++#define BTN_7 0x107 ++#define BTN_8 0x108 ++#define BTN_9 0x109 ++ ++#define BTN_MOUSE 0x110 ++#define BTN_LEFT 0x110 ++#define BTN_RIGHT 0x111 ++#define BTN_MIDDLE 0x112 ++#define BTN_SIDE 0x113 ++#define BTN_EXTRA 0x114 ++#define BTN_FORWARD 0x115 ++#define BTN_BACK 0x116 ++#define BTN_TASK 0x117 ++ ++#define BTN_JOYSTICK 0x120 ++#define BTN_TRIGGER 0x120 ++#define BTN_THUMB 0x121 ++#define BTN_THUMB2 0x122 ++#define BTN_TOP 0x123 ++#define BTN_TOP2 0x124 ++#define BTN_PINKIE 0x125 ++#define BTN_BASE 0x126 ++#define BTN_BASE2 0x127 ++#define BTN_BASE3 0x128 ++#define BTN_BASE4 0x129 ++#define BTN_BASE5 0x12a ++#define BTN_BASE6 0x12b ++#define BTN_DEAD 0x12f ++ ++#define BTN_GAMEPAD 0x130 ++#define BTN_SOUTH 0x130 ++#define BTN_A BTN_SOUTH ++#define BTN_EAST 0x131 ++#define BTN_B BTN_EAST ++#define BTN_C 0x132 ++#define BTN_NORTH 0x133 ++#define BTN_X BTN_NORTH ++#define BTN_WEST 0x134 ++#define BTN_Y BTN_WEST ++#define BTN_Z 0x135 ++#define BTN_TL 0x136 ++#define BTN_TR 0x137 ++#define BTN_TL2 0x138 ++#define BTN_TR2 0x139 ++#define BTN_SELECT 0x13a ++#define BTN_START 0x13b ++#define BTN_MODE 0x13c ++#define BTN_THUMBL 0x13d ++#define BTN_THUMBR 0x13e ++ ++#define BTN_DIGI 0x140 ++#define BTN_TOOL_PEN 0x140 ++#define BTN_TOOL_RUBBER 0x141 ++#define BTN_TOOL_BRUSH 0x142 ++#define BTN_TOOL_PENCIL 0x143 ++#define BTN_TOOL_AIRBRUSH 0x144 ++#define BTN_TOOL_FINGER 0x145 ++#define BTN_TOOL_MOUSE 0x146 ++#define BTN_TOOL_LENS 0x147 ++#define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ ++#define BTN_TOUCH 0x14a ++#define BTN_STYLUS 0x14b ++#define BTN_STYLUS2 0x14c ++#define BTN_TOOL_DOUBLETAP 0x14d ++#define BTN_TOOL_TRIPLETAP 0x14e ++#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ ++ ++#define BTN_WHEEL 0x150 ++#define BTN_GEAR_DOWN 0x150 ++#define BTN_GEAR_UP 0x151 ++ ++#define KEY_OK 0x160 ++#define KEY_SELECT 0x161 ++#define KEY_GOTO 0x162 ++#define KEY_CLEAR 0x163 ++#define KEY_POWER2 0x164 ++#define KEY_OPTION 0x165 ++#define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ ++#define KEY_TIME 0x167 ++#define KEY_VENDOR 0x168 ++#define KEY_ARCHIVE 0x169 ++#define KEY_PROGRAM 0x16a /* Media Select Program Guide */ ++#define KEY_CHANNEL 0x16b ++#define KEY_FAVORITES 0x16c ++#define KEY_EPG 0x16d ++#define KEY_PVR 0x16e /* Media Select Home */ ++#define KEY_MHP 0x16f ++#define KEY_LANGUAGE 0x170 ++#define KEY_TITLE 0x171 ++#define KEY_SUBTITLE 0x172 ++#define KEY_ANGLE 0x173 ++#define KEY_ZOOM 0x174 ++#define KEY_MODE 0x175 ++#define KEY_KEYBOARD 0x176 ++#define KEY_SCREEN 0x177 ++#define KEY_PC 0x178 /* Media Select Computer */ ++#define KEY_TV 0x179 /* Media Select TV */ ++#define KEY_TV2 0x17a /* Media Select Cable */ ++#define KEY_VCR 0x17b /* Media Select VCR */ ++#define KEY_VCR2 0x17c /* VCR Plus */ ++#define KEY_SAT 0x17d /* Media Select Satellite */ ++#define KEY_SAT2 0x17e ++#define KEY_CD 0x17f /* Media Select CD */ ++#define KEY_TAPE 0x180 /* Media Select Tape */ ++#define KEY_RADIO 0x181 ++#define KEY_TUNER 0x182 /* Media Select Tuner */ ++#define KEY_PLAYER 0x183 ++#define KEY_TEXT 0x184 ++#define KEY_DVD 0x185 /* Media Select DVD */ ++#define KEY_AUX 0x186 ++#define KEY_MP3 0x187 ++#define KEY_AUDIO 0x188 /* AL Audio Browser */ ++#define KEY_VIDEO 0x189 /* AL Movie Browser */ ++#define KEY_DIRECTORY 0x18a ++#define KEY_LIST 0x18b ++#define KEY_MEMO 0x18c /* Media Select Messages */ ++#define KEY_CALENDAR 0x18d ++#define KEY_RED 0x18e ++#define KEY_GREEN 0x18f ++#define KEY_YELLOW 0x190 ++#define KEY_BLUE 0x191 ++#define KEY_CHANNELUP 0x192 /* Channel Increment */ ++#define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ ++#define KEY_FIRST 0x194 ++#define KEY_LAST 0x195 /* Recall Last */ ++#define KEY_AB 0x196 ++#define KEY_NEXT 0x197 ++#define KEY_RESTART 0x198 ++#define KEY_SLOW 0x199 ++#define KEY_SHUFFLE 0x19a ++#define KEY_BREAK 0x19b ++#define KEY_PREVIOUS 0x19c ++#define KEY_DIGITS 0x19d ++#define KEY_TEEN 0x19e ++#define KEY_TWEN 0x19f ++#define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ ++#define KEY_GAMES 0x1a1 /* Media Select Games */ ++#define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ ++#define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ ++#define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ ++#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ ++#define KEY_EDITOR 0x1a6 /* AL Text Editor */ ++#define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ ++#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ ++#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ ++#define KEY_DATABASE 0x1aa /* AL Database App */ ++#define KEY_NEWS 0x1ab /* AL Newsreader */ ++#define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ ++#define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ ++#define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ ++#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ ++#define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE ++#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ ++#define KEY_LOGOFF 0x1b1 /* AL Logoff */ ++ ++#define KEY_DOLLAR 0x1b2 ++#define KEY_EURO 0x1b3 ++ ++#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ ++#define KEY_FRAMEFORWARD 0x1b5 ++#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ ++#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ ++#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ ++#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ ++#define KEY_IMAGES 0x1ba /* AL Image Browser */ ++ ++#define KEY_DEL_EOL 0x1c0 ++#define KEY_DEL_EOS 0x1c1 ++#define KEY_INS_LINE 0x1c2 ++#define KEY_DEL_LINE 0x1c3 ++ ++#define KEY_FN 0x1d0 ++#define KEY_FN_ESC 0x1d1 ++#define KEY_FN_F1 0x1d2 ++#define KEY_FN_F2 0x1d3 ++#define KEY_FN_F3 0x1d4 ++#define KEY_FN_F4 0x1d5 ++#define KEY_FN_F5 0x1d6 ++#define KEY_FN_F6 0x1d7 ++#define KEY_FN_F7 0x1d8 ++#define KEY_FN_F8 0x1d9 ++#define KEY_FN_F9 0x1da ++#define KEY_FN_F10 0x1db ++#define KEY_FN_F11 0x1dc ++#define KEY_FN_F12 0x1dd ++#define KEY_FN_1 0x1de ++#define KEY_FN_2 0x1df ++#define KEY_FN_D 0x1e0 ++#define KEY_FN_E 0x1e1 ++#define KEY_FN_F 0x1e2 ++#define KEY_FN_S 0x1e3 ++#define KEY_FN_B 0x1e4 ++ ++#define KEY_BRL_DOT1 0x1f1 ++#define KEY_BRL_DOT2 0x1f2 ++#define KEY_BRL_DOT3 0x1f3 ++#define KEY_BRL_DOT4 0x1f4 ++#define KEY_BRL_DOT5 0x1f5 ++#define KEY_BRL_DOT6 0x1f6 ++#define KEY_BRL_DOT7 0x1f7 ++#define KEY_BRL_DOT8 0x1f8 ++#define KEY_BRL_DOT9 0x1f9 ++#define KEY_BRL_DOT10 0x1fa ++ ++#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ ++#define KEY_NUMERIC_1 0x201 /* and other keypads */ ++#define KEY_NUMERIC_2 0x202 ++#define KEY_NUMERIC_3 0x203 ++#define KEY_NUMERIC_4 0x204 ++#define KEY_NUMERIC_5 0x205 ++#define KEY_NUMERIC_6 0x206 ++#define KEY_NUMERIC_7 0x207 ++#define KEY_NUMERIC_8 0x208 ++#define KEY_NUMERIC_9 0x209 ++#define KEY_NUMERIC_STAR 0x20a ++#define KEY_NUMERIC_POUND 0x20b ++#define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ ++#define KEY_NUMERIC_B 0x20d ++#define KEY_NUMERIC_C 0x20e ++#define KEY_NUMERIC_D 0x20f ++ ++#define KEY_CAMERA_FOCUS 0x210 ++#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ ++ ++#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ ++#define KEY_TOUCHPAD_ON 0x213 ++#define KEY_TOUCHPAD_OFF 0x214 ++ ++#define KEY_CAMERA_ZOOMIN 0x215 ++#define KEY_CAMERA_ZOOMOUT 0x216 ++#define KEY_CAMERA_UP 0x217 ++#define KEY_CAMERA_DOWN 0x218 ++#define KEY_CAMERA_LEFT 0x219 ++#define KEY_CAMERA_RIGHT 0x21a ++ ++#define KEY_ATTENDANT_ON 0x21b ++#define KEY_ATTENDANT_OFF 0x21c ++#define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ ++#define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ ++ ++#define BTN_DPAD_UP 0x220 ++#define BTN_DPAD_DOWN 0x221 ++#define BTN_DPAD_LEFT 0x222 ++#define BTN_DPAD_RIGHT 0x223 ++ ++#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ ++ ++#define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ ++#define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ ++#define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ ++#define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ ++#define KEY_APPSELECT 0x244 /* AL Select Task/Application */ ++#define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ ++#define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ ++ ++#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ ++#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ ++ ++#define KEY_KBDINPUTASSIST_PREV 0x260 ++#define KEY_KBDINPUTASSIST_NEXT 0x261 ++#define KEY_KBDINPUTASSIST_PREVGROUP 0x262 ++#define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 ++#define KEY_KBDINPUTASSIST_ACCEPT 0x264 ++#define KEY_KBDINPUTASSIST_CANCEL 0x265 ++ ++#define BTN_TRIGGER_HAPPY 0x2c0 ++#define BTN_TRIGGER_HAPPY1 0x2c0 ++#define BTN_TRIGGER_HAPPY2 0x2c1 ++#define BTN_TRIGGER_HAPPY3 0x2c2 ++#define BTN_TRIGGER_HAPPY4 0x2c3 ++#define BTN_TRIGGER_HAPPY5 0x2c4 ++#define BTN_TRIGGER_HAPPY6 0x2c5 ++#define BTN_TRIGGER_HAPPY7 0x2c6 ++#define BTN_TRIGGER_HAPPY8 0x2c7 ++#define BTN_TRIGGER_HAPPY9 0x2c8 ++#define BTN_TRIGGER_HAPPY10 0x2c9 ++#define BTN_TRIGGER_HAPPY11 0x2ca ++#define BTN_TRIGGER_HAPPY12 0x2cb ++#define BTN_TRIGGER_HAPPY13 0x2cc ++#define BTN_TRIGGER_HAPPY14 0x2cd ++#define BTN_TRIGGER_HAPPY15 0x2ce ++#define BTN_TRIGGER_HAPPY16 0x2cf ++#define BTN_TRIGGER_HAPPY17 0x2d0 ++#define BTN_TRIGGER_HAPPY18 0x2d1 ++#define BTN_TRIGGER_HAPPY19 0x2d2 ++#define BTN_TRIGGER_HAPPY20 0x2d3 ++#define BTN_TRIGGER_HAPPY21 0x2d4 ++#define BTN_TRIGGER_HAPPY22 0x2d5 ++#define BTN_TRIGGER_HAPPY23 0x2d6 ++#define BTN_TRIGGER_HAPPY24 0x2d7 ++#define BTN_TRIGGER_HAPPY25 0x2d8 ++#define BTN_TRIGGER_HAPPY26 0x2d9 ++#define BTN_TRIGGER_HAPPY27 0x2da ++#define BTN_TRIGGER_HAPPY28 0x2db ++#define BTN_TRIGGER_HAPPY29 0x2dc ++#define BTN_TRIGGER_HAPPY30 0x2dd ++#define BTN_TRIGGER_HAPPY31 0x2de ++#define BTN_TRIGGER_HAPPY32 0x2df ++#define BTN_TRIGGER_HAPPY33 0x2e0 ++#define BTN_TRIGGER_HAPPY34 0x2e1 ++#define BTN_TRIGGER_HAPPY35 0x2e2 ++#define BTN_TRIGGER_HAPPY36 0x2e3 ++#define BTN_TRIGGER_HAPPY37 0x2e4 ++#define BTN_TRIGGER_HAPPY38 0x2e5 ++#define BTN_TRIGGER_HAPPY39 0x2e6 ++#define BTN_TRIGGER_HAPPY40 0x2e7 ++ ++/* We avoid low common keys in module aliases so they don't get huge. */ ++#define KEY_MIN_INTERESTING KEY_MUTE ++#define KEY_MAX 0x2ff ++#define KEY_CNT (KEY_MAX+1) ++ ++/* ++ * Relative axes ++ */ ++ ++#define REL_X 0x00 ++#define REL_Y 0x01 ++#define REL_Z 0x02 ++#define REL_RX 0x03 ++#define REL_RY 0x04 ++#define REL_RZ 0x05 ++#define REL_HWHEEL 0x06 ++#define REL_DIAL 0x07 ++#define REL_WHEEL 0x08 ++#define REL_MISC 0x09 ++#define REL_MAX 0x0f ++#define REL_CNT (REL_MAX+1) ++ ++/* ++ * Absolute axes ++ */ ++ ++#define ABS_X 0x00 ++#define ABS_Y 0x01 ++#define ABS_Z 0x02 ++#define ABS_RX 0x03 ++#define ABS_RY 0x04 ++#define ABS_RZ 0x05 ++#define ABS_THROTTLE 0x06 ++#define ABS_RUDDER 0x07 ++#define ABS_WHEEL 0x08 ++#define ABS_GAS 0x09 ++#define ABS_BRAKE 0x0a ++#define ABS_HAT0X 0x10 ++#define ABS_HAT0Y 0x11 ++#define ABS_HAT1X 0x12 ++#define ABS_HAT1Y 0x13 ++#define ABS_HAT2X 0x14 ++#define ABS_HAT2Y 0x15 ++#define ABS_HAT3X 0x16 ++#define ABS_HAT3Y 0x17 ++#define ABS_PRESSURE 0x18 ++#define ABS_DISTANCE 0x19 ++#define ABS_TILT_X 0x1a ++#define ABS_TILT_Y 0x1b ++#define ABS_TOOL_WIDTH 0x1c ++ ++#define ABS_VOLUME 0x20 ++ ++#define ABS_MISC 0x28 ++ ++#define ABS_MT_SLOT 0x2f /* MT slot being modified */ ++#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ ++#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ ++#define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ ++#define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ ++#define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ ++#define ABS_MT_POSITION_X 0x35 /* Center X touch position */ ++#define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ ++#define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ ++#define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ ++#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ ++#define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ ++#define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ ++#define ABS_MT_TOOL_X 0x3c /* Center X tool position */ ++#define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ ++ ++ ++#define ABS_MAX 0x3f ++#define ABS_CNT (ABS_MAX+1) ++ ++/* ++ * Switch events ++ */ ++ ++#define SW_LID 0x00 /* set = lid shut */ ++#define SW_TABLET_MODE 0x01 /* set = tablet mode */ ++#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ ++#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" ++ set = radio enabled */ ++#define SW_RADIO SW_RFKILL_ALL /* deprecated */ ++#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ ++#define SW_DOCK 0x05 /* set = plugged into dock */ ++#define SW_LINEOUT_INSERT 0x06 /* set = inserted */ ++#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ ++#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ ++#define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ ++#define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ ++#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ ++#define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ ++#define SW_LINEIN_INSERT 0x0d /* set = inserted */ ++#define SW_MUTE_DEVICE 0x0e /* set = device disabled */ ++#define SW_MAX 0x0f ++#define SW_CNT (SW_MAX+1) ++ ++/* ++ * Misc events ++ */ ++ ++#define MSC_SERIAL 0x00 ++#define MSC_PULSELED 0x01 ++#define MSC_GESTURE 0x02 ++#define MSC_RAW 0x03 ++#define MSC_SCAN 0x04 ++#define MSC_TIMESTAMP 0x05 ++#define MSC_MAX 0x07 ++#define MSC_CNT (MSC_MAX+1) ++ ++/* ++ * LEDs ++ */ ++ ++#define LED_NUML 0x00 ++#define LED_CAPSL 0x01 ++#define LED_SCROLLL 0x02 ++#define LED_COMPOSE 0x03 ++#define LED_KANA 0x04 ++#define LED_SLEEP 0x05 ++#define LED_SUSPEND 0x06 ++#define LED_MUTE 0x07 ++#define LED_MISC 0x08 ++#define LED_MAIL 0x09 ++#define LED_CHARGING 0x0a ++#define LED_MAX 0x0f ++#define LED_CNT (LED_MAX+1) ++ ++/* ++ * Autorepeat values ++ */ ++ ++#define REP_DELAY 0x00 ++#define REP_PERIOD 0x01 ++#define REP_MAX 0x01 ++#define REP_CNT (REP_MAX+1) ++ ++/* ++ * Sounds ++ */ ++ ++#define SND_CLICK 0x00 ++#define SND_BELL 0x01 ++#define SND_TONE 0x02 ++#define SND_MAX 0x07 ++#define SND_CNT (SND_MAX+1) ++ ++#endif diff --git a/package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch b/package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch new file mode 100644 index 000000000..e36f9e3c5 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch @@ -0,0 +1,7211 @@ +From 80e5f83c0fc4bf42110cc55ce671ad7ddc7b08a4 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 14 Mar 2016 17:37:09 +0100 +Subject: [PATCH] sunxi: Sync dts files with the upstream kernel + +Sync dts files with the upstream kernel including +changes queued for 4.6: + +https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/commit/?h=sunxi/dt-for-4.6 + +Note this adds a number of new unused board dts files. I've asked the +authors of the kernel commits adding these to submit a matching defconfig +to u-boot. + +Signed-off-by: Hans de Goede +Acked-by: Ian Campbell +--- + arch/arm/dts/Makefile | 8 +- + arch/arm/dts/axp22x.dtsi | 145 ++++++++++++ + arch/arm/dts/sun4i-a10-a1000.dts | 4 + + arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts | 22 ++ + arch/arm/dts/sun4i-a10-cubieboard.dts | 4 + + arch/arm/dts/sun4i-a10-gemei-g9.dts | 63 +++++- + arch/arm/dts/sun4i-a10-inet1.dts | 48 ++++ + arch/arm/dts/sun4i-a10-inet97fv2.dts | 127 ++++++++++- + arch/arm/dts/sun4i-a10-inet9f-rev03.dts | 181 +++++++++++++++ + arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts | 86 +------ + arch/arm/dts/sun4i-a10-jesurun-q5.dts | 15 ++ + arch/arm/dts/sun4i-a10-marsboard.dts | 23 ++ + arch/arm/dts/sun4i-a10-mk802.dts | 37 +++ + arch/arm/dts/sun4i-a10-olinuxino-lime.dts | 12 + + arch/arm/dts/sun4i-a10-pcduino.dts | 58 ++++- + arch/arm/dts/sun4i-a10-pcduino2.dts | 78 +++++++ + arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts | 69 ++++++ + arch/arm/dts/sun4i-a10.dtsi | 153 +++++++++++-- + arch/arm/dts/sun5i-a10s-auxtek-t004.dts | 14 ++ + arch/arm/dts/sun5i-a10s-olinuxino-micro.dts | 2 +- + arch/arm/dts/sun5i-a13-empire-electronix-d709.dts | 19 +- + arch/arm/dts/sun5i-a13-inet-98v-rev2.dts | 26 +-- + arch/arm/dts/sun5i-a13-utoo-p66.dts | 30 +++ + arch/arm/dts/sun5i-q8-common.dtsi | 10 + + arch/arm/dts/sun5i-r8-chip.dts | 47 +++- + arch/arm/dts/sun5i.dtsi | 31 +++ + arch/arm/dts/sun6i-a31-colombus.dts | 24 ++ + arch/arm/dts/sun6i-a31-hummingbird.dts | 132 ++++++----- + arch/arm/dts/sun6i-a31.dtsi | 65 +++++- + arch/arm/dts/sun6i-a31s-primo81.dts | 247 ++++++++++++++++++++- + arch/arm/dts/sun6i-a31s-sina31s-core.dtsi | 142 ++++++++++++ + arch/arm/dts/sun6i-a31s-sina31s.dts | 153 +++++++++++++ + .../arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 205 +++++++++++++++++ + arch/arm/dts/sun7i-a20-bananapi.dts | 78 ++++++- + arch/arm/dts/sun7i-a20-cubieboard2.dts | 23 ++ + arch/arm/dts/sun7i-a20-cubietruck.dts | 4 + + arch/arm/dts/sun7i-a20-icnova-swac.dts | 169 ++++++++++++++ + arch/arm/dts/sun7i-a20-itead-ibox.dts | 125 +++++++++++ + arch/arm/dts/sun7i-a20-lamobo-r1.dts | 10 - + arch/arm/dts/sun7i-a20-mk808c.dts | 39 ++++ + arch/arm/dts/sun7i-a20-olimex-som-evb.dts | 95 ++++++-- + arch/arm/dts/sun7i-a20-olinuxino-lime.dts | 12 + + arch/arm/dts/sun7i-a20-olinuxino-lime2.dts | 47 ++++ + arch/arm/dts/sun7i-a20-olinuxino-micro.dts | 6 + + arch/arm/dts/sun7i-a20-orangepi-mini.dts | 33 +++ + arch/arm/dts/sun7i-a20-orangepi.dts | 29 +++ + arch/arm/dts/sun7i-a20-pcduino3-nano.dts | 69 +++++- + arch/arm/dts/sun7i-a20-pcduino3.dts | 58 ++++- + arch/arm/dts/sun7i-a20-wexler-tab7200.dts | 90 +++++++- + arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts | 187 +++++++++++++++- + arch/arm/dts/sun7i-a20.dtsi | 113 +++++++++- + arch/arm/dts/sun8i-a23-a33.dtsi | 71 ++++-- + arch/arm/dts/sun8i-a23-gt90h-v4.dts | 120 +++++++++- + arch/arm/dts/sun8i-a23.dtsi | 25 +++ + arch/arm/dts/sun8i-a33-sinlinx-sina33.dts | 83 ++++++- + arch/arm/dts/sun8i-a33.dtsi | 45 ++++ + arch/arm/dts/sun8i-a83t-cubietruck-plus.dts | 65 ++++++ + arch/arm/dts/sun8i-a83t.dtsi | 125 +++++------ + arch/arm/dts/sun8i-h3-orangepi-pc.dts | 69 ++++++ + arch/arm/dts/sun8i-h3-orangepi-plus.dts | 63 ++++++ + arch/arm/dts/sun8i-h3.dtsi | 189 +++++++++++----- + arch/arm/dts/sun8i-q8-common.dtsi | 96 +++++++- + arch/arm/dts/sun9i-a80-cubieboard4.dts | 36 +++ + arch/arm/dts/sun9i-a80-optimus.dts | 48 ++-- + arch/arm/dts/sun9i-a80.dtsi | 204 +++++++++++++++-- + arch/arm/dts/sunxi-itead-core-common.dtsi | 136 ++++++++++++ + arch/arm/dts/sunxi-q8-common.dtsi | 6 + + 67 files changed, 4351 insertions(+), 497 deletions(-) + create mode 100644 arch/arm/dts/axp22x.dtsi + create mode 100644 arch/arm/dts/sun4i-a10-pcduino2.dts + create mode 100644 arch/arm/dts/sun6i-a31s-sina31s-core.dtsi + create mode 100644 arch/arm/dts/sun6i-a31s-sina31s.dts + create mode 100644 arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts + create mode 100644 arch/arm/dts/sun7i-a20-icnova-swac.dts + create mode 100644 arch/arm/dts/sun7i-a20-itead-ibox.dts + create mode 100644 arch/arm/dts/sun8i-a83t-cubietruck-plus.dts + create mode 100644 arch/arm/dts/sunxi-itead-core-common.dtsi + +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -126,6 +126,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \ + sun4i-a10-mk802ii.dtb \ + sun4i-a10-olinuxino-lime.dtb \ + sun4i-a10-pcduino.dtb \ ++ sun4i-a10-pcduino2.dtb \ + sun4i-a10-pov-protab2-ips9.dtb + dtb-$(CONFIG_MACH_SUN5I) += \ + sun5i-a10s-auxtek-t003.dtb \ +@@ -155,7 +156,9 @@ dtb-$(CONFIG_MACH_SUN6I) += \ + sun6i-a31-pangolin.dtb \ + sun6i-a31s-cs908.dtb \ + sun6i-a31s-primo81.dtb \ +- sun6i-a31s-sinovoip-bpi-m2.dtb ++ sun6i-a31s-sina31s.dtb \ ++ sun6i-a31s-sinovoip-bpi-m2.dtb \ ++ sun6i-a31s-yones-toptech-bs1078-v2.dtb + dtb-$(CONFIG_MACH_SUN7I) += \ + sun7i-a20-ainol-aw1.dtb \ + sun7i-a20-bananapi.dtb \ +@@ -164,6 +167,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \ + sun7i-a20-cubietruck.dtb \ + sun7i-a20-hummingbird.dtb \ + sun7i-a20-i12-tvbox.dtb \ ++ sun7i-a20-icnova-swac.dtb \ ++ sun7i-a20-itead-ibox.dtb \ + sun7i-a20-lamobo-r1.dtb \ + sun7i-a20-m3.dtb \ + sun7i-a20-m5.dtb \ +@@ -190,6 +195,7 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \ + sun8i-a33-sinlinx-sina33.dtb + dtb-$(CONFIG_MACH_SUN8I_A83T) += \ + sun8i-a83t-allwinner-h8homlet-v2.dtb \ ++ sun8i-a83t-cubietruck-plus.dtb \ + sun8i-a83t-sinovoip-bpi-m3.dtb + dtb-$(CONFIG_MACH_SUN8I_H3) += \ + sun8i-h3-orangepi-pc.dtb \ +--- /dev/null ++++ b/arch/arm/dts/axp22x.dtsi +@@ -0,0 +1,145 @@ ++/* ++ * Copyright 2015 Chen-Yu Tsai ++ * ++ * Chen-Yu Tsai ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++/* ++ * AXP221/221s/223 Integrated Power Management Chip ++ * http://www.x-powers.com/product/AXP22X.php ++ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf ++ */ ++ ++&axp22x { ++ interrupt-controller; ++ #interrupt-cells = <1>; ++ ++ regulators { ++ /* Default work frequency for buck regulators */ ++ x-powers,dcdc-freq = <3000>; ++ ++ reg_dcdc1: dcdc1 { ++ regulator-name = "dcdc1"; ++ }; ++ ++ reg_dcdc2: dcdc2 { ++ regulator-name = "dcdc2"; ++ }; ++ ++ reg_dcdc3: dcdc3 { ++ regulator-name = "dcdc3"; ++ }; ++ ++ reg_dcdc4: dcdc4 { ++ regulator-name = "dcdc4"; ++ }; ++ ++ reg_dcdc5: dcdc5 { ++ regulator-name = "dcdc5"; ++ }; ++ ++ reg_dc1sw: dc1sw { ++ regulator-name = "dc1sw"; ++ }; ++ ++ reg_dc5ldo: dc5ldo { ++ regulator-name = "dc5ldo"; ++ }; ++ ++ reg_aldo1: aldo1 { ++ regulator-name = "aldo1"; ++ }; ++ ++ reg_aldo2: aldo2 { ++ regulator-name = "aldo2"; ++ }; ++ ++ reg_aldo3: aldo3 { ++ regulator-name = "aldo3"; ++ }; ++ ++ reg_dldo1: dldo1 { ++ regulator-name = "dldo1"; ++ }; ++ ++ reg_dldo2: dldo2 { ++ regulator-name = "dldo2"; ++ }; ++ ++ reg_dldo3: dldo3 { ++ regulator-name = "dldo3"; ++ }; ++ ++ reg_dldo4: dldo4 { ++ regulator-name = "dldo4"; ++ }; ++ ++ reg_eldo1: eldo1 { ++ regulator-name = "eldo1"; ++ }; ++ ++ reg_eldo2: eldo2 { ++ regulator-name = "eldo2"; ++ }; ++ ++ reg_eldo3: eldo3 { ++ regulator-name = "eldo3"; ++ }; ++ ++ reg_ldo_io0: ldo_io0 { ++ regulator-name = "ldo_io0"; ++ status = "disabled"; ++ }; ++ ++ reg_ldo_io1: ldo_io1 { ++ regulator-name = "ldo_io1"; ++ status = "disabled"; ++ }; ++ ++ reg_rtc_ldo: rtc_ldo { ++ /* RTC_LDO is a fixed, always-on regulator */ ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "rtc_ldo"; ++ }; ++ }; ++}; +--- a/arch/arm/dts/sun4i-a10-a1000.dts ++++ b/arch/arm/dts/sun4i-a10-a1000.dts +@@ -93,6 +93,10 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +--- a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts ++++ b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts +@@ -45,6 +45,7 @@ + #include "sunxi-common-regulators.dtsi" + #include + #include ++#include + + / { + model = "Chuwi V7 CW0825"; +@@ -78,6 +79,27 @@ + }; + }; + ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++}; ++ ++&i2c2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins_a>; ++ status = "okay"; ++ ++ ft5306de4: touchscreen@38 { ++ compatible = "edt,edt-ft5406"; ++ reg = <0x38>; ++ interrupt-parent = <&pio>; ++ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; ++ touchscreen-size-x = <1024>; ++ touchscreen-size-y = <768>; ++ }; ++}; ++ + &lradc { + vref-supply = <®_vcc3v0>; + status = "okay"; +--- a/arch/arm/dts/sun4i-a10-cubieboard.dts ++++ b/arch/arm/dts/sun4i-a10-cubieboard.dts +@@ -83,6 +83,10 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &cpu0 { + cpu-supply = <®_dcdc2>; + }; +--- a/arch/arm/dts/sun4i-a10-gemei-g9.dts ++++ b/arch/arm/dts/sun4i-a10-gemei-g9.dts +@@ -47,6 +47,7 @@ + #include "sunxi-common-regulators.dtsi" + #include + #include ++#include + + / { + model = "Gemei G9 Tablet"; +@@ -64,12 +65,22 @@ + /* + * TODO: + * 2x cameras via CSI +- * bma250 IRQs + * AXP battery management + * NAND + * OTG + * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 + */ ++&codec { ++ /* PH15 controls power to external amplifier (ft2012q) */ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&codec_pa_pin>; ++ allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; ++ status = "okay"; ++}; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++}; + + &ehci0 { + status = "okay"; +@@ -85,15 +96,13 @@ + status = "okay"; + + axp209: pmic@34 { +- compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; +- +- interrupt-controller; +- #interrupt-cells = <1>; + }; + }; + ++#include "axp209.dtsi" ++ + &i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; +@@ -103,17 +112,13 @@ + bma250@18 { + compatible = "bosch,bma250"; + reg = <0x18>; +- +- /* +- * TODO: interrupt pins: +- * int1 - PH00 +- * int2 - PI10 +- */ ++ interrupt-parent = <&pio>; ++ interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */ + }; + }; + + &lradc { +- vref-supply = <®_vcc3v0>; ++ vref-supply = <®_ldo2>; + + status = "okay"; + +@@ -149,6 +154,40 @@ + status = "okay"; + }; + ++&pio { ++ codec_pa_pin: codec_pa_pin@0 { ++ allwinner,pins = "PH15"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1250000>; ++ regulator-max-microvolt = <1250000>; ++ regulator-name = "vdd-int-dll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; ++}; ++ + ®_usb1_vbus { + status = "okay"; + }; +--- a/arch/arm/dts/sun4i-a10-inet1.dts ++++ b/arch/arm/dts/sun4i-a10-inet1.dts +@@ -47,6 +47,7 @@ + #include + #include + #include ++#include + + / { + model = "iNet-1"; +@@ -56,11 +57,25 @@ + serial0 = &uart0; + }; + ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bl_en_pin_inet>; ++ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; ++ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; ++ default-brightness-level = <8>; ++ enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ ++ }; ++ + chosen { + stdout-path = "serial0:115200n8"; + }; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &cpu0 { + cpu-supply = <®_dcdc2>; + }; +@@ -104,6 +119,19 @@ + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; ++ ++ ft5x: touchscreen@38 { ++ compatible = "edt,edt-ft5406"; ++ reg = <0x38>; ++ interrupt-parent = <&pio>; ++ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&touchscreen_wake_pin>; ++ wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */ ++ touchscreen-size-x = <600>; ++ touchscreen-size-y = <1024>; ++ touchscreen-swapped-x-y; ++ }; + }; + + &lradc { +@@ -151,6 +179,20 @@ + }; + + &pio { ++ bl_en_pin_inet: bl_en_pin@0 { ++ allwinner,pins = "PH7"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ touchscreen_wake_pin: touchscreen_wake_pin@0 { ++ allwinner,pins = "PB13"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + usb0_id_detect_pin: usb0_id_detect_pin@0 { + allwinner,pins = "PH4"; + allwinner,function = "gpio_in"; +@@ -166,6 +208,12 @@ + }; + }; + ++&pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm0_pins_a>; ++ status = "okay"; ++}; ++ + ®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; +--- a/arch/arm/dts/sun4i-a10-inet97fv2.dts ++++ b/arch/arm/dts/sun4i-a10-inet97fv2.dts +@@ -47,6 +47,8 @@ + #include "sunxi-common-regulators.dtsi" + + #include ++#include ++#include + + / { + model = "INet-97F Rev 02"; +@@ -61,8 +63,8 @@ + }; + }; + +-&ehci0 { +- status = "okay"; ++&cpu0 { ++ cpu-supply = <®_dcdc2>; + }; + + &ehci1 { +@@ -75,12 +77,71 @@ + status = "okay"; + + axp209: pmic@34 { +- compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; ++ }; ++}; ++ ++#include "axp209.dtsi" ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++}; ++ ++&i2c2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins_a>; ++ status = "okay"; ++ ++ ft5406ee8: touchscreen@38 { ++ compatible = "edt,edt-ft5406"; ++ reg = <0x38>; ++ interrupt-parent = <&pio>; ++ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; ++ touchscreen-size-x = <800>; ++ touchscreen-size-y = <480>; ++ }; ++}; ++ ++&lradc { ++ vref-supply = <®_ldo2>; ++ status = "okay"; ++ ++ button@200 { ++ label = "Menu"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <200000>; ++ }; ++ ++ button@600 { ++ label = "Volume Up"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <600000>; ++ }; + +- interrupt-controller; +- #interrupt-cells = <1>; ++ button@800 { ++ label = "Volume Down"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <800000>; ++ }; ++ ++ button@1000 { ++ label = "Home"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <1000000>; ++ }; ++ ++ button@1200 { ++ label = "Esc"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <1200000>; + }; + }; + +@@ -94,15 +155,52 @@ + status = "okay"; + }; + +-&ohci0 { ++&otg_sram { + status = "okay"; + }; + +-&ohci1 { +- status = "okay"; ++&pio { ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { ++ allwinner,pins = "PH5"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; + }; + +-®_usb1_vbus { ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1250000>; ++ regulator-max-microvolt = <1250000>; ++ regulator-name = "vdd-int-dll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; ++}; ++ ++®_usb0_vbus { + status = "okay"; + }; + +@@ -116,8 +214,17 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ + &usbphy { +- usb1_vbus-supply = <®_usb1_vbus>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ ++ usb0_vbus-supply = <®_usb0_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; + }; +--- a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts ++++ b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts +@@ -59,6 +59,159 @@ + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ gpio_keys { ++ compatible = "gpio-keys-polled"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&key_pins_inet9f>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ poll-interval = <20>; ++ ++ button@0 { ++ label = "Left Joystick Left"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <0xffffffff>; /* -1 */ ++ gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */ ++ }; ++ ++ button@1 { ++ label = "Left Joystick Right"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <1>; ++ gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */ ++ }; ++ ++ button@2 { ++ label = "Left Joystick Up"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <0xffffffff>; /* -1 */ ++ gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */ ++ }; ++ ++ button@3 { ++ label = "Left Joystick Down"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <1>; ++ gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ ++ }; ++ ++ button@4 { ++ label = "Right Joystick Left"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <0xffffffff>; /* -1 */ ++ gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */ ++ }; ++ ++ button@5 { ++ label = "Right Joystick Right"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <1>; ++ gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */ ++ }; ++ ++ button@6 { ++ label = "Right Joystick Up"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <0xffffffff>; /* -1 */ ++ gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */ ++ }; ++ ++ button@7 { ++ label = "Right Joystick Down"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <1>; ++ gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */ ++ }; ++ ++ button@8 { ++ label = "DPad Left"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <0xffffffff>; /* -1 */ ++ gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */ ++ }; ++ ++ button@9 { ++ label = "DPad Right"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <1>; ++ gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */ ++ }; ++ ++ button@10 { ++ label = "DPad Up"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <0xffffffff>; /* -1 */ ++ gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */ ++ }; ++ ++ button@11 { ++ label = "DPad Down"; ++ linux,code = ; ++ linux,input-type = ; ++ linux,input-value = <1>; ++ gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */ ++ }; ++ ++ button@12 { ++ label = "Button X"; ++ linux,code = ; ++ gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */ ++ }; ++ ++ button@13 { ++ label = "Button Y"; ++ linux,code = ; ++ gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */ ++ }; ++ ++ button@14 { ++ label = "Button A"; ++ linux,code = ; ++ gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */ ++ }; ++ ++ button@15 { ++ label = "Button B"; ++ linux,code = ; ++ gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */ ++ }; ++ ++ button@16 { ++ label = "Select Button"; ++ linux,code = ; ++ gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */ ++ }; ++ ++ button@17 { ++ label = "Start Button"; ++ linux,code = ; ++ gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */ ++ }; ++ ++ button@18 { ++ label = "Top Left Button"; ++ linux,code = ; ++ gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */ ++ }; ++ ++ button@19 { ++ label = "Top Right Button"; ++ linux,code = ; ++ gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */ ++ }; ++ }; + }; + + &cpu0 { +@@ -86,12 +239,29 @@ + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; + status = "okay"; ++ ++ /* Accelerometer */ ++ bma250@18 { ++ compatible = "bosch,bma250"; ++ reg = <0x18>; ++ interrupt-parent = <&pio>; ++ interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */ ++ }; + }; + + &i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; ++ ++ ft5406ee8: touchscreen@38 { ++ compatible = "edt,edt-ft5406"; ++ reg = <0x38>; ++ interrupt-parent = <&pio>; ++ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; ++ touchscreen-size-x = <800>; ++ touchscreen-size-y = <480>; ++ }; + }; + + &lradc { +@@ -149,6 +319,17 @@ + }; + + &pio { ++ key_pins_inet9f: key_pins@0 { ++ allwinner,pins = "PA0", "PA1", "PA3", "PA4", ++ "PA5", "PA6", "PA8", "PA9", ++ "PA11", "PA12", "PA13", ++ "PA14", "PA15", "PA16", "PA17", ++ "PH22", "PH23", "PH24", "PH25", "PH26"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + usb0_id_detect_pin: usb0_id_detect_pin@0 { + allwinner,pins = "PH4"; + allwinner,function = "gpio_in"; +--- a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts ++++ b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts +@@ -1,5 +1,6 @@ + /* + * Copyright 2015 Josef Gajdusek ++ * Copyright 2015 - Marcus Cooper + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual +@@ -42,22 +43,11 @@ + + /dts-v1/; + #include "sun4i-a10.dtsi" +-#include "sunxi-common-regulators.dtsi" +- +-#include +-#include ++#include "sunxi-itead-core-common.dtsi" + + / { + model = "Iteaduino Plus A10"; + compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10"; +- +- aliases { +- serial0 = &uart0; +- }; +- +- chosen { +- stdout-path = "serial0:115200n8"; +- }; + }; + + &ahci { +@@ -65,18 +55,6 @@ + status = "okay"; + }; + +-&cpu0 { +- cpu-supply = <®_dcdc2>; +-}; +- +-&ehci0 { +- status = "okay"; +-}; +- +-&ehci1 { +- status = "okay"; +-}; +- + &emac { + pinctrl-names = "default"; + pinctrl-0 = <&emac_pins_a>; +@@ -89,12 +67,7 @@ + }; + + &i2c0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&i2c0_pins_a>; +- status = "okay"; +- + axp209: pmic@34 { +- reg = <0x34>; + interrupts = <0>; + }; + }; +@@ -135,68 +108,13 @@ + status = "okay"; + }; + +-&ohci0 { +- status = "okay"; +-}; +- +-&ohci1 { +- status = "okay"; +-}; +- + ®_ahci_5v { + status = "okay"; + }; + +-#include "axp209.dtsi" +- +-®_dcdc2 { +- regulator-always-on; +- regulator-min-microvolt = <1000000>; +- regulator-max-microvolt = <1450000>; +- regulator-name = "vdd-cpu"; +-}; +- +-®_dcdc3 { +- regulator-always-on; +- regulator-min-microvolt = <1000000>; +- regulator-max-microvolt = <1400000>; +- regulator-name = "vdd-int-dll"; +-}; +- +-®_ldo1 { +- regulator-name = "vdd-rtc"; +-}; +- +-®_ldo2 { +- regulator-always-on; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3000000>; +- regulator-name = "avcc"; +-}; +- +-®_usb1_vbus { +- status = "okay"; +-}; +- +-®_usb2_vbus { +- status = "okay"; +-}; +- + &spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins_a>, + <&spi0_cs0_pins_a>; + status = "okay"; + }; +- +-&uart0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; +- status = "okay"; +-}; +- +-&usbphy { +- usb1_vbus-supply = <®_usb1_vbus>; +- usb2_vbus-supply = <®_usb2_vbus>; +- status = "okay"; +-}; +--- a/arch/arm/dts/sun4i-a10-jesurun-q5.dts ++++ b/arch/arm/dts/sun4i-a10-jesurun-q5.dts +@@ -156,6 +156,10 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { + emac_power_pin_q5: emac_power_pin@0 { + allwinner,pins = "PH19"; +@@ -172,6 +176,11 @@ + }; + }; + ++®_usb0_vbus { ++ regulator-boot-on; ++ status = "okay"; ++}; ++ + ®_usb1_vbus { + status = "okay"; + }; +@@ -186,7 +195,13 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "host"; ++ status = "okay"; ++}; ++ + &usbphy { ++ usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun4i-a10-marsboard.dts ++++ b/arch/arm/dts/sun4i-a10-marsboard.dts +@@ -91,6 +91,10 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -154,6 +158,10 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { + led_pins_marsboard: led_pins@0 { + allwinner,pins = "PB5", "PB6", "PB7", "PB8"; +@@ -161,6 +169,13 @@ + allwinner,drive = ; + allwinner,pull = ; + }; ++ ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; + }; + + ®_usb1_vbus { +@@ -184,7 +199,15 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun4i-a10-mk802.dts ++++ b/arch/arm/dts/sun4i-a10-mk802.dts +@@ -44,6 +44,7 @@ + #include "sun4i-a10.dtsi" + #include "sunxi-common-regulators.dtsi" + #include ++#include + + / { + model = "MK802"; +@@ -58,6 +59,10 @@ + }; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -80,7 +85,25 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { ++ allwinner,pins = "PH5"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + usb2_vbus_pin_mk802: usb2_vbus_pin@0 { + allwinner,pins = "PH12"; + allwinner,function = "gpio_out"; +@@ -89,6 +112,10 @@ + }; + }; + ++®_usb0_vbus { ++ status = "okay"; ++}; ++ + ®_usb1_vbus { + status = "okay"; + }; +@@ -105,7 +132,17 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; ++ usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ ++ usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts ++++ b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts +@@ -124,6 +124,18 @@ + }; + }; + ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++ ++ eeprom: eeprom@50 { ++ compatible = "atmel,24c16"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; ++}; ++ + &mdio { + status = "okay"; + +--- a/arch/arm/dts/sun4i-a10-pcduino.dts ++++ b/arch/arm/dts/sun4i-a10-pcduino.dts +@@ -104,6 +104,10 @@ + }; + }; + ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -129,12 +133,8 @@ + status = "okay"; + + axp209: pmic@34 { +- compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; +- +- interrupt-controller; +- #interrupt-cells = <1>; + }; + }; + +@@ -164,6 +164,10 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { + led_pins_pcduino: led_pins@0 { + allwinner,pins = "PH15", "PH16"; +@@ -178,14 +182,40 @@ + allwinner,drive = ; + allwinner,pull = ; + }; ++ ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; + }; + +-®_usb1_vbus { +- status = "okay"; ++#include "axp209.dtsi" ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; + }; + +-®_usb2_vbus { +- status = "okay"; ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-int-dll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; + }; + + &uart0 { +@@ -194,8 +224,16 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ + &usbphy { +- usb1_vbus-supply = <®_usb1_vbus>; +- usb2_vbus-supply = <®_usb2_vbus>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb1_vbus-supply = <®_vcc5v0>; /* USB1 VBUS is always on */ ++ usb2_vbus-supply = <®_vcc5v0>; /* USB2 VBUS is always on */ + status = "okay"; + }; +--- /dev/null ++++ b/arch/arm/dts/sun4i-a10-pcduino2.dts +@@ -0,0 +1,78 @@ ++/* ++ * Copyright 2015 Siarhei Siamashka ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++/* ++ * The LinkSprite pcDuino2 board is almost identical to the older ++ * LinkSprite pcDuino1 board. The only software visible difference ++ * is that the pcDuino2 board got a USB VBUS voltage regulator, which ++ * is controlled by the PD2 pin (pulled-up by default). Also one of ++ * the USB host ports has been replaced with a USB WIFI chip. ++ */ ++ ++#include "sun4i-a10-pcduino.dts" ++ ++/ { ++ model = "LinkSprite pcDuino2"; ++ compatible = "linksprite,a10-pcduino2", "allwinner,sun4i-a10"; ++}; ++ ++&pio { ++ usb2_vbus_pin_pcduino2: usb2_vbus_pin@0 { ++ allwinner,pins = "PD2"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++®_usb2_vbus { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb2_vbus_pin_pcduino2>; ++ gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; ++ status = "okay"; ++}; ++ ++&usbphy { ++ usb1_vbus-supply = <®_vcc3v3>; /* USB WIFI is always on */ ++ usb2_vbus-supply = <®_usb2_vbus>; ++ status = "okay"; ++}; +--- a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts ++++ b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts +@@ -47,6 +47,7 @@ + #include + #include + #include ++#include + + / { + model = "Point of View Protab2-IPS9"; +@@ -56,11 +57,28 @@ + serial0 = &uart0; + }; + ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bl_en_pin_protab>; ++ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; ++ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; ++ default-brightness-level = <8>; ++ enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ ++ }; ++ + chosen { + stdout-path = "serial0:115200n8"; + }; + }; + ++&codec { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&codec_pa_pin>; ++ allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ ++ status = "okay"; ++}; ++ + &cpu0 { + cpu-supply = <®_dcdc2>; + }; +@@ -86,12 +104,36 @@ + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; + status = "okay"; ++ ++ /* Accelerometer */ ++ bma250@18 { ++ compatible = "bosch,bma250"; ++ reg = <0x18>; ++ interrupt-parent = <&pio>; ++ interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */ ++ }; + }; + + &i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; ++ ++ pixcir_ts@5c { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&touchscreen_pins>; ++ compatible = "pixcir,pixcir_tangoc"; ++ reg = <0x5c>; ++ interrupt-parent = <&pio>; ++ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ ++ attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */ ++ enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; ++ wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>; ++ touchscreen-size-x = <1024>; ++ touchscreen-size-y = <768>; ++ touchscreen-inverted-x; ++ touchscreen-inverted-y; ++ }; + }; + + &lradc { +@@ -128,6 +170,27 @@ + }; + + &pio { ++ bl_en_pin_protab: bl_en_pin@0 { ++ allwinner,pins = "PH7"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ codec_pa_pin: codec_pa_pin@0 { ++ allwinner,pins = "PH15"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ touchscreen_pins: touchscreen_pins@0 { ++ allwinner,pins = "PA5", "PB13"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + usb0_id_detect_pin: usb0_id_detect_pin@0 { + allwinner,pins = "PH4"; + allwinner,function = "gpio_in"; +@@ -143,6 +206,12 @@ + }; + }; + ++&pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm0_pins_a>; ++ status = "okay"; ++}; ++ + ®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; +--- a/arch/arm/dts/sun4i-a10.dtsi ++++ b/arch/arm/dts/sun4i-a10.dtsi +@@ -45,6 +45,7 @@ + + #include + ++#include + #include + #include + +@@ -65,7 +66,7 @@ + "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-hdmi"; + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, +- <&ahb_gates 44>; ++ <&ahb_gates 44>, <&dram_gates 26>; + status = "disabled"; + }; + +@@ -74,7 +75,8 @@ + "simple-framebuffer"; + allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi"; + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, +- <&ahb_gates 44>, <&ahb_gates 46>; ++ <&ahb_gates 44>, <&ahb_gates 46>, ++ <&dram_gates 25>, <&dram_gates 26>; + status = "disabled"; + }; + +@@ -83,7 +85,8 @@ + "simple-framebuffer"; + allwinner,pipeline = "de_fe0-de_be0-lcd0"; + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>, +- <&ahb_gates 46>; ++ <&ahb_gates 46>, <&dram_gates 25>, ++ <&dram_gates 26>; + status = "disabled"; + }; + +@@ -92,7 +95,8 @@ + "simple-framebuffer"; + allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0"; + clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, +- <&ahb_gates 44>, <&ahb_gates 46>; ++ <&ahb_gates 44>, <&ahb_gates 46>, ++ <&dram_gates 25>, <&dram_gates 26>; + status = "disabled"; + }; + }; +@@ -195,6 +199,15 @@ + clock-output-names = "pll1"; + }; + ++ pll2: clk@01c20008 { ++ #clock-cells = <1>; ++ compatible = "allwinner,sun4i-a10-pll2-clk"; ++ reg = <0x01c20008 0x8>; ++ clocks = <&osc24M>; ++ clock-output-names = "pll2-1x", "pll2-2x", ++ "pll2-4x", "pll2-8x"; ++ }; ++ + pll4: clk@01c20018 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-pll1-clk"; +@@ -241,6 +254,7 @@ + compatible = "allwinner,sun4i-a10-axi-gates-clk"; + reg = <0x01c2005c 0x4>; + clocks = <&axi>; ++ clock-indices = <0>; + clock-output-names = "axi_dram"; + }; + +@@ -257,17 +271,36 @@ + compatible = "allwinner,sun4i-a10-ahb-gates-clk"; + reg = <0x01c20060 0x8>; + clocks = <&ahb>; ++ clock-indices = <0>, <1>, ++ <2>, <3>, ++ <4>, <5>, <6>, ++ <7>, <8>, <9>, ++ <10>, <11>, <12>, ++ <13>, <14>, <16>, ++ <17>, <18>, <20>, ++ <21>, <22>, <23>, ++ <24>, <25>, <26>, ++ <32>, <33>, <34>, ++ <35>, <36>, <37>, ++ <40>, <41>, <43>, ++ <44>, <45>, ++ <46>, <47>, ++ <50>, <52>; + clock-output-names = "ahb_usb0", "ahb_ehci0", +- "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss", +- "ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1", +- "ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand", +- "ahb_sdram", "ahb_ace", "ahb_emac", "ahb_ts", +- "ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3", +- "ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve", +- "ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0", +- "ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi", +- "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0", +- "ahb_de_fe1", "ahb_mp", "ahb_mali400"; ++ "ahb_ohci0", "ahb_ehci1", ++ "ahb_ohci1", "ahb_ss", "ahb_dma", ++ "ahb_bist", "ahb_mmc0", "ahb_mmc1", ++ "ahb_mmc2", "ahb_mmc3", "ahb_ms", ++ "ahb_nand", "ahb_sdram", "ahb_ace", ++ "ahb_emac", "ahb_ts", "ahb_spi0", ++ "ahb_spi1", "ahb_spi2", "ahb_spi3", ++ "ahb_pata", "ahb_sata", "ahb_gps", ++ "ahb_ve", "ahb_tvd", "ahb_tve0", ++ "ahb_tve1", "ahb_lcd0", "ahb_lcd1", ++ "ahb_csi0", "ahb_csi1", "ahb_hdmi", ++ "ahb_de_be0", "ahb_de_be1", ++ "ahb_de_fe0", "ahb_de_fe1", ++ "ahb_mp", "ahb_mali400"; + }; + + apb0: apb0@01c20054 { +@@ -283,9 +316,14 @@ + compatible = "allwinner,sun4i-a10-apb0-gates-clk"; + reg = <0x01c20068 0x4>; + clocks = <&apb0>; ++ clock-indices = <0>, <1>, ++ <2>, <3>, ++ <5>, <6>, ++ <7>, <10>; + clock-output-names = "apb0_codec", "apb0_spdif", +- "apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0", +- "apb0_ir1", "apb0_keypad"; ++ "apb0_ac97", "apb0_iis", ++ "apb0_pio", "apb0_ir0", ++ "apb0_ir1", "apb0_keypad"; + }; + + apb1: clk@01c20058 { +@@ -301,12 +339,22 @@ + compatible = "allwinner,sun4i-a10-apb1-gates-clk"; + reg = <0x01c2006c 0x4>; + clocks = <&apb1>; ++ clock-indices = <0>, <1>, ++ <2>, <4>, ++ <5>, <6>, ++ <7>, <16>, ++ <17>, <18>, ++ <19>, <20>, ++ <21>, <22>, ++ <23>; + clock-output-names = "apb1_i2c0", "apb1_i2c1", +- "apb1_i2c2", "apb1_can", "apb1_scr", +- "apb1_ps20", "apb1_ps21", "apb1_uart0", +- "apb1_uart1", "apb1_uart2", "apb1_uart3", +- "apb1_uart4", "apb1_uart5", "apb1_uart6", +- "apb1_uart7"; ++ "apb1_i2c2", "apb1_can", ++ "apb1_scr", "apb1_ps20", ++ "apb1_ps21", "apb1_uart0", ++ "apb1_uart1", "apb1_uart2", ++ "apb1_uart3", "apb1_uart4", ++ "apb1_uart5", "apb1_uart6", ++ "apb1_uart7"; + }; + + nand_clk: clk@01c20080 { +@@ -446,6 +494,48 @@ + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; + clock-output-names = "spi3"; + }; ++ ++ dram_gates: clk@01c20100 { ++ #clock-cells = <1>; ++ compatible = "allwinner,sun4i-a10-dram-gates-clk"; ++ reg = <0x01c20100 0x4>; ++ clocks = <&pll5 0>; ++ clock-indices = <0>, ++ <1>, <2>, ++ <3>, ++ <4>, ++ <5>, <6>, ++ <15>, ++ <24>, <25>, ++ <26>, <27>, ++ <28>, <29>; ++ clock-output-names = "dram_ve", ++ "dram_csi0", "dram_csi1", ++ "dram_ts", ++ "dram_tvd", ++ "dram_tve0", "dram_tve1", ++ "dram_output", ++ "dram_de_fe1", "dram_de_fe0", ++ "dram_de_be0", "dram_de_be1", ++ "dram_de_mp", "dram_ace"; ++ }; ++ ++ ve_clk: clk@01c2013c { ++ #clock-cells = <0>; ++ #reset-cells = <0>; ++ compatible = "allwinner,sun4i-a10-ve-clk"; ++ reg = <0x01c2013c 0x4>; ++ clocks = <&pll4>; ++ clock-output-names = "ve"; ++ }; ++ ++ codec_clk: clk@01c20140 { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-codec-clk"; ++ reg = <0x01c20140 0x4>; ++ clocks = <&pll2 SUN4I_A10_PLL2_1X>; ++ clock-output-names = "codec"; ++ }; + }; + + soc@01c00000 { +@@ -656,6 +746,14 @@ + status = "disabled"; + }; + ++ crypto: crypto-engine@01c15000 { ++ compatible = "allwinner,sun4i-a10-crypto"; ++ reg = <0x01c15000 0x1000>; ++ interrupts = <86>; ++ clocks = <&ahb_gates 5>, <&ss_clk>; ++ clock-names = "ahb", "mod"; ++ }; ++ + spi2: spi@01c17000 { + compatible = "allwinner,sun4i-a10-spi"; + reg = <0x01c17000 0x1000>; +@@ -961,6 +1059,19 @@ + status = "disabled"; + }; + ++ codec: codec@01c22c00 { ++ #sound-dai-cells = <0>; ++ compatible = "allwinner,sun4i-a10-codec"; ++ reg = <0x01c22c00 0x40>; ++ interrupts = <30>; ++ clocks = <&apb0_gates 0>, <&codec_clk>; ++ clock-names = "apb", "codec"; ++ dmas = <&dma SUN4I_DMA_NORMAL 19>, ++ <&dma SUN4I_DMA_NORMAL 19>; ++ dma-names = "rx", "tx"; ++ status = "disabled"; ++ }; ++ + sid: eeprom@01c23800 { + compatible = "allwinner,sun4i-a10-sid"; + reg = <0x01c23800 0x10>; +--- a/arch/arm/dts/sun5i-a10s-auxtek-t004.dts ++++ b/arch/arm/dts/sun5i-a10s-auxtek-t004.dts +@@ -86,6 +86,20 @@ + status = "okay"; + }; + ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins_a>; ++ status = "okay"; ++ ++ axp152: pmic@30 { ++ compatible = "x-powers,axp152"; ++ reg = <0x30>; ++ interrupts = <0>; ++ interrupt-controller; ++ #interrupt-cells = <1>; ++ }; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_t004>; +--- a/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts ++++ b/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts +@@ -111,7 +111,7 @@ + status = "okay"; + + at24@50 { +- compatible = "at,24c16"; ++ compatible = "atmel,24c16"; + pagesize = <16>; + reg = <0x50>; + read-only; +--- a/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts ++++ b/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts +@@ -123,7 +123,7 @@ + + &mmc0 { + pinctrl-names = "default"; +- pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ +@@ -131,27 +131,12 @@ + status = "okay"; + }; + +-&mmc2 { +- pinctrl-names = "default"; +- pinctrl-0 = <&mmc2_pins_a>; +- vmmc-supply = <®_vcc3v3>; +- bus-width = <8>; +- non-removable; +- status = "okay"; +- +- mmccard: mmccard@0 { +- reg = <0>; +- compatible = "mmc-card"; +- broken-hpi; +- }; +-}; +- + &otg_sram { + status = "okay"; + }; + + &pio { +- mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 { ++ mmc0_cd_pin_d709: mmc0_cd_pin@0 { + allwinner,pins = "PG0"; + allwinner,function = "gpio_in"; + allwinner,drive = ; +--- a/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts ++++ b/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts +@@ -123,21 +123,6 @@ + status = "okay"; + }; + +-&mmc2 { +- pinctrl-names = "default"; +- pinctrl-0 = <&mmc2_pins_a>; +- vmmc-supply = <®_vcc3v3>; +- bus-width = <8>; +- non-removable; +- status = "okay"; +- +- mmccard: mmccard@0 { +- reg = <0>; +- compatible = "mmc-card"; +- broken-hpi; +- }; +-}; +- + &otg_sram { + status = "okay"; + }; +@@ -201,11 +186,6 @@ + status = "okay"; + }; + +-®_usb1_vbus { +- gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ +- status = "okay"; +-}; +- + &uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins_b>; +@@ -221,16 +201,12 @@ + allwinner,pins = "PG12"; + }; + +-&usb1_vbus_pin_a { +- allwinner,pins = "PG11"; +-}; +- + &usbphy { + pinctrl-names = "default"; + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; + usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ + usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ + usb0_vbus-supply = <®_usb0_vbus>; +- usb1_vbus-supply = <®_usb1_vbus>; ++ usb1_vbus-supply = <®_ldo3>; + status = "okay"; + }; +--- a/arch/arm/dts/sun5i-a13-utoo-p66.dts ++++ b/arch/arm/dts/sun5i-a13-utoo-p66.dts +@@ -47,11 +47,21 @@ + #include + #include + #include ++#include + + / { + model = "Utoo P66"; + compatible = "utoo,p66", "allwinner,sun5i-a13"; + ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; ++ /* Note levels of 10 / 20% result in backlight off */ ++ brightness-levels = <0 30 40 50 60 70 80 90 100>; ++ default-brightness-level = <6>; ++ /* TODO: backlight uses axp gpio1 as enable pin */ ++ }; ++ + i2c_lcd: i2c@0 { + /* The lcd panel i2c interface is hooked up via gpios */ + compatible = "i2c-gpio"; +@@ -63,6 +73,13 @@ + }; + }; + ++&codec { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&codec_pa_pin>; ++ allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */ ++ status = "okay"; ++}; ++ + &cpu0 { + cpu-supply = <®_dcdc2>; + }; +@@ -158,6 +175,13 @@ + }; + + &pio { ++ codec_pa_pin: codec_pa_pin@0 { ++ allwinner,pins = "PG3"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + mmc0_cd_pin_p66: mmc0_cd_pin@0 { + allwinner,pins = "PG0"; + allwinner,function = "gpio_in"; +@@ -201,6 +225,12 @@ + }; + }; + ++&pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm0_pins>; ++ status = "okay"; ++}; ++ + ®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; +--- a/arch/arm/dts/sun5i-q8-common.dtsi ++++ b/arch/arm/dts/sun5i-q8-common.dtsi +@@ -41,11 +41,21 @@ + */ + #include "sunxi-q8-common.dtsi" + ++#include ++ + / { + aliases { + serial0 = &uart1; + }; + ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; ++ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; ++ default-brightness-level = <8>; ++ /* TODO: backlight uses axp gpio1 as enable pin */ ++ }; ++ + chosen { + stdout-path = "serial0:115200n8"; + }; +--- a/arch/arm/dts/sun5i-r8-chip.dts ++++ b/arch/arm/dts/sun5i-r8-chip.dts +@@ -64,6 +64,26 @@ + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ wifi_reg_on: wifi_reg_on { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&chip_wifi_reg_on_pin>; ++ ++ regulator-name = "wifi-reg-on"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */ ++ enable-active-high; ++ }; ++}; ++ ++&codec { ++ status = "okay"; ++}; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc2>; + }; + + &ehci0 { +@@ -109,10 +129,14 @@ + }; + }; + ++&mmc0_pins_a { ++ allwinner,pull = ; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>; +- vmmc-supply = <®_vcc3v3>; ++ vmmc-supply = <&wifi_reg_on>; + bus-width = <4>; + non-removable; + status = "okay"; +@@ -134,6 +158,13 @@ + allwinner,pull = ; + }; + ++ chip_wifi_reg_on_pin: chip_wifi_reg_on_pin@0 { ++ allwinner,pins = "PC19"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + chip_id_det_pin: chip_id_det_pin@0 { + allwinner,pins = "PG2"; + allwinner,function = "gpio_in"; +@@ -167,6 +198,20 @@ + regulator-always-on; + }; + ++®_ldo3 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vdd-wifi1"; ++ regulator-always-on; ++}; ++ ++®_ldo4 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vdd-wifi2"; ++ regulator-always-on; ++}; ++ + ®_ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; +--- a/arch/arm/dts/sun5i.dtsi ++++ b/arch/arm/dts/sun5i.dtsi +@@ -44,6 +44,7 @@ + + #include "skeleton.dtsi" + ++#include + #include + #include + +@@ -102,6 +103,15 @@ + clock-output-names = "pll1"; + }; + ++ pll2: clk@01c20008 { ++ #clock-cells = <1>; ++ compatible = "allwinner,sun5i-a13-pll2-clk"; ++ reg = <0x01c20008 0x8>; ++ clocks = <&osc24M>; ++ clock-output-names = "pll2-1x", "pll2-2x", ++ "pll2-4x", "pll2-8x"; ++ }; ++ + pll4: clk@01c20018 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-pll1-clk"; +@@ -285,6 +295,14 @@ + clock-output-names = "usb_ohci0", "usb_phy"; + }; + ++ codec_clk: clk@01c20140 { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-codec-clk"; ++ reg = <0x01c20140 0x4>; ++ clocks = <&pll2 SUN4I_A10_PLL2_1X>; ++ clock-output-names = "codec"; ++ }; ++ + mbus_clk: clk@01c2015c { + #clock-cells = <0>; + compatible = "allwinner,sun5i-a13-mbus-clk"; +@@ -571,6 +589,19 @@ + status = "disabled"; + }; + ++ codec: codec@01c22c00 { ++ #sound-dai-cells = <0>; ++ compatible = "allwinner,sun4i-a10-codec"; ++ reg = <0x01c22c00 0x40>; ++ interrupts = <30>; ++ clocks = <&apb0_gates 0>, <&codec_clk>; ++ clock-names = "apb", "codec"; ++ dmas = <&dma SUN4I_DMA_NORMAL 19>, ++ <&dma SUN4I_DMA_NORMAL 19>; ++ dma-names = "rx", "tx"; ++ status = "disabled"; ++ }; ++ + sid: eeprom@01c23800 { + compatible = "allwinner,sun4i-a10-sid"; + reg = <0x01c23800 0x10>; +--- a/arch/arm/dts/sun6i-a31-colombus.dts ++++ b/arch/arm/dts/sun6i-a31-colombus.dts +@@ -60,6 +60,16 @@ + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ i2c_lcd: i2c@0 { ++ /* The lcd panel i2c interface is hooked up via gpios */ ++ compatible = "i2c-gpio"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c_lcd_pins>; ++ gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>, /* PA23, sda */ ++ <&pio 0 24 GPIO_ACTIVE_HIGH>; /* PA24, scl */ ++ i2c-gpio,delay-us = <5>; ++ }; + }; + + &ehci1 { +@@ -94,6 +104,13 @@ + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; ++ ++ mma8452: mma8452@1d { ++ compatible = "fsl,mma8452"; ++ reg = <0x1d>; ++ interrupt-parent = <&pio>; ++ interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PA9 */ ++ }; + }; + + &mmc0 { +@@ -124,6 +141,13 @@ + allwinner,drive = ; + allwinner,pull = ; + }; ++ ++ i2c_lcd_pins: i2c_lcd_pin@0 { ++ allwinner,pins = "PA23", "PA24"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; + }; + + ®_usb2_vbus { +--- a/arch/arm/dts/sun6i-a31-hummingbird.dts ++++ b/arch/arm/dts/sun6i-a31-hummingbird.dts +@@ -54,6 +54,8 @@ + compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31"; + + aliases { ++ rtc0 = &pcf8563; ++ rtc1 = &rtc; + serial0 = &uart0; + }; + +@@ -67,13 +69,17 @@ + }; + }; + ++&cpu0 { ++ cpu-supply = <®_dcdc3>; ++}; ++ + &ehci0 { + status = "okay"; + }; + + &gmac { + pinctrl-names = "default"; +- pinctrl-0 = <&gmac_pins_rgmii_a>; ++ pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>; + phy = <&phy1>; + phy-mode = "rgmii"; + snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; +@@ -119,7 +125,7 @@ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>; +- vmmc-supply = <&vcc_3v0>; ++ vmmc-supply = <®_dcdc1>; + bus-width = <4>; + cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ + cd-inverted; +@@ -134,7 +140,7 @@ + &mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>; +- vmmc-supply = <&vcc_wifi>; ++ vmmc-supply = <®_aldo1>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; +@@ -146,6 +152,13 @@ + }; + + &pio { ++ gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin@0 { ++ allwinner,pins = "PA21"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 { + allwinner,pins = "PA8"; + allwinner,function = "gpio_in"; +@@ -164,70 +177,69 @@ + &p2wi { + status = "okay"; + +- axp221: pmic@68 { ++ axp22x: pmic@68 { + compatible = "x-powers,axp221"; + reg = <0x68>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; +- interrupt-controller; +- #interrupt-cells = <1>; +- dcdc1-supply = <&vcc_3v0>; +- dcdc5-supply = <&vcc_dram>; +- +- regulators { +- x-powers,dcdc-freq = <3000>; +- +- vcc_3v0: dcdc1 { +- regulator-always-on; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3000000>; +- regulator-name = "vcc-3v0"; +- }; +- +- vdd_cpu: dcdc2 { +- regulator-always-on; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1320000>; +- regulator-name = "vdd-cpu"; +- }; +- +- vdd_gpu: dcdc3 { +- regulator-always-on; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1320000>; +- regulator-name = "vdd-gpu"; +- }; +- +- vdd_sys_dll: dcdc4 { +- regulator-always-on; +- regulator-min-microvolt = <1100000>; +- regulator-max-microvolt = <1100000>; +- regulator-name = "vdd-sys-dll"; +- }; +- +- vcc_dram: dcdc5 { +- regulator-always-on; +- regulator-min-microvolt = <1500000>; +- regulator-max-microvolt = <1500000>; +- regulator-name = "vcc-dram"; +- }; +- +- vcc_wifi: aldo1 { +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- regulator-name = "vcc_wifi"; +- }; +- +- avcc: aldo3 { +- regulator-always-on; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3000000>; +- regulator-name = "avcc"; +- }; +- }; + }; + }; + ++#include "axp22x.dtsi" ++ ++®_aldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi"; ++}; ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "avcc"; ++}; ++ ++®_dc5ldo { ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-3v0"; ++}; ++ ++®_dcdc2 { ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-gpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc4 { ++ regulator-always-on; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-sys-dll"; ++}; ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ + ®_usb1_vbus { + gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */ + status = "okay"; +--- a/arch/arm/dts/sun6i-a31.dtsi ++++ b/arch/arm/dts/sun6i-a31.dtsi +@@ -61,7 +61,7 @@ + #size-cells = <1>; + ranges; + +- framebuffer@0 { ++ simplefb_hdmi: framebuffer@0 { + compatible = "allwinner,simple-framebuffer", + "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-hdmi"; +@@ -69,7 +69,7 @@ + status = "disabled"; + }; + +- framebuffer@1 { ++ simplefb_lcd: framebuffer@1 { + compatible = "allwinner,simple-framebuffer", + "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0"; +@@ -252,6 +252,20 @@ + compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; + reg = <0x01c20060 0x8>; + clocks = <&ahb1>; ++ clock-indices = <1>, <5>, ++ <6>, <8>, <9>, ++ <10>, <11>, <12>, ++ <13>, <14>, ++ <17>, <18>, <19>, ++ <20>, <21>, <22>, ++ <23>, <24>, <26>, ++ <27>, <29>, ++ <30>, <31>, <32>, ++ <36>, <37>, <40>, ++ <43>, <44>, <45>, ++ <46>, <47>, <50>, ++ <52>, <55>, <56>, ++ <57>, <58>; + clock-output-names = "ahb1_mipidsi", "ahb1_ss", + "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1", + "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1", +@@ -281,6 +295,9 @@ + compatible = "allwinner,sun6i-a31-apb1-gates-clk"; + reg = <0x01c20068 0x4>; + clocks = <&apb1>; ++ clock-indices = <0>, <4>, ++ <5>, <12>, ++ <13>; + clock-output-names = "apb1_codec", "apb1_digital_mic", + "apb1_pio", "apb1_daudio0", + "apb1_daudio1"; +@@ -299,6 +316,10 @@ + compatible = "allwinner,sun6i-a31-apb2-gates-clk"; + reg = <0x01c2006c 0x4>; + clocks = <&apb2>; ++ clock-indices = <0>, <1>, ++ <2>, <3>, <16>, ++ <17>, <18>, <19>, ++ <20>, <21>; + clock-output-names = "apb2_i2c0", "apb2_i2c1", + "apb2_i2c2", "apb2_i2c3", + "apb2_uart0", "apb2_uart1", +@@ -346,6 +367,14 @@ + "mmc3_sample"; + }; + ++ ss_clk: clk@01c2009c { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ reg = <0x01c2009c 0x4>; ++ clocks = <&osc24M>, <&pll6 0>; ++ clock-output-names = "ss"; ++ }; ++ + spi0_clk: clk@01c200a0 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; +@@ -384,6 +413,9 @@ + compatible = "allwinner,sun6i-a31-usb-clk"; + reg = <0x01c200cc 0x4>; + clocks = <&osc24M>; ++ clock-indices = <8>, <9>, <10>, ++ <16>, <17>, ++ <18>; + clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2", + "usb_ohci0", "usb_ohci1", + "usb_ohci2"; +@@ -684,6 +716,16 @@ + allwinner,pull = ; + }; + ++ mmc3_8bit_emmc_pins: mmc3@1 { ++ allwinner,pins = "PC6", "PC7", "PC8", "PC9", ++ "PC10", "PC11", "PC12", ++ "PC13", "PC14", "PC15", ++ "PC24"; ++ allwinner,function = "mmc3"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + gmac_pins_mii_a: gmac_mii@0 { + allwinner,pins = "PA0", "PA1", "PA2", "PA3", + "PA8", "PA9", "PA11", +@@ -761,6 +803,13 @@ + reg = <0x01c20ca0 0x20>; + }; + ++ lradc: lradc@01c22800 { ++ compatible = "allwinner,sun4i-a10-lradc-keys"; ++ reg = <0x01c22800 0x100>; ++ interrupts = ; ++ status = "disabled"; ++ }; ++ + rtp: rtp@01c25000 { + compatible = "allwinner,sun6i-a31-ts"; + reg = <0x01c25000 0x100>; +@@ -907,6 +956,16 @@ + #size-cells = <0>; + }; + ++ crypto: crypto-engine@01c15000 { ++ compatible = "allwinner,sun4i-a10-crypto"; ++ reg = <0x01c15000 0x1000>; ++ interrupts = ; ++ clocks = <&ahb1_gates 5>, <&ss_clk>; ++ clock-names = "ahb", "mod"; ++ resets = <&ahb1_rst 5>; ++ reset-names = "ahb"; ++ }; ++ + timer@01c60000 { + compatible = "allwinner,sun6i-a31-hstimer", + "allwinner,sun7i-a20-hstimer"; +@@ -1068,7 +1127,7 @@ + resets = <&apb0_rst 0>; + gpio-controller; + interrupt-controller; +- #interrupt-cells = <2>; ++ #interrupt-cells = <3>; + #size-cells = <0>; + #gpio-cells = <3>; + +--- a/arch/arm/dts/sun6i-a31s-primo81.dts ++++ b/arch/arm/dts/sun6i-a31s-primo81.dts +@@ -1,16 +1,57 @@ + /* +- * Copyright 2015 Hans de Goede ++ * Copyright 2014 Siarhei Siamashka ++ * Copyright 2015 Karsten Merker ++ * Copyright 2015 Chen-Yu Tsai + * +- * Minimal dts file for the MSI Primo81 for u-boot only ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. + * +- * SPDX-License-Identifier: GPL-2.0+ or X11 ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. + */ + + /dts-v1/; + #include "sun6i-a31s.dtsi" ++#include "sunxi-common-regulators.dtsi" ++ ++#include ++#include ++#include + + / { +- model = "MSI Primo81"; ++ model = "MSI Primo81 tablet"; + compatible = "msi,primo81", "allwinner,sun6i-a31s"; + + aliases { +@@ -22,8 +63,202 @@ + }; + }; + +-&uart0 { ++&cpu0 { ++ cpu-supply = <®_dcdc3>; ++}; ++ ++&ehci0 { ++ /* rtl8188etv wifi is connected here */ ++ status = "okay"; ++}; ++ ++&i2c0 { ++ /* pull-ups and device VDDIO use AXP221 DLDO3 */ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins_a>; ++ status = "failed"; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++ ++ ctp@5d { ++ pinctrl-names = "default"; ++ pinctrl-0 = <>911_int_primo81>; ++ compatible = "goodix,gt911"; ++ reg = <0x5d>; ++ interrupt-parent = <&pio>; ++ interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */ ++ touchscreen-swapped-x-y; ++ }; ++}; ++ ++&i2c2 { + pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++ pinctrl-0 = <&i2c2_pins_a>; ++ status = "okay"; ++ ++ accelerometer@1c { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mma8452_int_primo81>; ++ compatible = "fsl,mma8452"; ++ reg = <0x1c>; ++ interrupt-parent = <&pio>; ++ interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */ ++ #io-channel-cells = <1>; ++ }; ++}; ++ ++&lradc { ++ vref-supply = <®_aldo3>; ++ status = "okay"; ++ ++ button@158 { ++ label = "Volume Up"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <158730>; ++ }; ++ ++ button@349 { ++ label = "Volume Down"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <349206>; ++ }; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>; ++ vmmc-supply = <®_dcdc1>; ++ bus-width = <4>; ++ cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ ++ cd-inverted; ++ status = "okay"; ++}; ++ ++&pio { ++ gt911_int_primo81: gt911_int_pin@0 { ++ allwinner,pins = "PA3"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ mma8452_int_primo81: mma8452_int_pin@0 { ++ allwinner,pins = "PA9"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ mmc0_cd_pin_primo81: mmc0_cd_pin@0 { ++ allwinner,pins = "PA8"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++&p2wi { ++ status = "okay"; ++ ++ axp22x: pmic@68 { ++ compatible = "x-powers,axp221"; ++ reg = <0x68>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++#include "axp22x.dtsi" ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "avcc"; ++}; ++ ++®_dc1sw { ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-lcd"; ++}; ++ ++®_dc5ldo { ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-cpus"; /* This is an educated guess */ ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-3v0"; ++}; ++ ++®_dcdc2 { ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-gpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc4 { ++ regulator-always-on; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-sys-dll"; ++}; ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_dldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi"; ++}; ++ ++®_dldo3 { ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "vddio-csi"; ++}; ++ ++®_eldo3 { ++ regulator-min-microvolt = <1080000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-mipi-bridge"; ++}; ++ ++&simplefb_lcd { ++ vcc-lcd-supply = <®_dc1sw>; ++ vdd-mipi-bridge-supply = <®_eldo3>; ++}; ++ ++&usb_otg { ++ /* otg support requires support for AXP221 usb-power-supply and GPIO */ ++ dr_mode = "host"; ++ status = "okay"; ++}; ++ ++&usbphy { ++ usb1_vbus-supply = <®_dldo1>; + status = "okay"; + }; +--- /dev/null ++++ b/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi +@@ -0,0 +1,142 @@ ++/* ++ * Copyright 2015 Chen-Yu Tsai ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++/dts-v1/; ++#include "sun6i-a31s.dtsi" ++#include "sunxi-common-regulators.dtsi" ++ ++#include ++#include ++ ++/ { ++ model = "Sinlinx SinA31s Core Board"; ++ compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++}; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc3>; ++}; ++ ++/* eMMC on core board */ ++&mmc3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_8bit_emmc_pins>; ++ vmmc-supply = <®_dcdc1>; ++ vqmmc-supply = <®_dcdc1>; ++ bus-width = <8>; ++ non-removable; ++ cap-mmc-hw-reset; ++ status = "okay"; ++}; ++ ++/* AXP221s PMIC on core board */ ++&p2wi { ++ status = "okay"; ++ ++ axp22x: pmic@68 { ++ compatible = "x-powers,axp221"; ++ reg = <0x68>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++#include "axp22x.dtsi" ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "avcc"; ++}; ++ ++®_dc5ldo { ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-3v0"; ++}; ++ ++®_dcdc2 { ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-gpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc4 { ++ regulator-always-on; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-sys-dll"; ++}; ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++/* UART0 pads available on core board */ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++}; ++ +--- /dev/null ++++ b/arch/arm/dts/sun6i-a31s-sina31s.dts +@@ -0,0 +1,153 @@ ++/* ++ * Copyright 2015 Chen-Yu Tsai ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++/* The SinA31s development board has the SinA31s core board soldered on */ ++#include "sun6i-a31s-sina31s-core.dtsi" ++ ++#include ++ ++/ { ++ model = "Sinlinx SinA31s Development Board"; ++ compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s"; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&led_pin_sina31s>; ++ ++ status { ++ label = "sina31s:status:usr"; ++ gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */ ++ }; ++ }; ++}; ++ ++&ehci0 { ++ /* USB 2.0 4 port hub IC */ ++ status = "okay"; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&gmac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac_pins_mii_a>; ++ phy = <&phy1>; ++ phy-mode = "mii"; ++ phy-supply = <®_dldo1>; ++ status = "okay"; ++ ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ ++&ir { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ir_pins_a>; ++ status = "okay"; ++}; ++ ++&lradc { ++ vref-supply = <®_aldo3>; ++ status = "okay"; ++ ++ button@158 { ++ label = "Volume Up"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <158730>; ++ }; ++ ++ button@349 { ++ label = "Volume Down"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <349206>; ++ }; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>; ++ vmmc-supply = <®_dcdc1>; ++ bus-width = <4>; ++ cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */ ++ cd-inverted; ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++&pio { ++ led_pin_sina31s: led_pin@0 { ++ allwinner,pins = "PH13"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ mmc0_cd_pin_sina31s: mmc0_cd_pin@0 { ++ allwinner,pins = "PA4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++®_dldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-gmac-phy"; ++}; ++ ++&usbphy { ++ status = "okay"; ++}; +--- /dev/null ++++ b/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts +@@ -0,0 +1,205 @@ ++/* ++ * Copyright 2015 Lawrence Yu ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++/dts-v1/; ++#include "sun6i-a31s.dtsi" ++#include "sunxi-common-regulators.dtsi" ++ ++#include ++#include ++ ++/ { ++ model = "Yones TopTech BS1078 v2 Tablet"; ++ compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s"; ++ ++ aliases { ++ serial0 = &uart0; ++ i2c1 = &i2c1; ++ i2c2 = &i2c2; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++}; ++ ++&i2c2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins_a>; ++ status = "okay"; ++}; ++ ++&ehci0 { ++ status = "okay"; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&ohci0 { ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++&pio { ++ mmc0_cd_pin_bs1078v2: mmc0_cd_pin@0 { ++ allwinner,pins = "PA8"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bs1078v2>; ++ vmmc-supply = <®_vcc3v0>; ++ bus-width = <4>; ++ cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ ++ cd-inverted; ++ status = "okay"; ++}; ++ ++&mmc0_pins_a { ++ allwinner,pull = ; ++}; ++ ++&p2wi { ++ status = "okay"; ++ ++ axp22x: pmic@68 { ++ compatible = "x-powers,axp221"; ++ reg = <0x68>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++#include "axp22x.dtsi" ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "avcc"; ++}; ++ ++®_dc1sw { ++ regulator-name = "vcc-lcd-usb2"; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++}; ++ ++®_dc5ldo { ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-3v0"; ++}; ++ ++®_dcdc2 { ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-gpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc4 { ++ regulator-always-on; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1320000>; ++ regulator-name = "vdd-sys-dll"; ++}; ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_dldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi"; ++}; ++ ++/* Voltage source for I2C pullup resistors for I2C Bus 0 */ ++®_dldo3 { ++ regulator-min-microvolt = <2800000>; ++ regulator-max-microvolt = <2800000>; ++ regulator-name = "vddio-csi"; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++}; ++ ++&usbphy { ++ usb1_vbus-supply = <®_dldo1>; ++ usb2_vbus-supply = <®_dc1sw>; ++ status = "okay"; ++}; +--- a/arch/arm/dts/sun7i-a20-bananapi.dts ++++ b/arch/arm/dts/sun7i-a20-bananapi.dts +@@ -92,6 +92,24 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++ operating-points = < ++ /* kHz uV */ ++ 960000 1400000 ++ 912000 1400000 ++ 864000 1350000 ++ 720000 1250000 ++ 528000 1150000 ++ 312000 1100000 ++ 144000 1050000 ++ >; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -119,13 +137,9 @@ + status = "okay"; + + axp209: pmic@34 { +- compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; +- +- interrupt-controller; +- #interrupt-cells = <1>; + }; + }; + +@@ -159,7 +173,18 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + mmc0_cd_pin_bananapi: mmc0_cd_pin@0 { + allwinner,pins = "PH10"; + allwinner,function = "gpio_in"; +@@ -182,6 +207,37 @@ + }; + }; + ++#include "axp209.dtsi" ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-int-dll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; ++}; ++ ++®_usb0_vbus { ++ status = "okay"; ++}; ++ + ®_usb1_vbus { + status = "okay"; + }; +@@ -216,7 +272,21 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usb_power_supply { ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_power-supply = <&usb_power_supply>; ++ usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun7i-a20-cubieboard2.dts ++++ b/arch/arm/dts/sun7i-a20-cubieboard2.dts +@@ -84,6 +84,10 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &cpu0 { + cpu-supply = <®_dcdc2>; + }; +@@ -150,6 +154,10 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { + led_pins_cubieboard2: led_pins@0 { + allwinner,pins = "PH20", "PH21"; +@@ -157,12 +165,24 @@ + allwinner,drive = ; + allwinner,pull = ; + }; ++ ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; + }; + + ®_ahci_5v { + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ + #include "axp209.dtsi" + + ®_dcdc2 { +@@ -205,6 +225,9 @@ + }; + + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun7i-a20-cubietruck.dts ++++ b/arch/arm/dts/sun7i-a20-cubietruck.dts +@@ -101,6 +101,10 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &cpu0 { + cpu-supply = <®_dcdc2>; + }; +--- /dev/null ++++ b/arch/arm/dts/sun7i-a20-icnova-swac.dts +@@ -0,0 +1,169 @@ ++/* ++ * Copyright 2015 Stefan Roese ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++/dts-v1/; ++#include "sun7i-a20.dtsi" ++#include "sunxi-common-regulators.dtsi" ++ ++#include ++#include ++#include ++ ++/ { ++ model = "ICnova-A20 SWAC"; ++ compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++}; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++}; ++ ++&ehci0 { ++ status = "okay"; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&gmac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac_pins_mii_a>; ++ phy = <&phy1>; ++ phy-mode = "mii"; ++ status = "okay"; ++ ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins_a>; ++ status = "okay"; ++ ++ axp209: pmic@34 { ++ reg = <0x34>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; ++ vmmc-supply = <®_vcc3v3>; ++ bus-width = <4>; ++ cd-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; /* PI5 */ ++ cd-inverted; ++ status = "okay"; ++}; ++ ++&ohci0 { ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++#include "axp209.dtsi" ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-int-dll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; ++}; ++ ++®_usb1_vbus { ++ status = "okay"; ++}; ++ ++®_usb2_vbus { ++ status = "okay"; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++}; ++ ++&usbphy { ++ usb1_vbus-supply = <®_usb1_vbus>; ++ usb2_vbus-supply = <®_usb2_vbus>; ++ status = "okay"; ++}; +--- /dev/null ++++ b/arch/arm/dts/sun7i-a20-itead-ibox.dts +@@ -0,0 +1,125 @@ ++/* ++ * Copyright 2015 - Marcus Cooper ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++/dts-v1/; ++#include "sun7i-a20.dtsi" ++#include "sunxi-itead-core-common.dtsi" ++ ++/ { ++ model = "Itead Ibox A20"; ++ compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20"; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&led_pins_itead_core>; ++ ++ green { ++ label = "itead_core:green:usr"; ++ gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ ++ blue { ++ label = "itead_core:blue:usr"; ++ gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ }; ++}; ++ ++&ahci { ++ target-supply = <®_ahci_5v>; ++ status = "okay"; ++}; ++ ++&codec { ++ status = "okay"; ++}; ++ ++&gmac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac_pins_mii_a>; ++ phy = <&phy1>; ++ phy-mode = "mii"; ++ status = "okay"; ++ ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ ++&i2c0 { ++ axp209: pmic@34 { ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++&ir0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ir0_rx_pins_a>; ++ status = "okay"; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; ++ vmmc-supply = <®_vcc3v3>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++}; ++ ++&pio { ++ led_pins_itead_core: led_pins@0 { ++ allwinner,pins = "PH20","PH21"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++®_ahci_5v { ++ status = "okay"; ++}; +--- a/arch/arm/dts/sun7i-a20-lamobo-r1.dts ++++ b/arch/arm/dts/sun7i-a20-lamobo-r1.dts +@@ -97,16 +97,6 @@ + + &cpu0 { + cpu-supply = <®_dcdc2>; +- operating-points = < +- /* kHz uV */ +- 960000 1400000 +- 912000 1400000 +- 864000 1350000 +- 720000 1250000 +- 528000 1150000 +- 312000 1100000 +- 144000 1050000 +- >; + }; + + &ehci0 { +--- a/arch/arm/dts/sun7i-a20-mk808c.dts ++++ b/arch/arm/dts/sun7i-a20-mk808c.dts +@@ -53,6 +53,7 @@ + + #include + #include ++#include + + / { + model = "mk808c"; +@@ -68,6 +69,10 @@ + }; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -121,6 +126,30 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ ++&pio { ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { ++ allwinner,pins = "PH5"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++®_usb0_vbus { ++ status = "okay"; ++}; ++ + ®_usb1_vbus { + status = "okay"; + }; +@@ -141,7 +170,17 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; ++ usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ ++ usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts ++++ b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts +@@ -1,5 +1,6 @@ + /* + * Copyright 2015 - Marcus Cooper ++ * Copyright 2015 - Karsten Merker + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual +@@ -45,6 +46,7 @@ + #include "sunxi-common-regulators.dtsi" + + #include ++#include + #include + #include + +@@ -71,14 +73,6 @@ + default-state = "on"; + }; + }; +- +- reg_axp_ipsout: axp_ipsout { +- compatible = "regulator-fixed"; +- regulator-name = "axp-ipsout"; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- regulator-always-on; +- }; + }; + + &ahci { +@@ -94,6 +88,10 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_pins_rgmii_a>; +@@ -118,10 +116,58 @@ + }; + }; + +-&i2c1 { +- pinctrl-names = "default"; +- pinctrl-0 = <&i2c1_pins_a>; ++&lradc { ++ vref-supply = <®_vcc3v0>; + status = "okay"; ++ ++ button@190 { ++ label = "Volume Up"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <190000>; ++ }; ++ ++ button@390 { ++ label = "Volume Down"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <390000>; ++ }; ++ ++ button@600 { ++ label = "Menu"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <600000>; ++ }; ++ ++ button@800 { ++ label = "Search"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <800000>; ++ }; ++ ++ button@980 { ++ label = "Home"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <980000>; ++ }; ++ ++ button@1180 { ++ label = "Esc"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <1180000>; ++ }; ++ ++ button@1400 { ++ label = "Enter"; ++ linux,code = ; ++ channel = <0>; ++ voltage = <1400000>; ++ }; + }; + + &mmc0 { +@@ -134,6 +180,16 @@ + status = "okay"; + }; + ++&mmc3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>; ++ vmmc-supply = <®_vcc3v3>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */ ++ cd-inverted; ++ status = "okay"; ++}; ++ + &ohci0 { + status = "okay"; + }; +@@ -161,15 +217,22 @@ + allwinner,pull = ; + }; + ++ mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 { ++ allwinner,pins = "PH0"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + usb0_id_detect_pin: usb0_id_detect_pin@0 { +- allwinner,pins = "PH04"; ++ allwinner,pins = "PH4"; + allwinner,function = "gpio_in"; + allwinner,drive = ; + allwinner,pull = ; + }; + + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { +- allwinner,pins = "PH05"; ++ allwinner,pins = "PH5"; + allwinner,function = "gpio_in"; + allwinner,drive = ; + allwinner,pull = ; +@@ -187,7 +250,7 @@ + ®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; +- regulator-max-microvolt = <1425000>; ++ regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpu"; + }; + +@@ -235,8 +298,8 @@ + &usbphy { + pinctrl-names = "default"; + pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; +- usb0_id_det-gpios = <&pio 7 04 GPIO_ACTIVE_HIGH>; /* PH04 */ +- usb0_vbus_det-gpios = <&pio 7 05 GPIO_ACTIVE_HIGH>; /* PH05 */ ++ usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */ ++ usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */ + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +--- a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts ++++ b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts +@@ -117,6 +117,18 @@ + }; + }; + ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++ ++ eeprom: eeprom@50 { ++ compatible = "atmel,24c16"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; +--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts ++++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts +@@ -170,6 +170,12 @@ + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; + status = "okay"; ++ ++ eeprom: eeprom@50 { ++ compatible = "atmel,24c16"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; + }; + + &mmc0 { +@@ -190,6 +196,10 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { + ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { + allwinner,pins = "PC3"; +@@ -204,6 +214,27 @@ + allwinner,drive = ; + allwinner,pull = ; + }; ++ ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { ++ allwinner,pins = "PH5"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ usb0_vbus_pin_lime2: usb0_vbus_pin@0 { ++ allwinner,pins = "PC17"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; + }; + + ®_ahci_5v { +@@ -212,6 +243,12 @@ + status = "okay"; + }; + ++®_usb0_vbus { ++ pinctrl-0 = <&usb0_vbus_pin_lime2>; ++ gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>; ++ status = "okay"; ++}; ++ + ®_usb1_vbus { + status = "okay"; + }; +@@ -226,7 +263,17 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ ++ usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts ++++ b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts +@@ -125,6 +125,12 @@ + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; + status = "okay"; ++ ++ eeprom: eeprom@50 { ++ compatible = "atmel,24c16"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; + }; + + &i2c2 { +--- a/arch/arm/dts/sun7i-a20-orangepi-mini.dts ++++ b/arch/arm/dts/sun7i-a20-orangepi-mini.dts +@@ -95,6 +95,10 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -156,7 +160,18 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + mmc0_cd_pin_orangepi: mmc0_cd_pin@0 { + allwinner,pins = "PH10"; + allwinner,function = "gpio_in"; +@@ -225,6 +240,10 @@ + regulator-name = "avcc"; + }; + ++®_usb0_vbus { ++ status = "okay"; ++}; ++ + ®_usb1_vbus { + pinctrl-0 = <&usb1_vbus_pin_bananapro>; + gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */ +@@ -243,7 +262,21 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usb_power_supply { ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_power-supply = <&usb_power_supply>; ++ usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun7i-a20-orangepi.dts ++++ b/arch/arm/dts/sun7i-a20-orangepi.dts +@@ -141,7 +141,18 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + mmc0_cd_pin_orangepi: mmc0_cd_pin@0 { + allwinner,pins = "PH10"; + allwinner,function = "gpio_in"; +@@ -203,6 +214,10 @@ + regulator-name = "avcc"; + }; + ++®_usb0_vbus { ++ status = "okay"; ++}; ++ + ®_usb1_vbus { + pinctrl-0 = <&usb1_vbus_pin_bananapro>; + gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */ +@@ -221,7 +236,21 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usb_power_supply { ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_power-supply = <&usb_power_supply>; ++ usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts ++++ b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts +@@ -82,6 +82,14 @@ + status = "okay"; + }; + ++&codec { ++ status = "okay"; ++}; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -108,13 +116,9 @@ + status = "okay"; + + axp209: pmic@34 { +- compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; +- +- interrupt-controller; +- #interrupt-cells = <1>; + }; + }; + +@@ -142,6 +146,10 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { + ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 { + allwinner,pins = "PH2"; +@@ -157,8 +165,15 @@ + allwinner,pull = ; + }; + ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 { +- allwinner,pins = "PH11"; ++ allwinner,pins = "PD2"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; +@@ -171,13 +186,37 @@ + status = "okay"; + }; + +-®_usb1_vbus { +- pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>; +- gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ +- status = "okay"; ++#include "axp209.dtsi" ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-int-pll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; + }; + +-®_usb2_vbus { ++/* A single regulator (U24) powers both USB host ports. */ ++®_usb1_vbus { ++ pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>; ++ gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */ + status = "okay"; + }; + +@@ -187,8 +226,16 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ + usb1_vbus-supply = <®_usb1_vbus>; +- usb2_vbus-supply = <®_usb2_vbus>; ++ usb2_vbus-supply = <®_usb1_vbus>; + status = "okay"; + }; +--- a/arch/arm/dts/sun7i-a20-pcduino3.dts ++++ b/arch/arm/dts/sun7i-a20-pcduino3.dts +@@ -111,6 +111,14 @@ + allwinner,pins = "PH2"; + }; + ++&codec { ++ status = "okay"; ++}; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -137,16 +145,14 @@ + status = "okay"; + + axp209: pmic@34 { +- compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; +- +- interrupt-controller; +- #interrupt-cells = <1>; + }; + }; + ++#include "axp209.dtsi" ++ + &ir0 { + pinctrl-names = "default"; + pinctrl-0 = <&ir0_rx_pins_a>; +@@ -171,6 +177,10 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ + &pio { + led_pins_pcduino3: led_pins@0 { + allwinner,pins = "PH15", "PH16"; +@@ -185,6 +195,13 @@ + allwinner,drive = ; + allwinner,pull = ; + }; ++ ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; + }; + + ®_ahci_5v { +@@ -192,6 +209,31 @@ + status = "okay"; + }; + ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-int-pll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; ++}; ++ + ®_usb1_vbus { + status = "okay"; + }; +@@ -206,7 +248,15 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts ++++ b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts +@@ -48,6 +48,7 @@ + #include + #include + #include ++#include + + / { + model = "Wexler TAB7200"; +@@ -57,11 +58,28 @@ + serial0 = &uart0; + }; + ++ backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; ++ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; ++ default-brightness-level = <8>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bl_enable_pin>; ++ enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ ++ }; ++ + chosen { + stdout-path = "serial0:115200n8"; + }; + }; + ++&codec { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&codec_pa_pin>; ++ allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ ++ status = "okay"; ++}; ++ + &cpu0 { + cpu-supply = <®_dcdc2>; + }; +@@ -86,6 +104,8 @@ + }; + }; + ++#include "axp209.dtsi" ++ + &i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; +@@ -96,6 +116,18 @@ + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; ++ ++ gt911: touchscreen@5d { ++ compatible = "goodix,gt911"; ++ reg = <0x5d>; ++ interrupt-parent = <&pio>; ++ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ts_reset_pin>; ++ irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */ ++ reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */ ++ touchscreen-swapped-x-y; ++ }; + }; + + &lradc { +@@ -135,7 +167,45 @@ + status = "okay"; + }; + +-#include "axp209.dtsi" ++&otg_sram { ++ status = "okay"; ++}; ++ ++&pio { ++ bl_enable_pin: bl_enable_pin@0 { ++ allwinner,pins = "PH7"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ codec_pa_pin: codec_pa_pin@0 { ++ allwinner,pins = "PH15"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ ts_reset_pin: ts_reset_pin@0 { ++ allwinner,pins = "PB13"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++&pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm0_pins_a>; ++ status = "okay"; ++}; + + ®_dcdc2 { + regulator-always-on; +@@ -162,6 +232,10 @@ + regulator-name = "avcc"; + }; + ++®_usb0_vbus { ++ status = "okay"; ++}; ++ + ®_usb1_vbus { + status = "okay"; + }; +@@ -176,7 +250,21 @@ + status = "okay"; + }; + ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usb_power_supply { ++ status = "okay"; ++}; ++ + &usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_power-supply = <&usb_power_supply>; ++ usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; + status = "okay"; +--- a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts ++++ b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts +@@ -1,13 +1,52 @@ + /* +- * Copyright 2015 Hans de Goede ++ * Copyright 2015 Jelle de Jong + * +- * Minimal dts file for the Wits Pro A20 DKT for u-boot only ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. + * +- * SPDX-License-Identifier: GPL-2.0+ or X11 ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. + */ + + /dts-v1/; + #include "sun7i-a20.dtsi" ++#include "sunxi-common-regulators.dtsi" ++ ++#include ++#include ++#include + + / { + model = "Wits Pro A20 DKT"; +@@ -20,6 +59,17 @@ + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ mmc3_pwrseq: mmc3_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&vmmc3_pin_ap6xxx_wl_regon>; ++ reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */ ++ }; ++}; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc2>; + }; + + &ehci0 { +@@ -42,6 +92,60 @@ + }; + }; + ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins_a>; ++ status = "okay"; ++ ++ axp209: pmic@34 { ++ reg = <0x34>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ }; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++}; ++ ++&i2c2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins_a>; ++ status = "okay"; ++}; ++ ++#include "axp209.dtsi" ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; ++ vmmc-supply = <®_vcc3v3>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++}; ++ ++&mmc3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_pins_a>; ++ vmmc-supply = <®_vcc3v3>; ++ mmc-pwrseq = <&mmc3_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ brcmf: bcrmf@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&pio>; ++ interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ + &ohci0 { + status = "okay"; + }; +@@ -50,8 +154,85 @@ + status = "okay"; + }; + ++&otg_sram { ++ status = "okay"; ++}; ++ ++&pio { ++ vmmc3_pin_ap6xxx_wl_regon: vmmc3_pin@0 { ++ allwinner,pins = "PH9"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ usb0_id_detect_pin: usb0_id_detect_pin@0 { ++ allwinner,pins = "PH4"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1450000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-int-dll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; ++}; ++ ++®_usb0_vbus { ++ status = "okay"; ++}; ++ ++®_usb1_vbus { ++ status = "okay"; ++}; ++ ++®_usb2_vbus { ++ status = "okay"; ++}; ++ + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; + }; ++ ++&usb_otg { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usb_power_supply { ++ status = "okay"; ++}; ++ ++&usbphy { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&usb0_id_detect_pin>; ++ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ usb0_vbus_power-supply = <&usb_power_supply>; ++ usb0_vbus-supply = <®_usb0_vbus>; ++ usb1_vbus-supply = <®_usb1_vbus>; ++ usb2_vbus-supply = <®_usb2_vbus>; ++ status = "okay"; ++}; +--- a/arch/arm/dts/sun7i-a20.dtsi ++++ b/arch/arm/dts/sun7i-a20.dtsi +@@ -47,6 +47,7 @@ + #include + #include + ++#include + #include + #include + +@@ -67,7 +68,7 @@ + "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-hdmi"; + clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, +- <&ahb_gates 44>; ++ <&ahb_gates 44>, <&dram_gates 26>; + status = "disabled"; + }; + +@@ -75,7 +76,8 @@ + compatible = "allwinner,simple-framebuffer", + "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0"; +- clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>; ++ clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>, ++ <&dram_gates 26>; + status = "disabled"; + }; + +@@ -84,7 +86,7 @@ + "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-tve0"; + clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, +- <&ahb_gates 44>; ++ <&ahb_gates 44>, <&dram_gates 26>; + status = "disabled"; + }; + }; +@@ -107,7 +109,7 @@ + 720000 1200000 + 528000 1100000 + 312000 1000000 +- 144000 900000 ++ 144000 1000000 + >; + #cooling-cells = <2>; + cooling-min-level = <0>; +@@ -199,6 +201,15 @@ + clock-output-names = "pll1"; + }; + ++ pll2: clk@01c20008 { ++ #clock-cells = <1>; ++ compatible = "allwinner,sun4i-a10-pll2-clk"; ++ reg = <0x01c20008 0x8>; ++ clocks = <&osc24M>; ++ clock-output-names = "pll2-1x", "pll2-2x", ++ "pll2-4x", "pll2-8x"; ++ }; ++ + pll4: clk@01c20018 { + #clock-cells = <0>; + compatible = "allwinner,sun7i-a20-pll4-clk"; +@@ -267,6 +278,19 @@ + compatible = "allwinner,sun7i-a20-ahb-gates-clk"; + reg = <0x01c20060 0x8>; + clocks = <&ahb>; ++ clock-indices = <0>, <1>, ++ <2>, <3>, <4>, ++ <5>, <6>, <7>, <8>, ++ <9>, <10>, <11>, <12>, ++ <13>, <14>, <16>, ++ <17>, <18>, <20>, <21>, ++ <22>, <23>, <25>, ++ <28>, <32>, <33>, <34>, ++ <35>, <36>, <37>, <40>, ++ <41>, <42>, <43>, ++ <44>, <45>, <46>, ++ <47>, <49>, <50>, ++ <52>; + clock-output-names = "ahb_usb0", "ahb_ehci0", + "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", + "ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0", +@@ -295,6 +319,10 @@ + compatible = "allwinner,sun7i-a20-apb0-gates-clk"; + reg = <0x01c20068 0x4>; + clocks = <&apb0>; ++ clock-indices = <0>, <1>, ++ <2>, <3>, <4>, ++ <5>, <6>, <7>, ++ <8>, <10>; + clock-output-names = "apb0_codec", "apb0_spdif", + "apb0_ac97", "apb0_iis0", "apb0_iis1", + "apb0_pio", "apb0_ir0", "apb0_ir1", +@@ -314,6 +342,12 @@ + compatible = "allwinner,sun7i-a20-apb1-gates-clk"; + reg = <0x01c2006c 0x4>; + clocks = <&apb1>; ++ clock-indices = <0>, <1>, ++ <2>, <3>, <4>, ++ <5>, <6>, <7>, ++ <15>, <16>, <17>, ++ <18>, <19>, <20>, ++ <21>, <22>, <23>; + clock-output-names = "apb1_i2c0", "apb1_i2c1", + "apb1_i2c2", "apb1_i2c3", "apb1_can", + "apb1_scr", "apb1_ps20", "apb1_ps21", +@@ -442,6 +476,14 @@ + clock-output-names = "ir1"; + }; + ++ keypad_clk: clk@01c200c4 { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ reg = <0x01c200c4 0x4>; ++ clocks = <&osc24M>; ++ clock-output-names = "keypad"; ++ }; ++ + usb_clk: clk@01c200cc { + #clock-cells = <1>; + #reset-cells = <1>; +@@ -460,6 +502,48 @@ + clock-output-names = "spi3"; + }; + ++ dram_gates: clk@01c20100 { ++ #clock-cells = <1>; ++ compatible = "allwinner,sun4i-a10-dram-gates-clk"; ++ reg = <0x01c20100 0x4>; ++ clocks = <&pll5 0>; ++ clock-indices = <0>, ++ <1>, <2>, ++ <3>, ++ <4>, ++ <5>, <6>, ++ <15>, ++ <24>, <25>, ++ <26>, <27>, ++ <28>, <29>; ++ clock-output-names = "dram_ve", ++ "dram_csi0", "dram_csi1", ++ "dram_ts", ++ "dram_tvd", ++ "dram_tve0", "dram_tve1", ++ "dram_output", ++ "dram_de_fe1", "dram_de_fe0", ++ "dram_de_be0", "dram_de_be1", ++ "dram_de_mp", "dram_ace"; ++ }; ++ ++ ve_clk: clk@01c2013c { ++ #clock-cells = <0>; ++ #reset-cells = <0>; ++ compatible = "allwinner,sun4i-a10-ve-clk"; ++ reg = <0x01c2013c 0x4>; ++ clocks = <&pll4>; ++ clock-output-names = "ve"; ++ }; ++ ++ codec_clk: clk@01c20140 { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-codec-clk"; ++ reg = <0x01c20140 0x4>; ++ clocks = <&pll2 SUN4I_A10_PLL2_1X>; ++ clock-output-names = "codec"; ++ }; ++ + mbus_clk: clk@01c2015c { + #clock-cells = <0>; + compatible = "allwinner,sun5i-a13-mbus-clk"; +@@ -744,6 +828,14 @@ + status = "disabled"; + }; + ++ crypto: crypto-engine@01c15000 { ++ compatible = "allwinner,sun4i-a10-crypto"; ++ reg = <0x01c15000 0x1000>; ++ interrupts = ; ++ clocks = <&ahb_gates 5>, <&ss_clk>; ++ clock-names = "ahb", "mod"; ++ }; ++ + spi2: spi@01c17000 { + compatible = "allwinner,sun4i-a10-spi"; + reg = <0x01c17000 0x1000>; +@@ -1159,6 +1251,19 @@ + status = "disabled"; + }; + ++ codec: codec@01c22c00 { ++ #sound-dai-cells = <0>; ++ compatible = "allwinner,sun7i-a20-codec"; ++ reg = <0x01c22c00 0x40>; ++ interrupts = ; ++ clocks = <&apb0_gates 0>, <&codec_clk>; ++ clock-names = "apb", "codec"; ++ dmas = <&dma SUN4I_DMA_NORMAL 19>, ++ <&dma SUN4I_DMA_NORMAL 19>; ++ dma-names = "rx", "tx"; ++ status = "disabled"; ++ }; ++ + sid: eeprom@01c23800 { + compatible = "allwinner,sun7i-a20-sid"; + reg = <0x01c23800 0x200>; +--- a/arch/arm/dts/sun8i-a23-a33.dtsi ++++ b/arch/arm/dts/sun8i-a23-a33.dtsi +@@ -56,7 +56,7 @@ + #size-cells = <1>; + ranges; + +- framebuffer@0 { ++ simplefb_lcd: framebuffer@0 { + compatible = "allwinner,simple-framebuffer", + "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0"; +@@ -175,27 +175,13 @@ + clock-output-names = "apb1"; + }; + +- ahb1_gates: clk@01c20060 { +- #clock-cells = <1>; +- compatible = "allwinner,sun8i-a23-ahb1-gates-clk"; +- reg = <0x01c20060 0x8>; +- clocks = <&ahb1>; +- clock-output-names = "ahb1_mipidsi", "ahb1_dma", +- "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2", +- "ahb1_nand", "ahb1_sdram", +- "ahb1_hstimer", "ahb1_spi0", +- "ahb1_spi1", "ahb1_otg", "ahb1_ehci", +- "ahb1_ohci", "ahb1_ve", "ahb1_lcd", +- "ahb1_csi", "ahb1_be", "ahb1_fe", +- "ahb1_gpu", "ahb1_spinlock", +- "ahb1_drc"; +- }; +- + apb1_gates: clk@01c20068 { + #clock-cells = <1>; + compatible = "allwinner,sun8i-a23-apb1-gates-clk"; + reg = <0x01c20068 0x4>; + clocks = <&apb1>; ++ clock-indices = <0>, <5>, ++ <12>, <13>; + clock-output-names = "apb1_codec", "apb1_pio", + "apb1_daudio0", "apb1_daudio1"; + }; +@@ -213,6 +199,10 @@ + compatible = "allwinner,sun8i-a23-apb2-gates-clk"; + reg = <0x01c2006c 0x4>; + clocks = <&apb2>; ++ clock-indices = <0>, <1>, ++ <2>, <16>, ++ <17>, <18>, ++ <19>, <20>; + clock-output-names = "apb2_i2c0", "apb2_i2c1", + "apb2_i2c2", "apb2_uart0", + "apb2_uart1", "apb2_uart2", +@@ -391,12 +381,19 @@ + allwinner,pins = "PC5", "PC6", "PC8", + "PC9", "PC10", "PC11", + "PC12", "PC13", "PC14", +- "PC15"; ++ "PC15", "PC16"; + allwinner,function = "mmc2"; + allwinner,drive = ; + allwinner,pull = ; + }; + ++ pwm0_pins: pwm0 { ++ allwinner,pins = "PH0"; ++ allwinner,function = "pwm0"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + i2c0_pins_a: i2c0@0 { + allwinner,pins = "PH2", "PH3"; + allwinner,function = "i2c0"; +@@ -451,6 +448,14 @@ + interrupts = ; + }; + ++ pwm: pwm@01c21400 { ++ compatible = "allwinner,sun7i-a20-pwm"; ++ reg = <0x01c21400 0xc>; ++ clocks = <&osc24M>; ++ #pwm-cells = <3>; ++ status = "disabled"; ++ }; ++ + lradc: lradc@01c22800 { + compatible = "allwinner,sun4i-a10-lradc-keys"; + reg = <0x01c22800 0x100>; +@@ -574,6 +579,14 @@ + ; + }; + ++ nmi_intc: interrupt-controller@01f00c0c { ++ compatible = "allwinner,sun6i-a31-sc-nmi"; ++ interrupt-controller; ++ #interrupt-cells = <2>; ++ reg = <0x01f00c0c 0x38>; ++ interrupts = ; ++ }; ++ + prcm@01f01400 { + compatible = "allwinner,sun8i-a23-prcm"; + reg = <0x01f01400 0x200>; +@@ -642,10 +655,18 @@ + resets = <&apb0_rst 0>; + gpio-controller; + interrupt-controller; ++ #interrupt-cells = <3>; + #address-cells = <1>; + #size-cells = <0>; + #gpio-cells = <3>; + ++ r_rsb_pins: r_rsb { ++ allwinner,pins = "PL0", "PL1"; ++ allwinner,function = "s_rsb"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + r_uart_pins_a: r_uart@0 { + allwinner,pins = "PL2", "PL3"; + allwinner,function = "s_uart"; +@@ -653,5 +674,19 @@ + allwinner,pull = ; + }; + }; ++ ++ r_rsb: rsb@01f03400 { ++ compatible = "allwinner,sun8i-a23-rsb"; ++ reg = <0x01f03400 0x400>; ++ interrupts = ; ++ clocks = <&apb0_gates 3>; ++ clock-frequency = <3000000>; ++ resets = <&apb0_rst 3>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&r_rsb_pins>; ++ status = "disabled"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; + }; + }; +--- a/arch/arm/dts/sun8i-a23-gt90h-v4.dts ++++ b/arch/arm/dts/sun8i-a23-gt90h-v4.dts +@@ -47,15 +47,26 @@ + #include + #include + #include ++#include + + / { +- model = "Allwinner GT90H Quad Core Tablet (v4)"; +- compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a33"; ++ model = "Allwinner GT90H Dual Core Tablet (v4)"; ++ compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23"; + + aliases { + serial0 = &r_uart; + }; + ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bl_en_pin_gt90h>; ++ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; ++ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; ++ default-brightness-level = <8>; ++ enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ ++ }; ++ + chosen { + stdout-path = "serial0:115200n8"; + }; +@@ -106,8 +117,7 @@ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>; +- /* FIXME this really is aldo1, correct once we've pmic support */ +- vmmc-supply = <®_vcc3v0>; ++ vmmc-supply = <®_aldo1>; + bus-width = <4>; + cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ + cd-inverted; +@@ -115,6 +125,13 @@ + }; + + &pio { ++ bl_en_pin_gt90h: bl_en_pin@0 { ++ allwinner,pins = "PH6"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + mmc0_cd_pin_gt90h: mmc0_cd_pin@0 { + allwinner,pins = "PB4"; + allwinner,function = "gpio_in"; +@@ -123,12 +140,106 @@ + }; + }; + ++&pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm0_pins>; ++ status = "okay"; ++}; ++ ++&r_rsb { ++ status = "okay"; ++ ++ axp22x: pmic@3a3 { ++ compatible = "x-powers,axp223"; ++ reg = <0x3a3>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ eldoin-supply = <®_dcdc1>; ++ }; ++}; ++ + &r_uart { + pinctrl-names = "default"; + pinctrl-0 = <&r_uart_pins_a>; + status = "okay"; + }; + ++#include "axp22x.dtsi" ++ ++®_aldo1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-io"; ++}; ++ ++®_aldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <2350000>; ++ regulator-max-microvolt = <2650000>; ++ regulator-name = "vdd-dll"; ++}; ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pll-avcc"; ++}; ++ ++®_dc1sw { ++ regulator-name = "vcc-lcd"; ++}; ++ ++®_dc5ldo { ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-3v0"; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-sys"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_dldo1 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi"; ++}; ++ ++®_rtc_ldo { ++ regulator-name = "vcc-rtc"; ++}; ++ ++&simplefb_lcd { ++ vcc-lcd-supply = <®_dc1sw>; ++}; ++ + /* + * FIXME for now we only support host mode and rely on u-boot to have + * turned on Vbus which is controlled by the axp223 pmic on the board. +@@ -141,5 +252,6 @@ + }; + + &usbphy { ++ usb1_vbus-supply = <®_dldo1>; + status = "okay"; + }; +--- a/arch/arm/dts/sun8i-a23.dtsi ++++ b/arch/arm/dts/sun8i-a23.dtsi +@@ -50,6 +50,31 @@ + }; + + clocks { ++ ahb1_gates: clk@01c20060 { ++ #clock-cells = <1>; ++ compatible = "allwinner,sun8i-a23-ahb1-gates-clk"; ++ reg = <0x01c20060 0x8>; ++ clocks = <&ahb1>; ++ clock-indices = <1>, <6>, ++ <8>, <9>, <10>, ++ <13>, <14>, ++ <19>, <20>, ++ <21>, <24>, <26>, ++ <29>, <32>, <36>, ++ <40>, <44>, <46>, ++ <52>, <53>, ++ <54>, <57>; ++ clock-output-names = "ahb1_mipidsi", "ahb1_dma", ++ "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2", ++ "ahb1_nand", "ahb1_sdram", ++ "ahb1_hstimer", "ahb1_spi0", ++ "ahb1_spi1", "ahb1_otg", "ahb1_ehci", ++ "ahb1_ohci", "ahb1_ve", "ahb1_lcd", ++ "ahb1_csi", "ahb1_be", "ahb1_fe", ++ "ahb1_gpu", "ahb1_msgbox", ++ "ahb1_spinlock", "ahb1_drc"; ++ }; ++ + mbus_clk: clk@01c2015c { + #clock-cells = <0>; + compatible = "allwinner,sun8i-a23-mbus-clk"; +--- a/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts ++++ b/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts +@@ -68,7 +68,7 @@ + }; + + &lradc { +- vref-supply = <®_vcc3v0>; ++ vref-supply = <®_dcdc1>; + status = "okay"; + + button@200 { +@@ -96,7 +96,7 @@ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>; +- vmmc-supply = <®_vcc3v0>; ++ vmmc-supply = <®_dcdc1>; + bus-width = <4>; + cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ + cd-inverted; +@@ -106,13 +106,16 @@ + &mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_pins>; +- vmmc-supply = <®_vcc3v0>; ++ vmmc-supply = <®_dcdc1>; + bus-width = <8>; + non-removable; ++ cap-mmc-hw-reset; + status = "okay"; + }; + + &mmc2_8bit_pins { ++ /* Increase drive strength for DDR modes */ ++ allwinner,drive = ; + /* eMMC is missing pull-ups */ + allwinner,pull = ; + }; +@@ -130,6 +133,80 @@ + }; + }; + ++&r_rsb { ++ status = "okay"; ++ ++ axp22x: pmic@3a3 { ++ compatible = "x-powers,axp223"; ++ reg = <0x3a3>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ eldoin-supply = <®_dcdc1>; ++ }; ++}; ++ ++#include "axp22x.dtsi" ++ ++®_aldo1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-io"; ++}; ++ ++®_aldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <2350000>; ++ regulator-max-microvolt = <2650000>; ++ regulator-name = "vdd-dll"; ++}; ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pll-avcc"; ++}; ++ ++®_dc5ldo { ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-3v0"; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-sys"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_rtc_ldo { ++ regulator-name = "vcc-rtc"; ++}; ++ + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_b>; +--- a/arch/arm/dts/sun8i-a33.dtsi ++++ b/arch/arm/dts/sun8i-a33.dtsi +@@ -72,6 +72,41 @@ + clock-output-names = "pll11"; + }; + ++ ahb1_gates: clk@01c20060 { ++ #clock-cells = <1>; ++ compatible = "allwinner,sun8i-a33-ahb1-gates-clk"; ++ reg = <0x01c20060 0x8>; ++ clocks = <&ahb1>; ++ clock-indices = <1>, <5>, ++ <6>, <8>, <9>, ++ <10>, <13>, <14>, ++ <19>, <20>, ++ <21>, <24>, <26>, ++ <29>, <32>, <36>, ++ <40>, <44>, <46>, ++ <52>, <53>, ++ <54>, <57>, ++ <58>; ++ clock-output-names = "ahb1_mipidsi", "ahb1_ss", ++ "ahb1_dma","ahb1_mmc0", "ahb1_mmc1", ++ "ahb1_mmc2", "ahb1_nand", "ahb1_sdram", ++ "ahb1_hstimer", "ahb1_spi0", ++ "ahb1_spi1", "ahb1_otg", "ahb1_ehci", ++ "ahb1_ohci", "ahb1_ve", "ahb1_lcd", ++ "ahb1_csi", "ahb1_be", "ahb1_fe", ++ "ahb1_gpu", "ahb1_msgbox", ++ "ahb1_spinlock", "ahb1_drc", ++ "ahb1_sat"; ++ }; ++ ++ ss_clk: clk@01c2009c { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ reg = <0x01c2009c 0x4>; ++ clocks = <&osc24M>, <&pll6 0>; ++ clock-output-names = "ss"; ++ }; ++ + mbus_clk: clk@01c2015c { + #clock-cells = <0>; + compatible = "allwinner,sun8i-a23-mbus-clk"; +@@ -82,6 +117,16 @@ + }; + + soc@01c00000 { ++ crypto: crypto-engine@01c15000 { ++ compatible = "allwinner,sun4i-a10-crypto"; ++ reg = <0x01c15000 0x1000>; ++ interrupts = ; ++ clocks = <&ahb1_gates 5>, <&ss_clk>; ++ clock-names = "ahb", "mod"; ++ resets = <&ahb1_rst 5>; ++ reset-names = "ahb"; ++ }; ++ + usb_otg: usb@01c19000 { + compatible = "allwinner,sun8i-a33-musb"; + reg = <0x01c19000 0x0400>; +--- /dev/null ++++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts +@@ -0,0 +1,65 @@ ++/* ++ * Copyright 2015 Chen-Yu Tsai ++ * ++ * Chen-Yu Tsai ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++/dts-v1/; ++#include "sun8i-a83t.dtsi" ++ ++/ { ++ model = "Cubietech Cubietruck Plus"; ++ compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_b>; ++ status = "okay"; ++}; +--- a/arch/arm/dts/sun8i-a83t.dtsi ++++ b/arch/arm/dts/sun8i-a83t.dtsi +@@ -52,12 +52,6 @@ + / { + interrupt-parent = <&gic>; + +- chosen { +- #address-cells = <1>; +- #size-cells = <1>; +- ranges; +- }; +- + cpus { + #address-cells = <1>; + #size-cells = <0>; +@@ -85,6 +79,7 @@ + device_type = "cpu"; + reg = <3>; + }; ++ + cpu@100 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; +@@ -96,6 +91,7 @@ + device_type = "cpu"; + reg = <0x101>; + }; ++ + cpu@102 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; +@@ -109,18 +105,12 @@ + }; + }; + +- memory { +- reg = <0x40000000 0x80000000>; +- }; +- + timer { + compatible = "arm,armv7-timer"; +- interrupts = , +- , +- , +- ; +- clock-frequency = <24000000>; +- arm,cpu-registers-not-fw-configured; ++ interrupts = , ++ , ++ , ++ ; + }; + + clocks { +@@ -128,6 +118,7 @@ + #size-cells = <1>; + ranges; + ++ /* TODO: PRCM block has a mux for this. */ + osc24M: osc24M_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; +@@ -135,36 +126,39 @@ + clock-output-names = "osc24M"; + }; + +- osc32k: osc32k_clk { ++ /* ++ * This is called "internal OSC" in some places. ++ * It is an internal RC-based oscillator. ++ * TODO: Its controls are in the PRCM block. ++ */ ++ osc16M: osc16M_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; +- clock-frequency = <32768>; +- clock-output-names = "osc32k"; ++ clock-frequency = <16000000>; ++ clock-output-names = "osc16M"; ++ }; ++ ++ osc16Md512: osc16Md512_clk { ++ #clock-cells = <0>; ++ compatible = "fixed-factor-clock"; ++ clock-div = <512>; ++ clock-mult = <1>; ++ clocks = <&osc16M>; ++ clock-output-names = "osc16M-d512"; + }; + }; + +- soc@01c00000 { ++ soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + +- gic: interrupt-controller@01c81000 { +- compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; +- reg = <0x01c81000 0x1000>, +- <0x01c82000 0x1000>, +- <0x01c84000 0x2000>, +- <0x01c86000 0x2000>; +- interrupt-controller; +- #interrupt-cells = <3>; +- interrupts = ; +- }; +- + pio: pinctrl@01c20800 { + compatible = "allwinner,sun8i-a83t-pinctrl"; + interrupts = , +- , +- ; ++ , ++ ; + reg = <0x01c20800 0x400>; + clocks = <&osc24M>; + gpio-controller; +@@ -172,27 +166,6 @@ + #interrupt-cells = <3>; + #gpio-cells = <3>; + +- i2c0_pins_a: i2c0@0 { +- allwinner,pins = "PH0", "PH1"; +- allwinner,function = "i2c0"; +- allwinner,drive = ; +- allwinner,pull = ; +- }; +- +- i2c1_pins_a: i2c1@0 { +- allwinner,pins = "PH2", "PH3"; +- allwinner,function = "i2c1"; +- allwinner,drive = ; +- allwinner,pull = ; +- }; +- +- i2c2_pins_a: i2c2@0 { +- allwinner,pins = "PH4", "PH5"; +- allwinner,function = "i2c2"; +- allwinner,drive = ; +- allwinner,pull = ; +- }; +- + mmc0_pins_a: mmc0@0 { + allwinner,pins = "PF0", "PF1", "PF2", + "PF3", "PF4", "PF5"; +@@ -201,24 +174,6 @@ + allwinner,pull = ; + }; + +- mmc1_pins_a: mmc1@0 { +- allwinner,pins = "PG0", "PG1", "PG2", +- "PG3", "PG4", "PG5"; +- allwinner,function = "mmc1"; +- allwinner,drive = ; +- allwinner,pull = ; +- }; +- +- mmc2_8bit_pins: mmc2_8bit { +- allwinner,pins = "PC5", "PC6", "PC8", +- "PC9", "PC10", "PC11", +- "PC12", "PC13", "PC14", +- "PC15"; +- allwinner,function = "mmc2"; +- allwinner,drive = ; +- allwinner,pull = ; +- }; +- + uart0_pins_a: uart0@0 { + allwinner,pins = "PF2", "PF4"; + allwinner,function = "uart0"; +@@ -234,6 +189,21 @@ + }; + }; + ++ timer@01c20c00 { ++ compatible = "allwinner,sun4i-a10-timer"; ++ reg = <0x01c20c00 0xa0>; ++ interrupts = , ++ ; ++ clocks = <&osc24M>; ++ }; ++ ++ watchdog@01c20ca0 { ++ compatible = "allwinner,sun6i-a31-wdt"; ++ reg = <0x01c20ca0 0x20>; ++ interrupts = ; ++ clocks = <&osc24M>; ++ }; ++ + uart0: serial@01c28000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28000 0x400>; +@@ -243,5 +213,16 @@ + clocks = <&osc24M>; + status = "disabled"; + }; ++ ++ gic: interrupt-controller@01c81000 { ++ compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; ++ reg = <0x01c81000 0x1000>, ++ <0x01c82000 0x1000>, ++ <0x01c84000 0x2000>, ++ <0x01c86000 0x2000>; ++ interrupt-controller; ++ #interrupt-cells = <3>; ++ interrupts = ; ++ }; + }; + }; +--- a/arch/arm/dts/sun8i-h3-orangepi-pc.dts ++++ b/arch/arm/dts/sun8i-h3-orangepi-pc.dts +@@ -45,6 +45,7 @@ + #include "sunxi-common-regulators.dtsi" + + #include ++#include + #include + + / { +@@ -58,6 +59,43 @@ + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&leds_opc>; ++ ++ status_led { ++ label = "status:red:user"; ++ gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ r_leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&leds_r_opc>; ++ ++ tx { ++ label = "pwr:green:user"; ++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ }; ++ ++ r_gpio_keys { ++ compatible = "gpio-keys"; ++ input-name = "sw4"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sw_r_opc>; ++ ++ sw4@0 { ++ label = "sw4"; ++ linux,code = ; ++ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ }; ++ }; + }; + + &ehci1 { +@@ -72,6 +110,12 @@ + status = "okay"; + }; + ++&ir { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ir_pins_a>; ++ status = "okay"; ++}; ++ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; +@@ -94,6 +138,31 @@ + status = "okay"; + }; + ++&pio { ++ leds_opc: led_pins@0 { ++ allwinner,pins = "PA15"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++&r_pio { ++ leds_r_opc: led_pins@0 { ++ allwinner,pins = "PL10"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ sw_r_opc: key_pins@0 { ++ allwinner,pins = "PL03"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; +--- a/arch/arm/dts/sun8i-h3-orangepi-plus.dts ++++ b/arch/arm/dts/sun8i-h3-orangepi-plus.dts +@@ -45,6 +45,7 @@ + #include "sunxi-common-regulators.dtsi" + + #include ++#include + #include + + / { +@@ -70,6 +71,68 @@ + enable-active-high; + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; + }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&leds_opc>; ++ ++ status_led { ++ label = "status:red:user"; ++ gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ r_leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&leds_r_opc>; ++ ++ tx { ++ label = "pwr:green:user"; ++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ }; ++ ++ r_gpio_keys { ++ compatible = "gpio-keys"; ++ input-name = "sw4"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sw_r_opc>; ++ ++ sw4@0 { ++ label = "sw4"; ++ linux,code = ; ++ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&pio { ++ leds_opc: led_pins@0 { ++ allwinner,pins = "PA15"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++&r_pio { ++ leds_r_opc: led_pins@0 { ++ allwinner,pins = "PL10"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ sw_r_opc: key_pins@0 { ++ allwinner,pins = "PL03"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; + }; + + &ehci1 { +--- a/arch/arm/dts/sun8i-h3.dtsi ++++ b/arch/arm/dts/sun8i-h3.dtsi +@@ -83,12 +83,6 @@ + , + , + ; +- clock-frequency = <24000000>; +- arm,cpu-registers-not-fw-configured; +- }; +- +- memory { +- reg = <0x40000000 0x80000000>; + }; + + clocks { +@@ -131,15 +125,24 @@ + compatible = "allwinner,sun6i-a31-pll6-clk"; + reg = <0x01c20028 0x4>; + clocks = <&osc24M>; +- clock-output-names = "pll6", "pll6x2", "pll6d2"; ++ clock-output-names = "pll6", "pll6x2"; + }; + +- pll8: clk@01c20044 { +- #clock-cells = <1>; +- compatible = "allwinner,sun6i-a31-pll6-clk"; +- reg = <0x01c20044 0x4>; +- clocks = <&osc24M>; +- clock-output-names = "pll8", "pll8x2"; ++ pll6d2: pll6d2_clk { ++ #clock-cells = <0>; ++ compatible = "fixed-factor-clock"; ++ clock-div = <2>; ++ clock-mult = <1>; ++ clocks = <&pll6 0>; ++ clock-output-names = "pll6d2"; ++ }; ++ ++ /* dummy clock until pll6 can be reused */ ++ pll8: pll8_clk { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <1>; ++ clock-output-names = "pll8"; + }; + + cpu: cpu_clk@01c20050 { +@@ -170,7 +173,7 @@ + #clock-cells = <0>; + compatible = "allwinner,sun8i-h3-ahb2-clk"; + reg = <0x01c2005c 0x4>; +- clocks = <&ahb1>, <&pll6 2>; ++ clocks = <&ahb1>, <&pll6d2>; + clock-output-names = "ahb2"; + }; + +@@ -213,34 +216,34 @@ + <76>, <77>, <78>, + <96>, <97>, <98>, + <112>, <113>, +- <114>, <115>, <116>, +- <128>, <135>; +- clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0", +- "ahb1_mmc1", "ahb1_mmc2", "ahb1_nand", +- "ahb1_sdram", "ahb2_gmac", "ahb1_ts", +- "ahb1_hstimer", "ahb1_spi0", +- "ahb1_spi1", "ahb1_otg", +- "ahb1_otg_ehci0", "ahb1_ehic1", +- "ahb1_ehic2", "ahb1_ehic3", +- "ahb1_otg_ohci0", "ahb2_ohic1", +- "ahb2_ohic2", "ahb2_ohic3", "ahb1_ve", +- "ahb1_lcd0", "ahb1_lcd1", "ahb1_deint", +- "ahb1_csi", "ahb1_tve", "ahb1_hdmi", +- "ahb1_de", "ahb1_gpu", "ahb1_msgbox", +- "ahb1_spinlock", "apb1_codec", +- "apb1_spdif", "apb1_pio", "apb1_ths", +- "apb1_i2s0", "apb1_i2s1", "apb1_i2s2", +- "apb2_i2c0", "apb2_i2c1", "apb2_i2c2", +- "apb2_uart0", "apb2_uart1", +- "apb2_uart2", "apb2_uart3", "apb2_scr", +- "ahb1_ephy", "ahb1_dbg"; ++ <114>, <115>, ++ <116>, <128>, <135>; ++ clock-output-names = "bus_ce", "bus_dma", "bus_mmc0", ++ "bus_mmc1", "bus_mmc2", "bus_nand", ++ "bus_sdram", "bus_gmac", "bus_ts", ++ "bus_hstimer", "bus_spi0", ++ "bus_spi1", "bus_otg", ++ "bus_otg_ehci0", "bus_ehci1", ++ "bus_ehci2", "bus_ehci3", ++ "bus_otg_ohci0", "bus_ohci1", ++ "bus_ohci2", "bus_ohci3", "bus_ve", ++ "bus_lcd0", "bus_lcd1", "bus_deint", ++ "bus_csi", "bus_tve", "bus_hdmi", ++ "bus_de", "bus_gpu", "bus_msgbox", ++ "bus_spinlock", "bus_codec", ++ "bus_spdif", "bus_pio", "bus_ths", ++ "bus_i2s0", "bus_i2s1", "bus_i2s2", ++ "bus_i2c0", "bus_i2c1", "bus_i2c2", ++ "bus_uart0", "bus_uart1", ++ "bus_uart2", "bus_uart3", ++ "bus_scr", "bus_ephy", "bus_dbg"; + }; + + mmc0_clk: clk@01c20088 { + #clock-cells = <1>; + compatible = "allwinner,sun4i-a10-mmc-clk"; + reg = <0x01c20088 0x4>; +- clocks = <&osc24M>, <&pll6 0>, <&pll8 0>; ++ clocks = <&osc24M>, <&pll6 0>, <&pll8>; + clock-output-names = "mmc0", + "mmc0_output", + "mmc0_sample"; +@@ -250,7 +253,7 @@ + #clock-cells = <1>; + compatible = "allwinner,sun4i-a10-mmc-clk"; + reg = <0x01c2008c 0x4>; +- clocks = <&osc24M>, <&pll6 0>, <&pll8 0>; ++ clocks = <&osc24M>, <&pll6 0>, <&pll8>; + clock-output-names = "mmc1", + "mmc1_output", + "mmc1_sample"; +@@ -260,7 +263,7 @@ + #clock-cells = <1>; + compatible = "allwinner,sun4i-a10-mmc-clk"; + reg = <0x01c20090 0x4>; +- clocks = <&osc24M>, <&pll6 0>, <&pll8 0>; ++ clocks = <&osc24M>, <&pll6 0>, <&pll8>; + clock-output-names = "mmc2", + "mmc2_output", + "mmc2_sample"; +@@ -285,6 +288,33 @@ + clocks = <&osc24M>, <&pll6 1>, <&pll5>; + clock-output-names = "mbus"; + }; ++ ++ apb0: apb0_clk { ++ compatible = "fixed-factor-clock"; ++ #clock-cells = <0>; ++ clock-div = <1>; ++ clock-mult = <1>; ++ clocks = <&osc24M>; ++ clock-output-names = "apb0"; ++ }; ++ ++ apb0_gates: clk@01f01428 { ++ compatible = "allwinner,sun8i-h3-apb0-gates-clk", ++ "allwinner,sun4i-a10-gates-clk"; ++ reg = <0x01f01428 0x4>; ++ #clock-cells = <1>; ++ clocks = <&apb0>; ++ clock-indices = <0>, <1>; ++ clock-output-names = "apb0_pio", "apb0_ir"; ++ }; ++ ++ ir_clk: ir_clk@01f01454 { ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ reg = <0x01f01454 0x4>; ++ #clock-cells = <0>; ++ clocks = <&osc32k>, <&osc24M>; ++ clock-output-names = "ir"; ++ }; + }; + + soc { +@@ -298,7 +328,7 @@ + reg = <0x01c02000 0x1000>; + interrupts = ; + clocks = <&bus_gates 6>; +- resets = <&bus_rst 6>; ++ resets = <&ahb_rst 6>; + #dma-cells = <1>; + }; + +@@ -313,7 +343,7 @@ + "mmc", + "output", + "sample"; +- resets = <&bus_rst 8>; ++ resets = <&ahb_rst 8>; + reset-names = "ahb"; + interrupts = ; + status = "disabled"; +@@ -332,7 +362,7 @@ + "mmc", + "output", + "sample"; +- resets = <&bus_rst 9>; ++ resets = <&ahb_rst 9>; + reset-names = "ahb"; + interrupts = ; + status = "disabled"; +@@ -351,7 +381,7 @@ + "mmc", + "output", + "sample"; +- resets = <&bus_rst 10>; ++ resets = <&ahb_rst 10>; + reset-names = "ahb"; + interrupts = ; + status = "disabled"; +@@ -396,7 +426,7 @@ + reg = <0x01c1b000 0x100>; + interrupts = ; + clocks = <&bus_gates 25>, <&bus_gates 29>; +- resets = <&bus_rst 25>, <&bus_rst 29>; ++ resets = <&ahb_rst 25>, <&ahb_rst 29>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; +@@ -408,7 +438,7 @@ + interrupts = ; + clocks = <&bus_gates 29>, <&bus_gates 25>, + <&usb_clk 17>; +- resets = <&bus_rst 29>, <&bus_rst 25>; ++ resets = <&ahb_rst 29>, <&ahb_rst 25>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; +@@ -419,7 +449,7 @@ + reg = <0x01c1c000 0x100>; + interrupts = ; + clocks = <&bus_gates 26>, <&bus_gates 30>; +- resets = <&bus_rst 26>, <&bus_rst 30>; ++ resets = <&ahb_rst 26>, <&ahb_rst 30>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; +@@ -431,7 +461,7 @@ + interrupts = ; + clocks = <&bus_gates 30>, <&bus_gates 26>, + <&usb_clk 18>; +- resets = <&bus_rst 30>, <&bus_rst 26>; ++ resets = <&ahb_rst 30>, <&ahb_rst 26>; + phys = <&usbphy 2>; + phy-names = "usb"; + status = "disabled"; +@@ -442,7 +472,7 @@ + reg = <0x01c1d000 0x100>; + interrupts = ; + clocks = <&bus_gates 27>, <&bus_gates 31>; +- resets = <&bus_rst 27>, <&bus_rst 31>; ++ resets = <&ahb_rst 27>, <&ahb_rst 31>; + phys = <&usbphy 3>; + phy-names = "usb"; + status = "disabled"; +@@ -454,7 +484,7 @@ + interrupts = ; + clocks = <&bus_gates 31>, <&bus_gates 27>, + <&usb_clk 19>; +- resets = <&bus_rst 31>, <&bus_rst 27>; ++ resets = <&ahb_rst 31>, <&ahb_rst 27>; + phys = <&usbphy 3>; + phy-names = "usb"; + status = "disabled"; +@@ -469,7 +499,7 @@ + gpio-controller; + #gpio-cells = <3>; + interrupt-controller; +- #interrupt-cells = <2>; ++ #interrupt-cells = <3>; + + uart0_pins_a: uart0@0 { + allwinner,pins = "PA4", "PA5"; +@@ -502,10 +532,22 @@ + }; + }; + +- bus_rst: reset@01c202c0 { ++ ahb_rst: reset@01c202c0 { + #reset-cells = <1>; +- compatible = "allwinner,sun8i-h3-bus-reset"; +- reg = <0x01c202c0 0x1c>; ++ compatible = "allwinner,sun6i-a31-ahb1-reset"; ++ reg = <0x01c202c0 0xc>; ++ }; ++ ++ apb1_rst: reset@01c202d0 { ++ #reset-cells = <1>; ++ compatible = "allwinner,sun6i-a31-clock-reset"; ++ reg = <0x01c202d0 0x4>; ++ }; ++ ++ apb2_rst: reset@01c202d8 { ++ #reset-cells = <1>; ++ compatible = "allwinner,sun6i-a31-clock-reset"; ++ reg = <0x01c202d8 0x4>; + }; + + timer@01c20c00 { +@@ -529,7 +571,7 @@ + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&bus_gates 112>; +- resets = <&bus_rst 144>; ++ resets = <&apb2_rst 16>; + dmas = <&dma 6>, <&dma 6>; + dma-names = "rx", "tx"; + status = "disabled"; +@@ -542,7 +584,7 @@ + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&bus_gates 113>; +- resets = <&bus_rst 145>; ++ resets = <&apb2_rst 17>; + dmas = <&dma 7>, <&dma 7>; + dma-names = "rx", "tx"; + status = "disabled"; +@@ -555,7 +597,7 @@ + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&bus_gates 114>; +- resets = <&bus_rst 146>; ++ resets = <&apb2_rst 18>; + dmas = <&dma 8>, <&dma 8>; + dma-names = "rx", "tx"; + status = "disabled"; +@@ -568,7 +610,7 @@ + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&bus_gates 115>; +- resets = <&bus_rst 147>; ++ resets = <&apb2_rst 19>; + dmas = <&dma 9>, <&dma 9>; + dma-names = "rx", "tx"; + status = "disabled"; +@@ -591,5 +633,40 @@ + interrupts = , + ; + }; ++ ++ apb0_reset: reset@01f014b0 { ++ reg = <0x01f014b0 0x4>; ++ compatible = "allwinner,sun6i-a31-clock-reset"; ++ #reset-cells = <1>; ++ }; ++ ++ ir: ir@01f02000 { ++ compatible = "allwinner,sun5i-a13-ir"; ++ clocks = <&apb0_gates 1>, <&ir_clk>; ++ clock-names = "apb", "ir"; ++ resets = <&apb0_reset 1>; ++ interrupts = ; ++ reg = <0x01f02000 0x40>; ++ status = "disabled"; ++ }; ++ ++ r_pio: pinctrl@01f02c00 { ++ compatible = "allwinner,sun8i-h3-r-pinctrl"; ++ reg = <0x01f02c00 0x400>; ++ interrupts = ; ++ clocks = <&apb0_gates 0>; ++ resets = <&apb0_reset 0>; ++ gpio-controller; ++ #gpio-cells = <3>; ++ interrupt-controller; ++ #interrupt-cells = <3>; ++ ++ ir_pins_a: ir@0 { ++ allwinner,pins = "PL11"; ++ allwinner,function = "s_cir_rx"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ }; + }; + }; +--- a/arch/arm/dts/sun8i-q8-common.dtsi ++++ b/arch/arm/dts/sun8i-q8-common.dtsi +@@ -41,11 +41,23 @@ + */ + #include "sunxi-q8-common.dtsi" + ++#include ++ + / { + aliases { + serial0 = &r_uart; + }; + ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bl_en_pin_q8>; ++ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; ++ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; ++ default-brightness-level = <8>; ++ enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ ++ }; ++ + chosen { + stdout-path = "serial0:115200n8"; + }; +@@ -54,7 +66,7 @@ + &mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>; +- vmmc-supply = <®_vcc3v0>; ++ vmmc-supply = <®_dcdc1>; + bus-width = <4>; + cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ + cd-inverted; +@@ -77,8 +89,90 @@ + }; + }; + ++&r_rsb { ++ status = "okay"; ++ ++ axp22x: pmic@3a3 { ++ compatible = "x-powers,axp223"; ++ reg = <0x3a3>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ eldoin-supply = <®_dcdc1>; ++ }; ++}; ++ ++#include "axp22x.dtsi" ++ ++®_aldo1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-io"; ++}; ++ ++®_aldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <2350000>; ++ regulator-max-microvolt = <2650000>; ++ regulator-name = "vdd-dll"; ++}; ++ ++®_aldo3 { ++ regulator-always-on; ++ regulator-min-microvolt = <2700000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-pll-avcc"; ++}; ++ ++®_dc1sw { ++ regulator-name = "vcc-lcd"; ++}; ++ ++®_dc5ldo { ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpus"; ++}; ++ ++®_dcdc1 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "vcc-3v0"; ++}; ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-sys"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc5 { ++ regulator-always-on; ++ regulator-min-microvolt = <1500000>; ++ regulator-max-microvolt = <1500000>; ++ regulator-name = "vcc-dram"; ++}; ++ ++®_rtc_ldo { ++ regulator-name = "vcc-rtc"; ++}; ++ + &r_uart { + pinctrl-names = "default"; + pinctrl-0 = <&r_uart_pins_a>; + status = "okay"; + }; ++ ++&simplefb_lcd { ++ vcc-lcd-supply = <®_dc1sw>; ++}; +--- a/arch/arm/dts/sun9i-a80-cubieboard4.dts ++++ b/arch/arm/dts/sun9i-a80-cubieboard4.dts +@@ -62,9 +62,31 @@ + stdout-path = "serial0:115200n8"; + }; + ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&led_pins_cubieboard4>; ++ ++ green { ++ label = "cubieboard4:green:usr"; ++ gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */ ++ }; ++ ++ red { ++ label = "cubieboard4:red:usr"; ++ gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ ++ }; ++ }; + }; + + &pio { ++ led_pins_cubieboard4: led-pins@0 { ++ allwinner,pins = "PH6", "PH17"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ + mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 { + allwinner,pins = "PH18"; + allwinner,function = "gpio_in"; +@@ -89,6 +111,20 @@ + vmmc-supply = <®_vcc3v0>; + bus-width = <8>; + non-removable; ++ cap-mmc-hw-reset; ++ status = "okay"; ++}; ++ ++&mmc2_8bit_pins { ++ /* Increase drive strength for DDR modes */ ++ allwinner,drive = ; ++}; ++ ++&r_ir { ++ status = "okay"; ++}; ++ ++&r_rsb { + status = "okay"; + }; + +--- a/arch/arm/dts/sun9i-a80-optimus.dts ++++ b/arch/arm/dts/sun9i-a80-optimus.dts +@@ -65,7 +65,7 @@ + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; +- pinctrl-0 = <&led_pins_optimus>; ++ pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>; + + /* The LED names match those found on the board */ + +@@ -74,7 +74,10 @@ + gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; + }; + +- /* led3 is on PM15, in R_PIO */ ++ led3 { ++ label = "optimus:led3:usr"; ++ gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */ ++ }; + + led4 { + label = "optimus:led4:usr"; +@@ -106,17 +109,6 @@ + status = "okay"; + }; + +-&i2c3 { +- pinctrl-names = "default"; +- pinctrl-0 = <&i2c3_pins_a>; +- status = "okay"; +-}; +- +-&i2c3_pins_a { +- /* Enable internal pull-up */ +- allwinner,pull = ; +-}; +- + &ohci0 { + status = "okay"; + }; +@@ -171,30 +163,42 @@ + vmmc-supply = <®_vcc3v0>; + bus-width = <8>; + non-removable; ++ cap-mmc-hw-reset; + status = "okay"; + }; + ++&mmc2_8bit_pins { ++ /* Increase drive strength for DDR modes */ ++ allwinner,drive = ; ++}; ++ + ®_usb1_vbus { + pinctrl-0 = <&usb1_vbus_pin_optimus>; + gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ + status = "okay"; + }; + +-&uart0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins_a>; ++&r_ir { + status = "okay"; + }; + +-&uart4 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart4_pins_a>; ++&r_pio { ++ led_r_pins_optimus: led-pins@1 { ++ allwinner,pins = "PM15"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++}; ++ ++&r_rsb { + status = "okay"; + }; + +-&uart4_pins_a { +- /* Enable internal pull-up */ +- allwinner,pull = ; ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; + }; + + &usbphy1 { +--- a/arch/arm/dts/sun9i-a80.dtsi ++++ b/arch/arm/dts/sun9i-a80.dtsi +@@ -128,6 +128,17 @@ + */ + ranges = <0 0 0 0x20000000>; + ++ /* ++ * This clock is actually configurable from the PRCM address ++ * space. The external 24M oscillator can be turned off, and ++ * the clock switched to an internal 16M RC oscillator. Under ++ * normal operation there's no reason to do this, and the ++ * default is to use the external good one, so just model this ++ * as a fixed clock. Also it is not entirely clear if the ++ * osc24M mux in the PRCM affects the entire clock tree, which ++ * would also throw all the PLL clock rates off, or just the ++ * downstream clocks in the PRCM. ++ */ + osc24M: osc24M_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; +@@ -135,6 +146,13 @@ + clock-output-names = "osc24M"; + }; + ++ /* ++ * The 32k clock is from an external source, normally the ++ * AC100 codec/RTC chip. This clock is by default enabled ++ * and clocked at 32768 Hz, from the oscillator connected ++ * to the AC100. It is configurable, but no such driver or ++ * bindings exist yet. ++ */ + osc32k: osc32k_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; +@@ -164,6 +182,14 @@ + "usb_phy2", "usb_hsic_12M"; + }; + ++ pll3: clk@06000008 { ++ /* placeholder until implemented */ ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-rate = <0>; ++ clock-output-names = "pll3"; ++ }; ++ + pll4: clk@0600000c { + #clock-cells = <0>; + compatible = "allwinner,sun9i-a80-pll4-clk"; +@@ -277,9 +303,12 @@ + compatible = "allwinner,sun9i-a80-ahb0-gates-clk"; + reg = <0x06000580 0x4>; + clocks = <&ahb0>; +- clock-indices = <0>, <1>, <3>, <5>, <8>, <12>, <13>, +- <14>, <15>, <16>, <18>, <20>, <21>, +- <22>, <23>; ++ clock-indices = <0>, <1>, <3>, ++ <5>, <8>, <12>, ++ <13>, <14>, ++ <15>, <16>, <18>, ++ <20>, <21>, <22>, ++ <23>; + clock-output-names = "ahb0_fd", "ahb0_ve", "ahb0_gpu", + "ahb0_ss", "ahb0_sd", "ahb0_nand1", + "ahb0_nand0", "ahb0_sdram", +@@ -293,7 +322,10 @@ + compatible = "allwinner,sun9i-a80-ahb1-gates-clk"; + reg = <0x06000584 0x4>; + clocks = <&ahb1>; +- clock-indices = <0>, <1>, <17>, <21>, <22>, <23>, <24>; ++ clock-indices = <0>, <1>, ++ <17>, <21>, ++ <22>, <23>, ++ <24>; + clock-output-names = "ahb1_usbotg", "ahb1_usbhci", + "ahb1_gmac", "ahb1_msgbox", + "ahb1_spinlock", "ahb1_hstimer", +@@ -305,8 +337,9 @@ + compatible = "allwinner,sun9i-a80-ahb2-gates-clk"; + reg = <0x06000588 0x4>; + clocks = <&ahb2>; +- clock-indices = <0>, <1>, <2>, <4>, <5>, <7>, <8>, +- <11>; ++ clock-indices = <0>, <1>, ++ <2>, <4>, <5>, ++ <7>, <8>, <11>; + clock-output-names = "ahb2_lcd0", "ahb2_lcd1", + "ahb2_edp", "ahb2_csi", "ahb2_hdmi", + "ahb2_de", "ahb2_mp", "ahb2_mipi_dsi"; +@@ -317,8 +350,10 @@ + compatible = "allwinner,sun9i-a80-apb0-gates-clk"; + reg = <0x06000590 0x4>; + clocks = <&apb0>; +- clock-indices = <1>, <5>, <11>, <12>, <13>, <15>, +- <17>, <18>, <19>; ++ clock-indices = <1>, <5>, ++ <11>, <12>, <13>, ++ <15>, <17>, <18>, ++ <19>; + clock-output-names = "apb0_spdif", "apb0_pio", + "apb0_ac97", "apb0_i2s0", "apb0_i2s1", + "apb0_lradc", "apb0_gpadc", "apb0_twd", +@@ -330,14 +365,79 @@ + compatible = "allwinner,sun9i-a80-apb1-gates-clk"; + reg = <0x06000594 0x4>; + clocks = <&apb1>; +- clock-indices = <0>, <1>, <2>, <3>, <4>, +- <16>, <17>, <18>, <19>, <20>, <21>; ++ clock-indices = <0>, <1>, ++ <2>, <3>, <4>, ++ <16>, <17>, ++ <18>, <19>, ++ <20>, <21>; + clock-output-names = "apb1_i2c0", "apb1_i2c1", + "apb1_i2c2", "apb1_i2c3", "apb1_i2c4", + "apb1_uart0", "apb1_uart1", + "apb1_uart2", "apb1_uart3", + "apb1_uart4", "apb1_uart5"; + }; ++ ++ cpus_clk: clk@08001410 { ++ compatible = "allwinner,sun9i-a80-cpus-clk"; ++ reg = <0x08001410 0x4>; ++ #clock-cells = <0>; ++ clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>; ++ clock-output-names = "cpus"; ++ }; ++ ++ ahbs: ahbs_clk { ++ compatible = "fixed-factor-clock"; ++ #clock-cells = <0>; ++ clock-div = <1>; ++ clock-mult = <1>; ++ clocks = <&cpus_clk>; ++ clock-output-names = "ahbs"; ++ }; ++ ++ apbs: clk@0800141c { ++ compatible = "allwinner,sun8i-a23-apb0-clk"; ++ reg = <0x0800141c 0x4>; ++ #clock-cells = <0>; ++ clocks = <&ahbs>; ++ clock-output-names = "apbs"; ++ }; ++ ++ apbs_gates: clk@08001428 { ++ compatible = "allwinner,sun9i-a80-apbs-gates-clk"; ++ reg = <0x08001428 0x4>; ++ #clock-cells = <1>; ++ clocks = <&apbs>; ++ clock-indices = <0>, <1>, ++ <2>, <3>, ++ <4>, <5>, ++ <6>, <7>, ++ <12>, <13>, ++ <16>, <17>, ++ <18>, <20>; ++ clock-output-names = "apbs_pio", "apbs_ir", ++ "apbs_timer", "apbs_rsb", ++ "apbs_uart", "apbs_1wire", ++ "apbs_i2c0", "apbs_i2c1", ++ "apbs_ps2_0", "apbs_ps2_1", ++ "apbs_dma", "apbs_i2s0", ++ "apbs_i2s1", "apbs_twd"; ++ }; ++ ++ r_1wire_clk: clk@08001450 { ++ reg = <0x08001450 0x4>; ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ clocks = <&osc32k>, <&osc24M>; ++ clock-output-names = "r_1wire"; ++ }; ++ ++ r_ir_clk: clk@08001454 { ++ reg = <0x08001454 0x4>; ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ clocks = <&osc32k>, <&osc24M>; ++ clock-output-names = "r_ir"; ++ }; + }; + + soc { +@@ -443,7 +543,7 @@ + }; + + mmc0: mmc@01c0f000 { +- compatible = "allwinner,sun5i-a13-mmc"; ++ compatible = "allwinner,sun9i-a80-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>, + <&mmc0_clk 1>, <&mmc0_clk 2>; +@@ -457,7 +557,7 @@ + }; + + mmc1: mmc@01c10000 { +- compatible = "allwinner,sun5i-a13-mmc"; ++ compatible = "allwinner,sun9i-a80-mmc"; + reg = <0x01c10000 0x1000>; + clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>, + <&mmc1_clk 1>, <&mmc1_clk 2>; +@@ -471,7 +571,7 @@ + }; + + mmc2: mmc@01c11000 { +- compatible = "allwinner,sun5i-a13-mmc"; ++ compatible = "allwinner,sun9i-a80-mmc"; + reg = <0x01c11000 0x1000>; + clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>, + <&mmc2_clk 1>, <&mmc2_clk 2>; +@@ -485,7 +585,7 @@ + }; + + mmc3: mmc@01c12000 { +- compatible = "allwinner,sun5i-a13-mmc"; ++ compatible = "allwinner,sun9i-a80-mmc"; + reg = <0x01c12000 0x1000>; + clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>, + <&mmc3_clk 1>, <&mmc3_clk 2>; +@@ -582,7 +682,7 @@ + clocks = <&apb0_gates 5>; + gpio-controller; + interrupt-controller; +- #interrupt-cells = <2>; ++ #interrupt-cells = <3>; + #size-cells = <0>; + #gpio-cells = <3>; + +@@ -604,7 +704,8 @@ + mmc2_8bit_pins: mmc2_8bit { + allwinner,pins = "PC6", "PC7", "PC8", "PC9", + "PC10", "PC11", "PC12", +- "PC13", "PC14", "PC15"; ++ "PC13", "PC14", "PC15", ++ "PC16"; + allwinner,function = "mmc2"; + allwinner,drive = ; + allwinner,pull = ; +@@ -752,14 +853,83 @@ + interrupts = ; + }; + ++ apbs_rst: reset@080014b0 { ++ reg = <0x080014b0 0x4>; ++ compatible = "allwinner,sun6i-a31-clock-reset"; ++ #reset-cells = <1>; ++ }; ++ ++ nmi_intc: interrupt-controller@080015a0 { ++ compatible = "allwinner,sun9i-a80-nmi"; ++ interrupt-controller; ++ #interrupt-cells = <2>; ++ reg = <0x080015a0 0xc>; ++ interrupts = ; ++ }; ++ ++ r_ir: ir@08002000 { ++ compatible = "allwinner,sun5i-a13-ir"; ++ interrupts = ; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&r_ir_pins>; ++ clocks = <&apbs_gates 1>, <&r_ir_clk>; ++ clock-names = "apb", "ir"; ++ resets = <&apbs_rst 1>; ++ reg = <0x08002000 0x40>; ++ status = "disabled"; ++ }; ++ + r_uart: serial@08002800 { + compatible = "snps,dw-apb-uart"; + reg = <0x08002800 0x400>; + interrupts = ; + reg-shift = <2>; + reg-io-width = <4>; +- clocks = <&osc24M>; ++ clocks = <&apbs_gates 4>; ++ resets = <&apbs_rst 4>; + status = "disabled"; + }; ++ ++ r_pio: pinctrl@08002c00 { ++ compatible = "allwinner,sun9i-a80-r-pinctrl"; ++ reg = <0x08002c00 0x400>; ++ interrupts = , ++ ; ++ clocks = <&apbs_gates 0>; ++ resets = <&apbs_rst 0>; ++ gpio-controller; ++ interrupt-controller; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ #gpio-cells = <3>; ++ ++ r_ir_pins: r_ir { ++ allwinner,pins = "PL6"; ++ allwinner,function = "s_cir_rx"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ r_rsb_pins: r_rsb { ++ allwinner,pins = "PN0", "PN1"; ++ allwinner,function = "s_rsb"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ }; ++ ++ r_rsb: i2c@08003400 { ++ compatible = "allwinner,sun8i-a23-rsb"; ++ reg = <0x08003400 0x400>; ++ interrupts = ; ++ clocks = <&apbs_gates 3>; ++ clock-frequency = <3000000>; ++ resets = <&apbs_rst 3>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&r_rsb_pins>; ++ status = "disabled"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; + }; + }; +--- /dev/null ++++ b/arch/arm/dts/sunxi-itead-core-common.dtsi +@@ -0,0 +1,136 @@ ++/* ++ * Copyright 2015 - Marcus Cooper ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) 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 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file 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. ++ * ++ * Or, alternatively, ++ * ++ * b) 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 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. ++ */ ++ ++#include "sunxi-common-regulators.dtsi" ++ ++/ { ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++}; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++}; ++ ++&ehci0 { ++ status = "okay"; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins_a>; ++ status = "okay"; ++ ++ axp209: pmic@34 { ++ reg = <0x34>; ++ }; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++}; ++ ++&ohci0 { ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++#include "axp209.dtsi" ++ ++®_dcdc2 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-cpu"; ++}; ++ ++®_dcdc3 { ++ regulator-always-on; ++ regulator-min-microvolt = <1000000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-name = "vdd-int-dll"; ++}; ++ ++®_ldo1 { ++ regulator-name = "vdd-rtc"; ++}; ++ ++®_ldo2 { ++ regulator-always-on; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3000000>; ++ regulator-name = "avcc"; ++}; ++ ++®_usb1_vbus { ++ status = "okay"; ++}; ++ ++®_usb2_vbus { ++ status = "okay"; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++}; ++ ++&usbphy { ++ usb1_vbus-supply = <®_usb1_vbus>; ++ usb2_vbus-supply = <®_usb2_vbus>; ++ status = "okay"; ++}; +--- a/arch/arm/dts/sunxi-q8-common.dtsi ++++ b/arch/arm/dts/sunxi-q8-common.dtsi +@@ -75,3 +75,9 @@ + voltage = <400000>; + }; + }; ++ ++&pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm0_pins>; ++ status = "okay"; ++}; diff --git a/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch b/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch new file mode 100644 index 000000000..45416703a --- /dev/null +++ b/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch @@ -0,0 +1,38 @@ +From 730d2f3a41c5ccae71b5008fffdf697d143be68c Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Wed, 16 Mar 2016 20:44:51 +0100 +Subject: [PATCH] sunxi: Fix clock_twi_onoff for sun6i + +The clock_sun6i.c implementation was not deasserting the reset for +the regular i2c controllers, this commit fixes this. + +Signed-off-by: Hans de Goede +Acked-by: Ian Campbell +--- + arch/arm/cpu/armv7/sunxi/clock_sun6i.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +--- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c ++++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c +@@ -100,13 +100,18 @@ int clock_twi_onoff(int port, int state) + return 0; + } + +- /* set the apb clock gate for twi */ +- if (state) ++ /* set the apb clock gate and reset for twi */ ++ if (state) { + setbits_le32(&ccm->apb2_gate, + CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port)); +- else ++ setbits_le32(&ccm->apb2_reset_cfg, ++ 1 << (APB2_RESET_TWI_SHIFT + port)); ++ } else { ++ clrbits_le32(&ccm->apb2_reset_cfg, ++ 1 << (APB2_RESET_TWI_SHIFT + port)); + clrbits_le32(&ccm->apb2_gate, + CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port)); ++ } + + return 0; + } diff --git a/package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch b/package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch new file mode 100644 index 000000000..47f825c57 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch @@ -0,0 +1,24 @@ +From 1eae8f66ff749409eb96e2f3f3387c56232d0b8a Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Wed, 16 Mar 2016 13:46:22 +0100 +Subject: [PATCH] sunxi: Enable realtek phy support + +Enable building of drivers/net/phy/realtek.c so that realtek phys +get properly initialized. + +Signed-off-by: Hans de Goede +Acked-by: Ian Campbell +--- + include/configs/sunxi-common.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/configs/sunxi-common.h ++++ b/include/configs/sunxi-common.h +@@ -314,6 +314,7 @@ extern int soft_i2c_gpio_scl; + #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */ + #define CONFIG_PHY_ADDR 1 + #define CONFIG_MII /* MII PHY management */ ++#define CONFIG_PHY_REALTEK + #endif + + #ifdef CONFIG_USB_EHCI_HCD diff --git a/package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch b/package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch new file mode 100644 index 000000000..cf511ce77 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch @@ -0,0 +1,127 @@ +From fc8991c61c393ce6a9d3dfc97cb56dbbd9e8cbba Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Thu, 17 Mar 2016 13:53:03 +0100 +Subject: [PATCH] sunxi: Fix gmac not working due to cpu_eth_init no longer + being called + +cpu_eth_init is no longer called for dm enabled eth drivers, this +was causing the sunxi gmac eth controller to no longer work in u-boot. + +This commit fixes this by calling the clock, reset and pinmux setup +function from s_init() and enabling the phy power pin (if any) from +board_init(). + +The enabling of phy power cannot be done from s_init because it uses dm +and dm is not ready yet at this point. + +Note that the mdelay is dropped as the phy gets enabled much earlier +now, so it is no longer needed. + +Signed-off-by: Hans de Goede +Acked-by: Ian Campbell +Tested-by: Karsten Merker +Tested-by: Michael Haas +--- + arch/arm/cpu/armv7/sunxi/board.c | 28 +--------------------------- + arch/arm/include/asm/arch-sunxi/sys_proto.h | 6 +++++- + board/sunxi/board.c | 5 +++++ + board/sunxi/gmac.c | 14 +------------- + 4 files changed, 12 insertions(+), 41 deletions(-) + +--- a/arch/arm/cpu/armv7/sunxi/board.c ++++ b/arch/arm/cpu/armv7/sunxi/board.c +@@ -136,6 +136,7 @@ void s_init(void) + timer_init(); + gpio_init(); + i2c_init_board(); ++ eth_init_board(); + } + + #ifdef CONFIG_SPL_BUILD +@@ -243,30 +244,3 @@ void enable_caches(void) + dcache_enable(); + } + #endif +- +-#ifdef CONFIG_CMD_NET +-/* +- * Initializes on-chip ethernet controllers. +- * to override, implement board_eth_init() +- */ +-int cpu_eth_init(bd_t *bis) +-{ +- __maybe_unused int rc; +- +-#ifdef CONFIG_MACPWR +- gpio_request(CONFIG_MACPWR, "macpwr"); +- gpio_direction_output(CONFIG_MACPWR, 1); +- mdelay(200); +-#endif +- +-#ifdef CONFIG_SUNXI_GMAC +- rc = sunxi_gmac_initialize(bis); +- if (rc < 0) { +- printf("sunxi: failed to initialize gmac\n"); +- return rc; +- } +-#endif +- +- return 0; +-} +-#endif +--- a/arch/arm/include/asm/arch-sunxi/sys_proto.h ++++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h +@@ -24,6 +24,10 @@ void sdelay(unsigned long); + void return_to_fel(uint32_t lr, uint32_t sp); + + /* Board / SoC level designware gmac init */ +-int sunxi_gmac_initialize(bd_t *bis); ++#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC ++void eth_init_board(void); ++#else ++static inline void eth_init_board(void) {} ++#endif + + #endif +--- a/board/sunxi/board.c ++++ b/board/sunxi/board.c +@@ -90,6 +90,11 @@ int board_init(void) + if (ret) + return ret; + ++#ifdef CONFIG_MACPWR ++ gpio_request(CONFIG_MACPWR, "macpwr"); ++ gpio_direction_output(CONFIG_MACPWR, 1); ++#endif ++ + /* Uses dm gpio code so do this here and not in i2c_init_board() */ + return soft_i2c_board_init(); + } +--- a/board/sunxi/gmac.c ++++ b/board/sunxi/gmac.c +@@ -6,7 +6,7 @@ + #include + #include + +-int sunxi_gmac_initialize(bd_t *bis) ++void eth_init_board(void) + { + int pin; + struct sunxi_ccm_reg *const ccm = +@@ -79,16 +79,4 @@ int sunxi_gmac_initialize(bd_t *bis) + for (pin = SUNXI_GPA(26); pin <= SUNXI_GPA(27); pin++) + sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_GMAC); + #endif +- +-#ifdef CONFIG_DM_ETH +- return 0; +-#else +-# ifdef CONFIG_RGMII +- return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_RGMII); +-# elif defined CONFIG_GMII +- return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_GMII); +-# else +- return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_MII); +-# endif +-#endif + } diff --git a/package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch b/package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch new file mode 100644 index 000000000..95a77c68d --- /dev/null +++ b/package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch @@ -0,0 +1,78 @@ +From 948603d4d637a0e04a3214253b911cfc4ed11220 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 21 Mar 2016 14:44:35 +0100 +Subject: [PATCH] sunxi: Fix 2nd usb controller on sun4i/sun7i no longer + working + +The 2nd usb controller on sun4i/sun7i has its base address 0x8000 +bytes from the 1st one, rather then 0x1000. Also the ahb clk gates +are interleaved with the ohci clk-gates introducing a hole between +the clks for usb1 and usb2. + +Signed-off-by: Hans de Goede +Acked-by: Ian Campbell +--- + drivers/usb/host/ehci-sunxi.c | 13 +++++++++++-- + drivers/usb/host/ohci-sunxi.c | 15 ++++++++++++--- + 2 files changed, 23 insertions(+), 5 deletions(-) + +--- a/drivers/usb/host/ehci-sunxi.c ++++ b/drivers/usb/host/ehci-sunxi.c +@@ -17,6 +17,14 @@ + #include + #include "ehci.h" + ++#ifdef CONFIG_SUNXI_GEN_SUN4I ++#define BASE_DIST 0x8000 ++#define AHB_CLK_DIST 2 ++#else ++#define BASE_DIST 0x1000 ++#define AHB_CLK_DIST 1 ++#endif ++ + struct ehci_sunxi_priv { + struct ehci_ctrl ehci; + int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */ +@@ -39,8 +47,9 @@ static int ehci_usb_probe(struct udevice + #ifdef CONFIG_MACH_SUN8I_H3 + priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_OHCI0; + #endif +- priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / 0x1000 + 1; +- priv->ahb_gate_mask <<= priv->phy_index - 1; ++ priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / BASE_DIST; ++ priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST; ++ priv->phy_index++; /* Non otg phys start at 1 */ + + setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask); + #ifdef CONFIG_SUNXI_GEN_SUN6I +--- a/drivers/usb/host/ohci-sunxi.c ++++ b/drivers/usb/host/ohci-sunxi.c +@@ -17,6 +17,14 @@ + #include + #include "ohci.h" + ++#ifdef CONFIG_SUNXI_GEN_SUN4I ++#define BASE_DIST 0x8000 ++#define AHB_CLK_DIST 2 ++#else ++#define BASE_DIST 0x1000 ++#define AHB_CLK_DIST 1 ++#endif ++ + struct ohci_sunxi_priv { + ohci_t ohci; + int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */ +@@ -42,9 +50,10 @@ static int ohci_usb_probe(struct udevice + priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_EHCI0; + #endif + priv->usb_gate_mask = CCM_USB_CTRL_OHCI0_CLK; +- priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / 0x1000 + 1; +- priv->ahb_gate_mask <<= priv->phy_index - 1; +- priv->usb_gate_mask <<= priv->phy_index - 1; ++ priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / BASE_DIST; ++ priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST; ++ priv->usb_gate_mask <<= priv->phy_index; ++ priv->phy_index++; /* Non otg phys start at 1 */ + + setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask); + setbits_le32(&ccm->usb_clk_cfg, priv->usb_gate_mask); diff --git a/package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch b/package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch new file mode 100644 index 000000000..04a2af72e --- /dev/null +++ b/package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch @@ -0,0 +1,31 @@ +From 8f10b5c65611e6c15a113bf63289b6696452f90d Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sun, 20 Mar 2016 14:17:10 +0100 +Subject: [PATCH] spl: Print from which mmc slot spl is trying to boot + +On some sunxi boards (and presumably also non sunxi boards) u-boot can +be either loaded from a sdcard in a micro-sd slot, or from eMMC. + +Print which MMC spl tries to boot from, to help debugging. + +Signed-off-by: Hans de Goede +Reviewed-by: Tom Rini +--- + common/spl/spl.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/common/spl/spl.c ++++ b/common/spl/spl.c +@@ -210,9 +210,9 @@ struct boot_device_name boot_name_table[ + { BOOT_DEVICE_RAM, "RAM" }, + #endif + #ifdef CONFIG_SPL_MMC_SUPPORT +- { BOOT_DEVICE_MMC1, "MMC" }, +- { BOOT_DEVICE_MMC2, "MMC" }, +- { BOOT_DEVICE_MMC2_2, "MMC" }, ++ { BOOT_DEVICE_MMC1, "MMC1" }, ++ { BOOT_DEVICE_MMC2, "MMC2" }, ++ { BOOT_DEVICE_MMC2_2, "MMC2_2" }, + #endif + #ifdef CONFIG_SPL_NAND_SUPPORT + { BOOT_DEVICE_NAND, "NAND" }, diff --git a/package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch b/package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch new file mode 100644 index 000000000..098fe7203 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch @@ -0,0 +1,39 @@ +From 60fa63012fcdc3c4ec1497bf5e358f0a90b40949 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 18 Mar 2016 08:42:01 +0100 +Subject: [PATCH] sunxi: Add support for USB vbus pin for USB3 + +The H3 has USB0 - USB3, add support for having a USB vbus pin for USB3. + +Signed-off-by: Hans de Goede +Acked-by: Ian Campbell +--- + arch/arm/cpu/armv7/sunxi/usb_phy.c | 1 + + board/sunxi/Kconfig | 6 ++++++ + 2 files changed, 7 insertions(+) + +--- a/arch/arm/cpu/armv7/sunxi/usb_phy.c ++++ b/arch/arm/cpu/armv7/sunxi/usb_phy.c +@@ -76,6 +76,7 @@ static int get_vbus_gpio(int index) + case 0: return sunxi_name_to_gpio(CONFIG_USB0_VBUS_PIN); + case 1: return sunxi_name_to_gpio(CONFIG_USB1_VBUS_PIN); + case 2: return sunxi_name_to_gpio(CONFIG_USB2_VBUS_PIN); ++ case 3: return sunxi_name_to_gpio(CONFIG_USB3_VBUS_PIN); + } + return -EINVAL; + } +--- a/board/sunxi/Kconfig ++++ b/board/sunxi/Kconfig +@@ -341,6 +341,12 @@ config USB2_VBUS_PIN + ---help--- + See USB1_VBUS_PIN help text. + ++config USB3_VBUS_PIN ++ string "Vbus enable pin for usb3 (ehci2)" ++ default "" ++ ---help--- ++ See USB1_VBUS_PIN help text. ++ + config I2C0_ENABLE + bool "Enable I2C/TWI controller 0" + default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I diff --git a/package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch b/package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch new file mode 100644 index 000000000..a216bc9f1 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch @@ -0,0 +1,31 @@ +From ce0d0926758f631fdd655d438acd32d5935d43a4 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 18 Mar 2016 08:45:21 +0100 +Subject: [PATCH] sunxi: Specify USB vbus pins for orangepi boards + +This fixes the USB ports not working on the orangepi_plus and stops us +from messing with gpio-s which we should not touch on the orangepi_pc. + +Signed-off-by: Hans de Goede +Acked-by: Ian Campbell +--- + configs/orangepi_pc_defconfig | 3 +++ + configs/orangepi_plus_defconfig | 1 + + 2 files changed, 4 insertions(+) + +--- a/configs/orangepi_pc_defconfig ++++ b/configs/orangepi_pc_defconfig +@@ -14,3 +14,6 @@ CONFIG_SPL=y + CONFIG_CMD_GPIO=y + CONFIG_SY8106A_POWER=y + CONFIG_USB_EHCI_HCD=y ++CONFIG_USB1_VBUS_PIN="" ++CONFIG_USB2_VBUS_PIN="" ++CONFIG_USB3_VBUS_PIN="" +--- a/configs/orangepi_plus_defconfig ++++ b/configs/orangepi_plus_defconfig +@@ -14,3 +14,4 @@ CONFIG_SPL=y + CONFIG_CMD_GPIO=y + CONFIG_SY8106A_POWER=y + CONFIG_USB_EHCI_HCD=y ++CONFIG_USB1_VBUS_PIN="PG13" diff --git a/package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch b/package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch new file mode 100644 index 000000000..e7b8cd73d --- /dev/null +++ b/package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch @@ -0,0 +1,33 @@ +From 70fe24ed93fa90eb407d18a5fc9d9ad85ac9184c Mon Sep 17 00:00:00 2001 +From: Chen-Yu Tsai +Date: Wed, 27 Jan 2016 16:34:43 +0800 +Subject: [PATCH] sunxi: Support SID e-fuses on A83T and H3 + +On the A83T and H3, the SID block is at a different address. +Furthurmore, the e-fuses are at an offset of 0x200 within the +hardware's address space. + +Signed-off-by: Chen-Yu Tsai +Acked-by: Hans de Goede +Signed-off-by: Hans de Goede +--- + arch/arm/include/asm/arch-sunxi/cpu_sun4i.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h ++++ b/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h +@@ -82,7 +82,14 @@ + #define SUNXI_AD_DA_BASE 0x01c22c00 + #define SUNXI_KEYPAD_BASE 0x01c23000 + #define SUNXI_TZPC_BASE 0x01c23400 ++ ++#if defined(CONFIG_MACH_SUN8I_A83T) || defined(CONFIG_MACH_SUN8I_H3) ++/* SID address space starts at 0x01c1400, but e-fuse is at offset 0x200 */ ++#define SUNXI_SID_BASE 0x01c14200 ++#else + #define SUNXI_SID_BASE 0x01c23800 ++#endif ++ + #define SUNXI_SJTAG_BASE 0x01c23c00 + + #define SUNXI_TP_BASE 0x01c25000 diff --git a/package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch b/package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch new file mode 100644 index 000000000..d49fc9737 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch @@ -0,0 +1,23 @@ +From 2af25b747340c6c8f6a6b9e27632db577bf4da52 Mon Sep 17 00:00:00 2001 +From: Simon Glass +Date: Mon, 22 Feb 2016 22:55:46 -0700 +Subject: [PATCH] sunxi: Display the board model on start-up + +It is useful to know which sunxi board you are booting. Display this on +start-up to avoid confusion. + +Signed-off-by: Simon Glass +--- + include/configs/sunxi-common.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/configs/sunxi-common.h ++++ b/include/configs/sunxi-common.h +@@ -174,6 +174,7 @@ + + #define CONFIG_SYS_MONITOR_LEN (768 << 10) /* 768 KiB */ + #define CONFIG_IDENT_STRING " Allwinner Technology" ++#define CONFIG_DISPLAY_BOARDINFO + + #define CONFIG_ENV_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */ + #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ diff --git a/package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch b/package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch deleted file mode 100644 index a7bfdd62d..000000000 --- a/package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 335d30050b0d02444c9297f7a9b0cbf75dce847f Mon Sep 17 00:00:00 2001 -From: Olliver Schinagl -Date: Fri, 12 May 2017 11:38:54 +0200 -Subject: sun7i: Add support for Olimex A20-OLinuXino-LIME2-eMMC - -This patch adds support for the Olimex OLinuXino Lime2 with eMMC flash -storage. -https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2-eMMC/ - -It is a assembly variant of the regular Lime2 but featuring eMMC for -storage. - -Signed-off-by: Olliver Schinagl -Signed-off-by: Jagan Teki -Acked-by: Maxime Ripard -Reviewed-by: Jagan Teki ---- - board/sunxi/MAINTAINERS | 5 +++++ - configs/A20-OLinuXino-Lime2-eMMC_defconfig | 36 ++++++++++++++++++++++++++++++ - 2 files changed, 41 insertions(+) - create mode 100644 configs/A20-OLinuXino-Lime2-eMMC_defconfig - ---- a/board/sunxi/MAINTAINERS -+++ b/board/sunxi/MAINTAINERS -@@ -88,6 +88,11 @@ M: Iain Paton - S: Maintained - F: configs/A20-OLinuXino-Lime2_defconfig - -+A20-OLINUXINO-LIME2-EMMC BOARD -+M: Olliver Schinagl -+S: Maintained -+F: configs/A20-OLinuXino-Lime2-eMMC_defconfig -+ - A33-OLINUXINO BOARD - M: Stefan Mavrodiev - S: Maintained ---- /dev/null -+++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig -@@ -0,0 +1,37 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_SUNXI=y -+CONFIG_MACH_SUN7I=y -+CONFIG_DRAM_CLK=384 -+CONFIG_MMC0_CD_PIN="PH1" -+CONFIG_MMC_SUNXI_SLOT_EXTRA=2 -+CONFIG_USB0_VBUS_PIN="PC17" -+CONFIG_USB0_VBUS_DET="PH5" -+CONFIG_I2C1_ENABLE=y -+CONFIG_SATAPWR="PC3" -+CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2-emmc" -+CONFIG_AHCI=y -+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set -+CONFIG_SPL=y -+CONFIG_SPL_I2C_SUPPORT=y -+# CONFIG_CMD_IMLS is not set -+# CONFIG_CMD_FLASH is not set -+CONFIG_CMD_DFU=y -+CONFIG_CMD_USB_MASS_STORAGE=y -+# CONFIG_CMD_FPGA is not set -+# CONFIG_SPL_DOS_PARTITION is not set -+# CONFIG_SPL_ISO_PARTITION is not set -+# CONFIG_SPL_PARTITION_UUIDS is not set -+CONFIG_DFU_RAM=y -+CONFIG_ETH_DESIGNWARE=y -+CONFIG_RGMII=y -+CONFIG_SUN7I_GMAC=y -+CONFIG_GMAC_TX_DELAY=1 -+CONFIG_AXP_ALDO3_VOLT=2800 -+CONFIG_AXP_ALDO4_VOLT=2800 -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_MUSB_GADGET=y -+CONFIG_USB_GADGET=y -+CONFIG_USB_GADGET_DOWNLOAD=y -+CONFIG_G_DNL_MANUFACTURER="Allwinner Technology" -+CONFIG_G_DNL_VENDOR_NUM=0x1f3a -+CONFIG_G_DNL_PRODUCT_NUM=0x1010 diff --git a/package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch b/package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch deleted file mode 100644 index 8db3e67e5..000000000 --- a/package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch +++ /dev/null @@ -1,31 +0,0 @@ -From fb7fe04da2187b9853d713cb643d01bd56813e3d Mon Sep 17 00:00:00 2001 -From: Emmanuel Vadot -Date: Fri, 12 May 2017 11:38:53 +0200 -Subject: ARM: dts: sunxi: Change node name for pwrseq pin on - Olinuxino-lime2-emmc - -The node name for the power seq pin is mmc2@0 like the mmc2_pins_a one. -This makes the original node (mmc2_pins_a) scrapped out of the dtb and -result in a unusable eMMC if U-Boot didn't configured the pins to the -correct functions. - -Signed-off-by: Emmanuel Vadot -Signed-off-by: Maxime Ripard -Signed-off-by: Olliver Schinagl -Acked-by: Maxime Ripard -Reviewed-by: Jagan Teki ---- - arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts -+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts -@@ -56,7 +56,7 @@ - }; - - &pio { -- mmc2_pins_nrst: mmc2@0 { -+ mmc2_pins_nrst: mmc2-rst-pin { - allwinner,pins = "PC16"; - allwinner,function = "gpio_out"; - allwinner,drive = ; diff --git a/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch b/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch deleted file mode 100644 index df2300194..000000000 --- a/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch +++ /dev/null @@ -1,12 +0,0 @@ - GNU nano 2.7.4 File: 062-A20-improve-gmac-upload.patch - ---- a/configs/A20-OLinuXino-Lime2_defconfig -+++ b/configs/A20-OLinuXino-Lime2_defconfig -@@ -24,6 +24,7 @@ CONFIG_DFU_RAM=y - CONFIG_ETH_DESIGNWARE=y - CONFIG_RGMII=y - CONFIG_SUN7I_GMAC=y -+CONFIG_GMAC_TX_DELAY=1 - CONFIG_AXP_ALDO3_VOLT=2800 - CONFIG_AXP_ALDO4_VOLT=2800 - CONFIG_USB_EHCI_HCD=y diff --git a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch b/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch index 40d79878a..a402feb3c 100644 --- a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch +++ b/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch @@ -12,9 +12,9 @@ More specifically, the following settings are now used: * up to 1152MHz: mul=3, div=2 (unchanged) * above 1152MHz: mul=4, div=2 (was: mul=2, div=1) ---- a/arch/arm/mach-sunxi/clock_sun6i.c -+++ b/arch/arm/mach-sunxi/clock_sun6i.c -@@ -107,11 +107,12 @@ void clock_set_pll1(unsigned int clk) +--- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c ++++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c +@@ -122,11 +122,12 @@ void clock_set_pll1(unsigned int clk) struct sunxi_ccm_reg * const ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; const int p = 0; diff --git a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch b/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch index a8e03e2fb..d200633bc 100644 --- a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch +++ b/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch @@ -16,9 +16,9 @@ order of magnitude as Boot1. Furthermore, a bit of documentation is added to clarify that the required setting for the PLL LDO is 1.37v as per the A31 manual. ---- a/arch/arm/mach-sunxi/clock_sun6i.c -+++ b/arch/arm/mach-sunxi/clock_sun6i.c -@@ -26,13 +26,26 @@ void clock_init_safe(void) +--- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c ++++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c +@@ -24,14 +24,27 @@ void clock_init_safe(void) struct sunxi_prcm_reg * const prcm = (struct sunxi_prcm_reg *)SUNXI_PRCM_BASE; @@ -34,9 +34,9 @@ required setting for the PLL LDO is 1.37v as per the A31 manual. clrsetbits_le32(&prcm->pll_ctrl1, ~PRCM_PLL_CTRL_LDO_KEY_MASK, PRCM_PLL_CTRL_LDO_DIGITAL_EN | PRCM_PLL_CTRL_LDO_ANALOG_EN | - PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1140)); -+ PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1370)); ++ PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1370) ); clrbits_le32(&prcm->pll_ctrl1, PRCM_PLL_CTRL_LDO_KEY_MASK); -+ + + /* Give the PLL LDO voltage setting some time to take hold. + * Notes: + * 1) We need to use sdelay() as the timers aren't set up yet. @@ -44,9 +44,10 @@ required setting for the PLL LDO is 1.37v as per the A31 manual. + * iterations through a loop. + */ + sdelay(100000); - #endif ++ + clock_set_pll1(408000000); - #if defined(CONFIG_MACH_SUN8I_R40) || defined(CONFIG_MACH_SUN50I) + writel(PLL6_CFG_DEFAULT, &ccm->pll6_cfg); --- a/arch/arm/include/asm/arch-sunxi/prcm.h +++ b/arch/arm/include/asm/arch-sunxi/prcm.h @@ -111,13 +111,13 @@ diff --git a/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch b/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch index 8bab22051..bf5dc66e1 100644 --- a/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch +++ b/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch @@ -6,11 +6,11 @@ Subject: sun6i: define alternate-function for UART2 on GPG --- a/arch/arm/include/asm/arch-sunxi/gpio.h +++ b/arch/arm/include/asm/arch-sunxi/gpio.h -@@ -186,6 +186,7 @@ enum sunxi_gpio_number { +@@ -180,6 +180,7 @@ enum sunxi_gpio_number { #define SUN6I_GPG_SDC1 2 #define SUN8I_GPG_SDC1 2 #define SUN6I_GPG_TWI3 2 +#define SUN6I_GPG_UART2 2 #define SUN5I_GPG_UART1 4 - #define SUN6I_GPH_PWM 2 + #define SUN4I_GPH_SDC1 5 diff --git a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch b/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch index d140f2d53..087074d0c 100644 --- a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch +++ b/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch @@ -4,9 +4,9 @@ Date: Tue, 16 Jun 2015 10:53:11 +0200 Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7) ---- a/arch/arm/mach-sunxi/board.c -+++ b/arch/arm/mach-sunxi/board.c -@@ -126,6 +126,10 @@ static int gpio_init(void) +--- a/arch/arm/cpu/armv7/sunxi/board.c ++++ b/arch/arm/cpu/armv7/sunxi/board.c +@@ -88,6 +88,10 @@ static int gpio_init(void) sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1); sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1); sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP); @@ -19,7 +19,7 @@ Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7) sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2); --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h -@@ -259,6 +259,8 @@ extern int soft_i2c_gpio_scl; +@@ -260,6 +260,8 @@ extern int soft_i2c_gpio_scl; #endif #elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I) #define OF_STDOUT_PATH "/soc@01c00000/serial@01c28400:115200" diff --git a/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch b/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch index 41039796a..ee1e3c9bf 100644 --- a/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch +++ b/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch @@ -4,9 +4,9 @@ Date: Tue, 16 Jun 2015 10:59:38 +0200 Subject: ARM: sunxi: Make CONS_INDEX configurable ---- a/arch/arm/mach-sunxi/Kconfig -+++ b/arch/arm/mach-sunxi/Kconfig -@@ -412,6 +412,14 @@ config SYS_BOARD +--- a/board/sunxi/Kconfig ++++ b/board/sunxi/Kconfig +@@ -229,6 +229,14 @@ config SYS_BOARD config SYS_SOC default "sunxi" diff --git a/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch b/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch deleted file mode 100644 index d61895a3f..000000000 --- a/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 5b707cdadb35d896daafff52983416e1c617745b Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Wed, 19 Jul 2017 22:23:15 +0200 -Subject: [PATCH] mkimage: check environment for dtc binary location - -Currently mkimage assumes the dtc binary is in the path and fails -otherwise. This patch makes it check the DTC environment variable first -for the dtc binary and then fall back to the default path. This makes -it possible to call the u-boot build with make DTC=... and build a fit -image with the dtc binary not being the the default path. - -Signed-off-by: Hauke Mehrtens -Cc: Simon Glass ---- - tools/fit_image.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - ---- a/tools/fit_image.c -+++ b/tools/fit_image.c -@@ -647,9 +647,14 @@ static int fit_handle_file(struct image_ - } - *cmd = '\0'; - } else if (params->datafile) { -+ const char* dtc = getenv("DTC"); -+ -+ if (!dtc) -+ dtc = MKIMAGE_DTC; -+ - /* dtc -I dts -O dtb -p 500 datafile > tmpfile */ - snprintf(cmd, sizeof(cmd), "%s %s %s > %s", -- MKIMAGE_DTC, params->dtc, params->datafile, tmpfile); -+ dtc, params->dtc, params->datafile, tmpfile); - debug("Trying to execute \"%s\"\n", cmd); - } else { - snprintf(cmd, sizeof(cmd), "cp %s %s", diff --git a/package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch b/package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch deleted file mode 100644 index 25edf5104..000000000 --- a/package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch +++ /dev/null @@ -1,89 +0,0 @@ -From eed65e5c25cbc4b6e893f140e9d7898f4624c114 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Wed, 19 Jul 2017 23:12:38 +0200 -Subject: [PATCH 210/213] Revert "fdt: Makefile: Build python libfdt library if - needed" - -This reverts commit e38ffc42674fedc750ca895046be0bd983b56dd5. ---- - Makefile | 17 ++--------------- - scripts/Makefile.spl | 17 ++++------------- - 2 files changed, 6 insertions(+), 28 deletions(-) - ---- a/Makefile -+++ b/Makefile -@@ -1116,7 +1116,7 @@ cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \ - - u-boot.rom: u-boot-x86-16bit.bin u-boot.bin \ - $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \ -- $(if $(CONFIG_HAVE_REFCODE),refcode.bin) checkbinman FORCE -+ $(if $(CONFIG_HAVE_REFCODE),refcode.bin) FORCE - $(call if_changed,binman) - - OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec -@@ -1125,8 +1125,7 @@ u-boot-x86-16bit.bin: u-boot FORCE - endif - - ifneq ($(CONFIG_ARCH_SUNXI),) --u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb \ -- checkbinman FORCE -+u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE - $(call if_changed,binman) - endif - -@@ -1355,18 +1354,6 @@ $(version_h): include/config/uboot.relea - $(timestamp_h): $(srctree)/Makefile FORCE - $(call filechk,timestamp.h) - --checkbinman: tools -- @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \ -- echo >&2; \ -- echo >&2 '*** binman needs the Python libfdt library.'; \ -- echo >&2 '*** Either install it on your system, or try:'; \ -- echo >&2 '***'; \ -- echo >&2 '*** sudo apt-get install swig libpython-dev'; \ -- echo >&2 '***'; \ -- echo >&2 '*** to have U-Boot build its own version.'; \ -- false; \ -- fi -- - # --------------------------------------------------------------------------- - quiet_cmd_cpp_lds = LDS $@ - cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) \ ---- a/scripts/Makefile.spl -+++ b/scripts/Makefile.spl -@@ -257,12 +257,14 @@ PHONY += dts_dir - dts_dir: - $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts) - --include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc -+include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir dtoc - $(call if_changed,dtoch) - --$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc -+$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir dtoc - $(call if_changed,dtocc) - -+dtoc: #$(objtree)/tools/_libfdt.so -+ - ifdef CONFIG_SAMSUNG - ifdef CONFIG_VAR_SIZE_SPL - VAR_SIZE_PARAM = --vs -@@ -355,17 +357,6 @@ ifneq ($(cmd_files),) - include $(cmd_files) - endif - --checkdtoc: tools -- @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \ -- echo '*** dtoc needs the Python libfdt library. Either '; \ -- echo '*** install it on your system, or try:'; \ -- echo '***'; \ -- echo '*** sudo apt-get install swig libpython-dev'; \ -- echo '***'; \ -- echo '*** to have U-Boot build its own version.'; \ -- false; \ -- fi -- - PHONY += FORCE - FORCE: - diff --git a/package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch b/package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch deleted file mode 100644 index d40238d3a..000000000 --- a/package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch +++ /dev/null @@ -1,26 +0,0 @@ -From cdee74ad13e933631caf7f544c319d8e981c6063 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Thu, 20 Jul 2017 19:49:25 +0200 -Subject: [PATCH 211/213] Revert "scripts/Makefile.lib: Always have - ...-u-boot.dtsi be able to override" - -This reverts commit 7452946e7f3742b3ff1cb4a50603e7492aceea88. ---- - scripts/Makefile.lib | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/scripts/Makefile.lib -+++ b/scripts/Makefile.lib -@@ -306,10 +306,10 @@ $(obj)/%.dtb.S: $(obj)/%.dtb - - quiet_cmd_dtc = DTC $@ - # Modified for U-Boot --# Bring in any U-Boot-specific include at the end of the file -+# Bring in any U-Boot-specific include after the '/dts-v1/;' header - cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ - cat $< $(if $(u_boot_dtsi),\ -- | sed "$$ a\#include \"$(u_boot_dtsi)\"") | \ -+ | sed '/^\/ {$$/{x;s%$$%\#include \"$(u_boot_dtsi)\"%;G;}') | \ - $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ - $(DTC) -O dtb -o $@ -b 0 \ - -i $(dir $<) $(DTC_FLAGS) \ diff --git a/package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch b/package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch deleted file mode 100644 index 1a5603417..000000000 --- a/package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 53d123333fa0ddc64b2c55d48366f4582ac6922d Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Thu, 20 Jul 2017 19:50:52 +0200 -Subject: [PATCH 212/213] Revert "Avoid non-portable sed construct" - -This reverts commit 208db781cad4c24f538658a9cb17e24fa43ca3c9. ---- - scripts/Makefile.lib | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/scripts/Makefile.lib -+++ b/scripts/Makefile.lib -@@ -309,7 +309,7 @@ quiet_cmd_dtc = DTC $@ - # Bring in any U-Boot-specific include after the '/dts-v1/;' header - cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ - cat $< $(if $(u_boot_dtsi),\ -- | sed '/^\/ {$$/{x;s%$$%\#include \"$(u_boot_dtsi)\"%;G;}') | \ -+ | sed 's%^/ {$$%\#include \"$(u_boot_dtsi)\"\n&%') | \ - $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ - $(DTC) -O dtb -o $@ -b 0 \ - -i $(dir $<) $(DTC_FLAGS) \ diff --git a/package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch b/package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch deleted file mode 100644 index 6f75259a7..000000000 --- a/package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch +++ /dev/null @@ -1,58 +0,0 @@ -From cf1defd80b7594f6f2721ab2dacffe48522abfca Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Thu, 20 Jul 2017 19:51:01 +0200 -Subject: [PATCH 213/213] Revert "sunxi: Use binman for sunxi boards" - -This reverts commit 61b994a386eb6f631dc1c2194d4cce9b1a43542c. ---- - Makefile | 6 ++++-- - arch/arm/dts/sunxi-u-boot.dtsi | 14 -------------- - scripts/Makefile.lib | 4 ++-- - 3 files changed, 6 insertions(+), 18 deletions(-) - delete mode 100644 arch/arm/dts/sunxi-u-boot.dtsi - ---- a/Makefile -+++ b/Makefile -@@ -1125,8 +1125,10 @@ u-boot-x86-16bit.bin: u-boot FORCE - endif - - ifneq ($(CONFIG_ARCH_SUNXI),) --u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE -- $(call if_changed,binman) -+OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \ -+ --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff -+u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img FORCE -+ $(call if_changed,pad_cat) - endif - - ifneq ($(CONFIG_TEGRA),) ---- a/arch/arm/dts/sunxi-u-boot.dtsi -+++ /dev/null -@@ -1,14 +0,0 @@ --#include -- --/ { -- binman { -- filename = "u-boot-sunxi-with-spl.bin"; -- pad-byte = <0xff>; -- blob { -- filename = "spl/sunxi-spl.bin"; -- }; -- u-boot-img { -- pos = ; -- }; -- }; --}; ---- a/scripts/Makefile.lib -+++ b/scripts/Makefile.lib -@@ -308,8 +308,8 @@ quiet_cmd_dtc = DTC $@ - # Modified for U-Boot - # Bring in any U-Boot-specific include after the '/dts-v1/;' header - cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ -- cat $< $(if $(u_boot_dtsi),\ -- | sed 's%^/ {$$%\#include \"$(u_boot_dtsi)\"\n&%') | \ -+ cat $< $(if $(u-boot-dtsi),\ -+ | sed 's%^/ {$$%\#include \"$(u-boot-dtsi)\"\n&%') | \ - $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ - $(DTC) -O dtb -o $@ -b 0 \ - -i $(dir $<) $(DTC_FLAGS) \ diff --git a/package/boot/uboot-sunxi/patches/300-sunxi-add-device-tree-for-Orange-Pi-R1-board.patch b/package/boot/uboot-sunxi/patches/300-sunxi-add-device-tree-for-Orange-Pi-R1-board.patch deleted file mode 100644 index 65ae63c64..000000000 --- a/package/boot/uboot-sunxi/patches/300-sunxi-add-device-tree-for-Orange-Pi-R1-board.patch +++ /dev/null @@ -1,182 +0,0 @@ -From 1f92596cc520f760589289059a5aa739366dd19c Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Tue, 26 Sep 2017 22:16:59 +0200 -Subject: sunxi: add device tree for Orange Pi R1 board - -Signed-off-by: Hauke Mehrtens ---- - arch/arm/dts/Makefile | 1 + - arch/arm/dts/sun8i-h2-plus-orangepi-r1.dts | 157 +++++++++++++++++++++++++++++ - 2 files changed, 158 insertions(+) - create mode 100644 arch/arm/dts/sun8i-h2-plus-orangepi-r1.dts - ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -310,6 +310,7 @@ dtb-$(CONFIG_MACH_SUN8I_A83T) += \ - sun8i-a83t-cubietruck-plus.dtb \ - sun8i-a83t-sinovoip-bpi-m3.dtb - dtb-$(CONFIG_MACH_SUN8I_H3) += \ -+ sun8i-h2-plus-orangepi-r1.dtb \ - sun8i-h2-plus-orangepi-zero.dtb \ - sun8i-h3-bananapi-m2-plus.dtb \ - sun8i-h3-orangepi-2.dtb \ ---- /dev/null -+++ b/arch/arm/dts/sun8i-h2-plus-orangepi-r1.dts -@@ -0,0 +1,157 @@ -+/* -+ * Copyright (C) 2017 Hauke Mehrtens -+ * -+ * Based on sun8i-h2-plus-orangepi-zero.dts, which is: -+ * Copyright (C) 2016 Icenowy Zheng -+ * -+ * Based on sun8i-h3-orangepi-one.dts, which is: -+ * Copyright (C) 2016 Hans de Goede -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) 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 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file 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. -+ * -+ * Or, alternatively, -+ * -+ * b) 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 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. -+ */ -+ -+/dts-v1/; -+#include "sun8i-h3.dtsi" -+#include "sunxi-common-regulators.dtsi" -+ -+#include -+#include -+#include -+ -+/ { -+ model = "Xunlong Orange Pi R1"; -+ compatible = "xunlong,orangepi-r1", "allwinner,sun8i-h2-plus"; -+ -+ aliases { -+ serial0 = &uart0; -+ /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ -+ ethernet1 = &xr819; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ pwr_led { -+ label = "orangepi:green:pwr"; -+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ -+ status_led { -+ label = "orangepi:red:status"; -+ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+ -+ reg_vcc_wifi: reg_vcc_wifi { -+ compatible = "regulator-fixed"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-wifi"; -+ enable-active-high; -+ gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; -+ }; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&emac { -+ phy = <&phy1>; -+ phy-mode = "mii"; -+ allwinner,use-internal-phy; -+ allwinner,leds-active-low; -+ status = "okay"; -+ phy1: ethernet-phy@1 { -+ reg = <1>; -+ }; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_a>; -+ vmmc-supply = <®_vcc3v3>; -+ bus-width = <4>; -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ -+ cd-inverted; -+ status = "okay"; -+}; -+ -+&mmc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc1_pins_a>; -+ vmmc-supply = <®_vcc_wifi>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ /* -+ * Explicitly define the sdio device, so that we can add an ethernet -+ * alias for it (which e.g. makes u-boot set a mac-address). -+ */ -+ xr819: sdio_wifi@1 { -+ reg = <1>; -+ }; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; -+ -+&usbphy { -+ /* USB VBUS is always on */ -+ status = "okay"; -+}; diff --git a/package/boot/uboot-sunxi/patches/301-sunxi-add-orangepi-R1-defconfig.patch b/package/boot/uboot-sunxi/patches/301-sunxi-add-orangepi-R1-defconfig.patch deleted file mode 100644 index 6240fe3f5..000000000 --- a/package/boot/uboot-sunxi/patches/301-sunxi-add-orangepi-R1-defconfig.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 231201c71b902b5999ed9b143f2a54674cfae88a Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Tue, 26 Sep 2017 22:17:33 +0200 -Subject: sunxi: add orangepi R1 defconfig - -Signed-off-by: Hauke Mehrtens ---- - board/sunxi/MAINTAINERS | 5 +++++ - configs/orangepi_r1_defconfig | 19 +++++++++++++++++++ - 2 files changed, 24 insertions(+) - create mode 100644 configs/orangepi_r1_defconfig - ---- a/board/sunxi/MAINTAINERS -+++ b/board/sunxi/MAINTAINERS -@@ -302,6 +302,11 @@ M: Jagan Teki -+S: Maintained -+F: configs/orangepi_r1_defconfig -+ - PINE64 BOARDS - M: Andre Przywara - S: Maintained ---- /dev/null -+++ b/configs/orangepi_r1_defconfig -@@ -0,0 +1,19 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_SUNXI=y -+CONFIG_SPL_SPI_FLASH_SUPPORT=y -+CONFIG_MACH_SUN8I_H3=y -+CONFIG_DRAM_CLK=624 -+CONFIG_DRAM_ZQ=3881979 -+CONFIG_DRAM_ODT_EN=y -+# CONFIG_VIDEO_DE2 is not set -+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-r1" -+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set -+CONFIG_CONSOLE_MUX=y -+CONFIG_SPL=y -+# CONFIG_CMD_IMLS is not set -+# CONFIG_CMD_FLASH is not set -+# CONFIG_CMD_FPGA is not set -+CONFIG_SPL_SPI_SUNXI=y -+CONFIG_SUN8I_EMAC=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y diff --git a/package/boot/uboot-sunxi/patches/302-sunxi-Fix-CONFIG_SUNXI_GMAC-references.patch b/package/boot/uboot-sunxi/patches/302-sunxi-Fix-CONFIG_SUNXI_GMAC-references.patch deleted file mode 100644 index d884173c4..000000000 --- a/package/boot/uboot-sunxi/patches/302-sunxi-Fix-CONFIG_SUNXI_GMAC-references.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 6ff005cf19363382fc867d7876a75fd8a386e894 Mon Sep 17 00:00:00 2001 -From: Dave Prue -Date: Thu, 31 Aug 2017 19:21:01 +0200 -Subject: [PATCH] sunxi: Fix CONFIG_SUNXI_GMAC references - -SUNXI_GMAC was still used to configure the code where as the -same has been renamed and moved to Kconfig in below commit -"sunxi: Move SUNXI_GMAC to Kconfig" -(sha1: 4d43d065db3262f9a9918ba72457bf36dfb8e0bb) - -Signed-off-by: Dave Prue -Reviewed-by: Simon Glass -Reviewed-by: Jagan Teki -Reviewed-by: Mark Kettenis -Tested-by: Mark Kettenis -[Tweek commit message, config_whitelist.txt, build-whitelist.sh] -Signed-off-by: Jagan Teki ---- - arch/arm/include/asm/arch-sunxi/sys_proto.h | 2 +- - board/sunxi/Makefile | 2 +- - include/configs/sunxi-common.h | 2 +- - scripts/build-whitelist.sh | 4 ++-- - scripts/config_whitelist.txt | 1 - - 5 files changed, 5 insertions(+), 6 deletions(-) - ---- a/arch/arm/include/asm/arch-sunxi/sys_proto.h -+++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h -@@ -24,7 +24,7 @@ void sdelay(unsigned long); - void return_to_fel(uint32_t lr, uint32_t sp); - - /* Board / SoC level designware gmac init */ --#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC -+#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUN7I_GMAC - void eth_init_board(void); - #else - static inline void eth_init_board(void) {} ---- a/board/sunxi/Makefile -+++ b/board/sunxi/Makefile -@@ -9,7 +9,7 @@ - # SPDX-License-Identifier: GPL-2.0+ - # - obj-y += board.o --obj-$(CONFIG_SUNXI_GMAC) += gmac.o -+obj-$(CONFIG_SUN7I_GMAC) += gmac.o - obj-$(CONFIG_SUNXI_AHCI) += ahci.o - obj-$(CONFIG_MACH_SUN4I) += dram_sun4i_auto.o - obj-$(CONFIG_MACH_SUN5I) += dram_sun5i_auto.o ---- a/include/configs/sunxi-common.h -+++ b/include/configs/sunxi-common.h -@@ -302,7 +302,7 @@ extern int soft_i2c_gpio_scl; - #define CONFIG_PHYLIB - #endif - --#ifdef CONFIG_SUNXI_GMAC -+#ifdef CONFIG_SUN7I_GMAC - #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */ - #define CONFIG_PHY_ADDR 1 - #define CONFIG_MII /* MII PHY management */ ---- a/scripts/build-whitelist.sh -+++ b/scripts/build-whitelist.sh -@@ -13,10 +13,10 @@ export LC_ALL=C LC_COLLATE=C - # There are two independent greps. The first pulls out the component parts - # of CONFIG_SYS_EXTRA_OPTIONS. An example is: - # --# SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8) -+# SUN7I_GMAC,AHCI,SATAPWR=SUNXI_GPB(8) - # - # We want this to produce: --# CONFIG_SUNXI_GMAC -+# CONFIG_SUN7I_GMAC - # CONFIG_AHCI - # CONFIG_SATAPWR - # ---- a/scripts/config_whitelist.txt -+++ b/scripts/config_whitelist.txt -@@ -2371,7 +2371,6 @@ CONFIG_STV0991_HZ_CLOCK - CONFIG_ST_SMI - CONFIG_SUNXI_AHCI - CONFIG_SUNXI_EMAC --CONFIG_SUNXI_GMAC - CONFIG_SUNXI_GPIO - CONFIG_SUNXI_MAX_FB_SIZE - CONFIG_SUNXI_USB_PHYS diff --git a/package/boot/uboot-sunxi/uEnv-a64.txt b/package/boot/uboot-sunxi/uEnv-a64.txt deleted file mode 100644 index 7a717fdc0..000000000 --- a/package/boot/uboot-sunxi/uEnv-a64.txt +++ /dev/null @@ -1,5 +0,0 @@ -setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage -setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb -setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait earlycon=uart,mmio32,0x01c28000 -setenv uenvcmd run loadkernel \&\& run loaddtb \&\& booti \$kernel_addr_r - \$fdt_addr_r -run uenvcmd diff --git a/package/boot/uboot-zynq/Makefile b/package/boot/uboot-zynq/Makefile index d25ecfb4b..61bb99dda 100644 --- a/package/boot/uboot-zynq/Makefile +++ b/package/boot/uboot-zynq/Makefile @@ -6,40 +6,121 @@ # include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk +PKG_NAME:=u-boot PKG_VERSION:=2016.03 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://mirror2.openwrt.org/sources \ + ftp://ftp.denx.de/pub/u-boot PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb -include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/u-boot.mk +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_LICENSE:=GPL-2.0 GPL-2.0+ +PKG_LICENSE_FILES:=Licenses/README + include $(INCLUDE_DIR)/package.mk -define U-Boot/Default - BUILD_TARGET:=zynq - UBOOT_IMAGE:=u-boot u-boot-dtb.bin u-boot.dtb u-boot-dtb.img spl/boot.bin spl/u-boot-spl spl/u-boot-spl-dtb.bin - UBOOT_CONFIG:=zynq_$(1) +define uboot/Default + TITLE:= + CONFIG:= + IMAGE:= endef -define U-Boot/zc702 - NAME:=Xilinx ZC702 Dev Board +define uboot/zc702 + TITLE:=U-Boot $(PKG_VERSION) for Xilinx ZC702 Dev Board endef -define U-Boot/zc706 - NAME:=Xilinx ZC706 Dev Board +define uboot/zc706 + TITLE:=U-Boot $(PKG_VERSION) for Xilinx ZC706 Dev Board endef -define U-Boot/zed - NAME:=Avnet Digilent ZedBoard Dev Board +define uboot/zed + TITLE:=U-Boot $(PKG_VERSION) for Avnet Digilent ZedBoard Dev Board endef -define U-Boot/zybo - NAME:=Digilent Zybo Dev Board +define uboot/zybo + TITLE:=U-Boot $(PKG_VERSION) for Digilent Zybo Dev Board endef -UBOOT_TARGETS := \ +UBOOTS := \ zc702 \ zed \ - zybo + zybo \ -$(eval $(call BuildPackage/U-Boot)) +define Package/uboot/template +define Package/uboot-zynq-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_zynq + TITLE:=$(2) + URL:=http://www.denx.de/wiki/U-Boot + VARIANT:=$(1) + MAINTAINER:=Jason Wu +endef +endef + +define BuildUBootPackage + $(eval $(uboot/Default)) + $(eval $(uboot/$(1))) + $(call Package/uboot/template,$(1),$(TITLE)) +endef + +ifdef BUILD_VARIANT +$(eval $(call uboot/$(BUILD_VARIANT))) +UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin) +endif + +define Build/Configure + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(BOARD)_$(UBOOT_CONFIG)_config +endef + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) DTC=$(LINUX_DIR)/scripts/dtc/dtc +endef + +define Package/uboot/install/default + $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) + + $(CP) $(PKG_BUILD_DIR)/u-boot \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.elf + + $(CP) $(PKG_BUILD_DIR)/u-boot-dtb.bin \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-dtb.bin + + $(CP) $(PKG_BUILD_DIR)/u-boot.dtb \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.dtb + + $(CP) $(PKG_BUILD_DIR)/u-boot-dtb.img \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-dtb.img + + $(CP) $(PKG_BUILD_DIR)/spl/boot.bin \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/boot.bin + + $(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl + + $(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl-dtb.bin \ + $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl-dtb.bin +endef + +define Package/uboot/install/template +define Package/uboot-zynq-$(1)/install + $(call Package/uboot/install/default,$(2)) +endef +endef + +$(foreach u,$(UBOOTS), \ + $(eval $(call Package/uboot/install/template,$(u),$(u))) \ +) + +$(foreach u,$(UBOOTS), \ + $(eval $(call BuildUBootPackage,$(u))) \ + $(eval $(call BuildPackage,uboot-zynq-$(u))) \ +) diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index 291f45205..222922df2 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -23,7 +23,6 @@ PKG_INSTALL:=1 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-3.0+ -PKG_CPE_ID:=cpe:/a:gnu:binutils PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 diff --git a/package/devel/gdb-arc/Makefile b/package/devel/gdb-arc/Makefile index 6cdf6bdf5..b19443753 100644 --- a/package/devel/gdb-arc/Makefile +++ b/package/devel/gdb-arc/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb-arc -PKG_VERSION:=arc-2017.03-gdb +PKG_VERSION:=arc-2016.03-gdb PKG_RELEASE:=1 -PKG_SOURCE:=gdb-arc-2017.03-gdb.tar.gz +PKG_SOURCE:=gdb-arc-2016.03-gdb.tar.gz PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_VERSION) PKG_HASH:=6a91f86cc487c1548d3f5d4f29f7226d2019c0db8a63633aeabd5914a340f3f9 -PKG_BUILD_DIR:=$(BUILD_DIR)/binutils-gdb-arc-2017.03-gdb +PKG_BUILD_DIR:=$(BUILD_DIR)/binutils-gdb-arc-2016.03-gdb PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index 4cf2aaa87..5d2583aad 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -8,17 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=8.0.1 +PKG_VERSION:=7.11.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3 +PKG_HASH:=e9216da4e3755e9f414c1aa0026b626251dfc57ffe572a266e98da4f6988fc70 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_LICENSE:=GPL-3.0+ -PKG_CPE_ID:=cpe:/a:gnu:gdb include $(INCLUDE_DIR)/package.mk @@ -56,16 +55,11 @@ CONFIGURE_ARGS+= \ --with-system-readline \ --without-expat \ --without-lzma \ - --disable-sim \ --disable-werror CONFIGURE_VARS+= \ ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline" -TARGET_LDFLAGS+= \ - -static-libstdc++ \ - -Wl,--gc-sections - define Build/Install $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ diff --git a/package/devel/gdb/patches/001-gdb-pr14523-mips-signal-number.patch b/package/devel/gdb/patches/001-gdb-pr14523-mips-signal-number.patch index 25ac86fd9..417142419 100644 --- a/package/devel/gdb/patches/001-gdb-pr14523-mips-signal-number.patch +++ b/package/devel/gdb/patches/001-gdb-pr14523-mips-signal-number.patch @@ -2,7 +2,7 @@ See http://sourceware.org/bugzilla/show_bug.cgi?id=14523 --- --- a/gdb/common/signals.c +++ b/gdb/common/signals.c -@@ -348,6 +348,11 @@ gdb_signal_from_host (int hostsig) +@@ -344,6 +344,11 @@ gdb_signal_from_host (int hostsig) else if (64 <= hostsig && hostsig <= 127) return (enum gdb_signal) (hostsig - 64 + (int) GDB_SIGNAL_REALTIME_64); diff --git a/package/devel/gdb/patches/100-musl_fix.patch b/package/devel/gdb/patches/100-musl_fix.patch index b167fe6ec..09146c563 100644 --- a/package/devel/gdb/patches/100-musl_fix.patch +++ b/package/devel/gdb/patches/100-musl_fix.patch @@ -50,4 +50,4 @@ +#undef pt_regs #include "nat/ppc-linux.h" - #include "linux-ppc-tdesc.h" + diff --git a/package/devel/gdb/patches/110-shared_libgcc.patch b/package/devel/gdb/patches/110-shared_libgcc.patch deleted file mode 100644 index 929a5ae97..000000000 --- a/package/devel/gdb/patches/110-shared_libgcc.patch +++ /dev/null @@ -1,76 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -1300,13 +1300,13 @@ if test -z "$LD"; then - fi - fi - --# Check whether -static-libstdc++ -static-libgcc is supported. -+# Check whether -static-libstdc++ is supported. - have_static_libs=no - if test "$GCC" = yes; then - saved_LDFLAGS="$LDFLAGS" - -- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" -- AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc]) -+ LDFLAGS="$LDFLAGS -static-libstdc++" -+ AC_MSG_CHECKING([whether g++ accepts -static-libstdc++]) - AC_LANG_PUSH(C++) - AC_LINK_IFELSE([ - #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) -@@ -1632,7 +1632,7 @@ AC_ARG_WITH(stage1-ldflags, - # if supported. But if the user explicitly specified the libraries to use, - # trust that they are doing what they want. - if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then -- stage1_ldflags="-static-libstdc++ -static-libgcc" -+ stage1_ldflags="-static-libstdc++" - fi]) - AC_SUBST(stage1_ldflags) - -@@ -1661,7 +1661,7 @@ AC_ARG_WITH(boot-ldflags, - # statically. But if the user explicitly specified the libraries to - # use, trust that they are doing what they want. - if test "$poststage1_libs" = ""; then -- poststage1_ldflags="-static-libstdc++ -static-libgcc" -+ poststage1_ldflags="-static-libstdc++" - fi]) - AC_SUBST(poststage1_ldflags) - ---- a/configure -+++ b/configure -@@ -5005,14 +5005,14 @@ if test -z "$LD"; then - fi - fi - --# Check whether -static-libstdc++ -static-libgcc is supported. -+# Check whether -static-libstdc++ is supported. - have_static_libs=no - if test "$GCC" = yes; then - saved_LDFLAGS="$LDFLAGS" - -- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5 --$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; } -+ LDFLAGS="$LDFLAGS -static-libstdc++" -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++" >&5 -+$as_echo_n "checking whether g++ accepts -static-libstdc++... " >&6; } - ac_ext=cpp - ac_cpp='$CXXCPP $CPPFLAGS' - ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -5795,7 +5795,7 @@ else - # if supported. But if the user explicitly specified the libraries to use, - # trust that they are doing what they want. - if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then -- stage1_ldflags="-static-libstdc++ -static-libgcc" -+ stage1_ldflags="-static-libstdc++" - fi - fi - -@@ -5831,7 +5831,7 @@ else - # statically. But if the user explicitly specified the libraries to - # use, trust that they are doing what they want. - if test "$poststage1_libs" = ""; then -- poststage1_ldflags="-static-libstdc++ -static-libgcc" -+ poststage1_ldflags="-static-libstdc++" - fi - fi - diff --git a/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch b/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch deleted file mode 100644 index 8afa8ccf8..000000000 --- a/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 56893a61aa4f0270fa8d1197b9848247f90fce0d Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Fri, 24 Mar 2017 10:36:03 +0800 -Subject: [PATCH] Fix invalid sigprocmask call - -The POSIX document says - - The pthread_sigmask() and sigprocmask() functions shall fail if: - - [EINVAL] - The value of the how argument is not equal to one of the defined values. - -and this is how musl-libc is currently doing. Fix the call to be safe -and correct - - [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html - -gdb/ChangeLog: -2017-03-24 Yousong Zhou - - * common/signals-state-save-restore.c (save_original_signals_state): - Fix invalid sigprocmask call. ---- - gdb/ChangeLog | 5 +++++ - gdb/common/signals-state-save-restore.c | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - ---- a/gdb/common/signals-state-save-restore.c -+++ b/gdb/common/signals-state-save-restore.c -@@ -41,7 +41,7 @@ save_original_signals_state (void) - int i; - int res; - -- res = sigprocmask (0, NULL, &original_signal_mask); -+ res = sigprocmask (SIG_BLOCK, NULL, &original_signal_mask); - if (res == -1) - perror_with_name (("sigprocmask")); - diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile index 5bfcaa699..8ff9bfa5e 100644 --- a/package/devel/perf/Makefile +++ b/package/devel/perf/Makefile @@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk define Package/perf SECTION:=devel CATEGORY:=Development - DEPENDS:= +libelf1 +libdw +libpthread +librt +objdump @!LINUX_3_18 @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS + DEPENDS:= +libelf1 +libdw +libpthread +librt +objdump @!LINUX_3_18 @!IN_SDK TITLE:=Linux performance monitoring tool VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE) URL:=http://www.kernel.org @@ -51,7 +51,6 @@ MAKE_FLAGS = \ NO_GTK2=1 \ NO_LIBAUDIT=1 \ NO_LIBCRYPTO=1 \ - NO_LIBUNWIND=1 \ CROSS_COMPILE="$(TARGET_CROSS)" \ CC="$(TARGET_CC)" \ LD="$(TARGET_CROSS)ld" \ @@ -61,11 +60,9 @@ MAKE_FLAGS = \ WERROR=0 \ prefix=/usr -ifdef CONFIG_LINUX_4_4 ifdef CONFIG_USE_MUSL MAKE_FLAGS += EXTRA_CFLAGS="-I$(CURDIR)/musl-include -include $(CURDIR)/musl-compat.h -D__UCLIBC__" endif -endif define Build/Compile +$(MAKE_FLAGS) $(MAKE) $(PKG_JOBS) \ diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index 6209dc5a6..dae6aff15 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -9,16 +9,16 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=strace -PKG_VERSION:=4.20 + +PKG_VERSION:=4.16 PKG_RELEASE:=1 +PKG_HASH:=98487cb5178ec1259986cc9f6e2a844f50e5d1208c112cc22431a1e4d9adf0ef PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_HASH:=5bf3148dd17306a42566f7da17368fdd781afa147db05ea63a4ca2b50f58c523 PKG_LICENSE:=BSD-3c PKG_LICENSE_FILES:=COPYRIGHT -PKG_CPE_ID:=cpe:/a:paul_kranenburg:strace PKG_MAINTAINER:=Felix Fietkau diff --git a/package/devel/valgrind/Makefile b/package/devel/valgrind/Makefile index 6be2f9ec1..57ab75f96 100644 --- a/package/devel/valgrind/Makefile +++ b/package/devel/valgrind/Makefile @@ -17,7 +17,6 @@ PKG_HASH:=d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0+ -PKG_CPE_ID:=cpe:/a:valgrind:valgrind PKG_FIXUP = autoreconf PKG_INSTALL := 1 diff --git a/package/lean/default-settings/Makefile b/package/lean/default-settings/Makefile index 7a0e87071..60ec005ac 100644 --- a/package/lean/default-settings/Makefile +++ b/package/lean/default-settings/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=default-settings PKG_VERSION:=1.0 -PKG_RELEASE:=29 +PKG_RELEASE:=30 PKG_LICENSE:=GPLv3 PKG_LICENSE_FILES:=LICENSE diff --git a/package/lean/default-settings/files/zzz-default-settings b/package/lean/default-settings/files/zzz-default-settings index 23ca2e27e..1829c279b 100755 --- a/package/lean/default-settings/files/zzz-default-settings +++ b/package/lean/default-settings/files/zzz-default-settings @@ -27,8 +27,7 @@ sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/p910nd.lua sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/usb_printer.lua sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/xunlei.lua -[ ! -f /usr/bin/ip ] && ln -sf /sbin/ip /usr/bin/ip -(opkg list-installed | grep ip-full >/dev/null 2>&1) && ln -sf /usr/sbin/ip /usr/bin/ip +ln -sf /usr/sbin/ip /usr/bin/ip rm -rf /tmp/luci-modulecache/ rm -f /tmp/luci-indexcache @@ -47,7 +46,7 @@ sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh wifi up sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release -echo "DISTRIB_REVISION='R7.5.2 By Lean'" >> /etc/openwrt_release +echo "DISTRIB_REVISION='R7.5.3 By Lean'" >> /etc/openwrt_release sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release echo "DISTRIB_DESCRIPTION='OpenWrt 17.01.4'" >> /etc/openwrt_release diff --git a/package/lean/luci-app-shadowsocksr-pro/Makefile b/package/lean/luci-app-shadowsocksr-pro/Makefile index 747a2dd80..4d18872ca 100644 --- a/package/lean/luci-app-shadowsocksr-pro/Makefile +++ b/package/lean/luci-app-shadowsocksr-pro/Makefile @@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for Shadowsocksr LUCI_DEPENDS:=+iptables-mod-tproxy +kmod-ipt-tproxy +ip +ipset-lists +shadowsocksr-libev-alt +pdnsd-alt +coreutils +coreutils-base64 +coreutils-nohup +dnsmasq-full LUCI_PKGARCH:=all PKG_VERSION:=2.0 -PKG_RELEASE:=20 +PKG_RELEASE:=21 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-shadowsocksr-pro/root/etc/uci-defaults/shadowsocksr b/package/lean/luci-app-shadowsocksr-pro/root/etc/uci-defaults/shadowsocksr index d77c729c8..86b57ce08 100755 --- a/package/lean/luci-app-shadowsocksr-pro/root/etc/uci-defaults/shadowsocksr +++ b/package/lean/luci-app-shadowsocksr-pro/root/etc/uci-defaults/shadowsocksr @@ -9,9 +9,6 @@ uci -q batch <<-EOF >/dev/null commit firewall EOF -[ ! -f /usr/bin/ip ] && ln -sf /sbin/ip /usr/bin/ip -(opkg list-installed | grep ip-full >/dev/null 2>&1) && ln -sf /usr/sbin/ip /usr/bin/ip - /etc/init.d/shadowsocksr stop /etc/init.d/shadowsocksr disable diff --git a/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch b/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch index 2dcfe9c21..4a90751e1 100644 --- a/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch +++ b/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch @@ -18,9 +18,9 @@ No __THROW in function implementation. --jsaw ---- a/argp.h -+++ b/argp.h -@@ -560,17 +560,17 @@ __argp_short_program_name(const struct a +--- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100 ++++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100 +@@ -560,17 +560,17 @@ # endif # ifndef ARGP_EI @@ -41,7 +41,7 @@ No __THROW in function implementation. { if (__opt->flags & OPTION_DOC) return 0; -@@ -582,7 +582,7 @@ __option_is_short (__const struct argp_o +@@ -582,7 +582,7 @@ } ARGP_EI int @@ -50,9 +50,9 @@ No __THROW in function implementation. { return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; } ---- a/argp-parse.c -+++ b/argp-parse.c -@@ -1277,13 +1277,13 @@ weak_alias (__argp_input, _argp_input) +--- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100 ++++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100 +@@ -1290,13 +1290,13 @@ /* Defined here, in case a user is not inlining the definitions in * argp.h */ void @@ -68,7 +68,7 @@ No __THROW in function implementation. { if (__opt->flags & OPTION_DOC) return 0; -@@ -1297,7 +1297,7 @@ __option_is_short (__const struct argp_o +@@ -1310,7 +1310,7 @@ } int diff --git a/package/libs/wolfssl/Config.in b/package/libs/cyassl/Config.in similarity index 63% rename from package/libs/wolfssl/Config.in rename to package/libs/cyassl/Config.in index 7e8a4b6ce..371bb564f 100644 --- a/package/libs/wolfssl/Config.in +++ b/package/libs/cyassl/Config.in @@ -1,47 +1,47 @@ -if PACKAGE_libwolfssl +if PACKAGE_libcyassl -config WOLFSSL_HAS_AES_CCM +config CYASSL_HAS_AES_CCM bool "Include AES-CCM support" default n -config WOLFSSL_HAS_AES_GCM +config CYASSL_HAS_AES_GCM bool "Include AES-GCM support" default n -config WOLFSSL_HAS_CHACHA +config CYASSL_HAS_CHACHA bool "Include ChaCha cipher suite support" default n -config WOLFSSL_HAS_ECC +config CYASSL_HAS_ECC bool "Include ECC (Elliptic Curve Cryptography) support" default y -config WOLFSSL_HAS_DH +config CYASSL_HAS_DH bool "Include DH (Diffie-Hellman) support" default n -config WOLFSSL_HAS_ARC4 +config CYASSL_HAS_ARC4 bool "Include ARC4 support" default n -config WOLFSSL_HAS_DES3 +config CYASSL_HAS_DES3 bool "Include DES3 (Tripple-DES) support" default n -config WOLFSSL_HAS_PSK +config CYASSL_HAS_PSK bool "Include PKS (Pre Share Key) support" default n -config WOLFSSL_HAS_DTLS +config CYASSL_HAS_DTLS bool "Include DTLS support" default n -config WOLFSSL_HAS_ECC25519 +config CYASSL_HAS_ECC25519 bool "Include ECC Curve 22519 support" - depends on WOLFSSL_HAS_ECC + depends on CYASSL_HAS_ECC default n -config WOLFSSL_HAS_POLY_1305 +config CYASSL_HAS_POLY_1305 bool "Include Poly-1305 support" default n diff --git a/package/libs/wolfssl/Makefile b/package/libs/cyassl/Makefile similarity index 69% rename from package/libs/wolfssl/Makefile rename to package/libs/cyassl/Makefile index 1d4b7f557..0212ff73d 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/cyassl/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2017 OpenWrt.org +# Copyright (C) 2006-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -20,27 +20,24 @@ PKG_INSTALL:=1 PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0+ -PKG_CPE_ID:=cpe:/a:yassl:cyassl include $(INCLUDE_DIR)/package.mk -define Package/libwolfssl +define Package/libcyassl SECTION:=libs SUBMENU:=SSL CATEGORY:=Libraries - TITLE:=wolfSSL library + TITLE:=CyaSSL library URL:=http://www.wolfssl.com/ - MAINTAINER:=Alexandru Ardelean MENU:=1 - PROVIDES:=libcyassl endef -define Package/libwolfssl/description -wolfSSL (formerly CyaSSL) is an SSL library optimized for small -footprint, both on disk and for memory use. +define Package/libcyassl/description +CyaSSL is an SSL library optimized for small footprint, both on disk and for +memory use. endef -define Package/libwolfssl/config +define Package/libcyassl/config source "$(SOURCE)/Config.in" endef @@ -58,58 +55,58 @@ CONFIGURE_ARGS += \ --enable-ipv6 endif -ifeq ($(CONFIG_WOLFSSL_HAS_AES_CCM),y) +ifeq ($(CONFIG_CYASSL_HAS_AES_CCM),y) CONFIGURE_ARGS += \ --enable-aesccm endif -ifneq ($(CONFIG_WOLFSSL_HAS_AES_GCM),y) +ifeq ($(CONFIG_CYASSL_HAS_AES_GCM),y) CONFIGURE_ARGS += \ - --disable-aesgcm + --enable-aesgcm endif -ifneq ($(CONFIG_WOLFSSL_HAS_CHACHA),y) +ifeq ($(CONFIG_CYASSL_HAS_CHACHA),y) CONFIGURE_ARGS += \ - --disable-chacha + --enable-chacha endif -ifeq ($(CONFIG_WOLFSSL_HAS_ECC),y) +ifeq ($(CONFIG_CYASSL_HAS_ECC),y) CONFIGURE_ARGS += \ --enable-ecc \ --enable-supportedcurves endif -ifneq ($(CONFIG_WOLFSSL_HAS_DH),y) +ifeq ($(CONFIG_CYASSL_HAS_DH),y) CONFIGURE_ARGS += \ --enable-dh endif -ifeq ($(CONFIG_WOLFSSL_HAS_ARC4),n) +ifeq ($(CONFIG_CYASSL_HAS_ARC4),n) CONFIGURE_ARGS += \ --disable-arc4 endif -ifeq ($(CONFIG_WOLFSSL_HAS_DES3),y) +ifeq ($(CONFIG_CYASSL_HAS_DES3),y) CONFIGURE_ARGS += \ --disable-des3 endif -ifeq ($(CONFIG_WOLFSSL_HAS_PSK),y) +ifeq ($(CONFIG_CYASSL_HAS_PSK),y) CONFIGURE_ARGS += \ --enable-psk endif -ifeq ($(CONFIG_WOLFSSL_HAS_DTLS),y) +ifeq ($(CONFIG_CYASSL_HAS_DTLS),y) CONFIGURE_ARGS += \ --enable-dtls endif -ifeq ($(CONFIG_WOLFSSL_HAS_ECC25519),y) +ifeq ($(CONFIG_CYASSL_HAS_ECC25519),y) CONFIGURE_ARGS += \ - --enable-curve25519 + --enable-ecc25519 endif -ifneq ($(CONFIG_WOLFSSL_HAS_POLY1305),y) +ifeq ($(CONFIG_CYASSL_HAS_POLY1305),y) CONFIGURE_ARGS += \ --enable-poly1305 endif @@ -133,10 +130,10 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig endef -define Package/libwolfssl/install +define Package/libcyassl/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so* $(1)/usr/lib/ ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so endef -$(eval $(call BuildPackage,libwolfssl)) +$(eval $(call BuildPackage,libcyassl)) diff --git a/package/libs/wolfssl/patches/001-CVE-2017-13099.patch b/package/libs/cyassl/patches/001-CVE-2017-13099.patch similarity index 100% rename from package/libs/wolfssl/patches/001-CVE-2017-13099.patch rename to package/libs/cyassl/patches/001-CVE-2017-13099.patch diff --git a/package/libs/wolfssl/patches/400-additional_compatibility.patch b/package/libs/cyassl/patches/400-additional_compatibility.patch similarity index 100% rename from package/libs/wolfssl/patches/400-additional_compatibility.patch rename to package/libs/cyassl/patches/400-additional_compatibility.patch diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile index 07e1eb815..a726691d3 100644 --- a/package/libs/elfutils/Makefile +++ b/package/libs/elfutils/Makefile @@ -17,7 +17,6 @@ PKG_HASH:=9412fac7b30872b738bc1ed1ebcaed54493c26ef9a67887913498c17b10f3bc2 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=GPL-3.0+ PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3 -PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils PKG_INSTALL:=1 PKG_USE_MIPS16:=0 diff --git a/package/libs/gettext-full/Makefile b/package/libs/gettext-full/Makefile index db6aee750..deb484010 100644 --- a/package/libs/gettext-full/Makefile +++ b/package/libs/gettext-full/Makefile @@ -19,7 +19,6 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION) PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-3.0+ -PKG_CPE_ID:=cpe:/a:gnu:gettext PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/package/libs/gettext-full/patches/000-relocatable.patch b/package/libs/gettext-full/patches/000-relocatable.patch index a95c268f5..c14be7283 100644 --- a/package/libs/gettext-full/patches/000-relocatable.patch +++ b/package/libs/gettext-full/patches/000-relocatable.patch @@ -5,8 +5,8 @@ # Set variables # - gettext_datadir directory where the data files are stored. -prefix="@prefix@" -+if [ -n "$STAGING_DIR_HOSTPKG" ]; then -+ prefix="$STAGING_DIR_HOSTPKG" ++if [ -n "$STAGING_DIR" ]; then ++ prefix="$STAGING_DIR/host" +else + prefix="@prefix@" +fi @@ -20,8 +20,8 @@ # Set variables # - gettext_datadir directory where the data files are stored. -prefix="@prefix@" -+if [ -n "$STAGING_DIR_HOSTPKG" ]; then -+ prefix="$STAGING_DIR_HOSTPKG" ++if [ -n "$STAGING_DIR" ]; then ++ prefix="$STAGING_DIR/host" +else + prefix="@prefix@" +fi diff --git a/package/libs/libevent2/Makefile b/package/libs/libevent2/Makefile index 5d56f37c5..99034bb22 100644 --- a/package/libs/libevent2/Makefile +++ b/package/libs/libevent2/Makefile @@ -17,7 +17,6 @@ PKG_SOURCE_URL:=@SF/levent PKG_HASH:=71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=BSD-3-Clause -PKG_CPE_ID:=cpe:/a:libevent_project:libevent PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/package/libs/libiconv-full/Makefile b/package/libs/libiconv-full/Makefile index ac7bfddf5..9776711a7 100644 --- a/package/libs/libiconv-full/Makefile +++ b/package/libs/libiconv-full/Makefile @@ -51,7 +51,7 @@ define Package/iconv TITLE+= utility endef -TARGET_CFLAGS += $(FPIC) -DUSE_DOS -std=gnu89 +TARGET_CFLAGS += $(FPIC) -DUSE_DOS CONFIGURE_ARGS += \ --enable-shared \ diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile index eeb7870f0..87dbc4708 100644 --- a/package/libs/libjson-c/Makefile +++ b/package/libs/libjson-c/Makefile @@ -19,7 +19,6 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:json-c_project:json-c PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -28,7 +27,7 @@ PKG_MAINTAINER:=Felix Fietkau include $(INCLUDE_DIR)/package.mk -TARGET_CFLAGS += $(FPIC) -Wno-implicit-fallthrough +TARGET_CFLAGS += $(FPIC) define Package/libjson-c SECTION:=libs diff --git a/package/libs/libnetfilter-conntrack/Makefile b/package/libs/libnetfilter-conntrack/Makefile index be8228531..399aa6ce1 100644 --- a/package/libs/libnetfilter-conntrack/Makefile +++ b/package/libs/libnetfilter-conntrack/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnetfilter_conntrack +PKG_VERSION:=1.0.6 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://git.netfilter.org/libnetfilter_conntrack -PKG_SOURCE_DATE:=2017-07-25 -PKG_SOURCE_VERSION:=e870432649955d377a73ee5a72cb23f0f6b5e4c5 -PKG_MIRROR_HASH:=6891e6bea956d5d3514524918f439dfe8b5806397d8d40d1afc69b9bfebc1d57 - +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://www.netfilter.org/projects/libnetfilter_conntrack/files/ \ + ftp://ftp.netfilter.org/pub/libnetfilter_conntrack/ +PKG_HASH:=efcc08021284e75f4d96d3581c5155a11f08fd63316b1938cbcb269c87f37feb PKG_MAINTAINER:=Jo-Philipp Wich PKG_FIXUP:=autoreconf diff --git a/package/libs/libnetfilter-queue/Makefile b/package/libs/libnetfilter-queue/Makefile index 8a11d0798..dd8fd9f09 100644 --- a/package/libs/libnetfilter-queue/Makefile +++ b/package/libs/libnetfilter-queue/Makefile @@ -11,10 +11,10 @@ PKG_NAME:=libnetfilter_queue PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=https://git.netfilter.org/libnetfilter_queue -PKG_SOURCE_DATE:=2017-06-27 -PKG_SOURCE_VERSION:=601abd1c71ccdf90753cf294c120ad43fb25dc54 -PKG_MIRROR_HASH:=283b99cfe5856dc87fd6bab8f78c0c59b72462d6b4f2b13111f928cf33020eb3 +PKG_SOURCE_URL=http://git.netfilter.org/libnetfilter_queue +PKG_SOURCE_DATE:=2016-07-03 +PKG_SOURCE_VERSION:=981025e103d887fb6a9c9bb49c74ec323108d098 +PKG_MIRROR_HASH:=85c124be0e19162e1ebd1aba6e7e86bb4106e9dab4267baaf66d3ccb48d56e3f PKG_FIXUP:=autoreconf PKG_LICENSE:=GPL-2.0+ diff --git a/package/libs/libnetfilter-queue/patches/100-checksum_computation.patch b/package/libs/libnetfilter-queue/patches/100-checksum_computation.patch index 92e750d51..81faffe82 100644 --- a/package/libs/libnetfilter-queue/patches/100-checksum_computation.patch +++ b/package/libs/libnetfilter-queue/patches/100-checksum_computation.patch @@ -8,7 +8,7 @@ #include #include #include -@@ -26,8 +27,13 @@ uint16_t nfq_checksum(uint32_t sum, uint +@@ -26,8 +27,13 @@ uint16_t nfq_checksum(uint32_t sum, uint16_t *buf, int size) sum += *buf++; size -= sizeof(uint16_t); } @@ -24,7 +24,7 @@ sum = (sum >> 16) + (sum & 0xffff); sum += (sum >>16); -@@ -35,7 +41,7 @@ uint16_t nfq_checksum(uint32_t sum, uint +@@ -35,7 +41,7 @@ uint16_t nfq_checksum(uint32_t sum, uint16_t *buf, int size) return (uint16_t)(~sum); } @@ -33,7 +33,7 @@ { uint32_t sum = 0; uint32_t iph_len = iph->ihl*4; -@@ -46,13 +52,13 @@ uint16_t nfq_checksum_tcpudp_ipv4(struct +@@ -46,13 +52,13 @@ uint16_t nfq_checksum_tcpudp_ipv4(struct iphdr *iph) sum += (iph->saddr) & 0xFFFF; sum += (iph->daddr >> 16) & 0xFFFF; sum += (iph->daddr) & 0xFFFF; @@ -49,7 +49,7 @@ { uint32_t sum = 0; uint32_t hdr_len = (uint32_t *)transport_hdr - (uint32_t *)ip6h; -@@ -68,7 +74,7 @@ uint16_t nfq_checksum_tcpudp_ipv6(struct +@@ -68,7 +74,7 @@ uint16_t nfq_checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr) sum += (ip6h->ip6_dst.s6_addr16[i] >> 16) & 0xFFFF; sum += (ip6h->ip6_dst.s6_addr16[i]) & 0xFFFF; } @@ -58,9 +58,11 @@ sum += htons(ip6h->ip6_plen); return nfq_checksum(sum, (uint16_t *)payload, len); +diff --git a/src/extra/tcp.c b/src/extra/tcp.c +index d1cd79d..a66f392 100644 --- a/src/extra/tcp.c +++ b/src/extra/tcp.c -@@ -96,7 +96,7 @@ nfq_tcp_compute_checksum_ipv4(struct tcp +@@ -96,7 +96,7 @@ nfq_tcp_compute_checksum_ipv4(struct tcphdr *tcph, struct iphdr *iph) { /* checksum field in header needs to be zero for calculation. */ tcph->check = 0; @@ -69,7 +71,7 @@ } EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv4); -@@ -110,7 +110,7 @@ nfq_tcp_compute_checksum_ipv6(struct tcp +@@ -110,7 +110,7 @@ nfq_tcp_compute_checksum_ipv6(struct tcphdr *tcph, struct ip6_hdr *ip6h) { /* checksum field in header needs to be zero for calculation. */ tcph->check = 0; @@ -80,7 +82,7 @@ --- a/src/extra/udp.c +++ b/src/extra/udp.c -@@ -96,7 +96,7 @@ nfq_udp_compute_checksum_ipv4(struct udp +@@ -96,7 +96,7 @@ nfq_udp_compute_checksum_ipv4(struct udphdr *udph, struct iphdr *iph) { /* checksum field in header needs to be zero for calculation. */ udph->check = 0; @@ -89,7 +91,7 @@ } EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4); -@@ -115,7 +115,7 @@ nfq_udp_compute_checksum_ipv6(struct udp +@@ -115,7 +115,7 @@ nfq_udp_compute_checksum_ipv6(struct udphdr *udph, struct ip6_hdr *ip6h) { /* checksum field in header needs to be zero for calculation. */ udph->check = 0; diff --git a/package/libs/libnftnl/Makefile b/package/libs/libnftnl/Makefile index f4a1bb132..5b541f451 100644 --- a/package/libs/libnftnl/Makefile +++ b/package/libs/libnftnl/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnftnl -PKG_VERSION:=1.0.7 +PKG_VERSION:=1.0.6 PKG_RELEASE:=1 -PKG_SOURCE_URL:=https://git.netfilter.org/libnftnl +PKG_SOURCE_URL:=git://git.netfilter.org/libnftnl PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=libnftnl-1.0.7 -PKG_MIRROR_HASH:=d38a409d52074a5b20f5b7477b385506692a9a05ec6f4ac3d14a8a80aa4f81d9 +PKG_SOURCE_VERSION:=libnftnl-1.0.6 +PKG_MIRROR_HASH:=c9e066e3fd29951cbe96d2898b4d6cdcfe802b3a4f09f8273a508e7a0a20a357 PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0+ diff --git a/package/libs/libnl/Makefile b/package/libs/libnl/Makefile index 67201cc7c..7916556c0 100644 --- a/package/libs/libnl/Makefile +++ b/package/libs/libnl/Makefile @@ -8,17 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnl -PKG_VERSION:=3.3.0 +PKG_VERSION:=3.2.29 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl3_3_0 -PKG_HASH:=705468b5ae4cd1eb099d2d1c476d6a3abe519bc2810becf12fb1e32de1e074e4 +PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl3_2_29 +PKG_HASH:=0beb593dc6abfffa18a5c787b27884979c1b7e7f1fd468c801e3cc938a685922 PKG_LICENSE:=LGPL-2.1 -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - include $(INCLUDE_DIR)/package.mk define Package/libnl/default @@ -80,6 +77,13 @@ endef TARGET_CFLAGS += -ffunction-sections $(FPIC) +define Build/Compile + $(call Build/Compile/Default) + make -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + install +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/libnl3 $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/include/libnl3/* $(1)/usr/include/libnl3/ diff --git a/package/libs/libnl/patches/0001-lib-Escape-usage-of-strerror_l-if-it-doesn-t-exist-i.patch b/package/libs/libnl/patches/0001-lib-Escape-usage-of-strerror_l-if-it-doesn-t-exist-i.patch new file mode 100644 index 000000000..a31ef4772 --- /dev/null +++ b/package/libs/libnl/patches/0001-lib-Escape-usage-of-strerror_l-if-it-doesn-t-exist-i.patch @@ -0,0 +1,105 @@ +From 098a4cc35b0da4438b8b67a914edecebef5bb6a9 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Fri, 10 Mar 2017 13:22:14 +0300 +Subject: [PATCH] lib: Escape usage of strerror_l() if it doesn't exist in libc + +uClibc doesn't implement strerror_l() and thus libnl starting from +3.2.29 couldn't be compiled with it any longer. + +To work-around that problem we'll just do a check on strerror_l() +availability during configuration and if it's not there just fall back +to locale-less strerror(). + +Signed-off-by: Alexey Brodkin +Cc: Andre Draszik +Cc: Thomas Haller +--- + +This patch is now accepted upstream and will be a part of the next libnl +release, see +https://github.com/thom311/libnl/commit/e15966ac7f3b43df2acf869f98089762807d0568 + + configure.ac | 2 ++ + lib/utils.c | 8 +++++++- + src/lib/utils.c | 6 ++++++ + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 68b285e5b15c..2739b997ee3a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -121,6 +121,8 @@ fi + + AC_CONFIG_SUBDIRS([doc]) + ++AC_CHECK_FUNCS([strerror_l]) ++ + AC_CONFIG_FILES([ + Makefile + libnl-3.0.pc +diff --git a/lib/utils.c b/lib/utils.c +index fb350d13fd2f..06273c5b291e 100644 +--- a/lib/utils.c ++++ b/lib/utils.c +@@ -30,7 +30,9 @@ + #include + #include + #include /* exit() */ ++#ifdef HAVE_STRERROR_L + #include ++#endif + + /** + * Global variable indicating the desired level of debugging output. +@@ -123,9 +125,10 @@ int __nl_read_num_str_file(const char *path, int (*cb)(long, const char *)) + + const char *nl_strerror_l(int err) + { ++ const char *buf; ++#ifdef HAVE_STRERROR_L + int errno_save = errno; + locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0); +- const char *buf; + + if (loc == (locale_t)0) { + if (errno == ENOENT) +@@ -140,6 +143,9 @@ const char *nl_strerror_l(int err) + } + + errno = errno_save; ++#else ++ buf = strerror(err); ++#endif + return buf; + } + /** @endcond */ +diff --git a/src/lib/utils.c b/src/lib/utils.c +index 5878f279c364..feb1d4ef4056 100644 +--- a/src/lib/utils.c ++++ b/src/lib/utils.c +@@ -81,6 +81,7 @@ void nl_cli_fatal(int err, const char *fmt, ...) + fprintf(stderr, "\n"); + } else { + char *buf; ++#ifdef HAVE_STRERROR_L + locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0); + if (loc == (locale_t)0) { + if (errno == ENOENT) +@@ -91,9 +92,14 @@ void nl_cli_fatal(int err, const char *fmt, ...) + } + if (loc != (locale_t)0) + buf = strerror_l(err, loc); ++#else ++ buf = strerror(err); ++#endif + fprintf(stderr, "%s\n", buf); ++#ifdef HAVE_STRERROR_L + if (loc != (locale_t)0) + freelocale(loc); ++#endif + } + + exit(abs(err)); +-- +2.7.4 + diff --git a/package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch b/package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch deleted file mode 100644 index 845a59376..000000000 --- a/package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch +++ /dev/null @@ -1,30 +0,0 @@ -From db0d59cd06f3ffd350379847c0885e1bfb85af0f Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sat, 7 Mar 2015 11:34:42 +0100 -Subject: [PATCH 2/2] build: add Libs.private field in libnl pkg-config file - -In order to support static linking, the libnl pkg-config file should -indicate in its Libs.private field the libraries that libnl-3.0.a -requires. The LIBS variable contains the appropriate list of -libraries: -lm in all cases, and -lpthread when pthread support is -enabled. This allows to statically link applications against libnl -properly. - -Signed-off-by: Thomas Petazzoni ---- - libnl-3.0.pc.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libnl-3.0.pc.in b/libnl-3.0.pc.in -index b87e3dc..ddbc999 100644 ---- a/libnl-3.0.pc.in -+++ b/libnl-3.0.pc.in -@@ -7,4 +7,5 @@ Name: libnl - Description: Convenience library for netlink sockets - Version: @PACKAGE_VERSION@ - Libs: -L${libdir} -lnl-@MAJ_VERSION@ -+Libs.private: @LIBS@ - Cflags: -I${includedir}/libnl@MAJ_VERSION@ --- -2.1.0 - diff --git a/package/libs/libnl/patches/101-add-musl-workaround-to-the-libc-compat.h-copy.patch b/package/libs/libnl/patches/101-add-musl-workaround-to-the-libc-compat.h-copy.patch deleted file mode 100644 index 11dc75b89..000000000 --- a/package/libs/libnl/patches/101-add-musl-workaround-to-the-libc-compat.h-copy.patch +++ /dev/null @@ -1,103 +0,0 @@ -diff -Naur libnl-3.3.0_rc1.orig/include/linux-private/linux/if_ether.h libnl-3.3.0_rc1/include/linux-private/linux/if_ether.h ---- /include/linux-private/linux/if_ether.h 2017-03-08 19:56:31.824516933 -0800 -+++ /include/linux-private/linux/if_ether.h 2017-03-08 20:07:01.938237767 -0800 -@@ -22,6 +22,7 @@ - #define _LINUX_IF_ETHER_H - - #include -+#include - - /* - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble -@@ -117,10 +118,12 @@ - * This is an Ethernet frame header. - */ - -+#if __UAPI_DEF_ETHHDR - struct ethhdr { - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ - unsigned char h_source[ETH_ALEN]; /* source ether addr */ - __be16 h_proto; /* packet type ID field */ - } __attribute__((packed)); -+#endif - - #endif /* _LINUX_IF_ETHER_H */ -diff -Naur libnl-3.3.0_rc1.orig/include/linux-private/linux/libc-compat.h libnl-3.3.0_rc1/include/linux-private/linux/libc-compat.h ---- /include/linux-private/linux/libc-compat.h 2017-03-08 19:56:31.823516923 -0800 -+++ /include/linux-private/linux/libc-compat.h 2017-03-08 20:12:30.376843489 -0800 -@@ -48,10 +48,18 @@ - #ifndef _LIBC_COMPAT_H - #define _LIBC_COMPAT_H - --/* We have included glibc headers... */ --#if defined(__GLIBC__) -+/* We're used from userspace... */ -+#if !defined(__KERNEL__) - --/* Coordinate with glibc netinet/in.h header. */ -+/* Coordinate with libc netinet/if_ether.h */ -+#ifdef _NETINET_IF_ETHER_H /* musl */ -+#define __UAPI_DEF_ETHHDR 0 -+#else -+/* glibc uses __NETINET_IF_ETHER_H, and uses the uapi header. */ -+#define __UAPI_DEF_ETHHDR 1 -+#endif -+ -+/* Coordinate with libc netinet/in.h header. */ - #if defined(_NETINET_IN_H) - - /* GLIBC headers included first so don't define anything -@@ -64,15 +72,7 @@ - #define __UAPI_DEF_IN_CLASS 0 - - #define __UAPI_DEF_IN6_ADDR 0 --/* The exception is the in6_addr macros which must be defined -- * if the glibc code didn't define them. This guard matches -- * the guard in glibc/inet/netinet/in.h which defines the -- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ --#if defined(__USE_MISC) || defined (__USE_GNU) - #define __UAPI_DEF_IN6_ADDR_ALT 0 --#else --#define __UAPI_DEF_IN6_ADDR_ALT 1 --#endif - #define __UAPI_DEF_SOCKADDR_IN6 0 - #define __UAPI_DEF_IPV6_MREQ 0 - #define __UAPI_DEF_IPPROTO_V6 0 -@@ -83,7 +83,7 @@ - #else - - /* Linux headers included first, and we must define everything -- * we need. The expectation is that glibc will check the -+ * we need. The expectation is that libc will check the - * __UAPI_DEF_* defines and adjust appropriately. */ - #define __UAPI_DEF_IN_ADDR 1 - #define __UAPI_DEF_IN_IPPROTO 1 -@@ -93,7 +93,7 @@ - #define __UAPI_DEF_IN_CLASS 1 - - #define __UAPI_DEF_IN6_ADDR 1 --/* We unconditionally define the in6_addr macros and glibc must -+/* We unconditionally define the in6_addr macros and libc must - * coordinate. */ - #define __UAPI_DEF_IN6_ADDR_ALT 1 - #define __UAPI_DEF_SOCKADDR_IN6 1 -@@ -115,7 +115,10 @@ - /* If we did not see any headers from any supported C libraries, - * or we are being included in the kernel, then define everything - * that we need. */ --#else /* !defined(__GLIBC__) */ -+#else /* defined(__KERNEL__) */ -+ -+/* Definitions for if/ether.h */ -+#define __UAPI_DEF_ETHHDR 1 - - /* Definitions for in.h */ - #define __UAPI_DEF_IN_ADDR 1 -@@ -138,6 +141,6 @@ - /* Definitions for xattr.h */ - #define __UAPI_DEF_XATTR 1 - --#endif /* __GLIBC__ */ -+#endif /* defined(__KERNEL__) */ - - #endif /* _LIBC_COMPAT_H */ diff --git a/package/libs/libnl/patches/102-revert-build-enable-building-cli-during-tests.patch b/package/libs/libnl/patches/102-revert-build-enable-building-cli-during-tests.patch deleted file mode 100644 index f715bb83f..000000000 --- a/package/libs/libnl/patches/102-revert-build-enable-building-cli-during-tests.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 68f8393bd356a3d0598cf77e1044b7e8b98aa4d8 Mon Sep 17 00:00:00 2001 -Message-Id: <68f8393bd356a3d0598cf77e1044b7e8b98aa4d8.1493920165.git.baruch@tkos.co.il> -From: Baruch Siach -Date: Thu, 4 May 2017 15:56:14 +0300 -Subject: [PATCH] Revert "build: enable building cli during tests" - -This reverts commit 3cb28534d34392ceec4adead0cfa97039796ccb7. - -Contrary to what 3cb28534d commit log claims, the cli programs depend on -dynamic libraries support of the toolchain. Enabling cli programs -unconditionally breaks static build as follows: - -In file included from lib/cli/cls/basic.c:12:0: -./include/netlink/cli/utils.h:25:19: fatal error: dlfcn.h: No such file or directory -compilation terminated. -Makefile:3666: recipe for target 'lib/cli/cls/lib_cli_cls_basic_la-basic.lo' failed -make[1]: *** [lib/cli/cls/lib_cli_cls_basic_la-basic.lo] Error 1 - -Revert that commit to restore the ability of static only build of libnl, and -its dependencies. - -Signed-off-by: Baruch Siach ---- -Upstream status: https://github.com/thom311/libnl/pull/141 - - Makefile.am | 21 ++++++--------------- - 1 file changed, 6 insertions(+), 15 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 1b95a559304f..279548394650 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -3,8 +3,6 @@ - ACLOCAL_AMFLAGS = -I m4 - - lib_LTLIBRARIES = --noinst_LTLIBRARIES = --check_LTLIBRARIES = - - check_PROGRAMS = - check_programs = -@@ -500,6 +498,8 @@ EXTRA_lib_libnl_xfrm_3_la_DEPENDENCIES = \ - lib_libnl_xfrm_3_la_LIBADD = \ - lib/libnl-3.la - -+if ENABLE_CLI -+ - lib_cli_ltlibraries_cls = \ - lib/cli/cls/basic.la \ - lib/cli/cls/cgroup.la -@@ -513,15 +513,11 @@ lib_cli_ltlibraries_qdisc = \ - lib/cli/qdisc/pfifo.la \ - lib/cli/qdisc/plug.la - --if ENABLE_CLI - pkglib_clsdir = $(pkglibdir)/cli/cls - pkglib_qdiscdir = $(pkglibdir)/cli/qdisc - pkglib_cls_LTLIBRARIES = $(lib_cli_ltlibraries_cls) - pkglib_qdisc_LTLIBRARIES = $(lib_cli_ltlibraries_qdisc) --else --noinst_LTLIBRARIES += \ -- $(lib_cli_ltlibraries_cls) \ -- $(lib_cli_ltlibraries_qdisc) -+ - endif - - lib_cli_ldflags = \ -@@ -550,13 +546,8 @@ lib_cli_qdisc_plug_la_LDFLAGS = $(lib_cli_ldflags) - - ############################################################################### - --src_lib_ldflags = -- - if ENABLE_CLI - lib_LTLIBRARIES += src/lib/libnl-cli-3.la --src_lib_ldflags += -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) --else --check_LTLIBRARIES += src/lib/libnl-cli-3.la - endif - - src_lib_libnl_cli_3_la_SOURCES = \ -@@ -583,7 +574,7 @@ src_lib_libnl_cli_3_la_CPPFLAGS = \ - -I$(srcdir)/include \ - -I$(builddir)/include - src_lib_libnl_cli_3_la_LDFLAGS = \ -- $(src_lib_ldflags) \ -+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ - -Wl,--version-script=$(srcdir)/libnl-cli-3.sym - src_lib_libnl_cli_3_la_LIBADD = \ - lib/libnl-3.la \ -@@ -668,8 +659,6 @@ else - noinst_PROGRAMS += $(cli_programs) - endif - endif --else --check_PROGRAMS += $(cli_programs) - endif - - src_genl_ctrl_list_CPPFLAGS = $(src_cppflags) -@@ -847,10 +836,12 @@ tests_test_complex_HTB_with_hash_filters_LDADD = $(tests_ldadd) - tests_test_u32_filter_with_actions_CPPFLAGS = $(tests_cppflags) - tests_test_u32_filter_with_actions_LDADD = $(tests_ldadd) - -+if ENABLE_CLI - check_PROGRAMS += \ - tests/test-cache-mngr \ - tests/test-genl \ - tests/test-nf-cache-mngr -+endif - - tests_cli_ldadd = \ - $(tests_ldadd) \ --- -2.11.0 - diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile index e702d5c05..4d0ce4099 100644 --- a/package/libs/libpcap/Makefile +++ b/package/libs/libpcap/Makefile @@ -12,8 +12,7 @@ PKG_VERSION:=1.8.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \ - http://www.tcpdump.org/release/ +PKG_SOURCE_URL:=http://www.tcpdump.org/release/ PKG_HASH:=673dbc69fdc3f5a86fb5759ab19899039a8e5e6c631749e48dcd9c6f0c83541e PKG_FIXUP:=patch-libtool diff --git a/package/libs/readline/Makefile b/package/libs/libreadline/Makefile similarity index 95% rename from package/libs/readline/Makefile rename to package/libs/libreadline/Makefile index ca3a46863..3c1b048fe 100644 --- a/package/libs/readline/Makefile +++ b/package/libs/libreadline/Makefile @@ -17,14 +17,12 @@ PKG_HASH:=750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:gnu:readline PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk define Package/libreadline SECTION:=libs @@ -71,5 +69,4 @@ define Package/libreadline/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{so,so.7,so.7.0} $(1)/usr/lib/ endef -$(eval $(call HostBuild)) $(eval $(call BuildPackage,libreadline)) diff --git a/package/libs/readline/patches/001-install_perm.patch b/package/libs/libreadline/patches/001-install_perm.patch similarity index 100% rename from package/libs/readline/patches/001-install_perm.patch rename to package/libs/libreadline/patches/001-install_perm.patch diff --git a/package/libs/libtool/Makefile b/package/libs/libtool/Makefile index 8cef09f78..5eb521a72 100644 --- a/package/libs/libtool/Makefile +++ b/package/libs/libtool/Makefile @@ -17,7 +17,6 @@ PKG_HASH:=afcce660d3dc54c63a0a5ba3cf05272239dc3c54bbeba20f6bad250f9dc007ae PKG_LICENSE:=GPL-2.0+ PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:gnu:libtool PKG_BUILD_PARALLEL:=0 diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile index 36a3bbeb2..01b3a32b1 100644 --- a/package/libs/libubox/Makefile +++ b/package/libs/libubox/Makefile @@ -6,8 +6,8 @@ PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/libubox.git PKG_SOURCE_DATE:=2018-01-07 -PKG_SOURCE_VERSION:=1c08e80313fd487112c48346889cc57badeef751 -PKG_MIRROR_HASH:=58cad98de55d44d7791e5d49b809ac5c32d3e6c481dc385b10e02386853f2263 +PKG_SOURCE_VERSION:=1dafcd7813f147811a6bbdb00eec603fe732aac1 +PKG_MIRROR_HASH:=0bd0f0980cdb01950da4f10bffbb8089ffd76d442fc443b5f8e1aa860b429063 CMAKE_INSTALL:=1 PKG_LICENSE:=ISC diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile index 2e655ed6f..44f1ef256 100644 --- a/package/libs/libunwind/Makefile +++ b/package/libs/libunwind/Makefile @@ -20,7 +20,6 @@ PKG_INSTALL:=1 PKG_LICENSE:=X11 PKG_LICENSE_FILES:=LICENSE -PKG_CPE_ID:=cpe:/a:libunwind_project:libunwind PKG_MAINTAINER:=Yousong Zhou diff --git a/package/libs/libusb-compat/Makefile b/package/libs/libusb-compat/Makefile index 0dc93941a..59c5a80bd 100644 --- a/package/libs/libusb-compat/Makefile +++ b/package/libs/libusb-compat/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libusb-compat -PKG_VERSION:=0.1.5 -PKG_RELEASE:=1 +PKG_VERSION:=0.1.4 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/libusb -PKG_HASH:=404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a +PKG_HASH:=ed5bdd160c7b01ef767fb931a81b454f46226d1e2cf58502ced758d3e5a9fdc4 PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/package/libs/lzo/Makefile b/package/libs/lzo/Makefile index ef33619d8..8d85e4652 100644 --- a/package/libs/lzo/Makefile +++ b/package/libs/lzo/Makefile @@ -42,6 +42,10 @@ CONFIGURE_ARGS += \ TARGET_CFLAGS += $(FPIC) MAKE_FLAGS += CFLAGS_O="$(TARGET_CFLAGS)" +ifeq ($(CONFIG_i386)$(CONFIG_x86_64),) + TARGET_CFLAGS += -DLZO_CFG_NO_UNALIGNED=1 +endif + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/include/lzo $(1)/usr/include/ diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index 3a2b29228..0e3383150 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -18,7 +18,6 @@ PKG_HASH:=a99959d7360def22f9108d2d487c9de384fe76c349697176b1f22370080d5810 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0+ -PKG_CPE_ID:=cpe:/a:arm:mbed_tls include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/package/libs/mbedtls/patches/200-config.patch b/package/libs/mbedtls/patches/200-config.patch index 5fbd6b145..ce32be76a 100644 --- a/package/libs/mbedtls/patches/200-config.patch +++ b/package/libs/mbedtls/patches/200-config.patch @@ -269,3 +269,12 @@ /* \} name SECTION: mbed TLS modules */ +@@ -2681,7 +2681,7 @@ + * recommended because of it is possible to generte SHA-1 collisions, however + * this may be safe for legacy infrastructure where additional controls apply. + */ +-// #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES ++#define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES + + /** + * Allow SHA-1 in the default TLS configuration for TLS 1.2 handshake diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile index 26fabeef7..60a8a176d 100644 --- a/package/libs/ncurses/Makefile +++ b/package/libs/ncurses/Makefile @@ -44,14 +44,6 @@ define Package/libncurses ABI_VERSION:=$(PKG_VERSION) endef -define Package/libncurses-dev - SECTION:=devel - CATEGORY:=Development - SUBMENU:=Libraries - DEPENDS:=zlib - TITLE:=Development files for the ncurses library -endef - TARGET_CFLAGS += $(FPIC) CONFIGURE_ARGS += \ @@ -132,17 +124,6 @@ define Package/libncurses/install done endef -define Package/libncurses-dev/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.a $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/ -endef - define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/* $(1) for lib in ncurses panel menu form; do \ @@ -169,4 +150,3 @@ endef $(eval $(call HostBuild)) $(eval $(call BuildPackage,terminfo)) $(eval $(call BuildPackage,libncurses)) -$(eval $(call BuildPackage,libncurses-dev)) diff --git a/package/libs/nghttp2/Makefile b/package/libs/nghttp2/Makefile deleted file mode 100644 index 3cc2a5543..000000000 --- a/package/libs/nghttp2/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=nghttp2 -PKG_VERSION:=1.29.0 -PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz - -PKG_SOURCE_URL:=https://github.com/nghttp2/nghttp2/releases/download/v$(PKG_VERSION) -PKG_HASH:=a7a1b18be57be6a53a7739988ea27d6ec9209e7b0e8372b8483cd911d7838739 - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING -CMAKE_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/libnghttp2 - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Library implementing the framing layer of HTTP/2 - MAINTAINER:=Hans Dedecker -endef - -define Package/libnghttp2/description - C library implementing the framing layer of the HTTP/2 protocol. It can be used to build a HTTP/2-capable HTTP client or server -endef - -CMAKE_OPTIONS += \ - -DENABLE_LIB_ONLY=ON - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/nghttp2 - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/nghttp2/*.h $(1)/usr/include/nghttp2/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnghttp2.so* $(1)/usr/lib/ -endef - -define Package/libnghttp2/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnghttp2.so* $(1)/usr/lib -endef - -$(eval $(call BuildPackage,libnghttp2)) diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in index 96d3ba3e9..b949d3beb 100644 --- a/package/libs/openssl/Config.in +++ b/package/libs/openssl/Config.in @@ -55,11 +55,6 @@ config OPENSSL_HARDWARE_SUPPORT default n prompt "Enable hardware support" -config OPENSSL_OPTIMIZE_SPEED - bool - default n - prompt "Enable optimization for speed instead of size" - endif config OPENSSL_ENGINE_CRYPTO diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index b75aa45e8..4b70bc724 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -18,17 +18,15 @@ PKG_BUILD_PARALLEL:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:= \ - http://ftp.fi.muni.cz/pub/openssl/source/ \ - http://ftp.linux.hr/pub/openssl/source/ \ - http://gd.tuwien.ac.at/infosys/security/openssl/source/ \ - http://www.openssl.org/source/ \ - http://www.openssl.org/source/old/$(PKG_BASE)/ +PKG_SOURCE_URL:=http://www.openssl.org/source/ \ + ftp://ftp.openssl.org/source/ \ + http://www.openssl.org/source/old/$(PKG_BASE)/ \ + ftp://ftp.funet.fi/pub/crypt/mirrors/ftp.openssl.org/source \ + ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/ PKG_HASH:=370babb75f278c39e0c50e8c4e7493bc0f18db6867478341a832a982fd15a8fe PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE -PKG_CPE_ID:=cpe:/a:openssl:openssl PKG_CONFIG_DEPENDS:= \ CONFIG_OPENSSL_ENGINE_CRYPTO \ CONFIG_OPENSSL_ENGINE_DIGEST \ @@ -41,8 +39,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_OPENSSL_WITH_COMPRESSION \ CONFIG_OPENSSL_WITH_NPN \ CONFIG_OPENSSL_WITH_PSK \ - CONFIG_OPENSSL_WITH_SRP \ - CONFIG_OPENSSL_OPTIMIZE_SPEED + CONFIG_OPENSSL_WITH_SRP include $(INCLUDE_DIR)/package.mk @@ -156,10 +153,6 @@ ifndef CONFIG_OPENSSL_WITH_SRP OPENSSL_OPTIONS += no-srp endif -ifeq ($(CONFIG_OPENSSL_OPTIMIZE_SPEED),y) - TARGET_CFLAGS := $(filter-out -Os,$(TARGET_CFLAGS)) -O3 -endif - ifeq ($(CONFIG_x86_64),y) OPENSSL_TARGET:=linux-x86_64-openwrt OPENSSL_MAKEFLAGS += LIBDIR=lib @@ -167,8 +160,6 @@ else OPENSSL_OPTIONS+=no-sse2 ifeq ($(CONFIG_mips)$(CONFIG_mipsel),y) OPENSSL_TARGET:=linux-mips-openwrt - else ifeq ($(CONFIG_aarch64),y) - OPENSSL_TARGET:=linux-aarch64-openwrt else ifeq ($(CONFIG_arm)$(CONFIG_armeb),y) OPENSSL_TARGET:=linux-armv4-openwrt else @@ -190,7 +181,7 @@ define Build/Configure --openssldir=/etc/ssl \ $(TARGET_CPPFLAGS) \ $(TARGET_LDFLAGS) -ldl \ - $(if $(CONFIG_OPENSSL_OPTIMIZE_SPEED),,-DOPENSSL_SMALL_FOOTPRINT) \ + -DOPENSSL_SMALL_FOOTPRINT \ $(OPENSSL_NO_CIPHERS) \ $(OPENSSL_OPTIONS) \ ) diff --git a/package/libs/openssl/patches/110-optimize-for-size.patch b/package/libs/openssl/patches/110-optimize-for-size.patch index d6d4a2111..0f174a346 100644 --- a/package/libs/openssl/patches/110-optimize-for-size.patch +++ b/package/libs/openssl/patches/110-optimize-for-size.patch @@ -1,12 +1,11 @@ --- a/Configure +++ b/Configure -@@ -470,6 +470,13 @@ my %table=( +@@ -470,6 +470,12 @@ my %table=( "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", +# OpenWrt targets +"linux-armv4-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -+"linux-aarch64-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-x86_64-openwrt", "gcc:-m64 -DL_ENDIAN -DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux-mips-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-generic-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", diff --git a/package/libs/openssl/patches/160-disable_doc_tests.patch b/package/libs/openssl/patches/160-disable_doc_tests.patch index e38d44a76..73459ff90 100644 --- a/package/libs/openssl/patches/160-disable_doc_tests.patch +++ b/package/libs/openssl/patches/160-disable_doc_tests.patch @@ -36,7 +36,7 @@ build_libs: build_libcrypto build_libssl openssl.pc -@@ -542,7 +542,7 @@ dist: +@@ -534,7 +534,7 @@ dist: @$(MAKE) SDIRS='$(SDIRS)' clean @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar @@ -47,7 +47,7 @@ @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ --- a/Makefile.org +++ b/Makefile.org -@@ -540,7 +540,7 @@ dist: +@@ -532,7 +532,7 @@ dist: @$(MAKE) SDIRS='$(SDIRS)' clean @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar diff --git a/package/libs/openssl/patches/200-parallel_build.patch b/package/libs/openssl/patches/200-parallel_build.patch index f2acc4a27..f1d9f0705 100644 --- a/package/libs/openssl/patches/200-parallel_build.patch +++ b/package/libs/openssl/patches/200-parallel_build.patch @@ -24,7 +24,7 @@ all_testapps: build_libs build_testapps build_testapps: -@@ -473,7 +473,7 @@ update: errors stacks util/libeay.num ut +@@ -465,7 +465,7 @@ update: errors stacks util/libeay.num ut @set -e; target=update; $(RECURSIVE_BUILD_CMD) depend: @@ -33,7 +33,7 @@ lint: @set -e; target=lint; $(RECURSIVE_BUILD_CMD) -@@ -535,9 +535,9 @@ dist: +@@ -527,9 +527,9 @@ dist: @$(MAKE) SDIRS='$(SDIRS)' clean @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar @@ -45,7 +45,7 @@ @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ -@@ -546,12 +546,19 @@ install_sw: +@@ -538,12 +538,19 @@ install_sw: $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ $(INSTALL_PREFIX)$(OPENSSLDIR)/private @@ -66,7 +66,7 @@ @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ do \ if [ -f "$$i" ]; then \ -@@ -635,12 +642,7 @@ install_html_docs: +@@ -627,12 +634,7 @@ install_html_docs: done; \ done @@ -173,7 +173,7 @@ apps: @(cd ..; $(MAKE) DIRS=apps all) -@@ -578,7 +578,7 @@ $(DTLSTEST)$(EXE_EXT): $(DTLSTEST).o ssl +@@ -577,7 +577,7 @@ $(DTLSTEST)$(EXE_EXT): $(DTLSTEST).o ssl # fi dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO) diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile index ce0acd19b..58bd06cb5 100644 --- a/package/libs/toolchain/Makefile +++ b/package/libs/toolchain/Makefile @@ -275,32 +275,6 @@ define Package/libgfortran/config endmenu endef -define Package/libgomp -$(call Package/gcc/Default) - TITLE:=OpenMP support library -endef - -define Package/libgomp/config - menu "Configuration" - depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp - - config LIBGOMP_ROOT_DIR - string - prompt "libgomp shared library base directory" - depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp - default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN - default "/" if NATIVE_TOOLCHAIN - - config LIBGOMP_FILE_SPEC - string - prompt "libgomp shared library files (use wildcards)" - depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp - default "./lib/libgomp.so*" - - endmenu -endef - - define Package/ldd $(call Package/libc/Default) DEPENDS:=@!USE_MUSL @@ -369,6 +343,9 @@ LIBGCC_SO=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so.*)) define Build/Compile/uClibc $(CP) \ $(TOOLCHAIN_DIR)/lib/libuClibc-*.so \ + $(TOOLCHAIN_DIR)/lib/libcrypt-*.so \ + $(TOOLCHAIN_DIR)/lib/libm-*.so \ + $(TOOLCHAIN_DIR)/lib/libpthread-*.so \ $(PKG_BUILD_DIR)/ endef ifneq ($(LIBGCC_SO),) @@ -438,8 +415,17 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) $(TOOLCHAIN_DIR)/lib/libc.so.* \ $(TOOLCHAIN_DIR)/lib/libuClibc-$(LIBC_SO_VERSION).so \ $(1)/lib/ + for file in libcrypt libdl libm libutil; do \ + $(CP) \ + $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \ + $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \ + $(1)/lib/; \ + done + $(CP) \ $(PKG_BUILD_DIR)/libuClibc-* \ + $(PKG_BUILD_DIR)/libm-* \ + $(PKG_BUILD_DIR)/libcrypt-* \ $(1)/lib/ endef @@ -471,7 +457,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) define Package/libpthread/install $(INSTALL_DIR) $(1)/lib - ifneq ($(CONFIG_USE_MUSL)$(CONFIG_USE_UCLIBC),y) + ifneq ($(CONFIG_USE_MUSL),y) $(CP) \ $(TOOLCHAIN_DIR)/lib/libpthread.so.* \ $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so \ @@ -496,7 +482,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) define Package/librt/install $(INSTALL_DIR) $(1)/lib - ifneq ($(CONFIG_USE_MUSL)$(CONFIG_USE_UCLIBC),y) + ifneq ($(CONFIG_USE_MUSL),y) $(CP) \ $(TOOLCHAIN_DIR)/lib/librt.so.* \ $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so \ @@ -587,14 +573,6 @@ else exit 0 endef - define Package/libgomp/install - for file in $(call qstrip,$(CONFIG_LIBGOMP_FILE_SPEC)); do \ - $(INSTALL_DIR) $(1)/lib ; \ - $(CP) $(call qstrip,$(CONFIG_LIBGOMP_ROOT_DIR))/$$$$file $(1)/lib/ ; \ - done ; \ - exit 0 - endef - define Package/ldd/install for file in $(call qstrip,$(CONFIG_LDD_FILE_SPEC)); do \ dir=`dirname $$$$file` ; \ @@ -624,6 +602,5 @@ $(eval $(call BuildPackage,libpthread)) $(eval $(call BuildPackage,libthread-db)) $(eval $(call BuildPackage,librt)) $(eval $(call BuildPackage,libgfortran)) -$(eval $(call BuildPackage,libgomp)) $(eval $(call BuildPackage,ldd)) $(eval $(call BuildPackage,ldconfig)) diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile index 7afbeeba6..ff6c4b7d0 100644 --- a/package/libs/ustream-ssl/Makefile +++ b/package/libs/ustream-ssl/Makefile @@ -35,11 +35,11 @@ define Package/libustream-openssl VARIANT:=openssl endef -define Package/libustream-wolfssl +define Package/libustream-cyassl $(Package/libustream/default) - TITLE += (wolfssl) - DEPENDS += +PACKAGE_libustream-wolfssl:libwolfssl - VARIANT:=wolfssl + TITLE += (cyassl) + DEPENDS += +PACKAGE_libustream-cyassl:libcyassl + VARIANT:=cyassl endef define Package/libustream-mbedtls @@ -50,7 +50,7 @@ define Package/libustream-mbedtls DEFAULT_VARIANT:=1 endef -ifeq ($(BUILD_VARIANT),wolfssl) +ifeq ($(BUILD_VARIANT),cyassl) TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/cyassl -DHAVE_SNI CMAKE_OPTIONS += -DCYASSL=on endif @@ -64,9 +64,9 @@ define Package/libustream/default/install endef Package/libustream-openssl/install = $(Package/libustream/default/install) -Package/libustream-wolfssl/install = $(Package/libustream/default/install) +Package/libustream-cyassl/install = $(Package/libustream/default/install) Package/libustream-mbedtls/install = $(Package/libustream/default/install) $(eval $(call BuildPackage,libustream-mbedtls)) -$(eval $(call BuildPackage,libustream-wolfssl)) +$(eval $(call BuildPackage,libustream-cyassl)) $(eval $(call BuildPackage,libustream-openssl)) diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch deleted file mode 100644 index 83d51b1d5..000000000 --- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/wolfssl/wolfcrypt/settings.h -+++ b/wolfssl/wolfcrypt/settings.h -@@ -1553,7 +1553,7 @@ extern void uITRON4_free(void *p) ; - #endif - - /* warning for not using harden build options (default with ./configure) */ --#ifndef WC_NO_HARDEN -+#if 0 - #if (defined(USE_FAST_MATH) && !defined(TFM_TIMING_RESISTANT)) || \ - (defined(HAVE_ECC) && !defined(ECC_TIMING_RESISTANT)) || \ - (!defined(NO_RSA) && !defined(WC_RSA_BLINDING) && !defined(HAVE_FIPS)) diff --git a/package/network/config/firewall/Makefile b/package/network/config/firewall/Makefile index 06e67543b..e5fcb8c91 100644 --- a/package/network/config/firewall/Makefile +++ b/package/network/config/firewall/Makefile @@ -13,9 +13,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/firewall3.git -PKG_SOURCE_DATE:=2017-11-07 -PKG_SOURCE_VERSION:=c4309372acc7e1bef8aa230269f7da1dec790e68 -PKG_MIRROR_HASH:=1699884d8499d01e433959185f79ff9eb69704de47885b996123374b8015b422 +PKG_SOURCE_DATE:=2017-05-27 +PKG_SOURCE_VERSION:=a4d98aea373e04f3fdc3c492c1688ba52ce490a9 +PKG_MIRROR_HASH:=55402b1e6bb471f6aed599c61c1c63b58212f5789f094d78247646fc0a7cf435 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC diff --git a/package/network/config/gre/Makefile b/package/network/config/gre/Makefile index b191327f8..9193f5c9f 100644 --- a/package/network/config/gre/Makefile +++ b/package/network/config/gre/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gre PKG_VERSION:=1 -PKG_RELEASE:=8 +PKG_RELEASE:=7 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/gre/files/gre.sh b/package/network/config/gre/files/gre.sh index e604bfb25..3301cee00 100755 --- a/package/network/config/gre/files/gre.sh +++ b/package/network/config/gre/files/gre.sh @@ -31,16 +31,7 @@ gre_generic_setup() { json_add_string local "$local" json_add_string remote "$remote" [ -n "$tunlink" ] && json_add_string link "$tunlink" - - json_add_object 'data' - [ -n "$ikey" ] && json_add_int ikey "$ikey" - [ -n "$okey" ] && json_add_int okey "$okey" - [ -n "$icsum" ] && json_add_boolean icsum "$icsum" - [ -n "$ocsum" ] && json_add_boolean ocsum "$ocsum" - [ -n "$iseqno" ] && json_add_boolean iseqno "$iseqno" - [ -n "$oseqno" ] && json_add_boolean oseqno "$oseqno" - json_close_object - + json_add_string info "${ikey:-0},${okey:-0},${icsum:-0},${ocsum:-0},${iseqno:-0},${oseqno:-0}" proto_close_tunnel proto_add_data diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile index cf8eaf247..6e0b47f87 100644 --- a/package/network/config/ltq-adsl-app/Makefile +++ b/package/network/config/ltq-adsl-app/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=dsl_cpe_control_danube PKG_VERSION:=3.24.4.4 -PKG_RELEASE:=5 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION) PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/ @@ -35,7 +35,7 @@ define Package/ltq-adsl-app CATEGORY:=Network TITLE:=Lantiq DSL userland tool URL:=http://www.lantiq.com/ - DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread +ip + DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread MENU:=1 endef @@ -76,11 +76,10 @@ CONFIGURE_ARGS += \ TARGET_CFLAGS += -I$(LINUX_DIR)/include define Package/ltq-adsl-app/install - $(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(1)/etc/hotplug.d/dsl $(1)/etc/hotplug.d/net + $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/dsl_control $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/10_atm.sh $(1)/etc/hotplug.d/dsl - $(INSTALL_BIN) ./files/10_ptm.sh $(1)/etc/hotplug.d/dsl - $(INSTALL_BIN) ./files/10-adsl_rename $(1)/etc/hotplug.d/net + + $(INSTALL_DIR) $(1)/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin endef diff --git a/package/network/config/ltq-adsl-app/files/10-adsl_rename b/package/network/config/ltq-adsl-app/files/10-adsl_rename deleted file mode 100644 index f81a90a5f..000000000 --- a/package/network/config/ltq-adsl-app/files/10-adsl_rename +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ "$ACTION" = add ]; then - [ "$DEVICENAME" = "nas0" ] || [ "$DEVICENAME" = "ptm0" ] || exit - - ip link set $DEVICENAME name dsl0 -fi diff --git a/package/network/config/ltq-adsl-app/files/10_atm.sh b/package/network/config/ltq-adsl-app/files/10_atm.sh deleted file mode 100755 index 898d8ec07..000000000 --- a/package/network/config/ltq-adsl-app/files/10_atm.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -[ "$DSL_NOTIFICATION_TYPE" = "DSL_STATUS" ] && \ -[ "$DSL_TC_LAYER_STATUS" = "ATM" ] && \ -! grep -q "ltq_atm_ar9\|ltq_atm_ase\|ltq_atm_danube" /proc/modules || exit 0 - -logger -p daemon.notice -t "dsl-notify" "Switching to TC-Layer ATM" - -if grep -q "ltq_ptm_ar9\|ltq_ptm_ase\|ltq_ptm_danube" /proc/modules ; then - logger -p daemon.notice -t "dsl-notify" "Loading ATM driver while EFM/PTM driver is loaded is not possible. Reboot is needed." - exit -fi - -case "$(strings /proc/device-tree/compatible)" in -*lantiq,ar9*) - soc="ar9" - ;; -*lantiq,ase*) - soc="ase" - ;; -*lantiq,danube*) - soc="danube" - ;; -*) - logger -p daemon.notice -t "dsl-notify" "Unsupported SoC" - exit -esac - -modprobe ltq_atm_${soc} - -/etc/init.d/br2684ctl reload diff --git a/package/network/config/ltq-adsl-app/files/10_ptm.sh b/package/network/config/ltq-adsl-app/files/10_ptm.sh deleted file mode 100755 index 8a76b926f..000000000 --- a/package/network/config/ltq-adsl-app/files/10_ptm.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -[ "$DSL_NOTIFICATION_TYPE" = "DSL_STATUS" ] && \ -[ "$DSL_TC_LAYER_STATUS" = "EFM" ] && \ -! grep -q "ltq_ptm_ar9\|ltq_ptm_ase\|ltq_ptm_danube" /proc/modules || exit 0 - -logger -p daemon.notice -t "dsl-notify" "Switching to TC-Layer EFM/PTM" - -if grep -q "ltq_atm_ar9\|ltq_atm_ase\|ltq_atm_danube" /proc/modules ; then - logger -p daemon.notice -t "dsl-notify" "Loading EFM/PTM driver while ATM driver is loaded is not possible. Reboot is needed." - exit -fi - -case "$(strings /proc/device-tree/compatible)" in -*lantiq,ar9*) - soc="ar9" - ;; -*lantiq,ase*) - soc="ase" - ;; -*lantiq,danube*) - soc="danube" - ;; -*) - logger -p daemon.notice -t "dsl-notify" "Unsupported SoC" - exit -esac - -modprobe ltq_ptm_${soc} diff --git a/package/network/config/ltq-adsl-app/files/dsl_control b/package/network/config/ltq-adsl-app/files/dsl_control index d93d47808..dcde6b233 100644 --- a/package/network/config/ltq-adsl-app/files/dsl_control +++ b/package/network/config/ltq-adsl-app/files/dsl_control @@ -2,12 +2,14 @@ # Copyright (C) 2012 OpenWrt.org START=49 -USE_PROCD=1 EXTRA_COMMANDS="status lucistat" EXTRA_HELP=" status Get DSL status information lucistat Get status information if lua friendly format" +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + [ -f /lib/functions/lantiq_dsl.sh ] && . /lib/functions/lantiq_dsl.sh annex_b=10_00_10_00_00_04_00_00 @@ -26,11 +28,7 @@ annex_m2=00_00_00_00_40_00_00_00 annex_m2p=00_00_00_00_00_00_04_00 annex_j=10_00_10_40_00_04_01_00 -service_triggers() { - procd_add_reload_trigger network -} - -start_service() { +start() { local annex local firmware local xtu @@ -47,15 +45,14 @@ start_service() { return 1 } - procd_open_instance - procd_set_param command /sbin/dsl_cpe_control \ - -i${xtu} \ + esi $(printf '%012X' $((1+0x$(tr -d : -Date: Mon, 16 Oct 2017 21:08:26 +0200 -Subject: ltq-adsl-app: add more script notifications - -Backport HANDSHAKE and TRAINING notification from ltq-vdsl-app. It -unifies the dsl led blinking pattern accross all subtargets and allows -to get the current line status from the dsl led. - -Signed-off-by: Mathias Kresin ---- - .../100-add-more-script-notifications.patch | 27 ++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - create mode 100644 package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch - ---- a/src/dsl_cpe_control.c -+++ b/src/dsl_cpe_control.c -@@ -3273,7 +3273,23 @@ DSL_CPE_STATIC DSL_int_t DSL_CPE_Event_S - #ifdef INCLUDE_SCRIPT_NOTIFICATION - if (g_sRcScript != DSL_NULL) - { -- if ( (nLineState == DSL_LINESTATE_SHOWTIME_TC_SYNC) && -+ if ( (nLineState == DSL_LINESTATE_HANDSHAKE) && -+ (g_nPrevLineState[nDevice] != DSL_LINESTATE_HANDSHAKE) ) -+ { -+ if (DSL_CPE_SetEnv("DSL_INTERFACE_STATUS", "HANDSHAKE") == DSL_SUCCESS) -+ { -+ bExec = DSL_TRUE; -+ } -+ } -+ else if ( (nLineState == DSL_LINESTATE_FULL_INIT) && -+ (g_nPrevLineState[nDevice] != DSL_LINESTATE_FULL_INIT) ) -+ { -+ if (DSL_CPE_SetEnv("DSL_INTERFACE_STATUS", "TRAINING") == DSL_SUCCESS) -+ { -+ bExec = DSL_TRUE; -+ } -+ } -+ else if ( (nLineState == DSL_LINESTATE_SHOWTIME_TC_SYNC) && - (g_nPrevLineState[nDevice] != DSL_LINESTATE_SHOWTIME_TC_SYNC) ) - { - if (DSL_CPE_SetEnv("DSL_INTERFACE_STATUS", "UP") == DSL_SUCCESS) diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index baf63f9d1..1ddb83a0a 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -28,7 +28,7 @@ define Package/ltq-vdsl-app CATEGORY:=Network TITLE:=Lantiq VDSL userland tool URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_xrx200 +libpthread +librt +ip + DEPENDS:=@TARGET_lantiq_xrx200 +libpthread +librt +atm-esi endef define Package/ltq-vdsl-app/description @@ -58,11 +58,9 @@ CONFIGURE_ARGS += \ #CONFIGURE_ARGS += --enable-model=debug define Package/ltq-vdsl-app/install - $(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(1)/etc/hotplug.d/dsl $(1)/etc/hotplug.d/net + $(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(INSTALL_BIN) ./files/dsl_control $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/10_atm.sh $(1)/etc/hotplug.d/dsl - $(INSTALL_BIN) ./files/10_ptm.sh $(1)/etc/hotplug.d/dsl - $(INSTALL_BIN) ./files/10-xdsl_rename $(1)/etc/hotplug.d/net + $(INSTALL_BIN) ./files/vdsl_cpe_control_wrapper $(1)/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin/vdsl_cpe_control $(INSTALL_BIN) ./files/dsl_cpe_pipe.sh $(1)/sbin/ diff --git a/package/network/config/ltq-vdsl-app/files/10-xdsl_rename b/package/network/config/ltq-vdsl-app/files/10-xdsl_rename deleted file mode 100644 index f81a90a5f..000000000 --- a/package/network/config/ltq-vdsl-app/files/10-xdsl_rename +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ "$ACTION" = add ]; then - [ "$DEVICENAME" = "nas0" ] || [ "$DEVICENAME" = "ptm0" ] || exit - - ip link set $DEVICENAME name dsl0 -fi diff --git a/package/network/config/ltq-vdsl-app/files/10_atm.sh b/package/network/config/ltq-vdsl-app/files/10_atm.sh deleted file mode 100755 index abfb73592..000000000 --- a/package/network/config/ltq-vdsl-app/files/10_atm.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -[ "$DSL_NOTIFICATION_TYPE" = "DSL_STATUS" ] && \ -[ "$DSL_TC_LAYER_STATUS" = "ATM" ] && \ -! grep -q "ltq_atm_vr9" /proc/modules || exit 0 - -logger -p daemon.notice -t "dsl-notify" "Switching to TC-Layer ATM" - -if grep -q "ltq_ptm_vr9" /proc/modules ; then - logger -p daemon.notice -t "dsl-notify" "Loading ATM driver while EFM/PTM driver is loaded is not possible. Reboot is needed." - exit -fi - -modprobe ltq_atm_vr9 - -/etc/init.d/br2684ctl reload diff --git a/package/network/config/ltq-vdsl-app/files/10_ptm.sh b/package/network/config/ltq-vdsl-app/files/10_ptm.sh deleted file mode 100755 index 1c62617bb..000000000 --- a/package/network/config/ltq-vdsl-app/files/10_ptm.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -[ "$DSL_NOTIFICATION_TYPE" = "DSL_STATUS" ] && \ -[ "$DSL_TC_LAYER_STATUS" = "EFM" ] && \ -! grep -q "ltq_ptm_vr9" /proc/modules || exit 0 - -logger -p daemon.notice -t "dsl-notify" "Switching to TC-Layer EFM/PTM" - -if grep -q "ltq_atm_vr9" /proc/modules ; then - logger -p daemon.notice -t "dsl-notify" "Loading EFM/PTM driver while ATM driver is loaded is not possible. Reboot is needed." - exit -fi - -modprobe ltq_ptm_vr9 diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control index 818990e57..d7980b411 100644 --- a/package/network/config/ltq-vdsl-app/files/dsl_control +++ b/package/network/config/ltq-vdsl-app/files/dsl_control @@ -180,7 +180,6 @@ start_service() { local xtse local xfer_mode local line_mode - local tc_layer local mode local lowlevel local snr @@ -195,44 +194,37 @@ start_service() { eval "xtse=\"\${xtse_xdsl_$annex}\"" + [ -z "${xfer_mode}" ] && xfer_mode=ptm + case "${xfer_mode}" in atm) - tc_layer="-T1:0x1:0x1_1:0x1:0x1" + LOAD=ltq_atm_vr9 + UNLOAD=ltq_ptm_vr9 + + # in most cases atm is used on top of adsl + [ -z "${line_mode}" ] && line_mode=adsl ;; - ptm) - tc_layer="-T2:0x1:0x1_2:0x1:0x1" + *) + LOAD=ltq_ptm_vr9 + UNLOAD=ltq_atm_vr9 + + # in most cases ptm is used on top of vdsl + [ -z "${line_mode}" ] && line_mode=vdsl ;; esac case "${line_mode}" in adsl) - mode="-M1" + mode=1 - # mask out VDSL bits when ADSL is requested + # mask out VDSL bits when ATM is requested xtse="${xtse%_*}_00" ;; - vdsl) - mode="-M2" - - # mask out ADSL bits when VDSL is requested - xtse="00_00_00_00_00_00_00_${xtse##*_}" + *) + mode=2 ;; esac - local annexgpio="/sys/class/gpio/annex" - if [ -d "${annexgpio}a" ] && [ -d "${annexgpio}b" ]; then - case "${annex}" in - a*|l*|m*) - echo 1 > "${annexgpio}a/value" - echo 0 > "${annexgpio}b/value" - ;; - b*|j*) - echo 0 > "${annexgpio}a/value" - echo 1 > "${annexgpio}b/value" - ;; - esac - fi - if [ -z "${firmware}" ]; then # search for the firmware provided by dsl-vrx200-firmware-xdsl-* if grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo; then @@ -295,14 +287,14 @@ start_service() { } procd_open_instance - procd_set_param command /sbin/vdsl_cpe_control \ + procd_set_param command /sbin/vdsl_cpe_control_wrapper \ -i$xtse \ -n /sbin/dsl_notify.sh \ -f ${firmware} \ $lowlevel \ - ${mode} \ - ${tc_layer} \ + -M ${mode} \ $autoboot + procd_append_param env "LOAD=$LOAD" "UNLOAD=$UNLOAD" procd_close_instance } diff --git a/package/network/config/ltq-vdsl-app/files/vdsl_cpe_control_wrapper b/package/network/config/ltq-vdsl-app/files/vdsl_cpe_control_wrapper new file mode 100644 index 000000000..cc127f777 --- /dev/null +++ b/package/network/config/ltq-vdsl-app/files/vdsl_cpe_control_wrapper @@ -0,0 +1,11 @@ +#!/bin/sh + +for mod in $UNLOAD; do + grep -q "$mod " /proc/modules && rmmod "$mod" +done +for mod in $LOAD; do + grep -q "$mod " /proc/modules || insmod "$mod" +done + +esi $(printf '%012X' $((1+0x$(tr -d : diff --git a/package/network/config/vti/Makefile b/package/network/config/vti/Makefile index 0a4657c94..bda2a9ab1 100644 --- a/package/network/config/vti/Makefile +++ b/package/network/config/vti/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vti PKG_VERSION:=1 -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/vti/files/vti.sh b/package/network/config/vti/files/vti.sh index 0443800a0..763fd4ee3 100755 --- a/package/network/config/vti/files/vti.sh +++ b/package/network/config/vti/files/vti.sh @@ -26,12 +26,7 @@ vti_generic_setup() { json_add_string local "$local" json_add_string remote "$remote" [ -n "$tunlink" ] && json_add_string link "$tunlink" - - json_add_object 'data' - [ -n "$ikey" ] && json_add_int ikey "$ikey" - [ -n "$okey" ] && json_add_int okey "$okey" - json_close_object - + json_add_string info "${ikey:-0},${okey:-0}" proto_close_tunnel proto_add_data diff --git a/package/network/config/vxlan/Makefile b/package/network/config/vxlan/Makefile deleted file mode 100644 index a471d4e90..000000000 --- a/package/network/config/vxlan/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=vxlan -PKG_VERSION:=1 -PKG_LICENSE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/vxlan - SECTION:=net - CATEGORY:=Network - MAINTAINER:=Matthias Schiffer - TITLE:=Virtual eXtensible LAN config support - DEPENDS:=+kmod-vxlan -endef - -define Package/vxlan/description - Virtual eXtensible LAN config support in /etc/config/network. -endef - -define Build/Compile -endef - -define Build/Configure -endef - -define Package/vxlan/install - $(INSTALL_DIR) $(1)/lib/netifd/proto - $(INSTALL_BIN) ./files/vxlan.sh $(1)/lib/netifd/proto/vxlan.sh -endef - -$(eval $(call BuildPackage,vxlan)) diff --git a/package/network/config/vxlan/files/vxlan.sh b/package/network/config/vxlan/files/vxlan.sh deleted file mode 100755 index 27ccd8f12..000000000 --- a/package/network/config/vxlan/files/vxlan.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/sh - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . /lib/functions/network.sh - . ../netifd-proto.sh - init_proto "$@" -} - -vxlan_generic_setup() { - local cfg="$1" - local mode="$2" - local local="$3" - local remote="$4" - - local link="$cfg" - - local port vid ttl tos mtu macaddr zone - json_get_vars port vid ttl tos mtu macaddr zone - - - proto_init_update "$link" 1 - - proto_add_tunnel - json_add_string mode "$mode" - - [ -n "$tunlink" ] && json_add_string link "$tunlink" - [ -n "$local" ] && json_add_string local "$local" - [ -n "$remote" ] && json_add_string remote "$remote" - - [ -n "$ttl" ] && json_add_int ttl "$ttl" - [ -n "$tos" ] && json_add_string tos "$tos" - [ -n "$mtu" ] && json_add_int mtu "$mtu" - - json_add_object 'data' - [ -n "$port" ] && json_add_int port "$port" - [ -n "$vid" ] && json_add_int id "$vid" - [ -n "$macaddr" ] && json_add_string macaddr "$macaddr" - json_close_object - - proto_close_tunnel - - proto_add_data - [ -n "$zone" ] && json_add_string zone "$zone" - proto_close_data - - proto_send_update "$cfg" -} - -proto_vxlan_setup() { - local cfg="$1" - - local ipaddr peeraddr - json_get_vars ipaddr peeraddr tunlink - - [ -z "$peeraddr" ] && { - proto_notify_error "$cfg" "MISSING_ADDRESS" - proto_block_restart "$cfg" - exit - } - - ( proto_add_host_dependency "$cfg" '' "$tunlink" ) - - [ -z "$ipaddr" ] && { - local wanif="$tunlink" - if [ -z "$wanif" ] && ! network_find_wan wanif; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - - if ! network_get_ipaddr ipaddr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - } - - vxlan_generic_setup "$cfg" 'vxlan' "$ipaddr" "$peeraddr" -} - -proto_vxlan6_setup() { - local cfg="$1" - - local ip6addr peer6addr - json_get_vars ip6addr peer6addr tunlink - - [ -z "$peer6addr" ] && { - proto_notify_error "$cfg" "MISSING_ADDRESS" - proto_block_restart "$cfg" - exit - } - - ( proto_add_host_dependency "$cfg" '' "$tunlink" ) - - [ -z "$ip6addr" ] && { - local wanif="$tunlink" - if [ -z "$wanif" ] && ! network_find_wan6 wanif; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - - if ! network_get_ipaddr6 ip6addr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - } - - vxlan_generic_setup "$cfg" 'vxlan6' "$ip6addr" "$peer6addr" -} - -proto_vxlan_teardown() { - local cfg="$1" -} - -proto_vxlan6_teardown() { - local cfg="$1" -} - -vxlan_generic_init_config() { - no_device=1 - available=1 - - proto_config_add_string "tunlink" - proto_config_add_string "zone" - - proto_config_add_int "vid" - proto_config_add_int "port" - proto_config_add_int "ttl" - proto_config_add_int "tos" - proto_config_add_int "mtu" - proto_config_add_string "macaddr" -} - -proto_vxlan_init_config() { - vxlan_generic_init_config - proto_config_add_string "ipaddr" - proto_config_add_string "peeraddr" -} - -proto_vxlan6_init_config() { - vxlan_generic_init_config - proto_config_add_string "ip6addr" - proto_config_add_string "peer6addr" -} - -[ -n "$INCLUDE_ONLY" ] || { - add_protocol vxlan - add_protocol vxlan6 -} diff --git a/package/network/ipv6/6rd/Makefile b/package/network/ipv6/6rd/Makefile index 5086fae69..899c0f13f 100644 --- a/package/network/ipv6/6rd/Makefile +++ b/package/network/ipv6/6rd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6rd PKG_VERSION:=9 -PKG_RELEASE:=3 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/ipv6/6rd/files/6rd.sh b/package/network/ipv6/6rd/files/6rd.sh index 8b3441428..62d35b699 100644 --- a/package/network/ipv6/6rd/files/6rd.sh +++ b/package/network/ipv6/6rd/files/6rd.sh @@ -64,13 +64,9 @@ proto_6rd_setup() { json_add_int ttl "${ttl:-64}" [ -n "$tos" ] && json_add_string tos "$tos" json_add_string local "$ipaddr" + json_add_string 6rd-prefix "$ip6prefix/$ip6prefixlen" + json_add_string 6rd-relay-prefix "$ip4prefix/$ip4prefixlen" [ -n "$tunlink" ] && json_add_string link "$tunlink" - - json_add_object 'data' - json_add_string prefix "$ip6prefix/$ip6prefixlen" - json_add_string relay-prefix "$ip4prefix/$ip4prefixlen" - json_close_object - proto_close_tunnel proto_add_data diff --git a/package/network/ipv6/map/Makefile b/package/network/ipv6/map/Makefile index ce04235f2..fd8291d68 100644 --- a/package/network/ipv6/map/Makefile +++ b/package/network/ipv6/map/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=map PKG_VERSION:=4 -PKG_RELEASE:=9 +PKG_RELEASE:=6 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/ipv6/map/files/map.sh b/package/network/ipv6/map/files/map.sh index 42050183c..fe872828c 100755 --- a/package/network/ipv6/map/files/map.sh +++ b/package/network/ipv6/map/files/map.sh @@ -86,19 +86,15 @@ proto_map_setup() { json_add_string link $(eval "echo \$RULE_${k}_PD6IFACE") if [ "$type" = "map-e" ]; then - json_add_object "data" - json_add_array "fmrs" + json_add_array "fmrs" for i in $(seq $RULE_COUNT); do [ "$(eval "echo \$RULE_${i}_FMR")" != 1 ] && continue - json_add_object "" - json_add_string prefix6 "$(eval "echo \$RULE_${i}_IPV6PREFIX")/$(eval "echo \$RULE_${i}_PREFIX6LEN")" - json_add_string prefix4 "$(eval "echo \$RULE_${i}_IPV4PREFIX")/$(eval "echo \$RULE_${i}_PREFIX4LEN")" - json_add_int ealen $(eval "echo \$RULE_${i}_EALEN") - json_add_int offset $(eval "echo \$RULE_${i}_OFFSET") - json_close_object + fmr="$(eval "echo \$RULE_${i}_IPV6PREFIX")/$(eval "echo \$RULE_${i}_PREFIX6LEN")" + fmr="$fmr,$(eval "echo \$RULE_${i}_IPV4PREFIX")/$(eval "echo \$RULE_${i}_PREFIX4LEN")" + fmr="$fmr,$(eval "echo \$RULE_${i}_EALEN"),$(eval "echo \$RULE_${i}_OFFSET")" + json_add_string "" "$fmr" done - json_close_array - json_close_object + json_close_array fi proto_close_tunnel @@ -220,7 +216,6 @@ proto_map_init_config() { proto_config_add_string "ip6prefix" proto_config_add_int "ip6prefixlen" proto_config_add_string "peeraddr" - proto_config_add_int "ealen" proto_config_add_int "psidlen" proto_config_add_int "psid" proto_config_add_int "offset" diff --git a/package/network/ipv6/map/src/mapcalc.c b/package/network/ipv6/map/src/mapcalc.c index 6233bce73..648840d9b 100644 --- a/package/network/ipv6/map/src/mapcalc.c +++ b/package/network/ipv6/map/src/mapcalc.c @@ -118,7 +118,7 @@ static void match_prefix(int *pdlen, struct in6_addr *pd, struct blob_attr *cur, struct blob_attr *d; unsigned drem; - if (!cur || blobmsg_type(cur) != BLOBMSG_TYPE_ARRAY || !blobmsg_check_attr(cur, false)) + if (!cur || blobmsg_type(cur) != BLOBMSG_TYPE_ARRAY || !blobmsg_check_attr(cur, NULL)) return; blobmsg_for_each_attr(d, cur, drem) { diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 457a871ef..8b97e1fb2 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,22 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_RELEASE:=4 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=$(LEDE_GIT)/project/odhcp6c.git -PKG_SOURCE_DATE:=2017-09-05 -PKG_SOURCE_VERSION:=51733a6d3bfe0fb9e8c53aea22231e5b8a1f64c3 -PKG_MIRROR_HASH:=fdccfb9a6cb00d6dbf1a3160bd36622ee8e188a9d58bcd282c71a9368972e184 +PKG_SOURCE_URL:=$(LEDE_GIT)/project/odhcp6c.git +PKG_SOURCE_DATE:=2017-01-30 +PKG_SOURCE_VERSION:=c13b6a05dbd9174356cc4b7fd1edf39445efd982 +PKG_MIRROR_HASH:=001e58f1ab6eb8903d9e47060ae037a2e4f021f1fef5032347b767f56f4664f6 PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -CMAKE_OPTIONS += \ - -DUSE_LIBUBOX=on - ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_cer_id),0) CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcp6c_ext_cer_id) endif diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index 03efaf721..ab0b55675 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -81,23 +81,6 @@ setup_interface () { # RFC 7278 if [ "$mask" -eq 64 -a -z "$PREFIXES" -a -n "$EXTENDPREFIX" ]; then proto_add_ipv6_prefix "$addr/$mask,$preferred,$valid" - - local raroutes="" - for route in $RA_ROUTES; do - local prefix="${route%%/*}" - local entry="${route#*/}" - local pmask="${entry%%,*}" - entry="${entry#*,}" - local gw="${entry%%,*}" - - [ -z "$gw" -a "$mask" = "$pmask" ] && { - case "$addr" in - "${prefix%*::}"*) continue;; - esac - } - raroutes="$raroutes $route" - done - RA_ROUTES="$raroutes" fi done diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index 56f75521e..9e3f66973 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -31,15 +31,14 @@ proto_dhcpv6_init_config() { proto_config_add_boolean fakeroutes proto_config_add_boolean sourcefilter proto_config_add_boolean keep_ra_dnslifetime - proto_config_add_int "ra_holdoff" } proto_dhcpv6_setup() { local config="$1" local iface="$2" - local reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff - json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff + local reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime + json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime # Configure @@ -65,8 +64,6 @@ proto_dhcpv6_setup() { [ "$keep_ra_dnslifetime" = "1" ] && append opts "-L" - [ -n "$ra_holdoff" ] && append opts "-m$ra_holdoff" - for opt in $reqopts; do append opts "-r$opt" done diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 79c228aff..1a887beba 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_VERSION:=2.78 -PKG_RELEASE:=7 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/ @@ -17,14 +17,12 @@ PKG_HASH:=89949f438c74b0c7543f06689c319484bd126cc4b1f8c745c742ab397681252b PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:thekelleys:dnsmasq PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcp \ - CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcpv6 \ +PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcpv6 \ CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dnssec \ CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_auth \ CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset \ @@ -39,7 +37,6 @@ define Package/dnsmasq/Default CATEGORY:=Base system TITLE:=DNS and DHCP server URL:=http://www.thekelleys.org.uk/dnsmasq/ - DEPENDS:=+libubus USERID:=dnsmasq=453:dnsmasq=453 endef @@ -51,14 +48,14 @@ endef define Package/dnsmasq-dhcpv6 $(call Package/dnsmasq/Default) TITLE += (with DHCPv6 support) - DEPENDS+=@IPV6 + DEPENDS:=@IPV6 VARIANT:=dhcpv6 endef define Package/dnsmasq-full $(call Package/dnsmasq/Default) TITLE += (with DNSSEC, DHCPv6, Auth DNS, IPset, Conntrack, NO_ID enabled by default) - DEPENDS+=+PACKAGE_dnsmasq_full_dnssec:libnettle \ + DEPENDS:=+PACKAGE_dnsmasq_full_dnssec:libnettle \ +PACKAGE_dnsmasq_full_ipset:kmod-ipt-ipset \ +PACKAGE_dnsmasq_full_conntrack:libnetfilter-conntrack VARIANT:=full @@ -77,8 +74,8 @@ endef define Package/dnsmasq-full/description $(call Package/dnsmasq/description) -This is a fully configurable variant with DHCPv4, DHCPv6, DNSSEC, Authoritative DNS -and IPset, Conntrack support & NO_ID enabled by default. +This is a fully configurable variant with DHCPv6, DNSSEC, Authoritative DNS and +IPset, Conntrack support & NO_ID enabled by default. endef define Package/dnsmasq/conffiles @@ -88,12 +85,9 @@ endef define Package/dnsmasq-full/config if PACKAGE_dnsmasq-full - config PACKAGE_dnsmasq_full_dhcp - bool "Build with DHCP support." - default y config PACKAGE_dnsmasq_full_dhcpv6 bool "Build with DHCPv6 support." - depends on IPV6 && PACKAGE_dnsmasq_full_dhcp + depends on IPV6 default n config PACKAGE_dnsmasq_full_dnssec bool "Build with DNSSEC support." @@ -129,8 +123,7 @@ ifeq ($(BUILD_VARIANT),nodhcpv6) endif ifeq ($(BUILD_VARIANT),full) - COPTS += $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcp),,-DNO_DHCP) \ - $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcpv6),,-DNO_DHCP6) \ + COPTS += $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcpv6),,-DNO_DHCP6) \ $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dnssec),-DHAVE_DNSSEC) \ $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_auth),,-DNO_AUTH) \ $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset),,-DNO_IPSET) \ @@ -157,17 +150,8 @@ define Package/dnsmasq/install $(INSTALL_DATA) ./files/dnsmasq.conf $(1)/etc/dnsmasq.conf $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/dnsmasq.init $(1)/etc/init.d/dnsmasq - $(INSTALL_DIR) $(1)/etc/hotplug.d/dhcp - $(INSTALL_DIR) $(1)/etc/hotplug.d/neigh $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp - $(INSTALL_DIR) $(1)/etc/hotplug.d/tftp $(INSTALL_DATA) ./files/dnsmasqsec.hotplug $(1)/etc/hotplug.d/ntp/25-dnsmasqsec - $(INSTALL_DIR) $(1)/usr/share/dnsmasq - $(INSTALL_DATA) ./files/rfc6761.conf $(1)/usr/share/dnsmasq/ - $(INSTALL_DIR) $(1)/usr/lib/dnsmasq - $(INSTALL_BIN) ./files/dhcp-script.sh $(1)/usr/lib/dnsmasq/dhcp-script.sh - $(INSTALL_DIR) $(1)/usr/share/acl.d - $(INSTALL_DATA) ./files/dnsmasq_acl.json $(1)/usr/share/acl.d/ endef Package/dnsmasq-dhcpv6/install = $(Package/dnsmasq/install) diff --git a/package/network/services/dnsmasq/files/dhcp-script.sh b/package/network/services/dnsmasq/files/dhcp-script.sh deleted file mode 100755 index 86032694c..000000000 --- a/package/network/services/dnsmasq/files/dhcp-script.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -[ -f "$USER_DHCPSCRIPT" ] && . "$USER_DHCPSCRIPT" "$@" - -case "$1" in - add) - export ACTION="add" - export MACADDR="$2" - export IPADDR="$3" - export HOSTNAME="$4" - exec /sbin/hotplug-call dhcp - ;; - del) - export ACTION="remove" - export MACADDR="$2" - export IPADDR="$3" - export HOSTNAME="$4" - exec /sbin/hotplug-call dhcp - ;; - old) - export ACTION="update" - export MACADDR="$2" - export IPADDR="$3" - export HOSTNAME="$4" - exec /sbin/hotplug-call dhcp - ;; - arp-add) - export ACTION="add" - export MACADDR="$2" - export IPADDR="$3" - exec /sbin/hotplug-call neigh - ;; - arp-del) - export ACTION="remove" - export MACADDR="$2" - export IPADDR="$3" - exec /sbin/hotplug-call neigh - ;; - tftp) - export ACTION="add" - export TFTP_SIZE="$2" - export TFTP_ADDR="$3" - export TFTP_PATH="$4" - exec /sbin/hotplug-call tftp - ;; -esac diff --git a/package/network/services/dnsmasq/files/dhcp.conf b/package/network/services/dnsmasq/files/dhcp.conf index 360c7d79e..362b90a29 100644 --- a/package/network/services/dnsmasq/files/dhcp.conf +++ b/package/network/services/dnsmasq/files/dhcp.conf @@ -15,7 +15,7 @@ config dnsmasq option leasefile '/tmp/dhcp.leases' option resolvfile '/tmp/resolv.conf.auto' #list server '/mycompany.local/1.2.3.4' - option nonwildcard 1 # bind to & keep track of interfaces + #option nonwildcard 1 #list interface br-lan #list notinterface lo #list bogusnxdomain '64.94.110.11' diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index dcc18e34d..34c35c2dc 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -8,18 +8,13 @@ PROG=/usr/sbin/dnsmasq ADD_LOCAL_DOMAIN=1 ADD_LOCAL_HOSTNAME=1 -ADD_WAN_FQDN=0 -ADD_LOCAL_FQDN="" BASECONFIGFILE="/var/etc/dnsmasq.conf" BASEHOSTFILE="/tmp/hosts/dhcp" +BASETIMESTAMPFILE="/etc/dnsmasq.time" TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf" TIMEVALIDFILE="/var/state/dnsmasqsec" BASEDHCPSTAMPFILE="/var/run/dnsmasq" -RFC6761FILE="/usr/share/dnsmasq/rfc6761.conf" -DHCPSCRIPT="/usr/lib/dnsmasq/dhcp-script.sh" - -DNSMASQ_DHCP_VER=4 xappend() { local value="$1" @@ -88,24 +83,12 @@ log_once() { logger -t dnsmasq "$@" } -has_handler() { - local file - - for file in /etc/hotplug.d/dhcp/* /etc/hotplug.d/tftp/* /etc/hotplug.d/neigh/*; do - [ -f "$file" ] && return 0 - done - - return 1 -} - append_bool() { local section="$1" local option="$2" local value="$3" - local default="$4" local _loctmp - [ -z "$default" ] && default="0" - config_get_bool _loctmp "$section" "$option" "$default" + config_get_bool _loctmp "$section" "$option" 0 [ $_loctmp -gt 0 ] && xappend "$value" } @@ -124,10 +107,6 @@ append_server() { xappend "--server=$1" } -append_rev_server() { - xappend "--rev-server=$1" -} - append_address() { xappend "--address=$1" } @@ -141,10 +120,6 @@ append_interface() { xappend "--interface=$ifname" } -append_listenaddress() { - xappend "--listen-address=$1" -} - append_notinterface() { network_get_device ifname "$1" || ifname="$1" xappend "--except-interface=$ifname" @@ -162,10 +137,6 @@ append_pxe_service() { xappend "--pxe-service=$1" } -append_interface_name() { - xappend "--interface-name=$1,$2" -} - filter_dnsmasq() { local cfg="$1" func="$2" match_cfg="$3" found_cfg @@ -209,7 +180,6 @@ dhcp_remoteid_add() { } dhcp_circuitid_add() { - # TODO: DHCPV6 does not have circuitid; catch "option6:" local cfg="$1" config_get networkid "$cfg" networkid @@ -242,7 +212,6 @@ dhcp_userclass_add() { } dhcp_vendorclass_add() { - # TODO: DHCPV6 vendor class has stricter definitions; catch? fixup? local cfg="$1" config_get networkid "$cfg" networkid @@ -276,7 +245,6 @@ dhcp_match_add() { dhcp_host_add() { local cfg="$1" - local hosttag nametime addrs duids macs tags config_get_bool force "$cfg" force 0 @@ -288,113 +256,44 @@ dhcp_host_add() { config_get name "$cfg" name config_get ip "$cfg" ip - config_get hostid "$cfg" hostid - - [ -n "$ip" -o -n "$name" -o -n "$hostid" ] || return 0 + [ -n "$ip" -o -n "$name" ] || return 0 config_get_bool dns "$cfg" dns 0 [ "$dns" = "1" -a -n "$ip" -a -n "$name" ] && { - echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE_TMP + echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE } config_get mac "$cfg" mac - config_get duid "$cfg" duid - config_get tag "$cfg" tag - if [ -n "$mac" ]; then # --dhcp-host=00:20:e0:3b:13:af,192.168.0.199,lap - # many MAC are possible to track a laptop ON/OFF dock + macs="" for m in $mac; do append macs "$m" ","; done - fi - - if [ $DNSMASQ_DHCP_VER -eq 6 -a -n "$duid" ]; then - # --dhcp-host=id:00:03:00:01:12:00:00:01:02:03,[::beef],lap - # one (virtual) machine gets one DUID per RFC3315 - duids="id:${duid// */}" - fi - - if [ -z "$macs" -a -z "$duids" ]; then - # --dhcp-host=lap,192.168.0.199,[::beef] + else + # --dhcp-host=lap,192.168.0.199 [ -n "$name" ] || return 0 macs="$name" name="" fi - if [ -n "$hostid" ]; then - hex_to_hostid hostid "$hostid" - fi + config_get tag "$cfg" tag - if [ -n "$tag" ]; then - for t in $tag; do append tags "$t" ",set:"; done + if [ "$DHCPv6CAPABLE" -eq 1 ]; then + config_get duid "$cfg" duid + config_get hostid "$cfg" hostid + if [ -n "$hostid" ]; then + hex_to_hostid hostid "$hostid" + fi fi config_get_bool broadcast "$cfg" broadcast 0 + [ "$broadcast" = "0" ] && broadcast= + config_get leasetime "$cfg" leasetime - [ "$broadcast" = "0" ] && broadcast= || broadcast=",set:needs-broadcast" - - hosttag="${networkid:+,set:${networkid}}${tags:+,set:${tags}}$broadcast" - nametime="${name:+,$name}${leasetime:+,$leasetime}" - - if [ $DNSMASQ_DHCP_VER -eq 6 ]; then - addrs="${ip:+,$ip}${hostid:+,[::$hostid]}" - xappend "--dhcp-host=$macs${duids:+,$duids}$hosttag$addrs$nametime" - else - xappend "--dhcp-host=$macs$hosttag${ip:+,$ip}$nametime" - fi -} - -dhcp_this_host_add() { - local net="$1" - local ifname="$2" - local mode="$3" - local routerstub routername ifdashname - local lanaddr lanaddr6 lanaddrs6 ulaprefix - - if [ "$mode" -gt 0 ] ; then - ifdashname="${ifname//./-}" - routerstub="$( md5sum /etc/os-release )" - routerstub="router-${routerstub// */}" - routername="$( uci_get system @system[0] hostname $routerstub )" - - if [ "$mode" -gt 1 ] ; then - if [ "$mode" -gt 2 ] ; then - if [ "$mode" -gt 3 ] ; then - append_interface_name "$ifdashname.$routername.$DOMAIN" "$ifname" - fi - - append_interface_name "$routername.$DOMAIN" "$ifname" - fi - - # All IP addresses discovered by dnsmasq will be labeled (except fe80::) - append_interface_name "$routername" "$ifname" - - else - # This uses a static host file entry for only limited addresses. - # Use dnsmasq option "--expandhosts" to enable FQDN on host files. - ulaprefix="$(uci_get network @globals[0] ula_prefix)" - network_get_ipaddr lanaddr "$net" - network_get_ipaddrs6 lanaddrs6 "$net" - - if [ -n "$lanaddr" ] ; then - dhcp_domain_add "" "$routername" "$lanaddr" - fi - - if [ -n "$ulaprefix" -a -n "$lanaddrs6" ] ; then - for lanaddr6 in $lanaddrs6 ; do - case "$lanaddr6" in - "${ulaprefix%%:/*}"*) - dhcp_domain_add "" "$routername" "$lanaddr6" - ;; - esac - done - fi - fi - fi + xappend "--dhcp-host=$macs${duid:+,id:$duid}${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip${hostid:+,[::$hostid]}}${name:+,$name}${leasetime:+,$leasetime}" } dhcp_tag_add() { - # NOTE: dnsmasq has explicit "option6:" prefix for DHCPv6 so no collisions local cfg="$1" tag="$cfg" @@ -425,7 +324,6 @@ dhcp_mac_add() { } dhcp_boot_add() { - # TODO: BOOTURL is different between DHCPv4 and DHCPv6 local cfg="$1" config_get networkid "$cfg" networkid @@ -448,30 +346,24 @@ dhcp_boot_add() { dhcp_add() { local cfg="$1" - local dhcp6range="::" - local nettag - local tags - config_get net "$cfg" interface [ -n "$net" ] || return 0 + config_get dhcpv4 "$cfg" dhcpv4 + [ "$dhcpv4" != "disabled" ] || return 0 + config_get networkid "$cfg" networkid [ -n "$networkid" ] || networkid="$net" + network_get_subnet subnet "$net" || return 0 network_get_device ifname "$net" || return 0 + network_get_protocol proto "$net" || return 0 [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && { DNS_SERVERS="$DNS_SERVERS $dnsserver" } - append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && { - # Many ISP do not have useful names for DHCP customers (your WAN). - dhcp_this_host_add "$net" "$ifname" "$ADD_WAN_FQDN" - return 0 - } - - network_get_subnet subnet "$net" || return 0 - network_get_protocol proto "$net" || return 0 + append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0 # Do not support non-static interfaces for now [ static = "$proto" ] || return 0 @@ -483,107 +375,21 @@ dhcp_add() { config_get_bool force "$cfg" force 0 [ $force -gt 0 ] || dhcp_check "$ifname" || return 0 - config_get start "$cfg" start 100 - config_get limit "$cfg" limit 150 - config_get leasetime "$cfg" leasetime 12h + config_get start "$cfg" start + config_get limit "$cfg" limit + config_get leasetime "$cfg" leasetime config_get options "$cfg" options config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1 - config_get dhcpv4 "$cfg" dhcpv4 - config_get dhcpv6 "$cfg" dhcpv6 - - config_get ra "$cfg" ra - config_get ra_management "$cfg" ra_management - config_get ra_preference "$cfg" ra_preference - config_get dns "$cfg" dns - - config_list_foreach "$cfg" "interface_name" append_interface_name "$ifname" - - # Put the router host name on this DHCP served interface address(es) - dhcp_this_host_add "$net" "$ifname" "$ADD_LOCAL_FQDN" - - start="$( dhcp_calc "$start" )" - - add_tag() { - tags="${tags}tag:$1," - } - config_list_foreach "$cfg" tag add_tag - - nettag="${networkid:+set:${networkid},}" - - if [ "$limit" -gt 0 ] ; then - limit=$((limit-1)) - fi - + leasetime="${leasetime:-12h}" + start="$(dhcp_calc "${start:-100}")" + limit="${limit:-150}" + [ "$limit" -gt 0 ] && limit=$((limit-1)) eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)" + if [ "$dynamicdhcp" = "0" ]; then END="static"; fi + xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}" - if [ "$dynamicdhcp" = "0" ] ; then - END="static" - dhcp6range="::,static" - else - dhcp6range="::1000,::ffff" - fi - - - if [ "$dhcpv4" != "disabled" ] ; then - xappend "--dhcp-range=$tags$nettag$START,$END,$NETMASK,$leasetime${options:+ $options}" - fi - - - if [ $DNSMASQ_DHCP_VER -eq 6 -a "$ra" = "server" ] ; then - # Note: dnsmasq cannot just be a DHCPv6 server (all-in-1) - # and let some other machine(s) send RA pointing to it. - - case $ra_preference in - *high*) - xappend "--ra-param=$ifname,high,0,7200" - ;; - *low*) - xappend "--ra-param=$ifname,low,0,7200" - ;; - *) - # Send UNSOLICITED RA at default interval and live for 2 hours. - # TODO: convert flexible lease time into route life time (only seconds). - xappend "--ra-param=$ifname,0,7200" - ;; - esac - - if [ "$dhcpv6" = "disabled" ] ; then - ra_management="3" - fi - - - case $ra_management in - 0) - # SLACC with DCHP for extended options - xappend "--dhcp-range=$nettag::,constructor:$ifname,ra-stateless,ra-names" - ;; - 2) - # DHCP address and RA only for management redirection - xappend "--dhcp-range=$nettag$dhcp6range,constructor:$ifname,$leasetime" - ;; - 3) - # SLAAC only but dnsmasq attempts to link HOSTNAME, DHCPv4 MAC, and SLAAC - xappend "--dhcp-range=$nettag::,constructor:$ifname,ra-only,ra-names" - ;; - *) - # SLAAC and full DHCP - xappend "--dhcp-range=$nettag$dhcp6range,constructor:$ifname,slaac,ra-names,$leasetime" - ;; - esac - - if [ -n "$dns" ]; then - dnss="" - for d in $dns; do append dnss "[$d]" ","; done - else - dnss="[::]" - fi - - dhcp_option_append "option6:dns-server,$dnss" "$networkid" - fi - - dhcp_option_add "$cfg" "$networkid" 0 - dhcp_option_add "$cfg" "$networkid" 2 + dhcp_option_add "$cfg" "$networkid" } dhcp_option_append() { @@ -595,24 +401,21 @@ dhcp_option_append() { } dhcp_option_add() { - # NOTE: dnsmasq has explicit "option6:" prefix for DHCPv6 so no collisions local cfg="$1" local networkid="$2" local force="$3" - local opt="dhcp_option" [ "$force" = "0" ] && force= - [ "$force" = "2" ] && opt="dhcp_option_force" local list_len - config_get list_len "$cfg" "${opt}_LENGTH" + config_get list_len "$cfg" dhcp_option_LENGTH if [ -n "$list_len" ]; then - config_list_foreach "$cfg" "$opt" dhcp_option_append "$networkid" "$force" + config_list_foreach "$cfg" dhcp_option dhcp_option_append "$networkid" "$force" else - config_get dhcp_option "$cfg" "$opt" + config_get dhcp_option "$cfg" dhcp_option - [ -n "$dhcp_option" ] && echo "Warning: the 'option $opt' syntax is deprecated, use 'list $opt'" >&2 + [ -n "$dhcp_option" ] && echo "Warning: the 'option dhcp_option' syntax is deprecated, use 'list dhcp_option'" >&2 local option for option in $dhcp_option; do @@ -635,7 +438,7 @@ dhcp_domain_add() { record="${record:+$record }$name" done - echo "$ip $record" >> $HOSTFILE_TMP + echo "$ip $record" >> $HOSTFILE } dhcp_srv_add() { @@ -730,7 +533,7 @@ dhcp_relay_add() { dnsmasq_start() { - local cfg="$1" disabled resolvfile user_dhcpscript + local cfg="$1" disabled config_get_bool disabled "$cfg" disabled 0 [ "$disabled" -gt 0 ] && return 0 @@ -741,7 +544,7 @@ dnsmasq_start() CONFIGFILE="${BASECONFIGFILE}.${cfg}" CONFIGFILE_TMP="${CONFIGFILE}.$$" HOSTFILE="${BASEHOSTFILE}.${cfg}" - HOSTFILE_TMP="${HOSTFILE}.$$" + TIMESTAMPFILE="${BASETIMESTAMPFILE}.${cfg}" BASEDHCPSTAMPFILE_CFG="${BASEDHCPSTAMPFILE}.${cfg}" # before we can call xappend @@ -751,8 +554,10 @@ dnsmasq_start() mkdir -p /var/lib/misc chown dnsmasq:dnsmasq /var/run/dnsmasq + [ -f "$TIMESTAMPFILE" ] && rm -f "$TIMESTAMPFILE" + echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE_TMP - echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE_TMP + echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE local dnsmasqconffile="/etc/dnsmasq.${cfg}.conf" if [ ! -r "$dnsmasqconffile" ]; then @@ -766,41 +571,6 @@ dnsmasq_start() $PROG --version | grep -osqE "^Compile time options:.* DHCPv6( |$)" && DHCPv6CAPABLE=1 || DHCPv6CAPABLE=0 - - if [ -x /usr/sbin/odhcpd -a -x /etc/init.d/odhcpd ] ; then - local odhcpd_is_main odhcpd_is_enabled - config_get odhcpd_is_main odhcpd maindhcp 0 - /etc/init.d/odhcpd enabled && odhcpd_is_enabled=1 || odhcpd_is_enabled=0 - - - if [ "$odhcpd_is_enabled" -eq 0 -a "$DHCPv6CAPABLE" -eq 1 ] ; then - # DHCP V4 and V6 in DNSMASQ - DNSMASQ_DHCP_VER=6 - elif [ "$odhcpd_is_main" -gt 0 ] ; then - # ODHCPD is doing it all - DNSMASQ_DHCP_VER=0 - else - # You have ODHCPD but use DNSMASQ for DHCPV4 - DNSMASQ_DHCP_VER=4 - fi - - elif [ "$DHCPv6CAPABLE" -eq 1 ] ; then - # DHCP V4 and V6 in DNSMASQ - DNSMASQ_DHCP_VER=6 - else - DNSMASQ_DHCP_VER=4 - fi - - # Allow DHCP/DHCPv6 to be handled by ISC DHCPD - if [ -x /usr/sbin/dhcpd ] ; then - if [ -x /etc/init.d/dhcpd ] ; then - /etc/init.d/dhcpd enabled && DNSMASQ_DHCP_VER=0 - fi - if [ -x /etc/init.d/dhcpd6 -a "$DNSMASQ_DHCP_VER" -gt 0 ] ; then - /etc/init.d/dhcpd6 enabled && DNSMASQ_DHCP_VER=4 - fi - fi - append_bool "$cfg" authoritative "--dhcp-authoritative" append_bool "$cfg" nodaemon "--no-daemon" append_bool "$cfg" domainneeded "--domain-needed" @@ -813,11 +583,12 @@ dnsmasq_start() append_bool "$cfg" localise_queries "--localise-queries" append_bool "$cfg" readethers "--read-ethers" append_bool "$cfg" dbus "--enable-dbus" + append_bool "$cfg" boguspriv "--bogus-priv" append_bool "$cfg" expandhosts "--expand-hosts" config_get tftp_root "$cfg" "tftp_root" [ -n "$tftp_root" ] && mkdir -p "$tftp_root" && append_bool "$cfg" enable_tftp "--enable-tftp" append_bool "$cfg" tftp_no_fail "--tftp-no-fail" - append_bool "$cfg" nonwildcard "--bind-dynamic" 1 + append_bool "$cfg" nonwildcard "--bind-dynamic" append_bool "$cfg" fqdn "--dhcp-fqdn" append_bool "$cfg" proxydnssec "--proxy-dnssec" append_bool "$cfg" localservice "--local-service" @@ -828,7 +599,7 @@ dnsmasq_start() append_bool "$cfg" noping "--no-ping" append_parm "$cfg" logfacility "--log-facility" - + append_parm "$cfg" dhcpscript "--dhcp-script" append_parm "$cfg" cachesize "--cache-size" append_parm "$cfg" dnsforwardmax "--dns-forward-max" append_parm "$cfg" port "--port" @@ -839,9 +610,7 @@ dnsmasq_start() append_parm "$cfg" "maxport" "--max-port" append_parm "$cfg" "domain" "--domain" append_parm "$cfg" "local" "--server" - config_list_foreach "$cfg" "listen_address" append_listenaddress config_list_foreach "$cfg" "server" append_server - config_list_foreach "$cfg" "rev_server" append_rev_server config_list_foreach "$cfg" "address" append_address config_list_foreach "$cfg" "ipset" append_ipset config_list_foreach "$cfg" "interface" append_interface @@ -849,6 +618,7 @@ dnsmasq_start() config_list_foreach "$cfg" "addnhosts" append_addnhosts config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain append_parm "$cfg" "leasefile" "--dhcp-leasefile" "/tmp/dhcp.leases" + append_parm "$cfg" "resolvfile" "--resolv-file" "/tmp/resolv.conf.auto" append_parm "$cfg" "serversfile" "--servers-file" append_parm "$cfg" "tftp_root" "--tftp-root" append_parm "$cfg" "dhcp_boot" "--dhcp-boot" @@ -859,21 +629,12 @@ dnsmasq_start() config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1 config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1 - config_get ADD_LOCAL_FQDN "$cfg" add_local_fqdn "" - config_get ADD_WAN_FQDN "$cfg" add_wan_fqdn 0 - - if [ -z "$ADD_LOCAL_FQDN" ] ; then - # maintain support for previous UCI - ADD_LOCAL_FQDN="$ADD_LOCAL_HOSTNAME" - fi config_get_bool readethers "$cfg" readethers [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers - config_get user_dhcpscript $cfg dhcpscript - if has_handler || [ -n "$user_dhcpscript" ]; then - xappend "--dhcp-script=$DHCPSCRIPT" - fi + config_get resolvfile $cfg resolvfile + config_get dhcpscript $cfg dhcpscript config_get leasefile $cfg leasefile "/tmp/dhcp.leases" [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile" @@ -886,8 +647,6 @@ dnsmasq_start() [ -n "$resolvfile" -a \! -e "$resolvfile" ] && touch "$resolvfile" fi - [ -n "$resolvfile" ] && xappend "--resolv-file=$resolvfile" - config_get hostsfile "$cfg" dhcphostsfile [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile" @@ -934,7 +693,6 @@ dnsmasq_start() } dhcp_option_add "$cfg" "" 0 - dhcp_option_add "$cfg" "" 2 xappend "--dhcp-broadcast=tag:needs-broadcast" @@ -968,38 +726,43 @@ dnsmasq_start() config_foreach filter_dnsmasq hostrecord dhcp_hostrecord_add "$cfg" config_foreach filter_dnsmasq relay dhcp_relay_add "$cfg" + # add own hostname + [ $ADD_LOCAL_HOSTNAME -eq 1 ] && { + local lanaddr lanaddr6 + local ulaprefix="$(uci_get network @globals[0] ula_prefix)" + local hostname="$(uci_get system @system[0] hostname Lede)" + + network_get_ipaddr lanaddr "lan" && { + dhcp_domain_add "" "$hostname" "$lanaddr" + } + + [ -n "$ulaprefix" ] && network_get_ipaddrs6 lanaddr6 "lan" && { + for lanaddr6 in $lanaddr6; do + case "$lanaddr6" in + "${ulaprefix%%:/*}"*) + dhcp_domain_add "" "$hostname" "$lanaddr6" + ;; + esac + done + } + } + echo >> $CONFIGFILE_TMP config_foreach filter_dnsmasq srvhost dhcp_srv_add "$cfg" config_foreach filter_dnsmasq mxhost dhcp_mx_add "$cfg" echo >> $CONFIGFILE_TMP - config_get_bool boguspriv "$cfg" boguspriv 1 - [ "$boguspriv" -gt 0 ] && { - xappend "--bogus-priv" - [ -r "$RFC6761FILE" ] && xappend "--conf-file=$RFC6761FILE" - } - - if [ "$DNSMASQ_DHCP_VER" -gt 4 ] ; then - # Enable RA feature for when/if it is constructed, - # and RA is selected per interface pool (RA, DHCP, or both), - # but no one (should) want RA broadcast in syslog - config_foreach filter_dnsmasq dhcp dhcp_add "$cfg" - xappend "--enable-ra" - xappend "--quiet-ra" - append_bool "$cfg" quietdhcp "--quiet-dhcp6" - - elif [ "$DNSMASQ_DHCP_VER" -gt 0 ] ; then + config_get odhcpd_is_active odhcpd maindhcp + if [ "$odhcpd_is_active" != "1" ]; then config_foreach filter_dnsmasq dhcp dhcp_add "$cfg" fi - echo >> $CONFIGFILE_TMP config_foreach filter_dnsmasq cname dhcp_cname_add "$cfg" echo >> $CONFIGFILE_TMP echo >> $CONFIGFILE_TMP mv -f $CONFIGFILE_TMP $CONFIGFILE - mv -f $HOSTFILE_TMP $HOSTFILE [ "$resolvfile" = "/tmp/resolv.conf.auto" ] && { rm -f /tmp/resolv.conf @@ -1015,11 +778,10 @@ dnsmasq_start() procd_open_instance $cfg procd_set_param command $PROG -C $CONFIGFILE -k -x /var/run/dnsmasq/dnsmasq."${cfg}".pid procd_set_param file $CONFIGFILE - [ -n "$user_dhcpscript" ] && procd_set_param env USER_DHCPSCRIPT="$user_dhcpscript" procd_set_param respawn procd_add_jail dnsmasq ubus log - procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvfile $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT + procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvfile $dhcpscript /etc/hosts /etc/ethers $EXTRA_MOUNT procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile procd_close_instance @@ -1044,7 +806,7 @@ dnsmasq_stop() service_triggers() { - procd_add_reload_trigger "dhcp" "system" + procd_add_reload_trigger "dhcp" procd_add_raw_trigger "interface.*" 2000 /etc/init.d/dnsmasq reload } @@ -1084,7 +846,7 @@ start_service() { reload_service() { rc_procd start_service "$@" - procd_send_signal dnsmasq "$@" + return 0 } stop_service() { diff --git a/package/network/services/dnsmasq/files/dnsmasq_acl.json b/package/network/services/dnsmasq/files/dnsmasq_acl.json deleted file mode 100644 index 00ec7d0f0..000000000 --- a/package/network/services/dnsmasq/files/dnsmasq_acl.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "user": "dnsmasq", - "publish": [ "dnsmasq" ] -} diff --git a/package/network/services/dnsmasq/files/rfc6761.conf b/package/network/services/dnsmasq/files/rfc6761.conf deleted file mode 100644 index ebc1a1211..000000000 --- a/package/network/services/dnsmasq/files/rfc6761.conf +++ /dev/null @@ -1,15 +0,0 @@ -# RFC6761 included configuration file for dnsmasq -# -# includes a list of domains that should not be forwarded to Internet name servers -# to reduce burden on them, asking questions that they won't know the answer to. - -server=/bind/ -server=/example/ -server=/example.com/ -server=/example.org/ -server=/example.net/ -server=/invalid/ -server=/local/ -server=/localhost/ -server=/onion/ -server=/test/ diff --git a/package/network/services/dnsmasq/patches/240-ubus.patch b/package/network/services/dnsmasq/patches/240-ubus.patch deleted file mode 100644 index d21ca0dba..000000000 --- a/package/network/services/dnsmasq/patches/240-ubus.patch +++ /dev/null @@ -1,128 +0,0 @@ ---- a/src/dnsmasq.c -+++ b/src/dnsmasq.c -@@ -19,6 +19,8 @@ - - #include "dnsmasq.h" - -+#include -+ - struct daemon *daemon; - - static volatile pid_t pid = 0; -@@ -32,6 +34,64 @@ static void fatal_event(struct event_des - static int read_event(int fd, struct event_desc *evp, char **msg); - static void poll_resolv(int force, int do_reload, time_t now); - -+static struct ubus_context *ubus; -+static struct blob_buf b; -+ -+static struct ubus_object_type ubus_object_type = { -+ .name = "dnsmasq", -+}; -+ -+static struct ubus_object ubus_object = { -+ .name = "dnsmasq", -+ .type = &ubus_object_type, -+}; -+ -+void ubus_event_bcast(const char *type, const char *mac, const char *ip, const char *name, const char *interface) -+{ -+ if (!ubus || !ubus_object.has_subscribers) -+ return; -+ -+ blob_buf_init(&b, 0); -+ if (mac) -+ blobmsg_add_string(&b, "mac", mac); -+ if (ip) -+ blobmsg_add_string(&b, "ip", ip); -+ if (name) -+ blobmsg_add_string(&b, "name", name); -+ if (interface) -+ blobmsg_add_string(&b, "interface", interface); -+ ubus_notify(ubus, &ubus_object, type, b.head, -1); -+} -+ -+static void set_ubus_listeners(void) -+{ -+ if (!ubus) -+ return; -+ -+ poll_listen(ubus->sock.fd, POLLIN); -+ poll_listen(ubus->sock.fd, POLLERR); -+ poll_listen(ubus->sock.fd, POLLHUP); -+} -+ -+static void check_ubus_listeners() -+{ -+ if (!ubus) { -+ ubus = ubus_connect(NULL); -+ if (ubus) -+ ubus_add_object(ubus, &ubus_object); -+ else -+ return; -+ } -+ -+ if (poll_check(ubus->sock.fd, POLLIN)) -+ ubus_handle_event(ubus); -+ -+ if (poll_check(ubus->sock.fd, POLLHUP)) { -+ ubus_free(ubus); -+ ubus = NULL; -+ } -+} -+ - int main (int argc, char **argv) - { - int bind_fallback = 0; -@@ -911,6 +971,7 @@ int main (int argc, char **argv) - set_dbus_listeners(); - #endif - -+ set_ubus_listeners(); - #ifdef HAVE_DHCP - if (daemon->dhcp || daemon->relay4) - { -@@ -1041,6 +1102,8 @@ int main (int argc, char **argv) - check_dbus_listeners(); - #endif - -+ check_ubus_listeners(); -+ - check_dns_listeners(now); - - #ifdef HAVE_TFTP ---- a/Makefile -+++ b/Makefile -@@ -85,7 +85,7 @@ all : $(BUILDDIR) - @cd $(BUILDDIR) && $(MAKE) \ - top="$(top)" \ - build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \ -- build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs)" \ -+ build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) -lubox -lubus" \ - -f $(top)/Makefile dnsmasq - - mostly_clean : ---- a/src/dnsmasq.h -+++ b/src/dnsmasq.h -@@ -1397,6 +1397,8 @@ void emit_dbus_signal(int action, struct - # endif - #endif - -+void ubus_event_bcast(const char *type, const char *mac, const char *ip, const char *name, const char *interface); -+ - /* ipset.c */ - #ifdef HAVE_IPSET - void ipset_init(void); ---- a/src/rfc2131.c -+++ b/src/rfc2131.c -@@ -1621,6 +1621,10 @@ static void log_packet(char *type, void - daemon->namebuff, - string ? string : "", - err ? err : ""); -+ if (!strcmp(type, "DHCPACK")) -+ ubus_event_bcast("dhcp.ack", daemon->namebuff, addr ? inet_ntoa(a) : NULL, string ? string : NULL, interface); -+ else if (!strcmp(type, "DHCPRELEASE")) -+ ubus_event_bcast("dhcp.release", daemon->namebuff, addr ? inet_ntoa(a) : NULL, string ? string : NULL, interface); - } - - static void log_options(unsigned char *start, u32 xid) diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 21ac09f72..2db2f81a4 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dropbear PKG_VERSION:=2017.75 -PKG_RELEASE:=5 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ @@ -19,7 +19,6 @@ PKG_HASH:=6cbc1dcb1c9709d226dff669e5604172a18cf5dbf9a201474d5618ae4465098c PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE -PKG_CPE_ID:=cpe:/a:matt_johnston:dropbear_ssh_server PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 diff --git a/package/network/services/dropbear/patches/120-openwrt_options.patch b/package/network/services/dropbear/patches/120-openwrt_options.patch index 7f47a7430..b49a95ce9 100644 --- a/package/network/services/dropbear/patches/120-openwrt_options.patch +++ b/package/network/services/dropbear/patches/120-openwrt_options.patch @@ -39,7 +39,7 @@ /* Enable "Counter Mode" for ciphers. This is more secure than normal * CBC mode against certain attacks. It is recommended for security -@@ -131,10 +131,10 @@ If you test it please contact the Dropbe +@@ -131,9 +131,9 @@ If you test it please contact the Dropbe * If you disable MD5, Dropbear will fall back to SHA1 fingerprints, * which are not the standard form. */ #define DROPBEAR_SHA1_HMAC @@ -47,12 +47,10 @@ +/*#define DROPBEAR_SHA1_96_HMAC*/ #define DROPBEAR_SHA2_256_HMAC -#define DROPBEAR_SHA2_512_HMAC --#define DROPBEAR_MD5_HMAC +/*#define DROPBEAR_SHA2_512_HMAC*/ -+/*#define DROPBEAR_MD5_HMAC*/ + #define DROPBEAR_MD5_HMAC /* You can also disable integrity. Don't bother disabling this if you're - * still using a cipher, it's relatively cheap. If you disable this it's dead @@ -146,7 +146,7 @@ If you test it please contact the Dropbe * Removing either of these won't save very much space. * SSH2 RFC Draft requires dss, recommends rsa */ diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 51f169293..c9de3c05b 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,17 +7,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2017-08-24 -PKG_SOURCE_VERSION:=c2d4f2eb5dba0b5c5a8c5805823084da958a9b52 -PKG_MIRROR_HASH:=c6ad9a73fc1ae0ba8bc48f71cf14394b274bc9c2c1d1b53c2775f08312597e74 +PKG_SOURCE_DATE:=2016-12-19 +PKG_SOURCE_VERSION:=ad02e79d12fd70ed6bd5fbaf64001a2851e5bb7b +PKG_MIRROR_HASH:=7a0983f004b156d46911765c113754a4c00f56fb889430620bbd061b3b1fcf33 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause -PKG_CPE_ID:=cpe:/a:w1.fi:hostapd PKG_BUILD_PARALLEL:=1 @@ -300,7 +299,6 @@ define Build/Compile/wpad $(call Build/RunMake,wpa_supplicant,-s MULTICALL=1 dump_cflags) | \ sed -e 's,-n ,,g' -e 's^$(TARGET_CFLAGS)^^' \ ` > $(PKG_BUILD_DIR)/.cflags - sed -i 's/"/\\"/g' $(PKG_BUILD_DIR)/.cflags +$(call Build/RunMake,hostapd, \ CFLAGS="$$$$(cat $(PKG_BUILD_DIR)/.cflags)" \ MULTICALL=1 \ diff --git a/package/network/services/hostapd/files/hostapd-full.config b/package/network/services/hostapd/files/hostapd-full.config index fe627676d..4a2e87c2e 100644 --- a/package/network/services/hostapd/files/hostapd-full.config +++ b/package/network/services/hostapd/files/hostapd-full.config @@ -15,31 +15,22 @@ # Driver interface for wired authenticator CONFIG_DRIVER_WIRED=y +# Driver interface for Prism54 driver +#CONFIG_DRIVER_PRISM54=y + # Driver interface for drivers using the nl80211 kernel interface CONFIG_DRIVER_NL80211=y - -# QCA vendor extensions to nl80211 -#CONFIG_DRIVER_NL80211_QCA=y - -# driver_nl80211.c requires libnl. If you are compiling it yourself -# you may need to point hostapd to your version of libnl. -# -#CFLAGS += -I$ -#LIBS += -L$ - -# Use libnl v2.0 (or 3.0) libraries. -#CONFIG_LIBNL20=y - -# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) -#CONFIG_LIBNL32=y - +# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be +# shipped with your distribution yet. If that is the case, you need to build +# newer libnl version and point the hostapd build to use it. +#LIBNL=/usr/src/libnl +#CFLAGS += -I$(LIBNL)/include +#LIBS += -L$(LIBNL)/lib # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) #CONFIG_DRIVER_BSD=y #CFLAGS += -I/usr/local/include #LIBS += -L/usr/local/lib -#LIBS_p += -L/usr/local/lib -#LIBS_c += -L/usr/local/lib # Driver interface for no driver (e.g., RADIUS server only) #CONFIG_DRIVER_NONE=y @@ -54,14 +45,16 @@ CONFIG_RSN_PREAUTH=y CONFIG_PEERKEY=y # IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. # Driver support is also needed for IEEE 802.11w. #CONFIG_IEEE80211W=y # Integrated EAP server CONFIG_EAP=y -# EAP Re-authentication Protocol (ERP) in integrated EAP server -#CONFIG_ERP=y +# EAP-FAST for the integrated EAP server +CONFIG_EAP_FAST=y # EAP-MD5 for the integrated EAP server CONFIG_EAP_MD5=y @@ -97,9 +90,6 @@ CONFIG_EAP_TTLS=y # EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) #CONFIG_EAP_PSK=y -# EAP-pwd for the integrated EAP server (secure authentication with a password) -#CONFIG_EAP_PWD=y - # EAP-SAKE for the integrated EAP server #CONFIG_EAP_SAKE=y @@ -109,17 +99,17 @@ CONFIG_EAP_TTLS=y #CONFIG_EAP_GPSK_SHA256=y # EAP-FAST for the integrated EAP server -# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed -# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g., -# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions. -CONFIG_EAP_FAST=y +# Note: Default OpenSSL package does not include support for all the +# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, +# the OpenSSL library must be patched (openssl-0.9.9-session-ticket.patch) +# to add the needed functions. +#CONFIG_EAP_FAST=y # Wi-Fi Protected Setup (WPS) CONFIG_WPS=y +CONFIG_WPS2=y # Enable UPnP support for external WPS Registrars #CONFIG_WPS_UPNP=y -# Enable WPS support with NFC config method -#CONFIG_WPS_NFC=y # EAP-IKEv2 #CONFIG_EAP_IKEV2=y @@ -127,9 +117,6 @@ CONFIG_WPS=y # Trusted Network Connect (EAP-TNC) #CONFIG_EAP_TNC=y -# EAP-EKE for the integrated EAP server -#CONFIG_EAP_EKE=y - # PKCS#12 (PFX) support (used to read private key and certificate file from # a file that usually has extension .p12 or .pfx) CONFIG_PKCS12=y @@ -145,43 +132,23 @@ CONFIG_IPV6=y CONFIG_IEEE80211R=y # Use the hostapd's IEEE 802.11 authentication (ACL), but without -# the IEEE 802.11 Management capability (e.g., FreeBSD/net80211) +# the IEEE 802.11 Management capability (e.g. FreeBSD/net80211) #CONFIG_DRIVER_RADIUS_ACL=y # IEEE 802.11n (High Throughput) support CONFIG_IEEE80211N=y -# Wireless Network Management (IEEE Std 802.11v-2011) -# Note: This is experimental and not complete implementation. -#CONFIG_WNM=y - # IEEE 802.11ac (Very High Throughput) support CONFIG_IEEE80211AC=y -# IEEE 802.11ax HE support -# Note: This is experimental and work in progress. The definitions are still -# subject to change and this should not be expected to interoperate with the -# final IEEE 802.11ax version. -#CONFIG_IEEE80211AX=y - # Remove debugging code that is printing out debug messages to stdout. # This can be used to reduce the size of the hostapd considerably if debugging # code is not needed. #CONFIG_NO_STDOUT_DEBUG=y -# Add support for writing debug log to a file: -f /tmp/hostapd.log -# Disabled by default. -#CONFIG_DEBUG_FILE=y - # Send debug messages to syslog instead of stdout CONFIG_DEBUG_SYSLOG=y -# Add support for sending all debug messages (regardless of debug verbosity) -# to the Linux kernel tracing facility. This helps debug the entire stack by -# making it easy to record everything happening from the driver up into the -# same file, e.g., using trace-cmd. -#CONFIG_DEBUG_LINUX_TRACING=y - # Remove support for RADIUS accounting #CONFIG_NO_ACCOUNTING=y @@ -191,190 +158,15 @@ CONFIG_DEBUG_SYSLOG=y # Remove support for VLANs #CONFIG_NO_VLAN=y -# Enable support for fully dynamic VLANs. This enables hostapd to -# automatically create bridge and VLAN interfaces if necessary. -CONFIG_FULL_DYNAMIC_VLAN=y +CONFIG_TLS=internal +CONFIG_INTERNAL_LIBTOMMATH=y +CONFIG_INTERNAL_AES=y +NEED_AES_DEC=y -# Use netlink-based kernel API for VLAN operations instead of ioctl() -# Note: This requires libnl 3.1 or newer. -#CONFIG_VLAN_NETLINK=y - -# Remove support for dumping internal state through control interface commands -# This can be used to reduce binary size at the cost of disabling a debugging -# option. +CONFIG_NO_RANDOM_POOL=y CONFIG_NO_DUMP_STATE=y -# Enable tracing code for developer debugging -# This tracks use of memory allocations and other registrations and reports -# incorrect use with a backtrace of call (or allocation) location. -#CONFIG_WPA_TRACE=y -# For BSD, comment out these. -#LIBS += -lexecinfo -#LIBS_p += -lexecinfo -#LIBS_c += -lexecinfo +CONFIG_WPS=y +CONFIG_FULL_DYNAMIC_VLAN=y -# Use libbfd to get more details for developer debugging -# This enables use of libbfd to get more detailed symbols for the backtraces -# generated by CONFIG_WPA_TRACE=y. -#CONFIG_WPA_TRACE_BFD=y -# For BSD, comment out these. -#LIBS += -lbfd -liberty -lz -#LIBS_p += -lbfd -liberty -lz -#LIBS_c += -lbfd -liberty -lz - -# hostapd depends on strong random number generation being available from the -# operating system. os_get_random() function is used to fetch random data when -# needed, e.g., for key generation. On Linux and BSD systems, this works by -# reading /dev/urandom. It should be noted that the OS entropy pool needs to be -# properly initialized before hostapd is started. This is important especially -# on embedded devices that do not have a hardware random number generator and -# may by default start up with minimal entropy available for random number -# generation. -# -# As a safety net, hostapd is by default trying to internally collect -# additional entropy for generating random data to mix in with the data -# fetched from the OS. This by itself is not considered to be very strong, but -# it may help in cases where the system pool is not initialized properly. -# However, it is very strongly recommended that the system pool is initialized -# with enough entropy either by using hardware assisted random number -# generator or by storing state over device reboots. -# -# hostapd can be configured to maintain its own entropy store over restarts to -# enhance random number generation. This is not perfect, but it is much more -# secure than using the same sequence of random numbers after every reboot. -# This can be enabled with -e command line option. The specified -# file needs to be readable and writable by hostapd. -# -# If the os_get_random() is known to provide strong random data (e.g., on -# Linux/BSD, the board in question is known to have reliable source of random -# data from /dev/urandom), the internal hostapd random pool can be disabled. -# This will save some in binary size and CPU use. However, this should only be -# considered for builds that are known to be used on devices that meet the -# requirements described above. -CONFIG_NO_RANDOM_POOL=y - -# Should we use poll instead of select? Select is used by default. -#CONFIG_ELOOP_POLL=y - -# Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y - -# Should we use kqueue instead of select? Select is used by default. -#CONFIG_ELOOP_KQUEUE=y - -# Select TLS implementation -# openssl = OpenSSL (default) -# gnutls = GnuTLS -# internal = Internal TLSv1 implementation (experimental) -# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental) -# none = Empty template -CONFIG_TLS=internal - -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) -# can be enabled to get a stronger construction of messages when block ciphers -# are used. -#CONFIG_TLSV11=y - -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) -# can be enabled to enable use of stronger crypto algorithms. -#CONFIG_TLSV12=y - -# Select which ciphers to use by default with OpenSSL if the user does not -# specify them. -#CONFIG_TLS_DEFAULT_CIPHERS="DEFAULT:!EXP:!LOW" - -# If CONFIG_TLS=internal is used, additional library and include paths are -# needed for LibTomMath. Alternatively, an integrated, minimal version of -# LibTomMath can be used. See beginning of libtommath.c for details on benefits -# and drawbacks of this option. -CONFIG_INTERNAL_LIBTOMMATH=y -#ifndef CONFIG_INTERNAL_LIBTOMMATH -#LTM_PATH=/usr/src/libtommath-0.39 -#CFLAGS += -I$(LTM_PATH) -#LIBS += -L$(LTM_PATH) -#LIBS_p += -L$(LTM_PATH) -#endif -# At the cost of about 4 kB of additional binary size, the internal LibTomMath -# can be configured to include faster routines for exptmod, sqr, and div to -# speed up DH and RSA calculation considerably -#CONFIG_INTERNAL_LIBTOMMATH_FAST=y - -# Interworking (IEEE 802.11u) -# This can be used to enable functionality to improve interworking with -# external networks. -#CONFIG_INTERWORKING=y - -# Hotspot 2.0 -#CONFIG_HS20=y - -# Enable SQLite database support in hlr_auc_gw, EAP-SIM DB, and eap_user_file -#CONFIG_SQLITE=y - -# Enable Fast Session Transfer (FST) -#CONFIG_FST=y - -# Enable CLI commands for FST testing -#CONFIG_FST_TEST=y - -# Testing options -# This can be used to enable some testing options (see also the example -# configuration file) that are really useful only for testing clients that -# connect to this hostapd. These options allow, for example, to drop a -# certain percentage of probe requests or auth/(re)assoc frames. -# -#CONFIG_TESTING_OPTIONS=y - -# Automatic Channel Selection -# This will allow hostapd to pick the channel automatically when channel is set -# to "acs_survey" or "0". Eventually, other ACS algorithms can be added in -# similar way. -# -# Automatic selection is currently only done through initialization, later on -# we hope to do background checks to keep us moving to more ideal channels as -# time goes by. ACS is currently only supported through the nl80211 driver and -# your driver must have survey dump capability that is filled by the driver -# during scanning. -# -# You can customize the ACS survey algorithm with the hostapd.conf variable -# acs_num_scans. -# -# Supported ACS drivers: -# * ath9k -# * ath5k -# * ath10k -# -# For more details refer to: -# http://wireless.kernel.org/en/users/Documentation/acs -# -#CONFIG_ACS=y - -# Multiband Operation support -# These extentions facilitate efficient use of multiple frequency bands -# available to the AP and the devices that may associate with it. -#CONFIG_MBO=y - -# Client Taxonomy -# Has the AP retain the Probe Request and (Re)Association Request frames from -# a client, from which a signature can be produced which can identify the model -# of client device like "Nexus 6P" or "iPhone 5s". -#CONFIG_TAXONOMY=y - -# Fast Initial Link Setup (FILS) (IEEE 802.11ai) -# Note: This is an experimental and not yet complete implementation. This -# should not be enabled for production use. -#CONFIG_FILS=y -# FILS shared key authentication with PFS -#CONFIG_FILS_SK_PFS=y - -# Include internal line edit mode in hostapd_cli. This can be used to provide -# limited command line editing and history support. -#CONFIG_WPA_CLI_EDIT=y - -# Opportunistic Wireless Encryption (OWE) -# Experimental implementation of draft-harkins-owe-07.txt -#CONFIG_OWE=y - -# uBus IPC/RPC System -# Services can connect to the bus and provide methods -# that can be called by other services or clients. CONFIG_UBUS=y diff --git a/package/network/services/hostapd/files/hostapd-mini.config b/package/network/services/hostapd/files/hostapd-mini.config index 661983a94..2bd7d239c 100644 --- a/package/network/services/hostapd/files/hostapd-mini.config +++ b/package/network/services/hostapd/files/hostapd-mini.config @@ -15,37 +15,28 @@ # Driver interface for wired authenticator CONFIG_DRIVER_WIRED=y +# Driver interface for Prism54 driver +#CONFIG_DRIVER_PRISM54=y + # Driver interface for drivers using the nl80211 kernel interface CONFIG_DRIVER_NL80211=y - -# QCA vendor extensions to nl80211 -#CONFIG_DRIVER_NL80211_QCA=y - -# driver_nl80211.c requires libnl. If you are compiling it yourself -# you may need to point hostapd to your version of libnl. -# -#CFLAGS += -I$ -#LIBS += -L$ - -# Use libnl v2.0 (or 3.0) libraries. -#CONFIG_LIBNL20=y - -# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) -#CONFIG_LIBNL32=y - +# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be +# shipped with your distribution yet. If that is the case, you need to build +# newer libnl version and point the hostapd build to use it. +#LIBNL=/usr/src/libnl +#CFLAGS += -I$(LIBNL)/include +#LIBS += -L$(LIBNL)/lib # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) #CONFIG_DRIVER_BSD=y #CFLAGS += -I/usr/local/include #LIBS += -L/usr/local/lib -#LIBS_p += -L/usr/local/lib -#LIBS_c += -L/usr/local/lib # Driver interface for no driver (e.g., RADIUS server only) #CONFIG_DRIVER_NONE=y # IEEE 802.11F/IAPP -#CONFIG_IAPP=y +# CONFIG_IAPP=y # WPA2/IEEE 802.11i RSN pre-authentication CONFIG_RSN_PREAUTH=y @@ -54,15 +45,14 @@ CONFIG_RSN_PREAUTH=y CONFIG_PEERKEY=y # IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. # Driver support is also needed for IEEE 802.11w. #CONFIG_IEEE80211W=y # Integrated EAP server #CONFIG_EAP=y -# EAP Re-authentication Protocol (ERP) in integrated EAP server -#CONFIG_ERP=y - # EAP-MD5 for the integrated EAP server #CONFIG_EAP_MD5=y @@ -97,9 +87,6 @@ CONFIG_PEERKEY=y # EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) #CONFIG_EAP_PSK=y -# EAP-pwd for the integrated EAP server (secure authentication with a password) -#CONFIG_EAP_PWD=y - # EAP-SAKE for the integrated EAP server #CONFIG_EAP_SAKE=y @@ -109,17 +96,16 @@ CONFIG_PEERKEY=y #CONFIG_EAP_GPSK_SHA256=y # EAP-FAST for the integrated EAP server -# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed -# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g., -# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions. +# Note: Default OpenSSL package does not include support for all the +# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, +# the OpenSSL library must be patched (openssl-0.9.9-session-ticket.patch) +# to add the needed functions. #CONFIG_EAP_FAST=y # Wi-Fi Protected Setup (WPS) #CONFIG_WPS=y # Enable UPnP support for external WPS Registrars #CONFIG_WPS_UPNP=y -# Enable WPS support with NFC config method -#CONFIG_WPS_NFC=y # EAP-IKEv2 #CONFIG_EAP_IKEV2=y @@ -127,9 +113,6 @@ CONFIG_PEERKEY=y # Trusted Network Connect (EAP-TNC) #CONFIG_EAP_TNC=y -# EAP-EKE for the integrated EAP server -#CONFIG_EAP_EKE=y - # PKCS#12 (PFX) support (used to read private key and certificate file from # a file that usually has extension .p12 or .pfx) #CONFIG_PKCS12=y @@ -145,43 +128,23 @@ CONFIG_PEERKEY=y #CONFIG_IEEE80211R=y # Use the hostapd's IEEE 802.11 authentication (ACL), but without -# the IEEE 802.11 Management capability (e.g., FreeBSD/net80211) +# the IEEE 802.11 Management capability (e.g. FreeBSD/net80211) #CONFIG_DRIVER_RADIUS_ACL=y # IEEE 802.11n (High Throughput) support CONFIG_IEEE80211N=y -# Wireless Network Management (IEEE Std 802.11v-2011) -# Note: This is experimental and not complete implementation. -#CONFIG_WNM=y - # IEEE 802.11ac (Very High Throughput) support CONFIG_IEEE80211AC=y -# IEEE 802.11ax HE support -# Note: This is experimental and work in progress. The definitions are still -# subject to change and this should not be expected to interoperate with the -# final IEEE 802.11ax version. -#CONFIG_IEEE80211AX=y - # Remove debugging code that is printing out debug messages to stdout. # This can be used to reduce the size of the hostapd considerably if debugging # code is not needed. #CONFIG_NO_STDOUT_DEBUG=y -# Add support for writing debug log to a file: -f /tmp/hostapd.log -# Disabled by default. -#CONFIG_DEBUG_FILE=y - # Send debug messages to syslog instead of stdout CONFIG_DEBUG_SYSLOG=y -# Add support for sending all debug messages (regardless of debug verbosity) -# to the Linux kernel tracing facility. This helps debug the entire stack by -# making it easy to record everything happening from the driver up into the -# same file, e.g., using trace-cmd. -#CONFIG_DEBUG_LINUX_TRACING=y - # Remove support for RADIUS accounting CONFIG_NO_ACCOUNTING=y @@ -191,190 +154,9 @@ CONFIG_NO_RADIUS=y # Remove support for VLANs #CONFIG_NO_VLAN=y -# Enable support for fully dynamic VLANs. This enables hostapd to -# automatically create bridge and VLAN interfaces if necessary. -#CONFIG_FULL_DYNAMIC_VLAN=y - -# Use netlink-based kernel API for VLAN operations instead of ioctl() -# Note: This requires libnl 3.1 or newer. -#CONFIG_VLAN_NETLINK=y - -# Remove support for dumping internal state through control interface commands -# This can be used to reduce binary size at the cost of disabling a debugging -# option. -CONFIG_NO_DUMP_STATE=y - -# Enable tracing code for developer debugging -# This tracks use of memory allocations and other registrations and reports -# incorrect use with a backtrace of call (or allocation) location. -#CONFIG_WPA_TRACE=y -# For BSD, comment out these. -#LIBS += -lexecinfo -#LIBS_p += -lexecinfo -#LIBS_c += -lexecinfo - -# Use libbfd to get more details for developer debugging -# This enables use of libbfd to get more detailed symbols for the backtraces -# generated by CONFIG_WPA_TRACE=y. -#CONFIG_WPA_TRACE_BFD=y -# For BSD, comment out these. -#LIBS += -lbfd -liberty -lz -#LIBS_p += -lbfd -liberty -lz -#LIBS_c += -lbfd -liberty -lz - -# hostapd depends on strong random number generation being available from the -# operating system. os_get_random() function is used to fetch random data when -# needed, e.g., for key generation. On Linux and BSD systems, this works by -# reading /dev/urandom. It should be noted that the OS entropy pool needs to be -# properly initialized before hostapd is started. This is important especially -# on embedded devices that do not have a hardware random number generator and -# may by default start up with minimal entropy available for random number -# generation. -# -# As a safety net, hostapd is by default trying to internally collect -# additional entropy for generating random data to mix in with the data -# fetched from the OS. This by itself is not considered to be very strong, but -# it may help in cases where the system pool is not initialized properly. -# However, it is very strongly recommended that the system pool is initialized -# with enough entropy either by using hardware assisted random number -# generator or by storing state over device reboots. -# -# hostapd can be configured to maintain its own entropy store over restarts to -# enhance random number generation. This is not perfect, but it is much more -# secure than using the same sequence of random numbers after every reboot. -# This can be enabled with -e command line option. The specified -# file needs to be readable and writable by hostapd. -# -# If the os_get_random() is known to provide strong random data (e.g., on -# Linux/BSD, the board in question is known to have reliable source of random -# data from /dev/urandom), the internal hostapd random pool can be disabled. -# This will save some in binary size and CPU use. However, this should only be -# considered for builds that are known to be used on devices that meet the -# requirements described above. -CONFIG_NO_RANDOM_POOL=y - -# Should we use poll instead of select? Select is used by default. -#CONFIG_ELOOP_POLL=y - -# Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y - -# Should we use kqueue instead of select? Select is used by default. -#CONFIG_ELOOP_KQUEUE=y - -# Select TLS implementation -# openssl = OpenSSL (default) -# gnutls = GnuTLS -# internal = Internal TLSv1 implementation (experimental) -# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental) -# none = Empty template CONFIG_TLS=internal -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) -# can be enabled to get a stronger construction of messages when block ciphers -# are used. -#CONFIG_TLSV11=y +CONFIG_NO_RANDOM_POOL=y +CONFIG_NO_DUMP_STATE=y -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) -# can be enabled to enable use of stronger crypto algorithms. -#CONFIG_TLSV12=y - -# Select which ciphers to use by default with OpenSSL if the user does not -# specify them. -#CONFIG_TLS_DEFAULT_CIPHERS="DEFAULT:!EXP:!LOW" - -# If CONFIG_TLS=internal is used, additional library and include paths are -# needed for LibTomMath. Alternatively, an integrated, minimal version of -# LibTomMath can be used. See beginning of libtommath.c for details on benefits -# and drawbacks of this option. -#CONFIG_INTERNAL_LIBTOMMATH=y -#ifndef CONFIG_INTERNAL_LIBTOMMATH -#LTM_PATH=/usr/src/libtommath-0.39 -#CFLAGS += -I$(LTM_PATH) -#LIBS += -L$(LTM_PATH) -#LIBS_p += -L$(LTM_PATH) -#endif -# At the cost of about 4 kB of additional binary size, the internal LibTomMath -# can be configured to include faster routines for exptmod, sqr, and div to -# speed up DH and RSA calculation considerably -#CONFIG_INTERNAL_LIBTOMMATH_FAST=y - -# Interworking (IEEE 802.11u) -# This can be used to enable functionality to improve interworking with -# external networks. -#CONFIG_INTERWORKING=y - -# Hotspot 2.0 -#CONFIG_HS20=y - -# Enable SQLite database support in hlr_auc_gw, EAP-SIM DB, and eap_user_file -#CONFIG_SQLITE=y - -# Enable Fast Session Transfer (FST) -#CONFIG_FST=y - -# Enable CLI commands for FST testing -#CONFIG_FST_TEST=y - -# Testing options -# This can be used to enable some testing options (see also the example -# configuration file) that are really useful only for testing clients that -# connect to this hostapd. These options allow, for example, to drop a -# certain percentage of probe requests or auth/(re)assoc frames. -# -#CONFIG_TESTING_OPTIONS=y - -# Automatic Channel Selection -# This will allow hostapd to pick the channel automatically when channel is set -# to "acs_survey" or "0". Eventually, other ACS algorithms can be added in -# similar way. -# -# Automatic selection is currently only done through initialization, later on -# we hope to do background checks to keep us moving to more ideal channels as -# time goes by. ACS is currently only supported through the nl80211 driver and -# your driver must have survey dump capability that is filled by the driver -# during scanning. -# -# You can customize the ACS survey algorithm with the hostapd.conf variable -# acs_num_scans. -# -# Supported ACS drivers: -# * ath9k -# * ath5k -# * ath10k -# -# For more details refer to: -# http://wireless.kernel.org/en/users/Documentation/acs -# -#CONFIG_ACS=y - -# Multiband Operation support -# These extentions facilitate efficient use of multiple frequency bands -# available to the AP and the devices that may associate with it. -#CONFIG_MBO=y - -# Client Taxonomy -# Has the AP retain the Probe Request and (Re)Association Request frames from -# a client, from which a signature can be produced which can identify the model -# of client device like "Nexus 6P" or "iPhone 5s". -#CONFIG_TAXONOMY=y - -# Fast Initial Link Setup (FILS) (IEEE 802.11ai) -# Note: This is an experimental and not yet complete implementation. This -# should not be enabled for production use. -#CONFIG_FILS=y -# FILS shared key authentication with PFS -#CONFIG_FILS_SK_PFS=y - -# Include internal line edit mode in hostapd_cli. This can be used to provide -# limited command line editing and history support. -#CONFIG_WPA_CLI_EDIT=y - -# Opportunistic Wireless Encryption (OWE) -# Experimental implementation of draft-harkins-owe-07.txt -#CONFIG_OWE=y - -# uBus IPC/RPC System -# Services can connect to the bus and provide methods -# that can be called by other services or clients. CONFIG_UBUS=y diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 36aee85f1..1f2866111 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -66,9 +66,6 @@ hostapd_common_add_device_config() { config_add_string require_mode config_add_boolean legacy_rates - config_add_string acs_chan_bias - config_add_array hostapd_options - hostapd_add_log_config } @@ -79,7 +76,7 @@ hostapd_prepare_device_config() { local base="${config%%.conf}" local base_cfg= - json_get_vars country country_ie beacon_int:100 doth require_mode legacy_rates acs_chan_bias + json_get_vars country country_ie beacon_int:100 doth require_mode legacy_rates hostapd_set_log_options base_cfg @@ -96,8 +93,6 @@ hostapd_prepare_device_config() { [ "$hwmode" = "a" -a "$doth" -gt 0 ] && append base_cfg "ieee80211h=1" "$N" } - [ -n "$acs_chan_bias" ] && append base_cfg "acs_chan_bias=$acs_chan_bias" "$N" - local brlist= br json_get_values basic_rate_list basic_rate local rlist= r @@ -128,11 +123,6 @@ hostapd_prepare_device_config() { [ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" append base_cfg "beacon_int=$beacon_int" "$N" - json_get_values opts hostapd_options - for val in $opts; do - append base_cfg "$val" "$N" - done - cat > "$config" < allow management frame protection case "$ieee80211w" in [012]) - json_get_vars ieee80211w_mgmt_cipher ieee80211w_max_timeout ieee80211w_retry_timeout + json_get_vars ieee80211w_max_timeout ieee80211w_retry_timeout append bss_conf "ieee80211w=$ieee80211w" "$N" [ "$ieee80211w" -gt "0" ] && { - append bss_conf "group_mgmt_cipher=${ieee80211w_mgmt_cipher:-AES-128-CMAC}" "$N" [ -n "$ieee80211w_max_timeout" ] && \ append bss_conf "assoc_sa_query_max_timeout=$ieee80211w_max_timeout" "$N" [ -n "$ieee80211w_retry_timeout" ] && \ @@ -601,31 +586,8 @@ EOF return 0 } -wpa_supplicant_set_fixed_freq() { - local freq="$1" - local htmode="$2" - - append network_data "fixed_freq=1" "$N$T" - append network_data "frequency=$freq" "$N$T" - case "$htmode" in - NOHT) append network_data "disable_ht=1" "$N$T";; - HT20|VHT20) append network_data "disable_ht40=1" "$N$T";; - HT40*|VHT40*|VHT80*|VHT160*) append network_data "ht40=1" "$N$T";; - esac - case "$htmode" in - VHT*) append network_data "vht=1" "$N$T";; - esac - case "$htmode" in - VHT80) append network_data "max_oper_chwidth=1" "$N$T";; - VHT160) append network_data "max_oper_chwidth=2" "$N$T";; - *) append network_data "max_oper_chwidth=0" "$N$T";; - esac -} - wpa_supplicant_add_network() { local ifname="$1" - local freq="$2" - local htmode="$3" _wpa_supplicant_common "$1" wireless_vif_parse_encryption @@ -647,7 +609,11 @@ wpa_supplicant_add_network() { [[ "$_w_mode" = "adhoc" ]] && { append network_data "mode=1" "$N$T" - [ -n "$channel" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode" + [ -n "$channel" ] && { + freq="$(get_freq "$phy" "$channel")" + append network_data "fixed_freq=1" "$N$T" + append network_data "frequency=$freq" "$N$T" + } scan_ssid="scan_ssid=0" @@ -659,7 +625,10 @@ wpa_supplicant_add_network() { ssid="${mesh_id}" append network_data "mode=5" "$N$T" - [ -n "$channel" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode" + [ -n "$channel" ] && { + freq="$(get_freq "$phy" "$channel")" + append network_data "frequency=$freq" "$N$T" + } append wpa_key_mgmt "SAE" scan_ssid="" } @@ -752,6 +721,7 @@ wpa_supplicant_add_network() { ;; esac } + local beacon_int brates mrate [ -n "$bssid" ] && append network_data "bssid=$bssid" "$N$T" [ -n "$beacon_int" ] && append network_data "beacon_int=$beacon_int" "$N$T" diff --git a/package/network/services/hostapd/files/wpa_supplicant-full.config b/package/network/services/hostapd/files/wpa_supplicant-full.config index 81fa8f539..18c3f9a5c 100644 --- a/package/network/services/hostapd/files/wpa_supplicant-full.config +++ b/package/network/services/hostapd/files/wpa_supplicant-full.config @@ -1,9 +1,9 @@ # Example wpa_supplicant build time configuration # # This file lists the configuration options that are used when building the -# wpa_supplicant binary. All lines starting with # are ignored. Configuration -# option lines must be commented out complete, if they are not to be included, -# i.e., just setting VARIABLE=n is not disabling that variable. +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. # # This file is included in Makefile, so variables like CFLAGS and LIBS can also # be modified from here. In most cases, these lines should use += in order not @@ -20,33 +20,63 @@ # used to fix build issues on such systems (krb5.h not found). #CFLAGS += -I/usr/include/kerberos +# Example configuration for various cross-compilation platforms + +#### sveasoft (e.g., for Linksys WRT54G) ###################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS += -I../src/include -I../../src/router/openssl/include +#LIBS += -L/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib -lssl +############################################################################### + +#### openwrt (e.g., for Linksys WRT54G) ####################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS=-I../src/include -I../openssl-0.9.7d/include \ +# -I../WRT54GS/release/src/include +#LIBS = -lssl +############################################################################### + + +# Driver interface for Host AP driver +#CONFIG_DRIVER_HOSTAP=y + +# Driver interface for Agere driver +#CONFIG_DRIVER_HERMES=y +# Change include directories to match with the local setup +#CFLAGS += -I../../hcf -I../../include -I../../include/hcf +#CFLAGS += -I../../include/wireless + +# Driver interface for ndiswrapper +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_NDISWRAPPER=y + +# Driver interface for Atmel driver +# CONFIG_DRIVER_ATMEL=y + +# Driver interface for old Broadcom driver +# Please note that the newer Broadcom driver ("hybrid Linux driver") supports +# Linux wireless extensions and does not need (or even work) with the old +# driver wrapper. Use CONFIG_DRIVER_WEXT=y with that driver. +#CONFIG_DRIVER_BROADCOM=y +# Example path for wlioctl.h; change to match your configuration +#CFLAGS += -I/opt/WRT54GS/release/src/include + +# Driver interface for Intel ipw2100/2200 driver +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_IPW=y + +# Driver interface for Ralink driver +#CONFIG_DRIVER_RALINK=y + # Driver interface for generic Linux wireless extensions -# Note: WEXT is deprecated in the current Linux kernel version and no new -# functionality is added to it. nl80211-based interface is the new -# replacement for WEXT and its use allows wpa_supplicant to properly control -# the driver to improve existing functionality like roaming and to support new -# functionality. CONFIG_DRIVER_WEXT=y # Driver interface for Linux drivers using the nl80211 kernel interface CONFIG_DRIVER_NL80211=y -# QCA vendor extensions to nl80211 -#CONFIG_DRIVER_NL80211_QCA=y - -# driver_nl80211.c requires libnl. If you are compiling it yourself -# you may need to point hostapd to your version of libnl. -# -#CFLAGS += -I$ -#LIBS += -L$ - -# Use libnl v2.0 (or 3.0) libraries. -#CONFIG_LIBNL20=y - -# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) -#CONFIG_LIBNL32=y - - # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) #CONFIG_DRIVER_BSD=y #CFLAGS += -I/usr/local/include @@ -70,6 +100,14 @@ CONFIG_DRIVER_NL80211=y # wpa_supplicant. # CONFIG_USE_NDISUIO=y +# Driver interface for development testing +#CONFIG_DRIVER_TEST=y + +# Include client MLME (management frame processing) for test driver +# This can be used to test MLME operations in hostapd with the test interface. +# space. +#CONFIG_CLIENT_MLME=y + # Driver interface for wired Ethernet drivers CONFIG_DRIVER_WIRED=y @@ -79,14 +117,13 @@ CONFIG_DRIVER_WIRED=y # Driver interface for no driver (e.g., WPS ER only) #CONFIG_DRIVER_NONE=y -# Solaris libraries -#LIBS += -lsocket -ldlpi -lnsl -#LIBS_c += -lsocket - # Enable IEEE 802.1X Supplicant (automatically included if any EAP method is # included) CONFIG_IEEE8021X_EAPOL=y +# EAP-FAST +CONFIG_EAP_FAST=y + # EAP-MD5 CONFIG_EAP_MD5=y @@ -103,10 +140,11 @@ CONFIG_EAP_PEAP=y CONFIG_EAP_TTLS=y # EAP-FAST -# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed -# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g., -# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions. -CONFIG_EAP_FAST=y +# Note: Default OpenSSL package does not include support for all the +# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, +# the OpenSSL library must be patched (openssl-0.9.8d-tls-extensions.patch) +# to add the needed functions. +#CONFIG_EAP_FAST=y # EAP-GTC CONFIG_EAP_GTC=y @@ -120,9 +158,6 @@ CONFIG_EAP_OTP=y # EAP-PSK (experimental; this is _not_ needed for WPA-PSK) #CONFIG_EAP_PSK=y -# EAP-pwd (secure authentication using only a password) -#CONFIG_EAP_PWD=y - # EAP-PAX #CONFIG_EAP_PAX=y @@ -152,20 +187,10 @@ CONFIG_EAP_LEAP=y # Wi-Fi Protected Setup (WPS) CONFIG_WPS=y -# Enable WPS external registrar functionality -#CONFIG_WPS_ER=y -# Disable credentials for an open network by default when acting as a WPS -# registrar. -#CONFIG_WPS_REG_DISABLE_OPEN=y -# Enable WPS support with NFC config method -#CONFIG_WPS_NFC=y # EAP-IKEv2 #CONFIG_EAP_IKEV2=y -# EAP-EKE -#CONFIG_EAP_EKE=y - # PKCS#12 (PFX) support (used to read private key and certificate file from # a file that usually has extension .p12 or .pfx) CONFIG_PKCS12=y @@ -178,22 +203,13 @@ CONFIG_SMARTCARD=y # Enable this if EAP-SIM or EAP-AKA is included #CONFIG_PCSC=y -# Support HT overrides (disable HT/HT40, mask MCS rates, etc.) -CONFIG_HT_OVERRIDES=y - -# Support VHT overrides (disable VHT, mask MCS rates, etc.) -CONFIG_VHT_OVERRIDES=y - # Development testing #CONFIG_EAPOL_TEST=y # Select control interface backend for external programs, e.g, wpa_cli: # unix = UNIX domain sockets (default for Linux/*BSD) # udp = UDP sockets using localhost (127.0.0.1) -# udp6 = UDP IPv6 sockets using localhost (::1) # named_pipe = Windows Named Pipe (default for Windows) -# udp-remote = UDP sockets with remote access (only for tests systems/purpose) -# udp6-remote = UDP IPv6 sockets with remote access (only for tests purpose) # y = use default (backwards compatibility) # If this option is commented out, control interface is not included in the # build. @@ -205,10 +221,6 @@ CONFIG_CTRL_IFACE=y # the resulting binary. #CONFIG_READLINE=y -# Include internal line edit mode in wpa_cli. This can be used as a replacement -# for GNU Readline to provide limited command line editing and history support. -#CONFIG_WPA_CLI_EDIT=y - # Remove debugging code that is printing out debug message to stdout. # This can be used to reduce the size of the wpa_supplicant considerably # if debugging code is not needed. The size reduction can be around 35% @@ -219,6 +231,11 @@ CONFIG_CTRL_IFACE=y # 35-50 kB in code size. #CONFIG_NO_WPA=y +# Remove WPA2 support. This allows WPA to be used, but removes WPA2 code to +# save about 1 kB in code size when building only WPA-Personal (no EAP support) +# or 6 kB if building for WPA-Enterprise. +#CONFIG_NO_WPA2=y + # Remove IEEE 802.11i/WPA-Personal ASCII passphrase support # This option can be used to reduce code size by removing support for # converting ASCII passphrases into PSK. If this functionality is removed, the @@ -253,7 +270,7 @@ CONFIG_BACKEND=file # main_none = Very basic example (development use only) #CONFIG_MAIN=main -# Select wrapper for operating system and C library specific functions +# Select wrapper for operatins system and C library specific functions # unix = UNIX/POSIX like systems (default) # win32 = Windows systems # none = Empty template @@ -262,17 +279,9 @@ CONFIG_BACKEND=file # Select event loop implementation # eloop = select() loop (default) # eloop_win = Windows events and WaitForMultipleObject() loop +# eloop_none = Empty template #CONFIG_ELOOP=eloop -# Should we use poll instead of select? Select is used by default. -#CONFIG_ELOOP_POLL=y - -# Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y - -# Should we use kqueue instead of select? Select is used by default. -#CONFIG_ELOOP_KQUEUE=y - # Select layer 2 packet implementation # linux = Linux packet socket (default) # pcap = libpcap/libdnet/WinPcap @@ -282,44 +291,29 @@ CONFIG_BACKEND=file # none = Empty template #CONFIG_L2_PACKET=linux -# Disable Linux packet socket workaround applicable for station interface -# in a bridge for EAPOL frames. This should be uncommented only if the kernel -# is known to not have the regression issue in packet socket behavior with -# bridge interfaces (commit 'bridge: respect RFC2863 operational state')'). -#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y - # PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) CONFIG_PEERKEY=y -# IEEE 802.11w (management frame protection), also known as PMF +# IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. # Driver support is also needed for IEEE 802.11w. -#CONFIG_IEEE80211W=y +CONFIG_IEEE80211W=y # Select TLS implementation # openssl = OpenSSL (default) -# gnutls = GnuTLS +# gnutls = GnuTLS (needed for TLS/IA, see also CONFIG_GNUTLS_EXTRA) # internal = Internal TLSv1 implementation (experimental) -# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental) # none = Empty template CONFIG_TLS=internal -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) -# can be enabled to get a stronger construction of messages when block ciphers -# are used. It should be noted that some existing TLS v1.0 -based -# implementation may not be compatible with TLS v1.1 message (ClientHello is -# sent prior to negotiating which version will be used) -#CONFIG_TLSV11=y - -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) -# can be enabled to enable use of stronger crypto algorithms. It should be -# noted that some existing TLS v1.0 -based implementation may not be compatible -# with TLS v1.2 message (ClientHello is sent prior to negotiating which version -# will be used) -#CONFIG_TLSV12=y - -# Select which ciphers to use by default with OpenSSL if the user does not -# specify them. -#CONFIG_TLS_DEFAULT_CIPHERS="DEFAULT:!EXP:!LOW" +# Whether to enable TLS/IA support, which is required for EAP-TTLSv1. +# You need CONFIG_TLS=gnutls for this to have any effect. Please note that +# even though the core GnuTLS library is released under LGPL, this extra +# library uses GPL and as such, the terms of GPL apply to the combination +# of wpa_supplicant and GnuTLS if this option is enabled. BSD license may not +# apply for distribution of the resulting binary. +#CONFIG_GNUTLS_EXTRA=y # If CONFIG_TLS=internal is used, additional library and include paths are # needed for LibTomMath. Alternatively, an integrated, minimal version of @@ -375,31 +369,12 @@ CONFIG_INTERNAL_LIBTOMMATH_FAST=y # amount of memory/flash. #CONFIG_DYNAMIC_EAP_METHODS=y -# IEEE Std 802.11r-2008 (Fast BSS Transition) for station mode +# IEEE Std 802.11r-2008 (Fast BSS Transition) CONFIG_IEEE80211R=y -# IEEE Std 802.11r-2008 (Fast BSS Transition) for AP mode (implies -# CONFIG_IEEE80211R). -#CONFIG_IEEE80211R_AP=y - # Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) #CONFIG_DEBUG_FILE=y -# Send debug messages to syslog instead of stdout -#CONFIG_DEBUG_SYSLOG=y -# Set syslog facility for debug messages -#CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON - -# Add support for sending all debug messages (regardless of debug verbosity) -# to the Linux kernel tracing facility. This helps debug the entire stack by -# making it easy to record everything happening from the driver up into the -# same file, e.g., using trace-cmd. -#CONFIG_DEBUG_LINUX_TRACING=y - -# Add support for writing debug log to Android logcat instead of standard -# output -#CONFIG_ANDROID_LOG=y - # Enable privilege separation (see README 'Privilege separation' for details) #CONFIG_PRIVSEP=y @@ -411,7 +386,7 @@ CONFIG_IEEE80211R=y # This tracks use of memory allocations and other registrations and reports # incorrect use with a backtrace of call (or allocation) location. #CONFIG_WPA_TRACE=y -# For BSD, uncomment these. +# For BSD, comment out these. #LIBS += -lexecinfo #LIBS_p += -lexecinfo #LIBS_c += -lexecinfo @@ -420,174 +395,12 @@ CONFIG_IEEE80211R=y # This enables use of libbfd to get more detailed symbols for the backtraces # generated by CONFIG_WPA_TRACE=y. #CONFIG_WPA_TRACE_BFD=y -# For BSD, uncomment these. +# For BSD, comment out these. #LIBS += -lbfd -liberty -lz #LIBS_p += -lbfd -liberty -lz #LIBS_c += -lbfd -liberty -lz -# wpa_supplicant depends on strong random number generation being available -# from the operating system. os_get_random() function is used to fetch random -# data when needed, e.g., for key generation. On Linux and BSD systems, this -# works by reading /dev/urandom. It should be noted that the OS entropy pool -# needs to be properly initialized before wpa_supplicant is started. This is -# important especially on embedded devices that do not have a hardware random -# number generator and may by default start up with minimal entropy available -# for random number generation. -# -# As a safety net, wpa_supplicant is by default trying to internally collect -# additional entropy for generating random data to mix in with the data fetched -# from the OS. This by itself is not considered to be very strong, but it may -# help in cases where the system pool is not initialized properly. However, it -# is very strongly recommended that the system pool is initialized with enough -# entropy either by using hardware assisted random number generator or by -# storing state over device reboots. -# -# wpa_supplicant can be configured to maintain its own entropy store over -# restarts to enhance random number generation. This is not perfect, but it is -# much more secure than using the same sequence of random numbers after every -# reboot. This can be enabled with -e command line option. The -# specified file needs to be readable and writable by wpa_supplicant. -# -# If the os_get_random() is known to provide strong random data (e.g., on -# Linux/BSD, the board in question is known to have reliable source of random -# data from /dev/urandom), the internal wpa_supplicant random pool can be -# disabled. This will save some in binary size and CPU use. However, this -# should only be considered for builds that are known to be used on devices -# that meet the requirements described above. CONFIG_NO_RANDOM_POOL=y +NEED_80211_COMMON=y -# IEEE 802.11n (High Throughput) support (mainly for AP mode) -#CONFIG_IEEE80211N=y - -# IEEE 802.11ac (Very High Throughput) support (mainly for AP mode) -# (depends on CONFIG_IEEE80211N) -#CONFIG_IEEE80211AC=y - -# Wireless Network Management (IEEE Std 802.11v-2011) -# Note: This is experimental and not complete implementation. -#CONFIG_WNM=y - -# Interworking (IEEE 802.11u) -# This can be used to enable functionality to improve interworking with -# external networks (GAS/ANQP to learn more about the networks and network -# selection based on available credentials). -#CONFIG_INTERWORKING=y - -# Hotspot 2.0 -#CONFIG_HS20=y - -# Enable interface matching in wpa_supplicant -#CONFIG_MATCH_IFACE=y - -# Disable roaming in wpa_supplicant -#CONFIG_NO_ROAMING=y - -# AP mode operations with wpa_supplicant -# This can be used for controlling AP mode operations with wpa_supplicant. It -# should be noted that this is mainly aimed at simple cases like -# WPA2-Personal while more complex configurations like WPA2-Enterprise with an -# external RADIUS server can be supported with hostapd. -#CONFIG_AP=y - -# P2P (Wi-Fi Direct) -# This can be used to enable P2P support in wpa_supplicant. See README-P2P for -# more information on P2P operations. -#CONFIG_P2P=y - -# Enable TDLS support -#CONFIG_TDLS=y - -# Wi-Fi Direct -# This can be used to enable Wi-Fi Direct extensions for P2P using an external -# program to control the additional information exchanges in the messages. -#CONFIG_WIFI_DISPLAY=y - -# Autoscan -# This can be used to enable automatic scan support in wpa_supplicant. -# See wpa_supplicant.conf for more information on autoscan usage. -# -# Enabling directly a module will enable autoscan support. -# For exponential module: -#CONFIG_AUTOSCAN_EXPONENTIAL=y -# For periodic module: -#CONFIG_AUTOSCAN_PERIODIC=y - -# Password (and passphrase, etc.) backend for external storage -# These optional mechanisms can be used to add support for storing passwords -# and other secrets in external (to wpa_supplicant) location. This allows, for -# example, operating system specific key storage to be used -# -# External password backend for testing purposes (developer use) -#CONFIG_EXT_PASSWORD_TEST=y - -# Enable Fast Session Transfer (FST) -#CONFIG_FST=y - -# Enable CLI commands for FST testing -#CONFIG_FST_TEST=y - -# OS X builds. This is only for building eapol_test. -#CONFIG_OSX=y - -# Automatic Channel Selection -# This will allow wpa_supplicant to pick the channel automatically when channel -# is set to "0". -# -# TODO: Extend parser to be able to parse "channel=acs_survey" as an alternative -# to "channel=0". This would enable us to eventually add other ACS algorithms in -# similar way. -# -# Automatic selection is currently only done through initialization, later on -# we hope to do background checks to keep us moving to more ideal channels as -# time goes by. ACS is currently only supported through the nl80211 driver and -# your driver must have survey dump capability that is filled by the driver -# during scanning. -# -# TODO: In analogy to hostapd be able to customize the ACS survey algorithm with -# a newly to create wpa_supplicant.conf variable acs_num_scans. -# -# Supported ACS drivers: -# * ath9k -# * ath5k -# * ath10k -# -# For more details refer to: -# http://wireless.kernel.org/en/users/Documentation/acs -#CONFIG_ACS=y - -# Support Multi Band Operation -#CONFIG_MBO=y - -# Fast Initial Link Setup (FILS) (IEEE 802.11ai) -# Note: This is an experimental and not yet complete implementation. This -# should not be enabled for production use. -#CONFIG_FILS=y -# FILS shared key authentication with PFS -#CONFIG_FILS_SK_PFS=y - -# Support RSN on IBSS networks -# This is needed to be able to use mode=1 network profile with proto=RSN and -# key_mgmt=WPA-PSK (i.e., full key management instead of WPA-None). CONFIG_IBSS_RSN=y - -# External PMKSA cache control -# This can be used to enable control interface commands that allow the current -# PMKSA cache entries to be fetched and new entries to be added. -#CONFIG_PMKSA_CACHE_EXTERNAL=y - -# Mesh Networking (IEEE 802.11s) -#CONFIG_MESH=y - -# Background scanning modules -# These can be used to request wpa_supplicant to perform background scanning -# operations for roaming within an ESS (same SSID). See the bgscan parameter in -# the wpa_supplicant.conf file for more details. -# Periodic background scans based on signal strength -#CONFIG_BGSCAN_SIMPLE=y -# Learn channels used by the network and try to avoid bgscans on other -# channels (experimental) -#CONFIG_BGSCAN_LEARN=y - -# Opportunistic Wireless Encryption (OWE) -# Experimental implementation of draft-harkins-owe-07.txt -#CONFIG_OWE=y diff --git a/package/network/services/hostapd/files/wpa_supplicant-mini.config b/package/network/services/hostapd/files/wpa_supplicant-mini.config index 3e088715c..c272153b3 100644 --- a/package/network/services/hostapd/files/wpa_supplicant-mini.config +++ b/package/network/services/hostapd/files/wpa_supplicant-mini.config @@ -1,9 +1,9 @@ # Example wpa_supplicant build time configuration # # This file lists the configuration options that are used when building the -# wpa_supplicant binary. All lines starting with # are ignored. Configuration -# option lines must be commented out complete, if they are not to be included, -# i.e., just setting VARIABLE=n is not disabling that variable. +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. # # This file is included in Makefile, so variables like CFLAGS and LIBS can also # be modified from here. In most cases, these lines should use += in order not @@ -20,33 +20,63 @@ # used to fix build issues on such systems (krb5.h not found). #CFLAGS += -I/usr/include/kerberos +# Example configuration for various cross-compilation platforms + +#### sveasoft (e.g., for Linksys WRT54G) ###################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS += -I../src/include -I../../src/router/openssl/include +#LIBS += -L/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib -lssl +############################################################################### + +#### openwrt (e.g., for Linksys WRT54G) ####################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS=-I../src/include -I../openssl-0.9.7d/include \ +# -I../WRT54GS/release/src/include +#LIBS = -lssl +############################################################################### + + +# Driver interface for Host AP driver +#CONFIG_DRIVER_HOSTAP=y + +# Driver interface for Agere driver +#CONFIG_DRIVER_HERMES=y +# Change include directories to match with the local setup +#CFLAGS += -I../../hcf -I../../include -I../../include/hcf +#CFLAGS += -I../../include/wireless + +# Driver interface for ndiswrapper +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_NDISWRAPPER=y + +# Driver interface for Atmel driver +# CONFIG_DRIVER_ATMEL=y + +# Driver interface for old Broadcom driver +# Please note that the newer Broadcom driver ("hybrid Linux driver") supports +# Linux wireless extensions and does not need (or even work) with the old +# driver wrapper. Use CONFIG_DRIVER_WEXT=y with that driver. +#CONFIG_DRIVER_BROADCOM=y +# Example path for wlioctl.h; change to match your configuration +#CFLAGS += -I/opt/WRT54GS/release/src/include + +# Driver interface for Intel ipw2100/2200 driver +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_IPW=y + +# Driver interface for Ralink driver +#CONFIG_DRIVER_RALINK=y + # Driver interface for generic Linux wireless extensions -# Note: WEXT is deprecated in the current Linux kernel version and no new -# functionality is added to it. nl80211-based interface is the new -# replacement for WEXT and its use allows wpa_supplicant to properly control -# the driver to improve existing functionality like roaming and to support new -# functionality. CONFIG_DRIVER_WEXT=y # Driver interface for Linux drivers using the nl80211 kernel interface CONFIG_DRIVER_NL80211=y -# QCA vendor extensions to nl80211 -#CONFIG_DRIVER_NL80211_QCA=y - -# driver_nl80211.c requires libnl. If you are compiling it yourself -# you may need to point hostapd to your version of libnl. -# -#CFLAGS += -I$ -#LIBS += -L$ - -# Use libnl v2.0 (or 3.0) libraries. -#CONFIG_LIBNL20=y - -# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) -#CONFIG_LIBNL32=y - - # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) #CONFIG_DRIVER_BSD=y #CFLAGS += -I/usr/local/include @@ -70,6 +100,14 @@ CONFIG_DRIVER_NL80211=y # wpa_supplicant. # CONFIG_USE_NDISUIO=y +# Driver interface for development testing +#CONFIG_DRIVER_TEST=y + +# Include client MLME (management frame processing) for test driver +# This can be used to test MLME operations in hostapd with the test interface. +# space. +#CONFIG_CLIENT_MLME=y + # Driver interface for wired Ethernet drivers CONFIG_DRIVER_WIRED=y @@ -79,40 +117,37 @@ CONFIG_DRIVER_WIRED=y # Driver interface for no driver (e.g., WPS ER only) #CONFIG_DRIVER_NONE=y -# Solaris libraries -#LIBS += -lsocket -ldlpi -lnsl -#LIBS_c += -lsocket - # Enable IEEE 802.1X Supplicant (automatically included if any EAP method is # included) -#CONFIG_IEEE8021X_EAPOL=y +# CONFIG_IEEE8021X_EAPOL=y # EAP-MD5 -#CONFIG_EAP_MD5=y +# CONFIG_EAP_MD5=y # EAP-MSCHAPv2 -#CONFIG_EAP_MSCHAPV2=y +# CONFIG_EAP_MSCHAPV2=y # EAP-TLS -#CONFIG_EAP_TLS=y +# CONFIG_EAP_TLS=y # EAL-PEAP -#CONFIG_EAP_PEAP=y +# CONFIG_EAP_PEAP=y # EAP-TTLS -#CONFIG_EAP_TTLS=y +# CONFIG_EAP_TTLS=y # EAP-FAST -# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed -# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g., -# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions. +# Note: Default OpenSSL package does not include support for all the +# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, +# the OpenSSL library must be patched (openssl-0.9.8d-tls-extensions.patch) +# to add the needed functions. #CONFIG_EAP_FAST=y # EAP-GTC -#CONFIG_EAP_GTC=y +# CONFIG_EAP_GTC=y # EAP-OTP -#CONFIG_EAP_OTP=y +# CONFIG_EAP_OTP=y # EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used) #CONFIG_EAP_SIM=y @@ -120,14 +155,11 @@ CONFIG_DRIVER_WIRED=y # EAP-PSK (experimental; this is _not_ needed for WPA-PSK) #CONFIG_EAP_PSK=y -# EAP-pwd (secure authentication using only a password) -#CONFIG_EAP_PWD=y - # EAP-PAX #CONFIG_EAP_PAX=y # LEAP -#CONFIG_EAP_LEAP=y +# CONFIG_EAP_LEAP=y # EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used) #CONFIG_EAP_AKA=y @@ -152,48 +184,29 @@ CONFIG_DRIVER_WIRED=y # Wi-Fi Protected Setup (WPS) #CONFIG_WPS=y -# Enable WPS external registrar functionality -#CONFIG_WPS_ER=y -# Disable credentials for an open network by default when acting as a WPS -# registrar. -#CONFIG_WPS_REG_DISABLE_OPEN=y -# Enable WPS support with NFC config method -#CONFIG_WPS_NFC=y # EAP-IKEv2 #CONFIG_EAP_IKEV2=y -# EAP-EKE -#CONFIG_EAP_EKE=y - # PKCS#12 (PFX) support (used to read private key and certificate file from # a file that usually has extension .p12 or .pfx) -#CONFIG_PKCS12=y +# CONFIG_PKCS12=y # Smartcard support (i.e., private key on a smartcard), e.g., with openssl # engine. -#CONFIG_SMARTCARD=y +# CONFIG_SMARTCARD=y # PC/SC interface for smartcards (USIM, GSM SIM) # Enable this if EAP-SIM or EAP-AKA is included #CONFIG_PCSC=y -# Support HT overrides (disable HT/HT40, mask MCS rates, etc.) -CONFIG_HT_OVERRIDES=y - -# Support VHT overrides (disable VHT, mask MCS rates, etc.) -CONFIG_VHT_OVERRIDES=y - # Development testing #CONFIG_EAPOL_TEST=y # Select control interface backend for external programs, e.g, wpa_cli: # unix = UNIX domain sockets (default for Linux/*BSD) # udp = UDP sockets using localhost (127.0.0.1) -# udp6 = UDP IPv6 sockets using localhost (::1) # named_pipe = Windows Named Pipe (default for Windows) -# udp-remote = UDP sockets with remote access (only for tests systems/purpose) -# udp6-remote = UDP IPv6 sockets with remote access (only for tests purpose) # y = use default (backwards compatibility) # If this option is commented out, control interface is not included in the # build. @@ -205,10 +218,6 @@ CONFIG_CTRL_IFACE=y # the resulting binary. #CONFIG_READLINE=y -# Include internal line edit mode in wpa_cli. This can be used as a replacement -# for GNU Readline to provide limited command line editing and history support. -#CONFIG_WPA_CLI_EDIT=y - # Remove debugging code that is printing out debug message to stdout. # This can be used to reduce the size of the wpa_supplicant considerably # if debugging code is not needed. The size reduction can be around 35% @@ -219,6 +228,11 @@ CONFIG_CTRL_IFACE=y # 35-50 kB in code size. #CONFIG_NO_WPA=y +# Remove WPA2 support. This allows WPA to be used, but removes WPA2 code to +# save about 1 kB in code size when building only WPA-Personal (no EAP support) +# or 6 kB if building for WPA-Enterprise. +#CONFIG_NO_WPA2=y + # Remove IEEE 802.11i/WPA-Personal ASCII passphrase support # This option can be used to reduce code size by removing support for # converting ASCII passphrases into PSK. If this functionality is removed, the @@ -253,7 +267,7 @@ CONFIG_BACKEND=file # main_none = Very basic example (development use only) #CONFIG_MAIN=main -# Select wrapper for operating system and C library specific functions +# Select wrapper for operatins system and C library specific functions # unix = UNIX/POSIX like systems (default) # win32 = Windows systems # none = Empty template @@ -262,17 +276,9 @@ CONFIG_BACKEND=file # Select event loop implementation # eloop = select() loop (default) # eloop_win = Windows events and WaitForMultipleObject() loop +# eloop_none = Empty template #CONFIG_ELOOP=eloop -# Should we use poll instead of select? Select is used by default. -#CONFIG_ELOOP_POLL=y - -# Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y - -# Should we use kqueue instead of select? Select is used by default. -#CONFIG_ELOOP_KQUEUE=y - # Select layer 2 packet implementation # linux = Linux packet socket (default) # pcap = libpcap/libdnet/WinPcap @@ -282,44 +288,29 @@ CONFIG_BACKEND=file # none = Empty template #CONFIG_L2_PACKET=linux -# Disable Linux packet socket workaround applicable for station interface -# in a bridge for EAPOL frames. This should be uncommented only if the kernel -# is known to not have the regression issue in packet socket behavior with -# bridge interfaces (commit 'bridge: respect RFC2863 operational state')'). -#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y - # PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) -#CONFIG_PEERKEY=y +# CONFIG_PEERKEY=y -# IEEE 802.11w (management frame protection), also known as PMF +# IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. # Driver support is also needed for IEEE 802.11w. #CONFIG_IEEE80211W=y # Select TLS implementation # openssl = OpenSSL (default) -# gnutls = GnuTLS +# gnutls = GnuTLS (needed for TLS/IA, see also CONFIG_GNUTLS_EXTRA) # internal = Internal TLSv1 implementation (experimental) -# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental) # none = Empty template CONFIG_TLS=internal -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) -# can be enabled to get a stronger construction of messages when block ciphers -# are used. It should be noted that some existing TLS v1.0 -based -# implementation may not be compatible with TLS v1.1 message (ClientHello is -# sent prior to negotiating which version will be used) -#CONFIG_TLSV11=y - -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) -# can be enabled to enable use of stronger crypto algorithms. It should be -# noted that some existing TLS v1.0 -based implementation may not be compatible -# with TLS v1.2 message (ClientHello is sent prior to negotiating which version -# will be used) -#CONFIG_TLSV12=y - -# Select which ciphers to use by default with OpenSSL if the user does not -# specify them. -#CONFIG_TLS_DEFAULT_CIPHERS="DEFAULT:!EXP:!LOW" +# Whether to enable TLS/IA support, which is required for EAP-TTLSv1. +# You need CONFIG_TLS=gnutls for this to have any effect. Please note that +# even though the core GnuTLS library is released under LGPL, this extra +# library uses GPL and as such, the terms of GPL apply to the combination +# of wpa_supplicant and GnuTLS if this option is enabled. BSD license may not +# apply for distribution of the resulting binary. +#CONFIG_GNUTLS_EXTRA=y # If CONFIG_TLS=internal is used, additional library and include paths are # needed for LibTomMath. Alternatively, an integrated, minimal version of @@ -375,31 +366,12 @@ CONFIG_TLS=internal # amount of memory/flash. #CONFIG_DYNAMIC_EAP_METHODS=y -# IEEE Std 802.11r-2008 (Fast BSS Transition) for station mode +# IEEE Std 802.11r-2008 (Fast BSS Transition) #CONFIG_IEEE80211R=y -# IEEE Std 802.11r-2008 (Fast BSS Transition) for AP mode (implies -# CONFIG_IEEE80211R). -#CONFIG_IEEE80211R_AP=y - # Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) #CONFIG_DEBUG_FILE=y -# Send debug messages to syslog instead of stdout -#CONFIG_DEBUG_SYSLOG=y -# Set syslog facility for debug messages -#CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON - -# Add support for sending all debug messages (regardless of debug verbosity) -# to the Linux kernel tracing facility. This helps debug the entire stack by -# making it easy to record everything happening from the driver up into the -# same file, e.g., using trace-cmd. -#CONFIG_DEBUG_LINUX_TRACING=y - -# Add support for writing debug log to Android logcat instead of standard -# output -#CONFIG_ANDROID_LOG=y - # Enable privilege separation (see README 'Privilege separation' for details) #CONFIG_PRIVSEP=y @@ -411,7 +383,7 @@ CONFIG_TLS=internal # This tracks use of memory allocations and other registrations and reports # incorrect use with a backtrace of call (or allocation) location. #CONFIG_WPA_TRACE=y -# For BSD, uncomment these. +# For BSD, comment out these. #LIBS += -lexecinfo #LIBS_p += -lexecinfo #LIBS_c += -lexecinfo @@ -420,174 +392,10 @@ CONFIG_TLS=internal # This enables use of libbfd to get more detailed symbols for the backtraces # generated by CONFIG_WPA_TRACE=y. #CONFIG_WPA_TRACE_BFD=y -# For BSD, uncomment these. +# For BSD, comment out these. #LIBS += -lbfd -liberty -lz #LIBS_p += -lbfd -liberty -lz #LIBS_c += -lbfd -liberty -lz -# wpa_supplicant depends on strong random number generation being available -# from the operating system. os_get_random() function is used to fetch random -# data when needed, e.g., for key generation. On Linux and BSD systems, this -# works by reading /dev/urandom. It should be noted that the OS entropy pool -# needs to be properly initialized before wpa_supplicant is started. This is -# important especially on embedded devices that do not have a hardware random -# number generator and may by default start up with minimal entropy available -# for random number generation. -# -# As a safety net, wpa_supplicant is by default trying to internally collect -# additional entropy for generating random data to mix in with the data fetched -# from the OS. This by itself is not considered to be very strong, but it may -# help in cases where the system pool is not initialized properly. However, it -# is very strongly recommended that the system pool is initialized with enough -# entropy either by using hardware assisted random number generator or by -# storing state over device reboots. -# -# wpa_supplicant can be configured to maintain its own entropy store over -# restarts to enhance random number generation. This is not perfect, but it is -# much more secure than using the same sequence of random numbers after every -# reboot. This can be enabled with -e command line option. The -# specified file needs to be readable and writable by wpa_supplicant. -# -# If the os_get_random() is known to provide strong random data (e.g., on -# Linux/BSD, the board in question is known to have reliable source of random -# data from /dev/urandom), the internal wpa_supplicant random pool can be -# disabled. This will save some in binary size and CPU use. However, this -# should only be considered for builds that are known to be used on devices -# that meet the requirements described above. CONFIG_NO_RANDOM_POOL=y - -# IEEE 802.11n (High Throughput) support (mainly for AP mode) -#CONFIG_IEEE80211N=y - -# IEEE 802.11ac (Very High Throughput) support (mainly for AP mode) -# (depends on CONFIG_IEEE80211N) -#CONFIG_IEEE80211AC=y - -# Wireless Network Management (IEEE Std 802.11v-2011) -# Note: This is experimental and not complete implementation. -#CONFIG_WNM=y - -# Interworking (IEEE 802.11u) -# This can be used to enable functionality to improve interworking with -# external networks (GAS/ANQP to learn more about the networks and network -# selection based on available credentials). -#CONFIG_INTERWORKING=y - -# Hotspot 2.0 -#CONFIG_HS20=y - -# Enable interface matching in wpa_supplicant -#CONFIG_MATCH_IFACE=y - -# Disable roaming in wpa_supplicant -#CONFIG_NO_ROAMING=y - -# AP mode operations with wpa_supplicant -# This can be used for controlling AP mode operations with wpa_supplicant. It -# should be noted that this is mainly aimed at simple cases like -# WPA2-Personal while more complex configurations like WPA2-Enterprise with an -# external RADIUS server can be supported with hostapd. -#CONFIG_AP=y - -# P2P (Wi-Fi Direct) -# This can be used to enable P2P support in wpa_supplicant. See README-P2P for -# more information on P2P operations. -#CONFIG_P2P=y - -# Enable TDLS support -#CONFIG_TDLS=y - -# Wi-Fi Direct -# This can be used to enable Wi-Fi Direct extensions for P2P using an external -# program to control the additional information exchanges in the messages. -#CONFIG_WIFI_DISPLAY=y - -# Autoscan -# This can be used to enable automatic scan support in wpa_supplicant. -# See wpa_supplicant.conf for more information on autoscan usage. -# -# Enabling directly a module will enable autoscan support. -# For exponential module: -#CONFIG_AUTOSCAN_EXPONENTIAL=y -# For periodic module: -#CONFIG_AUTOSCAN_PERIODIC=y - -# Password (and passphrase, etc.) backend for external storage -# These optional mechanisms can be used to add support for storing passwords -# and other secrets in external (to wpa_supplicant) location. This allows, for -# example, operating system specific key storage to be used -# -# External password backend for testing purposes (developer use) -#CONFIG_EXT_PASSWORD_TEST=y - -# Enable Fast Session Transfer (FST) -#CONFIG_FST=y - -# Enable CLI commands for FST testing -#CONFIG_FST_TEST=y - -# OS X builds. This is only for building eapol_test. -#CONFIG_OSX=y - -# Automatic Channel Selection -# This will allow wpa_supplicant to pick the channel automatically when channel -# is set to "0". -# -# TODO: Extend parser to be able to parse "channel=acs_survey" as an alternative -# to "channel=0". This would enable us to eventually add other ACS algorithms in -# similar way. -# -# Automatic selection is currently only done through initialization, later on -# we hope to do background checks to keep us moving to more ideal channels as -# time goes by. ACS is currently only supported through the nl80211 driver and -# your driver must have survey dump capability that is filled by the driver -# during scanning. -# -# TODO: In analogy to hostapd be able to customize the ACS survey algorithm with -# a newly to create wpa_supplicant.conf variable acs_num_scans. -# -# Supported ACS drivers: -# * ath9k -# * ath5k -# * ath10k -# -# For more details refer to: -# http://wireless.kernel.org/en/users/Documentation/acs -#CONFIG_ACS=y - -# Support Multi Band Operation -#CONFIG_MBO=y - -# Fast Initial Link Setup (FILS) (IEEE 802.11ai) -# Note: This is an experimental and not yet complete implementation. This -# should not be enabled for production use. -#CONFIG_FILS=y -# FILS shared key authentication with PFS -#CONFIG_FILS_SK_PFS=y - -# Support RSN on IBSS networks -# This is needed to be able to use mode=1 network profile with proto=RSN and -# key_mgmt=WPA-PSK (i.e., full key management instead of WPA-None). -#CONFIG_IBSS_RSN=y - -# External PMKSA cache control -# This can be used to enable control interface commands that allow the current -# PMKSA cache entries to be fetched and new entries to be added. -#CONFIG_PMKSA_CACHE_EXTERNAL=y - -# Mesh Networking (IEEE 802.11s) -#CONFIG_MESH=y - -# Background scanning modules -# These can be used to request wpa_supplicant to perform background scanning -# operations for roaming within an ESS (same SSID). See the bgscan parameter in -# the wpa_supplicant.conf file for more details. -# Periodic background scans based on signal strength -#CONFIG_BGSCAN_SIMPLE=y -# Learn channels used by the network and try to avoid bgscans on other -# channels (experimental) -#CONFIG_BGSCAN_LEARN=y - -# Opportunistic Wireless Encryption (OWE) -# Experimental implementation of draft-harkins-owe-07.txt -#CONFIG_OWE=y +NEED_80211_COMMON=y diff --git a/package/network/services/hostapd/files/wpa_supplicant-p2p.config b/package/network/services/hostapd/files/wpa_supplicant-p2p.config index 420aebcf9..563dace35 100644 --- a/package/network/services/hostapd/files/wpa_supplicant-p2p.config +++ b/package/network/services/hostapd/files/wpa_supplicant-p2p.config @@ -1,9 +1,9 @@ # Example wpa_supplicant build time configuration # # This file lists the configuration options that are used when building the -# wpa_supplicant binary. All lines starting with # are ignored. Configuration -# option lines must be commented out complete, if they are not to be included, -# i.e., just setting VARIABLE=n is not disabling that variable. +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. # # This file is included in Makefile, so variables like CFLAGS and LIBS can also # be modified from here. In most cases, these lines should use += in order not @@ -20,33 +20,63 @@ # used to fix build issues on such systems (krb5.h not found). #CFLAGS += -I/usr/include/kerberos +# Example configuration for various cross-compilation platforms + +#### sveasoft (e.g., for Linksys WRT54G) ###################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS += -I../src/include -I../../src/router/openssl/include +#LIBS += -L/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib -lssl +############################################################################### + +#### openwrt (e.g., for Linksys WRT54G) ####################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS=-I../src/include -I../openssl-0.9.7d/include \ +# -I../WRT54GS/release/src/include +#LIBS = -lssl +############################################################################### + + +# Driver interface for Host AP driver +#CONFIG_DRIVER_HOSTAP=y + +# Driver interface for Agere driver +#CONFIG_DRIVER_HERMES=y +# Change include directories to match with the local setup +#CFLAGS += -I../../hcf -I../../include -I../../include/hcf +#CFLAGS += -I../../include/wireless + +# Driver interface for ndiswrapper +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_NDISWRAPPER=y + +# Driver interface for Atmel driver +# CONFIG_DRIVER_ATMEL=y + +# Driver interface for old Broadcom driver +# Please note that the newer Broadcom driver ("hybrid Linux driver") supports +# Linux wireless extensions and does not need (or even work) with the old +# driver wrapper. Use CONFIG_DRIVER_WEXT=y with that driver. +#CONFIG_DRIVER_BROADCOM=y +# Example path for wlioctl.h; change to match your configuration +#CFLAGS += -I/opt/WRT54GS/release/src/include + +# Driver interface for Intel ipw2100/2200 driver +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_IPW=y + +# Driver interface for Ralink driver +#CONFIG_DRIVER_RALINK=y + # Driver interface for generic Linux wireless extensions -# Note: WEXT is deprecated in the current Linux kernel version and no new -# functionality is added to it. nl80211-based interface is the new -# replacement for WEXT and its use allows wpa_supplicant to properly control -# the driver to improve existing functionality like roaming and to support new -# functionality. CONFIG_DRIVER_WEXT=y # Driver interface for Linux drivers using the nl80211 kernel interface CONFIG_DRIVER_NL80211=y -# QCA vendor extensions to nl80211 -#CONFIG_DRIVER_NL80211_QCA=y - -# driver_nl80211.c requires libnl. If you are compiling it yourself -# you may need to point hostapd to your version of libnl. -# -#CFLAGS += -I$ -#LIBS += -L$ - -# Use libnl v2.0 (or 3.0) libraries. -#CONFIG_LIBNL20=y - -# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) -#CONFIG_LIBNL32=y - - # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) #CONFIG_DRIVER_BSD=y #CFLAGS += -I/usr/local/include @@ -70,6 +100,14 @@ CONFIG_DRIVER_NL80211=y # wpa_supplicant. # CONFIG_USE_NDISUIO=y +# Driver interface for development testing +#CONFIG_DRIVER_TEST=y + +# Include client MLME (management frame processing) for test driver +# This can be used to test MLME operations in hostapd with the test interface. +# space. +#CONFIG_CLIENT_MLME=y + # Driver interface for wired Ethernet drivers CONFIG_DRIVER_WIRED=y @@ -79,10 +117,6 @@ CONFIG_DRIVER_WIRED=y # Driver interface for no driver (e.g., WPS ER only) #CONFIG_DRIVER_NONE=y -# Solaris libraries -#LIBS += -lsocket -ldlpi -lnsl -#LIBS_c += -lsocket - # Enable IEEE 802.1X Supplicant (automatically included if any EAP method is # included) CONFIG_IEEE8021X_EAPOL=y @@ -103,10 +137,11 @@ CONFIG_EAP_PEAP=y CONFIG_EAP_TTLS=y # EAP-FAST -# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed -# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g., -# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions. -CONFIG_EAP_FAST=y +# Note: Default OpenSSL package does not include support for all the +# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, +# the OpenSSL library must be patched (openssl-0.9.8d-tls-extensions.patch) +# to add the needed functions. +#CONFIG_EAP_FAST=y # EAP-GTC CONFIG_EAP_GTC=y @@ -120,9 +155,6 @@ CONFIG_EAP_OTP=y # EAP-PSK (experimental; this is _not_ needed for WPA-PSK) #CONFIG_EAP_PSK=y -# EAP-pwd (secure authentication using only a password) -#CONFIG_EAP_PWD=y - # EAP-PAX #CONFIG_EAP_PAX=y @@ -152,20 +184,10 @@ CONFIG_EAP_LEAP=y # Wi-Fi Protected Setup (WPS) CONFIG_WPS=y -# Enable WPS external registrar functionality -#CONFIG_WPS_ER=y -# Disable credentials for an open network by default when acting as a WPS -# registrar. -#CONFIG_WPS_REG_DISABLE_OPEN=y -# Enable WPS support with NFC config method -#CONFIG_WPS_NFC=y # EAP-IKEv2 #CONFIG_EAP_IKEV2=y -# EAP-EKE -#CONFIG_EAP_EKE=y - # PKCS#12 (PFX) support (used to read private key and certificate file from # a file that usually has extension .p12 or .pfx) CONFIG_PKCS12=y @@ -178,22 +200,13 @@ CONFIG_SMARTCARD=y # Enable this if EAP-SIM or EAP-AKA is included #CONFIG_PCSC=y -# Support HT overrides (disable HT/HT40, mask MCS rates, etc.) -CONFIG_HT_OVERRIDES=y - -# Support VHT overrides (disable VHT, mask MCS rates, etc.) -CONFIG_VHT_OVERRIDES=y - # Development testing #CONFIG_EAPOL_TEST=y # Select control interface backend for external programs, e.g, wpa_cli: # unix = UNIX domain sockets (default for Linux/*BSD) # udp = UDP sockets using localhost (127.0.0.1) -# udp6 = UDP IPv6 sockets using localhost (::1) # named_pipe = Windows Named Pipe (default for Windows) -# udp-remote = UDP sockets with remote access (only for tests systems/purpose) -# udp6-remote = UDP IPv6 sockets with remote access (only for tests purpose) # y = use default (backwards compatibility) # If this option is commented out, control interface is not included in the # build. @@ -205,10 +218,6 @@ CONFIG_CTRL_IFACE=y # the resulting binary. #CONFIG_READLINE=y -# Include internal line edit mode in wpa_cli. This can be used as a replacement -# for GNU Readline to provide limited command line editing and history support. -#CONFIG_WPA_CLI_EDIT=y - # Remove debugging code that is printing out debug message to stdout. # This can be used to reduce the size of the wpa_supplicant considerably # if debugging code is not needed. The size reduction can be around 35% @@ -219,6 +228,11 @@ CONFIG_CTRL_IFACE=y # 35-50 kB in code size. #CONFIG_NO_WPA=y +# Remove WPA2 support. This allows WPA to be used, but removes WPA2 code to +# save about 1 kB in code size when building only WPA-Personal (no EAP support) +# or 6 kB if building for WPA-Enterprise. +#CONFIG_NO_WPA2=y + # Remove IEEE 802.11i/WPA-Personal ASCII passphrase support # This option can be used to reduce code size by removing support for # converting ASCII passphrases into PSK. If this functionality is removed, the @@ -253,7 +267,7 @@ CONFIG_BACKEND=file # main_none = Very basic example (development use only) #CONFIG_MAIN=main -# Select wrapper for operating system and C library specific functions +# Select wrapper for operatins system and C library specific functions # unix = UNIX/POSIX like systems (default) # win32 = Windows systems # none = Empty template @@ -262,17 +276,9 @@ CONFIG_BACKEND=file # Select event loop implementation # eloop = select() loop (default) # eloop_win = Windows events and WaitForMultipleObject() loop +# eloop_none = Empty template #CONFIG_ELOOP=eloop -# Should we use poll instead of select? Select is used by default. -#CONFIG_ELOOP_POLL=y - -# Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y - -# Should we use kqueue instead of select? Select is used by default. -#CONFIG_ELOOP_KQUEUE=y - # Select layer 2 packet implementation # linux = Linux packet socket (default) # pcap = libpcap/libdnet/WinPcap @@ -282,44 +288,29 @@ CONFIG_BACKEND=file # none = Empty template #CONFIG_L2_PACKET=linux -# Disable Linux packet socket workaround applicable for station interface -# in a bridge for EAPOL frames. This should be uncommented only if the kernel -# is known to not have the regression issue in packet socket behavior with -# bridge interfaces (commit 'bridge: respect RFC2863 operational state')'). -#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y - # PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) CONFIG_PEERKEY=y -# IEEE 802.11w (management frame protection), also known as PMF +# IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. # Driver support is also needed for IEEE 802.11w. CONFIG_IEEE80211W=y # Select TLS implementation # openssl = OpenSSL (default) -# gnutls = GnuTLS +# gnutls = GnuTLS (needed for TLS/IA, see also CONFIG_GNUTLS_EXTRA) # internal = Internal TLSv1 implementation (experimental) -# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental) # none = Empty template CONFIG_TLS=internal -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) -# can be enabled to get a stronger construction of messages when block ciphers -# are used. It should be noted that some existing TLS v1.0 -based -# implementation may not be compatible with TLS v1.1 message (ClientHello is -# sent prior to negotiating which version will be used) -#CONFIG_TLSV11=y - -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) -# can be enabled to enable use of stronger crypto algorithms. It should be -# noted that some existing TLS v1.0 -based implementation may not be compatible -# with TLS v1.2 message (ClientHello is sent prior to negotiating which version -# will be used) -#CONFIG_TLSV12=y - -# Select which ciphers to use by default with OpenSSL if the user does not -# specify them. -#CONFIG_TLS_DEFAULT_CIPHERS="DEFAULT:!EXP:!LOW" +# Whether to enable TLS/IA support, which is required for EAP-TTLSv1. +# You need CONFIG_TLS=gnutls for this to have any effect. Please note that +# even though the core GnuTLS library is released under LGPL, this extra +# library uses GPL and as such, the terms of GPL apply to the combination +# of wpa_supplicant and GnuTLS if this option is enabled. BSD license may not +# apply for distribution of the resulting binary. +#CONFIG_GNUTLS_EXTRA=y # If CONFIG_TLS=internal is used, additional library and include paths are # needed for LibTomMath. Alternatively, an integrated, minimal version of @@ -375,31 +366,12 @@ CONFIG_INTERNAL_LIBTOMMATH_FAST=y # amount of memory/flash. #CONFIG_DYNAMIC_EAP_METHODS=y -# IEEE Std 802.11r-2008 (Fast BSS Transition) for station mode +# IEEE Std 802.11r-2008 (Fast BSS Transition) #CONFIG_IEEE80211R=y -# IEEE Std 802.11r-2008 (Fast BSS Transition) for AP mode (implies -# CONFIG_IEEE80211R). -#CONFIG_IEEE80211R_AP=y - # Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) #CONFIG_DEBUG_FILE=y -# Send debug messages to syslog instead of stdout -#CONFIG_DEBUG_SYSLOG=y -# Set syslog facility for debug messages -#CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON - -# Add support for sending all debug messages (regardless of debug verbosity) -# to the Linux kernel tracing facility. This helps debug the entire stack by -# making it easy to record everything happening from the driver up into the -# same file, e.g., using trace-cmd. -#CONFIG_DEBUG_LINUX_TRACING=y - -# Add support for writing debug log to Android logcat instead of standard -# output -#CONFIG_ANDROID_LOG=y - # Enable privilege separation (see README 'Privilege separation' for details) #CONFIG_PRIVSEP=y @@ -411,7 +383,7 @@ CONFIG_INTERNAL_LIBTOMMATH_FAST=y # This tracks use of memory allocations and other registrations and reports # incorrect use with a backtrace of call (or allocation) location. #CONFIG_WPA_TRACE=y -# For BSD, uncomment these. +# For BSD, comment out these. #LIBS += -lexecinfo #LIBS_p += -lexecinfo #LIBS_c += -lexecinfo @@ -420,174 +392,15 @@ CONFIG_INTERNAL_LIBTOMMATH_FAST=y # This enables use of libbfd to get more detailed symbols for the backtraces # generated by CONFIG_WPA_TRACE=y. #CONFIG_WPA_TRACE_BFD=y -# For BSD, uncomment these. +# For BSD, comment out these. #LIBS += -lbfd -liberty -lz #LIBS_p += -lbfd -liberty -lz #LIBS_c += -lbfd -liberty -lz -# wpa_supplicant depends on strong random number generation being available -# from the operating system. os_get_random() function is used to fetch random -# data when needed, e.g., for key generation. On Linux and BSD systems, this -# works by reading /dev/urandom. It should be noted that the OS entropy pool -# needs to be properly initialized before wpa_supplicant is started. This is -# important especially on embedded devices that do not have a hardware random -# number generator and may by default start up with minimal entropy available -# for random number generation. -# -# As a safety net, wpa_supplicant is by default trying to internally collect -# additional entropy for generating random data to mix in with the data fetched -# from the OS. This by itself is not considered to be very strong, but it may -# help in cases where the system pool is not initialized properly. However, it -# is very strongly recommended that the system pool is initialized with enough -# entropy either by using hardware assisted random number generator or by -# storing state over device reboots. -# -# wpa_supplicant can be configured to maintain its own entropy store over -# restarts to enhance random number generation. This is not perfect, but it is -# much more secure than using the same sequence of random numbers after every -# reboot. This can be enabled with -e command line option. The -# specified file needs to be readable and writable by wpa_supplicant. -# -# If the os_get_random() is known to provide strong random data (e.g., on -# Linux/BSD, the board in question is known to have reliable source of random -# data from /dev/urandom), the internal wpa_supplicant random pool can be -# disabled. This will save some in binary size and CPU use. However, this -# should only be considered for builds that are known to be used on devices -# that meet the requirements described above. CONFIG_NO_RANDOM_POOL=y +NEED_80211_COMMON=y -# IEEE 802.11n (High Throughput) support (mainly for AP mode) -#CONFIG_IEEE80211N=y - -# IEEE 802.11ac (Very High Throughput) support (mainly for AP mode) -# (depends on CONFIG_IEEE80211N) -#CONFIG_IEEE80211AC=y - -# Wireless Network Management (IEEE Std 802.11v-2011) -# Note: This is experimental and not complete implementation. -#CONFIG_WNM=y - -# Interworking (IEEE 802.11u) -# This can be used to enable functionality to improve interworking with -# external networks (GAS/ANQP to learn more about the networks and network -# selection based on available credentials). -#CONFIG_INTERWORKING=y - -# Hotspot 2.0 -#CONFIG_HS20=y - -# Enable interface matching in wpa_supplicant -#CONFIG_MATCH_IFACE=y - -# Disable roaming in wpa_supplicant -#CONFIG_NO_ROAMING=y - -# AP mode operations with wpa_supplicant -# This can be used for controlling AP mode operations with wpa_supplicant. It -# should be noted that this is mainly aimed at simple cases like -# WPA2-Personal while more complex configurations like WPA2-Enterprise with an -# external RADIUS server can be supported with hostapd. -CONFIG_AP=y - -# P2P (Wi-Fi Direct) -# This can be used to enable P2P support in wpa_supplicant. See README-P2P for -# more information on P2P operations. -CONFIG_P2P=y - -# Enable TDLS support -#CONFIG_TDLS=y - -# Wi-Fi Direct -# This can be used to enable Wi-Fi Direct extensions for P2P using an external -# program to control the additional information exchanges in the messages. -#CONFIG_WIFI_DISPLAY=y - -# Autoscan -# This can be used to enable automatic scan support in wpa_supplicant. -# See wpa_supplicant.conf for more information on autoscan usage. -# -# Enabling directly a module will enable autoscan support. -# For exponential module: -#CONFIG_AUTOSCAN_EXPONENTIAL=y -# For periodic module: -#CONFIG_AUTOSCAN_PERIODIC=y - -# Password (and passphrase, etc.) backend for external storage -# These optional mechanisms can be used to add support for storing passwords -# and other secrets in external (to wpa_supplicant) location. This allows, for -# example, operating system specific key storage to be used -# -# External password backend for testing purposes (developer use) -#CONFIG_EXT_PASSWORD_TEST=y - -# Enable Fast Session Transfer (FST) -#CONFIG_FST=y - -# Enable CLI commands for FST testing -#CONFIG_FST_TEST=y - -# OS X builds. This is only for building eapol_test. -#CONFIG_OSX=y - -# Automatic Channel Selection -# This will allow wpa_supplicant to pick the channel automatically when channel -# is set to "0". -# -# TODO: Extend parser to be able to parse "channel=acs_survey" as an alternative -# to "channel=0". This would enable us to eventually add other ACS algorithms in -# similar way. -# -# Automatic selection is currently only done through initialization, later on -# we hope to do background checks to keep us moving to more ideal channels as -# time goes by. ACS is currently only supported through the nl80211 driver and -# your driver must have survey dump capability that is filled by the driver -# during scanning. -# -# TODO: In analogy to hostapd be able to customize the ACS survey algorithm with -# a newly to create wpa_supplicant.conf variable acs_num_scans. -# -# Supported ACS drivers: -# * ath9k -# * ath5k -# * ath10k -# -# For more details refer to: -# http://wireless.kernel.org/en/users/Documentation/acs -#CONFIG_ACS=y - -# Support Multi Band Operation -#CONFIG_MBO=y - -# Fast Initial Link Setup (FILS) (IEEE 802.11ai) -# Note: This is an experimental and not yet complete implementation. This -# should not be enabled for production use. -#CONFIG_FILS=y -# FILS shared key authentication with PFS -#CONFIG_FILS_SK_PFS=y - -# Support RSN on IBSS networks -# This is needed to be able to use mode=1 network profile with proto=RSN and -# key_mgmt=WPA-PSK (i.e., full key management instead of WPA-None). CONFIG_IBSS_RSN=y -# External PMKSA cache control -# This can be used to enable control interface commands that allow the current -# PMKSA cache entries to be fetched and new entries to be added. -#CONFIG_PMKSA_CACHE_EXTERNAL=y - -# Mesh Networking (IEEE 802.11s) -#CONFIG_MESH=y - -# Background scanning modules -# These can be used to request wpa_supplicant to perform background scanning -# operations for roaming within an ESS (same SSID). See the bgscan parameter in -# the wpa_supplicant.conf file for more details. -# Periodic background scans based on signal strength -#CONFIG_BGSCAN_SIMPLE=y -# Learn channels used by the network and try to avoid bgscans on other -# channels (experimental) -#CONFIG_BGSCAN_LEARN=y - -# Opportunistic Wireless Encryption (OWE) -# Experimental implementation of draft-harkins-owe-07.txt -#CONFIG_OWE=y +CONFIG_P2P=y +CONFIG_AP=y diff --git a/package/network/services/hostapd/patches/001-Fix-race-condition-between-AssocResp-callback-and-4a.patch b/package/network/services/hostapd/patches/001-Fix-race-condition-between-AssocResp-callback-and-4a.patch new file mode 100644 index 000000000..bf54e9df3 --- /dev/null +++ b/package/network/services/hostapd/patches/001-Fix-race-condition-between-AssocResp-callback-and-4a.patch @@ -0,0 +1,83 @@ +From: Jouni Malinen +Date: Tue, 20 Dec 2016 01:30:09 +0200 +Subject: [PATCH] Fix race condition between AssocResp callback and 4addr event + +It is apparently possible for the NL80211_CMD_UNEXPECTED_4ADDR_FRAME +event to be delivered to hostapd before the NL80211_CMD_FRAME_TX_STATUS +event for (Re)Association Response frame. This resulted in the 4-address +WDS mode not getting enabled for a STA. This could occur in particular +when operating under heavy load and the STA is reconnecting to the same +AP in a sequence where Deauthentication frame is followed immediately by +Authentication frame and the driver event processing gets delayed due to +removal of the previous netdev taking time in the middle of this +sequence. + +Fix this by recording a pending item for 4-address WDS enabling if the +NL80211_CMD_UNEXPECTED_4ADDR_FRAME event would have been dropped due to +incompleted association and then process this pending item if the TX +status for the (Re)Association Response frame is received and it shows +that the frame was acknowledged. + +Signed-off-by: Jouni Malinen +--- + +--- a/src/ap/ieee802_11.c ++++ b/src/ap/ieee802_11.c +@@ -2634,6 +2634,8 @@ static void handle_assoc(struct hostapd_ + taxonomy_sta_info_assoc_req(hapd, sta, pos, left); + #endif /* CONFIG_TAXONOMY */ + ++ sta->pending_wds_enable = 0; ++ + fail: + /* + * In case of a successful response, add the station to the driver. +@@ -3248,6 +3250,14 @@ static void handle_assoc_cb(struct hosta + + hostapd_set_sta_flags(hapd, sta); + ++ if (!(sta->flags & WLAN_STA_WDS) && sta->pending_wds_enable) { ++ wpa_printf(MSG_DEBUG, "Enable 4-address WDS mode for STA " ++ MACSTR " based on pending request", ++ MAC2STR(sta->addr)); ++ sta->pending_wds_enable = 0; ++ sta->flags |= WLAN_STA_WDS; ++ } ++ + if (sta->flags & WLAN_STA_WDS) { + int ret; + char ifname_wds[IFNAMSIZ + 1]; +@@ -3512,10 +3522,22 @@ void ieee802_11_rx_from_unknown(struct h + struct sta_info *sta; + + sta = ap_get_sta(hapd, src); +- if (sta && (sta->flags & WLAN_STA_ASSOC)) { ++ if (sta && ++ ((sta->flags & WLAN_STA_ASSOC) || ++ ((sta->flags & WLAN_STA_ASSOC_REQ_OK) && wds))) { + if (!hapd->conf->wds_sta) + return; + ++ if ((sta->flags & (WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK)) == ++ WLAN_STA_ASSOC_REQ_OK) { ++ wpa_printf(MSG_DEBUG, ++ "Postpone 4-address WDS mode enabling for STA " ++ MACSTR " since TX status for AssocResp is not yet known", ++ MAC2STR(sta->addr)); ++ sta->pending_wds_enable = 1; ++ return; ++ } ++ + if (wds && !(sta->flags & WLAN_STA_WDS)) { + int ret; + char ifname_wds[IFNAMSIZ + 1]; +--- a/src/ap/sta_info.h ++++ b/src/ap/sta_info.h +@@ -115,6 +115,7 @@ struct sta_info { + unsigned int radius_das_match:1; + unsigned int ecsa_supported:1; + unsigned int added_unassoc:1; ++ unsigned int pending_wds_enable:1; + + u16 auth_alg; + diff --git a/package/network/services/hostapd/patches/002-Fix-duplicate-Reassociation-Request-frame-dropping.patch b/package/network/services/hostapd/patches/002-Fix-duplicate-Reassociation-Request-frame-dropping.patch new file mode 100644 index 000000000..6db1e9b34 --- /dev/null +++ b/package/network/services/hostapd/patches/002-Fix-duplicate-Reassociation-Request-frame-dropping.patch @@ -0,0 +1,36 @@ +From: Jouni Malinen +Date: Sat, 14 Jan 2017 01:04:31 +0200 +Subject: [PATCH] Fix duplicate Reassociation Request frame dropping + +Relational operators (==) have higher precedence than the ternary +conditional in C. The last_subtype check for association/reassociation +was broken due to incorrect assumption about the precedence. Fix this by +adding parenthesis around the ternary conditional. + +The previous implementation worked for Association Request frames by +accident since WLAN_FC_STYPE_ASSOC_REQ happens to have value 0 and when +the last receive frame was an Association Request frame, the +sta->last_subtype == reassoc check was true and non-zero +WLAN_FC_STYPE_REASSOC_REQ was interpreted as true. However, this was +broken for Reassociation Request frame. reassoc == 1 in that case could +have matched received Association Response frame (subtype == 1), but +those are not received in AP mode and as such, this did not break other +behavior apart from not being able to drop duplicated Reassociation +Request frames. + +Signed-off-by: Jouni Malinen +--- + +--- a/src/ap/ieee802_11.c ++++ b/src/ap/ieee802_11.c +@@ -2485,8 +2485,8 @@ static void handle_assoc(struct hostapd_ + if ((fc & WLAN_FC_RETRY) && + sta->last_seq_ctrl != WLAN_INVALID_MGMT_SEQ && + sta->last_seq_ctrl == seq_ctrl && +- sta->last_subtype == reassoc ? WLAN_FC_STYPE_REASSOC_REQ : +- WLAN_FC_STYPE_ASSOC_REQ) { ++ sta->last_subtype == (reassoc ? WLAN_FC_STYPE_REASSOC_REQ : ++ WLAN_FC_STYPE_ASSOC_REQ)) { + hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, + HOSTAPD_LEVEL_DEBUG, + "Drop repeated association frame seq_ctrl=0x%x", diff --git a/package/network/services/hostapd/patches/003-RSN-IBSS-Fix-TK-clearing-on-Authentication-frame-RX.patch b/package/network/services/hostapd/patches/003-RSN-IBSS-Fix-TK-clearing-on-Authentication-frame-RX.patch new file mode 100644 index 000000000..0a3c27f89 --- /dev/null +++ b/package/network/services/hostapd/patches/003-RSN-IBSS-Fix-TK-clearing-on-Authentication-frame-RX.patch @@ -0,0 +1,40 @@ +From: Jouni Malinen +Date: Sat, 14 Jan 2017 13:56:18 +0200 +Subject: [PATCH] RSN IBSS: Fix TK clearing on Authentication frame RX + +When wpa_supplicant was processing a received Authentication frame (seq +1) from a peer STA for which there was already a TK configured to the +driver, debug log claimed that the PTK gets cleared, but the actual +call to clear the key was actually dropped due to AUTH vs. SUPP set_key +selection. Fix this by explicitly clearing the TK in case it was set +and an Authentication frame (seq 1) is received. + +This fixes some cases where EAPOL-Key frames were sent encrypted using +the old key when a peer STA restarted itself and lost the key and had to +re-join the IBSS. Previously, that state required timing out the 4-way +handshake and Deauthentication frame exchange to recover. + +Signed-off-by: Jouni Malinen +--- + +--- a/wpa_supplicant/ibss_rsn.c ++++ b/wpa_supplicant/ibss_rsn.c +@@ -838,6 +838,18 @@ static void ibss_rsn_handle_auth_1_of_2( + MAC2STR(addr)); + + if (peer && ++ peer->authentication_status & (IBSS_RSN_SET_PTK_SUPP | ++ IBSS_RSN_SET_PTK_AUTH)) { ++ /* Clear the TK for this pair to allow recovery from the case ++ * where the peer STA has restarted and lost its key while we ++ * still have a pairwise key configured. */ ++ wpa_printf(MSG_DEBUG, "RSN: Clear pairwise key for peer " ++ MACSTR, MAC2STR(addr)); ++ wpa_drv_set_key(ibss_rsn->wpa_s, WPA_ALG_NONE, addr, 0, 0, ++ NULL, 0, NULL, 0); ++ } ++ ++ if (peer && + peer->authentication_status & IBSS_RSN_AUTH_EAPOL_BY_PEER) { + if (peer->own_auth_tx.sec) { + struct os_reltime now, diff; diff --git a/package/network/services/hostapd/patches/004-hostapd-Add-possibility-to-send-debug-messages-to-sy.patch b/package/network/services/hostapd/patches/004-hostapd-Add-possibility-to-send-debug-messages-to-sy.patch new file mode 100644 index 000000000..3417b5ac3 --- /dev/null +++ b/package/network/services/hostapd/patches/004-hostapd-Add-possibility-to-send-debug-messages-to-sy.patch @@ -0,0 +1,145 @@ +From cc3dae85bd694506cdea66ae532d452fb8716297 Mon Sep 17 00:00:00 2001 +From: Wojciech Dubowik +Date: Mon, 23 Jan 2017 13:55:04 +0100 +Subject: [PATCH] hostapd: Add possibility to send debug messages to syslog + +We can only send module specific messages to syslog and not debug +messages printed with wpa_printf. Add an extra command line parameter +'-s' to allow it. The feature is enabled with compile flag +CONFIG_DEBUG_SYSLOG as for wpa_supplicant and behaves in the same manner +as the wpa_supplicant -s command line argument. + +Signed-off-by: Wojciech Dubowik +--- + hostapd/Android.mk | 4 ++++ + hostapd/Makefile | 4 ++++ + hostapd/defconfig | 3 +++ + hostapd/main.c | 19 ++++++++++++++++++- + src/utils/wpa_debug.c | 2 +- + src/utils/wpa_debug.h | 3 +++ + 6 files changed, 33 insertions(+), 2 deletions(-) + +--- a/hostapd/Android.mk ++++ b/hostapd/Android.mk +@@ -952,6 +952,10 @@ ifdef CONFIG_NO_STDOUT_DEBUG + L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG + endif + ++ifdef CONFIG_DEBUG_SYSLOG ++L_CFLAGS += -DCONFIG_DEBUG_SYSLOG ++endif ++ + ifdef CONFIG_DEBUG_LINUX_TRACING + L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING + endif +--- a/hostapd/Makefile ++++ b/hostapd/Makefile +@@ -997,6 +997,10 @@ ifdef CONFIG_NO_STDOUT_DEBUG + CFLAGS += -DCONFIG_NO_STDOUT_DEBUG + endif + ++ifdef CONFIG_DEBUG_SYSLOG ++CFLAGS += -DCONFIG_DEBUG_SYSLOG ++endif ++ + ifdef CONFIG_DEBUG_LINUX_TRACING + CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING + endif +--- a/hostapd/defconfig ++++ b/hostapd/defconfig +@@ -166,6 +166,9 @@ CONFIG_IPV6=y + # Disabled by default. + #CONFIG_DEBUG_FILE=y + ++# Send debug messages to syslog instead of stdout ++#CONFIG_DEBUG_SYSLOG=y ++ + # Add support for sending all debug messages (regardless of debug verbosity) + # to the Linux kernel tracing facility. This helps debug the entire stack by + # making it easy to record everything happening from the driver up into the +--- a/hostapd/main.c ++++ b/hostapd/main.c +@@ -108,6 +108,10 @@ static void hostapd_logger_cb(void *ctx, + module_str ? module_str : "", + module_str ? ": " : "", txt); + ++#ifdef CONFIG_DEBUG_SYSLOG ++ if (wpa_debug_syslog) ++ conf_stdout = 0; ++#endif /* CONFIG_DEBUG_SYSLOG */ + if ((conf_stdout & module) && level >= conf_stdout_level) { + wpa_debug_print_timestamp(); + wpa_printf(MSG_INFO, "%s", format); +@@ -484,6 +488,9 @@ static void usage(void) + " (records all messages regardless of debug verbosity)\n" + #endif /* CONFIG_DEBUG_LINUX_TRACING */ + " -i list of interface names to use\n" ++#ifdef CONFIG_DEBUG_SYSLOG ++ " -s log output to syslog instead of stdout\n" ++#endif /* CONFIG_DEBUG_SYSLOG */ + " -S start all the interfaces synchronously\n" + " -t include timestamps in some debug messages\n" + " -v show hostapd version\n"); +@@ -661,7 +668,7 @@ int main(int argc, char *argv[]) + dl_list_init(&interfaces.global_ctrl_dst); + + for (;;) { +- c = getopt(argc, argv, "b:Bde:f:hi:KP:STtu:vg:G:"); ++ c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:vg:G:"); + if (c < 0) + break; + switch (c) { +@@ -718,6 +725,11 @@ int main(int argc, char *argv[]) + bss_config = tmp_bss; + bss_config[num_bss_configs++] = optarg; + break; ++#ifdef CONFIG_DEBUG_SYSLOG ++ case 's': ++ wpa_debug_syslog = 1; ++ break; ++#endif /* CONFIG_DEBUG_SYSLOG */ + case 'S': + start_ifaces_in_sync = 1; + break; +@@ -746,6 +758,10 @@ int main(int argc, char *argv[]) + wpa_debug_open_file(log_file); + else + wpa_debug_setup_stdout(); ++#ifdef CONFIG_DEBUG_SYSLOG ++ if (wpa_debug_syslog) ++ wpa_debug_open_syslog(); ++#endif /* CONFIG_DEBUG_SYSLOG */ + #ifdef CONFIG_DEBUG_LINUX_TRACING + if (enable_trace_dbg) { + int tret = wpa_debug_open_linux_tracing(); +@@ -882,6 +898,7 @@ int main(int argc, char *argv[]) + hostapd_global_deinit(pid_file, interfaces.eloop_initialized); + os_free(pid_file); + ++ wpa_debug_close_syslog(); + if (log_file) + wpa_debug_close_file(); + wpa_debug_close_linux_tracing(); +--- a/src/utils/wpa_debug.c ++++ b/src/utils/wpa_debug.c +@@ -13,7 +13,7 @@ + #ifdef CONFIG_DEBUG_SYSLOG + #include + +-static int wpa_debug_syslog = 0; ++int wpa_debug_syslog = 0; + #endif /* CONFIG_DEBUG_SYSLOG */ + + #ifdef CONFIG_DEBUG_LINUX_TRACING +--- a/src/utils/wpa_debug.h ++++ b/src/utils/wpa_debug.h +@@ -14,6 +14,9 @@ + extern int wpa_debug_level; + extern int wpa_debug_show_keys; + extern int wpa_debug_timestamp; ++#ifdef CONFIG_DEBUG_SYSLOG ++extern int wpa_debug_syslog; ++#endif /* CONFIG_DEBUG_SYSLOG */ + + /* Debugging function - conditional printf and hex dump. Driver wrappers can + * use these for debugging purposes. */ diff --git a/package/network/services/hostapd/patches/000-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch b/package/network/services/hostapd/patches/005-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch similarity index 84% rename from package/network/services/hostapd/patches/000-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch rename to package/network/services/hostapd/patches/005-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch index 14b2d7c71..2136bb9d4 100644 --- a/package/network/services/hostapd/patches/000-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch +++ b/package/network/services/hostapd/patches/005-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch @@ -21,7 +21,7 @@ Signed-off-by: Mathy Vanhoef --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -2522,6 +2522,7 @@ static int add_associated_sta(struct hos +@@ -2154,6 +2154,7 @@ static int add_associated_sta(struct hos { struct ieee80211_ht_capabilities ht_cap; struct ieee80211_vht_capabilities vht_cap; @@ -29,7 +29,7 @@ Signed-off-by: Mathy Vanhoef /* * Remove the STA entry to ensure the STA PS state gets cleared and -@@ -2529,9 +2530,18 @@ static int add_associated_sta(struct hos +@@ -2161,9 +2162,18 @@ static int add_associated_sta(struct hos * FT-over-the-DS, where a station re-associates back to the same AP but * skips the authentication flow, or if working with a driver that * does not support full AP client state. @@ -49,7 +49,7 @@ Signed-off-by: Mathy Vanhoef #ifdef CONFIG_IEEE80211N if (sta->flags & WLAN_STA_HT) -@@ -2554,11 +2564,11 @@ static int add_associated_sta(struct hos +@@ -2186,11 +2196,11 @@ static int add_associated_sta(struct hos sta->flags & WLAN_STA_VHT ? &vht_cap : NULL, sta->flags | WLAN_STA_ASSOC, sta->qosinfo, sta->vht_opmode, sta->p2p_ie ? 1 : 0, @@ -65,17 +65,17 @@ Signed-off-by: Mathy Vanhoef hostapd_drv_sta_remove(hapd, sta->addr); --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c -@@ -1783,6 +1783,9 @@ int wpa_auth_sm_event(struct wpa_state_m - #else /* CONFIG_FILS */ +@@ -1751,6 +1751,9 @@ int wpa_auth_sm_event(struct wpa_state_m + #else /* CONFIG_IEEE80211R_AP */ break; - #endif /* CONFIG_FILS */ + #endif /* CONFIG_IEEE80211R_AP */ + case WPA_DRV_STA_REMOVED: + sm->tk_already_set = FALSE; + return 0; } #ifdef CONFIG_IEEE80211R_AP -@@ -3922,6 +3925,14 @@ int wpa_auth_sta_wpa_version(struct wpa_ +@@ -3725,6 +3728,14 @@ int wpa_auth_sta_wpa_version(struct wpa_ } @@ -90,28 +90,9 @@ Signed-off-by: Mathy Vanhoef int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm, struct rsn_pmksa_cache_entry *entry) { ---- a/src/ap/wpa_auth.h -+++ b/src/ap/wpa_auth.h -@@ -300,7 +300,7 @@ void wpa_receive(struct wpa_authenticato - u8 *data, size_t data_len); - enum wpa_event { - WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH, -- WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_ASSOC_FILS -+ WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_ASSOC_FILS, WPA_DRV_STA_REMOVED - }; - void wpa_remove_ptk(struct wpa_state_machine *sm); - int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event); -@@ -313,6 +313,7 @@ int wpa_auth_pairwise_set(struct wpa_sta - int wpa_auth_get_pairwise(struct wpa_state_machine *sm); - int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm); - int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm); -+int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm); - int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm, - struct rsn_pmksa_cache_entry *entry); - struct rsn_pmksa_cache_entry * --- a/src/ap/wpa_auth_ft.c +++ b/src/ap/wpa_auth_ft.c -@@ -1937,6 +1937,14 @@ void wpa_ft_install_ptk(struct wpa_state +@@ -794,6 +794,14 @@ void wpa_ft_install_ptk(struct wpa_state return; } @@ -126,7 +107,7 @@ Signed-off-by: Mathy Vanhoef /* FIX: add STA entry to kernel/driver here? The set_key will fail * most likely without this.. At the moment, STA entry is added only * after association has been completed. This function will be called -@@ -1949,6 +1957,7 @@ void wpa_ft_install_ptk(struct wpa_state +@@ -806,6 +814,7 @@ void wpa_ft_install_ptk(struct wpa_state /* FIX: MLME-SetProtection.Request(TA, Tx_Rx) */ sm->pairwise_set = TRUE; @@ -134,7 +115,7 @@ Signed-off-by: Mathy Vanhoef } -@@ -2152,6 +2161,7 @@ static int wpa_ft_process_auth_req(struc +@@ -1002,6 +1011,7 @@ static int wpa_ft_process_auth_req(struc sm->pairwise = pairwise; sm->PTK_valid = TRUE; @@ -142,9 +123,28 @@ Signed-off-by: Mathy Vanhoef wpa_ft_install_ptk(sm); buflen = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) + +--- a/src/ap/wpa_auth.h ++++ b/src/ap/wpa_auth.h +@@ -268,7 +268,7 @@ void wpa_receive(struct wpa_authenticato + u8 *data, size_t data_len); + enum wpa_event { + WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH, +- WPA_REAUTH_EAPOL, WPA_ASSOC_FT ++ WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_DRV_STA_REMOVED + }; + void wpa_remove_ptk(struct wpa_state_machine *sm); + int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event); +@@ -281,6 +281,7 @@ int wpa_auth_pairwise_set(struct wpa_sta + int wpa_auth_get_pairwise(struct wpa_state_machine *sm); + int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm); + int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm); ++int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm); + int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm, + struct rsn_pmksa_cache_entry *entry); + struct rsn_pmksa_cache_entry * --- a/src/ap/wpa_auth_i.h +++ b/src/ap/wpa_auth_i.h -@@ -61,6 +61,7 @@ struct wpa_state_machine { +@@ -65,6 +65,7 @@ struct wpa_state_machine { struct wpa_ptk PTK; Boolean PTK_valid; Boolean pairwise_set; diff --git a/package/network/services/hostapd/patches/001-Prevent-reinstallation-of-an-already-in-use-group-ke.patch b/package/network/services/hostapd/patches/006-Prevent-reinstallation-of-an-already-in-use-group-ke.patch similarity index 91% rename from package/network/services/hostapd/patches/001-Prevent-reinstallation-of-an-already-in-use-group-ke.patch rename to package/network/services/hostapd/patches/006-Prevent-reinstallation-of-an-already-in-use-group-ke.patch index b283bf887..71c681e29 100644 --- a/package/network/services/hostapd/patches/001-Prevent-reinstallation-of-an-already-in-use-group-ke.patch +++ b/package/network/services/hostapd/patches/006-Prevent-reinstallation-of-an-already-in-use-group-ke.patch @@ -13,7 +13,7 @@ Signed-off-by: Mathy Vanhoef --- a/src/common/wpa_common.h +++ b/src/common/wpa_common.h -@@ -218,6 +218,17 @@ struct wpa_ptk { +@@ -207,6 +207,17 @@ struct wpa_ptk { size_t tk_len; }; @@ -33,7 +33,7 @@ Signed-off-by: Mathy Vanhoef * 00-50-f2:1 (OUI:OUI type) --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -800,6 +800,15 @@ static int wpa_supplicant_install_gtk(st +@@ -785,6 +785,15 @@ static int wpa_supplicant_install_gtk(st const u8 *_gtk = gd->gtk; u8 gtk_buf[32]; @@ -49,7 +49,7 @@ Signed-off-by: Mathy Vanhoef wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len); wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Installing GTK to the driver (keyidx=%d tx=%d len=%d)", -@@ -834,6 +843,9 @@ static int wpa_supplicant_install_gtk(st +@@ -819,6 +828,9 @@ static int wpa_supplicant_install_gtk(st } os_memset(gtk_buf, 0, sizeof(gtk_buf)); @@ -59,7 +59,7 @@ Signed-off-by: Mathy Vanhoef return 0; } -@@ -940,6 +952,48 @@ static int wpa_supplicant_pairwise_gtk(s +@@ -925,6 +937,48 @@ static int wpa_supplicant_pairwise_gtk(s } @@ -108,7 +108,7 @@ Signed-off-by: Mathy Vanhoef static int ieee80211w_set_keys(struct wpa_sm *sm, struct wpa_eapol_ie_parse *ie) { -@@ -950,30 +1004,14 @@ static int ieee80211w_set_keys(struct wp +@@ -935,30 +989,14 @@ static int ieee80211w_set_keys(struct wp if (ie->igtk) { size_t len; const struct wpa_igtk_kde *igtk; @@ -142,7 +142,7 @@ Signed-off-by: Mathy Vanhoef } return 0; -@@ -2491,7 +2529,7 @@ void wpa_sm_deinit(struct wpa_sm *sm) +@@ -2451,7 +2489,7 @@ void wpa_sm_deinit(struct wpa_sm *sm) */ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) { @@ -151,7 +151,7 @@ Signed-off-by: Mathy Vanhoef if (sm == NULL) return; -@@ -2517,7 +2555,7 @@ void wpa_sm_notify_assoc(struct wpa_sm * +@@ -2477,7 +2515,7 @@ void wpa_sm_notify_assoc(struct wpa_sm * /* Prepare for the next transition */ wpa_ft_prepare_auth_request(sm, NULL); @@ -160,7 +160,7 @@ Signed-off-by: Mathy Vanhoef } #endif /* CONFIG_IEEE80211R */ #ifdef CONFIG_FILS -@@ -2527,11 +2565,11 @@ void wpa_sm_notify_assoc(struct wpa_sm * +@@ -2487,11 +2525,11 @@ void wpa_sm_notify_assoc(struct wpa_sm * * AUTHENTICATED state to get the EAPOL port Authorized. */ wpa_supplicant_key_neg_complete(sm, sm->bssid, 1); @@ -174,7 +174,7 @@ Signed-off-by: Mathy Vanhoef /* * IEEE 802.11, 8.4.10: Delete PTK SA on (re)association if * this is not part of a Fast BSS Transition. -@@ -2541,6 +2579,10 @@ void wpa_sm_notify_assoc(struct wpa_sm * +@@ -2501,6 +2539,10 @@ void wpa_sm_notify_assoc(struct wpa_sm * os_memset(&sm->ptk, 0, sizeof(sm->ptk)); sm->tptk_set = 0; os_memset(&sm->tptk, 0, sizeof(sm->tptk)); @@ -185,7 +185,7 @@ Signed-off-by: Mathy Vanhoef } #ifdef CONFIG_TDLS -@@ -3117,6 +3159,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm) +@@ -3052,6 +3094,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm) os_memset(sm->pmk, 0, sizeof(sm->pmk)); os_memset(&sm->ptk, 0, sizeof(sm->ptk)); os_memset(&sm->tptk, 0, sizeof(sm->tptk)); @@ -196,7 +196,7 @@ Signed-off-by: Mathy Vanhoef #ifdef CONFIG_IEEE80211R os_memset(sm->xxkey, 0, sizeof(sm->xxkey)); os_memset(sm->pmk_r0, 0, sizeof(sm->pmk_r0)); -@@ -3189,29 +3235,11 @@ int wpa_wnmsleep_install_key(struct wpa_ +@@ -3124,29 +3170,11 @@ int wpa_wnmsleep_install_key(struct wpa_ os_memset(&gd, 0, sizeof(gd)); #ifdef CONFIG_IEEE80211W } else if (subelem_id == WNM_SLEEP_SUBELEM_IGTK) { diff --git a/package/network/services/hostapd/patches/002-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch b/package/network/services/hostapd/patches/007-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch similarity index 84% rename from package/network/services/hostapd/patches/002-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch rename to package/network/services/hostapd/patches/007-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch index 2093d25e9..650bf43e9 100644 --- a/package/network/services/hostapd/patches/002-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch +++ b/package/network/services/hostapd/patches/007-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch @@ -14,7 +14,7 @@ Signed-off-by: Jouni Malinen --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -795,14 +795,17 @@ struct wpa_gtk_data { +@@ -780,14 +780,17 @@ struct wpa_gtk_data { static int wpa_supplicant_install_gtk(struct wpa_sm *sm, const struct wpa_gtk_data *gd, @@ -35,7 +35,7 @@ Signed-off-by: Jouni Malinen wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)", gd->keyidx, gd->tx, gd->gtk_len); -@@ -843,8 +846,14 @@ static int wpa_supplicant_install_gtk(st +@@ -828,8 +831,14 @@ static int wpa_supplicant_install_gtk(st } os_memset(gtk_buf, 0, sizeof(gtk_buf)); @@ -52,7 +52,7 @@ Signed-off-by: Jouni Malinen return 0; } -@@ -938,7 +947,7 @@ static int wpa_supplicant_pairwise_gtk(s +@@ -923,7 +932,7 @@ static int wpa_supplicant_pairwise_gtk(s (wpa_supplicant_check_group_cipher(sm, sm->group_cipher, gtk_len, gtk_len, &gd.key_rsc_len, &gd.alg) || @@ -61,7 +61,7 @@ Signed-off-by: Jouni Malinen wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "RSN: Failed to install GTK"); os_memset(&gd, 0, sizeof(gd)); -@@ -954,14 +963,18 @@ static int wpa_supplicant_pairwise_gtk(s +@@ -939,14 +948,18 @@ static int wpa_supplicant_pairwise_gtk(s #ifdef CONFIG_IEEE80211W static int wpa_supplicant_install_igtk(struct wpa_sm *sm, @@ -83,7 +83,7 @@ Signed-off-by: Jouni Malinen wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)", keyidx); -@@ -986,8 +999,14 @@ static int wpa_supplicant_install_igtk(s +@@ -971,8 +984,14 @@ static int wpa_supplicant_install_igtk(s return -1; } @@ -100,7 +100,7 @@ Signed-off-by: Jouni Malinen return 0; } -@@ -1010,7 +1029,7 @@ static int ieee80211w_set_keys(struct wp +@@ -995,7 +1014,7 @@ static int ieee80211w_set_keys(struct wp return -1; igtk = (const struct wpa_igtk_kde *) ie->igtk; @@ -109,7 +109,7 @@ Signed-off-by: Jouni Malinen return -1; } -@@ -1659,7 +1678,7 @@ static void wpa_supplicant_process_1_of_ +@@ -1641,7 +1660,7 @@ static void wpa_supplicant_process_1_of_ if (wpa_supplicant_rsc_relaxation(sm, key->key_rsc)) key_rsc = null_rsc; @@ -118,7 +118,7 @@ Signed-off-by: Jouni Malinen wpa_supplicant_send_2_of_2(sm, key, ver, key_info) < 0) goto failed; os_memset(&gd, 0, sizeof(gd)); -@@ -2580,8 +2599,10 @@ void wpa_sm_notify_assoc(struct wpa_sm * +@@ -2540,8 +2559,10 @@ void wpa_sm_notify_assoc(struct wpa_sm * sm->tptk_set = 0; os_memset(&sm->tptk, 0, sizeof(sm->tptk)); os_memset(&sm->gtk, 0, sizeof(sm->gtk)); @@ -129,7 +129,7 @@ Signed-off-by: Jouni Malinen #endif /* CONFIG_IEEE80211W */ } -@@ -3160,8 +3181,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm) +@@ -3095,8 +3116,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm) os_memset(&sm->ptk, 0, sizeof(sm->ptk)); os_memset(&sm->tptk, 0, sizeof(sm->tptk)); os_memset(&sm->gtk, 0, sizeof(sm->gtk)); @@ -140,7 +140,7 @@ Signed-off-by: Jouni Malinen #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_IEEE80211R os_memset(sm->xxkey, 0, sizeof(sm->xxkey)); -@@ -3226,7 +3249,7 @@ int wpa_wnmsleep_install_key(struct wpa_ +@@ -3161,7 +3184,7 @@ int wpa_wnmsleep_install_key(struct wpa_ wpa_hexdump_key(MSG_DEBUG, "Install GTK (WNM SLEEP)", gd.gtk, gd.gtk_len); @@ -149,7 +149,7 @@ Signed-off-by: Jouni Malinen os_memset(&gd, 0, sizeof(gd)); wpa_printf(MSG_DEBUG, "Failed to install the GTK in " "WNM mode"); -@@ -3238,7 +3261,7 @@ int wpa_wnmsleep_install_key(struct wpa_ +@@ -3173,7 +3196,7 @@ int wpa_wnmsleep_install_key(struct wpa_ const struct wpa_igtk_kde *igtk; igtk = (const struct wpa_igtk_kde *) (buf + 2); @@ -158,15 +158,6 @@ Signed-off-by: Jouni Malinen return -1; #endif /* CONFIG_IEEE80211W */ } else { -@@ -4121,7 +4144,7 @@ int fils_process_assoc_resp(struct wpa_s - os_memcpy(gd.gtk, kde.gtk + 2, kde.gtk_len - 2); - - wpa_printf(MSG_DEBUG, "FILS: Set GTK to driver"); -- if (wpa_supplicant_install_gtk(sm, &gd, elems.key_delivery) < 0) { -+ if (wpa_supplicant_install_gtk(sm, &gd, elems.key_delivery, 0) < 0) { - wpa_printf(MSG_DEBUG, "FILS: Failed to set GTK"); - goto fail; - } --- a/src/rsn_supp/wpa_i.h +++ b/src/rsn_supp/wpa_i.h @@ -32,8 +32,10 @@ struct wpa_sm { diff --git a/package/network/services/hostapd/patches/003-Prevent-installation-of-an-all-zero-TK.patch b/package/network/services/hostapd/patches/008-Prevent-installation-of-an-all-zero-TK.patch similarity index 76% rename from package/network/services/hostapd/patches/003-Prevent-installation-of-an-all-zero-TK.patch rename to package/network/services/hostapd/patches/008-Prevent-installation-of-an-all-zero-TK.patch index 30679e25c..e0f1773f2 100644 --- a/package/network/services/hostapd/patches/003-Prevent-installation-of-an-all-zero-TK.patch +++ b/package/network/services/hostapd/patches/008-Prevent-installation-of-an-all-zero-TK.patch @@ -17,7 +17,7 @@ Signed-off-by: Mathy Vanhoef --- a/src/common/wpa_common.h +++ b/src/common/wpa_common.h -@@ -216,6 +216,7 @@ struct wpa_ptk { +@@ -205,6 +205,7 @@ struct wpa_ptk { size_t kck_len; size_t kek_len; size_t tk_len; @@ -27,7 +27,7 @@ Signed-off-by: Mathy Vanhoef struct wpa_gtk { --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -594,7 +594,6 @@ static void wpa_supplicant_process_1_of_ +@@ -581,7 +581,6 @@ static void wpa_supplicant_process_1_of_ os_memset(buf, 0, sizeof(buf)); } sm->tptk_set = 1; @@ -35,7 +35,7 @@ Signed-off-by: Mathy Vanhoef kde = sm->assoc_wpa_ie; kde_len = sm->assoc_wpa_ie_len; -@@ -701,7 +700,7 @@ static int wpa_supplicant_install_ptk(st +@@ -686,7 +685,7 @@ static int wpa_supplicant_install_ptk(st enum wpa_alg alg; const u8 *key_rsc; @@ -44,7 +44,7 @@ Signed-off-by: Mathy Vanhoef wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Do not re-install same PTK to the driver"); return 0; -@@ -745,7 +744,7 @@ static int wpa_supplicant_install_ptk(st +@@ -730,7 +729,7 @@ static int wpa_supplicant_install_ptk(st /* TK is not needed anymore in supplicant */ os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN); @@ -53,14 +53,6 @@ Signed-off-by: Mathy Vanhoef if (sm->wpa_ptk_rekey) { eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL); -@@ -4172,6 +4171,7 @@ int fils_process_assoc_resp(struct wpa_s - * takes care of association frame encryption/decryption. */ - /* TK is not needed anymore in supplicant */ - os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN); -+ sm->ptk.installed = 1; - - /* FILS HLP Container */ - fils_process_hlp_container(sm, ie_start, end - ie_start); --- a/src/rsn_supp/wpa_i.h +++ b/src/rsn_supp/wpa_i.h @@ -24,7 +24,6 @@ struct wpa_sm { diff --git a/package/network/services/hostapd/patches/004-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch b/package/network/services/hostapd/patches/009-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch similarity index 94% rename from package/network/services/hostapd/patches/004-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch rename to package/network/services/hostapd/patches/009-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch index 6f28e7431..8d9bd42ac 100644 --- a/package/network/services/hostapd/patches/004-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch +++ b/package/network/services/hostapd/patches/009-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch @@ -16,7 +16,7 @@ Signed-off-by: Jouni Malinen --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c -@@ -1951,6 +1951,21 @@ SM_STATE(WPA_PTK, AUTHENTICATION2) +@@ -1912,6 +1912,21 @@ SM_STATE(WPA_PTK, AUTHENTICATION2) } @@ -38,7 +38,7 @@ Signed-off-by: Jouni Malinen SM_STATE(WPA_PTK, INITPMK) { u8 msk[2 * PMK_LEN]; -@@ -3116,9 +3131,12 @@ SM_STEP(WPA_PTK) +@@ -2932,9 +2947,12 @@ SM_STEP(WPA_PTK) SM_ENTER(WPA_PTK, AUTHENTICATION); else if (sm->ReAuthenticationRequest) SM_ENTER(WPA_PTK, AUTHENTICATION2); diff --git a/package/network/services/hostapd/patches/005-TDLS-Reject-TPK-TK-reconfiguration.patch b/package/network/services/hostapd/patches/010-TDLS-Reject-TPK-TK-reconfiguration.patch similarity index 97% rename from package/network/services/hostapd/patches/005-TDLS-Reject-TPK-TK-reconfiguration.patch rename to package/network/services/hostapd/patches/010-TDLS-Reject-TPK-TK-reconfiguration.patch index 2ca05dd64..d6e500b11 100644 --- a/package/network/services/hostapd/patches/005-TDLS-Reject-TPK-TK-reconfiguration.patch +++ b/package/network/services/hostapd/patches/010-TDLS-Reject-TPK-TK-reconfiguration.patch @@ -67,7 +67,7 @@ Signed-off-by: Jouni Malinen return 0; } -@@ -695,7 +713,7 @@ static void wpa_tdls_peer_clear(struct w +@@ -696,7 +714,7 @@ static void wpa_tdls_peer_clear(struct w peer->cipher = 0; peer->qos_info = 0; peer->wmm_capable = 0; @@ -76,7 +76,7 @@ Signed-off-by: Jouni Malinen peer->chan_switch_enabled = 0; os_memset(&peer->tpk, 0, sizeof(peer->tpk)); os_memset(peer->inonce, 0, WPA_NONCE_LEN); -@@ -1158,6 +1176,7 @@ skip_rsnie: +@@ -1159,6 +1177,7 @@ skip_rsnie: wpa_tdls_peer_free(sm, peer); return -1; } diff --git a/package/network/services/hostapd/patches/006-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch b/package/network/services/hostapd/patches/011-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch similarity index 100% rename from package/network/services/hostapd/patches/006-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch rename to package/network/services/hostapd/patches/011-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch diff --git a/package/network/services/hostapd/patches/007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch b/package/network/services/hostapd/patches/012-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch similarity index 84% rename from package/network/services/hostapd/patches/007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch rename to package/network/services/hostapd/patches/012-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch index 7712ce519..12904faf1 100644 --- a/package/network/services/hostapd/patches/007-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch +++ b/package/network/services/hostapd/patches/012-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch @@ -15,16 +15,16 @@ Signed-off-by: Jouni Malinen --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -2637,6 +2637,9 @@ void wpa_sm_notify_disassoc(struct wpa_s - #ifdef CONFIG_FILS - sm->fils_completed = 0; - #endif /* CONFIG_FILS */ +@@ -2568,6 +2568,9 @@ void wpa_sm_notify_assoc(struct wpa_sm * + #ifdef CONFIG_TDLS + wpa_tdls_assoc(sm); + #endif /* CONFIG_TDLS */ +#ifdef CONFIG_IEEE80211R + sm->ft_reassoc_completed = 0; +#endif /* CONFIG_IEEE80211R */ - /* Keys are not needed in the WPA state machine anymore */ - wpa_sm_drop_sa(sm); + #ifdef CONFIG_P2P + os_memset(sm->p2p_ip_addr, 0, sizeof(sm->p2p_ip_addr)); --- a/src/rsn_supp/wpa_ft.c +++ b/src/rsn_supp/wpa_ft.c @@ -153,6 +153,7 @@ static u8 * wpa_ft_gen_req_ies(struct wp @@ -35,7 +35,7 @@ Signed-off-by: Jouni Malinen buf_len = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) + 2 + sm->r0kh_id_len + ric_ies_len + 100; -@@ -687,6 +688,11 @@ int wpa_ft_validate_reassoc_resp(struct +@@ -681,6 +682,11 @@ int wpa_ft_validate_reassoc_resp(struct return -1; } @@ -47,7 +47,7 @@ Signed-off-by: Jouni Malinen if (wpa_ft_parse_ies(ies, ies_len, &parse) < 0) { wpa_printf(MSG_DEBUG, "FT: Failed to parse IEs"); return -1; -@@ -787,6 +793,8 @@ int wpa_ft_validate_reassoc_resp(struct +@@ -781,6 +787,8 @@ int wpa_ft_validate_reassoc_resp(struct return -1; } diff --git a/package/network/services/hostapd/patches/013-Add-hostapd-options-wpa_group_update_count-and-wpa_p.patch b/package/network/services/hostapd/patches/013-Add-hostapd-options-wpa_group_update_count-and-wpa_p.patch new file mode 100644 index 000000000..623c2be34 --- /dev/null +++ b/package/network/services/hostapd/patches/013-Add-hostapd-options-wpa_group_update_count-and-wpa_p.patch @@ -0,0 +1,305 @@ +From 41f140d38617e1fd3fa88c1667c1bce0cad79224 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=BCnther=20Kelleter?= +Date: Thu, 5 Jan 2017 17:00:33 +0100 +Subject: [PATCH] Add hostapd options wpa_group_update_count and + wpa_pairwise_update_count +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +wpa_group_update_count and wpa_pairwise_update_count can now be used to +set the GTK and PTK rekey retry limits (dot11RSNAConfigGroupUpdateCount +and dot11RSNAConfigPairwiseUpdateCount). Defaults set to current +hardcoded value (4). + +Some stations may suffer from frequent deauthentications due to GTK +rekey failures: EAPOL 1/2 frame is not answered during the total timeout +period of currently ~3.5 seconds. For example, a Galaxy S6 with Android +6.0.1 appears to go into power save mode for up to 5 seconds. Increasing +wpa_group_update_count to 6 fixed this issue. + +Signed-off-by: Günther Kelleter +--- + hostapd/config_file.c | 22 ++++++++++++++++++++++ + hostapd/hostapd.conf | 11 +++++++++++ + src/ap/ap_config.c | 2 ++ + src/ap/ap_config.h | 2 ++ + src/ap/wpa_auth.c | 37 ++++++++++++++++++------------------- + src/ap/wpa_auth.h | 2 ++ + src/ap/wpa_auth_glue.c | 2 ++ + src/ap/wpa_auth_i.h | 4 ++-- + wpa_supplicant/ibss_rsn.c | 2 ++ + wpa_supplicant/mesh_rsn.c | 2 ++ + 10 files changed, 65 insertions(+), 21 deletions(-) + +diff --git a/hostapd/config_file.c b/hostapd/config_file.c +index 8cfa198c3..02693a5b1 100644 +--- a/hostapd/config_file.c ++++ b/hostapd/config_file.c +@@ -2489,6 +2489,28 @@ static int hostapd_config_fill(struct hostapd_config *conf, + bss->wpa_gmk_rekey = atoi(pos); + } else if (os_strcmp(buf, "wpa_ptk_rekey") == 0) { + bss->wpa_ptk_rekey = atoi(pos); ++ } else if (os_strcmp(buf, "wpa_group_update_count") == 0) { ++ char *endp; ++ unsigned long val = strtoul(pos, &endp, 0); ++ ++ if (*endp || val < 1 || val > (u32) -1) { ++ wpa_printf(MSG_ERROR, ++ "Line %d: Invalid wpa_group_update_count=%lu; allowed range 1..4294967295", ++ line, val); ++ return 1; ++ } ++ bss->wpa_group_update_count = (u32) val; ++ } else if (os_strcmp(buf, "wpa_pairwise_update_count") == 0) { ++ char *endp; ++ unsigned long val = strtoul(pos, &endp, 0); ++ ++ if (*endp || val < 1 || val > (u32) -1) { ++ wpa_printf(MSG_ERROR, ++ "Line %d: Invalid wpa_pairwise_update_count=%lu; allowed range 1..4294967295", ++ line, val); ++ return 1; ++ } ++ bss->wpa_pairwise_update_count = (u32) val; + } else if (os_strcmp(buf, "wpa_passphrase") == 0) { + int len = os_strlen(pos); + if (len < 8 || len > 63) { +diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf +index 314f3842b..1fb1bd987 100644 +--- a/hostapd/hostapd.conf ++++ b/hostapd/hostapd.conf +@@ -1221,6 +1221,11 @@ own_ip_addr=127.0.0.1 + # (dot11RSNAConfigGroupRekeyStrict) + #wpa_strict_rekey=1 + ++# The number of times EAPOL-Key Message 1/2 in the RSN Group Key Handshake is ++#retried per GTK Handshake attempt. (dot11RSNAConfigGroupUpdateCount) ++# Range 1..4294967295; default: 4 ++#wpa_group_update_count=4 ++ + # Time interval for rekeying GMK (master key used internally to generate GTKs + # (in seconds). + #wpa_gmk_rekey=86400 +@@ -1229,6 +1234,12 @@ own_ip_addr=127.0.0.1 + # PTK to mitigate some attacks against TKIP deficiencies. + #wpa_ptk_rekey=600 + ++# The number of times EAPOL-Key Message 1/4 and Message 3/4 in the RSN 4-Way ++# Handshake are retried per 4-Way Handshake attempt. ++# (dot11RSNAConfigPairwiseUpdateCount) ++# Range 1..4294967295; default: 4 ++#wpa_pairwise_update_count=4 ++ + # Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up + # roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN + # authentication and key handshake before actually associating with a new AP. +diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c +index c2b80ad97..9abcab7fb 100644 +--- a/src/ap/ap_config.c ++++ b/src/ap/ap_config.c +@@ -56,6 +56,8 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss) + + bss->wpa_group_rekey = 600; + bss->wpa_gmk_rekey = 86400; ++ bss->wpa_group_update_count = 4; ++ bss->wpa_pairwise_update_count = 4; + bss->wpa_key_mgmt = WPA_KEY_MGMT_PSK; + bss->wpa_pairwise = WPA_CIPHER_TKIP; + bss->wpa_group = WPA_CIPHER_TKIP; +diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h +index 31b1e7762..7495dc96f 100644 +--- a/src/ap/ap_config.h ++++ b/src/ap/ap_config.h +@@ -330,6 +330,8 @@ struct hostapd_bss_config { + int wpa_strict_rekey; + int wpa_gmk_rekey; + int wpa_ptk_rekey; ++ u32 wpa_group_update_count; ++ u32 wpa_pairwise_update_count; + int rsn_pairwise; + int rsn_preauth; + char *rsn_preauth_interfaces; +diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c +index 0bd901fbf..8c082f426 100644 +--- a/src/ap/wpa_auth.c ++++ b/src/ap/wpa_auth.c +@@ -60,8 +60,6 @@ static void wpa_group_put(struct wpa_authenticator *wpa_auth, + struct wpa_group *group); + static u8 * ieee80211w_kde_add(struct wpa_state_machine *sm, u8 *pos); + +-static const u32 dot11RSNAConfigGroupUpdateCount = 4; +-static const u32 dot11RSNAConfigPairwiseUpdateCount = 4; + static const u32 eapol_key_timeout_first = 100; /* ms */ + static const u32 eapol_key_timeout_subseq = 1000; /* ms */ + static const u32 eapol_key_timeout_first_group = 500; /* ms */ +@@ -1623,7 +1621,7 @@ static void wpa_send_eapol(struct wpa_authenticator *wpa_auth, + { + int timeout_ms; + int pairwise = key_info & WPA_KEY_INFO_KEY_TYPE; +- int ctr; ++ u32 ctr; + + if (sm == NULL) + return; +@@ -1640,7 +1638,7 @@ static void wpa_send_eapol(struct wpa_authenticator *wpa_auth, + if (pairwise && ctr == 1 && !(key_info & WPA_KEY_INFO_MIC)) + sm->pending_1_of_4_timeout = 1; + wpa_printf(MSG_DEBUG, "WPA: Use EAPOL-Key timeout of %u ms (retry " +- "counter %d)", timeout_ms, ctr); ++ "counter %u)", timeout_ms, ctr); + eloop_register_timeout(timeout_ms / 1000, (timeout_ms % 1000) * 1000, + wpa_send_eapol_timeout, wpa_auth, sm); + } +@@ -2002,7 +2000,7 @@ SM_STATE(WPA_PTK, PTKSTART) + sm->alt_snonce_valid = FALSE; + + sm->TimeoutCtr++; +- if (sm->TimeoutCtr > (int) dot11RSNAConfigPairwiseUpdateCount) { ++ if (sm->TimeoutCtr > sm->wpa_auth->conf.wpa_pairwise_update_count) { + /* No point in sending the EAPOL-Key - we will disconnect + * immediately following this. */ + return; +@@ -2693,7 +2691,7 @@ SM_STATE(WPA_PTK, PTKINITNEGOTIATING) + sm->TimeoutEvt = FALSE; + + sm->TimeoutCtr++; +- if (sm->TimeoutCtr > (int) dot11RSNAConfigPairwiseUpdateCount) { ++ if (sm->TimeoutCtr > sm->wpa_auth->conf.wpa_pairwise_update_count) { + /* No point in sending the EAPOL-Key - we will disconnect + * immediately following this. */ + return; +@@ -2988,11 +2986,12 @@ SM_STEP(WPA_PTK) + sm->EAPOLKeyPairwise) + SM_ENTER(WPA_PTK, PTKCALCNEGOTIATING); + else if (sm->TimeoutCtr > +- (int) dot11RSNAConfigPairwiseUpdateCount) { ++ sm->wpa_auth->conf.wpa_pairwise_update_count) { + wpa_auth->dot11RSNA4WayHandshakeFailures++; +- wpa_auth_vlogger(sm->wpa_auth, sm->addr, LOGGER_DEBUG, +- "PTKSTART: Retry limit %d reached", +- dot11RSNAConfigPairwiseUpdateCount); ++ wpa_auth_vlogger( ++ sm->wpa_auth, sm->addr, LOGGER_DEBUG, ++ "PTKSTART: Retry limit %u reached", ++ sm->wpa_auth->conf.wpa_pairwise_update_count); + SM_ENTER(WPA_PTK, DISCONNECT); + } else if (sm->TimeoutEvt) + SM_ENTER(WPA_PTK, PTKSTART); +@@ -3016,12 +3015,12 @@ SM_STEP(WPA_PTK) + sm->EAPOLKeyPairwise && sm->MICVerified) + SM_ENTER(WPA_PTK, PTKINITDONE); + else if (sm->TimeoutCtr > +- (int) dot11RSNAConfigPairwiseUpdateCount) { ++ sm->wpa_auth->conf.wpa_pairwise_update_count) { + wpa_auth->dot11RSNA4WayHandshakeFailures++; +- wpa_auth_vlogger(sm->wpa_auth, sm->addr, LOGGER_DEBUG, +- "PTKINITNEGOTIATING: Retry limit %d " +- "reached", +- dot11RSNAConfigPairwiseUpdateCount); ++ wpa_auth_vlogger( ++ sm->wpa_auth, sm->addr, LOGGER_DEBUG, ++ "PTKINITNEGOTIATING: Retry limit %u reached", ++ sm->wpa_auth->conf.wpa_pairwise_update_count); + SM_ENTER(WPA_PTK, DISCONNECT); + } else if (sm->TimeoutEvt) + SM_ENTER(WPA_PTK, PTKINITNEGOTIATING); +@@ -3056,7 +3055,7 @@ SM_STATE(WPA_PTK_GROUP, REKEYNEGOTIATING) + SM_ENTRY_MA(WPA_PTK_GROUP, REKEYNEGOTIATING, wpa_ptk_group); + + sm->GTimeoutCtr++; +- if (sm->GTimeoutCtr > (int) dot11RSNAConfigGroupUpdateCount) { ++ if (sm->GTimeoutCtr > sm->wpa_auth->conf.wpa_group_update_count) { + /* No point in sending the EAPOL-Key - we will disconnect + * immediately following this. */ + return; +@@ -3154,7 +3153,7 @@ SM_STEP(WPA_PTK_GROUP) + !sm->EAPOLKeyPairwise && sm->MICVerified) + SM_ENTER(WPA_PTK_GROUP, REKEYESTABLISHED); + else if (sm->GTimeoutCtr > +- (int) dot11RSNAConfigGroupUpdateCount) ++ sm->wpa_auth->conf.wpa_group_update_count) + SM_ENTER(WPA_PTK_GROUP, KEYERROR); + else if (sm->TimeoutEvt) + SM_ENTER(WPA_PTK_GROUP, REKEYNEGOTIATING); +@@ -3614,8 +3613,8 @@ int wpa_get_mib(struct wpa_authenticator *wpa_auth, char *buf, size_t buflen) + "dot11RSNAConfigNumberOfGTKSAReplayCounters=0\n", + RSN_VERSION, + !!wpa_auth->conf.wpa_strict_rekey, +- dot11RSNAConfigGroupUpdateCount, +- dot11RSNAConfigPairwiseUpdateCount, ++ wpa_auth->conf.wpa_group_update_count, ++ wpa_auth->conf.wpa_pairwise_update_count, + wpa_cipher_key_len(wpa_auth->conf.wpa_group) * 8, + dot11RSNAConfigPMKLifetime, + dot11RSNAConfigPMKReauthThreshold, +diff --git a/src/ap/wpa_auth.h b/src/ap/wpa_auth.h +index 9cbe3889b..0920a169d 100644 +--- a/src/ap/wpa_auth.h ++++ b/src/ap/wpa_auth.h +@@ -144,6 +144,8 @@ struct wpa_auth_config { + int wpa_strict_rekey; + int wpa_gmk_rekey; + int wpa_ptk_rekey; ++ u32 wpa_group_update_count; ++ u32 wpa_pairwise_update_count; + int rsn_pairwise; + int rsn_preauth; + int eapol_version; +diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c +index 22518a1f1..394f77a66 100644 +--- a/src/ap/wpa_auth_glue.c ++++ b/src/ap/wpa_auth_glue.c +@@ -41,6 +41,8 @@ static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf, + wconf->wpa_strict_rekey = conf->wpa_strict_rekey; + wconf->wpa_gmk_rekey = conf->wpa_gmk_rekey; + wconf->wpa_ptk_rekey = conf->wpa_ptk_rekey; ++ wconf->wpa_group_update_count = conf->wpa_group_update_count; ++ wconf->wpa_pairwise_update_count = conf->wpa_pairwise_update_count; + wconf->rsn_pairwise = conf->rsn_pairwise; + wconf->rsn_preauth = conf->rsn_preauth; + wconf->eapol_version = conf->eapol_version; +diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h +index 065a624ad..cda2c5065 100644 +--- a/src/ap/wpa_auth_i.h ++++ b/src/ap/wpa_auth_i.h +@@ -48,8 +48,8 @@ struct wpa_state_machine { + Boolean AuthenticationRequest; + Boolean ReAuthenticationRequest; + Boolean Disconnect; +- int TimeoutCtr; +- int GTimeoutCtr; ++ u32 TimeoutCtr; ++ u32 GTimeoutCtr; + Boolean TimeoutEvt; + Boolean EAPOLKeyReceived; + Boolean EAPOLKeyPairwise; +diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c +index 521a692ba..954061ae4 100644 +--- a/wpa_supplicant/ibss_rsn.c ++++ b/wpa_supplicant/ibss_rsn.c +@@ -428,6 +428,8 @@ static int ibss_rsn_auth_init_group(struct ibss_rsn *ibss_rsn, + conf.wpa_group = WPA_CIPHER_CCMP; + conf.eapol_version = 2; + conf.wpa_group_rekey = ssid->group_rekey ? ssid->group_rekey : 600; ++ conf.wpa_group_update_count = 4; ++ conf.wpa_pairwise_update_count = 4; + + ibss_rsn->auth_group = wpa_init(own_addr, &conf, &cb, ibss_rsn); + if (ibss_rsn->auth_group == NULL) { +diff --git a/wpa_supplicant/mesh_rsn.c b/wpa_supplicant/mesh_rsn.c +index 33040f30b..628382cbf 100644 +--- a/wpa_supplicant/mesh_rsn.c ++++ b/wpa_supplicant/mesh_rsn.c +@@ -158,6 +158,8 @@ static int __mesh_rsn_auth_init(struct mesh_rsn *rsn, const u8 *addr, + conf.wpa_group = rsn->group_cipher; + conf.eapol_version = 0; + conf.wpa_group_rekey = -1; ++ conf.wpa_group_update_count = 4; ++ conf.wpa_pairwise_update_count = 4; + #ifdef CONFIG_IEEE80211W + conf.ieee80211w = ieee80211w; + if (ieee80211w != NO_MGMT_FRAME_PROTECTION) +-- +2.13.6 + diff --git a/package/network/services/hostapd/patches/008-WPA-Extra-defense-against-PTK-reinstalls-in-4-way-ha.patch b/package/network/services/hostapd/patches/014-WPA-Extra-defense-against-PTK-reinstalls-in-4-way-ha.patch similarity index 100% rename from package/network/services/hostapd/patches/008-WPA-Extra-defense-against-PTK-reinstalls-in-4-way-ha.patch rename to package/network/services/hostapd/patches/014-WPA-Extra-defense-against-PTK-reinstalls-in-4-way-ha.patch diff --git a/package/network/services/hostapd/patches/009-Clear-PMK-length-and-check-for-this-when-deriving-PT.patch b/package/network/services/hostapd/patches/015-Clear-PMK-length-and-check-for-this-when-deriving-PT.patch similarity index 100% rename from package/network/services/hostapd/patches/009-Clear-PMK-length-and-check-for-this-when-deriving-PT.patch rename to package/network/services/hostapd/patches/015-Clear-PMK-length-and-check-for-this-when-deriving-PT.patch diff --git a/package/network/services/hostapd/patches/010-Optional-AP-side-workaround-for-key-reinstallation-a.patch b/package/network/services/hostapd/patches/016-Optional-AP-side-workaround-for-key-reinstallation-a.patch similarity index 90% rename from package/network/services/hostapd/patches/010-Optional-AP-side-workaround-for-key-reinstallation-a.patch rename to package/network/services/hostapd/patches/016-Optional-AP-side-workaround-for-key-reinstallation-a.patch index 19165cce2..e413521cd 100644 --- a/package/network/services/hostapd/patches/010-Optional-AP-side-workaround-for-key-reinstallation-a.patch +++ b/package/network/services/hostapd/patches/016-Optional-AP-side-workaround-for-key-reinstallation-a.patch @@ -48,7 +48,7 @@ Signed-off-by: Jouni Malinen --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -2542,6 +2542,8 @@ static int hostapd_config_fill(struct ho +@@ -2515,6 +2515,8 @@ static int hostapd_config_fill(struct ho return 1; } bss->wpa_pairwise_update_count = (u32) val; @@ -59,17 +59,17 @@ Signed-off-by: Jouni Malinen if (len < 8 || len > 63) { --- a/hostapd/defconfig +++ b/hostapd/defconfig -@@ -372,3 +372,7 @@ CONFIG_IPV6=y - # Opportunistic Wireless Encryption (OWE) - # Experimental implementation of draft-harkins-owe-07.txt - #CONFIG_OWE=y +@@ -355,3 +355,7 @@ CONFIG_IPV6=y + # Include internal line edit mode in hostapd_cli. This can be used to provide + # limited command line editing and history support. + #CONFIG_WPA_CLI_EDIT=y + +# Override default value for the wpa_disable_eapol_key_retries configuration +# parameter. See that parameter in hostapd.conf for more details. +#CFLAGS += -DDEFAULT_WPA_DISABLE_EAPOL_KEY_RETRIES=1 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf -@@ -1315,6 +1315,30 @@ own_ip_addr=127.0.0.1 +@@ -1240,6 +1240,30 @@ own_ip_addr=127.0.0.1 # Range 1..4294967295; default: 4 #wpa_pairwise_update_count=4 @@ -102,7 +102,7 @@ Signed-off-by: Jouni Malinen # authentication and key handshake before actually associating with a new AP. --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c -@@ -37,6 +37,10 @@ static void hostapd_config_free_vlan(str +@@ -36,6 +36,10 @@ static void hostapd_config_free_vlan(str } @@ -113,7 +113,7 @@ Signed-off-by: Jouni Malinen void hostapd_config_defaults_bss(struct hostapd_bss_config *bss) { dl_list_init(&bss->anqp_elem); -@@ -58,6 +62,8 @@ void hostapd_config_defaults_bss(struct +@@ -57,6 +61,8 @@ void hostapd_config_defaults_bss(struct bss->wpa_gmk_rekey = 86400; bss->wpa_group_update_count = 4; bss->wpa_pairwise_update_count = 4; @@ -124,7 +124,7 @@ Signed-off-by: Jouni Malinen bss->wpa_group = WPA_CIPHER_TKIP; --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -333,6 +333,7 @@ struct hostapd_bss_config { +@@ -332,6 +332,7 @@ struct hostapd_bss_config { int wpa_ptk_rekey; u32 wpa_group_update_count; u32 wpa_pairwise_update_count; @@ -134,7 +134,7 @@ Signed-off-by: Jouni Malinen char *rsn_preauth_interfaces; --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c -@@ -65,6 +65,7 @@ static u8 * ieee80211w_kde_add(struct wp +@@ -63,6 +63,7 @@ static u8 * ieee80211w_kde_add(struct wp static const u32 eapol_key_timeout_first = 100; /* ms */ static const u32 eapol_key_timeout_subseq = 1000; /* ms */ static const u32 eapol_key_timeout_first_group = 500; /* ms */ @@ -142,7 +142,7 @@ Signed-off-by: Jouni Malinen /* TODO: make these configurable */ static const int dot11RSNAConfigPMKLifetime = 43200; -@@ -1653,6 +1654,9 @@ static void wpa_send_eapol(struct wpa_au +@@ -1629,6 +1630,9 @@ static void wpa_send_eapol(struct wpa_au eapol_key_timeout_first_group; else timeout_ms = eapol_key_timeout_subseq; @@ -152,7 +152,7 @@ Signed-off-by: Jouni Malinen if (pairwise && ctr == 1 && !(key_info & WPA_KEY_INFO_MIC)) sm->pending_1_of_4_timeout = 1; wpa_printf(MSG_DEBUG, "WPA: Use EAPOL-Key timeout of %u ms (retry " -@@ -2882,6 +2886,11 @@ SM_STATE(WPA_PTK, PTKINITNEGOTIATING) +@@ -2700,6 +2704,11 @@ SM_STATE(WPA_PTK, PTKINITNEGOTIATING) sm->TimeoutEvt = FALSE; sm->TimeoutCtr++; @@ -164,7 +164,7 @@ Signed-off-by: Jouni Malinen if (sm->TimeoutCtr > sm->wpa_auth->conf.wpa_pairwise_update_count) { /* No point in sending the EAPOL-Key - we will disconnect * immediately following this. */ -@@ -3220,7 +3229,9 @@ SM_STEP(WPA_PTK) +@@ -3027,7 +3036,9 @@ SM_STEP(WPA_PTK) sm->EAPOLKeyPairwise && sm->MICVerified) SM_ENTER(WPA_PTK, PTKINITDONE); else if (sm->TimeoutCtr > @@ -175,7 +175,7 @@ Signed-off-by: Jouni Malinen wpa_auth->dot11RSNA4WayHandshakeFailures++; wpa_auth_vlogger( sm->wpa_auth, sm->addr, LOGGER_DEBUG, -@@ -3260,6 +3271,11 @@ SM_STATE(WPA_PTK_GROUP, REKEYNEGOTIATING +@@ -3067,6 +3078,11 @@ SM_STATE(WPA_PTK_GROUP, REKEYNEGOTIATING SM_ENTRY_MA(WPA_PTK_GROUP, REKEYNEGOTIATING, wpa_ptk_group); sm->GTimeoutCtr++; @@ -187,7 +187,7 @@ Signed-off-by: Jouni Malinen if (sm->GTimeoutCtr > sm->wpa_auth->conf.wpa_group_update_count) { /* No point in sending the EAPOL-Key - we will disconnect * immediately following this. */ -@@ -3363,7 +3379,9 @@ SM_STEP(WPA_PTK_GROUP) +@@ -3165,7 +3181,9 @@ SM_STEP(WPA_PTK_GROUP) !sm->EAPOLKeyPairwise && sm->MICVerified) SM_ENTER(WPA_PTK_GROUP, REKEYESTABLISHED); else if (sm->GTimeoutCtr > @@ -200,7 +200,7 @@ Signed-off-by: Jouni Malinen SM_ENTER(WPA_PTK_GROUP, REKEYNEGOTIATING); --- a/src/ap/wpa_auth.h +++ b/src/ap/wpa_auth.h -@@ -165,6 +165,7 @@ struct wpa_auth_config { +@@ -146,6 +146,7 @@ struct wpa_auth_config { int wpa_ptk_rekey; u32 wpa_group_update_count; u32 wpa_pairwise_update_count; @@ -210,7 +210,7 @@ Signed-off-by: Jouni Malinen int eapol_version; --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c -@@ -45,6 +45,8 @@ static void hostapd_wpa_auth_conf(struct +@@ -42,6 +42,8 @@ static void hostapd_wpa_auth_conf(struct wconf->wpa_gmk_rekey = conf->wpa_gmk_rekey; wconf->wpa_ptk_rekey = conf->wpa_ptk_rekey; wconf->wpa_group_update_count = conf->wpa_group_update_count; diff --git a/package/network/services/hostapd/patches/011-Additional-consistentcy-checks-for-PTK-component-len.patch b/package/network/services/hostapd/patches/017-Additional-consistentcy-checks-for-PTK-component-len.patch similarity index 81% rename from package/network/services/hostapd/patches/011-Additional-consistentcy-checks-for-PTK-component-len.patch rename to package/network/services/hostapd/patches/017-Additional-consistentcy-checks-for-PTK-component-len.patch index 5cc2f7b17..9655b5cb1 100644 --- a/package/network/services/hostapd/patches/011-Additional-consistentcy-checks-for-PTK-component-len.patch +++ b/package/network/services/hostapd/patches/017-Additional-consistentcy-checks-for-PTK-component-len.patch @@ -15,9 +15,9 @@ Signed-off-by: Jouni Malinen --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c -@@ -100,6 +100,12 @@ int wpa_eapol_key_mic(const u8 *key, siz +@@ -93,6 +93,12 @@ int wpa_eapol_key_mic(const u8 *key, siz { - u8 hash[SHA512_MAC_LEN]; + u8 hash[SHA384_MAC_LEN]; + if (key_len == 0) { + wpa_printf(MSG_DEBUG, @@ -30,7 +30,7 @@ Signed-off-by: Jouni Malinen case WPA_KEY_INFO_TYPE_HMAC_MD5_RC4: --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -725,6 +725,11 @@ static int wpa_supplicant_install_ptk(st +@@ -710,6 +710,11 @@ static int wpa_supplicant_install_ptk(st alg = wpa_cipher_to_alg(sm->pairwise_cipher); keylen = wpa_cipher_key_len(sm->pairwise_cipher); @@ -42,7 +42,7 @@ Signed-off-by: Jouni Malinen rsclen = wpa_cipher_rsc_len(sm->pairwise_cipher); if (sm->proto == WPA_PROTO_RSN || sm->proto == WPA_PROTO_OSEN) { -@@ -745,6 +750,7 @@ static int wpa_supplicant_install_ptk(st +@@ -730,6 +735,7 @@ static int wpa_supplicant_install_ptk(st /* TK is not needed anymore in supplicant */ os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN); @@ -50,7 +50,7 @@ Signed-off-by: Jouni Malinen sm->ptk.installed = 1; if (sm->wpa_ptk_rekey) { -@@ -1717,9 +1723,10 @@ static int wpa_supplicant_verify_eapol_k +@@ -1699,9 +1705,10 @@ static int wpa_supplicant_verify_eapol_k os_memcpy(mic, key + 1, mic_len); if (sm->tptk_set) { os_memset(key + 1, 0, mic_len); @@ -64,7 +64,7 @@ Signed-off-by: Jouni Malinen wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, "WPA: Invalid EAPOL-Key MIC " "when using TPTK - ignoring TPTK"); -@@ -1742,9 +1749,10 @@ static int wpa_supplicant_verify_eapol_k +@@ -1724,9 +1731,10 @@ static int wpa_supplicant_verify_eapol_k if (!ok && sm->ptk_set) { os_memset(key + 1, 0, mic_len); @@ -78,7 +78,7 @@ Signed-off-by: Jouni Malinen wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, "WPA: Invalid EAPOL-Key MIC - " "dropping packet"); -@@ -4167,6 +4175,11 @@ int fils_process_assoc_resp(struct wpa_s +@@ -3689,6 +3697,11 @@ int fils_process_assoc_resp(struct wpa_s alg = wpa_cipher_to_alg(sm->pairwise_cipher); keylen = wpa_cipher_key_len(sm->pairwise_cipher); @@ -90,11 +90,3 @@ Signed-off-by: Jouni Malinen rsclen = wpa_cipher_rsc_len(sm->pairwise_cipher); wpa_hexdump_key(MSG_DEBUG, "FILS: Set TK to driver", sm->ptk.tk, keylen); -@@ -4183,6 +4196,7 @@ int fils_process_assoc_resp(struct wpa_s - * takes care of association frame encryption/decryption. */ - /* TK is not needed anymore in supplicant */ - os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN); -+ sm->ptk.tk_len = 0; - sm->ptk.installed = 1; - - /* FILS HLP Container */ diff --git a/package/network/services/hostapd/patches/012-Clear-BSSID-information-in-supplicant-state-machine-.patch b/package/network/services/hostapd/patches/018-Clear-BSSID-information-in-supplicant-state-machine-.patch similarity index 100% rename from package/network/services/hostapd/patches/012-Clear-BSSID-information-in-supplicant-state-machine-.patch rename to package/network/services/hostapd/patches/018-Clear-BSSID-information-in-supplicant-state-machine-.patch diff --git a/package/network/services/hostapd/patches/013-WNM-Ignore-WNM-Sleep-Mode-Request-in-wnm_sleep_mode-.patch b/package/network/services/hostapd/patches/019-WNM-Ignore-WNM-Sleep-Mode-Request-in-wnm_sleep_mode-.patch similarity index 100% rename from package/network/services/hostapd/patches/013-WNM-Ignore-WNM-Sleep-Mode-Request-in-wnm_sleep_mode-.patch rename to package/network/services/hostapd/patches/019-WNM-Ignore-WNM-Sleep-Mode-Request-in-wnm_sleep_mode-.patch diff --git a/package/network/services/hostapd/patches/100-daemonize_fix.patch b/package/network/services/hostapd/patches/100-daemonize_fix.patch index 43057ef9f..fad84669a 100644 --- a/package/network/services/hostapd/patches/100-daemonize_fix.patch +++ b/package/network/services/hostapd/patches/100-daemonize_fix.patch @@ -8,7 +8,7 @@ #ifdef ANDROID #include -@@ -182,59 +183,46 @@ int os_gmtime(os_time_t t, struct os_tm +@@ -179,59 +180,46 @@ int os_gmtime(os_time_t t, struct os_tm return 0; } diff --git a/package/network/services/hostapd/patches/110-no_eapol_fix.patch b/package/network/services/hostapd/patches/110-no_eapol_fix.patch index 3a48a7a95..5181721e3 100644 --- a/package/network/services/hostapd/patches/110-no_eapol_fix.patch +++ b/package/network/services/hostapd/patches/110-no_eapol_fix.patch @@ -1,6 +1,6 @@ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -265,9 +265,10 @@ void wpa_supplicant_cancel_auth_timeout( +@@ -259,9 +259,10 @@ void wpa_supplicant_cancel_auth_timeout( */ void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s) { diff --git a/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch b/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch index 4a5b63716..fdd5da9bf 100644 --- a/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch +++ b/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch @@ -1,6 +1,6 @@ --- a/src/l2_packet/l2_packet_linux.c +++ b/src/l2_packet/l2_packet_linux.c -@@ -340,8 +340,7 @@ struct l2_packet_data * l2_packet_init_b +@@ -337,8 +337,7 @@ struct l2_packet_data * l2_packet_init_b l2 = l2_packet_init(br_ifname, own_addr, protocol, rx_callback, rx_callback_ctx, l2_hdr); diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch index 0d289d53a..f0348201f 100644 --- a/package/network/services/hostapd/patches/200-multicall.patch +++ b/package/network/services/hostapd/patches/200-multicall.patch @@ -18,7 +18,7 @@ OBJS += ../src/ap/vlan_init.o OBJS += ../src/ap/vlan_ifconfig.o OBJS += ../src/ap/vlan.o -@@ -354,10 +356,14 @@ CFLAGS += -DCONFIG_MBO +@@ -330,10 +332,14 @@ CFLAGS += -DCONFIG_MBO OBJS += ../src/ap/mbo_ap.o endif @@ -36,7 +36,7 @@ LIBS += $(DRV_AP_LIBS) ifdef CONFIG_L2_PACKET -@@ -1204,6 +1210,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR) +@@ -1077,6 +1083,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR) BCHECK=../src/drivers/build.hostapd @@ -49,8 +49,8 @@ hostapd: $(BCHECK) $(OBJS) $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) @$(E) " LD " $@ -@@ -1248,6 +1260,12 @@ ifeq ($(CONFIG_TLS), linux) - HOBJS += ../src/crypto/crypto_linux.o +@@ -1118,6 +1130,12 @@ HOBJS += ../src/crypto/aes-internal.o + HOBJS += ../src/crypto/aes-internal-enc.o endif +dump_cflags: @@ -72,7 +72,7 @@ ifndef CONFIG_NO_GITVER # Add VERSION_STR postfix for builds from a git repository -@@ -357,7 +358,9 @@ endif +@@ -329,7 +330,9 @@ endif ifdef CONFIG_IBSS_RSN NEED_RSN_AUTHENTICATOR=y CFLAGS += -DCONFIG_IBSS_RSN @@ -82,7 +82,7 @@ OBJS += ibss_rsn.o endif -@@ -861,6 +864,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS +@@ -820,6 +823,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS LIBS += -ldl -rdynamic endif @@ -92,8 +92,8 @@ + endif endif - ifdef CONFIG_AP -@@ -868,9 +875,11 @@ NEED_EAP_COMMON=y + ifdef CONFIG_MACSEC +@@ -840,9 +847,11 @@ NEED_EAP_COMMON=y NEED_RSN_AUTHENTICATOR=y CFLAGS += -DCONFIG_AP OBJS += ap.o @@ -105,7 +105,7 @@ OBJS += ../src/ap/hostapd.o OBJS += ../src/ap/wpa_auth_glue.o OBJS += ../src/ap/utils.o -@@ -952,6 +961,12 @@ endif +@@ -910,6 +919,12 @@ endif ifdef CONFIG_HS20 OBJS += ../src/ap/hs20.o endif @@ -118,7 +118,7 @@ endif ifdef CONFIG_MBO -@@ -960,7 +975,9 @@ CFLAGS += -DCONFIG_MBO +@@ -918,7 +933,9 @@ CFLAGS += -DCONFIG_MBO endif ifdef NEED_RSN_AUTHENTICATOR @@ -128,7 +128,7 @@ NEED_AES_WRAP=y OBJS += ../src/ap/wpa_auth.o OBJS += ../src/ap/wpa_auth_ie.o -@@ -1835,6 +1852,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv) +@@ -1706,6 +1723,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv) $(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config @@ -141,7 +141,7 @@ wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS) @$(E) " LD " $@ -@@ -1937,6 +1960,12 @@ endif +@@ -1808,6 +1831,12 @@ endif -e 's|\@DBUS_INTERFACE\@|$(DBUS_INTERFACE)|g' $< >$@ @$(E) " sed" $< @@ -156,7 +156,7 @@ wpa_cli.exe: wpa_cli --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -5317,8 +5317,8 @@ union wpa_event_data { +@@ -4968,8 +4968,8 @@ union wpa_event_data { * Driver wrapper code should call this function whenever an event is received * from the driver. */ @@ -167,7 +167,7 @@ /** * wpa_supplicant_event_global - Report a driver event for wpa_supplicant -@@ -5330,7 +5330,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -4981,7 +4981,7 @@ void wpa_supplicant_event(void *ctx, enu * Same as wpa_supplicant_event(), but we search for the interface in * wpa_global. */ @@ -178,7 +178,7 @@ /* --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c -@@ -1375,8 +1375,8 @@ static void hostapd_event_dfs_cac_starte +@@ -1163,8 +1163,8 @@ static void hostapd_event_dfs_cac_starte #endif /* NEED_AP_MLME */ @@ -189,7 +189,7 @@ { struct hostapd_data *hapd = ctx; #ifndef CONFIG_NO_STDOUT_DEBUG -@@ -1590,7 +1590,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -1373,7 +1373,7 @@ void wpa_supplicant_event(void *ctx, enu } @@ -231,7 +231,7 @@ os_memset(&global, 0, sizeof(global)); --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -3709,8 +3709,8 @@ static void wpa_supplicant_event_assoc_a +@@ -3610,8 +3610,8 @@ static void wpa_supplicant_event_assoc_a } @@ -242,7 +242,16 @@ { struct wpa_supplicant *wpa_s = ctx; int resched; -@@ -4466,7 +4466,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -4315,7 +4315,7 @@ void wpa_supplicant_event(void *ctx, enu + #endif /* CONFIG_AP */ + break; + case EVENT_ACS_CHANNEL_SELECTED: +-#ifdef CONFIG_ACS ++#if defined(CONFIG_ACS) && defined(CONFIG_AP) + if (!wpa_s->ap_iface) + break; + hostapd_acs_channel_selected(wpa_s->ap_iface->bss[0], +@@ -4337,7 +4337,7 @@ void wpa_supplicant_event(void *ctx, enu } @@ -253,7 +262,7 @@ struct wpa_supplicant *wpa_s; --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -5457,7 +5457,6 @@ struct wpa_interface * wpa_supplicant_ma +@@ -5136,7 +5136,6 @@ struct wpa_interface * wpa_supplicant_ma return NULL; } @@ -261,7 +270,7 @@ /** * wpa_supplicant_match_existing - Match existing interfaces * @global: Pointer to global data from wpa_supplicant_init() -@@ -5494,6 +5493,11 @@ static int wpa_supplicant_match_existing +@@ -5173,6 +5172,11 @@ static int wpa_supplicant_match_existing #endif /* CONFIG_MATCH_IFACE */ @@ -273,7 +282,7 @@ /** * wpa_supplicant_add_iface - Add a new network interface -@@ -5750,6 +5754,8 @@ struct wpa_global * wpa_supplicant_init( +@@ -5428,6 +5432,8 @@ struct wpa_global * wpa_supplicant_init( #ifndef CONFIG_NO_WPA_MSG wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb); #endif /* CONFIG_NO_WPA_MSG */ @@ -296,9 +305,9 @@ #ifdef CONFIG_WPS static int gen_uuid(const char *txt_addr) -@@ -670,6 +675,8 @@ int main(int argc, char *argv[]) - dl_list_init(&interfaces.eth_p_oui); - #endif /* CONFIG_ETH_P_OUI */ +@@ -667,6 +672,8 @@ int main(int argc, char *argv[]) + interfaces.global_ctrl_sock = -1; + dl_list_init(&interfaces.global_ctrl_dst); + wpa_supplicant_event = hostapd_wpa_event; + wpa_supplicant_event_global = hostapd_wpa_event_global; diff --git a/package/network/services/hostapd/patches/300-noscan.patch b/package/network/services/hostapd/patches/300-noscan.patch index c8ca3694c..9dc0f2c39 100644 --- a/package/network/services/hostapd/patches/300-noscan.patch +++ b/package/network/services/hostapd/patches/300-noscan.patch @@ -1,6 +1,6 @@ --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -3016,6 +3016,10 @@ static int hostapd_config_fill(struct ho +@@ -2953,6 +2953,10 @@ static int hostapd_config_fill(struct ho } #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_IEEE80211N @@ -13,7 +13,7 @@ } else if (os_strcmp(buf, "ht_capab") == 0) { --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -735,6 +735,8 @@ struct hostapd_config { +@@ -681,6 +681,8 @@ struct hostapd_config { int ht_op_mode_fixed; u16 ht_capab; @@ -24,7 +24,7 @@ int no_pri_sec_switch; --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c -@@ -480,7 +480,8 @@ static int ieee80211n_check_40mhz(struct +@@ -474,7 +474,8 @@ static int ieee80211n_check_40mhz(struct int ret; /* Check that HT40 is used and PRI / SEC switch is allowed */ diff --git a/package/network/services/hostapd/patches/310-rescan_immediately.patch b/package/network/services/hostapd/patches/310-rescan_immediately.patch index 6846db275..ccc9781fa 100644 --- a/package/network/services/hostapd/patches/310-rescan_immediately.patch +++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch @@ -1,6 +1,6 @@ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -3927,7 +3927,7 @@ wpa_supplicant_alloc(struct wpa_supplica +@@ -3696,7 +3696,7 @@ wpa_supplicant_alloc(struct wpa_supplica if (wpa_s == NULL) return NULL; wpa_s->scan_req = INITIAL_SCAN_REQ; diff --git a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch index 3bc916b6b..ebb12f69f 100644 --- a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch +++ b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -4152,7 +4152,7 @@ static int nl80211_set_channel(struct i8 +@@ -4104,7 +4104,7 @@ static int nl80211_set_channel(struct i8 freq->freq, freq->ht_enabled, freq->vht_enabled, freq->bandwidth, freq->center_freq1, freq->center_freq2); diff --git a/package/network/services/hostapd/patches/340-reload_freq_change.patch b/package/network/services/hostapd/patches/340-reload_freq_change.patch index f05b9147b..0dcd7c913 100644 --- a/package/network/services/hostapd/patches/340-reload_freq_change.patch +++ b/package/network/services/hostapd/patches/340-reload_freq_change.patch @@ -1,6 +1,6 @@ --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -87,6 +87,25 @@ static void hostapd_reload_bss(struct ho +@@ -80,6 +80,25 @@ static void hostapd_reload_bss(struct ho #endif /* CONFIG_NO_RADIUS */ ssid = &hapd->conf->ssid; @@ -26,7 +26,7 @@ if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next && ssid->wpa_passphrase_set && ssid->wpa_passphrase) { /* -@@ -165,6 +184,7 @@ int hostapd_reload_config(struct hostapd +@@ -158,6 +177,7 @@ int hostapd_reload_config(struct hostapd struct hostapd_data *hapd = iface->bss[0]; struct hostapd_config *newconf, *oldconf; size_t j; @@ -34,7 +34,7 @@ if (iface->config_fname == NULL) { /* Only in-memory config in use - assume it has been updated */ -@@ -186,21 +206,20 @@ int hostapd_reload_config(struct hostapd +@@ -179,21 +199,20 @@ int hostapd_reload_config(struct hostapd oldconf = hapd->iconf; iface->conf = newconf; diff --git a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch index 92e6ae9ae..be10a413e 100644 --- a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch +++ b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch @@ -1,54 +1,72 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -2536,10 +2536,15 @@ static int wpa_driver_nl80211_del_beacon +@@ -2490,13 +2490,18 @@ wpa_driver_nl80211_finish_drv_init(struc + } + + +-static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv) ++static int wpa_driver_nl80211_del_beacon(struct i802_bss *bss) + { ++ struct wpa_driver_nl80211_data *drv = bss->drv; struct nl_msg *msg; - struct wpa_driver_nl80211_data *drv = bss->drv; + if (!bss->beacon_set) + return 0; + + bss->beacon_set = 0; -+ wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)", - drv->ifindex); -+ bss->ifindex); - nl80211_put_wiphy_data_ap(bss); - msg = nl80211_drv_msg(drv, 0, NL80211_CMD_DEL_BEACON); ++ bss->ifindex); + msg = nl80211_bss_msg(bss, 0, NL80211_CMD_DEL_BEACON); return send_and_recv_msgs(drv, msg, NULL, NULL); } -@@ -4753,7 +4758,7 @@ static void nl80211_teardown_ap(struct i - nl80211_mgmt_unsubscribe(bss, "AP teardown"); +@@ -2548,7 +2553,7 @@ static void wpa_driver_nl80211_deinit(st + nl80211_remove_monitor_interface(drv); - nl80211_put_wiphy_data_ap(bss); + if (is_ap_interface(drv->nlmode)) +- wpa_driver_nl80211_del_beacon(drv); ++ wpa_driver_nl80211_del_beacon(bss); + + if (drv->eapol_sock >= 0) { + eloop_unregister_read_sock(drv->eapol_sock); +@@ -4703,8 +4708,7 @@ static void nl80211_teardown_ap(struct i + nl80211_remove_monitor_interface(drv); + else + nl80211_mgmt_unsubscribe(bss, "AP teardown"); +- - bss->beacon_set = 0; + wpa_driver_nl80211_del_beacon(bss); } -@@ -6853,8 +6858,6 @@ static int wpa_driver_nl80211_if_remove( +@@ -6728,8 +6732,6 @@ static int wpa_driver_nl80211_if_remove( } else { wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context"); nl80211_teardown_ap(bss); - if (!bss->added_if && !drv->first_bss->next) -- wpa_driver_nl80211_del_beacon(bss); +- wpa_driver_nl80211_del_beacon(drv); nl80211_destroy_bss(bss); if (!bss->added_if) i802_set_iface_flags(bss, 0); -@@ -7225,7 +7228,6 @@ static int wpa_driver_nl80211_deinit_ap( +@@ -7091,8 +7093,7 @@ static int wpa_driver_nl80211_deinit_ap( + struct wpa_driver_nl80211_data *drv = bss->drv; if (!is_ap_interface(drv->nlmode)) return -1; - wpa_driver_nl80211_del_beacon(bss); +- wpa_driver_nl80211_del_beacon(drv); - bss->beacon_set = 0; ++ wpa_driver_nl80211_del_beacon(bss); /* * If the P2P GO interface was dynamically added, then it is -@@ -7245,7 +7247,6 @@ static int wpa_driver_nl80211_stop_ap(vo +@@ -7111,8 +7112,7 @@ static int wpa_driver_nl80211_stop_ap(vo + struct wpa_driver_nl80211_data *drv = bss->drv; if (!is_ap_interface(drv->nlmode)) return -1; - wpa_driver_nl80211_del_beacon(bss); +- wpa_driver_nl80211_del_beacon(drv); - bss->beacon_set = 0; ++ wpa_driver_nl80211_del_beacon(bss); return 0; } diff --git a/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch b/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch index 043ddbf88..83bec2a25 100644 --- a/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch +++ b/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch @@ -1,6 +1,6 @@ --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -56,6 +56,7 @@ +@@ -55,6 +55,7 @@ #include "fst/fst_ctrl_iface.h" #include "config_file.h" #include "ctrl_iface.h" @@ -8,7 +8,7 @@ #define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256 -@@ -74,6 +75,7 @@ static void hostapd_ctrl_iface_send(stru +@@ -73,6 +74,7 @@ static void hostapd_ctrl_iface_send(stru enum wpa_msg_type type, const char *buf, size_t len); @@ -16,7 +16,7 @@ static int hostapd_ctrl_iface_attach(struct hostapd_data *hapd, struct sockaddr_storage *from, -@@ -125,6 +127,61 @@ static int hostapd_ctrl_iface_new_sta(st +@@ -124,6 +126,61 @@ static int hostapd_ctrl_iface_new_sta(st return 0; } @@ -78,7 +78,7 @@ #ifdef CONFIG_IEEE80211W #ifdef NEED_AP_MLME -@@ -2607,6 +2664,8 @@ static int hostapd_ctrl_iface_receive_pr +@@ -2620,6 +2677,8 @@ static int hostapd_ctrl_iface_receive_pr } else if (os_strncmp(buf, "VENDOR ", 7) == 0) { reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply, reply_size); diff --git a/package/network/services/hostapd/patches/370-ap_sta_support.patch b/package/network/services/hostapd/patches/370-ap_sta_support.patch index a37b193b6..03819b337 100644 --- a/package/network/services/hostapd/patches/370-ap_sta_support.patch +++ b/package/network/services/hostapd/patches/370-ap_sta_support.patch @@ -1,6 +1,6 @@ --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h -@@ -101,6 +101,11 @@ struct wpa_interface { +@@ -100,6 +100,11 @@ struct wpa_interface { const char *ifname; /** @@ -12,7 +12,7 @@ * bridge_ifname - Optional bridge interface name * * If the driver interface (ifname) is included in a Linux bridge -@@ -512,6 +517,8 @@ struct wpa_supplicant { +@@ -484,6 +489,8 @@ struct wpa_supplicant { #endif /* CONFIG_CTRL_IFACE_BINDER */ char bridge_ifname[16]; @@ -34,7 +34,7 @@ -include .config -include $(if $(MULTICALL),../hostapd/.config) -@@ -117,6 +121,8 @@ OBJS_c += ../src/utils/common.o +@@ -115,6 +119,8 @@ OBJS_c += ../src/utils/common.o OBJS_c += ../src/common/cli.o OBJS += wmm_ac.o @@ -45,9 +45,9 @@ CONFIG_OS=win32 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -118,6 +118,55 @@ const char *const wpa_supplicant_full_li - static void wpa_bss_tmp_disallow_timeout(void *eloop_ctx, void *timeout_ctx); - +@@ -112,6 +112,55 @@ const char *const wpa_supplicant_full_li + "\n"; + #endif /* CONFIG_NO_STDOUT_DEBUG */ +static int hostapd_stop(struct wpa_supplicant *wpa_s) +{ @@ -101,7 +101,7 @@ /* Configure default/group WEP keys for static WEP */ int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid) { -@@ -883,8 +932,12 @@ void wpa_supplicant_set_state(struct wpa +@@ -819,8 +868,12 @@ void wpa_supplicant_set_state(struct wpa wpas_p2p_completed(wpa_s); sme_sched_obss_scan(wpa_s, 1); @@ -114,7 +114,7 @@ wpa_s->new_connection = 1; wpa_drv_set_operstate(wpa_s, 0); #ifndef IEEE8021X_EAPOL -@@ -5080,6 +5133,20 @@ static int wpa_supplicant_init_iface(str +@@ -4790,6 +4843,20 @@ static int wpa_supplicant_init_iface(str sizeof(wpa_s->bridge_ifname)); } @@ -135,7 +135,7 @@ /* RSNA Supplicant Key Management - INITIALIZE */ eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE); eapol_sm_notify_portValid(wpa_s->eapol, FALSE); -@@ -5404,6 +5471,11 @@ static void wpa_supplicant_deinit_iface( +@@ -5083,6 +5150,11 @@ static void wpa_supplicant_deinit_iface( if (terminate) wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING); @@ -157,7 +157,7 @@ #include "drivers/driver.h" #include "eap_peer/eap.h" #include "wpa_supplicant_i.h" -@@ -290,6 +291,10 @@ void calculate_update_time(const struct +@@ -290,6 +291,10 @@ static void calculate_update_time(const static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src, struct os_reltime *fetch_time) { diff --git a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch index e977f00a2..b4729581c 100644 --- a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch +++ b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch @@ -12,7 +12,7 @@ else --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -2458,6 +2458,7 @@ static int hostapd_ctrl_iface_receive_pr +@@ -2471,6 +2471,7 @@ static int hostapd_ctrl_iface_receive_pr reply_size); } else if (os_strcmp(buf, "STATUS-DRIVER") == 0) { reply_len = hostapd_drv_status(hapd, reply, reply_size); @@ -20,7 +20,7 @@ } else if (os_strcmp(buf, "MIB") == 0) { reply_len = ieee802_11_get_mib(hapd, reply, reply_size); if (reply_len >= 0) { -@@ -2499,6 +2500,7 @@ static int hostapd_ctrl_iface_receive_pr +@@ -2512,6 +2513,7 @@ static int hostapd_ctrl_iface_receive_pr } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply, reply_size); @@ -30,8 +30,8 @@ reply_len = -1; --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -926,6 +926,9 @@ ifdef CONFIG_FILS - OBJS += ../src/ap/fils_hlp.o +@@ -891,6 +891,9 @@ ifdef CONFIG_MBO + OBJS += ../src/ap/mbo_ap.o endif ifdef CONFIG_CTRL_IFACE +ifdef CONFIG_CTRL_IFACE_MIB @@ -42,7 +42,7 @@ --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c -@@ -2070,7 +2070,7 @@ static int wpa_supplicant_ctrl_iface_sta +@@ -1907,7 +1907,7 @@ static int wpa_supplicant_ctrl_iface_sta pos += ret; } @@ -51,7 +51,7 @@ if (wpa_s->ap_iface) { pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos, end - pos, -@@ -9631,6 +9631,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -9032,6 +9032,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = -1; } else if (os_strncmp(buf, "NOTE ", 5) == 0) { wpa_printf(MSG_INFO, "NOTE: %s", buf + 5); @@ -59,7 +59,7 @@ } else if (os_strcmp(buf, "MIB") == 0) { reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size); if (reply_len >= 0) { -@@ -9638,6 +9639,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -9039,6 +9040,7 @@ char * wpa_supplicant_ctrl_iface_process reply + reply_len, reply_size - reply_len); } @@ -67,7 +67,7 @@ } else if (os_strncmp(buf, "STATUS", 6) == 0) { reply_len = wpa_supplicant_ctrl_iface_status( wpa_s, buf + 6, reply, reply_size); -@@ -10124,6 +10126,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -9517,6 +9519,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = wpa_supplicant_ctrl_iface_bss( wpa_s, buf + 4, reply, reply_size); #ifdef CONFIG_AP @@ -75,7 +75,7 @@ } else if (os_strcmp(buf, "STA-FIRST") == 0) { reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size); } else if (os_strncmp(buf, "STA ", 4) == 0) { -@@ -10132,12 +10135,15 @@ char * wpa_supplicant_ctrl_iface_process +@@ -9525,12 +9528,15 @@ char * wpa_supplicant_ctrl_iface_process } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply, reply_size); @@ -111,7 +111,7 @@ static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype, --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c -@@ -2492,6 +2492,7 @@ static const char * bool_txt(Boolean val +@@ -2490,6 +2490,7 @@ static const char * bool_txt(Boolean val return val ? "TRUE" : "FALSE"; } @@ -119,7 +119,7 @@ int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) { -@@ -2667,6 +2668,7 @@ int ieee802_1x_get_mib_sta(struct hostap +@@ -2665,6 +2666,7 @@ int ieee802_1x_get_mib_sta(struct hostap return len; } @@ -129,7 +129,7 @@ static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx) --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c -@@ -3780,6 +3780,7 @@ static const char * wpa_bool_txt(int val +@@ -3565,6 +3565,7 @@ static const char * wpa_bool_txt(int val return val ? "TRUE" : "FALSE"; } @@ -137,7 +137,7 @@ #define RSN_SUITE "%02x-%02x-%02x-%d" #define RSN_SUITE_ARG(s) \ -@@ -3924,7 +3925,7 @@ int wpa_get_mib_sta(struct wpa_state_mac +@@ -3709,7 +3710,7 @@ int wpa_get_mib_sta(struct wpa_state_mac return len; } @@ -148,7 +148,7 @@ { --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -2356,6 +2356,8 @@ static u32 wpa_key_mgmt_suite(struct wpa +@@ -2308,6 +2308,8 @@ static u32 wpa_key_mgmt_suite(struct wpa } @@ -157,7 +157,7 @@ #define RSN_SUITE "%02x-%02x-%02x-%d" #define RSN_SUITE_ARG(s) \ ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff -@@ -2439,6 +2441,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch +@@ -2391,6 +2393,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch return (int) len; } @@ -167,7 +167,7 @@ --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c -@@ -1139,7 +1139,7 @@ int wpas_ap_wps_nfc_report_handover(stru +@@ -1119,7 +1119,7 @@ int wpas_ap_wps_nfc_report_handover(stru #endif /* CONFIG_WPS */ diff --git a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch index 8f7a6879c..7f147aec1 100644 --- a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch +++ b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch @@ -1,6 +1,6 @@ --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c -@@ -1675,6 +1675,31 @@ u32 wpa_akm_to_suite(int akm) +@@ -1445,6 +1445,31 @@ u32 wpa_akm_to_suite(int akm) } @@ -32,7 +32,7 @@ int wpa_compare_rsn_ie(int ft_initial_assoc, const u8 *ie1, size_t ie1len, const u8 *ie2, size_t ie2len) -@@ -1682,8 +1707,19 @@ int wpa_compare_rsn_ie(int ft_initial_as +@@ -1452,8 +1477,19 @@ int wpa_compare_rsn_ie(int ft_initial_as if (ie1 == NULL || ie2 == NULL) return -1; diff --git a/package/network/services/hostapd/patches/420-indicate-features.patch b/package/network/services/hostapd/patches/420-indicate-features.patch index 2b529ca3e..ac699f4e4 100644 --- a/package/network/services/hostapd/patches/420-indicate-features.patch +++ b/package/network/services/hostapd/patches/420-indicate-features.patch @@ -8,7 +8,7 @@ #include "crypto/random.h" #include "crypto/tls.h" #include "common/version.h" -@@ -678,7 +679,7 @@ int main(int argc, char *argv[]) +@@ -675,7 +676,7 @@ int main(int argc, char *argv[]) wpa_supplicant_event = hostapd_wpa_event; wpa_supplicant_event_global = hostapd_wpa_event_global; for (;;) { @@ -17,7 +17,7 @@ if (c < 0) break; switch (c) { -@@ -715,6 +716,8 @@ int main(int argc, char *argv[]) +@@ -712,6 +713,8 @@ int main(int argc, char *argv[]) break; #endif /* CONFIG_DEBUG_LINUX_TRACING */ case 'v': diff --git a/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch b/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch index 32cab7ff6..eba79d28c 100644 --- a/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch +++ b/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch @@ -1,6 +1,6 @@ --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c -@@ -417,7 +417,6 @@ static int hostapd_cli_cmd_sa_query(stru +@@ -447,7 +447,6 @@ static int hostapd_cli_cmd_sa_query(stru #endif /* CONFIG_IEEE80211W */ @@ -8,7 +8,7 @@ static int hostapd_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) { -@@ -643,7 +642,6 @@ static int hostapd_cli_cmd_wps_config(st +@@ -673,7 +672,6 @@ static int hostapd_cli_cmd_wps_config(st ssid_hex, argv[1]); return wpa_ctrl_command(ctrl, buf); } @@ -16,19 +16,19 @@ static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc, -@@ -1476,7 +1474,6 @@ static const struct hostapd_cli_cmd host - { "sa_query", hostapd_cli_cmd_sa_query, hostapd_complete_stations, +@@ -1367,7 +1365,6 @@ static const struct hostapd_cli_cmd host + { "sa_query", hostapd_cli_cmd_sa_query, NULL, " = send SA Query to a station" }, #endif /* CONFIG_IEEE80211W */ -#ifdef CONFIG_WPS { "wps_pin", hostapd_cli_cmd_wps_pin, NULL, " [timeout] [addr] = add WPS Enrollee PIN" }, { "wps_check_pin", hostapd_cli_cmd_wps_check_pin, NULL, -@@ -1501,7 +1498,6 @@ static const struct hostapd_cli_cmd host +@@ -1392,7 +1389,6 @@ static const struct hostapd_cli_cmd host " = configure AP" }, { "wps_get_status", hostapd_cli_cmd_wps_get_status, NULL, "= show current WPS status" }, -#endif /* CONFIG_WPS */ - { "disassoc_imminent", hostapd_cli_cmd_disassoc_imminent, NULL, - "= send Disassociation Imminent notification" }, - { "ess_disassoc", hostapd_cli_cmd_ess_disassoc, NULL, + { "disassoc_imminent", hostapd_cli_cmd_disassoc_imminent, NULL, NULL }, + { "ess_disassoc", hostapd_cli_cmd_ess_disassoc, NULL, NULL }, + { "bss_tm_req", hostapd_cli_cmd_bss_tm_req, NULL, NULL }, diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch index 213ee6d72..1aeec5d05 100644 --- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch +++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch @@ -21,8 +21,8 @@ Signed-hostap: Antonio Quartulli +#include "ap/sta_info.h" #include "common/defs.h" #include "common/ieee802_11_defs.h" - #include "common/wpa_common.h" -@@ -762,6 +763,9 @@ struct wpa_driver_associate_params { + #ifdef CONFIG_MACSEC +@@ -605,6 +606,9 @@ struct wpa_driver_associate_params { * responsible for selecting with which BSS to associate. */ const u8 *bssid; @@ -34,7 +34,7 @@ Signed-hostap: Antonio Quartulli * --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c -@@ -17,6 +17,7 @@ +@@ -16,6 +16,7 @@ #include "eap_peer/eap.h" #include "p2p/p2p.h" #include "fst/fst.h" @@ -42,7 +42,7 @@ Signed-hostap: Antonio Quartulli #include "config.h" -@@ -1985,6 +1986,97 @@ static char * wpa_config_write_mka_ckn(c +@@ -1891,6 +1892,97 @@ static char * wpa_config_write_mka_ckn(c #endif /* CONFIG_MACSEC */ @@ -140,10 +140,11 @@ Signed-hostap: Antonio Quartulli /* Helper macros for network block parser */ #ifdef OFFSET -@@ -2224,6 +2316,8 @@ static const struct parse_data ssid_fiel +@@ -2123,6 +2215,9 @@ static const struct parse_data ssid_fiel { INT(ap_max_inactivity) }, { INT(dtim_period) }, { INT(beacon_int) }, ++ { INT_RANGE(fixed_freq, 0, 1) }, + { FUNC(rates) }, + { FUNC(mcast_rate) }, #ifdef CONFIG_MACSEC @@ -162,7 +163,7 @@ Signed-hostap: Antonio Quartulli #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1) -@@ -735,6 +737,9 @@ struct wpa_ssid { +@@ -719,6 +721,9 @@ struct wpa_ssid { */ void *parent_cred; @@ -174,10 +175,11 @@ Signed-hostap: Antonio Quartulli * macsec_policy - Determines the policy for MACsec secure session --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2781,6 +2781,12 @@ static void wpas_start_assoc_cb(struct w +@@ -2561,6 +2561,13 @@ static void wpas_start_assoc_cb(struct w params.beacon_int = ssid->beacon_int; else params.beacon_int = wpa_s->conf->beacon_int; ++ params.fixed_freq = ssid->fixed_freq; + i = 0; + while (i < WLAN_SUPP_RATES_MAX) { + params.rates[i] = ssid->rates[i]; diff --git a/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch b/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch index 11822366d..6db61333e 100644 --- a/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch +++ b/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch @@ -10,7 +10,7 @@ Signed-hostap: Antonio Quartulli --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -5012,7 +5012,7 @@ static int wpa_driver_nl80211_ibss(struc +@@ -4962,7 +4962,7 @@ static int wpa_driver_nl80211_ibss(struc struct wpa_driver_associate_params *params) { struct nl_msg *msg; @@ -19,7 +19,7 @@ Signed-hostap: Antonio Quartulli int count = 0; wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex); -@@ -5039,6 +5039,37 @@ retry: +@@ -4989,6 +4989,37 @@ retry: nl80211_put_beacon_int(msg, params->beacon_int)) goto fail; diff --git a/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch b/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch new file mode 100644 index 000000000..c4b48a938 --- /dev/null +++ b/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch @@ -0,0 +1,156 @@ +From b9329c5dfeed7d5c55d2117d8dfe326fc40c8fb1 Mon Sep 17 00:00:00 2001 +From: Antonio Quartulli +Date: Tue, 3 Jul 2012 00:36:24 +0200 +Subject: [PATCH] wpa_s: support htmode param + +possible values are HT20, HT40-, HT40+ and NOHT + +Signed-off-by: Antonio Quartulli +--- + src/drivers/driver.h | 2 ++ + src/drivers/driver_nl80211.c | 16 ++++++++++ + wpa_supplicant/config.c | 66 +++++++++++++++++++++++++++++++++++++++ + wpa_supplicant/config_ssid.h | 2 ++ + wpa_supplicant/wpa_supplicant.c | 2 ++ + 5 files changed, 88 insertions(+) + +--- a/src/drivers/driver.h ++++ b/src/drivers/driver.h +@@ -608,6 +608,8 @@ struct wpa_driver_associate_params { + + unsigned char rates[WLAN_SUPP_RATES_MAX]; + int mcast_rate; ++ int ht_set; ++ unsigned int htmode; + + /** + * bssid_hint - BSSID of a proposed AP +--- a/src/drivers/driver_nl80211.c ++++ b/src/drivers/driver_nl80211.c +@@ -5020,6 +5020,22 @@ retry: + nla_put_u32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate); + } + ++ if (params->ht_set) { ++ switch(params->htmode) { ++ case NL80211_CHAN_HT20: ++ wpa_printf(MSG_DEBUG, " * ht=HT20"); ++ break; ++ case NL80211_CHAN_HT40PLUS: ++ wpa_printf(MSG_DEBUG, " * ht=HT40+"); ++ break; ++ case NL80211_CHAN_HT40MINUS: ++ wpa_printf(MSG_DEBUG, " * ht=HT40-"); ++ break; ++ } ++ nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, ++ params->htmode); ++ } ++ + ret = nl80211_set_conn_keys(params, msg); + if (ret) + goto fail; +--- a/wpa_supplicant/config.c ++++ b/wpa_supplicant/config.c +@@ -1923,6 +1923,71 @@ static char * wpa_config_write_mcast_rat + } + #endif /* NO_CONFIG_WRITE */ + ++static int wpa_config_parse_htmode(const struct parse_data *data, ++ struct wpa_ssid *ssid, int line, ++ const char *value) ++{ ++ int i; ++ static const struct { ++ const char *name; ++ unsigned int val; ++ } htmap[] = { ++ { .name = "HT20", .val = NL80211_CHAN_HT20, }, ++ { .name = "HT40+", .val = NL80211_CHAN_HT40PLUS, }, ++ { .name = "HT40-", .val = NL80211_CHAN_HT40MINUS, }, ++ { .name = "NOHT", .val = NL80211_CHAN_NO_HT, }, ++ }; ++ ssid->ht_set = 0;; ++ for (i = 0; i < 4; i++) { ++ if (strcasecmp(htmap[i].name, value) == 0) { ++ ssid->htmode = htmap[i].val; ++ ssid->ht_set = 1; ++ break; ++ } ++ } ++ ++ return 0; ++} ++ ++#ifndef NO_CONFIG_WRITE ++static char * wpa_config_write_htmode(const struct parse_data *data, ++ struct wpa_ssid *ssid) ++{ ++ char *value; ++ int res; ++ ++ value = os_malloc(6); /* longest: HT40+ */ ++ if (value == NULL) ++ return NULL; ++ ++ switch(ssid->htmode) { ++ case NL80211_CHAN_HT20: ++ res = os_snprintf(value, 4, "HT20"); ++ break; ++ case NL80211_CHAN_HT40PLUS: ++ res = os_snprintf(value, 5, "HT40+"); ++ break; ++ case NL80211_CHAN_HT40MINUS: ++ res = os_snprintf(value, 5, "HT40-"); ++ break; ++ case NL80211_CHAN_NO_HT: ++ res = os_snprintf(value, 4, "NOHT"); ++ break; ++ default: ++ os_free(value); ++ return NULL; ++ } ++ ++ if (res < 0) { ++ os_free(value); ++ return NULL; ++ } ++ ++ return value; ++} ++#endif /* NO_CONFIG_WRITE */ ++ ++ + static int wpa_config_parse_rates(const struct parse_data *data, + struct wpa_ssid *ssid, int line, + const char *value) +@@ -2218,6 +2283,7 @@ static const struct parse_data ssid_fiel + { INT_RANGE(fixed_freq, 0, 1) }, + { FUNC(rates) }, + { FUNC(mcast_rate) }, ++ { FUNC(htmode) }, + #ifdef CONFIG_MACSEC + { INT_RANGE(macsec_policy, 0, 1) }, + { INT_RANGE(macsec_integ_only, 0, 1) }, +--- a/wpa_supplicant/config_ssid.h ++++ b/wpa_supplicant/config_ssid.h +@@ -723,6 +723,8 @@ struct wpa_ssid { + + unsigned char rates[WLAN_SUPP_RATES_MAX]; + double mcast_rate; ++ int ht_set; ++ unsigned int htmode; + + #ifdef CONFIG_MACSEC + /** +--- a/wpa_supplicant/wpa_supplicant.c ++++ b/wpa_supplicant/wpa_supplicant.c +@@ -2568,6 +2568,8 @@ static void wpas_start_assoc_cb(struct w + i++; + } + params.mcast_rate = ssid->mcast_rate; ++ params.ht_set = ssid->ht_set; ++ params.htmode = ssid->htmode; + } + + params.wpa_ie = wpa_ie; diff --git a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch index 9b5ee4bbb..da146ba55 100644 --- a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch +++ b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch @@ -19,7 +19,7 @@ Tested-by: Simon Wunderlich --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -1424,6 +1424,7 @@ struct wpa_driver_mesh_join_params { +@@ -1426,6 +1426,7 @@ struct wpa_driver_mesh_join_params { #define WPA_DRIVER_MESH_FLAG_SAE_AUTH 0x00000004 #define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008 unsigned int flags; @@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich /** --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -8981,6 +8981,18 @@ static int nl80211_put_mesh_id(struct nl +@@ -8997,6 +8997,18 @@ static int nl80211_put_mesh_id(struct nl } @@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich static int nl80211_put_mesh_config(struct nl_msg *msg, struct wpa_driver_mesh_bss_params *params) { -@@ -9039,6 +9051,7 @@ static int nl80211_join_mesh(struct i802 +@@ -9055,6 +9067,7 @@ static int nl80211_join_mesh(struct i802 nl80211_put_basic_rates(msg, params->basic_rates) || nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) || nl80211_put_beacon_int(msg, params->beacon_int) || diff --git a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch deleted file mode 100644 index 383353948..000000000 --- a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/wpa_supplicant/wpa_supplicant.c -+++ b/wpa_supplicant/wpa_supplicant.c -@@ -2010,11 +2010,13 @@ void ibss_mesh_setup_freq(struct wpa_sup - for (j = 0; j < wpa_s->last_scan_res_used; j++) { - struct wpa_bss *bss = wpa_s->last_scan_res[j]; - -- if (ssid->mode != WPAS_MODE_IBSS) -+ /* Don't adjust control freq in case of fixed_freq */ -+ if (ssid->fixed_freq) { -+ obss_scan = 0; - break; -+ } - -- /* Don't adjust control freq in case of fixed_freq */ -- if (ssid->fixed_freq) -+ if (ssid->mode != WPAS_MODE_IBSS) - break; - - if (!bss_is_ibss(bss)) diff --git a/package/network/services/hostapd/patches/470-survey_data_fallback.patch b/package/network/services/hostapd/patches/470-survey_data_fallback.patch index 1c094bed2..4e40a8755 100644 --- a/package/network/services/hostapd/patches/470-survey_data_fallback.patch +++ b/package/network/services/hostapd/patches/470-survey_data_fallback.patch @@ -20,7 +20,7 @@ total = survey->channel_time; -@@ -392,20 +386,19 @@ static int acs_usable_vht80_chan(struct +@@ -395,20 +389,19 @@ static int acs_usable_vht80_chan(struct static int acs_survey_is_sufficient(struct freq_survey *survey) { if (!(survey->filled & SURVEY_HAS_NF)) { diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index 8f14f125d..dd962b47a 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -22,7 +22,7 @@ struct wpa_ctrl_dst; struct radius_server_data; -@@ -122,6 +123,7 @@ struct hostapd_data { +@@ -119,6 +120,7 @@ struct hostapd_data { struct hostapd_iface *iface; struct hostapd_config *iconf; struct hostapd_bss_config *conf; @@ -30,7 +30,7 @@ int interface_added; /* virtual interface added for this BSS */ unsigned int started:1; unsigned int disabled:1; -@@ -370,6 +372,8 @@ struct hostapd_iface { +@@ -328,6 +330,8 @@ struct hostapd_iface { struct hostapd_config *conf; char phy[16]; /* Name of the PHY (radio) */ @@ -41,7 +41,7 @@ HAPD_IFACE_DISABLED, --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -309,6 +309,7 @@ static void hostapd_free_hapd_data(struc +@@ -302,6 +302,7 @@ static void hostapd_free_hapd_data(struc hapd->started = 0; wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface); @@ -49,7 +49,7 @@ iapp_deinit(hapd->iapp); hapd->iapp = NULL; accounting_deinit(hapd); -@@ -1186,6 +1187,8 @@ static int hostapd_setup_bss(struct host +@@ -1160,6 +1161,8 @@ static int hostapd_setup_bss(struct host if (hapd->driver && hapd->driver->set_operstate) hapd->driver->set_operstate(hapd->drv_priv, 1); @@ -58,7 +58,7 @@ return 0; } -@@ -1711,6 +1714,7 @@ static int hostapd_setup_interface_compl +@@ -1683,6 +1686,7 @@ static int hostapd_setup_interface_compl if (err) goto fail; @@ -66,7 +66,7 @@ wpa_printf(MSG_DEBUG, "Completing interface initialization"); if (iface->conf->channel) { #ifdef NEED_AP_MLME -@@ -1890,6 +1894,7 @@ dfs_offload: +@@ -1862,6 +1866,7 @@ dfs_offload: fail: wpa_printf(MSG_ERROR, "Interface initialization failed"); @@ -74,7 +74,7 @@ hostapd_set_state(iface, HAPD_IFACE_DISABLED); wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED); #ifdef CONFIG_FST -@@ -2344,6 +2349,7 @@ void hostapd_interface_deinit_free(struc +@@ -2310,6 +2315,7 @@ void hostapd_interface_deinit_free(struc (unsigned int) iface->conf->num_bss); driver = iface->bss[0]->driver; drv_priv = iface->bss[0]->drv_priv; @@ -84,7 +84,7 @@ __func__, driver, drv_priv); --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -1587,7 +1587,8 @@ ieee802_11_set_radius_info(struct hostap +@@ -1293,7 +1293,8 @@ void ieee802_11_finish_fils_auth(struct static void handle_auth(struct hostapd_data *hapd, @@ -94,7 +94,7 @@ { u16 auth_alg, auth_transaction, status_code; u16 resp = WLAN_STATUS_SUCCESS; -@@ -1603,6 +1604,11 @@ static void handle_auth(struct hostapd_d +@@ -1309,6 +1310,11 @@ static void handle_auth(struct hostapd_d char *identity = NULL; char *radius_cui = NULL; u16 seq_ctrl; @@ -104,22 +104,24 @@ + .frame_info = fi, + }; - if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) { - wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)", -@@ -1757,6 +1763,12 @@ static void handle_auth(struct hostapd_d + os_memset(&vlan_id, 0, sizeof(vlan_id)); + +@@ -1466,6 +1472,14 @@ static void handle_auth(struct hostapd_d resp = WLAN_STATUS_UNSPECIFIED_FAILURE; goto fail; } ++ + if (hostapd_ubus_handle_event(hapd, &req)) { + wpa_printf(MSG_DEBUG, "Station " MACSTR " rejected by ubus handler.\n", -+ MAC2STR(mgmt->sa)); ++ MAC2STR(mgmt->sa)); + resp = WLAN_STATUS_UNSPECIFIED_FAILURE; + goto fail; + } - if (res == HOSTAPD_ACL_PENDING) - return; - -@@ -2870,7 +2882,7 @@ void fils_hlp_timeout(void *eloop_ctx, v ++ + if (res == HOSTAPD_ACL_PENDING) { + wpa_printf(MSG_DEBUG, "Authentication frame from " MACSTR + " waiting for an external authentication", +@@ -2401,7 +2415,7 @@ static u16 send_assoc_resp(struct hostap static void handle_assoc(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, @@ -128,10 +130,10 @@ { u16 capab_info, listen_interval, seq_ctrl, fc; u16 resp = WLAN_STATUS_SUCCESS, reply_res; -@@ -2884,6 +2896,11 @@ static void handle_assoc(struct hostapd_ - #ifdef CONFIG_FILS - int delay_assoc = 0; - #endif /* CONFIG_FILS */ +@@ -2409,6 +2423,11 @@ static void handle_assoc(struct hostapd_ + int left, i; + struct sta_info *sta; + u8 *tmp = NULL; + struct hostapd_ubus_request req = { + .type = HOSTAPD_UBUS_ASSOC_REQ, + .mgmt_frame = mgmt, @@ -140,7 +142,7 @@ if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) : sizeof(mgmt->u.assoc_req))) { -@@ -3051,6 +3068,13 @@ static void handle_assoc(struct hostapd_ +@@ -2528,6 +2547,13 @@ static void handle_assoc(struct hostapd_ } #endif /* CONFIG_MBO */ @@ -154,24 +156,7 @@ /* * sta->capability is used in check_assoc_ies() for RRM enabled * capability element. -@@ -3258,6 +3282,7 @@ static void handle_disassoc(struct hosta - wpa_printf(MSG_DEBUG, "disassocation: STA=" MACSTR " reason_code=%d", - MAC2STR(mgmt->sa), - le_to_host16(mgmt->u.disassoc.reason_code)); -+ hostapd_ubus_notify(hapd, "disassoc", mgmt->sa); - - sta = ap_get_sta(hapd, mgmt->sa); - if (sta == NULL) { -@@ -3323,6 +3348,8 @@ static void handle_deauth(struct hostapd - " reason_code=%d", - MAC2STR(mgmt->sa), le_to_host16(mgmt->u.deauth.reason_code)); - -+ hostapd_ubus_notify(hapd, "deauth", mgmt->sa); -+ - sta = ap_get_sta(hapd, mgmt->sa); - if (sta == NULL) { - wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying " -@@ -3637,7 +3664,7 @@ int ieee802_11_mgmt(struct hostapd_data +@@ -3035,7 +3061,7 @@ int ieee802_11_mgmt(struct hostapd_data if (stype == WLAN_FC_STYPE_PROBE_REQ) { @@ -180,7 +165,7 @@ return 1; } -@@ -3657,17 +3684,17 @@ int ieee802_11_mgmt(struct hostapd_data +@@ -3053,17 +3079,17 @@ int ieee802_11_mgmt(struct hostapd_data switch (stype) { case WLAN_FC_STYPE_AUTH: wpa_printf(MSG_DEBUG, "mgmt::auth"); @@ -203,7 +188,7 @@ case WLAN_FC_STYPE_DISASSOC: --- a/src/ap/beacon.c +++ b/src/ap/beacon.c -@@ -716,7 +716,7 @@ void sta_track_claim_taxonomy_info(struc +@@ -702,7 +702,7 @@ void sta_track_claim_taxonomy_info(struc void handle_probe_req(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, @@ -212,7 +197,7 @@ { u8 *resp; struct ieee802_11_elems elems; -@@ -725,9 +725,15 @@ void handle_probe_req(struct hostapd_dat +@@ -711,9 +711,15 @@ void handle_probe_req(struct hostapd_dat size_t i, resp_len; int noack; enum ssid_match_result res; @@ -228,7 +213,7 @@ if (len < IEEE80211_HDRLEN) return; -@@ -894,6 +900,12 @@ void handle_probe_req(struct hostapd_dat +@@ -880,6 +886,12 @@ void handle_probe_req(struct hostapd_dat } #endif /* CONFIG_P2P */ @@ -254,7 +239,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface); --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c -@@ -116,6 +116,10 @@ int hostapd_notif_assoc(struct hostapd_d +@@ -52,6 +52,10 @@ int hostapd_notif_assoc(struct hostapd_d u16 reason = WLAN_REASON_UNSPECIFIED; u16 status = WLAN_STATUS_SUCCESS; const u8 *p2p_dev_addr = NULL; @@ -265,7 +250,7 @@ if (addr == NULL) { /* -@@ -195,6 +199,12 @@ int hostapd_notif_assoc(struct hostapd_d +@@ -131,6 +135,12 @@ int hostapd_notif_assoc(struct hostapd_d goto fail; } @@ -278,39 +263,3 @@ #ifdef CONFIG_P2P if (elems.p2p) { wpabuf_free(sta->p2p_ie); ---- a/src/ap/sta_info.c -+++ b/src/ap/sta_info.c -@@ -404,6 +404,7 @@ void ap_handle_timer(void *eloop_ctx, vo - HOSTAPD_LEVEL_INFO, "deauthenticated due to " - "local deauth request"); - ap_free_sta(hapd, sta); -+ hostapd_ubus_notify(hapd, "local-deauth", sta->addr); - return; - } - -@@ -551,6 +552,7 @@ skip_poll: - hapd, sta, - WLAN_REASON_PREV_AUTH_NOT_VALID); - ap_free_sta(hapd, sta); -+ hostapd_ubus_notify(hapd, "inactive-deauth", sta->addr); - break; - } - } -@@ -1212,6 +1214,7 @@ void ap_sta_set_authorized(struct hostap - buf, ip_addr); - } else { - wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED "%s", buf); -+ hostapd_ubus_notify(hapd, "disassoc", sta->addr); - - if (hapd->msg_ctx_parent && - hapd->msg_ctx_parent != hapd->msg_ctx) ---- a/src/ap/wpa_auth_glue.c -+++ b/src/ap/wpa_auth_glue.c -@@ -175,6 +175,7 @@ static void hostapd_wpa_auth_psk_failure - struct hostapd_data *hapd = ctx; - wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR, - MAC2STR(addr)); -+ hostapd_ubus_notify(hapd, "key-mismatch", addr); - } - - diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index beb4388f7..c24f63fd8 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -9,10 +9,8 @@ #include "utils/includes.h" #include "utils/common.h" #include "utils/eloop.h" -#include "utils/wpabuf.h" #include "common/ieee802_11_defs.h" #include "hostapd.h" -#include "neighbor_db.h" #include "wps_hostapd.h" #include "sta_info.h" #include "ubus.h" @@ -184,37 +182,6 @@ hostapd_bss_get_clients(struct ubus_context *ctx, struct ubus_object *obj, return 0; } -enum { - NOTIFY_RESPONSE, - __NOTIFY_MAX -}; - -static const struct blobmsg_policy notify_policy[__NOTIFY_MAX] = { - [NOTIFY_RESPONSE] = { "notify_response", BLOBMSG_TYPE_INT32 }, -}; - -static int -hostapd_notify_response(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__NOTIFY_MAX]; - struct hostapd_data *hapd = get_hapd_from_object(obj); - struct wpabuf *elems; - const char *pos; - size_t len; - - blobmsg_parse(notify_policy, __NOTIFY_MAX, tb, - blob_data(msg), blob_len(msg)); - - if (!tb[NOTIFY_RESPONSE]) - return UBUS_STATUS_INVALID_ARGUMENT; - - hapd->ubus.notify_response = blobmsg_get_u32(tb[NOTIFY_RESPONSE]); - - return UBUS_STATUS_OK; -} - enum { DEL_CLIENT_ADDR, DEL_CLIENT_REASON, @@ -449,170 +416,6 @@ hostapd_vendor_elements(struct ubus_context *ctx, struct ubus_object *obj, return UBUS_STATUS_OK; } -static void -hostapd_rrm_print_nr(struct hostapd_neighbor_entry *nr) -{ - const u8 *data; - char *str; - int len; - - blobmsg_printf(&b, "", MACSTR, MAC2STR(nr->bssid)); - - str = blobmsg_alloc_string_buffer(&b, "", nr->ssid.ssid_len + 1); - memcpy(str, nr->ssid.ssid, nr->ssid.ssid_len); - str[nr->ssid.ssid_len] = 0; - blobmsg_add_string_buffer(&b); - - len = wpabuf_len(nr->nr); - str = blobmsg_alloc_string_buffer(&b, "", 2 * len + 1); - wpa_snprintf_hex(str, 2 * len + 1, wpabuf_head_u8(nr->nr), len); - blobmsg_add_string_buffer(&b); -} - -static int -hostapd_rrm_nr_get_own(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct hostapd_data *hapd = get_hapd_from_object(obj); - struct hostapd_neighbor_entry *nr; - void *c; - - if (!(hapd->conf->radio_measurements[0] & WLAN_RRM_CAPS_NEIGHBOR_REPORT)) - return UBUS_STATUS_NOT_SUPPORTED; - - nr = hostapd_neighbor_get(hapd, hapd->own_addr, NULL); - if (!nr) - return UBUS_STATUS_NOT_FOUND; - - blob_buf_init(&b, 0); - - c = blobmsg_open_array(&b, "value"); - hostapd_rrm_print_nr(nr); - blobmsg_close_array(&b, c); - - ubus_send_reply(ctx, req, b.head); - - return 0; -} - -static int -hostapd_rrm_nr_list(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct hostapd_data *hapd = get_hapd_from_object(obj); - struct hostapd_neighbor_entry *nr; - void *c; - - if (!(hapd->conf->radio_measurements[0] & WLAN_RRM_CAPS_NEIGHBOR_REPORT)) - return UBUS_STATUS_NOT_SUPPORTED; - - blob_buf_init(&b, 0); - - c = blobmsg_open_array(&b, "list"); - dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry, list) { - void *cur; - - if (!memcmp(nr->bssid, hapd->own_addr, ETH_ALEN)) - continue; - - cur = blobmsg_open_array(&b, NULL); - hostapd_rrm_print_nr(nr); - blobmsg_close_array(&b, cur); - } - blobmsg_close_array(&b, c); - - ubus_send_reply(ctx, req, b.head); - - return 0; -} - -enum { - NR_SET_LIST, - __NR_SET_LIST_MAX -}; - -static const struct blobmsg_policy nr_set_policy[__NR_SET_LIST_MAX] = { - [NR_SET_LIST] = { "list", BLOBMSG_TYPE_ARRAY }, -}; - - -static void -hostapd_rrm_nr_clear(struct hostapd_data *hapd) -{ - struct hostapd_neighbor_entry *nr; - -restart: - dl_list_for_each(nr, &hapd->nr_db, struct hostapd_neighbor_entry, list) { - if (!memcmp(nr->bssid, hapd->own_addr, ETH_ALEN)) - continue; - - hostapd_neighbor_remove(hapd, nr->bssid, &nr->ssid); - goto restart; - } -} - -static int -hostapd_rrm_nr_set(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - static const struct blobmsg_policy nr_e_policy[] = { - { .type = BLOBMSG_TYPE_STRING }, - { .type = BLOBMSG_TYPE_STRING }, - { .type = BLOBMSG_TYPE_STRING }, - }; - struct hostapd_data *hapd = get_hapd_from_object(obj); - struct blob_attr *tb_l[__NR_SET_LIST_MAX]; - struct blob_attr *tb[ARRAY_SIZE(nr_e_policy)]; - struct blob_attr *cur; - int ret = 0; - int rem; - - if (!(hapd->conf->radio_measurements[0] & WLAN_RRM_CAPS_NEIGHBOR_REPORT)) - return UBUS_STATUS_NOT_SUPPORTED; - - blobmsg_parse(nr_set_policy, __NR_SET_LIST_MAX, tb_l, blob_data(msg), blob_len(msg)); - if (!tb_l[NR_SET_LIST]) - return UBUS_STATUS_INVALID_ARGUMENT; - - hostapd_rrm_nr_clear(hapd); - blobmsg_for_each_attr(cur, tb_l[NR_SET_LIST], rem) { - struct wpa_ssid_value ssid; - struct wpabuf *data; - u8 bssid[ETH_ALEN]; - char *s; - - blobmsg_parse_array(nr_e_policy, ARRAY_SIZE(nr_e_policy), tb, blobmsg_data(cur), blobmsg_data_len(cur)); - if (!tb[0] || !tb[1] || !tb[2]) - goto invalid; - - s = blobmsg_get_string(tb[0]); - if (hwaddr_aton(s, bssid)) - goto invalid; - - s = blobmsg_get_string(tb[1]); - ssid.ssid_len = strlen(s); - if (ssid.ssid_len > sizeof(ssid.ssid)) - goto invalid; - - memcpy(&ssid, s, ssid.ssid_len); - data = wpabuf_parse_bin(blobmsg_get_string(tb[2])); - if (!data) - goto invalid; - - hostapd_neighbor_set(hapd, bssid, &ssid, data, NULL, NULL, 0); - wpabuf_free(data); - continue; - -invalid: - ret = UBUS_STATUS_INVALID_ARGUMENT; - } - - return 0; -} - static const struct ubus_method bss_methods[] = { UBUS_METHOD_NOARG("get_clients", hostapd_bss_get_clients), UBUS_METHOD("del_client", hostapd_bss_del_client, del_policy), @@ -624,10 +427,6 @@ static const struct ubus_method bss_methods[] = { UBUS_METHOD("switch_chan", hostapd_switch_chan, csa_policy), #endif UBUS_METHOD("set_vendor_elements", hostapd_vendor_elements, ve_policy), - UBUS_METHOD("notify_response", hostapd_notify_response, notify_policy), - UBUS_METHOD_NOARG("rrm_nr_get_own", hostapd_rrm_nr_get_own), - UBUS_METHOD_NOARG("rrm_nr_list", hostapd_rrm_nr_list), - UBUS_METHOD("rrm_nr_set", hostapd_rrm_nr_set, nr_set_policy), }; static struct ubus_object_type bss_object_type = @@ -724,11 +523,6 @@ int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_req blobmsg_add_u32(&b, "signal", req->frame_info->ssi_signal); blobmsg_add_u32(&b, "freq", hapd->iface->freq); - if (!hapd->ubus.notify_response) { - ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); - return 0; - } - if (ubus_notify_async(ctx, &hapd->ubus.obj, type, b.head, &ureq.nreq)) return 0; @@ -740,17 +534,3 @@ int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_req return 0; } - -void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *addr) -{ - if (!hapd->ubus.obj.has_subscribers) - return; - - if (!addr) - return; - - blob_buf_init(&b, 0); - blobmsg_add_macaddr(&b, "address", addr); - - ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); -} diff --git a/package/network/services/hostapd/src/src/ap/ubus.h b/package/network/services/hostapd/src/src/ap/ubus.h index e3ff981c7..479ddfca7 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.h +++ b/package/network/services/hostapd/src/src/ap/ubus.h @@ -37,7 +37,6 @@ struct hostapd_ubus_iface { struct hostapd_ubus_bss { struct ubus_object obj; struct avl_tree banned; - int notify_response; }; void hostapd_ubus_add_iface(struct hostapd_iface *iface); @@ -46,7 +45,6 @@ void hostapd_ubus_add_bss(struct hostapd_data *hapd); void hostapd_ubus_free_bss(struct hostapd_data *hapd); int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_request *req); -void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *mac); #else @@ -75,9 +73,6 @@ static inline int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct ho return 0; } -static inline void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *mac) -{ -} #endif #endif diff --git a/package/network/services/ipset-dns/Makefile b/package/network/services/ipset-dns/Makefile index 3f21d04c4..2adc9fe03 100644 --- a/package/network/services/ipset-dns/Makefile +++ b/package/network/services/ipset-dns/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=http://git.zx2c4.com/ipset-dns -PKG_SOURCE_DATE:=2017-10-08 -PKG_SOURCE_VERSION:=ade2cf88e933f4f90451e0a6171f0aa4a523f989 -PKG_MIRROR_HASH:=34ad1f5c7d2eab90b795f2a512102891428216e3d439d918a8992846550e9697 +PKG_SOURCE_DATE:=2013-05-03 +PKG_SOURCE_VERSION:=6be3afd819a86136b51c5ae722ab48266187155b +PKG_MIRROR_HASH:=4e34943b547babe705c2fad295ee24a5ee0c93ca03e2a9cdeaf323150f97e60b PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 diff --git a/package/network/services/ipset-dns/patches/100-simultaneous-ipv4-ipv6.patch b/package/network/services/ipset-dns/patches/100-simultaneous-ipv4-ipv6.patch new file mode 100644 index 000000000..19669a05b --- /dev/null +++ b/package/network/services/ipset-dns/patches/100-simultaneous-ipv4-ipv6.patch @@ -0,0 +1,57 @@ +--- a/ipset-dns.c ++++ b/ipset-dns.c +@@ -307,19 +307,20 @@ int main(int argc, char *argv[]) + struct timeval tv; + char msg[512]; + char ip[INET6_ADDRSTRLEN]; +- char *ipset; ++ char *ipset, *ipset6; + int listen_sock, upstream_sock; + int pos, i, size, af; + socklen_t len; + size_t received; + pid_t child; + +- if (argc != 4) { +- fprintf(stderr, "Usage: %s ipset port upstream\n", argv[0]); ++ if (argc != 5) { ++ fprintf(stderr, "Usage: %s ipv4-ipset ipv6-ipset port upstream\n", argv[0]); + return 1; + } + + ipset = argv[1]; ++ ipset6 = argv[2]; + + listen_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + if (listen_sock < 0) { +@@ -329,7 +330,7 @@ int main(int argc, char *argv[]) + + memset(&listen_addr, 0, sizeof(listen_addr)); + listen_addr.sin_family = AF_INET; +- listen_addr.sin_port = htons(atoi(argv[2])); ++ listen_addr.sin_port = htons(atoi(argv[3])); + listen_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + i = 1; + setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(i)); +@@ -341,7 +342,7 @@ int main(int argc, char *argv[]) + memset(&upstream_addr, 0, sizeof(upstream_addr)); + upstream_addr.sin_family = AF_INET; + upstream_addr.sin_port = htons(53); +- inet_aton(argv[3], &upstream_addr.sin_addr); ++ inet_aton(argv[4], &upstream_addr.sin_addr); + + /* TODO: Put all of the below code in several forks all listening on the same sock. */ + +@@ -434,8 +435,11 @@ int main(int argc, char *argv[]) + continue; + } + ++ if ((af == AF_INET && !*ipset) || (af == AF_INET6 && !*ipset6)) ++ continue; ++ + printf("%s: %s\n", answer.dotted, ip); +- if (add_to_ipset(ipset, answer.rdata, af) < 0) ++ if (add_to_ipset((af == AF_INET) ? ipset : ipset6, answer.rdata, af) < 0) + perror("add_to_ipset"); + } + diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index cdd8f99d5..344d682ad 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lldpd -PKG_VERSION:=0.9.9 +PKG_VERSION:=0.9.7 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd -PKG_HASH:=5e9e08f500d21376631cbc9f8e19a4b167cd38eb2d8fd9e660b8e80507f802db +PKG_HASH:=b9360355c30a3c06fd5c0a6e658f2ad8bf77037d5a17c6fcabf20e62882e0db8 PKG_MAINTAINER:=Stijn Tintel PKG_LICENSE:=ISC diff --git a/package/network/services/lldpd/files/lldpd.config b/package/network/services/lldpd/files/lldpd.config index 36b43c89d..d2b3d1545 100644 --- a/package/network/services/lldpd/files/lldpd.config +++ b/package/network/services/lldpd/files/lldpd.config @@ -10,7 +10,7 @@ config lldpd config option lldp_location "2:FR:6:Commercial Rd:3:Roseville:19:4" # if empty, the distribution description is sent - #option lldp_description "OpenWrt System" + #option lldp_description "Lede System" # interfaces to listen on list interface "loopback" diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index c3d9ba050..39bce989b 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -16,7 +16,7 @@ find_release_info() [ -z "$PRETTY_NAME" ] && [ -s /etc/openwrt_version ] && \ PRETTY_NAME="$(cat /etc/openwrt_version)" - echo "${PRETTY_NAME:-Unknown OpenWrt release} @ $(cat /proc/sys/kernel/hostname)" + echo "${PRETTY_NAME:-Unknown Lede release} @ $(cat /proc/sys/kernel/hostname)" } write_lldpd_conf() diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile index 2a22cd874..5ba9e7c7e 100644 --- a/package/network/services/odhcpd/Makefile +++ b/package/network/services/odhcpd/Makefile @@ -8,95 +8,54 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcpd -PKG_RELEASE:=1 -PKG_VERSION:=1.3 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/odhcpd.git -PKG_SOURCE_DATE:=2017-12-22 -PKG_SOURCE_VERSION:=7aa2594c5a127d92fa8f04328ac7b43e595bcaa7 -PKG_MIRROR_HASH:=67ce9303ce2f7a47ca9c54e1ebd984f108066ab0fa4e0d81f39a9cfc2431f90b +PKG_SOURCE_DATE:=2017-10-02 +PKG_SOURCE_VERSION:=c6f3d5d4ea5154e5971fa0b1b1e9a9c07119429f +PKG_MIRROR_HASH:=5ce8f52b5c6acea27d9733918e9c3bc8a154d516a02eef9b172c5e3d459f494c PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 -PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -define Package/odhcpd/default +CMAKE_OPTIONS += -DUBUS=1 + +ifneq ($(CONFIG_PACKAGE_odhcpd_ext_cer_id),0) + CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcpd_ext_cer_id) +endif + + +define Package/odhcpd SECTION:=net CATEGORY:=Network - TITLE:=OpenWrt DHCPv6(-PD)/RA Server & Relay + TITLE:=OpenWrt DHCP/DHCPv6(-PD)/RA Server & Relay DEPENDS:=+libubox +libuci +libubus +libnl-tiny endef -define Package/odhcpd/default/description +define Package/odhcpd/config + config PACKAGE_odhcpd_ext_cer_id + int "CER-ID Extension ID (0 = disabled)" + depends on PACKAGE_odhcpd + default 0 +endef + +define Package/odhcpd/description odhcpd is a daemon for serving and relaying IP management protocols to configure clients and downstream routers. It tries to follow the RFC 6204 requirements for IPv6 home routers. + + odhcpd provides server services for DHCP, RA, stateless and stateful DHCPv6, + prefix delegation and can be used to relay RA, DHCPv6 and NDP between routed + (non-bridged) interfaces in case no delegated prefixes are available. endef -define Package/odhcpd/default/config -menu "Configuration" - depends on PACKAGE_$(1) - -config PACKAGE_odhcpd_$(2)_ext_cer_id - int - default 0 - prompt "CER-ID Extension ID (0 = disabled)" -endmenu -endef - -define Package/odhcpd - $(call Package/odhcpd/default) - TITLE += and DHCPv4 server - VARIANT:=full -endef - -Package/odhcpd/config=$(call Package/odhcpd/default/config,odhcpd,full) - -define Package/odhcpd/description - $(call Package/odhcpd/default/description) - - This is a variant providing server services for DHCPv4, RA, stateless and - stateful DHCPv6, prefix delegation and can be used to relay RA, DHCPv6 and - NDP between routed (non-bridged) interfaces in case no delegated prefixes - are available. -endef - -define Package/odhcpd-ipv6only - $(call Package/odhcpd/default) - VARIANT:=ipv6only -endef - -Package/odhcpd-ipv6only/config=$(call Package/odhcpd/default/config,odhcpd-ipv6only,ipv6only) - -define Package/odhcpd-ipv6only/description - $(call Package/odhcpd/default/description) - - This is a variant providing server services for RA, stateless and stateful - DHCPv6, prefix delegation and can be used to relay RA, DHCPv6 and NDP between - routed (non-bridged) interfaces in case no delegated prefixes are available. -endef - -CMAKE_OPTIONS += -DUBUS=1 - -ifeq ($(BUILD_VARIANT),full) - CMAKE_OPTIONS += -DDHCPV4_SUPPORT=1 -endif - -ifneq ($(CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id),0) - CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id) -endif - define Package/odhcpd/install $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/odhcpd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcpd $(1)/usr/sbin/ $(INSTALL_BIN) ./files/odhcpd-update $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd @@ -104,7 +63,4 @@ define Package/odhcpd/install $(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults endef -Package/odhcpd-ipv6only/install = $(Package/odhcpd/install) - $(eval $(call BuildPackage,odhcpd)) -$(eval $(call BuildPackage,odhcpd-ipv6only)) diff --git a/package/network/services/odhcpd/files/odhcpd.defaults b/package/network/services/odhcpd/files/odhcpd.defaults index cecbdd4a8..175e56e9b 100644 --- a/package/network/services/odhcpd/files/odhcpd.defaults +++ b/package/network/services/odhcpd/files/odhcpd.defaults @@ -22,7 +22,6 @@ set dhcp.odhcpd=odhcpd set dhcp.odhcpd.maindhcp=0 set dhcp.odhcpd.leasefile=/tmp/hosts/odhcpd set dhcp.odhcpd.leasetrigger=/usr/sbin/odhcpd-update -set dhcp.odhcpd.loglevel=4 set dhcp.lan.dhcpv6=$MODE set dhcp.lan.ra=$MODE commit dhcp diff --git a/package/network/services/openvpn-easy-rsa/Makefile b/package/network/services/openvpn-easy-rsa/Makefile index f4b479986..5b7d9be21 100644 --- a/package/network/services/openvpn-easy-rsa/Makefile +++ b/package/network/services/openvpn-easy-rsa/Makefile @@ -9,18 +9,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openvpn-easy-rsa -PKG_VERSION:=3.0.1 -PKG_RELEASE:=1 -PKG_SOURCE_URL:=https://github.com/OpenVPN/easy-rsa/releases/download/$(PKG_VERSION)/ -PKG_SOURCE:=EasyRSA-$(PKG_VERSION).tgz -PKG_HASH:=dbdaf5b9444b99e0c5221fd4bcf15384c62380c1b63cea23d42239414d7b2d4e +PKG_RELEASE=2 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/OpenVPN/easy-rsa.git +PKG_SOURCE_DATE:=2013-01-30 +PKG_SOURCE_VERSION:=ff5bfd1dd8e548cb24d302742af3894f893ef92f +PKG_MIRROR_HASH:=c87704b3906a0c14f51c6677151a9389f698523c7ec07f7c75489ca31786f128 PKG_LICENSE:=GPL-2.0 -PKG_BUILD_DIR:=$(BUILD_DIR)/EasyRSA-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk define Package/openvpn-easy-rsa - TITLE:=CLI utility to build and manage a PKI CA. + TITLE:=Simple shell scripts to manage a Certificate Authority SECTION:=net CATEGORY:=Network URL:=http://openvpn.net @@ -29,8 +30,9 @@ define Package/openvpn-easy-rsa endef define Package/openvpn-easy-rsa/conffiles +/etc/easy-rsa/keys/serial +/etc/easy-rsa/keys/index.txt /etc/easy-rsa/vars -/etc/easy-rsa/openssl-1.0.cnf endef define Build/Configure @@ -43,24 +45,13 @@ endef define Package/openvpn-easy-rsa/install $(INSTALL_DIR) $(1)/usr/sbin - - $(INSTALL_BIN) $(PKG_BUILD_DIR)/easyrsa $(1)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/easy-rsa - $(INSTALL_DATA) $(PKG_BUILD_DIR)/openssl-1.0.cnf $(1)/etc/easy-rsa/openssl-1.0.cnf - $(INSTALL_DATA) $(PKG_BUILD_DIR)/vars.example $(1)/etc/easy-rsa/vars - - $(INSTALL_DIR) $(1)/etc/easy-rsa/pki - chmod 700 $(1)/etc/easy-rsa/pki - $(INSTALL_DIR) $(1)/etc/easy-rsa/pki/private - chmod 700 $(1)/etc/easy-rsa/pki/private - $(INSTALL_DIR) $(1)/etc/easy-rsa/pki/reqs - chmod 700 $(1)/etc/easy-rsa/pki/reqs - - $(INSTALL_DIR) $(1)/etc/easy-rsa/x509-types - $(INSTALL_DATA) $(PKG_BUILD_DIR)/x509-types/* $(1)/etc/easy-rsa/x509-types/ - - $(INSTALL_DIR) $(1)/lib/upgrade/keep.d - $(INSTALL_DATA) files/openvpn-easy-rsa.upgrade $(1)/lib/upgrade/keep.d/$(PKG_NAME) + $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl-1.0.0.cnf $(1)/etc/easy-rsa/openssl-1.0.0.cnf + $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars + $(INSTALL_DIR) $(1)/etc/easy-rsa/keys + $(INSTALL_DATA) files/easy-rsa.index $(1)/etc/easy-rsa/keys/index.txt + $(INSTALL_DATA) files/easy-rsa.serial $(1)/etc/easy-rsa/keys/serial endef $(eval $(call BuildPackage,openvpn-easy-rsa)) diff --git a/package/network/services/openvpn-easy-rsa/files/easy-rsa.index b/package/network/services/openvpn-easy-rsa/files/easy-rsa.index new file mode 100644 index 000000000..e69de29bb diff --git a/package/network/services/openvpn-easy-rsa/files/easy-rsa.serial b/package/network/services/openvpn-easy-rsa/files/easy-rsa.serial new file mode 100644 index 000000000..8a0f05e16 --- /dev/null +++ b/package/network/services/openvpn-easy-rsa/files/easy-rsa.serial @@ -0,0 +1 @@ +01 diff --git a/package/network/services/openvpn-easy-rsa/files/openvpn-easy-rsa.upgrade b/package/network/services/openvpn-easy-rsa/files/openvpn-easy-rsa.upgrade deleted file mode 100644 index 8110b81a4..000000000 --- a/package/network/services/openvpn-easy-rsa/files/openvpn-easy-rsa.upgrade +++ /dev/null @@ -1 +0,0 @@ -/etc/easy-rsa/pki/ diff --git a/package/network/services/openvpn-easy-rsa/patches/100-run-ootb.patch b/package/network/services/openvpn-easy-rsa/patches/100-run-ootb.patch new file mode 100644 index 000000000..4c1b889e3 --- /dev/null +++ b/package/network/services/openvpn-easy-rsa/patches/100-run-ootb.patch @@ -0,0 +1,152 @@ +--- a/easy-rsa/2.0/build-ca ++++ b/easy-rsa/2.0/build-ca +@@ -5,4 +5,4 @@ + # + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --initca $* ++"/usr/sbin/pkitool" --interact --initca $* +--- a/easy-rsa/2.0/build-dh ++++ b/easy-rsa/2.0/build-dh +@@ -1,5 +1,7 @@ + #!/bin/sh + ++. /etc/easy-rsa/vars ++ + # Build Diffie-Hellman parameters for the server side + # of an SSL/TLS connection. + +--- a/easy-rsa/2.0/build-inter ++++ b/easy-rsa/2.0/build-inter +@@ -4,4 +4,4 @@ + # root certificate. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --inter $* ++"/usr/sbin/pkitool" --interact --inter $* +--- a/easy-rsa/2.0/build-key ++++ b/easy-rsa/2.0/build-key +@@ -4,4 +4,4 @@ + # root certificate. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact $* ++"/usr/sbin/pkitool" --interact $* +--- a/easy-rsa/2.0/build-key-pass ++++ b/easy-rsa/2.0/build-key-pass +@@ -4,4 +4,4 @@ + # with a password. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --pass $* ++"/usr/sbin/pkitool" --interact --pass $* +--- a/easy-rsa/2.0/build-key-pkcs12 ++++ b/easy-rsa/2.0/build-key-pkcs12 +@@ -5,4 +5,4 @@ + # the CA certificate as well. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --pkcs12 $* ++"/usr/sbin/pkitool" --interact --pkcs12 $* +--- a/easy-rsa/2.0/build-key-server ++++ b/easy-rsa/2.0/build-key-server +@@ -7,4 +7,4 @@ + # extension in the openssl.cnf file. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --server $* ++"/usr/sbin/pkitool" --interact --server $* +--- a/easy-rsa/2.0/build-req ++++ b/easy-rsa/2.0/build-req +@@ -4,4 +4,4 @@ + # when your root certificate and key is not available locally. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --csr $* ++"/usr/sbin/pkitool" --interact --csr $* +--- a/easy-rsa/2.0/build-req-pass ++++ b/easy-rsa/2.0/build-req-pass +@@ -4,4 +4,4 @@ + # with a password. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --csr --pass $* ++"/usr/sbin/pkitool" --interact --csr --pass $* +--- a/easy-rsa/2.0/clean-all ++++ b/easy-rsa/2.0/clean-all +@@ -1,5 +1,7 @@ + #!/bin/sh + ++. /etc/easy-rsa/vars ++ + # Initialize the $KEY_DIR directory. + # Note that this script does a + # rm -rf on $KEY_DIR so be careful! +--- a/easy-rsa/2.0/inherit-inter ++++ b/easy-rsa/2.0/inherit-inter +@@ -1,5 +1,7 @@ + #!/bin/sh + ++. /etc/easy-rsa/vars ++ + # Build a new PKI which is rooted on an intermediate certificate generated + # by ./build-inter or ./pkitool --inter from a parent PKI. The new PKI should + # have independent vars settings, and must use a different KEY_DIR directory +--- a/easy-rsa/2.0/list-crl ++++ b/easy-rsa/2.0/list-crl +@@ -1,5 +1,7 @@ + #!/bin/sh + ++. /etc/easy-rsa/vars ++ + # list revoked certificates + + CRL="${1:-crl.pem}" +--- a/easy-rsa/2.0/pkitool ++++ b/easy-rsa/2.0/pkitool +@@ -1,5 +1,7 @@ + #!/bin/sh + ++. /etc/easy-rsa/vars ++ + # OpenVPN -- An application to securely tunnel IP networks + # over a single TCP/UDP port, with support for SSL/TLS-based + # session authentication and key exchange, +--- a/easy-rsa/2.0/revoke-full ++++ b/easy-rsa/2.0/revoke-full +@@ -1,5 +1,7 @@ + #!/bin/sh + ++. /etc/easy-rsa/vars ++ + # revoke a certificate, regenerate CRL, + # and verify revocation + +--- a/easy-rsa/2.0/sign-req ++++ b/easy-rsa/2.0/sign-req +@@ -4,4 +4,4 @@ + # with a local root certificate and key. + + export EASY_RSA="${EASY_RSA:-.}" +-"$EASY_RSA/pkitool" --interact --sign $* ++"/usr/sbin/pkitool" --interact --sign $* +--- a/easy-rsa/2.0/vars ++++ b/easy-rsa/2.0/vars +@@ -12,7 +12,7 @@ + # This variable should point to + # the top level of the easy-rsa + # tree. +-export EASY_RSA="`pwd`" ++export EASY_RSA="/etc/easy-rsa" + + # + # This variable should point to +@@ -26,7 +26,7 @@ + # This variable should point to + # the openssl.cnf file included + # with easy-rsa. +-export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA` ++export KEY_CONFIG=`/usr/sbin/whichopensslcnf $EASY_RSA` + + # Edit this variable to point to + # your soon-to-be-created key diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile index ec48e734f..fee0296ed 100644 --- a/package/network/services/openvpn/Makefile +++ b/package/network/services/openvpn/Makefile @@ -25,7 +25,6 @@ PKG_INSTALL:=1 PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0 -PKG_CPE_ID:=cpe:/a:openvpn:openvpn include $(INCLUDE_DIR)/package.mk diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile index 282e8f17f..6c615cab0 100644 --- a/package/network/services/ppp/Makefile +++ b/package/network/services/ppp/Makefile @@ -35,7 +35,7 @@ endef define Package/ppp $(call Package/ppp/Default) - DEPENDS:=+kmod-ppp +libpthread +shellsync + DEPENDS:=+kmod-ppp TITLE:=PPP daemon VARIANT:=default endef diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh index 875714b35..73bc3161c 100755 --- a/package/network/services/ppp/files/ppp.sh +++ b/package/network/services/ppp/files/ppp.sh @@ -223,16 +223,7 @@ proto_pppoe_setup() { json_get_var service service json_get_var host_uniq host_uniq -#By 蝈蝈:并发拨号同步的前期准备 - syncppp_option="" - [ "$(uci get syncdial.config.enabled)" == "1" ] && { - ppp_if_cnt=$(cat /etc/config/network | grep -c "proto 'pppoe'") - syncppp_option="syncppp $ppp_if_cnt" - shellsync $ppp_if_cnt 10 - } - ppp_generic_setup "$config" \ - $syncppp_option \ plugin rp-pppoe.so \ ${ac:+rp_pppoe_ac "$ac"} \ ${service:+rp_pppoe_service "$service"} \ diff --git a/package/network/services/ppp/patches/140-pppoe_compile_fix.patch b/package/network/services/ppp/patches/140-pppoe_compile_fix.patch index d9c9b83a3..2983a75c4 100644 --- a/package/network/services/ppp/patches/140-pppoe_compile_fix.patch +++ b/package/network/services/ppp/patches/140-pppoe_compile_fix.patch @@ -1,27 +1,23 @@ +--- a/pppd/plugins/rp-pppoe/plugin.c ++++ b/pppd/plugins/rp-pppoe/plugin.c +@@ -46,10 +46,10 @@ static char const RCSID[] = + #include + #include + #include +-#include + #include + #include + #include ++#include + + #ifndef _ROOT_PATH + #define _ROOT_PATH "" --- a/pppd/plugins/rp-pppoe/pppoe.h +++ b/pppd/plugins/rp-pppoe/pppoe.h -@@ -48,11 +48,7 @@ - #endif +@@ -86,17 +86,6 @@ typedef unsigned long UINT32_t; - /* Ugly header files on some Linux boxes... */ --#if defined(HAVE_LINUX_IF_H) --#include --#elif defined(HAVE_NET_IF_H) - #include --#endif - - #ifdef HAVE_NET_IF_TYPES_H - #include -@@ -80,22 +76,8 @@ typedef unsigned long UINT32_t; - #error Could not find a 32-bit integer type - #endif - --#ifdef HAVE_LINUX_IF_ETHER_H --#include --#endif -- #include -- + -#ifdef HAVE_NETINET_IF_ETHER_H -#include - @@ -32,10 +28,21 @@ -#include -#endif -#endif -+#include +- + /* Ethernet frame types according to RFC 2516 */ +--- a/pppd/plugins/rp-pppoe/if.c ++++ b/pppd/plugins/rp-pppoe/if.c +@@ -31,7 +31,7 @@ static char const RCSID[] = + #endif + #ifdef HAVE_NET_ETHERNET_H +-#include ++#include + #endif + + #ifdef HAVE_ASM_TYPES_H --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c @@ -16,6 +16,7 @@ @@ -46,7 +53,18 @@ #ifdef HAVE_UNISTD_H #include -@@ -717,6 +718,23 @@ char *xstrdup(const char *s) +@@ -27,10 +28,6 @@ + #include + #endif + +-#ifdef HAVE_NET_ETHERNET_H +-#include +-#endif +- + #ifdef HAVE_ASM_TYPES_H + #include + #endif +@@ -717,6 +714,23 @@ char *xstrdup(const char *s) return ret; } diff --git a/package/network/services/ppp/patches/500-add-pptp-plugin.patch b/package/network/services/ppp/patches/500-add-pptp-plugin.patch index d984e1b16..5ed861d54 100644 --- a/package/network/services/ppp/patches/500-add-pptp-plugin.patch +++ b/package/network/services/ppp/patches/500-add-pptp-plugin.patch @@ -1064,7 +1064,7 @@ + struct in_addr localbind); --- /dev/null +++ b/pppd/plugins/pptp/pptp_ctrl.c -@@ -0,0 +1,1077 @@ +@@ -0,0 +1,1078 @@ +/* pptp_ctrl.c ... handle PPTP control connection. + * C. Scott Ananian + * @@ -1083,6 +1083,7 @@ +#include +#include +#include ++#include "pppd.h" +#include "pptp_msg.h" +#include "pptp_ctrl.h" +#include "pptp_options.h" diff --git a/package/network/services/ppp/patches/511-syncppp.patch b/package/network/services/ppp/patches/511-syncppp.patch deleted file mode 100644 index fe58b8cc8..000000000 --- a/package/network/services/ppp/patches/511-syncppp.patch +++ /dev/null @@ -1,214 +0,0 @@ -diff -Naur ppp-2.4.5.0/pppd/chap-new.c ppp-2.4.5/pppd/chap-new.c ---- ppp-2.4.5.0/pppd/chap-new.c 2012-04-18 15:44:46.000000000 +0800 -+++ ppp-2.4.5/pppd/chap-new.c 2012-04-19 20:24:28.000000000 +0800 -@@ -37,6 +37,8 @@ - #include "chap-new.h" - #include "chap-md5.h" - -+#include "syncppp.h" -+ - #ifdef CHAPMS - #include "chap_ms.h" - #define MDTYPE_ALL (MDTYPE_MICROSOFT_V2 | MDTYPE_MICROSOFT | MDTYPE_MD5) -@@ -481,6 +483,19 @@ - p[2] = len >> 8; - p[3] = len; - -+ if (npppd > 1) { -+ if (syncppp(npppd) < 0) { -+ error("syncppp sync fail"); -+ sem_unlink(SEM_COUNT_NAME); -+ sem_unlink(SEM_BLOCK_NAME); -+ } else { -+ info("syncppp sync succeeded"); -+ } -+ } else { -+ info("syncppp not active"); -+ } -+ -+ - output(0, response, PPP_HDRLEN + len); - } - -diff -Naur ppp-2.4.5.0/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux ---- ppp-2.4.5.0/pppd/Makefile.linux 2012-04-18 15:44:46.000000000 +0800 -+++ ppp-2.4.5/pppd/Makefile.linux 2012-04-19 20:01:05.000000000 +0800 -@@ -13,16 +13,16 @@ - - PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap-new.c md5.c ccp.c \ - ecp.c ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c \ -- demand.c utils.c tty.c eap.c chap-md5.c session.c -+ demand.c utils.c tty.c eap.c chap-md5.c session.c syncppp.c - - HEADERS = ccp.h session.h chap-new.h ecp.h fsm.h ipcp.h \ - ipxcp.h lcp.h magic.h md5.h patchlevel.h pathnames.h pppd.h \ -- upap.h eap.h -+ upap.h eap.h syncppp.h - - MANPAGES = pppd.8 - PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o \ - ecp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o \ -- eap.o chap-md5.o session.o -+ eap.o chap-md5.o session.o syncppp.o - - # - # include dependencies if present -@@ -33,7 +33,7 @@ - # CC = gcc - # - COPTS = -O2 -pipe -Wall -g --LIBS = -+LIBS = -lpthread - - # Uncomment the next 2 lines to include support for Microsoft's - # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux. -diff -Naur ppp-2.4.5.0/pppd/options.c ppp-2.4.5/pppd/options.c ---- ppp-2.4.5.0/pppd/options.c 2012-04-18 15:44:46.000000000 +0800 -+++ ppp-2.4.5/pppd/options.c 2012-04-19 20:24:49.000000000 +0800 -@@ -126,6 +126,7 @@ - bool dryrun; /* print out option values and exit */ - char *domain; /* domain name set by domain option */ - int child_wait = 5; /* # seconds to wait for children at exit */ -+int npppd = 0; /* synchronize between multiple pppd */ - struct userenv *userenv_list; /* user environment variables */ - - #ifdef MAXOCTETS -@@ -311,6 +312,10 @@ - "Set pathname of ipv6-down script", - OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN }, - -+ { "syncppp", o_int, &npppd, -+ "sync among multiple pppd when sending chap/pap respond", OPT_PRIO }, -+ -+ - #ifdef HAVE_MULTILINK - { "multilink", o_bool, &multilink, - "Enable multilink operation", OPT_PRIO | 1 }, -diff -Naur ppp-2.4.5.0/pppd/pppd.h ppp-2.4.5/pppd/pppd.h ---- ppp-2.4.5.0/pppd/pppd.h 2012-04-18 15:44:46.000000000 +0800 -+++ ppp-2.4.5/pppd/pppd.h 2012-04-19 20:25:02.000000000 +0800 -@@ -327,6 +327,7 @@ - extern bool dump_options; /* print out option values */ - extern bool dryrun; /* check everything, print options, exit */ - extern int child_wait; /* # seconds to wait for children at end */ -+extern int npppd; /* synchronize between multiple pppd */ - - #ifdef MAXOCTETS - extern unsigned int maxoctets; /* Maximum octetes per session (in bytes) */ -diff -Naur ppp-2.4.5.0/pppd/syncppp.c ppp-2.4.5/pppd/syncppp.c ---- ppp-2.4.5.0/pppd/syncppp.c 1970-01-01 08:00:00.000000000 +0800 -+++ ppp-2.4.5/pppd/syncppp.c 2012-04-18 15:46:59.000000000 +0800 -@@ -0,0 +1,75 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include "pppd.h" -+#include "syncppp.h" -+ -+int syncppp(int nproc) -+{ -+ int flags; -+ int value; -+ sem_t *block; -+ sem_t *count; -+ struct timespec ts; -+ -+ if (nproc <= 1) { -+ error("syncppp: number of pppd should be larger than 1"); -+ return -1; -+ } -+ -+ if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { -+ error("clock_gettime error"); -+ return -1; -+ } -+ ts.tv_sec += SYNCPPP_TIMEOUT; -+ -+ -+ flags = O_RDWR | O_CREAT; -+ block = sem_open(SEM_BLOCK_NAME, flags, 0644, 0); -+ count = sem_open(SEM_COUNT_NAME, flags, 0644, 0); -+ if (block == SEM_FAILED || count == SEM_FAILED) { -+ error("syncppp: sem_open failed"); -+ return -1; -+ } -+ -+ if (sem_post(count) < 0) { -+ error("syncppp: sem_post failed"); -+ return -1; -+ } -+ if (sem_getvalue(count, &value) < 0) { -+ error("syncppp: sem_getvalue failed"); -+ return -1; -+ } -+ info("%d pppd have arrived, waiting for the left %d", value, nproc-value); -+ if (value >= nproc) { -+ while (nproc-1 > 0) { -+ if (sem_post(block) < 0) { -+ error("syncppp: sem_post failed"); -+ return -1; -+ } -+ nproc--; -+ } -+ } else { -+ if (sem_timedwait(block, &ts) < 0) { -+ if (errno == ETIMEDOUT) { -+ error("syncppp: sem_timewait time out"); -+ } else { -+ error("syncppp: sem_timewait error"); -+ } -+ return -1; -+ } -+ -+ } -+ -+ sem_close(count); -+ sem_close(block); -+ -+ sem_unlink(SEM_COUNT_NAME); -+ sem_unlink(SEM_BLOCK_NAME); -+ -+ return 0; -+} -+ -diff -Naur ppp-2.4.5.0/pppd/syncppp.h ppp-2.4.5/pppd/syncppp.h ---- ppp-2.4.5.0/pppd/syncppp.h 1970-01-01 08:00:00.000000000 +0800 -+++ ppp-2.4.5/pppd/syncppp.h 2012-04-18 15:46:59.000000000 +0800 -@@ -0,0 +1,3 @@ -+#define SEM_BLOCK_NAME "block" -+#define SEM_COUNT_NAME "count" -+#define SYNCPPP_TIMEOUT 5 -diff -Naur ppp-2.4.5.0/pppd/upap.c ppp-2.4.5/pppd/upap.c ---- ppp-2.4.5.0/pppd/upap.c 2012-04-18 15:44:46.000000000 +0800 -+++ ppp-2.4.5/pppd/upap.c 2012-04-19 20:26:22.000000000 +0800 -@@ -52,6 +52,8 @@ - #include "pppd.h" - #include "upap.h" - -+#include "syncppp.h" -+ - static const char rcsid[] = RCSID; - - static bool hide_password = 1; -@@ -568,6 +570,18 @@ - PUTCHAR(u->us_passwdlen, outp); - BCOPY(u->us_passwd, outp, u->us_passwdlen); - -+ if (npppd > 1) { -+ if (syncppp(npppd) < 0) { -+ error("syncppp sync fail"); -+ sem_unlink(SEM_COUNT_NAME); -+ sem_unlink(SEM_BLOCK_NAME); -+ } else { -+ info("syncppp sync succeeded"); -+ } -+ } else { -+ info("syncppp not active"); -+ } -+ - output(u->us_unit, outpacket_buf, outlen + PPP_HDRLEN); - - TIMEOUT(upap_timeout, u, u->us_timeouttime); diff --git a/package/network/services/ppp/patches/520-uniq.patch b/package/network/services/ppp/patches/520-uniq.patch index 65d0e96bc..54c0d6271 100644 --- a/package/network/services/ppp/patches/520-uniq.patch +++ b/package/network/services/ppp/patches/520-uniq.patch @@ -147,7 +147,7 @@ strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam)); --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c -@@ -348,7 +348,7 @@ packetIsForMe(PPPoEConnection *conn, PPP +@@ -344,7 +344,7 @@ packetIsForMe(PPPoEConnection *conn, PPP if (memcmp(packet->ethHdr.h_dest, conn->myEth, ETH_ALEN)) return 0; /* If we're not using the Host-Unique tag, then accept the packet */ @@ -156,7 +156,7 @@ parsePacket(packet, parseForHostUniq, &forMe); return forMe; -@@ -474,16 +474,12 @@ sendPADI(PPPoEConnection *conn) +@@ -470,16 +470,12 @@ sendPADI(PPPoEConnection *conn) cursor += namelen + TAG_HDR_SIZE; /* If we're using Host-Uniq, copy it over */ @@ -179,7 +179,7 @@ } packet.length = htons(plen); -@@ -645,7 +641,7 @@ int main(int argc, char *argv[]) +@@ -641,7 +637,7 @@ int main(int argc, char *argv[]) memset(conn, 0, sizeof(PPPoEConnection)); @@ -188,7 +188,7 @@ switch(opt) { case 'S': conn->serviceName = xstrdup(optarg); -@@ -654,7 +650,23 @@ int main(int argc, char *argv[]) +@@ -650,7 +646,23 @@ int main(int argc, char *argv[]) conn->acName = xstrdup(optarg); break; case 'U': @@ -224,7 +224,7 @@ /* How do we access raw Ethernet devices? */ #undef USE_LINUX_PACKET -@@ -217,7 +219,7 @@ typedef struct PPPoEConnectionStruct { +@@ -224,7 +226,7 @@ typedef struct PPPoEConnectionStruct { char *serviceName; /* Desired service name, if any */ char *acName; /* Desired AC name, if any */ int synchronous; /* Use synchronous PPP */ @@ -233,7 +233,7 @@ int printACNames; /* Just print AC names */ FILE *debugFile; /* Debug file for dumping packets */ int numPADOs; /* Number of PADO packets received */ -@@ -273,6 +275,33 @@ void pppoe_printpkt(PPPoEPacket *packet, +@@ -280,6 +282,33 @@ void pppoe_printpkt(PPPoEPacket *packet, void (*printer)(void *, char *, ...), void *arg); void pppoe_log_packet(const char *prefix, PPPoEPacket *packet); diff --git a/package/network/services/samba36/Makefile b/package/network/services/samba36/Makefile index 42c23b4e8..beb5f309c 100644 --- a/package/network/services/samba36/Makefile +++ b/package/network/services/samba36/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=samba PKG_VERSION:=3.6.25 -PKG_RELEASE:=9 +PKG_RELEASE:=8 PKG_SOURCE_URL:=https://download.samba.org/pub/samba \ https://download.samba.org/pub/samba/stable @@ -18,7 +18,8 @@ PKG_HASH:=8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:samba:samba + +PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 @@ -29,29 +30,19 @@ CONFIGURE_PATH:=source3 PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin -define Package/samba/Default +define Package/samba36-server SECTION:=net CATEGORY:=Network - TITLE:=Samba 3.6 SMB/CIFS + TITLE:=Samba 3.6 SMB/CIFS server URL:=https://www.samba.org/ - MAINTAINER:=Felix Fietkau -endef - -define Package/samba36-server - $(call Package/samba/Default) - TITLE+= server DEPENDS:=+USE_GLIBC:librt $(ICONV_DEPENDS) endef define Package/samba36-client - $(call Package/samba/Default) - TITLE+= client - DEPENDS:=+libreadline +libncurses -endef - -define Package/samba36-net - $(call Package/samba/Default) - TITLE+= net commands + SECTION:=net + CATEGORY:=Network + TITLE:=Samba 3.6 SMB/CIFS client + URL:=https://www.samba.org/ DEPENDS:=+libreadline +libncurses endef @@ -60,6 +51,7 @@ define Package/samba36-server/config int "Maximum level of compiled-in debug messages" depends on PACKAGE_samba36-server || PACKAGE_samba36-client default -1 + endef define Package/samba36-server/description @@ -164,12 +156,6 @@ define Package/samba36-client/install $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin endef -define Package/samba36-net/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_BIN)/net $(1)/usr/sbin -endef - $(eval $(call BuildPackage,samba36-client)) $(eval $(call BuildPackage,samba36-server)) -$(eval $(call BuildPackage,samba36-net)) diff --git a/package/network/services/samba36/files/samba.config b/package/network/services/samba36/files/samba.config index c79db0d32..b34a8dcaa 100644 --- a/package/network/services/samba36/files/samba.config +++ b/package/network/services/samba36/files/samba.config @@ -1,6 +1,6 @@ config samba - option 'name' 'OpenWrt' + option 'name' 'Lede' option 'workgroup' 'WORKGROUP' - option 'description' 'OpenWrt' + option 'description' 'Lede' option 'homes' '1' diff --git a/package/network/services/samba36/files/samba.init b/package/network/services/samba36/files/samba.init index ae0e0e230..28b0064df 100755 --- a/package/network/services/samba36/files/samba.init +++ b/package/network/services/samba36/files/samba.init @@ -23,9 +23,9 @@ smb_header() { local name workgroup description charset local hostname="$(uci_get system.@system[0].hostname)" - config_get name $1 name "${hostname:-OpenWrt}" - config_get workgroup $1 workgroup "${hostname:-OpenWrt}" - config_get description $1 description "Samba on ${hostname:-OpenWrt}" + config_get name $1 name "${hostname:-Lede}" + config_get workgroup $1 workgroup "${hostname:-Lede}" + config_get description $1 description "Samba on ${hostname:-Lede}" config_get charset $1 charset "UTF-8" mkdir -p /var/etc diff --git a/package/network/services/shellsync/Makefile b/package/network/services/shellsync/Makefile deleted file mode 100644 index 6dce14b35..000000000 --- a/package/network/services/shellsync/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=shellsync -PKG_VERSION:=0.2 -PKG_RELEASE:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/shellsync - CATEGORY:=Utilities - TITLE:=shellsync - DEPENDS:=+libpthread -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ -endef - -define Package/shellsync/description -A tool to sync different shell scripts.Based on syncppp patch by morfast. -endef - -define Build/Compile - $(TARGET_CROSS)gcc -pthread -o $(PKG_BUILD_DIR)/shellsync $(PKG_BUILD_DIR)/shellsync.c -endef - -define Package/shellsync/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/shellsync $(1)/usr/bin -endef - - -$(eval $(call BuildPackage,shellsync)) diff --git a/package/network/services/shellsync/src/shellsync.c b/package/network/services/shellsync/src/shellsync.c deleted file mode 100644 index 4aef1e9ba..000000000 --- a/package/network/services/shellsync/src/shellsync.c +++ /dev/null @@ -1,106 +0,0 @@ -/************************************************************************* - > File Name: shellsync.c - > Author: GuoGuo - > Mail: gch981213@gmail.com - > Created Time: 2014年11月06日 星期四 19时15分30秒 - ************************************************************************/ -#include -#include -#include -#include -#include -#include -#define SEM_BLOCK_NAME "SYNCSHELL_block" -#define SEM_COUNT_NAME "SYNCSHELL_count" -int wait_timeout; -int sync_wait(int nproc) -{ - int flags; - int value; - sem_t *block; - sem_t *count; - struct timespec ts; - - if (nproc <= 1) { - printf("sync_wait: number of processes should be larger than 1\n"); - return -1; - } - - if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { - printf("clock_gettime error\n"); - return -1; - } - ts.tv_sec += wait_timeout; - - - flags = O_RDWR | O_CREAT; - block = sem_open(SEM_BLOCK_NAME, flags, 0644, 0); - count = sem_open(SEM_COUNT_NAME, flags, 0644, 0); - if (block == SEM_FAILED || count == SEM_FAILED) { - printf("sync_wait: sem_open failed\n"); - return -1; - } - - if (sem_post(count) < 0) { - printf("sync_wait: sem_post failed\n"); - return -1; - } - if (sem_getvalue(count, &value) < 0) { - printf("sync_wait: sem_getvalue failed\n"); - return -1; - } - printf("%d processes have arrived, waiting for the left %d\n", value, nproc-value); - if (value >= nproc) { - while (nproc-1 > 0) { - if (sem_post(block) < 0) { - printf("sync_wait: sem_post failed\n"); - return -1; - } - nproc--; - } - } else { - if (sem_timedwait(block, &ts) < 0) { - if (errno == ETIMEDOUT) { - printf("sync_wait: sem_timewait time out\n"); - } else { - printf("sync_wait: sem_timewait error\n"); - } - return -1; - } - - } - - sem_close(count); - sem_close(block); - - sem_unlink(SEM_COUNT_NAME); - sem_unlink(SEM_BLOCK_NAME); - - return 0; -} - -int main(int argc,char *argv[]) -{ - if(argc!=3) - { - printf("Usage: shellsync \n"); - } - else - { - int proc_num; - sscanf(argv[1],"%d",&proc_num); - sscanf(argv[2],"%d",&wait_timeout); - if(sync_wait(proc_num)<0) - { - printf("Processes sync failed.\n"); - sem_unlink(SEM_COUNT_NAME); - sem_unlink(SEM_BLOCK_NAME); - return 1; - } - else - { - printf("Processes sync succeed.\n"); - return 0; - } - } -} diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index f2d061c09..465e54349 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -19,7 +19,6 @@ PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC PKG_BUILD_DEPENDS = ustream-ssl -PKG_CONFIG_DEPENDS:= CONFIG_uhttpd_lua include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -44,12 +43,12 @@ define Package/uhttpd/description endef define Package/uhttpd/config - config uhttpd_lua - depends on PACKAGE_uhttpd-mod-lua - bool "Enable Integrated Lua interpreter" - default y + config PACKAGE_uhttpd_debug + bool "Build with debug messages" + default n endef + define Package/uhttpd-mod-lua $(Package/uhttpd/default) TITLE+= (Lua plugin) @@ -107,16 +106,6 @@ define Package/uhttpd-mod-ubus/install $(INSTALL_DATA) ./files/ubus.default $(1)/etc/uci-defaults/00_uhttpd_ubus endef -define Package/uhttpd-mod-lua/postinst - $(if $(CONFIG_uhttpd_lua), - #!/bin/sh - if [ -f $${IPKG_INSTROOT}/www/index.html ] - then - sed -e 's:/cgi-bin::g' -i $${IPKG_INSTROOT}/www/index.html - fi - ,) -endef - $(eval $(call BuildPackage,uhttpd)) $(eval $(call BuildPackage,uhttpd-mod-lua)) diff --git a/package/network/services/uhttpd/files/uhttpd.config b/package/network/services/uhttpd/files/uhttpd.config index a7d769e18..89f99aaee 100644 --- a/package/network/services/uhttpd/files/uhttpd.config +++ b/package/network/services/uhttpd/files/uhttpd.config @@ -51,8 +51,8 @@ config uhttpd main # Lua url prefix and handler script. # Lua support is disabled if no prefix given. - option lua_prefix /luci - option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua +# option lua_prefix /luci +# option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua # Specify the ubus-rpc prefix and socket path. # option ubus_prefix /ubus @@ -83,7 +83,7 @@ config uhttpd main option tcp_keepalive 1 # Basic auth realm, defaults to local hostname -# option realm OpenWrt +# option realm Lede # Configuration file in busybox httpd format # option config /etc/httpd.conf diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init index 47270bcc1..6b8be1c7e 100755 --- a/package/network/services/uhttpd/files/uhttpd.init +++ b/package/network/services/uhttpd/files/uhttpd.init @@ -52,7 +52,7 @@ generate_keys() { [ -n "$GENKEY_CMD" ] && { $GENKEY_CMD \ -days ${days:-730} -newkey rsa:${bits:-2048} -keyout "${UHTTPD_KEY}.new" -out "${UHTTPD_CERT}.new" \ - -subj /C="${country:-ZZ}"/ST="${state:-Somewhere}"/L="${location:-Unknown}"/O="${commonname:-OpenWrt}$UNIQUEID"/CN="${commonname:-OpenWrt}" + -subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/O="${commonname:-Lede}$UNIQUEID"/CN="${commonname:-Lede}" sync mv "${UHTTPD_KEY}.new" "${UHTTPD_KEY}" mv "${UHTTPD_CERT}.new" "${UHTTPD_CERT}" diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile index 7fae197fe..cdafa5be1 100644 --- a/package/network/services/umdns/Makefile +++ b/package/network/services/umdns/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL=$(LEDE_GIT)/project/mdnsd.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2018-01-02 -PKG_SOURCE_VERSION:=78974417e182a3de8f78b7d73366ec0c98396b6c -PKG_MIRROR_HASH:=a60f9eb9428ac3256cd7c3c6d4207c116cedf4d212b82e2f86c1bf7c7898fcbb +PKG_SOURCE_DATE:=2017-05-22 +PKG_SOURCE_VERSION:=0e8b948ff8dd1cb1763180c99b522390529c7841 +PKG_MIRROR_HASH:=1cdd25464e1be69bef56092bc8547ba254ffc2d7c32f13cf02a80c8742876f1b PKG_MAINTAINER:=John Crispin PKG_LICENSE:=LGPL-2.1 diff --git a/package/network/utils/adb-enablemodem/Makefile b/package/network/utils/adb-enablemodem/Makefile deleted file mode 100644 index 3ffc64af0..000000000 --- a/package/network/utils/adb-enablemodem/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=adb-enablemodem -PKG_VERSION:=2017-03-05 -PKG_RELEASE:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/adb-enablemodem - SECTION:=net - CATEGORY:=Network - SUBMENU:=WWAN - TITLE:=Enable modem via adb - DEPENDS:=+adb -endef - -define Build/Compile - true -endef - -define Package/adb-enablemodem/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/adb-enablemodem $(1)/etc/init.d/adb-enablemodem -endef - -$(eval $(call BuildPackage,adb-enablemodem)) diff --git a/package/network/utils/adb-enablemodem/files/adb-enablemodem b/package/network/utils/adb-enablemodem/files/adb-enablemodem deleted file mode 100644 index ddfc681a0..000000000 --- a/package/network/utils/adb-enablemodem/files/adb-enablemodem +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 - -adb_exec() { - adb -s "$serial" shell "( $1 ) >/dev/null 2>&1"'; printf "\nEXIT_CODE: %i\n" $?' | head -c 64 | grep -qx 'EXIT_CODE: 0\r\?' -} - -enablemodem_do() { - logger -t adb-enablemodem 'INFO: waiting for device' - adb wait-for-device - serial="$(adb get-serialno)" - - vendor_id="$(adb -s "$serial" shell 'uci get product.usb.vid' | head -c 16 | tr -d '\r\n')" - product_id="$(adb -s "$serial" shell 'uci get product.usb.pid' | head -c 16 | tr -d '\r\n')" - - case "$vendor_id:$product_id" in - "0x2357:0x000D") # TP-LINK LTE MODULE - case "$1" in - start) - if adb_exec ' - chmod +x /WEBSERVER/www/cgi-bin/* - fds="$(ls /proc/$$/fd | grep -v "^[012]$")" - for fd in $fds; do - eval "exec $fd>&-" - done - start-stop-daemon -x httpd -S -- -h /WEBSERVER/www/ - '; then - logger -t adb-enablemodem 'INFO: httpd on modem started' - else - logger -t adb-enablemodem 'ERROR: failed to start httpd on modem' - fi - option_newid='/sys/bus/usb-serial/drivers/option1/new_id' - if [ -e "$option_newid" ]; then - printf '%s %s' "$vendor_id" "$product_id" > "$option_newid" - fi - ;; - stop) - if adb_exec 'start-stop-daemon -x httpd -K'; then - logger -t adb-enablemodem 'INFO: httpd on modem stopped' - else - logger -t adb-enablemodem 'ERROR: failed to stop httpd on modem' - fi - ;; - esac - ;; - *) - logger -t adb-enablemodem "ERROR: unknown device $vendor_id:$product_id" - ;; - esac -} - -start() { - ( enablemodem_do start ) & -} - -stop() { - ( enablemodem_do stop ) & -} - -restart() { - ( enablemodem_do stop; enablemodem_do start ) & -} - diff --git a/package/network/utils/arptables/Makefile b/package/network/utils/arptables/Makefile index d1168ae68..d2fd2593a 100644 --- a/package/network/utils/arptables/Makefile +++ b/package/network/utils/arptables/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=arptables PKG_RELEASE:=1 -PKG_SOURCE_URL:=https://git.netfilter.org/arptables +PKG_SOURCE_URL:=git://git.netfilter.org/arptables PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2015-05-20 PKG_SOURCE_VERSION:=f4ab8f63f11a72f14687a6646d04ae1bae3fa45f diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile index 3b7f4b902..ce99a2a68 100644 --- a/package/network/utils/comgt/Makefile +++ b/package/network/utils/comgt/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=comgt PKG_VERSION:=0.32 -PKG_RELEASE:=30 +PKG_RELEASE:=29 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/comgt diff --git a/package/network/utils/comgt/files/ncm.json b/package/network/utils/comgt/files/ncm.json index bbdb30c5e..8f74e173d 100644 --- a/package/network/utils/comgt/files/ncm.json +++ b/package/network/utils/comgt/files/ncm.json @@ -63,16 +63,5 @@ }, "connect": "AT*ENAP=1,${profile}", "disconnect": "AT*ENAP=0" - }, - "mtk1": { - "initialize": [ - "AT+CFUN=1" - ], - "configure": [ - "AT+CGDCONT=${profile},\\\"${pdptype}\\\",\\\"${apn}\\\",0,0" - ], - "connect": "AT+CGACT=1,${profile}", - "finalize": "AT+CGDATA=\\\"M-MBIM\\\",${profile},1", - "disconnect": "AT+CGACT=0,${profile}" } } diff --git a/package/network/utils/comgt/files/ncm.sh b/package/network/utils/comgt/files/ncm.sh index 60b39655e..73d1e05e3 100644 --- a/package/network/utils/comgt/files/ncm.sh +++ b/package/network/utils/comgt/files/ncm.sh @@ -25,7 +25,7 @@ proto_ncm_init_config() { proto_ncm_setup() { local interface="$1" - local manufacturer initialize setmode connect finalize ifname devname devpath + local manufacturer initialize setmode connect ifname devname devpath local device apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS json_get_vars device apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS @@ -105,21 +105,9 @@ proto_ncm_setup() { return 1 } } - - json_get_values configure configure - echo "Configuring modem" - for i in $configure; do - eval COMMAND="$i" gcom -d "$device" -s /etc/gcom/runcommand.gcom || { - echo "Failed to configure modem" - proto_notify_error "$interface" CONFIGURE_FAILED - return 1 - } - done - [ -n "$mode" ] && { json_select modes json_get_var setmode "$mode" - echo "Setting mode" eval COMMAND="$setmode" gcom -d "$device" -s /etc/gcom/runcommand.gcom || { echo "Failed to set operating mode" proto_notify_error "$interface" SETMODE_FAILED @@ -130,16 +118,14 @@ proto_ncm_setup() { echo "Starting network $interface" json_get_vars connect - echo "Connecting modem" eval COMMAND="$connect" gcom -d "$device" -s /etc/gcom/runcommand.gcom || { echo "Failed to connect" proto_notify_error "$interface" CONNECT_FAILED return 1 } - json_get_vars finalize - echo "Setting up $ifname" + proto_init_update "$ifname" 1 proto_add_data json_add_string "manufacturer" "$manufacturer" @@ -164,15 +150,6 @@ proto_ncm_setup() { proto_add_dynamic_defaults ubus call network add_dynamic "$(json_dump)" } - - [ -n "$finalize" ] && { - eval COMMAND="$finalize" gcom -d "$device" -s /etc/gcom/runcommand.gcom || { - echo "Failed to configure modem" - proto_notify_error "$interface" FINALIZE_FAILED - return 1 - } - } - } proto_ncm_teardown() { diff --git a/package/network/utils/conntrack-tools/Makefile b/package/network/utils/conntrack-tools/Makefile index f04ac69d2..128fa9e6f 100644 --- a/package/network/utils/conntrack-tools/Makefile +++ b/package/network/utils/conntrack-tools/Makefile @@ -8,17 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=conntrack-tools +PKG_VERSION:=1.4.4 PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://git.netfilter.org/conntrack-tools -PKG_SOURCE_DATE:=2017-09-27 -PKG_SOURCE_VERSION:=eefe649ca51ed0cbb995454cdc366f5072f6443c -PKG_MIRROR_HASH:=1c207c3e423d741fbb31e3c29486a811e6dad493f26ec47a2df75b6262a1b4bd +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + http://www.netfilter.org/projects/conntrack-tools/files \ + ftp://ftp.netfilter.org/pub/conntrack-tools \ + http://mirrors.evolva.ro/netfilter.org/conntrack-tools +PKG_HASH:=b7caf4fcc4c03575df57d25e5216584d597fd916c891f191dac616ce68bdba6c PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 -PKG_CPE_ID:=cpe:/a:conntrack-tools_project:conntrack-tools PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/package/network/utils/curl/Config.in b/package/network/utils/curl/Config.in index 973da3d96..6fa10b678 100644 --- a/package/network/utils/curl/Config.in +++ b/package/network/utils/curl/Config.in @@ -9,8 +9,8 @@ choice config LIBCURL_MBEDTLS bool "mbed TLS" - config LIBCURL_WOLFSSL - bool "wolfSSL" + config LIBCURL_CYASSL + bool "CyaSSL" config LIBCURL_OPENSSL bool "OpenSSL" @@ -101,10 +101,6 @@ config LIBCURL_TFTP bool "TFTP protocol" default n -config LIBCURL_NGHTTP2 - bool "HTTP2 protocol" - default n - comment "Miscellaneous" config LIBCURL_PROXY diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile index 17fcf704d..5d829547a 100644 --- a/package/network/utils/curl/Makefile +++ b/package/network/utils/curl/Makefile @@ -8,19 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=curl -PKG_VERSION:=7.57.0 -PKG_RELEASE:=1 +PKG_VERSION:=7.52.1 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://dl.uxnr.de/mirror/curl/ \ - http://curl.mirror.anstey.ca/ \ - http://curl.askapache.com/download/ \ - https://curl.haxx.se/download/ -PKG_HASH:=c92fe31a348eae079121b73884065e600c533493eb50f1f6cee9c48a3f454826 +PKG_SOURCE_URL:=http://curl.haxx.se/download/ \ + http://www.mirrorspace.org/curl/ \ + ftp://ftp.sunet.se/pub/www/utilities/curl/ \ + ftp://ftp.planetmirror.com/pub/curl/ \ + http://www.mirrormonster.com/curl/download/ \ + http://curl.mirrors.cyberservers.net/download/ +PKG_HASH:=d16185a767cb2c1ba3d5b9096ec54e5ec198b213f45864a38b3bda4bbf87389b PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:haxx:libcurl PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 @@ -28,7 +29,7 @@ PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS:= \ CONFIG_IPV6 \ \ - CONFIG_LIBCURL_WOLFSSL \ + CONFIG_LIBCURL_CYASSL \ CONFIG_LIBCURL_GNUTLS \ CONFIG_LIBCURL_OPENSSL \ CONFIG_LIBCURL_MBEDTLS \ @@ -54,7 +55,6 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_LIBCURL_SMTP \ CONFIG_LIBCURL_TELNET \ CONFIG_LIBCURL_TFTP \ - CONFIG_LIBCURL_NGHTTP2 \ \ CONFIG_LIBCURL_COOKIES \ CONFIG_LIBCURL_CRYPTO_AUTH \ @@ -86,9 +86,8 @@ define Package/libcurl $(call Package/curl/Default) SECTION:=libs CATEGORY:=Libraries - DEPENDS:= +LIBCURL_WOLFSSL:libwolfssl +LIBCURL_OPENSSL:libopenssl +LIBCURL_GNUTLS:libgnutls +LIBCURL_MBEDTLS:libmbedtls - DEPENDS += +LIBCURL_ZLIB:zlib +LIBCURL_THREADED_RESOLVER:libpthread +LIBCURL_LDAP:libopenldap +LIBCURL_LIBIDN:libidn - DEPENDS += +LIBCURL_SSH2:libssh2 +LIBCURL_NGHTTP2:libnghttp2 + DEPENDS:= +LIBCURL_CYASSL:libcyassl +LIBCURL_OPENSSL:libopenssl +LIBCURL_GNUTLS:libgnutls +LIBCURL_MBEDTLS:libmbedtls + DEPENDS += +LIBCURL_ZLIB:zlib +LIBCURL_THREADED_RESOLVER:libpthread +LIBCURL_LDAP:libopenldap +LIBCURL_LIBIDN:libidn +LIBCURL_SSH2:libssh2 TITLE:=A client-side URL transfer library MENU:=1 endef @@ -114,7 +113,7 @@ CONFIGURE_ARGS += \ \ $(call autoconf_bool,CONFIG_IPV6,ipv6) \ \ - $(if $(CONFIG_LIBCURL_WOLFSSL),--with-cyassl="$(STAGING_DIR)/usr" --without-ca-path --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-cyassl) \ + $(if $(CONFIG_LIBCURL_CYASSL),--with-cyassl="$(STAGING_DIR)/usr" --without-ca-path --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-cyassl) \ $(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr" --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-gnutls) \ $(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr" --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-ssl) \ $(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr" --without-ca-path --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-mbedtls) \ @@ -122,7 +121,6 @@ CONFIGURE_ARGS += \ $(if $(CONFIG_LIBCURL_LIBIDN),--with-libidn="$(STAGING_DIR)/usr",--without-libidn) \ $(if $(CONFIG_LIBCURL_SSH2),--with-libssh2="$(STAGING_DIR)/usr",--without-libssh2) \ $(if $(CONFIG_LIBCURL_ZLIB),--with-zlib="$(STAGING_DIR)/usr",--without-zlib) \ - $(if $(CONFIG_LIBCURL_NGHTTP2),--with-nghttp2="$(STAGING_DIR)/usr",--without-nghttp2) \ \ $(call autoconf_bool,CONFIG_LIBCURL_DICT,dict) \ $(call autoconf_bool,CONFIG_LIBCURL_FILE,file) \ diff --git a/package/network/utils/curl/patches/001-curl-https-openssl-fix.patch b/package/network/utils/curl/patches/001-curl-https-openssl-fix.patch new file mode 100644 index 000000000..9658ef554 --- /dev/null +++ b/package/network/utils/curl/patches/001-curl-https-openssl-fix.patch @@ -0,0 +1,34 @@ +From a7b38c9dc98481e4a5fc37e51a8690337c674dfb Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 26 Dec 2016 00:06:33 +0100 +Subject: [PATCH] vtls: s/SSLEAY/OPENSSL + +Fixed an old leftover use of the USE_SSLEAY define which would make a +socket get removed from the applications sockets to monitor when the +multi_socket API was used, leading to timeouts. + +Bug: #1174 +--- + lib/vtls/vtls.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/lib/vtls/vtls.c ++++ b/lib/vtls/vtls.c +@@ -484,7 +484,7 @@ void Curl_ssl_close_all(struct Curl_easy + curlssl_close_all(data); + } + +-#if defined(USE_SSLEAY) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \ ++#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \ + defined(USE_DARWINSSL) || defined(USE_NSS) + /* This function is for OpenSSL, GnuTLS, darwinssl, and schannel only. */ + int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks, +@@ -518,7 +518,7 @@ int Curl_ssl_getsock(struct connectdata + (void)numsocks; + return GETSOCK_BLANK; + } +-/* USE_SSLEAY || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */ ++/* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */ + #endif + + void Curl_ssl_close(struct connectdata *conn, int sockindex) diff --git a/package/network/utils/curl/patches/100-CVE-2017-2629.patch b/package/network/utils/curl/patches/100-CVE-2017-2629.patch new file mode 100644 index 000000000..f2cd869c5 --- /dev/null +++ b/package/network/utils/curl/patches/100-CVE-2017-2629.patch @@ -0,0 +1,33 @@ +From a00a42b4abe8363a46071bb3b43b1b7138f5259b Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Sun, 22 Jan 2017 18:11:55 +0100 +Subject: [PATCH] TLS: make SSL_VERIFYSTATUS work again + +The CURLOPT_SSL_VERIFYSTATUS option was not properly handled by libcurl +and thus even if the status couldn't be verified, the connection would +be allowed and the user would not be told about the failed verification. + +Regression since cb4e2be7c6d42ca + +CVE-2017-2629 +Bug: https://curl.haxx.se/docs/adv_20170222.html + +Reported-by: Marcus Hoffmann +--- + lib/url.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/lib/url.c ++++ b/lib/url.c +@@ -4141,8 +4141,11 @@ static struct connectdata *allocate_conn + conn->bits.ftp_use_epsv = data->set.ftp_use_epsv; + conn->bits.ftp_use_eprt = data->set.ftp_use_eprt; + ++ conn->ssl_config.verifystatus = data->set.ssl.primary.verifystatus; + conn->ssl_config.verifypeer = data->set.ssl.primary.verifypeer; + conn->ssl_config.verifyhost = data->set.ssl.primary.verifyhost; ++ conn->proxy_ssl_config.verifystatus = ++ data->set.proxy_ssl.primary.verifystatus; + conn->proxy_ssl_config.verifypeer = data->set.proxy_ssl.primary.verifypeer; + conn->proxy_ssl_config.verifyhost = data->set.proxy_ssl.primary.verifyhost; + diff --git a/package/network/utils/curl/patches/101-CVE-2017-7407.patch b/package/network/utils/curl/patches/101-CVE-2017-7407.patch new file mode 100644 index 000000000..ba8097b0e --- /dev/null +++ b/package/network/utils/curl/patches/101-CVE-2017-7407.patch @@ -0,0 +1,165 @@ +From 6019f1795b4e3b72507b84b0e02dc8c32024f562 Mon Sep 17 00:00:00 2001 +From: Dan Fandrich +Date: Sat, 11 Mar 2017 10:59:34 +0100 +Subject: [PATCH] CVE-2017-7407: fixed + +Bug: https://curl.haxx.se/docs/adv_20170403.html + +Reported-by: Brian Carpenter +--- + src/tool_writeout.c | 6 +++--- + tests/data/Makefile.inc | 2 +- + tests/data/test1440 | 31 +++++++++++++++++++++++++++++++ + tests/data/test1441 | 31 +++++++++++++++++++++++++++++++ + tests/data/test1442 | 35 +++++++++++++++++++++++++++++++++++ + 5 files changed, 101 insertions(+), 4 deletions(-) + create mode 100644 tests/data/test1440 + create mode 100644 tests/data/test1441 + create mode 100644 tests/data/test1442 + +--- a/src/tool_writeout.c ++++ b/src/tool_writeout.c +@@ -5,7 +5,7 @@ + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * +- * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. ++ * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms +@@ -113,7 +113,7 @@ void ourWriteOut(CURL *curl, struct OutS + double doubleinfo; + + while(ptr && *ptr) { +- if('%' == *ptr) { ++ if('%' == *ptr && ptr[1]) { + if('%' == ptr[1]) { + /* an escaped %-letter */ + fputc('%', stream); +@@ -341,7 +341,7 @@ void ourWriteOut(CURL *curl, struct OutS + } + } + } +- else if('\\' == *ptr) { ++ else if('\\' == *ptr && ptr[1]) { + switch(ptr[1]) { + case 'r': + fputc('\r', stream); +--- a/tests/data/Makefile.inc ++++ b/tests/data/Makefile.inc +@@ -150,7 +150,7 @@ test1408 test1409 test1410 test1411 test + test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \ + test1424 \ + test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \ +-test1436 test1437 test1438 test1439 \ ++test1436 test1437 test1438 test1439 test1440 test1441 test1442 \ + \ + test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \ + test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \ +--- /dev/null ++++ b/tests/data/test1440 +@@ -0,0 +1,31 @@ ++ ++ ++ ++--write-out ++ ++ ++# Server-side ++ ++ ++ ++# Client-side ++ ++ ++file ++ ++ ++ ++Check --write-out with trailing %{ ++ ++ ++file://localhost/%PWD/log/ --write-out '%{' ++ ++ ++ ++# Verify data ++ ++ ++%{ ++ ++ ++ +--- /dev/null ++++ b/tests/data/test1441 +@@ -0,0 +1,31 @@ ++ ++ ++ ++--write-out ++ ++ ++# Server-side ++ ++ ++ ++# Client-side ++ ++ ++file ++ ++ ++ ++Check --write-out with trailing % ++ ++ ++file://localhost/%PWD/log/ --write-out '%' ++ ++ ++ ++# Verify data ++ ++ ++% ++ ++ ++ +--- /dev/null ++++ b/tests/data/test1442 +@@ -0,0 +1,35 @@ ++ ++ ++ ++--write-out ++FILE ++ ++ ++# Server-side ++ ++ ++ ++# Client-side ++ ++ ++file ++ ++ ++ ++Check --write-out with trailing \ ++ ++ ++file://localhost/%PWD/log/non-existent-file.txt --write-out '\' ++ ++ ++ ++# Verify data ++ ++ ++37 ++ ++ ++\ ++ ++ ++ diff --git a/package/network/utils/curl/patches/102-CVE-2017-7468.patch b/package/network/utils/curl/patches/102-CVE-2017-7468.patch new file mode 100644 index 000000000..72f51455d --- /dev/null +++ b/package/network/utils/curl/patches/102-CVE-2017-7468.patch @@ -0,0 +1,264 @@ +From 8166b637bce299f4ac64d371c20cd5afea72c364 Mon Sep 17 00:00:00 2001 +From: Jay Satiro +Date: Wed, 22 Mar 2017 01:59:49 -0400 +Subject: [PATCH] TLS: Fix switching off SSL session id when client cert is + used + +- Move the sessionid flag to ssl_primary_config so that ssl and + proxy_ssl will each have their own sessionid flag. + +Regression since HTTPS-Proxy support was added in cb4e2be. Prior to that +this issue had been fixed in 247d890, CVE-2016-5419. + +Bug: https://github.com/curl/curl/issues/1341 +Reported-by: lijian996@users.noreply.github.com +--- + lib/url.c | 5 +++-- + lib/urldata.h | 2 +- + lib/vtls/axtls.c | 4 ++-- + lib/vtls/cyassl.c | 4 ++-- + lib/vtls/darwinssl.c | 2 +- + lib/vtls/gtls.c | 4 ++-- + lib/vtls/mbedtls.c | 4 ++-- + lib/vtls/nss.c | 2 +- + lib/vtls/openssl.c | 4 ++-- + lib/vtls/polarssl.c | 4 ++-- + lib/vtls/schannel.c | 4 ++-- + lib/vtls/vtls.c | 9 ++++++--- + 12 files changed, 26 insertions(+), 22 deletions(-) + +--- a/lib/url.c ++++ b/lib/url.c +@@ -548,7 +548,7 @@ CURLcode Curl_init_userdefined(struct Us + #endif + set->ssh_auth_types = CURLSSH_AUTH_DEFAULT; /* defaults to any auth + type */ +- set->general_ssl.sessionid = TRUE; /* session ID caching enabled by ++ set->ssl.primary.sessionid = TRUE; /* session ID caching enabled by + default */ + set->proxy_ssl = set->ssl; + +@@ -2470,8 +2470,9 @@ CURLcode Curl_setopt(struct Curl_easy *d + break; + + case CURLOPT_SSL_SESSIONID_CACHE: +- data->set.general_ssl.sessionid = (0 != va_arg(param, long)) ? ++ data->set.ssl.primary.sessionid = (0 != va_arg(param, long)) ? + TRUE : FALSE; ++ data->set.proxy_ssl.primary.sessionid = data->set.ssl.primary.sessionid; + break; + + #ifdef USE_LIBSSH2 +--- a/lib/urldata.h ++++ b/lib/urldata.h +@@ -354,6 +354,7 @@ struct ssl_primary_config { + char *random_file; /* path to file containing "random" data */ + char *egdsocket; /* path to file containing the EGD daemon socket */ + char *cipher_list; /* list of ciphers to use */ ++ bool sessionid; /* cache session IDs or not */ + }; + + struct ssl_config_data { +@@ -383,7 +384,6 @@ struct ssl_config_data { + }; + + struct ssl_general_config { +- bool sessionid; /* cache session IDs or not */ + size_t max_ssl_sessions; /* SSL session id cache size */ + }; + +--- a/lib/vtls/axtls.c ++++ b/lib/vtls/axtls.c +@@ -256,7 +256,7 @@ static CURLcode connect_prep(struct conn + * 2) setting up callbacks. these seem gnutls specific + */ + +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + const uint8_t *ssl_sessionid; + size_t ssl_idsize; + +@@ -386,7 +386,7 @@ static CURLcode connect_finish(struct co + conn->send[sockindex] = axtls_send; + + /* Put our freshly minted SSL session in cache */ +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + const uint8_t *ssl_sessionid = ssl_get_session_id_size(ssl); + size_t ssl_idsize = ssl_get_session_id(ssl); + Curl_ssl_sessionid_lock(conn); +--- a/lib/vtls/cyassl.c ++++ b/lib/vtls/cyassl.c +@@ -383,7 +383,7 @@ cyassl_connect_step1(struct connectdata + #endif /* HAVE_ALPN */ + + /* Check if there's a cached ID we can/should use here! */ +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + void *ssl_sessionid = NULL; + + Curl_ssl_sessionid_lock(conn); +@@ -597,7 +597,7 @@ cyassl_connect_step3(struct connectdata + + DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); + +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + bool incache; + SSL_SESSION *our_ssl_sessionid; + void *old_ssl_sessionid = NULL; +--- a/lib/vtls/darwinssl.c ++++ b/lib/vtls/darwinssl.c +@@ -1541,7 +1541,7 @@ static CURLcode darwinssl_connect_step1( + #endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */ + + /* Check if there's a cached ID we can/should use here! */ +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + char *ssl_sessionid; + size_t ssl_sessionid_len; + +--- a/lib/vtls/gtls.c ++++ b/lib/vtls/gtls.c +@@ -782,7 +782,7 @@ gtls_connect_step1(struct connectdata *c + + /* This might be a reconnect, so we check for a session ID in the cache + to speed up things */ +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + void *ssl_sessionid; + size_t ssl_idsize; + +@@ -1311,7 +1311,7 @@ gtls_connect_step3(struct connectdata *c + conn->recv[sockindex] = gtls_recv; + conn->send[sockindex] = gtls_send; + +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + /* we always unconditionally get the session id here, as even if we + already got it from the cache and asked to use it in the connection, it + might've been rejected and then a new one is in use now and we need to +--- a/lib/vtls/mbedtls.c ++++ b/lib/vtls/mbedtls.c +@@ -374,7 +374,7 @@ mbed_connect_step1(struct connectdata *c + mbedtls_ssl_list_ciphersuites()); + + /* Check if there's a cached ID we can/should use here! */ +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + void *old_session = NULL; + + Curl_ssl_sessionid_lock(conn); +@@ -618,7 +618,7 @@ mbed_connect_step3(struct connectdata *c + + DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); + +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + int ret; + mbedtls_ssl_session *our_ssl_sessionid; + void *old_ssl_sessionid = NULL; +--- a/lib/vtls/nss.c ++++ b/lib/vtls/nss.c +@@ -1696,7 +1696,7 @@ static CURLcode nss_setup_connect(struct + goto error; + + /* do not use SSL cache if disabled or we are not going to verify peer */ +- ssl_no_cache = (data->set.general_ssl.sessionid ++ ssl_no_cache = (SSL_SET_OPTION(primary.sessionid) + && SSL_CONN_CONFIG(verifypeer)) ? PR_FALSE : PR_TRUE; + if(SSL_OptionSet(model, SSL_NO_CACHE, ssl_no_cache) != SECSuccess) + goto error; +--- a/lib/vtls/openssl.c ++++ b/lib/vtls/openssl.c +@@ -2161,7 +2161,7 @@ static CURLcode ossl_connect_step1(struc + #endif + + /* Check if there's a cached ID we can/should use here! */ +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + void *ssl_sessionid = NULL; + + Curl_ssl_sessionid_lock(conn); +@@ -2915,7 +2915,7 @@ static CURLcode ossl_connect_step3(struc + + DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); + +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + bool incache; + SSL_SESSION *our_ssl_sessionid; + void *old_ssl_sessionid = NULL; +--- a/lib/vtls/polarssl.c ++++ b/lib/vtls/polarssl.c +@@ -327,7 +327,7 @@ polarssl_connect_step1(struct connectdat + ssl_set_ciphersuites(&connssl->ssl, ssl_list_ciphersuites()); + + /* Check if there's a cached ID we can/should use here! */ +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + void *old_session = NULL; + + Curl_ssl_sessionid_lock(conn); +@@ -555,7 +555,7 @@ polarssl_connect_step3(struct connectdat + + DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); + +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + int ret; + ssl_session *our_ssl_sessionid; + void *old_ssl_sessionid = NULL; +--- a/lib/vtls/schannel.c ++++ b/lib/vtls/schannel.c +@@ -145,7 +145,7 @@ schannel_connect_step1(struct connectdat + connssl->cred = NULL; + + /* check for an existing re-usable credential handle */ +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + Curl_ssl_sessionid_lock(conn); + if(!Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL, sockindex)) { + connssl->cred = old_cred; +@@ -714,7 +714,7 @@ schannel_connect_step3(struct connectdat + #endif + + /* save the current session data for possible re-use */ +- if(data->set.general_ssl.sessionid) { ++ if(SSL_SET_OPTION(primary.sessionid)) { + bool incache; + struct curl_schannel_cred *old_cred = NULL; + +--- a/lib/vtls/vtls.c ++++ b/lib/vtls/vtls.c +@@ -120,6 +120,9 @@ Curl_clone_primary_ssl_config(struct ssl + CLONE_STRING(egdsocket); + CLONE_STRING(random_file); + CLONE_STRING(clientcert); ++ ++ /* Disable dest sessionid cache if a client cert is used, CVE-2016-5419. */ ++ dest->sessionid = (dest->clientcert ? false : source->sessionid); + return TRUE; + } + +@@ -293,9 +296,9 @@ bool Curl_ssl_getsessionid(struct connec + int port = isProxy ? (int)conn->port : conn->remote_port; + *ssl_sessionid = NULL; + +- DEBUGASSERT(data->set.general_ssl.sessionid); ++ DEBUGASSERT(SSL_SET_OPTION(primary.sessionid)); + +- if(!data->set.general_ssl.sessionid) ++ if(!SSL_SET_OPTION(primary.sessionid)) + /* session ID re-use is disabled */ + return TRUE; + +@@ -397,7 +400,7 @@ CURLcode Curl_ssl_addsessionid(struct co + &conn->proxy_ssl_config : + &conn->ssl_config; + +- DEBUGASSERT(data->set.general_ssl.sessionid); ++ DEBUGASSERT(SSL_SET_OPTION(primary.sessionid)); + + clone_host = strdup(isProxy ? conn->http_proxy.host.name : conn->host.name); + if(!clone_host) diff --git a/package/network/utils/curl/patches/103-CVE-2017-1000100.patch b/package/network/utils/curl/patches/103-CVE-2017-1000100.patch new file mode 100644 index 000000000..93ab97bd1 --- /dev/null +++ b/package/network/utils/curl/patches/103-CVE-2017-1000100.patch @@ -0,0 +1,41 @@ +From 358b2b131ad6c095696f20dcfa62b8305263f898 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Tue, 1 Aug 2017 17:16:46 +0200 +Subject: [PATCH] tftp: reject file name lengths that don't fit + +... and thereby avoid telling send() to send off more bytes than the +size of the buffer! + +CVE-2017-1000100 + +Bug: https://curl.haxx.se/docs/adv_20170809B.html +Reported-by: Even Rouault + +Credit to OSS-Fuzz for the discovery +--- + lib/tftp.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/lib/tftp.c ++++ b/lib/tftp.c +@@ -5,7 +5,7 @@ + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * +- * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. ++ * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms +@@ -490,6 +490,11 @@ static CURLcode tftp_send_first(tftp_sta + if(result) + return result; + ++ if(strlen(filename) > (state->blksize - strlen(mode) - 4)) { ++ failf(data, "TFTP file name too long\n"); ++ return CURLE_TFTP_ILLEGAL; /* too long file name field */ ++ } ++ + snprintf((char *)state->spacket.data+2, + state->blksize, + "%s%c%s%c", filename, '\0', mode, '\0'); diff --git a/package/network/utils/curl/patches/104-CVE-2017-1000101.patch b/package/network/utils/curl/patches/104-CVE-2017-1000101.patch new file mode 100644 index 000000000..835b73eef --- /dev/null +++ b/package/network/utils/curl/patches/104-CVE-2017-1000101.patch @@ -0,0 +1,33 @@ +From 453e7a7a03a2cec749abd3878a48e728c515cca7 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Tue, 1 Aug 2017 17:16:07 +0200 +Subject: [PATCH] glob: do not continue parsing after a strtoul() overflow + range + +Added test 1289 to verify. + +CVE-2017-1000101 + +Bug: https://curl.haxx.se/docs/adv_20170809A.html +Reported-by: Brian Carpenter +--- + src/tool_urlglob.c | 5 ++++- + tests/data/Makefile.inc | 2 +- + tests/data/test1289 | 35 +++++++++++++++++++++++++++++++++++ + 3 files changed, 40 insertions(+), 2 deletions(-) + create mode 100644 tests/data/test1289 + +--- a/src/tool_urlglob.c ++++ b/src/tool_urlglob.c +@@ -272,7 +272,10 @@ static CURLcode glob_range(URLGlob *glob + } + errno = 0; + max_n = strtoul(pattern, &endp, 10); +- if(errno || (*endp == ':')) { ++ if(errno) ++ /* overflow */ ++ endp = NULL; ++ else if(*endp == ':') { + pattern = endp+1; + errno = 0; + step_n = strtoul(pattern, &endp, 10); diff --git a/package/network/utils/curl/patches/105-CVE-2017-8816.patch b/package/network/utils/curl/patches/105-CVE-2017-8816.patch new file mode 100644 index 000000000..4d2b3162a --- /dev/null +++ b/package/network/utils/curl/patches/105-CVE-2017-8816.patch @@ -0,0 +1,67 @@ +From 7947c50bcd09cf471c95511739bc66d2cb506ee2 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 6 Nov 2017 23:51:52 +0100 +Subject: [PATCH] ntlm: avoid integer overflow for malloc size + +Reported-by: Alex Nichols +Assisted-by: Kamil Dudka and Max Dymond + +CVE-2017-8816 + +Bug: https://curl.haxx.se/docs/adv_2017-11e7.html +--- + lib/curl_ntlm_core.c | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c +index 1309bf0d9..e8962769c 100644 +--- a/lib/curl_ntlm_core.c ++++ b/lib/curl_ntlm_core.c +@@ -616,23 +616,42 @@ CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen, + Curl_HMAC_final(ctxt, output); + + return CURLE_OK; + } + ++#ifndef SIZE_T_MAX ++/* some limits.h headers have this defined, some don't */ ++#if defined(_LP64) || defined(_I32LPx) ++#define SIZE_T_MAX 18446744073709551615U ++#else ++#define SIZE_T_MAX 4294967295U ++#endif ++#endif ++ + /* This creates the NTLMv2 hash by using NTLM hash as the key and Unicode + * (uppercase UserName + Domain) as the data + */ + CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, + const char *domain, size_t domlen, + unsigned char *ntlmhash, + unsigned char *ntlmv2hash) + { + /* Unicode representation */ +- size_t identity_len = (userlen + domlen) * 2; +- unsigned char *identity = malloc(identity_len); ++ size_t identity_len; ++ unsigned char *identity; + CURLcode result = CURLE_OK; + ++ /* we do the length checks below separately to avoid integer overflow risk ++ on extreme data lengths */ ++ if((userlen > SIZE_T_MAX/2) || ++ (domlen > SIZE_T_MAX/2) || ++ ((userlen + domlen) > SIZE_T_MAX/2)) ++ return CURLE_OUT_OF_MEMORY; ++ ++ identity_len = (userlen + domlen) * 2; ++ identity = malloc(identity_len); ++ + if(!identity) + return CURLE_OUT_OF_MEMORY; + + ascii_uppercase_to_unicode_le(identity, user, userlen); + ascii_to_unicode_le(identity + (userlen << 1), domain, domlen); +-- +2.15.0 + diff --git a/package/network/utils/curl/patches/106-CVE-2017-8817.patch b/package/network/utils/curl/patches/106-CVE-2017-8817.patch new file mode 100644 index 000000000..9e904f0b4 --- /dev/null +++ b/package/network/utils/curl/patches/106-CVE-2017-8817.patch @@ -0,0 +1,141 @@ +From 0acc0c7c120afa6d60bfc7932c04361720b6e74d Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Fri, 10 Nov 2017 08:52:45 +0100 +Subject: [PATCH] wildcardmatch: fix heap buffer overflow in setcharset + +The code would previous read beyond the end of the pattern string if the +match pattern ends with an open bracket when the default pattern +matching function is used. + +Detected by OSS-Fuzz: +https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4161 + +CVE-2017-8817 + +Bug: https://curl.haxx.se/docs/adv_2017-ae72.html +--- + lib/curl_fnmatch.c | 9 +++------ + tests/data/Makefile.inc | 2 +- + tests/data/test1163 | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 56 insertions(+), 7 deletions(-) + create mode 100644 tests/data/test1163 + +diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c +index da83393b4..8a1e106c4 100644 +--- a/lib/curl_fnmatch.c ++++ b/lib/curl_fnmatch.c +@@ -131,10 +131,13 @@ static int setcharset(unsigned char **p, unsigned char *charset) + unsigned char lastchar = 0; + bool something_found = FALSE; + unsigned char c; + for(;;) { + c = **p; ++ if(!c) ++ return SETCHARSET_FAIL; ++ + switch(state) { + case CURLFNM_SCHS_DEFAULT: + if(ISALNUM(c)) { /* ASCII value */ + rangestart = c; + charset[c] = 1; +@@ -195,13 +198,10 @@ static int setcharset(unsigned char **p, unsigned char *charset) + (*p)++; + } + else + return SETCHARSET_FAIL; + } +- else if(c == '\0') { +- return SETCHARSET_FAIL; +- } + else { + charset[c] = 1; + (*p)++; + something_found = TRUE; + } +@@ -276,13 +276,10 @@ static int setcharset(unsigned char **p, unsigned char *charset) + (*p)++; + } + else if(c == ']') { + return SETCHARSET_OK; + } +- else if(c == '\0') { +- return SETCHARSET_FAIL; +- } + else if(ISPRINT(c)) { + charset[c] = 1; + (*p)++; + state = CURLFNM_SCHS_DEFAULT; + } +diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc +index dc1cc03bc..6eb37d81d 100644 +--- a/tests/data/Makefile.inc.1 2017-11-29 20:00:26.126452486 +0000 ++++ b/tests/data/Makefile.inc 2017-11-29 20:01:13.057783732 +0000 +@@ -121,6 +121,7 @@ + test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \ + test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \ + test1144 \ ++test1163 \ + test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \ + test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \ + test1216 test1217 test1218 test1219 \ +diff --git a/tests/data/test1163 b/tests/data/test1163 +new file mode 100644 +index 000000000..a109b511b +--- /dev/null ++++ b/tests/data/test1163 +@@ -0,0 +1,52 @@ ++ ++ ++ ++FTP ++RETR ++LIST ++wildcardmatch ++ftplistparser ++flaky ++ ++ ++ ++# ++# Server-side ++ ++ ++ ++ ++ ++# Client-side ++ ++ ++ftp ++ ++ ++lib576 ++ ++ ++FTP wildcard with pattern ending with an open-bracket ++ ++ ++"ftp://%HOSTIP:%FTPPORT/fully_simulated/DOS/*[][" ++ ++ ++ ++ ++USER anonymous ++PASS ftp@example.com ++PWD ++CWD fully_simulated ++CWD DOS ++EPSV ++TYPE A ++LIST ++QUIT ++ ++# 78 == CURLE_REMOTE_FILE_NOT_FOUND ++ ++78 ++ ++ ++ +-- +2.15.0 + diff --git a/package/network/utils/curl/patches/200-no_docs_tests.patch b/package/network/utils/curl/patches/200-no_docs_tests.patch index a2a685125..139c05e64 100644 --- a/package/network/utils/curl/patches/200-no_docs_tests.patch +++ b/package/network/utils/curl/patches/200-no_docs_tests.patch @@ -1,22 +1,22 @@ --- a/Makefile.am +++ b/Makefile.am -@@ -156,7 +156,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) +@@ -153,7 +153,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) bin_SCRIPTS = curl-config - SUBDIRS = lib src --DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs -+DIST_SUBDIRS = $(SUBDIRS) packages include + SUBDIRS = lib src include +-DIST_SUBDIRS = $(SUBDIRS) tests packages docs scripts ++DIST_SUBDIRS = $(SUBDIRS) packages pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libcurl.pc -@@ -267,8 +267,8 @@ cygwinbin: - # We extend the standard install with a custom hook: - install-data-hook: - cd include && $(MAKE) install -- cd docs && $(MAKE) install -- cd docs/libcurl && $(MAKE) install -+ #cd docs && $(MAKE) install -+ #cd docs/libcurl && $(MAKE) install +--- a/Makefile.in ++++ b/Makefile.in +@@ -613,7 +613,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) - # We extend the standard uninstall with a custom hook: - uninstall-hook: + bin_SCRIPTS = curl-config + SUBDIRS = lib src include +-DIST_SUBDIRS = $(SUBDIRS) tests packages docs scripts ++DIST_SUBDIRS = $(SUBDIRS) packages + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libcurl.pc + LIB_VAUTH_CFILES = vauth/vauth.c vauth/cleartext.c vauth/cram.c \ diff --git a/package/network/utils/curl/patches/310-mbedtls-disable-runtime-version-check.patch b/package/network/utils/curl/patches/310-mbedtls-disable-runtime-version-check.patch index aabf274ac..22b838daa 100644 --- a/package/network/utils/curl/patches/310-mbedtls-disable-runtime-version-check.patch +++ b/package/network/utils/curl/patches/310-mbedtls-disable-runtime-version-check.patch @@ -1,8 +1,8 @@ --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c -@@ -814,7 +814,7 @@ static void Curl_mbedtls_session_free(vo +@@ -724,7 +724,7 @@ void Curl_mbedtls_session_free(void *ptr - static size_t Curl_mbedtls_version(char *buffer, size_t size) + size_t Curl_mbedtls_version(char *buffer, size_t size) { - unsigned int version = mbedtls_version_get_number(); + unsigned int version = MBEDTLS_VERSION_NUMBER; diff --git a/package/network/utils/ebtables/Makefile b/package/network/utils/ebtables/Makefile index 7a3a82569..da7b7416a 100644 --- a/package/network/utils/ebtables/Makefile +++ b/package/network/utils/ebtables/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=ebtables PKG_SOURCE_DATE:=2015-10-28 PKG_RELEASE:=1 -PKG_SOURCE_URL:=https://git.netfilter.org/ebtables +PKG_SOURCE_URL:=git://git.netfilter.org/ebtables PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=4c3e5cd3dbae3ea773e9dcca7cf019b2713af70d PKG_MIRROR_HASH:=997a877da02d6e2141e6d31c5d4dd005737facecfdbea07308c0e1286db8591c diff --git a/package/network/utils/iperf/Makefile b/package/network/utils/iperf/Makefile index 2f420a2e2..ea8f02631 100644 --- a/package/network/utils/iperf/Makefile +++ b/package/network/utils/iperf/Makefile @@ -8,12 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iperf -PKG_VERSION:=2.0.10 +PKG_VERSION:=2.0.9 +PKG_VERSION_SUFFIX:=a PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=7fe4348dcca313b74e0aa9c34a8ccd713b84a5615b8578f4aa94cedce9891ef2 -PKG_SOURCE_URL:=@SF/iperf2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VERSION_SUFFIX).tar.gz +# Temporary URL change - iperf upstream altered the already released target +# without bumping the version number. The new tarball is renamed to avoid +# conflicts with existing mirrored files. +# PKG_SOURCE_URL:=@SF/iperf2 +PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources +PKG_HASH:=db02911f35686e808ed247160dfa766e08ae3f59d1e7dcedef0ffb2a6643f0bf PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause diff --git a/package/network/utils/iperf3/Makefile b/package/network/utils/iperf3/Makefile index a64d7396a..56782ea52 100644 --- a/package/network/utils/iperf3/Makefile +++ b/package/network/utils/iperf3/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iperf -PKG_VERSION:=3.3 +PKG_VERSION:=3.1.4 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.es.net/pub/iperf -PKG_HASH:=6f596271251056bffc11bbb8f17d4244ad9a7d4a317c2459fdbb853ae51284d8 +PKG_HASH:=db61d70ac62003ebe0bf15496bd8c4b3c4b728578a44d0a1a88fcf8afc0e8f76 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause @@ -21,40 +21,18 @@ PKG_LICENSE:=BSD-3-Clause PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - include $(INCLUDE_DIR)/package.mk -DISABLE_NLS:= - -define Package/iperf3/default +define Package/iperf3 SECTION:=net CATEGORY:=Network TITLE:=Internet Protocol bandwidth measuring tool URL:=https://github.com/esnet/iperf endef -define Package/iperf3 -$(call Package/iperf3/default) - VARIANT:=nossl -endef - -define Package/iperf3-ssl -$(call Package/iperf3/default) - TITLE+= with iperf_auth support - VARIANT:=ssl - DEPENDS:= +libopenssl -endef - TARGET_CFLAGS += -D_GNU_SOURCE CONFIGURE_ARGS += --disable-shared -ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS += --without-openssl -endif - MAKE_FLAGS += noinst_PROGRAMS= define Package/iperf3/description @@ -63,21 +41,9 @@ define Package/iperf3/description characteristics. endef -# autoreconf fails if the README file isn't present -define Build/Prepare - $(call Build/Prepare/Default) - touch $(PKG_BUILD_DIR)/README -endef - define Package/iperf3/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iperf3 $(1)/usr/bin/ endef -define Package/iperf3-ssl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iperf3 $(1)/usr/bin/ -endef - $(eval $(call BuildPackage,iperf3)) -$(eval $(call BuildPackage,iperf3-ssl)) diff --git a/package/network/utils/iperf3/patches/010-iperf-3.3-fix-build-warnings.patch b/package/network/utils/iperf3/patches/010-iperf-3.3-fix-build-warnings.patch deleted file mode 100644 index d617ba9f4..000000000 --- a/package/network/utils/iperf3/patches/010-iperf-3.3-fix-build-warnings.patch +++ /dev/null @@ -1,300 +0,0 @@ -The following patches are taken directly from: - -https://github.com/esnet/iperf/pull/664 - -as an upstream submission. - -commit b63d41b25f49a76d0be66edfb61bd4cb68921d55 -Author: Philip Prindeville -Date: Tue Oct 31 13:41:08 2017 -0600 - - Fix warnings about _GNU_SOURCE being redefined. - - Signed-off-by: Philip Prindeville - -diff --git a/src/iperf.h b/src/iperf.h -index bb951dc..b656784 100755 ---- a/src/iperf.h -+++ b/src/iperf.h -@@ -36,7 +36,9 @@ - #endif - #include - #include --#define _GNU_SOURCE -+#ifndef _GNU_SOURCE -+# define _GNU_SOURCE -+#endif - #include - - #if defined(HAVE_CPUSET_SETAFFINITY) -diff --git a/src/iperf_api.c b/src/iperf_api.c -index ab30b93..9e41238 100755 ---- a/src/iperf_api.c -+++ b/src/iperf_api.c -@@ -24,7 +24,9 @@ - * This code is distributed under a BSD style license, see the LICENSE file - * for complete information. - */ --#define _GNU_SOURCE -+#ifndef _GNU_SOURCE -+# define _GNU_SOURCE -+#endif - #define __USE_GNU - - #include "iperf_config.h" - -commit 315254cfc5f5682627f4a46ade3100bc3c64cfcc -Author: Philip Prindeville -Date: Tue Oct 31 13:42:58 2017 -0600 - - Fix warnings of format-specified mismatching type - - Signed-off-by: Philip Prindeville - -diff --git a/src/iperf_tcp.c b/src/iperf_tcp.c -index 91cf032..6f86d5d 100644 ---- a/src/iperf_tcp.c -+++ b/src/iperf_tcp.c -@@ -24,8 +24,6 @@ - * This code is distributed under a BSD style license, see the LICENSE - * file for complete information. - */ --#include "iperf_config.h" -- - #include - #include - #include -@@ -44,6 +42,12 @@ - #include "net.h" - #include "cjson.h" - -+#if defined(HAVE_INTTYPES_H) -+# include -+#else -+# define PRIu64 "llu" -+#endif -+ - #if defined(HAVE_FLOWLABEL) - #include "flowlabel.h" - #endif /* HAVE_FLOWLABEL */ -@@ -90,7 +94,7 @@ iperf_tcp_send(struct iperf_stream *sp) - sp->result->bytes_sent_this_interval += r; - - if (sp->test->debug) -- printf("sent %d bytes of %d, total %llu\n", r, sp->settings->blksize, sp->result->bytes_sent); -+ printf("sent %d bytes of %d, total %" PRIu64 "\n", r, sp->settings->blksize, sp->result->bytes_sent); - - return r; - } -diff --git a/src/iperf_udp.c b/src/iperf_udp.c -index a2ea6d0..d04ae44 100644 ---- a/src/iperf_udp.c -+++ b/src/iperf_udp.c -@@ -48,6 +48,12 @@ - #include "cjson.h" - #include "portable_endian.h" - -+#if defined(HAVE_INTTYPES_H) -+# include -+#else -+# define PRIu64 "llu" -+#endif -+ - /* iperf_udp_recv - * - * receives the data for UDP -@@ -98,7 +104,7 @@ iperf_udp_recv(struct iperf_stream *sp) - } - - if (sp->test->debug) -- fprintf(stderr, "pcount %llu packet_count %d\n", pcount, sp->packet_count); -+ fprintf(stderr, "pcount %" PRIu64 " packet_count %d\n", pcount, sp->packet_count); - - /* - * Try to handle out of order packets. The way we do this -@@ -141,7 +147,7 @@ iperf_udp_recv(struct iperf_stream *sp) - - /* Log the out-of-order packet */ - if (sp->test->debug) -- fprintf(stderr, "OUT OF ORDER - incoming packet sequence %llu but expected sequence %d on stream %d", pcount, sp->packet_count, sp->socket); -+ fprintf(stderr, "OUT OF ORDER - incoming packet sequence %" PRIu64 " but expected sequence %d on stream %d", pcount, sp->packet_count, sp->socket); - } - - /* -@@ -220,7 +226,7 @@ iperf_udp_send(struct iperf_stream *sp) - sp->result->bytes_sent_this_interval += r; - - if (sp->test->debug) -- printf("sent %d bytes of %d, total %llu\n", r, sp->settings->blksize, sp->result->bytes_sent); -+ printf("sent %d bytes of %d, total %" PRIu64 "\n", r, sp->settings->blksize, sp->result->bytes_sent); - - return r; - } - -commit 9a66b3b0349e0a158bb4940b668a5cbc7c245762 -Author: Philip Prindeville -Date: Tue Oct 31 13:44:34 2017 -0600 - - Simplify endianness checks - - Linux can be built with too many types of C run-time library and it's - not reasonable to have to enumerate all of them, especially since at - least one of them (MUSL) goes out of its way to not be easily - detectable. - - Instead, leverage autoconf better for Linux/BSD to detect either - or directly. - - Signed-off-by: Philip Prindeville - -diff --git a/configure.ac b/configure.ac -index f57e83f..cfb42ac 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -101,6 +101,14 @@ AC_CHECK_HEADERS([netinet/sctp.h], - #endif - ]) - -+AC_CHECK_HEADER([endian.h], -+ AC_DEFINE([HAVE_ENDIAN_H], [1], [Define to 1 if you have the header file.]), -+ AC_CHECK_HEADER([sys/endian.h], -+ AC_DEFINE([HAVE_SYS_ENDIAN_H], [1], [Define to 1 if you have the header file.]), -+ AC_MSG_WARN([Couldn't find endian.h or sys/endian.h files: doing compile-time tests.]) -+ ) -+ ) -+ - if test "x$with_openssl" = "xno"; then - AC_MSG_WARN( [Building without OpenSSL; disabling iperf_auth functionality.] ) - else -diff --git a/src/iperf_config.h.in b/src/iperf_config.h.in -index bd03935..a9e51ec 100644 ---- a/src/iperf_config.h.in -+++ b/src/iperf_config.h.in -@@ -9,6 +9,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_DLFCN_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_ENDIAN_H -+ - /* Have IPv6 flowlabel support. */ - #undef HAVE_FLOWLABEL - -@@ -54,6 +57,9 @@ - /* Define to 1 if the system has the type `struct sctp_assoc_value'. */ - #undef HAVE_STRUCT_SCTP_ASSOC_VALUE - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SYS_ENDIAN_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_SOCKET_H - -diff --git a/src/portable_endian.h b/src/portable_endian.h -index b86d37a..5dbc6e5 100644 ---- a/src/portable_endian.h -+++ b/src/portable_endian.h -@@ -10,14 +10,33 @@ - - #endif - --// GLIBC / Linux with endian(3) support, which was added in glibc 2.9. --// Intended to support CentOS 6 and newer. --#if defined(__linux__) && \ -- ((__GLIBC__ > 3) || \ -- (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9)) -- -+#if defined(HAVE_ENDIAN_H) - # include - -+#elif defined(HAVE_SYS_ENDIAN_H) -+# include -+ -+# if defined(__OpenBSD__) -+ -+# define be16toh(x) betoh16(x) -+# define le16toh(x) letoh16(x) -+ -+# define be32toh(x) betoh32(x) -+# define le32toh(x) letoh32(x) -+ -+# define be64toh(x) betoh64(x) -+# define le64toh(x) letoh64(x) -+ -+# elif defined(__sgi) -+ -+# include -+# include -+ -+# define be64toh(x) (x) -+# define htobe64(x) (x) -+ -+# endif -+ - #elif defined(__CYGWIN__) - - # include -@@ -46,32 +65,6 @@ - # define __LITTLE_ENDIAN LITTLE_ENDIAN - # define __PDP_ENDIAN PDP_ENDIAN - --#elif defined(__OpenBSD__) -- --# include -- --# define be16toh(x) betoh16(x) --# define le16toh(x) letoh16(x) -- --# define be32toh(x) betoh32(x) --# define le32toh(x) letoh32(x) -- --# define be64toh(x) betoh64(x) --# define le64toh(x) letoh64(x) -- --#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) -- --# include -- --#elif defined(__sgi) -- --# include --# include --# include -- --# define be64toh(x) (x) --# define htobe64(x) (x) -- - #elif defined(__sun) && defined(__SVR4) - - # include - -commit 7e7285d0daf92ef7beda8f78a6f63cc647a77f38 -Author: Philip Prindeville -Date: Tue Oct 31 13:48:06 2017 -0600 - - Sys headers should not be included directly - - There's usually a top-level header which then includes the sys/ - descendent. - - Signed-off-by: Philip Prindeville - -diff --git a/src/net.c b/src/net.c -index af456cb..afd0022 100644 ---- a/src/net.c -+++ b/src/net.c -@@ -31,13 +31,12 @@ - #include - #include - #include --#include - #include - #include - #include - #include - #include --#include -+#include - - #ifdef HAVE_SENDFILE - #ifdef linux diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 5f718748d..1f566f0c4 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,122 +8,87 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=4.14.1 -PKG_RELEASE:=2 +PKG_VERSION:=4.4.0 +PKG_RELEASE:=10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=d43ac068afcc350a448f4581b6e292331ef7e4e7aa746e34981582d5fdb10067 +PKG_HASH:=bc91c367288a19f78ef800cd6840363be1f22da8436fbae88e1a7250490d6514 PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 -PKG_CPE_ID:=cpe:/a:iproute2_project:iproute2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk define Package/iproute2/Default + TITLE:=Routing control utility ($(2)) SECTION:=net CATEGORY:=Network URL:=http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 SUBMENU:=Routing and Redirection MAINTAINER:=Russell Senior + DEPENDS:= +libnl-tiny + VARIANT:=$(1) + PROVIDES:=$(3) endef define Package/ip-tiny -$(call Package/iproute2/Default) - TITLE:=Routing control utility (Minimal) - VARIANT:=tiny - PROVIDES:=ip - ALTERNATIVES:=200:/sbin/ip:/sbin/ip-tiny - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +$(call Package/iproute2/Default,tiny,Minimal,ip) + CONFLICTS:=ip-full endef -define Package/ip-full -$(call Package/iproute2/Default) - TITLE:=Routing control utility (Full) - VARIANT:=full - PROVIDES:=ip - ALTERNATIVES:=300:/sbin/ip:/sbin/ip-full - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl -endef +Package/ip-full:=$(call Package/iproute2/Default,full,Full,ip) define Package/tc $(call Package/iproute2/Default) TITLE:=Traffic control utility - DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl + DEPENDS:=+kmod-sched-core endef define Package/genl $(call Package/iproute2/Default) TITLE:=General netlink utility frontend - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/ip-bridge $(call Package/iproute2/Default) TITLE:=Bridge configuration utility from iproute2 - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/ss $(call Package/iproute2/Default) TITLE:=Socket statistics utility - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/nstat $(call Package/iproute2/Default) TITLE:=Network statistics utility - DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl -endef - -define Package/devlink -$(call Package/iproute2/Default) - TITLE:=Network devlink utility - DEPENDS:=+libmnl -endef - -define Package/rdma -$(call Package/iproute2/Default) - TITLE:=Network rdma utility - DEPENDS:=+libmnl endef ifeq ($(BUILD_VARIANT),tiny) IP_CONFIG_TINY:=y endif -ifdef CONFIG_PACKAGE_devlink - HAVE_MNL:=y -endif - -ifdef CONFIG_PACKAGE_rdma - HAVE_MNL:=y -endif - define Build/Configure $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \ $(PKG_BUILD_DIR)/Makefile $(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \ $(PKG_BUILD_DIR)/Makefile - echo "static const char SNAPSHOT[] = \"$(PKG_VERSION)-$(PKG_RELEASE)-openwrt\";" \ + echo "static const char SNAPSHOT[] = \"$(PKG_VERSION)-$(PKG_RELEASE)-lede\";" \ > $(PKG_BUILD_DIR)/include/SNAPSHOT.h endef +TARGET_CFLAGS += -DHAVE_SETNS TARGET_CFLAGS += -ffunction-sections -fdata-sections MAKE_FLAGS += \ - EXTRA_CCOPTS="-I$(STAGING_DIR)/usr/include/libnl-tiny" \ + EXTRA_CCOPTS="$(TARGET_CFLAGS) -I../include -I$(STAGING_DIR)/usr/include/libnl-tiny" \ KERNEL_INCLUDE="$(LINUX_DIR)/include" \ SHARED_LIBS="" \ LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \ IP_CONFIG_TINY=$(IP_CONFIG_TINY) \ - HAVE_MNL=$(HAVE_MNL) \ - IPT_LIB_DIR=/usr/lib/iptables \ FPIC="$(FPIC)" define Build/Compile @@ -138,13 +103,13 @@ define Build/InstallDev endef define Package/ip-tiny/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/sbin/ip-tiny + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/bin/ endef define Package/ip-full/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/sbin/ip-full + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/ endef define Package/tc/install @@ -174,16 +139,6 @@ define Package/nstat/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/nstat $(1)/usr/sbin/ endef -define Package/devlink/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/devlink/devlink $(1)/usr/sbin/ -endef - -define Package/rdma/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/rdma/rdma $(1)/usr/sbin/ -endef - $(eval $(call BuildPackage,ip-tiny)) $(eval $(call BuildPackage,ip-full)) $(eval $(call BuildPackage,tc)) @@ -191,5 +146,3 @@ $(eval $(call BuildPackage,genl)) $(eval $(call BuildPackage,ip-bridge)) $(eval $(call BuildPackage,ss)) $(eval $(call BuildPackage,nstat)) -$(eval $(call BuildPackage,devlink)) -$(eval $(call BuildPackage,rdma)) diff --git a/package/network/utils/iproute2/patches/001-config.patch b/package/network/utils/iproute2/patches/001-config.patch index 7f23cfc35..ece865299 100644 --- a/package/network/utils/iproute2/patches/001-config.patch +++ b/package/network/utils/iproute2/patches/001-config.patch @@ -2,6 +2,6 @@ +++ b/Config @@ -0,0 +1,4 @@ +# Fixed config to disable ATM support even if present on host system -+IP_CONFIG_SETNS:=y +TC_CONFIG_ATM:=n -+TC_CONFIG_XT:=y ++TC_CONFIG_ACTION_GACT=y ++TC_CONFIG_ACTION_PROB=y diff --git a/package/network/utils/iproute2/patches/004-darwin_fixes.patch b/package/network/utils/iproute2/patches/004-darwin_fixes.patch index 1f3eb101e..e1a5e9756 100644 --- a/package/network/utils/iproute2/patches/004-darwin_fixes.patch +++ b/package/network/utils/iproute2/patches/004-darwin_fixes.patch @@ -42,7 +42,7 @@ #define TABLESIZE 16384 --- a/netem/paretonormal.c +++ b/netem/paretonormal.c -@@ -14,10 +14,13 @@ +@@ -15,10 +15,13 @@ #include #include #include diff --git a/package/network/utils/iproute2/patches/006-no_sctp.patch b/package/network/utils/iproute2/patches/006-no_sctp.patch index e23fbcd77..6805468d8 100644 --- a/package/network/utils/iproute2/patches/006-no_sctp.patch +++ b/package/network/utils/iproute2/patches/006-no_sctp.patch @@ -1,6 +1,6 @@ --- a/ip/ipxfrm.c +++ b/ip/ipxfrm.c -@@ -454,7 +454,6 @@ void xfrm_selector_print(struct xfrm_sel +@@ -470,7 +470,6 @@ void xfrm_selector_print(struct xfrm_sel switch (sel->proto) { case IPPROTO_TCP: case IPPROTO_UDP: @@ -8,7 +8,7 @@ case IPPROTO_DCCP: default: /* XXX */ if (sel->sport_mask) -@@ -1329,7 +1328,6 @@ static int xfrm_selector_upspec_parse(st +@@ -1341,7 +1340,6 @@ static int xfrm_selector_upspec_parse(st switch (sel->proto) { case IPPROTO_TCP: case IPPROTO_UDP: diff --git a/package/network/utils/iproute2/patches/007-no_arpd.patch b/package/network/utils/iproute2/patches/007-no_arpd.patch index ac216ba82..94fb197a4 100644 --- a/package/network/utils/iproute2/patches/007-no_arpd.patch +++ b/package/network/utils/iproute2/patches/007-no_arpd.patch @@ -2,7 +2,7 @@ +++ b/misc/Makefile @@ -5,9 +5,9 @@ TARGETS=ss nstat ifstat rtacct lnstat - include ../config.mk + include ../Config -ifeq ($(HAVE_BERKELEY_DB),y) - TARGETS += arpd @@ -11,5 +11,5 @@ +# TARGETS += arpd +#endif - all: $(TARGETS) - + ifeq ($(HAVE_SELINUX),y) + LDLIBS += $(shell $(PKG_CONFIG) --libs libselinux) diff --git a/package/network/utils/iproute2/patches/008-no_netem.patch b/package/network/utils/iproute2/patches/008-no_netem.patch index 2e088f199..fce16e02d 100644 --- a/package/network/utils/iproute2/patches/008-no_netem.patch +++ b/package/network/utils/iproute2/patches/008-no_netem.patch @@ -1,11 +1,11 @@ --- a/Makefile +++ b/Makefile -@@ -49,7 +49,7 @@ WFLAGS += -Wmissing-declarations -Wold-s - CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) +@@ -41,7 +41,7 @@ WFLAGS += -Wmissing-declarations -Wold-s + CFLAGS := $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(CFLAGS) YACCFLAGS = -d -t -v --SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma man -+SUBDIRS=lib ip tc bridge misc genl tipc devlink rdma man +-SUBDIRS=lib ip tc bridge misc netem genl tipc man ++SUBDIRS=lib ip tc bridge misc genl tipc man LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a LDLIBS += $(LIBNETLINK) diff --git a/package/network/utils/iproute2/patches/009-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/009-keep_libmnl_optional.patch deleted file mode 100644 index 7a5a70223..000000000 --- a/package/network/utils/iproute2/patches/009-keep_libmnl_optional.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure -+++ b/configure -@@ -292,7 +292,7 @@ check_selinux() - - check_mnl() - { -- if ${PKG_CONFIG} libmnl --exists -+ if [ "${HAVE_MNL}" = "y" ] && ${PKG_CONFIG} libmnl --exists - then - echo "HAVE_MNL:=y" >>$CONFIG - echo "yes" diff --git a/package/network/utils/iproute2/patches/010-type_fixes.patch b/package/network/utils/iproute2/patches/010-type_fixes.patch new file mode 100644 index 000000000..e0055fce7 --- /dev/null +++ b/package/network/utils/iproute2/patches/010-type_fixes.patch @@ -0,0 +1,396 @@ +--- a/include/iptables_common.h ++++ b/include/iptables_common.h +@@ -2,6 +2,8 @@ + #define _IPTABLES_COMMON_H + /* Shared definitions between ipv4 and ipv6. */ + ++#include ++ + enum exittype { + OTHER_PROBLEM = 1, + PARAMETER_PROBLEM, +@@ -43,9 +45,9 @@ extern char *lib_dir; + extern void init_extensions(void); + #endif + +-#define __be32 u_int32_t +-#define __le32 u_int32_t +-#define __be16 u_int16_t +-#define __le16 u_int16_t ++#define __be32 uint32_t ++#define __le32 uint32_t ++#define __be16 uint16_t ++#define __le16 uint16_t + + #endif /*_IPTABLES_COMMON_H*/ +--- a/include/netinet/tcp.h ++++ /dev/null +@@ -1,231 +0,0 @@ +-/* +- * Copyright (c) 1982, 1986, 1993 +- * The Regents of the University of California. All rights reserved. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * 4. Neither the name of the University nor the names of its contributors +- * may be used to endorse or promote products derived from this software +- * without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +- * SUCH DAMAGE. +- * +- * @(#)tcp.h 8.1 (Berkeley) 6/10/93 +- */ +- +-#ifndef _NETINET_TCP_H +-#define _NETINET_TCP_H 1 +- +-#include +- +-/* +- * User-settable options (used with setsockopt). +- */ +-#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */ +-#define TCP_MAXSEG 2 /* Set maximum segment size */ +-#define TCP_CORK 3 /* Control sending of partial frames */ +-#define TCP_KEEPIDLE 4 /* Start keeplives after this period */ +-#define TCP_KEEPINTVL 5 /* Interval between keepalives */ +-#define TCP_KEEPCNT 6 /* Number of keepalives before death */ +-#define TCP_SYNCNT 7 /* Number of SYN retransmits */ +-#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */ +-#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */ +-#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */ +-#define TCP_INFO 11 /* Information about this connection. */ +-#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */ +-#define TCP_CONGESTION 13 /* Congestion control algorithm. */ +- +-#ifdef __USE_MISC +-# include +- +-# ifdef __FAVOR_BSD +-typedef u_int32_t tcp_seq; +-/* +- * TCP header. +- * Per RFC 793, September, 1981. +- */ +-struct tcphdr +- { +- u_int16_t th_sport; /* source port */ +- u_int16_t th_dport; /* destination port */ +- tcp_seq th_seq; /* sequence number */ +- tcp_seq th_ack; /* acknowledgement number */ +-# if __BYTE_ORDER == __LITTLE_ENDIAN +- u_int8_t th_x2:4; /* (unused) */ +- u_int8_t th_off:4; /* data offset */ +-# endif +-# if __BYTE_ORDER == __BIG_ENDIAN +- u_int8_t th_off:4; /* data offset */ +- u_int8_t th_x2:4; /* (unused) */ +-# endif +- u_int8_t th_flags; +-# define TH_FIN 0x01 +-# define TH_SYN 0x02 +-# define TH_RST 0x04 +-# define TH_PUSH 0x08 +-# define TH_ACK 0x10 +-# define TH_URG 0x20 +- u_int16_t th_win; /* window */ +- u_int16_t th_sum; /* checksum */ +- u_int16_t th_urp; /* urgent pointer */ +-}; +- +-# else /* !__FAVOR_BSD */ +-struct tcphdr +- { +- u_int16_t source; +- u_int16_t dest; +- u_int32_t seq; +- u_int32_t ack_seq; +-# if __BYTE_ORDER == __LITTLE_ENDIAN +- u_int16_t res1:4; +- u_int16_t doff:4; +- u_int16_t fin:1; +- u_int16_t syn:1; +- u_int16_t rst:1; +- u_int16_t psh:1; +- u_int16_t ack:1; +- u_int16_t urg:1; +- u_int16_t res2:2; +-# elif __BYTE_ORDER == __BIG_ENDIAN +- u_int16_t doff:4; +- u_int16_t res1:4; +- u_int16_t res2:2; +- u_int16_t urg:1; +- u_int16_t ack:1; +- u_int16_t psh:1; +- u_int16_t rst:1; +- u_int16_t syn:1; +- u_int16_t fin:1; +-# else +-# error "Adjust your defines" +-# endif +- u_int16_t window; +- u_int16_t check; +- u_int16_t urg_ptr; +-}; +-# endif /* __FAVOR_BSD */ +- +-enum +-{ +- TCP_ESTABLISHED = 1, +- TCP_SYN_SENT, +- TCP_SYN_RECV, +- TCP_FIN_WAIT1, +- TCP_FIN_WAIT2, +- TCP_TIME_WAIT, +- TCP_CLOSE, +- TCP_CLOSE_WAIT, +- TCP_LAST_ACK, +- TCP_LISTEN, +- TCP_CLOSING /* now a valid state */ +-}; +- +-# define TCPOPT_EOL 0 +-# define TCPOPT_NOP 1 +-# define TCPOPT_MAXSEG 2 +-# define TCPOLEN_MAXSEG 4 +-# define TCPOPT_WINDOW 3 +-# define TCPOLEN_WINDOW 3 +-# define TCPOPT_SACK_PERMITTED 4 /* Experimental */ +-# define TCPOLEN_SACK_PERMITTED 2 +-# define TCPOPT_SACK 5 /* Experimental */ +-# define TCPOPT_TIMESTAMP 8 +-# define TCPOLEN_TIMESTAMP 10 +-# define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */ +- +-# define TCPOPT_TSTAMP_HDR \ +- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) +- +-/* +- * Default maximum segment size for TCP. +- * With an IP MSS of 576, this is 536, +- * but 512 is probably more convenient. +- * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)). +- */ +-# define TCP_MSS 512 +- +-# define TCP_MAXWIN 65535 /* largest value for (unscaled) window */ +- +-# define TCP_MAX_WINSHIFT 14 /* maximum window shift */ +- +-# define SOL_TCP 6 /* TCP level */ +- +- +-# define TCPI_OPT_TIMESTAMPS 1 +-# define TCPI_OPT_SACK 2 +-# define TCPI_OPT_WSCALE 4 +-# define TCPI_OPT_ECN 8 +-# define TCPI_OPT_ECN_SEEN 16 +- +-/* Values for tcpi_state. */ +-enum tcp_ca_state +-{ +- TCP_CA_Open = 0, +- TCP_CA_Disorder = 1, +- TCP_CA_CWR = 2, +- TCP_CA_Recovery = 3, +- TCP_CA_Loss = 4 +-}; +- +-struct tcp_info +-{ +- u_int8_t tcpi_state; +- u_int8_t tcpi_ca_state; +- u_int8_t tcpi_retransmits; +- u_int8_t tcpi_probes; +- u_int8_t tcpi_backoff; +- u_int8_t tcpi_options; +- u_int8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; +- +- u_int32_t tcpi_rto; +- u_int32_t tcpi_ato; +- u_int32_t tcpi_snd_mss; +- u_int32_t tcpi_rcv_mss; +- +- u_int32_t tcpi_unacked; +- u_int32_t tcpi_sacked; +- u_int32_t tcpi_lost; +- u_int32_t tcpi_retrans; +- u_int32_t tcpi_fackets; +- +- /* Times. */ +- u_int32_t tcpi_last_data_sent; +- u_int32_t tcpi_last_ack_sent; /* Not remembered, sorry. */ +- u_int32_t tcpi_last_data_recv; +- u_int32_t tcpi_last_ack_recv; +- +- /* Metrics. */ +- u_int32_t tcpi_pmtu; +- u_int32_t tcpi_rcv_ssthresh; +- u_int32_t tcpi_rtt; +- u_int32_t tcpi_rttvar; +- u_int32_t tcpi_snd_ssthresh; +- u_int32_t tcpi_snd_cwnd; +- u_int32_t tcpi_advmss; +- u_int32_t tcpi_reordering; +- u_int32_t tcpi_rcv_rtt; +- u_int32_t tcpi_rcv_space; +- u_int32_t tcpi_total_retrans; +- +-}; +- +-#endif /* Misc. */ +- +-#endif /* netinet/tcp.h */ +--- a/include/iptables.h ++++ b/include/iptables.h +@@ -20,7 +20,7 @@ struct ipt_get_revision + { + char name[IPT_FUNCTION_MAXNAMELEN-1]; + +- u_int8_t revision; ++ uint8_t revision; + }; + #endif /* IPT_SO_GET_REVISION_MATCH Old kernel source */ + +@@ -39,7 +39,7 @@ struct iptables_match + ipt_chainlabel name; + + /* Revision of match (0 by default). */ +- u_int8_t revision; ++ uint8_t revision; + + const char *version; + +@@ -92,7 +92,7 @@ struct iptables_target + ipt_chainlabel name; + + /* Revision of target (0 by default). */ +- u_int8_t revision; ++ uint8_t revision; + + const char *version; + +@@ -153,7 +153,7 @@ extern char *mask_to_dotted(const struct + + extern void parse_hostnetworkmask(const char *name, struct in_addr **addrpp, + struct in_addr *maskp, unsigned int *naddrs); +-extern u_int16_t parse_protocol(const char *s); ++extern uint16_t parse_protocol(const char *s); + + extern int do_command(int argc, char *argv[], char **table, + iptc_handle_t *handle); +--- a/lib/dnet_ntop.c ++++ b/lib/dnet_ntop.c +@@ -1,24 +1,25 @@ + #include + #include ++#include + #include + #include + + #include "utils.h" + +-static __inline__ u_int16_t dn_ntohs(u_int16_t addr) ++static __inline__ uint16_t dn_ntohs(uint16_t addr) + { + union { +- u_int8_t byte[2]; +- u_int16_t word; ++ uint8_t byte[2]; ++ uint16_t word; + } u; + + u.word = addr; +- return ((u_int16_t)u.byte[0]) | (((u_int16_t)u.byte[1]) << 8); ++ return ((uint16_t)u.byte[0]) | (((uint16_t)u.byte[1]) << 8); + } + +-static __inline__ int do_digit(char *str, u_int16_t *addr, u_int16_t scale, size_t *pos, size_t len, int *started) ++static __inline__ int do_digit(char *str, uint16_t *addr, uint16_t scale, size_t *pos, size_t len, int *started) + { +- u_int16_t tmp = *addr / scale; ++ uint16_t tmp = *addr / scale; + + if (*pos == len) + return 1; +@@ -36,7 +37,7 @@ static __inline__ int do_digit(char *str + + static const char *dnet_ntop1(const struct dn_naddr *dna, char *str, size_t len) + { +- u_int16_t addr, area; ++ uint16_t addr, area; + size_t pos = 0; + int started = 0; + +--- a/lib/dnet_pton.c ++++ b/lib/dnet_pton.c +@@ -1,23 +1,24 @@ + #include + #include ++#include + #include + #include + + #include "utils.h" + +-static __inline__ u_int16_t dn_htons(u_int16_t addr) ++static __inline__ uint16_t dn_htons(uint16_t addr) + { + union { +- u_int8_t byte[2]; +- u_int16_t word; ++ uint8_t byte[2]; ++ uint16_t word; + } u; + + u.word = addr; +- return ((u_int16_t)u.byte[0]) | (((u_int16_t)u.byte[1]) << 8); ++ return ((uint16_t)u.byte[0]) | (((uint16_t)u.byte[1]) << 8); + } + + +-static int dnet_num(const char *src, u_int16_t * dst) ++static int dnet_num(const char *src, uint16_t * dst) + { + int rv = 0; + int tmp; +@@ -38,9 +39,9 @@ static int dnet_num(const char *src, u_i + + static int dnet_pton1(const char *src, struct dn_naddr *dna) + { +- u_int16_t addr; +- u_int16_t area = 0; +- u_int16_t node = 0; ++ uint16_t addr; ++ uint16_t area = 0; ++ uint16_t node = 0; + int pos; + + pos = dnet_num(src, &area); +--- a/include/libiptc/ipt_kernel_headers.h ++++ b/include/libiptc/ipt_kernel_headers.h +@@ -5,7 +5,7 @@ + + #include + +-#if defined(__GLIBC__) && __GLIBC__ == 2 ++#if 1 + #include + #include + #include diff --git a/package/network/utils/iproute2/patches/100-allow_pfifo_fast.patch b/package/network/utils/iproute2/patches/100-allow_pfifo_fast.patch index caf889e12..ce958a934 100644 --- a/package/network/utils/iproute2/patches/100-allow_pfifo_fast.patch +++ b/package/network/utils/iproute2/patches/100-allow_pfifo_fast.patch @@ -1,6 +1,6 @@ --- a/tc/q_fifo.c +++ b/tc/q_fifo.c -@@ -97,5 +97,6 @@ struct qdisc_util pfifo_head_drop_qdisc_ +@@ -98,5 +98,6 @@ struct qdisc_util pfifo_head_drop_qdisc_ extern int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt); struct qdisc_util pfifo_fast_qdisc_util = { .id = "pfifo_fast", diff --git a/package/network/utils/iproute2/patches/110-extra-ccopts.patch b/package/network/utils/iproute2/patches/110-extra-ccopts.patch index e779934d7..3cb5a7940 100644 --- a/package/network/utils/iproute2/patches/110-extra-ccopts.patch +++ b/package/network/utils/iproute2/patches/110-extra-ccopts.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -42,7 +42,7 @@ HOSTCC ?= $(CC) +@@ -34,7 +34,7 @@ HOSTCC = gcc DEFINES += -D_GNU_SOURCE # Turn on transparent support for LFS DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE diff --git a/package/network/utils/iproute2/patches/120-libnetlink-pic.patch b/package/network/utils/iproute2/patches/120-libnetlink-pic.patch index 83ce66d97..1f397f71b 100644 --- a/package/network/utils/iproute2/patches/120-libnetlink-pic.patch +++ b/package/network/utils/iproute2/patches/120-libnetlink-pic.patch @@ -1,10 +1,11 @@ --- a/lib/Makefile +++ b/lib/Makefile -@@ -1,6 +1,6 @@ - include ../config.mk +@@ -4,7 +4,7 @@ ifeq ($(IP_CONFIG_SETNS),y) + CFLAGS += -DHAVE_SETNS + endif -CFLAGS += -fPIC +CFLAGS += $(FPIC) UTILOBJ = utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o \ - inet_proto.o namespace.o json_writer.o json_print.o \ + inet_proto.o namespace.o json_writer.o \ diff --git a/package/network/utils/iproute2/patches/130-missing_include.patch b/package/network/utils/iproute2/patches/130-missing_include.patch new file mode 100644 index 000000000..8759a6259 --- /dev/null +++ b/package/network/utils/iproute2/patches/130-missing_include.patch @@ -0,0 +1,20 @@ +--- a/lib/namespace.c ++++ b/lib/namespace.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include "utils.h" + #include "namespace.h" +--- a/lib/rt_names.c ++++ b/lib/rt_names.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/package/network/utils/iproute2/patches/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch b/package/network/utils/iproute2/patches/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch deleted file mode 100644 index e3364ad05..000000000 --- a/package/network/utils/iproute2/patches/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch +++ /dev/null @@ -1,107 +0,0 @@ -From f972afc2509eebcb00d370256c55b112a3b5ffca Mon Sep 17 00:00:00 2001 -From: David Heidelberger -Date: Mon, 29 Jun 2015 16:50:40 +0200 -Subject: [PATCH 2/3] uapi/libc-compat.h: do not rely on __GLIBC__ - -Musl provides the same structs as glibc, but does not provide a define to -allow its detection. Since the absence of __GLIBC__ also can mean that it -is included from the kernel, change the __GLIBC__ detection to -!__KERNEL__, which should always be true when included from userspace. - -Signed-off-by: John Spencer -Tested-by: David Heidelberger -Signed-off-by: Jonas Gorski ---- - include/uapi/linux/libc-compat.h | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - ---- a/include/uapi/linux/libc-compat.h -+++ b/include/uapi/linux/libc-compat.h -@@ -49,13 +49,13 @@ - #ifndef _LIBC_COMPAT_H - #define _LIBC_COMPAT_H - --/* We have included glibc headers... */ --#if defined(__GLIBC__) -+/* We have included libc headers... */ -+#if !defined(__KERNEL__) - --/* Coordinate with glibc net/if.h header. */ --#if defined(_NET_IF_H) && defined(__USE_MISC) -+/* Coordinate with libc net/if.h header. */ -+#if defined(_NET_IF_H) && (!defined(__GLIBC__) || defined(__USE_MISC)) - --/* GLIBC headers included first so don't define anything -+/* LIBC headers included first so don't define anything - * that would already be defined. */ - - #define __UAPI_DEF_IF_IFCONF 0 -@@ -66,7 +66,11 @@ - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 - /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ - #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO -+#ifdef __GLIBC__ - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 -+#else -+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 -+#endif - #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ - - #else /* _NET_IF_H */ -@@ -86,10 +90,10 @@ - - #endif /* _NET_IF_H */ - --/* Coordinate with glibc netinet/in.h header. */ -+/* Coordinate with libc netinet/in.h header. */ - #if defined(_NETINET_IN_H) - --/* GLIBC headers included first so don't define anything -+/* LIBC headers included first so don't define anything - * that would already be defined. */ - #define __UAPI_DEF_IN_ADDR 0 - #define __UAPI_DEF_IN_IPPROTO 0 -@@ -103,7 +107,7 @@ - * if the glibc code didn't define them. This guard matches - * the guard in glibc/inet/netinet/in.h which defines the - * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ --#if defined(__USE_MISC) || defined (__USE_GNU) -+#if !defined(__GLIBC__) || defined(__USE_MISC) || defined (__USE_GNU) - #define __UAPI_DEF_IN6_ADDR_ALT 0 - #else - #define __UAPI_DEF_IN6_ADDR_ALT 1 -@@ -118,7 +122,7 @@ - #else - - /* Linux headers included first, and we must define everything -- * we need. The expectation is that glibc will check the -+ * we need. The expectation is that the libc will check the - * __UAPI_DEF_* defines and adjust appropriately. */ - #define __UAPI_DEF_IN_ADDR 1 - #define __UAPI_DEF_IN_IPPROTO 1 -@@ -128,7 +132,7 @@ - #define __UAPI_DEF_IN_CLASS 1 - - #define __UAPI_DEF_IN6_ADDR 1 --/* We unconditionally define the in6_addr macros and glibc must -+/* We unconditionally define the in6_addr macros and the libc must - * coordinate. */ - #define __UAPI_DEF_IN6_ADDR_ALT 1 - #define __UAPI_DEF_SOCKADDR_IN6 1 -@@ -169,7 +173,7 @@ - /* If we did not see any headers from any supported C libraries, - * or we are being included in the kernel, then define everything - * that we need. */ --#else /* !defined(__GLIBC__) */ -+#else /* defined(__KERNEL__) */ - - /* Definitions for if.h */ - #define __UAPI_DEF_IF_IFCONF 1 -@@ -209,6 +213,6 @@ - /* Definitions for xattr.h */ - #define __UAPI_DEF_XATTR 1 - --#endif /* __GLIBC__ */ -+#endif /* __KERNEL__ */ - - #endif /* _LIBC_COMPAT_H */ diff --git a/package/network/utils/iproute2/patches/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch b/package/network/utils/iproute2/patches/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch deleted file mode 100644 index abd1f7eac..000000000 --- a/package/network/utils/iproute2/patches/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch +++ /dev/null @@ -1,67 +0,0 @@ -From fcbb6fed85ea9ff4feb4f1ebd4f0f235fdaf06b6 Mon Sep 17 00:00:00 2001 -From: David Heidelberger -Date: Mon, 29 Jun 2015 16:53:03 +0200 -Subject: [PATCH 3/3] uapi/if_ether.h: prevent redefinition of struct ethhdr - -Musl provides its own ethhdr struct definition. Add a guard to prevent -its definition of the appropriate musl header has already been included. - -Signed-off-by: John Spencer -Tested-by: David Heidelberger -Signed-off-by: Jonas Gorski ---- - include/uapi/linux/if_ether.h | 3 +++ - include/uapi/linux/libc-compat.h | 11 +++++++++++ - 2 files changed, 14 insertions(+) - ---- a/include/uapi/linux/if_ether.h -+++ b/include/uapi/linux/if_ether.h -@@ -23,6 +23,7 @@ - #define _LINUX_IF_ETHER_H - - #include -+#include - - /* - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble -@@ -149,11 +150,13 @@ - * This is an Ethernet frame header. - */ - -+#if __UAPI_DEF_ETHHDR - struct ethhdr { - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ - unsigned char h_source[ETH_ALEN]; /* source ether addr */ - __be16 h_proto; /* packet type ID field */ - } __attribute__((packed)); -+#endif - - - #endif /* _LINUX_IF_ETHER_H */ ---- a/include/uapi/linux/libc-compat.h -+++ b/include/uapi/linux/libc-compat.h -@@ -90,6 +90,14 @@ - - #endif /* _NET_IF_H */ - -+/* musl defines the ethhdr struct itself in its netinet/if_ether.h. -+ * Glibc just includes the kernel header and uses a different guard. */ -+#if defined(_NETINET_IF_ETHER_H) -+#define __UAPI_DEF_ETHHDR 0 -+#else -+#define __UAPI_DEF_ETHHDR 1 -+#endif -+ - /* Coordinate with libc netinet/in.h header. */ - #if defined(_NETINET_IN_H) - -@@ -185,6 +193,9 @@ - /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 - -+/* Definitions for if_ether.h */ -+#define __UAPI_DEF_ETHHDR 1 -+ - /* Definitions for in.h */ - #define __UAPI_DEF_IN_ADDR 1 - #define __UAPI_DEF_IN_IPPROTO 1 diff --git a/package/network/utils/iproute2/patches/300-ip_tiny.patch b/package/network/utils/iproute2/patches/300-ip_tiny.patch index 35b588f7e..290adbe5f 100644 --- a/package/network/utils/iproute2/patches/300-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/300-ip_tiny.patch @@ -1,8 +1,8 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -15,6 +15,13 @@ RTMONOBJ=rtmon.o - - include ../config.mk +@@ -17,6 +17,13 @@ ifeq ($(IP_CONFIG_SETNS),y) + CFLAGS += -DHAVE_SETNS + endif +STATIC_SYM_FILTER:= +ifeq ($(IP_CONFIG_TINY),y) @@ -25,24 +25,7 @@ sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ --- a/ip/ip.c +++ b/ip/ip.c -@@ -49,10 +49,16 @@ static void usage(void) - fprintf(stderr, - "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" - " ip [ -force ] -batch filename\n" -+#ifndef IPROUTE2_TINY - "where OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |\n" - " tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |\n" - " netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |\n" - " vrf | sr }\n" -+#else -+"where OBJECT := { link | address | route | rule | neigh | tunnel | maddress |\n" -+" mroute | mrule | monitor | netns | macsec | token | ila |\n" -+" vrf | sr }\n" -+#endif - " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" - " -h[uman-readable] | -iec |\n" - " -f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } |\n" -@@ -74,32 +80,44 @@ static const struct cmd { +@@ -73,30 +73,42 @@ static const struct cmd { int (*func)(int argc, char **argv); } cmds[] = { { "address", do_ipaddr }, @@ -63,8 +46,6 @@ { "l2tp", do_ipl2tp }, { "fou", do_ipfou }, +#endif - { "ila", do_ipila }, - { "macsec", do_ipmacsec }, { "tunnel", do_iptunnel }, { "tunl", do_iptunnel }, +#ifndef IPROUTE2_TINY @@ -84,12 +65,12 @@ +#ifndef IPROUTE2_TINY { "netconf", do_ipnetconf }, +#endif - { "vrf", do_ipvrf}, - { "sr", do_seg6 }, { "help", do_help }, + { 0 } + }; --- a/lib/utils.c +++ b/lib/utils.c -@@ -817,6 +817,7 @@ const char *rt_addr_n2a_r(int af, int le +@@ -710,6 +710,7 @@ const char *rt_addr_n2a(int af, int len, return inet_ntop(af, addr, buf, buflen); case AF_MPLS: return mpls_ntop(af, addr, buf, buflen); @@ -97,7 +78,7 @@ case AF_IPX: return ipx_ntop(af, addr, buf, buflen); case AF_DECnet: -@@ -826,6 +827,7 @@ const char *rt_addr_n2a_r(int af, int le +@@ -718,6 +719,7 @@ const char *rt_addr_n2a(int af, int len, memcpy(dna.a_addr, addr, 2); return dnet_ntop(af, &dna, buf, buflen); } @@ -107,14 +88,14 @@ default: --- a/lib/Makefile +++ b/lib/Makefile -@@ -2,6 +2,10 @@ include ../config.mk - - CFLAGS += $(FPIC) +@@ -4,6 +4,10 @@ ifeq ($(IP_CONFIG_SETNS),y) + CFLAGS += -DHAVE_SETNS + endif +ifeq ($(IP_CONFIG_TINY),y) + CFLAGS += -DIPROUTE2_TINY +endif + + CFLAGS += $(FPIC) + UTILOBJ = utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o \ - inet_proto.o namespace.o json_writer.o json_print.o \ - names.o color.o bpf.o exec.o fs.o diff --git a/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch b/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch index 1980f8710..ff2e0aa1e 100644 --- a/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch +++ b/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch @@ -9,6 +9,29 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY ip/rtm_map.c | 4 ++++ 3 files changed, 9 insertions(+) +--- a/include/linux/fib_rules.h ++++ b/include/linux/fib_rules.h +@@ -64,6 +64,10 @@ enum { + FR_ACT_BLACKHOLE, /* Drop without notification */ + FR_ACT_UNREACHABLE, /* Drop with ENETUNREACH */ + FR_ACT_PROHIBIT, /* Drop with EACCES */ ++ FR_ACT_RES8, ++ FR_ACT_RES9, ++ FR_ACT_RES10, ++ FR_ACT_FAILED_POLICY, /* Drop with EPERM */ + __FR_ACT_MAX, + }; + +--- a/include/linux/rtnetlink.h ++++ b/include/linux/rtnetlink.h +@@ -210,6 +210,7 @@ enum { + RTN_THROW, /* Not in this table */ + RTN_NAT, /* Translate this address */ + RTN_XRESOLVE, /* Use external resolver */ ++ RTN_FAILED_POLICY, /* Source address failed policy */ + __RTN_MAX + }; + --- a/ip/rtm_map.c +++ b/ip/rtm_map.c @@ -49,6 +49,8 @@ char *rtnl_rtntype_n2a(int id, char *buf @@ -29,13 +52,3 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY else { res = strtoul(arg, &end, 0); if (!end || end == arg || *end || res > 255) ---- a/include/uapi/linux/rtnetlink.h -+++ b/include/uapi/linux/rtnetlink.h -@@ -221,6 +221,7 @@ enum { - RTN_THROW, /* Not in this table */ - RTN_NAT, /* Translate this address */ - RTN_XRESOLVE, /* Use external resolver */ -+ RTN_FAILED_POLICY, /* Source address failed policy */ - __RTN_MAX - }; - diff --git a/package/network/utils/iproute2/patches/910-sanitize_headers_for_musl.patch b/package/network/utils/iproute2/patches/910-sanitize_headers_for_musl.patch new file mode 100644 index 000000000..ca1125d1d --- /dev/null +++ b/package/network/utils/iproute2/patches/910-sanitize_headers_for_musl.patch @@ -0,0 +1,10 @@ +--- a/include/linux/if_bridge.h ++++ b/include/linux/if_bridge.h +@@ -15,7 +15,6 @@ + + #include + #include +-#include + + #define SYSFS_BRIDGE_ATTR "bridge" + #define SYSFS_BRIDGE_FDB "brforward" diff --git a/package/network/utils/iproute2/patches/911-fix_in_h_include.patch b/package/network/utils/iproute2/patches/911-fix_in_h_include.patch new file mode 100644 index 000000000..42a7b24bb --- /dev/null +++ b/package/network/utils/iproute2/patches/911-fix_in_h_include.patch @@ -0,0 +1,30 @@ +--- a/include/linux/in.h ++++ b/include/linux/in.h +@@ -15,6 +15,7 @@ + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ ++#ifndef _NETINET_IN_H + #ifndef _LINUX_IN_H + #define _LINUX_IN_H + +@@ -297,3 +298,4 @@ struct sockaddr_in { + + + #endif /* _LINUX_IN_H */ ++#endif /* _NETINET_IN_H */ +--- a/include/linux/in6.h ++++ b/include/linux/in6.h +@@ -18,6 +18,7 @@ + * 2 of the License, or (at your option) any later version. + */ + ++#ifndef _NETINET_IN_H + #ifndef _LINUX_IN6_H + #define _LINUX_IN6_H + +@@ -291,3 +292,4 @@ struct in6_flowlabel_req { + * MRT6_MAX + */ + #endif /* _LINUX_IN6_H */ ++#endif /* _NETINET_IN_H */ diff --git a/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch b/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch index 5e91cd7ed..882db8af1 100644 --- a/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch +++ b/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch @@ -1,6 +1,6 @@ ---- a/include/uapi/linux/pkt_sched.h -+++ b/include/uapi/linux/pkt_sched.h -@@ -872,4 +872,63 @@ struct tc_pie_xstats { +--- a/include/linux/pkt_sched.h ++++ b/include/linux/pkt_sched.h +@@ -850,4 +850,63 @@ struct tc_pie_xstats { __u32 maxq; /* maximum queue size */ __u32 ecn_mark; /* packets marked with ecn*/ }; @@ -66,14 +66,14 @@ #endif --- a/tc/Makefile +++ b/tc/Makefile -@@ -65,6 +65,7 @@ TCMODULES += q_codel.o +@@ -63,6 +63,7 @@ TCMODULES += q_codel.o TCMODULES += q_fq_codel.o TCMODULES += q_fq.o TCMODULES += q_pie.o +TCMODULES += q_cake.o TCMODULES += q_hhf.o - TCMODULES += q_clsact.o TCMODULES += e_bpf.o + --- /dev/null +++ b/tc/q_cake.c @@ -0,0 +1,771 @@ diff --git a/package/network/utils/iproute2/patches/960-ipmonitor-fix-ip-monitor-can-t-work-when-NET_NS-is-n.patch b/package/network/utils/iproute2/patches/960-ipmonitor-fix-ip-monitor-can-t-work-when-NET_NS-is-n.patch new file mode 100644 index 000000000..610fb525a --- /dev/null +++ b/package/network/utils/iproute2/patches/960-ipmonitor-fix-ip-monitor-can-t-work-when-NET_NS-is-n.patch @@ -0,0 +1,35 @@ +From c44003f7e7254ac972eaa1b22a686471ea4ce2d7 Mon Sep 17 00:00:00 2001 +From: Liping Zhang +Date: Tue, 20 Sep 2016 02:09:02 -0700 +Subject: [PATCH] ipmonitor: fix ip monitor can't work when NET_NS is not + enabled + +In ip monitor, netns_map_init will check getnsid is supported or not. +But when /proc/self/ns/net does not exist, we just print out error +messages and exit. So user cannot use ip monitor anymore when +CONFIG_NET_NS is disabled: + # ip monitor + open("/proc/self/ns/net"): No such file or directory + +If open "/proc/self/ns/net" failed, set have_rtnl_getnsid to false. + +Fixes: d652ccbf8195 ("netns: allow to dump and monitor nsid") +Signed-off-by: Liping Zhang +Acked-by: Nicolas Dichtel +--- + ip/ipnetns.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/ip/ipnetns.c ++++ b/ip/ipnetns.c +@@ -73,8 +73,8 @@ static int ipnetns_have_nsid(void) + + fd = open("/proc/self/ns/net", O_RDONLY); + if (fd < 0) { +- perror("open(\"/proc/self/ns/net\")"); +- exit(1); ++ have_rtnl_getnsid = 0; ++ return 0; + } + + addattr32(&req.n, 1024, NETNSA_FD, fd); diff --git a/package/network/utils/ipset/Makefile b/package/network/utils/ipset/Makefile index 55b7c493d..f44c1de23 100644 --- a/package/network/utils/ipset/Makefile +++ b/package/network/utils/ipset/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ipset -PKG_VERSION:=6.34 +PKG_VERSION:=6.32 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://ipset.netfilter.org -PKG_HASH:=d70e831b670b7aa25dde81fd994d3a7ce0c0e801559a557105576df66cd8d680 +PKG_HASH:=d9cbb49a4ae9e32d7808a604f1a37f359f9fc9064c210c4c5f35d629d49fb9fe PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 @@ -24,7 +24,7 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk -define Package/ipset/Default +define Package/ipset SECTION:=net CATEGORY:=Network DEPENDS+= +kmod-ipt-ipset +libmnl @@ -32,15 +32,6 @@ define Package/ipset/Default URL:=http://ipset.netfilter.org/ endef -define Package/ipset -$(call Package/ipset/Default) - DEPENDS+= +libipset -endef - -define Package/libipset -$(call Package/ipset/Default) -endef - CONFIGURE_ARGS += \ --with-kbuild="$(LINUX_DIR)" @@ -48,6 +39,10 @@ MAKE_FLAGS += \ ARCH="$(LINUX_KARCH)" \ SHELL="$(BASH)" +define Build/Compile + $(call Build/Compile/Default) +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/include/libipset $(1)/usr/include/ @@ -58,12 +53,8 @@ endef define Package/ipset/install $(INSTALL_DIR) $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/ -endef - -define Package/libipset/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/ endef $(eval $(call BuildPackage,ipset)) -$(eval $(call BuildPackage,libipset)) diff --git a/package/network/utils/ipset/patches/001-Replace-the-last-reference-to-u_int8_t-with-uint8_t.patch b/package/network/utils/ipset/patches/001-Replace-the-last-reference-to-u_int8_t-with-uint8_t.patch deleted file mode 100644 index 745e9fa3b..000000000 --- a/package/network/utils/ipset/patches/001-Replace-the-last-reference-to-u_int8_t-with-uint8_t.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a4212bf911026740afc7fce98d9100e2ef5dcea0 Mon Sep 17 00:00:00 2001 -From: Jozsef Kadlecsik -Date: Tue, 26 Sep 2017 07:00:13 +0200 -Subject: [PATCH] Replace the last reference to u_int8_t with uint8_t. - ---- - src/ipset.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/ipset.c b/src/ipset.c -index 79f56b8..df0778a 100644 ---- a/src/ipset.c -+++ b/src/ipset.c -@@ -282,7 +282,7 @@ call_parser(int *argc, char *argv[], const struct ipset_type *type, - const struct ipset_arg *arg; - const char *optstr; - const struct ipset_type *t = type; -- u_int8_t revision = type->revision; -+ uint8_t revision = type->revision; - int ret = 0, i = 1; - - /* Currently CREATE and ADT may have got additional arguments */ --- -2.13.5 - diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile index e09c35c69..bf1a792c0 100644 --- a/package/network/utils/iptables/Makefile +++ b/package/network/utils/iptables/Makefile @@ -9,20 +9,20 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=iptables -PKG_VERSION:=1.6.1 -PKG_RELEASE:=1 +PKG_VERSION:=1.4.21 +PKG_RELEASE:=2 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://git.netfilter.org/iptables -PKG_SOURCE_VERSION:=7df66f1c13563cfbab75246b009ce36f69ee4487 -PKG_MIRROR_HASH:=22f15ef41fd8e3724bedcee666b7b6a3491d2d038d580ef1fb032718dcb73f14 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \ + ftp://ftp.be.netfilter.org/pub/netfilter/iptables/ \ + ftp://ftp.de.netfilter.org/pub/netfilter/iptables/ \ + ftp://ftp.no.netfilter.org/pub/netfilter/iptables/ +PKG_HASH:=52004c68021da9a599feed27f65defcfb22128f7da2c0531c0f75de0f479d3e0 PKG_FIXUP:=autoreconf - PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0 -PKG_CPE_ID:=cpe:/a:netfilter_core_team:iptables include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) @@ -51,20 +51,6 @@ $(call Package/iptables/Default) DEPENDS+= +kmod-ipt-core +libip4tc +IPV6:libip6tc +libxtables endef -define Package/iptables/config - config IPTABLES_CONNLABEL - bool "Enable Connlabel support" - default n - help - This enable connlabel support in iptables. - - config IPTABLES_NFTABLES - bool "Enable Nftables support" - default n - help - This enable nftables support in iptables. -endef - define Package/iptables/description IP firewall administration tool. @@ -217,20 +203,6 @@ define Package/iptables-mod-nflog/description endef -define Package/iptables-mod-trace -$(call Package/iptables/Module, +kmod-ipt-debug +kmod-ipt-raw) - TITLE:=Netfilter TRACE target -endef - -define Package/iptables-mod-trace/description - iptables extension for TRACE target - - Includes: - - libxt_TRACE - -endef - - define Package/iptables-mod-nfqueue $(call Package/iptables/Module, +kmod-nfnetlink-queue +kmod-ipt-nfqueue) TITLE:=Netfilter NFQUEUE target @@ -396,15 +368,6 @@ U32 iptables extensions. endef -define Package/iptables-mod-checksum -$(call Package/iptables/Module, +kmod-ipt-checksum) - TITLE:=IP CHECKSUM target extension -endef - -define Package/iptables-mod-checksum/description -iptables extension for the CHECKSUM calculation target -endef - define Package/ip6tables $(call Package/iptables/Default) DEPENDS:=@IPV6 +kmod-ip6tables +iptables @@ -439,7 +402,6 @@ $(call Package/iptables/Default) SECTION:=libs CATEGORY:=Libraries DEPENDS:=+libip4tc +libip6tc +libxtables - ABI_VERSION:=$(PKG_VERSION) TITLE:=IPv4/IPv6 firewall - shared libiptc library (compatibility stub) endef @@ -448,7 +410,6 @@ $(call Package/iptables/Default) SECTION:=libs CATEGORY:=Libraries TITLE:=IPv4 firewall - shared libiptc library - ABI_VERSION:=$(PKG_VERSION) DEPENDS:=+libxtables endef @@ -457,7 +418,6 @@ $(call Package/iptables/Default) SECTION:=libs CATEGORY:=Libraries TITLE:=IPv6 firewall - shared libiptc library - ABI_VERSION:=$(PKG_VERSION) DEPENDS:=+libxtables endef @@ -466,10 +426,6 @@ define Package/libxtables SECTION:=libs CATEGORY:=Libraries TITLE:=IPv4/IPv6 firewall - shared xtables library - ABI_VERSION:=$(PKG_VERSION) - DEPENDS:= \ - +IPTABLES_CONNLABEL:libnetfilter-conntrack \ - +IPTABLES_NFTABLES:libnftnl endef TARGET_CPPFLAGS := \ @@ -488,12 +444,10 @@ TARGET_LDFLAGS += \ CONFIGURE_ARGS += \ --enable-shared \ - --enable-static \ --enable-devel \ --with-kernel="$(LINUX_DIR)/user_headers" \ --with-xtlibdir=/usr/lib/iptables \ - $(if $(CONFIG_IPTABLES_CONNLABEL),,--disable-connlabel) \ - $(if $(CONFIG_IPTABLES_NFTABLES),,--disable-nftables) \ + --enable-static \ $(if $(CONFIG_IPV6),,--disable-ipv6) MAKE_FLAGS := \ @@ -608,9 +562,7 @@ $(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m))) $(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m))) $(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m))) $(eval $(call BuildPlugin,iptables-mod-nflog,$(IPT_NFLOG-m))) -$(eval $(call BuildPlugin,iptables-mod-trace,$(IPT_DEBUG-m))) $(eval $(call BuildPlugin,iptables-mod-nfqueue,$(IPT_NFQUEUE-m))) -$(eval $(call BuildPlugin,iptables-mod-checksum,$(IPT_CHECKSUM-m))) $(eval $(call BuildPackage,ip6tables)) $(eval $(call BuildPlugin,ip6tables-extra,$(IPT_IPV6_EXTRA-m))) $(eval $(call BuildPlugin,ip6tables-mod-nat,$(IPT_NAT6-m))) diff --git a/package/network/utils/iptables/patches/020-iptables-disable-modprobe.patch b/package/network/utils/iptables/patches/020-iptables-disable-modprobe.patch index 4add4ea5f..2b6c57ec9 100644 --- a/package/network/utils/iptables/patches/020-iptables-disable-modprobe.patch +++ b/package/network/utils/iptables/patches/020-iptables-disable-modprobe.patch @@ -1,6 +1,6 @@ --- a/libxtables/xtables.c +++ b/libxtables/xtables.c -@@ -355,6 +355,7 @@ static char *get_modprobe(void) +@@ -336,6 +336,7 @@ static char *get_modprobe(void) int xtables_insmod(const char *modname, const char *modprobe, bool quiet) { @@ -8,7 +8,7 @@ char *buf = NULL; char *argv[4]; int status; -@@ -395,6 +396,7 @@ int xtables_insmod(const char *modname, +@@ -380,6 +381,7 @@ int xtables_insmod(const char *modname, free(buf); if (WIFEXITED(status) && WEXITSTATUS(status) == 0) return 0; diff --git a/package/network/utils/iptables/patches/030-no-libnfnetlink.patch b/package/network/utils/iptables/patches/030-no-libnfnetlink.patch new file mode 100644 index 000000000..50542ac0b --- /dev/null +++ b/package/network/utils/iptables/patches/030-no-libnfnetlink.patch @@ -0,0 +1,94 @@ +--- a/configure ++++ b/configure +@@ -12367,77 +12367,7 @@ fi + fi + + +-pkg_failed=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnfnetlink" >&5 +-$as_echo_n "checking for libnfnetlink... " >&6; } +- +-if test -n "$libnfnetlink_CFLAGS"; then +- pkg_cv_libnfnetlink_CFLAGS="$libnfnetlink_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnfnetlink >= 1.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libnfnetlink >= 1.0") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_libnfnetlink_CFLAGS=`$PKG_CONFIG --cflags "libnfnetlink >= 1.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +-if test -n "$libnfnetlink_LIBS"; then +- pkg_cv_libnfnetlink_LIBS="$libnfnetlink_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnfnetlink >= 1.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libnfnetlink >= 1.0") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_libnfnetlink_LIBS=`$PKG_CONFIG --libs "libnfnetlink >= 1.0" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +- +- +- +-if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes +-else +- _pkg_short_errors_supported=no +-fi +- if test $_pkg_short_errors_supported = yes; then +- libnfnetlink_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnfnetlink >= 1.0" 2>&1` +- else +- libnfnetlink_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnfnetlink >= 1.0" 2>&1` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$libnfnetlink_PKG_ERRORS" >&5 +- +- nfnetlink=0 +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- nfnetlink=0 +-else +- libnfnetlink_CFLAGS=$pkg_cv_libnfnetlink_CFLAGS +- libnfnetlink_LIBS=$pkg_cv_libnfnetlink_LIBS +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- nfnetlink=1 +-fi +- if test "$nfnetlink" = 1; then ++if false; then + HAVE_LIBNFNETLINK_TRUE= + HAVE_LIBNFNETLINK_FALSE='#' + else +--- a/configure.ac ++++ b/configure.ac +@@ -111,9 +111,7 @@ if test "x$enable_bpfc" = "xyes" || test + AC_CHECK_LIB(pcap, pcap_compile,, AC_MSG_ERROR(missing libpcap library required by bpf compiler or nfsynproxy tool)) + fi + +-PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0], +- [nfnetlink=1], [nfnetlink=0]) +-AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1]) ++AM_CONDITIONAL([HAVE_LIBNFNETLINK], [false]) + + regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ + -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ diff --git a/package/network/utils/iptables/patches/050-optional-xml.patch b/package/network/utils/iptables/patches/050-optional-xml.patch index b782bbf13..11311ddb4 100644 --- a/package/network/utils/iptables/patches/050-optional-xml.patch +++ b/package/network/utils/iptables/patches/050-optional-xml.patch @@ -1,6 +1,6 @@ --- a/iptables/xtables-multi.c +++ b/iptables/xtables-multi.c -@@ -26,8 +26,10 @@ static const struct subcommand multi_sub +@@ -22,8 +22,10 @@ static const struct subcommand multi_sub {"iptables-restore", iptables_restore_main}, {"restore4", iptables_restore_main}, #endif diff --git a/package/network/utils/iptables/patches/100-bash-location.patch b/package/network/utils/iptables/patches/100-bash-location.patch new file mode 100644 index 000000000..02ee45ba1 --- /dev/null +++ b/package/network/utils/iptables/patches/100-bash-location.patch @@ -0,0 +1,8 @@ +--- a/iptables/iptables-apply ++++ b/iptables/iptables-apply +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + # + # iptables-apply -- a safer way to update iptables remotely + # diff --git a/package/network/utils/iptables/patches/200-configurable_builtin.patch b/package/network/utils/iptables/patches/200-configurable_builtin.patch index 9c53c2bfe..d35bc5a85 100644 --- a/package/network/utils/iptables/patches/200-configurable_builtin.patch +++ b/package/network/utils/iptables/patches/200-configurable_builtin.patch @@ -1,75 +1,58 @@ --- a/extensions/GNUmakefile.in +++ b/extensions/GNUmakefile.in -@@ -50,11 +50,31 @@ pfb_build_mod := $(filter-out @blacklist - pfa_build_mod := $(filter-out @blacklist_modules@ @blacklist_a_modules@,${pfa_build_mod}) - pf4_build_mod := $(filter-out @blacklist_modules@ @blacklist_4_modules@,${pf4_build_mod}) - pf6_build_mod := $(filter-out @blacklist_modules@ @blacklist_6_modules@,${pf6_build_mod}) +@@ -45,9 +45,24 @@ pfx_symlinks := NOTRACK state + pfx_build_mod := $(filter-out @blacklist_modules@,${pfx_build_mod}) + pf4_build_mod := $(filter-out @blacklist_modules@,${pf4_build_mod}) + pf6_build_mod := $(filter-out @blacklist_modules@,${pf6_build_mod}) -pfx_objs := $(patsubst %,libxt_%.o,${pfx_build_mod}) --pfb_objs := $(patsubst %,libebt_%.o,${pfb_build_mod}) --pfa_objs := $(patsubst %,libarpt_%.o,${pfa_build_mod}) -pf4_objs := $(patsubst %,libipt_%.o,${pf4_build_mod}) -pf6_objs := $(patsubst %,libip6t_%.o,${pf6_build_mod}) ++ +ifdef BUILTIN_MODULES +pfx_build_static := $(filter $(BUILTIN_MODULES),${pfx_build_mod}) -+pfb_build_static := $(filter $(BUILTIN_MODULES),${pfb_build_mod}) -+pfa_build_static := $(filter $(BUILTIN_MODULES),${pfa_build_mod}) +pf4_build_static := $(filter $(BUILTIN_MODULES),${pf4_build_mod}) +pf6_build_static := $(filter $(BUILTIN_MODULES),${pf6_build_mod}) +else +@ENABLE_STATIC_TRUE@ pfx_build_static := $(pfx_build_mod) -+@ENABLE_STATIC_TRUE@ pfb_build_static := $(pfb_build_mod) -+@ENABLE_STATIC_TRUE@ pfa_build_static := $(pfa_build_mod) +@ENABLE_STATIC_TRUE@ pf4_build_static := $(pf4_build_mod) +@ENABLE_STATIC_TRUE@ pf6_build_static := $(pf6_build_mod) +endif + +pfx_build_mod := $(filter-out $(pfx_build_static),$(pfx_build_mod)) -+pfb_build_mod := $(filter-out $(pfb_build_static),$(pfb_build_mod)) -+pfa_build_mod := $(filter-out $(pfa_build_static),$(pfa_build_mod)) +pf4_build_mod := $(filter-out $(pf4_build_static),$(pf4_build_mod)) +pf6_build_mod := $(filter-out $(pf6_build_static),$(pf6_build_mod)) + +pfx_objs := $(patsubst %,libxt_%.o,${pfx_build_static}) -+pfb_objs := $(patsubst %,libebt_%.o,${pfb_build_static}) -+pfa_objs := $(patsubst %,libarpt_%.o,${pfa_build_static}) +pf4_objs := $(patsubst %,libipt_%.o,${pf4_build_static}) +pf6_objs := $(patsubst %,libip6t_%.o,${pf6_build_static}) pfx_solibs := $(patsubst %,libxt_%.so,${pfx_build_mod} ${pfx_symlinks}) - pfb_solibs := $(patsubst %,libebt_%.so,${pfb_build_mod}) - pfa_solibs := $(patsubst %,libarpt_%.so,${pfa_build_mod}) -@@ -67,13 +87,13 @@ pf6_solibs := $(patsubst %,libip6t_%. + pf4_solibs := $(patsubst %,libipt_%.so,${pf4_build_mod}) + pf6_solibs := $(patsubst %,libip6t_%.so,${pf6_build_mod}) +@@ -58,11 +73,11 @@ pf6_solibs := $(patsubst %,libip6t_%. # - targets := libext.a libext4.a libext6.a libext_ebt.a libext_arpt.a matches.man targets.man + targets := libext.a libext4.a libext6.a matches.man targets.man targets_install := -@ENABLE_STATIC_TRUE@ libext_objs := ${pfx_objs} --@ENABLE_STATIC_TRUE@ libext_ebt_objs := ${pfb_objs} --@ENABLE_STATIC_TRUE@ libext_arpt_objs := ${pfa_objs} -@ENABLE_STATIC_TRUE@ libext4_objs := ${pf4_objs} -@ENABLE_STATIC_TRUE@ libext6_objs := ${pf6_objs} --@ENABLE_STATIC_FALSE@ targets += ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs} --@ENABLE_STATIC_FALSE@ targets_install += ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs} +-@ENABLE_STATIC_FALSE@ targets += ${pfx_solibs} ${pf4_solibs} ${pf6_solibs} +-@ENABLE_STATIC_FALSE@ targets_install += ${pfx_solibs} ${pf4_solibs} ${pf6_solibs} +libext_objs := ${pfx_objs} -+libext_ebt_objs := ${pfb_objs} -+libext_arpt_objs := ${pfa_objs} +libext4_objs := ${pf4_objs} +libext6_objs := ${pf6_objs} -+targets += ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs} -+targets_install := $(strip ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs}) ++targets += ${pfx_solibs} ${pf4_solibs} ${pf6_solibs} ++targets_install := $(strip ${targets_install} ${pfx_solibs} ${pf4_solibs} ${pf6_solibs}) .SECONDARY: -@@ -141,11 +161,11 @@ libext4.a: initext4.o ${libext4_objs} +@@ -126,9 +141,9 @@ libext4.a: initext4.o ${libext4_objs} libext6.a: initext6.o ${libext6_objs} ${AM_VERBOSE_AR} ${AR} crs $@ $^; -initext_func := $(addprefix xt_,${pfx_build_mod}) --initextb_func := $(addprefix ebt_,${pfb_build_mod}) --initexta_func := $(addprefix arpt_,${pfa_build_mod}) -initext4_func := $(addprefix ipt_,${pf4_build_mod}) -initext6_func := $(addprefix ip6t_,${pf6_build_mod}) +initext_func := $(addprefix xt_,${pfx_build_static}) -+initextb_func := $(addprefix ebt_,${pfb_build_static}) -+initexta_func := $(addprefix arpt_,${pfa_build_static}) +initext4_func := $(addprefix ipt_,${pf4_build_static}) +initext6_func := $(addprefix ip6t_,${pf6_build_static}) diff --git a/package/network/utils/iptables/patches/300-musl_fixes.patch b/package/network/utils/iptables/patches/300-musl_fixes.patch new file mode 100644 index 000000000..a78eda775 --- /dev/null +++ b/package/network/utils/iptables/patches/300-musl_fixes.patch @@ -0,0 +1,127 @@ +--- a/extensions/libip6t_ipv6header.c ++++ b/extensions/libip6t_ipv6header.c +@@ -10,6 +10,9 @@ on whether they contain certain headers + #include + #include + #include ++#ifndef IPPROTO_HOPOPTS ++# define IPPROTO_HOPOPTS 0 ++#endif + + enum { + O_HEADER = 0, +--- a/extensions/libxt_TCPOPTSTRIP.c ++++ b/extensions/libxt_TCPOPTSTRIP.c +@@ -12,6 +12,21 @@ + #ifndef TCPOPT_MD5SIG + # define TCPOPT_MD5SIG 19 + #endif ++#ifndef TCPOPT_MAXSEG ++# define TCPOPT_MAXSEG 2 ++#endif ++#ifndef TCPOPT_WINDOW ++# define TCPOPT_WINDOW 3 ++#endif ++#ifndef TCPOPT_SACK_PERMITTED ++# define TCPOPT_SACK_PERMITTED 4 ++#endif ++#ifndef TCPOPT_SACK ++# define TCPOPT_SACK 5 ++#endif ++#ifndef TCPOPT_TIMESTAMP ++# define TCPOPT_TIMESTAMP 8 ++#endif + + enum { + O_STRIP_OPTION = 0, +--- a/include/libiptc/ipt_kernel_headers.h ++++ b/include/libiptc/ipt_kernel_headers.h +@@ -5,7 +5,6 @@ + + #include + +-#if defined(__GLIBC__) && __GLIBC__ == 2 + #include + #include + #include +@@ -13,15 +12,4 @@ + #include + #include + #include +-#else /* libc5 */ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#endif + #endif +--- a/include/linux/netfilter_ipv4/ip_tables.h ++++ b/include/linux/netfilter_ipv4/ip_tables.h +@@ -16,6 +16,7 @@ + #define _IPTABLES_H + + #include ++#include + + #include + +--- a/iptables/ip6tables-restore.c ++++ b/iptables/ip6tables-restore.c +@@ -9,7 +9,7 @@ + */ + + #include +-#include ++#include + #include + #include + #include +--- a/iptables/ip6tables-save.c ++++ b/iptables/ip6tables-save.c +@@ -6,7 +6,7 @@ + * This code is distributed under the terms of GNU GPL v2 + */ + #include +-#include ++#include + #include + #include + #include +--- a/iptables/iptables-restore.c ++++ b/iptables/iptables-restore.c +@@ -6,7 +6,7 @@ + */ + + #include +-#include ++#include + #include + #include + #include +--- a/iptables/iptables-save.c ++++ b/iptables/iptables-save.c +@@ -6,7 +6,7 @@ + * + */ + #include +-#include ++#include + #include + #include + #include +--- a/iptables/iptables-xml.c ++++ b/iptables/iptables-xml.c +@@ -7,7 +7,7 @@ + */ + + #include +-#include ++#include + #include + #include + #include diff --git a/package/network/utils/iptables/patches/600-shared-libext.patch b/package/network/utils/iptables/patches/600-shared-libext.patch index a906d4060..92f548539 100644 --- a/package/network/utils/iptables/patches/600-shared-libext.patch +++ b/package/network/utils/iptables/patches/600-shared-libext.patch @@ -1,15 +1,17 @@ ---- a/extensions/GNUmakefile.in -+++ b/extensions/GNUmakefile.in -@@ -85,7 +85,7 @@ pf6_solibs := $(patsubst %,libip6t_%. +Index: iptables-1.4.21/extensions/GNUmakefile.in +=================================================================== +--- iptables-1.4.21.orig/extensions/GNUmakefile.in ++++ iptables-1.4.21/extensions/GNUmakefile.in +@@ -71,7 +71,7 @@ pf6_solibs := $(patsubst %,libip6t_%. # # Building blocks # --targets := libext.a libext4.a libext6.a libext_ebt.a libext_arpt.a matches.man targets.man -+targets := libiptext.so libiptext4.so libiptext6.so libiptext_ebt.so libiptext_arpt.so matches.man targets.man +-targets := libext.a libext4.a libext6.a matches.man targets.man ++targets := libiptext.so libiptext4.so libiptext6.so matches.man targets.man targets_install := libext_objs := ${pfx_objs} - libext_ebt_objs := ${pfb_objs} -@@ -112,7 +112,7 @@ clean: + libext4_objs := ${pf4_objs} +@@ -96,7 +96,7 @@ clean: distclean: clean init%.o: init%.c @@ -18,7 +20,7 @@ -include .*.d -@@ -144,22 +144,22 @@ xt_connlabel_LIBADD = @libnetfilter_conn +@@ -130,16 +130,16 @@ xt_statistic_LIBADD = -lm # handling code in the Makefiles. # lib%.o: ${srcdir}/lib%.c @@ -30,16 +32,6 @@ +libiptext.so: initext.o ${libext_objs} + ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; --libext_ebt.a: initextb.o ${libext_ebt_objs} -- ${AM_VERBOSE_AR} ${AR} crs $@ $^; -+libiptext_ebt.so: initextb.o ${libext_ebt_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; - --libext_arpt.a: initexta.o ${libext_arpt_objs} -- ${AM_VERBOSE_AR} ${AR} crs $@ $^; -+libiptext_arpt.so: initexta.o ${libext_arpt_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; - -libext4.a: initext4.o ${libext4_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext4.so: initext4.o ${libext4_objs} @@ -51,10 +43,12 @@ + ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; initext_func := $(addprefix xt_,${pfx_build_static}) - initextb_func := $(addprefix ebt_,${pfb_build_static}) ---- a/iptables/Makefile.am -+++ b/iptables/Makefile.am -@@ -8,7 +8,8 @@ BUILT_SOURCES = + initext4_func := $(addprefix ipt_,${pf4_build_static}) +Index: iptables-1.4.21/iptables/Makefile.am +=================================================================== +--- iptables-1.4.21.orig/iptables/Makefile.am ++++ iptables-1.4.21/iptables/Makefile.am +@@ -5,7 +5,8 @@ AM_CPPFLAGS = ${regular_CPPFLAGS} - xtables_multi_SOURCES = xtables-multi.c iptables-xml.c xtables_multi_CFLAGS = ${AM_CFLAGS} @@ -64,7 +58,7 @@ if ENABLE_STATIC xtables_multi_CFLAGS += -DALL_INCLUSIVE endif -@@ -16,13 +17,15 @@ if ENABLE_IPV4 +@@ -13,13 +14,15 @@ if ENABLE_IPV4 xtables_multi_SOURCES += iptables-save.c iptables-restore.c \ iptables-standalone.c iptables.c xtables_multi_CFLAGS += -DENABLE_IPV4 @@ -82,23 +76,3 @@ endif xtables_multi_SOURCES += xshared.c xtables_multi_LDADD += ../libxtables/libxtables.la -lm -@@ -32,7 +35,8 @@ if ENABLE_NFTABLES - BUILT_SOURCES += xtables-config-parser.h - xtables_compat_multi_SOURCES = xtables-compat-multi.c iptables-xml.c - xtables_compat_multi_CFLAGS = ${AM_CFLAGS} --xtables_compat_multi_LDADD = ../extensions/libext.a ../extensions/libext_ebt.a -+xtables_compat_multi_LDADD = -+xtables_compat_multi_LDFLAGS = -L../extensions/ -liptext -liptext_ebt - if ENABLE_STATIC - xtables_compat_multi_CFLAGS += -DALL_INCLUSIVE - endif -@@ -45,7 +49,8 @@ xtables_compat_multi_SOURCES += xtables- - getethertype.c nft-bridge.c \ - xtables-eb-standalone.c xtables-eb.c \ - xtables-translate.c --xtables_compat_multi_LDADD += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS} ../extensions/libext4.a ../extensions/libext6.a ../extensions/libext_ebt.a ../extensions/libext_arpt.a -+xtables_compat_multi_LDADD += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS} -+xtables_compat_multi_LDFLAGS += -liptext4 -liptext6 -liptext_arpt - # yacc and lex generate dirty code - xtables_compat_multi-xtables-config-parser.o xtables_compat_multi-xtables-config-syntax.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-nested-externs -Wno-undef -Wno-redundant-decls - xtables_compat_multi_SOURCES += xshared.c diff --git a/package/network/utils/iptables/patches/700-disable-legacy-revisions.patch b/package/network/utils/iptables/patches/700-disable-legacy-revisions.patch index 6800ca5ec..342c3b013 100644 --- a/package/network/utils/iptables/patches/700-disable-legacy-revisions.patch +++ b/package/network/utils/iptables/patches/700-disable-legacy-revisions.patch @@ -1,6 +1,8 @@ ---- a/extensions/libxt_conntrack.c -+++ b/extensions/libxt_conntrack.c -@@ -1397,6 +1397,7 @@ static int conntrack3_mt6_xlate(struct x +Index: iptables-1.4.21/extensions/libxt_conntrack.c +=================================================================== +--- iptables-1.4.21.orig/extensions/libxt_conntrack.c ++++ iptables-1.4.21/extensions/libxt_conntrack.c +@@ -1157,6 +1157,7 @@ static void state_save(const void *ip, c } static struct xtables_match conntrack_mt_reg[] = { @@ -8,7 +10,7 @@ { .version = XTABLES_VERSION, .name = "conntrack", -@@ -1472,6 +1473,7 @@ static struct xtables_match conntrack_mt +@@ -1232,6 +1233,7 @@ static struct xtables_match conntrack_mt .alias = conntrack_print_name_alias, .x6_options = conntrack2_mt_opts, }, @@ -16,24 +18,31 @@ { .version = XTABLES_VERSION, .name = "conntrack", -@@ -1504,6 +1506,7 @@ static struct xtables_match conntrack_mt +@@ -1262,6 +1264,7 @@ static struct xtables_match conntrack_mt + .alias = conntrack_print_name_alias, .x6_options = conntrack3_mt_opts, - .xlate = conntrack3_mt6_xlate, }, +#ifndef NO_LEGACY { .family = NFPROTO_UNSPEC, .name = "state", -@@ -1534,6 +1537,8 @@ static struct xtables_match conntrack_mt +@@ -1292,6 +1295,7 @@ static struct xtables_match conntrack_mt .x6_parse = state_ct23_parse, .x6_options = state_opts, }, +#endif + { + .family = NFPROTO_UNSPEC, + .name = "state", +@@ -1307,6 +1311,7 @@ static struct xtables_match conntrack_mt + .x6_parse = state_ct23_parse, + .x6_options = state_opts, + }, +#ifndef NO_LEGACY { .family = NFPROTO_UNSPEC, .name = "state", -@@ -1563,6 +1568,7 @@ static struct xtables_match conntrack_mt +@@ -1320,6 +1325,7 @@ static struct xtables_match conntrack_mt .x6_parse = state_parse, .x6_options = state_opts, }, @@ -41,9 +50,11 @@ }; void _init(void) ---- a/extensions/libxt_CT.c -+++ b/extensions/libxt_CT.c -@@ -349,6 +349,7 @@ static void notrack_ct2_tg_init(struct x +Index: iptables-1.4.21/extensions/libxt_CT.c +=================================================================== +--- iptables-1.4.21.orig/extensions/libxt_CT.c ++++ iptables-1.4.21/extensions/libxt_CT.c +@@ -290,6 +290,7 @@ static void notrack_ct2_tg_init(struct x } static struct xtables_target ct_target_reg[] = { @@ -51,7 +62,7 @@ { .family = NFPROTO_UNSPEC, .name = "CT", -@@ -374,6 +375,7 @@ static struct xtables_target ct_target_r +@@ -315,6 +316,7 @@ static struct xtables_target ct_target_r .x6_parse = ct_parse_v1, .x6_options = ct_opts_v1, }, @@ -59,7 +70,7 @@ { .family = NFPROTO_UNSPEC, .name = "CT", -@@ -388,6 +390,7 @@ static struct xtables_target ct_target_r +@@ -329,6 +331,7 @@ static struct xtables_target ct_target_r .x6_parse = ct_parse_v1, .x6_options = ct_opts_v1, }, @@ -67,7 +78,7 @@ { .family = NFPROTO_UNSPEC, .name = "NOTRACK", -@@ -425,6 +428,7 @@ static struct xtables_target ct_target_r +@@ -366,6 +369,7 @@ static struct xtables_target ct_target_r .revision = 0, .version = XTABLES_VERSION, }, @@ -75,9 +86,11 @@ }; void _init(void) ---- a/extensions/libxt_multiport.c -+++ b/extensions/libxt_multiport.c -@@ -571,6 +571,7 @@ static int multiport_xlate6_v1(struct xt +Index: iptables-1.4.21/extensions/libxt_multiport.c +=================================================================== +--- iptables-1.4.21.orig/extensions/libxt_multiport.c ++++ iptables-1.4.21/extensions/libxt_multiport.c +@@ -469,6 +469,7 @@ static void multiport_save6_v1(const voi } static struct xtables_match multiport_mt_reg[] = { @@ -85,9 +98,9 @@ { .family = NFPROTO_IPV4, .name = "multiport", -@@ -601,6 +602,7 @@ static struct xtables_match multiport_mt +@@ -497,6 +498,7 @@ static struct xtables_match multiport_mt + .save = multiport_save6, .x6_options = multiport_opts, - .xlate = multiport_xlate6, }, +#endif { diff --git a/package/network/utils/iputils/Makefile b/package/network/utils/iputils/Makefile index 344af07af..b6799e68b 100644 --- a/package/network/utils/iputils/Makefile +++ b/package/network/utils/iputils/Makefile @@ -17,7 +17,6 @@ PKG_HASH:=fd3af46c80ebb99607c2ca1f2a3608b6fe828e25bbec6e54f2afd25f6ddb6ee7 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0+ -PKG_CPE_ID:=cpe:/a:skbuff:iputils PKG_BUILD_DEPENDS:=sysfsutils PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-s$(PKG_VERSION) diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index 9b3c12bec..a578ddc98 100644 --- a/package/network/utils/iw/Makefile +++ b/package/network/utils/iw/Makefile @@ -30,7 +30,8 @@ endef define Build/Configure echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c - echo "#!/bin/sh" > $(PKG_BUILD_DIR)/version.sh + rm -f $(PKG_BUILD_DIR)/version.sh + touch $(PKG_BUILD_DIR)/version.sh chmod +x $(PKG_BUILD_DIR)/version.sh endef diff --git a/package/network/utils/iw/patches/001-nl80211_h_sync.patch b/package/network/utils/iw/patches/001-nl80211_h_sync.patch index 25ec1263a..88e47cce8 100644 --- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch +++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch @@ -1,81 +1,6 @@ --- a/nl80211.h +++ b/nl80211.h -@@ -10,7 +10,7 @@ - * Copyright 2008, 2009 Luis R. Rodriguez - * Copyright 2008 Jouni Malinen - * Copyright 2008 Colin McCabe -- * Copyright 2015 Intel Deutschland GmbH -+ * Copyright 2015-2017 Intel Deutschland GmbH - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above -@@ -173,6 +173,65 @@ - */ - - /** -+ * DOC: WPA/WPA2 EAPOL handshake offload -+ * -+ * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag drivers -+ * can indicate they support offloading EAPOL handshakes for WPA/WPA2 -+ * preshared key authentication. In %NL80211_CMD_CONNECT the preshared -+ * key should be specified using %NL80211_ATTR_PMK. Drivers supporting -+ * this offload may reject the %NL80211_CMD_CONNECT when no preshared -+ * key material is provided, for example when that driver does not -+ * support setting the temporal keys through %CMD_NEW_KEY. -+ * -+ * Similarly @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X flag can be -+ * set by drivers indicating offload support of the PTK/GTK EAPOL -+ * handshakes during 802.1X authentication. In order to use the offload -+ * the %NL80211_CMD_CONNECT should have %NL80211_ATTR_WANT_1X_4WAY_HS -+ * attribute flag. Drivers supporting this offload may reject the -+ * %NL80211_CMD_CONNECT when the attribute flag is not present. -+ * -+ * For 802.1X the PMK or PMK-R0 are set by providing %NL80211_ATTR_PMK -+ * using %NL80211_CMD_SET_PMK. For offloaded FT support also -+ * %NL80211_ATTR_PMKR0_NAME must be provided. -+ */ -+ -+/** -+ * DOC: FILS shared key authentication offload -+ * -+ * FILS shared key authentication offload can be advertized by drivers by -+ * setting @NL80211_EXT_FEATURE_FILS_SK_OFFLOAD flag. The drivers that support -+ * FILS shared key authentication offload should be able to construct the -+ * authentication and association frames for FILS shared key authentication and -+ * eventually do a key derivation as per IEEE 802.11ai. The below additional -+ * parameters should be given to driver in %NL80211_CMD_CONNECT. -+ * %NL80211_ATTR_FILS_ERP_USERNAME - used to construct keyname_nai -+ * %NL80211_ATTR_FILS_ERP_REALM - used to construct keyname_nai -+ * %NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM - used to construct erp message -+ * %NL80211_ATTR_FILS_ERP_RRK - used to generate the rIK and rMSK -+ * rIK should be used to generate an authentication tag on the ERP message and -+ * rMSK should be used to derive a PMKSA. -+ * rIK, rMSK should be generated and keyname_nai, sequence number should be used -+ * as specified in IETF RFC 6696. -+ * -+ * When FILS shared key authentication is completed, driver needs to provide the -+ * below additional parameters to userspace. -+ * %NL80211_ATTR_FILS_KEK - used for key renewal -+ * %NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM - used in further EAP-RP exchanges -+ * %NL80211_ATTR_PMKID - used to identify the PMKSA used/generated -+ * %Nl80211_ATTR_PMK - used to update PMKSA cache in userspace -+ * The PMKSA can be maintained in userspace persistently so that it can be used -+ * later after reboots or wifi turn off/on also. -+ * -+ * %NL80211_ATTR_FILS_CACHE_ID is the cache identifier advertized by a FILS -+ * capable AP supporting PMK caching. It specifies the scope within which the -+ * PMKSAs are cached in an ESS. %NL80211_CMD_SET_PMKSA and -+ * %NL80211_CMD_DEL_PMKSA are enhanced to allow support for PMKSA caching based -+ * on FILS cache identifier. Additionally %NL80211_ATTR_PMK is used with -+ * %NL80211_SET_PMKSA to specify the PMK corresponding to a PMKSA for driver to -+ * use in a FILS shared key connection with PMKSA caching. -+ */ -+ -+/** - * enum nl80211_commands - supported nl80211 commands - * - * @NL80211_CMD_UNSPEC: unspecified command to catch errors -@@ -323,7 +382,7 @@ +@@ -323,7 +323,7 @@ * @NL80211_CMD_GET_SCAN: get scan results * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the @@ -84,56 +9,7 @@ * specify a BSSID to scan for; if not included, the wildcard BSSID will * be used. * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to -@@ -351,7 +410,9 @@ - * are used. Extra IEs can also be passed from the userspace by - * using the %NL80211_ATTR_IE attribute. The first cycle of the - * scheduled scan can be delayed by %NL80211_ATTR_SCHED_SCAN_DELAY -- * is supplied. -+ * is supplied. If the device supports multiple concurrent scheduled -+ * scans, it will allow such when the caller provides the flag attribute -+ * %NL80211_ATTR_SCHED_SCAN_MULTI to indicate user-space support for it. - * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan. Returns -ENOENT if - * scheduled scan is not running. The caller may assume that as soon - * as the call returns, it is safe to start a new scheduled scan again. -@@ -370,10 +431,18 @@ - * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to - * NL80211_CMD_GET_SURVEY and on the "scan" multicast group) - * -- * @NL80211_CMD_SET_PMKSA: Add a PMKSA cache entry, using %NL80211_ATTR_MAC -- * (for the BSSID) and %NL80211_ATTR_PMKID. -+ * @NL80211_CMD_SET_PMKSA: Add a PMKSA cache entry using %NL80211_ATTR_MAC -+ * (for the BSSID), %NL80211_ATTR_PMKID, and optionally %NL80211_ATTR_PMK -+ * (PMK is used for PTKSA derivation in case of FILS shared key offload) or -+ * using %NL80211_ATTR_SSID, %NL80211_ATTR_FILS_CACHE_ID, -+ * %NL80211_ATTR_PMKID, and %NL80211_ATTR_PMK in case of FILS -+ * authentication where %NL80211_ATTR_FILS_CACHE_ID is the identifier -+ * advertized by a FILS capable AP identifying the scope of PMKSA in an -+ * ESS. - * @NL80211_CMD_DEL_PMKSA: Delete a PMKSA cache entry, using %NL80211_ATTR_MAC -- * (for the BSSID) and %NL80211_ATTR_PMKID. -+ * (for the BSSID) and %NL80211_ATTR_PMKID or using %NL80211_ATTR_SSID, -+ * %NL80211_ATTR_FILS_CACHE_ID, and %NL80211_ATTR_PMKID in case of FILS -+ * authentication. - * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries. - * - * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain -@@ -500,8 +569,13 @@ - * authentication/association or not receiving a response from the AP. - * Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as - * well to remain backwards compatible. -- * @NL80211_CMD_ROAM: request that the card roam (currently not implemented), -- * sent as an event when the card/driver roamed by itself. -+ * @NL80211_CMD_ROAM: notifcation indicating the card/driver roamed by itself. -+ * When the driver roamed in a network that requires 802.1X authentication, -+ * %NL80211_ATTR_PORT_AUTHORIZED should be set if the 802.1X authentication -+ * was done by the driver or if roaming was done using Fast Transition -+ * protocol (in which case 802.1X authentication is not needed). If -+ * %NL80211_ATTR_PORT_AUTHORIZED is not set, user space is responsible for -+ * the 802.1X authentication. - * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify - * userspace that a connection was dropped by the AP or due to other - * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and -@@ -600,6 +674,20 @@ +@@ -600,6 +600,20 @@ * * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface. * @@ -154,45 +30,7 @@ * @NL80211_CMD_JOIN_MESH: Join a mesh. The mesh ID must be given, and initial * mesh config parameters may be given. * @NL80211_CMD_LEAVE_MESH: Leave the mesh network -- no special arguments, the -@@ -840,12 +928,15 @@ - * cfg80211_scan_done(). - * - * @NL80211_CMD_START_NAN: Start NAN operation, identified by its -- * %NL80211_ATTR_WDEV interface. This interface must have been previously -- * created with %NL80211_CMD_NEW_INTERFACE. After it has been started, the -- * NAN interface will create or join a cluster. This command must have a -- * valid %NL80211_ATTR_NAN_MASTER_PREF attribute and optional -- * %NL80211_ATTR_NAN_DUAL attributes. -- * After this command NAN functions can be added. -+ * %NL80211_ATTR_WDEV interface. This interface must have been -+ * previously created with %NL80211_CMD_NEW_INTERFACE. After it -+ * has been started, the NAN interface will create or join a -+ * cluster. This command must have a valid -+ * %NL80211_ATTR_NAN_MASTER_PREF attribute and optional -+ * %NL80211_ATTR_BANDS attributes. If %NL80211_ATTR_BANDS is -+ * omitted or set to 0, it means don't-care and the device will -+ * decide what to use. After this command NAN functions can be -+ * added. - * @NL80211_CMD_STOP_NAN: Stop the NAN operation, identified by - * its %NL80211_ATTR_WDEV interface. - * @NL80211_CMD_ADD_NAN_FUNCTION: Add a NAN function. The function is defined -@@ -866,14 +957,32 @@ - * This command is also used as a notification sent when a NAN function is - * terminated. This will contain a %NL80211_ATTR_NAN_FUNC_INST_ID - * and %NL80211_ATTR_COOKIE attributes. -- * @NL80211_CMD_CHANGE_NAN_CONFIG: Change current NAN configuration. NAN -- * must be operational (%NL80211_CMD_START_NAN was executed). -- * It must contain at least one of the following attributes: -- * %NL80211_ATTR_NAN_MASTER_PREF, %NL80211_ATTR_NAN_DUAL. -+ * @NL80211_CMD_CHANGE_NAN_CONFIG: Change current NAN -+ * configuration. NAN must be operational (%NL80211_CMD_START_NAN -+ * was executed). It must contain at least one of the following -+ * attributes: %NL80211_ATTR_NAN_MASTER_PREF, -+ * %NL80211_ATTR_BANDS. If %NL80211_ATTR_BANDS is omitted, the -+ * current configuration is not changed. If it is present but -+ * set to zero, the configuration is changed to don't-care -+ * (i.e. the device can decide what to do). - * @NL80211_CMD_NAN_FUNC_MATCH: Notification sent when a match is reported. +@@ -874,6 +888,12 @@ * This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and * %NL80211_ATTR_COOKIE. * @@ -201,33 +39,22 @@ + * BSS selection. This command can be issued only while connected and it + * does not result in a change for the current association. Currently, + * only the %NL80211_ATTR_IE data is used and updated with this command. -+ * -+ * @NL80211_CMD_SET_PMK: For offloaded 4-Way handshake, set the PMK or PMK-R0 -+ * for the given authenticator address (specified with &NL80211_ATTR_MAC). -+ * When &NL80211_ATTR_PMKR0_NAME is set, &NL80211_ATTR_PMK specifies the -+ * PMK-R0, otherwise it specifies the PMK. -+ * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously -+ * configured PMK for the authenticator address identified by -+ * &NL80211_ATTR_MAC. + * * @NL80211_CMD_MAX: highest used command number * @__NL80211_CMD_AFTER_LAST: internal use */ -@@ -1069,6 +1178,13 @@ enum nl80211_commands { +@@ -1069,6 +1089,10 @@ enum nl80211_commands { NL80211_CMD_CHANGE_NAN_CONFIG, NL80211_CMD_NAN_MATCH, + NL80211_CMD_SET_MULTICAST_TO_UNICAST, + + NL80211_CMD_UPDATE_CONNECT_PARAMS, -+ -+ NL80211_CMD_SET_PMK, -+ NL80211_CMD_DEL_PMK, + /* add new commands above here */ /* used to define NL80211_CMD_MAX below */ -@@ -1638,8 +1754,16 @@ enum nl80211_commands { +@@ -1638,8 +1662,16 @@ enum nl80211_commands { * the connection request from a station. nl80211_connect_failed_reason * enum has different reasons of connection failure. * @@ -246,7 +73,7 @@ * * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from * association request when used with NL80211_CMD_NEW_STATION) -@@ -1740,7 +1864,9 @@ enum nl80211_commands { +@@ -1740,7 +1772,9 @@ enum nl80211_commands { * * @NL80211_ATTR_OPMODE_NOTIF: Operating mode field from Operating Mode * Notification Element based on association request when used with @@ -257,41 +84,16 @@ * * @NL80211_ATTR_VENDOR_ID: The vendor ID, either a 24-bit OUI or, if * %NL80211_VENDOR_ID_IS_LINUX is set, a special Linux ID (not used yet) -@@ -1783,11 +1909,12 @@ enum nl80211_commands { - * that configured the indoor setting, and the indoor operation would be - * cleared when the socket is closed. - * If set during NAN interface creation, the interface will be destroyed -- * if the socket is closed just like any other interface. Moreover, only -- * the netlink socket that created the interface will be allowed to add -- * and remove functions. NAN notifications will be sent in unicast to that -- * socket. Without this attribute, any socket can add functions and the -- * notifications will be sent to the %NL80211_MCGRP_NAN multicast group. -+ * if the socket is closed just like any other interface. Moreover, NAN -+ * notifications will be sent in unicast to that socket. Without this -+ * attribute, the notifications will be sent to the %NL80211_MCGRP_NAN -+ * multicast group. +@@ -1788,6 +1822,8 @@ enum nl80211_commands { + * and remove functions. NAN notifications will be sent in unicast to that + * socket. Without this attribute, any socket can add functions and the + * notifications will be sent to the %NL80211_MCGRP_NAN multicast group. + * If set during %NL80211_CMD_ASSOCIATE or %NL80211_CMD_CONNECT the + * station will deauthenticate when the socket is closed. * * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is * the TDLS link initiator. -@@ -1927,15 +2054,93 @@ enum nl80211_commands { - * %NL80211_CMD_CHANGE_NAN_CONFIG. Its type is u8 and it can't be 0. - * Also, values 1 and 255 are reserved for certification purposes and - * should not be used during a normal device operation. -- * @NL80211_ATTR_NAN_DUAL: NAN dual band operation config (see -- * &enum nl80211_nan_dual_band_conf). This attribute is used with -- * %NL80211_CMD_START_NAN and optionally with -- * %NL80211_CMD_CHANGE_NAN_CONFIG. -+ * @NL80211_ATTR_BANDS: operating bands configuration. This is a u32 -+ * bitmask of BIT(NL80211_BAND_*) as described in %enum -+ * nl80211_band. For instance, for NL80211_BAND_2GHZ, bit 0 -+ * would be set. This attribute is used with -+ * %NL80211_CMD_START_NAN and %NL80211_CMD_CHANGE_NAN_CONFIG, and -+ * it is optional. If no bands are set, it means don't-care and -+ * the device will decide what to use. - * @NL80211_ATTR_NAN_FUNC: a function that can be added to NAN. See - * &enum nl80211_nan_func_attributes for description of this nested +@@ -1936,6 +1972,38 @@ enum nl80211_commands { * attribute. * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute. * See &enum nl80211_nan_match_attributes. @@ -325,55 +127,12 @@ + * u32 attribute with an &enum nl80211_timeout_reason value. This is used, + * e.g., with %NL80211_CMD_CONNECT event. + * -+ * @NL80211_ATTR_FILS_ERP_USERNAME: EAP Re-authentication Protocol (ERP) -+ * username part of NAI used to refer keys rRK and rIK. This is used with -+ * %NL80211_CMD_CONNECT. -+ * -+ * @NL80211_ATTR_FILS_ERP_REALM: EAP Re-authentication Protocol (ERP) realm part -+ * of NAI specifying the domain name of the ER server. This is used with -+ * %NL80211_CMD_CONNECT. -+ * -+ * @NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM: Unsigned 16-bit ERP next sequence number -+ * to use in ERP messages. This is used in generating the FILS wrapped data -+ * for FILS authentication and is used with %NL80211_CMD_CONNECT. -+ * -+ * @NL80211_ATTR_FILS_ERP_RRK: ERP re-authentication Root Key (rRK) for the -+ * NAI specified by %NL80211_ATTR_FILS_ERP_USERNAME and -+ * %NL80211_ATTR_FILS_ERP_REALM. This is used for generating rIK and rMSK -+ * from successful FILS authentication and is used with -+ * %NL80211_CMD_CONNECT. -+ * -+ * @NL80211_ATTR_FILS_CACHE_ID: A 2-octet identifier advertized by a FILS AP -+ * identifying the scope of PMKSAs. This is used with -+ * @NL80211_CMD_SET_PMKSA and @NL80211_CMD_DEL_PMKSA. -+ * -+ * @NL80211_ATTR_PMK: attribute for passing PMK key material. Used with -+ * %NL80211_CMD_SET_PMKSA for the PMKSA identified by %NL80211_ATTR_PMKID. -+ * For %NL80211_CMD_CONNECT it is used to provide PSK for offloading 4-way -+ * handshake for WPA/WPA2-PSK networks. For 802.1X authentication it is -+ * used with %NL80211_CMD_SET_PMK. For offloaded FT support this attribute -+ * specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME is included as well. -+ * -+ * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to -+ * indicate that it supports multiple active scheduled scan requests. -+ * @NL80211_ATTR_SCHED_SCAN_MAX_REQS: indicates maximum number of scheduled -+ * scan request that may be active for the device (u32). -+ * -+ * @NL80211_ATTR_WANT_1X_4WAY_HS: flag attribute which user-space can include -+ * in %NL80211_CMD_CONNECT to indicate that for 802.1X authentication it -+ * wants to use the supported offload of the 4-way handshake. -+ * @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT. -+ * @NL80211_ATTR_PORT_AUTHORIZED: flag attribute used in %NL80211_CMD_ROAMED -+ * notification indicating that that 802.1X authentication was done by -+ * the driver or is not needed (because roaming used the Fast Transition -+ * protocol). -+ * + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce + * transmit power to stay within regulatory limits. u32, dBi. * * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined -@@ -2195,7 +2400,7 @@ enum nl80211_attrs { +@@ -2195,7 +2263,7 @@ enum nl80211_attrs { NL80211_ATTR_CONN_FAILED_REASON, @@ -382,12 +141,7 @@ NL80211_ATTR_VHT_CAPABILITY, -@@ -2332,10 +2537,39 @@ enum nl80211_attrs { - NL80211_ATTR_MESH_PEER_AID, - - NL80211_ATTR_NAN_MASTER_PREF, -- NL80211_ATTR_NAN_DUAL, -+ NL80211_ATTR_BANDS, +@@ -2336,6 +2404,20 @@ enum nl80211_attrs { NL80211_ATTR_NAN_FUNC, NL80211_ATTR_NAN_MATCH, @@ -403,27 +157,12 @@ + + NL80211_ATTR_TIMEOUT_REASON, + -+ NL80211_ATTR_FILS_ERP_USERNAME, -+ NL80211_ATTR_FILS_ERP_REALM, -+ NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM, -+ NL80211_ATTR_FILS_ERP_RRK, -+ NL80211_ATTR_FILS_CACHE_ID, -+ -+ NL80211_ATTR_PMK, -+ -+ NL80211_ATTR_SCHED_SCAN_MULTI, -+ NL80211_ATTR_SCHED_SCAN_MAX_REQS, -+ -+ NL80211_ATTR_WANT_1X_4WAY_HS, -+ NL80211_ATTR_PMKR0_NAME, -+ NL80211_ATTR_PORT_AUTHORIZED, -+ + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, -@@ -2347,6 +2581,7 @@ enum nl80211_attrs { +@@ -2347,6 +2429,7 @@ enum nl80211_attrs { #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION #define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG #define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER @@ -431,15 +170,7 @@ /* * Allow user space programs to use #ifdef on new attributes by defining them -@@ -3019,6 +3254,7 @@ enum nl80211_reg_rule_attr { - * @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved - * @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching, - * only report BSS with matching SSID. -+ * (This cannot be used together with BSSID.) - * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI: RSSI threshold (in dBm) for reporting a - * BSS in scan results. Filtering is turned off if not specified. Note that - * if this attribute is in a match set of its own, then it is treated as -@@ -3027,6 +3263,15 @@ enum nl80211_reg_rule_attr { +@@ -3027,6 +3110,13 @@ enum nl80211_reg_rule_attr { * how this API was implemented in the past. Also, due to the same problem, * the only way to create a matchset with only an RSSI filter (with this * attribute) is if there's only a single matchset with the RSSI attribute. @@ -450,22 +181,19 @@ + * BSS-es in the specified band is to be adjusted before doing + * RSSI-based BSS selection. The attribute value is a packed structure + * value as specified by &struct nl80211_bss_select_rssi_adjust. -+ * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching -+ * (this cannot be used together with SSID). * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter * attribute number currently defined * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use -@@ -3036,6 +3281,9 @@ enum nl80211_sched_scan_match_attr { +@@ -3036,6 +3126,8 @@ enum nl80211_sched_scan_match_attr { NL80211_SCHED_SCAN_MATCH_ATTR_SSID, NL80211_SCHED_SCAN_MATCH_ATTR_RSSI, + NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI, + NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST, -+ NL80211_SCHED_SCAN_MATCH_ATTR_BSSID, /* keep last */ __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, -@@ -3660,6 +3908,9 @@ enum nl80211_bss_status { +@@ -3660,6 +3752,9 @@ enum nl80211_bss_status { * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) * @NL80211_AUTHTYPE_SAE: Simultaneous authentication of equals @@ -475,7 +203,7 @@ * @__NL80211_AUTHTYPE_NUM: internal * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by -@@ -3672,6 +3923,9 @@ enum nl80211_auth_type { +@@ -3672,6 +3767,9 @@ enum nl80211_auth_type { NL80211_AUTHTYPE_FT, NL80211_AUTHTYPE_NETWORK_EAP, NL80211_AUTHTYPE_SAE, @@ -485,36 +213,7 @@ /* keep last */ __NL80211_AUTHTYPE_NUM, -@@ -3839,7 +4093,10 @@ enum nl80211_ps_state { - * @__NL80211_ATTR_CQM_INVALID: invalid - * @NL80211_ATTR_CQM_RSSI_THOLD: RSSI threshold in dBm. This value specifies - * the threshold for the RSSI level at which an event will be sent. Zero -- * to disable. -+ * to disable. Alternatively, if %NL80211_EXT_FEATURE_CQM_RSSI_LIST is -+ * set, multiple values can be supplied as a low-to-high sorted array of -+ * threshold values in dBm. Events will be sent when the RSSI value -+ * crosses any of the thresholds. - * @NL80211_ATTR_CQM_RSSI_HYST: RSSI hysteresis in dBm. This value specifies - * the minimum amount the RSSI level must change after an event before a - * new event may be issued (to reduce effects of RSSI oscillation). -@@ -3859,6 +4116,8 @@ enum nl80211_ps_state { - * %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting. - * @NL80211_ATTR_CQM_BEACON_LOSS_EVENT: flag attribute that's set in a beacon - * loss event -+ * @NL80211_ATTR_CQM_RSSI_LEVEL: the RSSI value in dBm that triggered the -+ * RSSI threshold event. - * @__NL80211_ATTR_CQM_AFTER_LAST: internal - * @NL80211_ATTR_CQM_MAX: highest key attribute - */ -@@ -3872,6 +4131,7 @@ enum nl80211_attr_cqm { - NL80211_ATTR_CQM_TXE_PKTS, - NL80211_ATTR_CQM_TXE_INTVL, - NL80211_ATTR_CQM_BEACON_LOSS_EVENT, -+ NL80211_ATTR_CQM_RSSI_LEVEL, - - /* keep last */ - __NL80211_ATTR_CQM_AFTER_LAST, -@@ -4280,6 +4540,9 @@ enum nl80211_iface_limit_attrs { +@@ -4280,6 +4378,9 @@ enum nl80211_iface_limit_attrs { * of supported channel widths for radar detection. * @NL80211_IFACE_COMB_RADAR_DETECT_REGIONS: u32 attribute containing the bitmap * of supported regulatory regions for radar detection. @@ -524,7 +223,7 @@ * @NUM_NL80211_IFACE_COMB: number of attributes * @MAX_NL80211_IFACE_COMB: highest attribute number * -@@ -4287,8 +4550,8 @@ enum nl80211_iface_limit_attrs { +@@ -4287,8 +4388,8 @@ enum nl80211_iface_limit_attrs { * limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2 * => allows an AP and a STA that must match BIs * @@ -535,7 +234,7 @@ * * numbers = [ #{STA} <= 2 ], channels = 2, max = 2 * => allows two STAs on different channels -@@ -4314,6 +4577,7 @@ enum nl80211_if_combination_attrs { +@@ -4314,6 +4415,7 @@ enum nl80211_if_combination_attrs { NL80211_IFACE_COMB_NUM_CHANNELS, NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS, NL80211_IFACE_COMB_RADAR_DETECT_REGIONS, @@ -543,7 +242,7 @@ /* keep last */ NUM_NL80211_IFACE_COMB, -@@ -4634,6 +4898,27 @@ enum nl80211_feature_flags { +@@ -4634,6 +4736,15 @@ enum nl80211_feature_flags { * configuration (AP/mesh) with HT rates. * @NL80211_EXT_FEATURE_BEACON_RATE_VHT: Driver supports beacon rate * configuration (AP/mesh) with VHT rates. @@ -556,22 +255,10 @@ + * @NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI: The driver supports sched_scan + * for reporting BSSs with better RSSI than the current connected BSS + * (%NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI). -+ * @NL80211_EXT_FEATURE_CQM_RSSI_LIST: With this driver the -+ * %NL80211_ATTR_CQM_RSSI_THOLD attribute accepts a list of zero or more -+ * RSSI threshold values to monitor rather than exactly one threshold. -+ * @NL80211_EXT_FEATURE_FILS_SK_OFFLOAD: Driver SME supports FILS shared key -+ * authentication with %NL80211_CMD_CONNECT. -+ * @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK: Device wants to do 4-way -+ * handshake with PSK in station mode (PSK is passed as part of the connect -+ * and associate commands), doing it in the host might not be supported. -+ * @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X: Device wants to do doing 4-way -+ * handshake with 802.1X in station mode (will pass EAP frames to the host -+ * and accept the set_pmk/del_pmk commands), doing it in the host might not -+ * be supported. * * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index. -@@ -4648,6 +4933,14 @@ enum nl80211_ext_feature_index { +@@ -4648,6 +4759,10 @@ enum nl80211_ext_feature_index { NL80211_EXT_FEATURE_BEACON_RATE_LEGACY, NL80211_EXT_FEATURE_BEACON_RATE_HT, NL80211_EXT_FEATURE_BEACON_RATE_VHT, @@ -579,14 +266,10 @@ + NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA, + NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED, + NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI, -+ NL80211_EXT_FEATURE_CQM_RSSI_LIST, -+ NL80211_EXT_FEATURE_FILS_SK_OFFLOAD, -+ NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK, -+ NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X, /* add new features before the definition below */ NUM_NL80211_EXT_FEATURES, -@@ -4687,6 +4980,21 @@ enum nl80211_connect_failed_reason { +@@ -4687,6 +4802,21 @@ enum nl80211_connect_failed_reason { }; /** @@ -608,25 +291,7 @@ * enum nl80211_scan_flags - scan request control flags * * Scan request control flags are used to control the handling -@@ -4768,12 +5076,17 @@ enum nl80211_smps_mode { - * change to the channel status. - * @NL80211_RADAR_NOP_FINISHED: The Non-Occupancy Period for this channel is - * over, channel becomes usable. -+ * @NL80211_RADAR_PRE_CAC_EXPIRED: Channel Availability Check done on this -+ * non-operating channel is expired and no longer valid. New CAC must -+ * be done on this channel before starting the operation. This is not -+ * applicable for ETSI dfs domain where pre-CAC is valid for ever. - */ - enum nl80211_radar_event { - NL80211_RADAR_DETECTED, - NL80211_RADAR_CAC_FINISHED, - NL80211_RADAR_CAC_ABORTED, - NL80211_RADAR_NOP_FINISHED, -+ NL80211_RADAR_PRE_CAC_EXPIRED, - }; - - /** -@@ -4900,8 +5213,9 @@ enum nl80211_sched_scan_plan { +@@ -4900,8 +5030,9 @@ enum nl80211_sched_scan_plan { /** * struct nl80211_bss_select_rssi_adjust - RSSI adjustment parameters. * @@ -638,25 +303,3 @@ */ struct nl80211_bss_select_rssi_adjust { __u8 band; -@@ -4942,21 +5256,6 @@ enum nl80211_bss_select_attr { - }; - - /** -- * enum nl80211_nan_dual_band_conf - NAN dual band configuration -- * -- * Defines the NAN dual band mode of operation -- * -- * @NL80211_NAN_BAND_DEFAULT: device default mode -- * @NL80211_NAN_BAND_2GHZ: 2.4GHz mode -- * @NL80211_NAN_BAND_5GHZ: 5GHz mode -- */ --enum nl80211_nan_dual_band_conf { -- NL80211_NAN_BAND_DEFAULT = 1 << 0, -- NL80211_NAN_BAND_2GHZ = 1 << 1, -- NL80211_NAN_BAND_5GHZ = 1 << 2, --}; -- --/** - * enum nl80211_nan_function_type - NAN function type - * - * Defines the function type of a NAN function diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index 1b8a3ad2b..00332b035 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/iwinfo.git -PKG_SOURCE_DATE:=2017-08-23 -PKG_SOURCE_VERSION:=c1a03e8231a5d8b348b70a182d256725c98a3b0b -PKG_MIRROR_HASH:=7bd294f50f8ec8c0497c5fbe5527f3ae098814cdfeecf4ccf78a2a8937611664 +PKG_SOURCE_DATE:=2016-09-21 +PKG_SOURCE_VERSION:=fd9e17be0c43bd6b8df5371f0b353747bc563874 +PKG_MIRROR_HASH:=c58490d9b5c2179f6a3edc67aae2f00ae6007daee0d52fa7e5b4c0ea923f1e37 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/layerscape/restool/Makefile b/package/network/utils/layerscape/restool/Makefile deleted file mode 100644 index 988bc8075..000000000 --- a/package/network/utils/layerscape/restool/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright 2017 NXP -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=restool -PKG_SOURCE_DATE:=2017-10-23 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/qoriq-open-source/restool.git -PKG_SOURCE_VERSION:=8f08b9d499e84f9057784c2036f0ddf75ae3fc70 -PKG_MIRROR_HASH:=29f70ad27c7ab20bc018f0d0b11c680fcf8b829d10e5af5c30af4a3f9228a2fc - -include $(INCLUDE_DIR)/package.mk - -define Package/restool - SECTION:=net - CATEGORY:=Network - DEPENDS:=@TARGET_layerscape - TITLE:=Layerscape DPAA2 dynamical management tool -endef - -MAKE_FLAGS += \ - DESTDIR="$(PKG_BUILD_DIR)"/output/ \ - install - -define Package/restool/install - $(INSTALL_DIR) $(1)/usr/bin/ - $(CP) $(PKG_BUILD_DIR)/output/usr/local/bin/* $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,restool)) diff --git a/package/network/utils/layerscape/restool/patches/0001-scripts-move-shebang-on-the-first-line.patch b/package/network/utils/layerscape/restool/patches/0001-scripts-move-shebang-on-the-first-line.patch deleted file mode 100644 index 691e3bba5..000000000 --- a/package/network/utils/layerscape/restool/patches/0001-scripts-move-shebang-on-the-first-line.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 978f00c0a9f17de9cf17b205a741222084261d3a Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Tue, 24 Oct 2017 16:29:17 +0000 -Subject: [PATCH 01/12] scripts: move shebang on the first line - -If the shebang is not placed on the first line of the shell script -it will be accounted only as a comment. - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index 588c736..09bef5a 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -1,3 +1,5 @@ -+#!/bin/bash -+ - # Copyright 2013-2016 Freescale Semiconductor Inc. - # Copyright 2017 NXP - -@@ -30,8 +32,6 @@ - # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - # POSSIBILITY OF SUCH DAMAGE. - --#!/bin/bash -- - ## Restool wrapper script - # - # Prerequisites: --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0002-dprc-add-full-path-option-to-dprc-list-command.patch b/package/network/utils/layerscape/restool/patches/0002-dprc-add-full-path-option-to-dprc-list-command.patch deleted file mode 100644 index 0e39ef724..000000000 --- a/package/network/utils/layerscape/restool/patches/0002-dprc-add-full-path-option-to-dprc-list-command.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 6039bd1b7e5e71a0a171406cf980d2d61a6e79d4 Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Tue, 24 Oct 2017 16:29:37 +0000 -Subject: [PATCH 02/12] dprc: add --full-path option to dprc list command - -Instead of printing an indented dprc list, activating -the --full-path option restool will print the entire path -of the dprc. -Example: - -root@rodos:~# restool dprc list --full-path -dprc.1 -dprc.1/dprc.3 -dprc.1/dprc.2 -dprc.1/dprc.2/dprc.4 - -Signed-off-by: Ioana Ciornei ---- - dprc_commands.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++----------- - 1 file changed, 50 insertions(+), 11 deletions(-) - -diff --git a/dprc_commands.c b/dprc_commands.c -index e1a8f16..8de2f0e 100644 ---- a/dprc_commands.c -+++ b/dprc_commands.c -@@ -76,13 +76,16 @@ C_ASSERT(ARRAY_SIZE(dprc_sync_options) <= MAX_NUM_CMD_LINE_OPTIONS + 1); - */ - enum dprc_list_options { - LIST_OPT_HELP = 0, -+ LIST_OPT_FULL_PATH, - }; - - static struct option dprc_list_options[] = { - [LIST_OPT_HELP] = { - .name = "help", - }, -- -+ [LIST_OPT_FULL_PATH] = { -+ .name = "full-path", -+ }, - { 0 }, - }; - -@@ -421,17 +424,33 @@ static int cmd_dprc_sync(void) - * Lists nested DPRCs inside a given DPRC, recursively - */ - static int list_dprc(uint32_t dprc_id, uint16_t dprc_handle, -- int nesting_level, bool show_non_dprc_objects) -+ int nesting_level, bool show_non_dprc_objects, -+ char *full_path) - { -+ char *updated_full_path = NULL; - int num_child_devices; - int error = 0; -+ int full_path_len; - - assert(nesting_level <= MAX_DPRC_NESTING); - -- for (int i = 0; i < nesting_level; i++) -- printf(" "); -- -- printf("dprc.%u\n", dprc_id); -+ if (full_path) { -+ full_path_len = strlen(full_path); -+ updated_full_path = malloc(full_path_len + 10); -+ if (!updated_full_path) { -+ ERROR_PRINTF("Could not alloc memory for full-path!\n"); -+ return -ENOMEM; -+ } -+ if (full_path_len != 0) -+ sprintf(updated_full_path, "%s/dprc.%d", full_path, dprc_id); -+ else -+ sprintf(updated_full_path, "dprc.%d", dprc_id); -+ printf("%s\n", updated_full_path); -+ } else { -+ for (int i = 0; i < nesting_level; i++) -+ printf(" "); -+ printf("dprc.%u\n", dprc_id); -+ } - - error = dprc_get_obj_count(&restool.mc_io, 0, - dprc_handle, -@@ -475,8 +494,11 @@ static int list_dprc(uint32_t dprc_id, uint16_t dprc_handle, - if (error < 0) - goto out; - -- error = list_dprc(obj_desc.id, child_dprc_handle, -- nesting_level + 1, show_non_dprc_objects); -+ error = list_dprc(obj_desc.id, -+ child_dprc_handle, -+ nesting_level + 1, -+ show_non_dprc_objects, -+ updated_full_path); - - error2 = dprc_close(&restool.mc_io, 0, child_dprc_handle); - if (error2 < 0) { -@@ -491,6 +513,9 @@ static int list_dprc(uint32_t dprc_id, uint16_t dprc_handle, - } - - out: -+ if (full_path) -+ free(updated_full_path); -+ - return error; - } - -@@ -498,8 +523,14 @@ static int cmd_dprc_list(void) - { - static const char usage_msg[] = - "\n" -- "Usage: restool dprc list\n" -+ "Usage: restool dprc list [OPTIONS]\n" -+ "\n" -+ "OPTIONS:\n" -+ "--full-path\n" -+ " prints the dprc list in a full-path\n" -+ " format like: dprc.1/dprc.2\n" - "\n"; -+ bool full_path = false; - - if (restool.cmd_option_mask & ONE_BIT_MASK(LIST_OPT_HELP)) { - puts(usage_msg); -@@ -507,6 +538,12 @@ static int cmd_dprc_list(void) - return 0; - } - -+ -+ if (restool.cmd_option_mask & ONE_BIT_MASK(LIST_OPT_FULL_PATH)) { -+ restool.cmd_option_mask &= ~ONE_BIT_MASK(LIST_OPT_FULL_PATH); -+ full_path = true; -+ } -+ - if (restool.obj_name != NULL) { - ERROR_PRINTF( - "Unexpected argument: \'%s\'\n\n", restool.obj_name); -@@ -514,8 +551,10 @@ static int cmd_dprc_list(void) - return -EINVAL; - } - -- return list_dprc( -- restool.root_dprc_id, restool.root_dprc_handle, 0, false); -+ return list_dprc(restool.root_dprc_id, -+ restool.root_dprc_handle, -+ 0, false, -+ full_path ? "" : NULL); - } - - static int show_one_resource_type(uint16_t dprc_handle, --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0003-scripts-remove-unnecessary-arrays.patch b/package/network/utils/layerscape/restool/patches/0003-scripts-remove-unnecessary-arrays.patch deleted file mode 100644 index c846fbab5..000000000 --- a/package/network/utils/layerscape/restool/patches/0003-scripts-remove-unnecessary-arrays.patch +++ /dev/null @@ -1,62 +0,0 @@ -From e316b4c7d421afa6ca5f6b6ae86d0a8219a9bd56 Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Tue, 24 Oct 2017 16:29:42 +0000 -Subject: [PATCH 03/12] scripts: remove unnecessary arrays - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 22 ++-------------------- - 1 file changed, 2 insertions(+), 20 deletions(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index 09bef5a..ea0df92 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -87,8 +87,6 @@ root_c= - # Type of endpoint object - toe= - --dpnis=() --dpmacs=() - containers=() - # Full path containers - fpc=() -@@ -944,16 +942,8 @@ process_listni() { - fi - fi - -- dpnis+=("$dpni $details") -+ echo "${i}/${dpni} ${details}" - done -- -- if [ -n "$dpnis" ]; then -- for j in "${dpnis[@]}"; do -- echo "$i/$j" -- done -- -- dpnis=() -- fi - done - } - -@@ -984,16 +974,8 @@ process_listmac() { - fi - fi - -- dpmacs+=("$dpmac $details") -+ echo "${i}/${dpmac} ${details}" - done -- -- if [ -n "$dpmacs" ]; then -- for j in "${dpmacs[@]}"; do -- echo "$i/$j" -- done -- -- dpmacs=() -- fi - done - } - --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0004-scripts-use-restool-full-path-option.patch b/package/network/utils/layerscape/restool/patches/0004-scripts-use-restool-full-path-option.patch deleted file mode 100644 index e1cc38f48..000000000 --- a/package/network/utils/layerscape/restool/patches/0004-scripts-use-restool-full-path-option.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 09f840049d155fa4b681ece749feeff9a269ecde Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Tue, 24 Oct 2017 16:29:45 +0000 -Subject: [PATCH 04/12] scripts: use restool --full-path option - -Instead of constructing the the full path container list by -hand use the restool option newly added. - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 54 +++++++----------------------------------------------- - 1 file changed, 7 insertions(+), 47 deletions(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index ea0df92..72f6c77 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -73,7 +73,6 @@ - ## - - shopt -s extglob --shopt -s lastpipe - - # Intercept the Ctrl+C command but do not interrupt execution - trap ' ' INT -@@ -87,11 +86,6 @@ root_c= - # Type of endpoint object - toe= - --containers=() --# Full path containers --fpc=() --idx=0 -- - SYS_DPRC="/sys/bus/fsl-mc/drivers/fsl_mc_dprc" - - set -e -@@ -220,42 +214,6 @@ get_container() { - echo $(echo "$i" | sed "s/\(dprc.[0-9]*\/\)*//g") - } - --build_fpc_list() { -- $restool dprc list | -- while IFS= read -r line -- do -- containers+=("$line") -- done -- -- for i in "${containers[@]}" -- do -- cnt=$(count_spaces "$i") -- -- if [ "$cnt" -gt 0 ]; then -- # Get index of the upper level container -- idx2=$((idx-1)) -- crt_ct="$i" -- -- while [ "$idx2" -ge 0 ] -- do -- cntp=$(count_spaces "${containers[idx2]}") -- -- if [ "$cntp" -lt "$cnt" ]; then -- upc=$(echo "${containers[idx2]}" | sed "s/ *$//") -- crt_ct=$upc"/""$(echo $crt_ct | sed 's/ *$//')" -- fi -- idx2=$((idx2-1)) -- done -- -- fpc+=($crt_ct) -- else -- fpc+=("$i") -- fi -- -- idx=$((idx+1)) -- done --} -- - get_label() { - # Retrieve the type of the object - too=$(echo "$1" | sed "s/\(\.[0-9]*\)\(\.[0-9]*\)*$//g") -@@ -897,9 +855,9 @@ process_addni() { - } - - process_listni() { -- build_fpc_list -- -- for i in "${fpc[@]}" -+ dprc_list="$($restool dprc list --full-path)" -+ echo "${dprc_list}" | -+ while read -r i - do - crt_c=$(get_container "$i") - $restool dprc show "$crt_c" | grep dpni | -@@ -948,10 +906,12 @@ process_listni() { - } - - process_listmac() { -- build_fpc_list -+ dprc_list="$($restool dprc list --full-path)" - -- for i in "${fpc[@]}" -+ echo "${dprc_list}" | -+ while read -r i - do -+ - crt_c=$(get_container "$i") - $restool dprc show "$crt_c" | grep dpmac | - while IFS= read -r line --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0005-scripts-use-proper-arithmetic-operation-syntax.patch b/package/network/utils/layerscape/restool/patches/0005-scripts-use-proper-arithmetic-operation-syntax.patch deleted file mode 100644 index b34c6a31a..000000000 --- a/package/network/utils/layerscape/restool/patches/0005-scripts-use-proper-arithmetic-operation-syntax.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 899d6c74286cbc672e1bad1abd7eff15b1b7298d Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Tue, 24 Oct 2017 16:29:49 +0000 -Subject: [PATCH 05/12] scripts: use proper arithmetic operation syntax - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index 72f6c77..a39df2c 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -966,7 +966,7 @@ fi - - # Check compatibility with MC version - mc_major=$($restool --mc-version | cut -f2 -d':' | cut -f1 -d'.' | tr -d ' ') --if (( $mc_major != 10 )); then -+if [ $mc_major != 10 ]; then - echo "Restool wrapper scripts only support the latest major MC version\n" - echo "that currently is MC10.x. Use with caution." - fi --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0006-scripts-use-strings-instead-of-arrays.patch b/package/network/utils/layerscape/restool/patches/0006-scripts-use-strings-instead-of-arrays.patch deleted file mode 100644 index a1217668f..000000000 --- a/package/network/utils/layerscape/restool/patches/0006-scripts-use-strings-instead-of-arrays.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 2127850302de2bd8dccff0e31415ce0218750773 Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Tue, 24 Oct 2017 16:29:53 +0000 -Subject: [PATCH 06/12] scripts: use strings instead of arrays - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index a39df2c..b0c742e 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -485,7 +485,9 @@ create_dpsw() { - - # Make a link in case there is an end point specified - index=0 -- for i in "${endpoint[@]}"; do -+ echo "${endpoint}" | -+ while read -r i -+ do - connect $root_c "$dpsw.$index" "$i" - index=$((index + 1)) - done -@@ -519,8 +521,8 @@ process_addsw() { - max_fdb_mc_groups=32 - # dpsw object label - label= -- #Endpoint objects provided as argument -- endpoint=() -+ # Endpoint objects provided as argument -+ endpoint= - ifcnt=0 - container=$root_c - -@@ -559,7 +561,7 @@ process_addsw() { - container="${i#*=}" - ;; - @(dpni|dpmac).+([0-9])) -- endpoint[$ifcnt]="$(echo ${i#*=} | tr -d ,)" -+ endpoint="${endpoint}"$'\n'"${i}" - ifcnt=$((ifcnt + 1)) - ;; - *) -@@ -571,14 +573,19 @@ process_addsw() { - done - - # Check if there are more endpoints provided than the number of the interfaces -- if [ $num_ifs -lt ${#endpoint[@]} ]; then -+ if [ $num_ifs -lt $ifcnt ]; then - echo "Error: there are more endpoints provided than the number of the interfaces" - usage_addsw - exit 1 - fi - -+ # Delete first empty line from the endpoint string -+ endpoint="$(echo "${endpoint}" | tail -n +2)" -+ - # Check if the endpoints are valid -- for i in "${endpoint[@]}"; do -+ echo "${endpoint}" | -+ while read -r i -+ do - type_of_endpoint "$i" - check_endpoint "$i" - has_endpoint "$i" -@@ -592,7 +599,7 @@ process_addsw() { - if (( $object_exists_status == 1 )); then - echo "Created ETHSW object $dpsw with ${num_ifs} ports" - -- if [ $num_ifs -gt ${#endpoint[@]} ]; then -+ if [ $num_ifs -gt $ifcnt ]; then - echo "Do not forget to connect devices to interface(s)." - fi - fi --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0007-scripts-use-Bourne-shell-s-pattern-matching.patch b/package/network/utils/layerscape/restool/patches/0007-scripts-use-Bourne-shell-s-pattern-matching.patch deleted file mode 100644 index ed9d76d45..000000000 --- a/package/network/utils/layerscape/restool/patches/0007-scripts-use-Bourne-shell-s-pattern-matching.patch +++ /dev/null @@ -1,126 +0,0 @@ -From e1036011baf9204d5fe6dd74e5a65f95b9681ebd Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Tue, 24 Oct 2017 16:29:56 +0000 -Subject: [PATCH 07/12] scripts: use Bourne shell's pattern matching - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 71 ++++++++++++++++++++++++++++----------------------------- - 1 file changed, 35 insertions(+), 36 deletions(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index b0c742e..a8b9573 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -72,8 +72,6 @@ - # - ## - --shopt -s extglob -- - # Intercept the Ctrl+C command but do not interrupt execution - trap ' ' INT - -@@ -370,15 +368,16 @@ process_addmux() { - -c=* | --container=*) - container="${i#*=}" - ;; -- *(dprc.+([0-9])/)dpmac.+([0-9])) -- endpoint="${i#*=}" -- ;; -- *(dprc.+([0-9])/)dpni.+([0-9])) -- endpoint="${i#*=}" -- ;; - *) -- usage_addmux -- exit 1 -+ arg_dpmac="$(echo $i | grep -x -E "(dprc.[0-9]+/)*dpmac.[0-9]+" || true )" -+ arg_dpni="$(echo $i | grep -x -E "(dprc.+[0-9]+/)*dpni.[0-9]+" || true )" -+ if [ "$i" = "$arg_dpmac" ] || -+ [ "$i" = "$arg_dpni" ]; then -+ endpoint="$i" -+ else -+ usage_addmux -+ exit 1 -+ fi - ;; - esac - done -@@ -560,14 +559,17 @@ process_addsw() { - -c=* | --container=*) - container="${i#*=}" - ;; -- @(dpni|dpmac).+([0-9])) -- endpoint="${endpoint}"$'\n'"${i}" -- ifcnt=$((ifcnt + 1)) -- ;; - *) -- echo "Error: $i argument is invalid" -- usage_addsw -- exit 1 -+ arg_dpmac="$(echo $i | grep -x -E "dpmac.[0-9]+" || true )" -+ arg_dpni="$(echo $i | grep -x -E "dpni.[0-9]+" || true )" -+ if [ "$i" = "$arg_dpmac" ] || -+ [ "$i" = "$arg_dpni" ]; then -+ endpoint="$i" -+ else -+ echo "Error: $i argument is invalid" -+ usage_addsw -+ exit 1 -+ fi - ;; - esac - done -@@ -704,7 +706,8 @@ process_addni() { - ;; - --mac-addr=*) - mac_addr="${i#*=}" -- if [[ ! "$mac_addr" =~ ^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$ ]]; then -+ mac_addr_valid="$(echo $mac_addr | grep -x -E "^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$" || true )" -+ if [ "$mac_addr" != "$mac_addr_valid" ]; then - echo "Invalid MAC address: $mac_addr" - exit 1 - fi -@@ -776,25 +779,21 @@ process_addni() { - -o=* | --options=*) - options="${i#*=}" - ;; -- *(dprc.+([0-9])/)dpmac.+([0-9])) -- no_link=0 -- endpoint="${i#*=}" -- ;; -- *(dprc.+([0-9])/)dpni.+([0-9])) -- no_link=0 -- endpoint="${i#*=}" -- ;; -- *(dprc.+([0-9])/)dpdmux.+([0-9]).+([0-9])) -- no_link=0 -- endpoint="${i#*=}" -- ;; -- *(dprc.+([0-9])/)dpsw.+([0-9]).+([0-9])) -- no_link=0 -- endpoint="${i#*=}" -- ;; - *) -- usage_addni -- exit 1 -+ arg_dpmac="$(echo $i | grep -x -E "(dprc.[0-9]+/)*dpmac.[0-9]+" || true )" -+ arg_dpni="$(echo $i | grep -x -E "(dprc.+[0-9]+/)*dpni.[0-9]+" || true )" -+ arg_dpdmux="$(echo $i | grep -x -E "(dprc.[0-9]+/)*dpdmux.[0-9]+.[0-9]+" || true )" -+ arg_dpsw="$(echo $i | grep -x -E "(dprc.[0-9]+/)*dpsw.[0-9]+.[0-9]+" || true )" -+ if [ "$i" = "$arg_dpmac" ] || -+ [ "$i" = "$arg_dpni" ] || -+ [ "$i" = "$arg_dpdmux" ] || -+ [ "$i" = "$arg_dpsw" ]; then -+ no_link=0 -+ endpoint="$i" -+ else -+ usage_addni -+ exit 1 -+ fi - ;; - esac - done --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0008-scripts-use-Bourne-shell-instead-of-bash.patch b/package/network/utils/layerscape/restool/patches/0008-scripts-use-Bourne-shell-instead-of-bash.patch deleted file mode 100644 index 4921f63c9..000000000 --- a/package/network/utils/layerscape/restool/patches/0008-scripts-use-Bourne-shell-instead-of-bash.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 4a1df345edc59a7407b955529955d6799d974b70 Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Tue, 24 Oct 2017 16:30:00 +0000 -Subject: [PATCH 08/12] scripts: use Bourne shell instead of bash - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index a8b9573..bd79295 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - # Copyright 2013-2016 Freescale Semiconductor Inc. - # Copyright 2017 NXP -@@ -37,7 +37,7 @@ - # Prerequisites: - # - Management Complex version 10.x - # - restool version 1.4 or newer --# - bash shell -+# - Bourne Shell (sh) - # - # - # The purpose of this script is to offer a user friendly way to create --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0009-scripts-workaround-for-a-improper-sed-substitution-T.patch b/package/network/utils/layerscape/restool/patches/0009-scripts-workaround-for-a-improper-sed-substitution-T.patch deleted file mode 100644 index c642afcaf..000000000 --- a/package/network/utils/layerscape/restool/patches/0009-scripts-workaround-for-a-improper-sed-substitution-T.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ac387de9688099bca1fbdb587d078b369aaf2dab Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Wed, 25 Oct 2017 11:23:42 +0000 -Subject: [PATCH 09/12] scripts: workaround for a improper sed substitution - (TODO) - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index bd79295..7ce73f0 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -197,7 +197,7 @@ has_endpoint() { - ep=$($restool "$toe" info "$1" | grep "endpoint:" | sed "s/endpoint: \([^ ]*\)\,.*/\1/") - fi - -- if [[ "$ep" != *"No object associated"* && "$ep" != *"none"* ]]; then -+ if [[ "$ep" != "endpoint: No object associated" && "$ep" != *"none"* ]]; then - echo "$1 is already linked to $ep" - exit 1 - fi -@@ -230,7 +230,7 @@ get_endpoint() { - end_point=$($restool "$too" info "$1" | grep "endpoint:" | sed "s/endpoint: \([^ ]*\)\,.*/\1/") - fi - -- if [[ "$end_point" != *"No object associated"* && "$end_point" != *"none"* ]]; then -+ if [[ "$end_point" != "endpoint: No object associated" && "$end_point" != *"none"* ]]; then - echo "$end_point" - fi - } --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0010-scripts-use-proper-arithmetic-operations.patch b/package/network/utils/layerscape/restool/patches/0010-scripts-use-proper-arithmetic-operations.patch deleted file mode 100644 index 9945cd438..000000000 --- a/package/network/utils/layerscape/restool/patches/0010-scripts-use-proper-arithmetic-operations.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 66ae6e5313da8be5742a502c0d7027689e84a17d Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Wed, 25 Oct 2017 11:30:08 +0000 -Subject: [PATCH 10/12] scripts: use proper arithmetic operations - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index 7ce73f0..0dcd2fa 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -409,7 +409,7 @@ process_addmux() { - - # check the status - object_exists $container $dpdmux -- if (( $object_exists_status == 1 )); then -+ if [ $object_exists_status == 1 ]; then - - if [ "$root_c" == "$container" ]; then - evb=$(ls $SYS_DPRC/"$root_c"/"$dpdmux"/net/ | grep -v "p") -@@ -598,7 +598,7 @@ process_addsw() { - - # check the status - object_exists $container $dpsw -- if (( $object_exists_status == 1 )); then -+ if [ $object_exists_status == 1 ]; then - echo "Created ETHSW object $dpsw with ${num_ifs} ports" - - if [ $num_ifs -gt $ifcnt ]; then -@@ -850,7 +850,7 @@ process_addni() { - - # check the status - object_exists $container $dpni -- if (( $object_exists_status == 1 )); then -+ if [ $object_exists_status == 1 ]; then - if [ "$root_c" == "$container" ]; then - ni=$(ls $SYS_DPRC/"$root_c"/"$dpni"/net/) - fi --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0011-scripts-do-not-compare-strings-with-regexp-expressio.patch b/package/network/utils/layerscape/restool/patches/0011-scripts-do-not-compare-strings-with-regexp-expressio.patch deleted file mode 100644 index 1b6cc46a3..000000000 --- a/package/network/utils/layerscape/restool/patches/0011-scripts-do-not-compare-strings-with-regexp-expressio.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 6af86a65f2dcfd42f572e04207eef45da3573b92 Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Wed, 25 Oct 2017 11:30:33 +0000 -Subject: [PATCH 11/12] scripts: do not compare strings with regexp expressions - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index 0dcd2fa..526c052 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -805,7 +805,8 @@ process_addni() { - fi - - # if no --num-queues is specified then set it to number of cores -- if [[ $dpni_args != *"--num-queues"* ]]; then -+ num_queues_present=$(echo "$dpni_args" | grep -o "\-\-num-queues" || true) -+ if [[ -z "$num_queues_present" ]]; then - dpni_args=$dpni_args" --num-queues="$(nproc) - fi - --- -2.14.1 - diff --git a/package/network/utils/layerscape/restool/patches/0012-scripts-replace-nproc-with-cross-platform-implementa.patch b/package/network/utils/layerscape/restool/patches/0012-scripts-replace-nproc-with-cross-platform-implementa.patch deleted file mode 100644 index 3acb3b5d8..000000000 --- a/package/network/utils/layerscape/restool/patches/0012-scripts-replace-nproc-with-cross-platform-implementa.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0e5f9f0a7f0ef1947984cd82ade9dbc14ba2c80d Mon Sep 17 00:00:00 2001 -From: Ioana Ciornei -Date: Wed, 25 Oct 2017 12:48:04 +0000 -Subject: [PATCH 12/12] scripts: replace 'nproc' with cross-platform - implementation - -Signed-off-by: Ioana Ciornei ---- - scripts/ls-main | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/ls-main b/scripts/ls-main -index 526c052..7d127f6 100755 ---- a/scripts/ls-main -+++ b/scripts/ls-main -@@ -807,7 +807,7 @@ process_addni() { - # if no --num-queues is specified then set it to number of cores - num_queues_present=$(echo "$dpni_args" | grep -o "\-\-num-queues" || true) - if [[ -z "$num_queues_present" ]]; then -- dpni_args=$dpni_args" --num-queues="$(nproc) -+ dpni_args=$dpni_args" --num-queues="$(grep -c ^processor /proc/cpuinfo) - fi - - # Check if --no-link the endpoint have been provided otherwise display the usage --- -2.14.1 - diff --git a/package/network/utils/linux-atm/Makefile b/package/network/utils/linux-atm/Makefile index 532a02821..3d3662264 100644 --- a/package/network/utils/linux-atm/Makefile +++ b/package/network/utils/linux-atm/Makefile @@ -19,7 +19,6 @@ PKG_HASH:=9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0+ -PKG_CPE_ID:=cpe:/a:linux-atm:linux-atm PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk diff --git a/package/network/utils/nftables/Makefile b/package/network/utils/nftables/Makefile index 5aaa1cbf4..4fdd58265 100644 --- a/package/network/utils/nftables/Makefile +++ b/package/network/utils/nftables/Makefile @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nftables -PKG_VERSION:=0.7 +PKG_VERSION:=0.4+2015-04-09 PKG_RELEASE:=1 -PKG_SOURCE_URL:=https://git.netfilter.org/nftables +PKG_SOURCE_URL:=git://git.netfilter.org/nftables PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=79cbd19e7437680561b26109bbf4f48cb2e8e0a7 -PKG_MIRROR_HASH:=2c0af691948519556952097673ad1b57f888c8314b8eb15e83066951de01fc82 +PKG_SOURCE_VERSION:=3ed296118a065caff5600e60d4f7ef18e137f9a0 +PKG_MIRROR_HASH:=7f6f6162592c848b8047e75374f01a93d2d269dabe013a0150767027049b1e41 PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/nftables/patches/101-nftables-statement-fix-print-of-ip-dnat-address.patch b/package/network/utils/nftables/patches/101-nftables-statement-fix-print-of-ip-dnat-address.patch deleted file mode 100644 index 99f968435..000000000 --- a/package/network/utils/nftables/patches/101-nftables-statement-fix-print-of-ip-dnat-address.patch +++ /dev/null @@ -1,76 +0,0 @@ -From patchwork Fri Feb 3 14:25:45 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [nftables] statement: fix print of ip dnat address -From: Florian Westphal -X-Patchwork-Id: 723692 -X-Patchwork-Delegate: pablo@netfilter.org -Message-Id: <20170203142545.13724-1-fw@strlen.de> -To: -Cc: Florian Westphal -Date: Fri, 3 Feb 2017 15:25:45 +0100 - -the change causes non-ipv6 addresses to not be printed at all in case -a nfproto was given. - -Also add a test case to catch this. - -Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1117 -Fixes: 5ab0e10fc6e2c22363a ("src: support for RFC2732 IPv6 address format with brackets") -Signed-off-by: Florian Westphal -Acked-by: Pablo Neira Ayuso ---- - src/statement.c | 2 ++ - tests/py/ip/dnat.t | 1 + - tests/py/ip/dnat.t.payload.ip | 12 ++++++++++++ - 3 files changed, 15 insertions(+) - -diff --git a/src/statement.c b/src/statement.c -index 9cdabbb979e8..3beb86ab4263 100644 ---- a/src/statement.c -+++ b/src/statement.c -@@ -508,6 +508,8 @@ static void nat_stmt_print(const struct stmt *stmt) - printf("]-["); - expr_print(stmt->nat.addr->right); - printf("]"); -+ } else { -+ expr_print(stmt->nat.addr); - } - } else { - expr_print(stmt->nat.addr); -diff --git a/tests/py/ip/dnat.t b/tests/py/ip/dnat.t -index da00106edbb4..089017c84704 100644 ---- a/tests/py/ip/dnat.t -+++ b/tests/py/ip/dnat.t -@@ -7,6 +7,7 @@ iifname "eth0" tcp dport != 80-90 dnat to 192.168.3.2;ok - iifname "eth0" tcp dport {80, 90, 23} dnat to 192.168.3.2;ok - iifname "eth0" tcp dport != {80, 90, 23} dnat to 192.168.3.2;ok - iifname "eth0" tcp dport != 23-34 dnat to 192.168.3.2;ok -+iifname "eth0" tcp dport 81 dnat to 192.168.3.2:8080;ok - - dnat to ct mark map { 0x00000014 : 1.2.3.4};ok - dnat to ct mark . ip daddr map { 0x00000014 . 1.1.1.1 : 1.2.3.4};ok -diff --git a/tests/py/ip/dnat.t.payload.ip b/tests/py/ip/dnat.t.payload.ip -index 66926990d880..7a7f5a82dd5a 100644 ---- a/tests/py/ip/dnat.t.payload.ip -+++ b/tests/py/ip/dnat.t.payload.ip -@@ -60,6 +60,18 @@ ip test-ip4 prerouting - [ immediate reg 1 0x0203a8c0 ] - [ nat dnat ip addr_min reg 1 addr_max reg 0 ] - -+# iifname "eth0" tcp dport 81 dnat to 192.168.3.2:8080 -+ip test-ip4 prerouting -+ [ meta load iifname => reg 1 ] -+ [ cmp eq reg 1 0x30687465 0x00000000 0x00000000 0x00000000 ] -+ [ payload load 1b @ network header + 9 => reg 1 ] -+ [ cmp eq reg 1 0x00000006 ] -+ [ payload load 2b @ transport header + 2 => reg 1 ] -+ [ cmp eq reg 1 0x00005100 ] -+ [ immediate reg 1 0x0203a8c0 ] -+ [ immediate reg 2 0x0000901f ] -+ [ nat dnat ip addr_min reg 1 addr_max reg 0 proto_min reg 2 proto_max reg 0 ] -+ - # dnat to ct mark map { 0x00000014 : 1.2.3.4} - __map%d test-ip4 b - __map%d test-ip4 0 diff --git a/package/network/utils/tcpdump/Makefile b/package/network/utils/tcpdump/Makefile index 50919819b..bb04369b5 100644 --- a/package/network/utils/tcpdump/Makefile +++ b/package/network/utils/tcpdump/Makefile @@ -21,7 +21,6 @@ PKG_BUILD_PARALLEL:=1 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause -PKG_CPE_ID:=cpe:/a:tcpdump:tcpdump PKG_INSTALL:=1 diff --git a/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch b/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch index 48cc470bf..593d42894 100644 --- a/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch +++ b/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch @@ -1,13 +1,15 @@ --- a/Makefile.in +++ b/Makefile.in -@@ -72,6 +72,80 @@ DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ - - CSRC = setsignal.c tcpdump.c +@@ -70,6 +70,82 @@ DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ + @rm -f $@ + $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c +ifdef TCPDUMP_MINI + -+LIBNETDISSECT_SRC=\ ++CSRC=\ ++ tcpdump.c \ + netdissect.c \ ++ setsignal.c \ + addrtoname.c \ + addrtostr.c \ + af.c \ @@ -78,10 +80,10 @@ + +else + + CSRC = setsignal.c tcpdump.c + LIBNETDISSECT_SRC=\ - addrtoname.c \ - addrtostr.c \ -@@ -237,6 +311,8 @@ LIBNETDISSECT_SRC=\ +@@ -237,12 +313,16 @@ LIBNETDISSECT_SRC=\ strtoaddr.c \ util-print.c @@ -90,6 +92,27 @@ LOCALSRC = @LOCALSRC@ GENSRC = version.c LIBOBJS = @LIBOBJS@ + ++ifndef TCPDUMP_MINI + LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS} + LIBNETDISSECT=libnetdissect.a ++endif + + + SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC) +@@ -373,10 +453,12 @@ $(PROG): $(OBJ) @V_PCAPDEP@ + @rm -f $@ + $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) + ++ifndef TCPDUMP_MINI + $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) + @rm -f $@ + $(AR) cr $@ $(LIBNETDISSECT_OBJ) + $(RANLIB) $@ ++endif + + datalinks.o: $(srcdir)/missing/datalinks.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c --- a/addrtoname.c +++ b/addrtoname.c @@ -578,8 +578,10 @@ linkaddr_string(netdissect_options *ndo, diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index 9c953ea69..6f11933a9 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -65,7 +65,6 @@ proto_qmi_setup() { [ -n "$delay" ] && sleep "$delay" while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do - [ -e "$device" ] || return 1 sleep 1; done @@ -103,7 +102,6 @@ proto_qmi_setup() { echo "Waiting for network registration" while uqmi -s -d "$device" --get-serving-system | grep '"searching"' > /dev/null; do - [ -e "$device" ] || return 1 sleep 5; done diff --git a/package/network/utils/wpan-tools/Makefile b/package/network/utils/wpan-tools/Makefile index e57223dee..ff6537572 100644 --- a/package/network/utils/wpan-tools/Makefile +++ b/package/network/utils/wpan-tools/Makefile @@ -31,7 +31,6 @@ endef define Package/wpan-tools/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iwpan $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/wpan-ping/wpan-ping $(1)/usr/sbin/ endef $(eval $(call BuildPackage,wpan-tools)) diff --git a/package/network/utils/wpan-tools/patches/001-src-nl_extras.h-fix-compatibility-with-libnl-3.3.0.patch b/package/network/utils/wpan-tools/patches/001-src-nl_extras.h-fix-compatibility-with-libnl-3.3.0.patch deleted file mode 100644 index 1370854b6..000000000 --- a/package/network/utils/wpan-tools/patches/001-src-nl_extras.h-fix-compatibility-with-libnl-3.3.0.patch +++ /dev/null @@ -1,44 +0,0 @@ -From bb522bd584f05e6658d5dba97f48ca018f46394c Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sat, 6 May 2017 14:36:08 +0200 -Subject: [PATCH] src/nl_extras.h: fix compatibility with libnl 3.3.0 - -nl_extras.h defines a set of nla_set_s*() functions if not provided by -libnl. They are provided by libnl since version 3.2.26. The test -(LIBNL_VER_MIC <= 26) was working fine while libnl was in the 3.2.x -series, but now that they have incremented the minor version, the -micro version was reset to 0, with the latest libnl version being -3.3.0. - -Due to this, the condition (LIBNL_VER_MIC <= 26) is true, and we get -redefinition errors because nl_extras.h redefines functions already -provided by libnl. - -This commit improves the condition so that nl_extras.h provides the -missing functions only if the minor version is < 2, or if minor is 2 -and micro is < 26. - -Signed-off-by: Thomas Petazzoni ---- - src/nl_extras.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/src/nl_extras.h -+++ b/src/nl_extras.h -@@ -1,7 +1,7 @@ - #ifndef __NL_EXTRAS_H - #define __NL_EXTRAS_H - --#if LIBNL_VER_MIC <= 26 -+#if (LIBNL_VER_MIN < 2) || (LIBNL_VER_MIN == 2) && (LIBNL_VER_MIC <= 26) - - #ifndef NLA_S8 - -@@ -45,6 +45,6 @@ static inline int32_t nla_get_s32(struct - - #endif /* NLA_S64 */ - --#endif /* LIBNL_VER_MIC */ -+#endif /* LIBNL_VER_* */ - - #endif /* __NL_EXTRAS_H */ diff --git a/package/network/utils/wwan/files/wwan.sh b/package/network/utils/wwan/files/wwan.sh index 2e9d73f1e..6b33600b3 100755 --- a/package/network/utils/wwan/files/wwan.sh +++ b/package/network/utils/wwan/files/wwan.sh @@ -66,15 +66,15 @@ proto_wwan_setup() { } } - [ -z "$ctl_device" ] && for net in $(ls /sys/class/net/ | grep -e wwan -e usb); do + [ -z "$ctl_device" ] && for net in $(ls /sys/class/net/ | grep wwan); do [ -z "$ctl_device" ] || continue driver=$(grep DRIVER /sys/class/net/$net/device/uevent | cut -d= -f2) case "$driver" in qmi_wwan|cdc_mbim) ctl_device=/dev/$(ls /sys/class/net/$net/device/usbmisc) ;; - sierra_net|cdc_ether|*cdc_ncm) - ctl_device=/dev/$(cd /sys/class/net/$net/; find ../../../ -name ttyUSB* |xargs -n1 basename | head -n1) + sierra_net|*cdc_ncm) + ctl_device=/dev/$(cd /sys/class/net/$net/; find ../../../ -name ttyUSB* |xargs basename | head -n1) ;; *) continue;; esac @@ -93,11 +93,11 @@ proto_wwan_setup() { uci_set_state network $interface dat_device "$dat_device" case $driver in - qmi_wwan) proto_qmi_setup $@ ;; - cdc_mbim) proto_mbim_setup $@ ;; - sierra_net) proto_directip_setup $@ ;; - comgt) proto_3g_setup $@ ;; - cdc_ether|*cdc_ncm) proto_ncm_setup $@ ;; + qmi_wwan) proto_qmi_setup $@ ;; + cdc_mbim) proto_mbim_setup $@ ;; + sierra_net) proto_directip_setup $@ ;; + comgt) proto_3g_setup $@ ;; + *cdc_ncm) proto_ncm_setup $@ ;; esac } @@ -108,11 +108,11 @@ proto_wwan_teardown() { dat_device=$(uci_get_state network $interface dat_device) case $driver in - qmi_wwan) proto_qmi_teardown $@ ;; - cdc_mbim) proto_mbim_teardown $@ ;; - sierra_net) proto_mbim_teardown $@ ;; - comgt) proto_3g_teardown $@ ;; - cdc_ether|*cdc_ncm) proto_ncm_teardown $@ ;; + qmi_wwan) proto_qmi_teardown $@ ;; + cdc_mbim) proto_mbim_teardown $@ ;; + sierra_net) proto_mbim_teardown $@ ;; + comgt) proto_3g_teardown $@ ;; + *cdc_ncm) proto_ncm_teardown $@ ;; esac } diff --git a/package/network/utils/xtables-addons/Makefile b/package/network/utils/xtables-addons/Makefile index 0c12d7464..50d1287ba 100644 --- a/package/network/utils/xtables-addons/Makefile +++ b/package/network/utils/xtables-addons/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=xtables-addons -PKG_VERSION:=2.14 +PKG_VERSION:=2.11 PKG_RELEASE:=1 -PKG_HASH:=d215a9a8b8e66aae04b982fa2e1228e8a71e7dfe42320df99e34e5000cbdf152 +PKG_HASH:=f14f8953a9d3a70157a82883886ff6ec866c61dbea1585edb421478107279921 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/xtables-addons @@ -43,7 +43,8 @@ CONFIGURE_ARGS+= \ define Build/Compile +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - $(KERNEL_MAKE_FLAGS) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ DEPMOD="/bin/true" \ all @@ -51,7 +52,8 @@ endef define Build/Install $(MAKE) -C $(PKG_BUILD_DIR) \ - $(KERNEL_MAKE_FLAGS) \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ DEPMOD="/bin/true" \ install diff --git a/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch b/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch index a9fb796d0..02250ec20 100644 --- a/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch +++ b/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch @@ -1,14 +1,5 @@ --- a/extensions/LUA/xt_LUA_target.c +++ b/extensions/LUA/xt_LUA_target.c -@@ -19,7 +19,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include "xt_LUA.h" @@ -64,10 +64,10 @@ uint32_t lua_state_refs[LUA_STATE_ARRAY * XT_CONTINUE inside the *register_lua_packet_lib* function. */ @@ -114,14 +105,3 @@ #endif #if defined(__cplusplus) ---- a/extensions/LUA/lua/llex.h -+++ b/extensions/LUA/lua/llex.h -@@ -10,6 +10,8 @@ - #include "lobject.h" - #include "lzio.h" - -+/* prevent conflict with definition from asm/current.h */ -+#undef current - - #define FIRST_RESERVED 257 - diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index 61fc5daa8..16f2f7e77 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,10 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/fstools.git -PKG_SOURCE_DATE:=2018-01-02 -PKG_SOURCE_VERSION:=11efbf3b90f031ce634fc38cad07a4aef2985777 -PKG_MIRROR_HASH:=35f14ea0ed799d2eb972f4901116a0e447d4bc1e37fb0edb239c44b270aeae18 +PKG_SOURCE_DATE:=2018-01-04 +PKG_SOURCE_VERSION:=37762ff488752c1686b359816aec75831b49c55f +PKG_MIRROR_HASH:=fe619019e0fd680ea32786cad80305250b776d51969de57a8f0feb729f7639e5 +PKG_RELEASE:=1 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -66,13 +67,6 @@ define Package/block-mount DEPENDS:=+ubox +libubox +libuci endef -define Package/blockd - SECTION:=base - CATEGORY:=Base system - TITLE:=Block device automounting - DEPENDS:=+block-mount +fstools +libubus +kmod-fs-autofs4 -endef - define Package/fstools/install $(INSTALL_DIR) $(1)/sbin $(1)/lib @@ -102,12 +96,6 @@ define Package/block-mount/install endef -define Package/blockd/install - $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blockd $(1)/sbin/ - $(INSTALL_BIN) ./files/blockd.init $(1)/etc/init.d/blockd -endef - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ @@ -118,4 +106,3 @@ endef $(eval $(call BuildPackage,fstools)) $(eval $(call BuildPackage,snapshot-tool)) $(eval $(call BuildPackage,block-mount)) -$(eval $(call BuildPackage,blockd)) diff --git a/package/system/fstools/files/blockd.init b/package/system/fstools/files/blockd.init deleted file mode 100755 index a4ce57d40..000000000 --- a/package/system/fstools/files/blockd.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=80 - -USE_PROCD=1 -PROG=/sbin/blockd - -service_triggers() { - procd_add_reload_trigger "fstab" -} - -reload_service() { - block autofs start -} - -start_service() { - procd_open_instance - procd_set_param command "$PROG" - procd_set_param respawn - procd_close_instance -} diff --git a/package/system/fstools/files/snapshot b/package/system/fstools/files/snapshot index a495e3434..c1a5b733f 100644 --- a/package/system/fstools/files/snapshot +++ b/package/system/fstools/files/snapshot @@ -42,7 +42,7 @@ do_snapshot_upgrade() { opkg list-upgradable [ $? -eq 0 ] || exit 2 - + UPDATES=`opkg list-upgradable | cut -d" " -f1` [ -z "${UPDATES}" ] && exit 0 @@ -64,16 +64,14 @@ do_convert_jffs2() { do_convert() { . /lib/functions.sh . /lib/upgrade/common.sh - + ubus call system upgrade + touch /tmp/sysupgrade cd /overlay/upper tar czf /tmp/snapshot.tar.gz * - - install_bin /sbin/upgraded - ubus call system sysupgrade "{ - \"prefix\": \"$RAM_ROOT\", - \"path\": \"\", - \"command\": \". /sbin/snapshot; do_convert_jffs2\" - }" + kill_remaining TERM + sleep 3 + kill_remaining KILL + run_ramfs '. /sbin/snapshot; do_convert_jffs2' } [ -n "$(cat /proc/mounts|grep /overlay|grep jffs2)" ] && { diff --git a/package/system/mountd/Makefile b/package/system/mountd/Makefile new file mode 100644 index 000000000..37367abd0 --- /dev/null +++ b/package/system/mountd/Makefile @@ -0,0 +1,45 @@ +# Copyright (C) 2009-2012 OpenWrt.org +# All rights reserved. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mountd +PKG_RELEASE:=3 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=$(LEDE_GIT)/project/mountd.git +PKG_SOURCE_DATE:=2017-11-09 +PKG_SOURCE_VERSION:=7826ca5d6aca691dcb6f98ab203a090d42e79337 +PKG_MIRROR_HASH:=6fda7666a99974ac9179b102f6e8027f6c4091be9b49e1eed49dee7442d83206 +CMAKE_INSTALL:=1 + +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=GPL-2.0 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/mountd + SECTION:=utils + CATEGORY:=Utilities + TITLE:=OpenWrt automount daemon + DEPENDS:=+uci +kmod-fs-autofs4 + URL:=http://www.openwrt.org +endef + +define Package/mountd/description + openwrt automount daemon +endef + +define Package/mountd/conffiles +/etc/config/mountd +endef + +define Package/mountd/install + $(INSTALL_DIR) $(1)/sbin/ $(1)/etc/config/ $(1)/etc/init.d/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mountd $(1)/sbin/ + $(INSTALL_DATA) ./files/mountd.config $(1)/etc/config/mountd + $(INSTALL_BIN) ./files/mountd.init $(1)/etc/init.d/mountd +endef + +$(eval $(call BuildPackage,mountd)) diff --git a/package/system/mountd/files/mountd.config b/package/system/mountd/files/mountd.config new file mode 100644 index 000000000..561012950 --- /dev/null +++ b/package/system/mountd/files/mountd.config @@ -0,0 +1,3 @@ +config mountd mountd + option timeout 60 + option path /tmp/mounts/ diff --git a/package/system/mountd/files/mountd.init b/package/system/mountd/files/mountd.init new file mode 100755 index 000000000..772bd6ed5 --- /dev/null +++ b/package/system/mountd/files/mountd.init @@ -0,0 +1,22 @@ +#!/bin/sh /etc/rc.common + +START=80 + +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 +SERVICE_PID_FILE=/var/run/mountd.pid + +MOUNTD_BIN=/sbin/mountd + +start() +{ + P="$(uci get mountd.mountd.path)" + [ -n "$P" -a ! -f "$P" ] && mkdir -p $P + + service_start $MOUNTD_BIN -f +} + +stop() +{ + service_stop $MOUNTD_BIN +} diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index f00e574de..876a72d01 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -1,32 +1,32 @@ # # Copyright (C) 2006-2015 OpenWrt.org -# Copyright (C) 2016-2017 LEDE Project +# Copyright (C) 2016 LEDE Project # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/version.mk +include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=opkg -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_FLAGS:=essential PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git -PKG_SOURCE_DATE:=2017-12-07 -PKG_SOURCE_VERSION:=3b417b9f41b4ceb5912d82f867dd5534e5675b5c -PKG_MIRROR_HASH:=1c9c21e56186345d0034d15051c1d9c5ebb5aa6658d6ae8886d8403207a914a3 +PKG_SOURCE_URL:=https://git.lede-project.org/project/opkg-lede.git +PKG_SOURCE_DATE:=2017-12-08 +PKG_SOURCE_VERSION:=9f61f7acf3845d2e09675b49fec5d783d57eb780 +PKG_MIRROR_HASH:=3e70d78e92f73e0848a75cfd74762656a4172b6d71369b9e2717dc57acf39cbf PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Jo-Philipp Wich -# Extend depends from version.mk -PKG_CONFIG_DEPENDS += \ - CONFIG_SIGNED_PACKAGES \ - CONFIG_TARGET_INIT_PATH +PKG_FLAGS := nonshared +PKG_CONFIG_DEPENDS := CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 @@ -43,7 +43,7 @@ define Package/opkg CATEGORY:=Base system TITLE:=opkg package manager DEPENDS:=+uclient-fetch +libpthread +libubox - URL:=$(PKG_SOURCE_URL) + URL:=https://git.lede-project.org/?p=project/opkg-lede.git MENU:=1 endef @@ -86,6 +86,8 @@ define Package/opkg/install $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_DATA) ./files/customfeeds.conf $(1)/etc/opkg/customfeeds.conf $(INSTALL_DATA) ./files/opkg$(2).conf $(1)/etc/opkg.conf + $(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf) + $(VERSION_SED) $(1)/etc/opkg/distfeeds.conf $(INSTALL_BIN) ./files/20_migrate-feeds $(1)/etc/uci-defaults/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg ifneq ($(CONFIG_SIGNED_PACKAGES),) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 7c8a1669b..c260a371a 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=procd -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/procd.git -PKG_SOURCE_DATE:=2018-12-02 -PKG_SOURCE_VERSION:=a5954cf302fe46d8e29770c818336763112b9a6e -PKG_MIRROR_HASH:=1afa1f0160dd8ffac310e75519601c1f9a6107d818f405bb3fe9ef3e7143c2e3 +PKG_SOURCE_DATE:=2018-01-04 +PKG_SOURCE_VERSION:=188353099cf6fc88f145cfcb84a4db3f6523528a +PKG_MIRROR_HASH:=52605b2a3caf59cdbf88ba218c6288cbe075749422efd69e985ae75bb1001488 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -22,9 +22,11 @@ PKG_LICENSE_FILES:= PKG_MAINTAINER:=John Crispin +PKG_FLAGS:=nonshared + PKG_CONFIG_DEPENDS:= \ CONFIG_TARGET_INIT_PATH CONFIG_KERNEL_SECCOMP \ - CONFIG_PROCD_SHOW_BOOT CONFIG_PROCD_ZRAM_TMPFS \ + CONFIG_NAND_SUPPORT CONFIG_PROCD_SHOW_BOOT CONFIG_PROCD_ZRAM_TMPFS \ CONFIG_KERNEL_NAMESPACES CONFIG_PACKAGE_procd-ujail CONFIG_PACKAGE_procd-seccomp include $(INCLUDE_DIR)/package.mk @@ -40,7 +42,7 @@ TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt) define Package/procd SECTION:=base CATEGORY:=Base system - DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_GLIBC:librt +libubox +libubus + DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_GLIBC:librt +libubox +libubus +NAND_SUPPORT:procd-nand TITLE:=OpenWrt system process manager endef @@ -58,6 +60,20 @@ define Package/procd-seccomp TITLE:=OpenWrt process seccomp helper + utrace endef +define Package/procd-nand + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@NAND_SUPPORT +ubi-utils + TITLE:=OpenWrt sysupgrade nand helper +endef + +define Package/procd-nand-firstboot + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=procd-nand + TITLE:=OpenWrt firstboot nand helper +endef + define Package/procd/config menu "Configuration" depends on PACKAGE_procd @@ -75,6 +91,10 @@ endmenu endef +ifeq ($(CONFIG_NAND_SUPPORT),y) + CMAKE_OPTIONS += -DBUILD_UPGRADED=1 +endif + ifeq ($(CONFIG_PROCD_SHOW_BOOT),y) CMAKE_OPTIONS += -DSHOW_BOOT_ON_CONSOLE=1 endif @@ -93,7 +113,7 @@ CMAKE_OPTIONS += -DSECCOMP_SUPPORT=$(SECCOMP) -DUTRACE_SUPPORT=$(SECCOMP) define Package/procd/install $(INSTALL_DIR) $(1)/sbin $(1)/etc $(1)/lib/functions - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{init,procd,askfirst,udevtrigger,upgraded} $(1)/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{init,procd,askfirst,udevtrigger} $(1)/sbin/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libsetlbf.so $(1)/lib $(INSTALL_BIN) ./files/reload_config $(1)/sbin/ $(INSTALL_DATA) ./files/hotplug*.json $(1)/etc/ @@ -109,10 +129,25 @@ define Package/procd-seccomp/install $(INSTALL_DIR) $(1)/sbin $(1)/lib $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libpreload-seccomp.so $(1)/lib $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/utrace $(1)/sbin/ - $(LN) utrace $(1)/sbin/seccomp-trace + ln -s utrace $(1)/sbin/seccomp-trace $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libpreload-trace.so $(1)/lib endef +define Package/procd-nand/install + $(INSTALL_DIR) $(1)/sbin $(1)/lib/upgrade + + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upgraded $(1)/sbin/ + $(INSTALL_DATA) ./files/nand.sh $(1)/lib/upgrade/ +endef + +define Package/procd-nand-firstboot/install + $(INSTALL_DIR) $(1)/lib/preinit + + $(INSTALL_DATA) ./files/nand-preinit.sh $(1)/lib/preinit/60-nand-firstboot.sh +endef + $(eval $(call BuildPackage,procd)) $(eval $(call BuildPackage,procd-ujail)) $(eval $(call BuildPackage,procd-seccomp)) +$(eval $(call BuildPackage,procd-nand)) +$(eval $(call BuildPackage,procd-nand-firstboot)) diff --git a/package/system/procd/files/hotplug-preinit.json b/package/system/procd/files/hotplug-preinit.json index 658c68547..58afc6c69 100644 --- a/package/system/procd/files/hotplug-preinit.json +++ b/package/system/procd/files/hotplug-preinit.json @@ -8,11 +8,11 @@ [ "load-firmware", "/lib/firmware" ], [ "return" ] ] - ] - ] - } ], + ], + ], + }, ], [ "if", [ "eq", "SUBSYSTEM", "button" ], [ "exec", "/etc/rc.button/failsafe" ] - ] + ], ] diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json index 1c949bbea..e5f8d967e 100644 --- a/package/system/procd/files/hotplug.json +++ b/package/system/procd/files/hotplug.json @@ -4,27 +4,27 @@ [ "if", [ "and", [ "has", "MAJOR" ], - [ "has", "MINOR" ] + [ "has", "MINOR" ], ], [ [ "if", [ "eq", "DEVNAME", - [ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ] + [ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ], ], [ [ "makedev", "/dev/%DEVNAME%", "0666" ], - [ "return" ] + [ "return" ], ] ], [ "if", [ "regex", "DEVNAME", "^snd" ], - [ "makedev", "/dev/%DEVNAME%", "0660", "audio" ] + [ "makedev", "/dev/%DEVNAME%", "0660", "audio" ], ], [ "if", [ "has", "DEVNAME" ], - [ "makedev", "/dev/%DEVNAME%", "0600" ] - ] - ] + [ "makedev", "/dev/%DEVNAME%", "0600" ], + ], + ], ], [ "if", [ "has", "FIRMWARE" ], @@ -33,14 +33,14 @@ [ "load-firmware", "/lib/firmware" ], [ "return" ] ] - ] + ], ], "remove" : [ [ "if", [ "and", [ "has", "DEVNAME" ], [ "has", "MAJOR" ], - [ "has", "MINOR" ] + [ "has", "MINOR" ], ], [ "rm", "/dev/%DEVNAME%" ] ] @@ -49,7 +49,7 @@ [ "if", [ "and", [ "has", "BUTTON" ], - [ "eq", "SUBSYSTEM", "button" ] + [ "eq", "SUBSYSTEM", "button" ], ], [ "button", "/etc/rc.button/%BUTTON%" ] ], @@ -65,5 +65,5 @@ [ "isdir", "/etc/hotplug.d/%SUBSYSTEM%" ], [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ] ] - ] + ], ] diff --git a/package/system/procd/files/nand-preinit.sh b/package/system/procd/files/nand-preinit.sh new file mode 100644 index 000000000..cf596246d --- /dev/null +++ b/package/system/procd/files/nand-preinit.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Copyright (C) 2014 OpenWrt.org + +nand_takeover() { + . /lib/upgrade/nand.sh + mtd=$(find_mtd_index "$CI_UBIPART") + esize=$(cat /proc/mtd | grep mtd$mtd |cut -d" " -f 3) + [ -z "$esize" ] && return 1 + esize=$(printf "%d" 0x$esize) + for a in `seq 0 64`; do + mtd -o $((a * esize)) -l 400 dump /dev/mtd$mtd > /tmp/takeover.hdr + MAGIC=$(dd if=/tmp/takeover.hdr bs=1 skip=261 count=5 2> /dev/null) + SIZE=$(printf "%d" 0x$(dd if=/tmp/takeover.hdr bs=4 count=1 2> /dev/null | hexdump -v -n 4 -e '1/1 "%02x"')) + [ "$MAGIC" = "ustar" ] && { + mtd -o $((a * esize)) -l $((SIZE + 4)) dump /dev/mtd$mtd | dd bs=1 skip=4 of=/tmp/sysupgrade.tar + nand_do_upgrade_stage2 /tmp/sysupgrade.tar + } + done +} + +boot_hook_add initramfs nand_takeover diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/system/procd/files/nand.sh similarity index 79% rename from package/base-files/files/lib/upgrade/nand.sh rename to package/system/procd/files/nand.sh index 42f488c11..ebaaf2aa1 100644 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/system/procd/files/nand.sh @@ -5,10 +5,10 @@ . /lib/functions.sh # 'kernel' partition on NAND contains the kernel -CI_KERNPART="${CI_KERNPART:-kernel}" +CI_KERNPART="kernel" # 'ubi' partition on NAND contains UBI -CI_UBIPART="${CI_UBIPART:-ubi}" +CI_UBIPART="ubi" ubi_mknod() { local dir="$1" @@ -142,7 +142,7 @@ nand_upgrade_prepare_ubi() { } fi - local kern_ubivol="$( nand_find_volume $ubidev $CI_KERNPART )" + local kern_ubivol="$( nand_find_volume $ubidev kernel )" local root_ubivol="$( nand_find_volume $ubidev rootfs )" local data_ubivol="$( nand_find_volume $ubidev rootfs_data )" @@ -157,13 +157,13 @@ nand_upgrade_prepare_ubi() { fi # kill volumes - [ "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N $CI_KERNPART || true + [ "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N kernel || true [ "$root_ubivol" ] && ubirmvol /dev/$ubidev -N rootfs || true [ "$data_ubivol" ] && ubirmvol /dev/$ubidev -N rootfs_data || true # update kernel if [ "$has_kernel" = "1" ]; then - if ! ubimkvol /dev/$ubidev -N $CI_KERNPART -s $kernel_length; then + if ! ubimkvol /dev/$ubidev -N kernel -s $kernel_length; then echo "cannot create kernel volume" return 1; fi @@ -194,7 +194,7 @@ nand_upgrade_prepare_ubi() { nand_do_upgrade_success() { local conf_tar="/tmp/sysupgrade.tgz" - + sync [ -f "$conf_tar" ] && nand_restore_config "$conf_tar" echo "sysupgrade successful" @@ -231,7 +231,7 @@ nand_upgrade_ubifs() { local rootfs_length=`(cat $1 | wc -c) 2> /dev/null` nand_upgrade_prepare_ubi "$rootfs_length" "ubifs" "0" "0" - + local ubidev="$( nand_find_ubi "$CI_UBIPART" )" local root_ubivol="$(nand_find_volume $ubidev rootfs)" ubiupdatevol /dev/$root_ubivol -s $rootfs_length $1 @@ -239,23 +239,30 @@ nand_upgrade_ubifs() { nand_do_upgrade_success } +nand_board_name() { + if type 'platform_nand_board_name' >/dev/null 2>/dev/null; then + platform_nand_board_name + return + fi + + cat /tmp/sysinfo/board_name +} + nand_upgrade_tar() { local tar_file="$1" + local board_name="$(nand_board_name)" local kernel_mtd="$(find_mtd_index $CI_KERNPART)" - local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') - board_dir=${board_dir%/} + local kernel_length=`(tar xf $tar_file sysupgrade-$board_name/kernel -O | wc -c) 2> /dev/null` + local rootfs_length=`(tar xf $tar_file sysupgrade-$board_name/root -O | wc -c) 2> /dev/null` - local kernel_length=`(tar xf $tar_file ${board_dir}/kernel -O | wc -c) 2> /dev/null` - local rootfs_length=`(tar xf $tar_file ${board_dir}/root -O | wc -c) 2> /dev/null` - - local rootfs_type="$(identify_tar "$tar_file" ${board_dir}/root)" + local rootfs_type="$(identify_tar "$tar_file" sysupgrade-$board_name/root)" local has_kernel=1 local has_env=0 [ "$kernel_length" != 0 -a -n "$kernel_mtd" ] && { - tar xf $tar_file ${board_dir}/kernel -O | mtd write - $CI_KERNPART + tar xf $tar_file sysupgrade-$board_name/kernel -O | mtd write - $CI_KERNPART } [ "$kernel_length" = 0 -o ! -z "$kernel_mtd" ] && has_kernel=0 @@ -263,29 +270,20 @@ nand_upgrade_tar() { local ubidev="$( nand_find_ubi "$CI_UBIPART" )" [ "$has_kernel" = "1" ] && { - local kern_ubivol="$(nand_find_volume $ubidev $CI_KERNPART)" - tar xf $tar_file ${board_dir}/kernel -O | \ + local kern_ubivol="$(nand_find_volume $ubidev kernel)" + tar xf $tar_file sysupgrade-$board_name/kernel -O | \ ubiupdatevol /dev/$kern_ubivol -s $kernel_length - } local root_ubivol="$(nand_find_volume $ubidev rootfs)" - tar xf $tar_file ${board_dir}/root -O | \ + tar xf $tar_file sysupgrade-$board_name/root -O | \ ubiupdatevol /dev/$root_ubivol -s $rootfs_length - nand_do_upgrade_success } # Recognize type of passed file and start the upgrade process -nand_do_upgrade() { - if [ -n "$IS_PRE_UPGRADE" ]; then - # Previously, nand_do_upgrade was called from the platform_pre_upgrade - # hook; this piece of code handles scripts that haven't been - # updated. All scripts should gradually move to call nand_do_upgrade - # from platform_do_upgrade instead. - export do_upgrade="nand_do_upgrade '$1'" - return - fi - +nand_do_upgrade_stage2() { local file_type=$(identify $1) if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then @@ -301,6 +299,45 @@ nand_do_upgrade() { esac } +nand_upgrade_stage2() { + [ $1 = "nand" ] && { + [ -f "$2" ] && { + touch /tmp/sysupgrade + + killall -9 telnetd + killall -9 dropbear + killall -9 ash + + kill_remaining TERM + sleep 3 + kill_remaining KILL + + sleep 1 + + if [ -n "$(rootfs_type)" ]; then + v "Switching to ramdisk..." + run_ramfs ". /lib/functions.sh; include /lib/upgrade; nand_do_upgrade_stage2 $2" + else + nand_do_upgrade_stage2 $2 + fi + return 0 + } + echo "Nand upgrade failed" + exit 1 + } +} + +nand_upgrade_stage1() { + [ -f /tmp/sysupgrade-nand-path ] && { + path="$(cat /tmp/sysupgrade-nand-path)" + [ "$SAVE_CONFIG" != 1 -a -f "$CONF_TAR" ] && + rm $CONF_TAR + + ubus call system nandupgrade "{\"path\": \"$path\" }" + exit 0 + } +} + # Check if passed file is a valid one for NAND sysupgrade. Currently it accepts # 3 types of files: # 1) UBI - should contain an ubinized image, header is checked for the proper @@ -327,3 +364,12 @@ nand_do_platform_check() { return 0 } + +# Start NAND upgrade process +# +# $(1): file to be used for upgrade +nand_do_upgrade() { + echo -n $1 > /tmp/sysupgrade-nand-path + cp /sbin/upgraded /tmp/ + nand_upgrade_stage1 +} diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index b4b6faa66..e6ca8a6bc 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -38,20 +38,6 @@ PROCD_RELOAD_DELAY=1000 _PROCD_SERVICE= -procd_lock() { - local basescript=$(readlink "$initscript") - local service_name="$(basename ${basescript:-$initscript})" - - flock -n 1000 &> /dev/null - if [ "$?" != "0" ]; then - exec 1000>/var/lock/procd_${service_name}.lock - flock 1000 - if [ "$?" != "0" ]; then - logger "warning: procd flock for $service_name failed" - fi - fi -} - _procd_call() { local old_cb @@ -61,7 +47,6 @@ _procd_call() { } _procd_wrapper() { - procd_lock while [ -n "$1" ]; do eval "$1() { _procd_call _$1 \"\$@\"; }" shift @@ -94,9 +79,6 @@ _procd_close_service() { _procd_open_trigger service_triggers _procd_close_trigger - _procd_open_data - service_data - _procd_close_data _procd_ubus_call ${1:-set} } @@ -152,18 +134,6 @@ _procd_close_trigger() { json_close_array } -_procd_open_data() { - let '_procd_data_open = _procd_data_open + 1' - [ "$_procd_data_open" -gt 1 ] && return - json_add_object "data" -} - -_procd_close_data() { - let '_procd_data_open = _procd_data_open - 1' - [ "$_procd_data_open" -lt 1 ] || return - json_close_object -} - _procd_open_validate() { json_select .. json_add_array "validate" @@ -243,7 +213,7 @@ _procd_set_param() { json_add_string "" "$@" json_close_array ;; - nice|term_timeout) + nice) json_add_int "$type" "$1" ;; reload_signal) @@ -413,10 +383,6 @@ _procd_send_signal() { local instance="$2" local signal="$3" - case "$signal" in - [A-Z]*) signal="$(kill -l "$signal" 2>/dev/null)" || return 1;; - esac - json_init json_add_string name "$service" [ -n "$instance" -a "$instance" != "*" ] && json_add_string instance "$instance" diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index 21119ee6d..3c9b4aa51 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/ubox.git -PKG_SOURCE_DATE:=2017-11-06 -PKG_SOURCE_VERSION:=2c0d9cfe05e9712d44622c6bb4558e97359bfb76 -PKG_MIRROR_HASH:=e545a29959a310fd7243ee2e799bf9f759894ea4e872010a781c3a65290377b6 +PKG_SOURCE_DATE:=2017-03-10 +PKG_SOURCE_VERSION:=16f7e16181e2f3e9cf3e2ce56a7e291844900d09 +PKG_MIRROR_HASH:=5f10f3df134eb8a69d281a73d39f5d2e2fc96af531a2f3960b0c6116ff11a707 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -41,11 +41,11 @@ define Package/ubox/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib - $(LN) kmodloader $(1)/sbin/rmmod - $(LN) kmodloader $(1)/sbin/insmod - $(LN) kmodloader $(1)/sbin/lsmod - $(LN) kmodloader $(1)/sbin/modinfo - $(LN) kmodloader $(1)/sbin/modprobe + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/insmod + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/lsmod + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/modinfo + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/modprobe endef define Package/logd/install diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index ce8b054b4..4f3d4e830 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2017-11-13 -PKG_SOURCE_VERSION:=5f87f5480ebf004d735dbf44259d08cf8affd305 -PKG_MIRROR_HASH:=a490348da86c6cdf0cbc8cc01b77fa6f708d86b94674fd312e0c822ca3d7eba0 +PKG_SOURCE_DATE:=2017-02-18 +PKG_SOURCE_VERSION:=34c6e818e431cc53478a0f7c7c1eca07d194d692 +PKG_MIRROR_HASH:=fc4f1121faa4f5b8fa52ee25460b98b2e60e7d245aefa70e7f76c56ce5628fd5 CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index d4718ee90..04dfd8335 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -14,8 +14,8 @@ PKG_RELEASE:=1 PKG_SOURCE_URL=$(LEDE_GIT)/project/uci.git PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE=2018-01-01 -PKG_SOURCE_VERSION:=5beb95da3dbec6db11a6bdfaab7807ee2daf41e6 -PKG_MIRROR_HASH:=123c5d3ed8f86db76ab52584e952c8e870891bca4dab682b753ca384d7d067bf +PKG_SOURCE_VERSION:=141b64ef84f43c954e665865b1bbf216fbf7c05f +PKG_MIRROR_HASH:=fbd837a16cfa6b0d80f5a4b332b86a105a2b9d37480bcc777931fdea7ce601c9 PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:= diff --git a/package/system/uci/files/lib/config/uci.sh b/package/system/uci/files/lib/config/uci.sh index 78ec27766..50891a64e 100644 --- a/package/system/uci/files/lib/config/uci.sh +++ b/package/system/uci/files/lib/config/uci.sh @@ -118,10 +118,9 @@ uci_add() { uci_rename() { local PACKAGE="$1" local CONFIG="$2" - local OPTION="$3" - local VALUE="$4" + local VALUE="$3" - /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} rename "$PACKAGE.$CONFIG${VALUE:+.$OPTION}=${VALUE:-$OPTION}" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} rename "$PACKAGE.$CONFIG=$VALUE" } uci_remove() { diff --git a/package/utils/adb/Makefile b/package/utils/adb/Makefile index c42c94d3a..086169652 100644 --- a/package/utils/adb/Makefile +++ b/package/utils/adb/Makefile @@ -28,7 +28,7 @@ define Package/adb DEPENDS:=+zlib +libopenssl +libpthread endef -define Package/adb/description +define Package/bridge/description Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. endef diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index 4e429f437..1977e7ff4 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -7,9 +7,6 @@ config BUSYBOX_DEFAULT_DESKTOP config BUSYBOX_DEFAULT_EXTRA_COMPAT bool default n -config BUSYBOX_DEFAULT_FEDORA_COMPAT - bool - default n config BUSYBOX_DEFAULT_INCLUDE_SUSv2 bool default y @@ -19,6 +16,15 @@ config BUSYBOX_DEFAULT_USE_PORTABLE_CODE config BUSYBOX_DEFAULT_PLATFORM_LINUX bool default y +config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC + bool + default n +config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK + bool + default y +config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS + bool + default n config BUSYBOX_DEFAULT_SHOW_USAGE bool default y @@ -37,9 +43,45 @@ config BUSYBOX_DEFAULT_FEATURE_INSTALLER config BUSYBOX_DEFAULT_INSTALL_NO_USR bool default n +config BUSYBOX_DEFAULT_LOCALE_SUPPORT + bool + default n +config BUSYBOX_DEFAULT_UNICODE_SUPPORT + bool + default n +config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV + bool + default n +config BUSYBOX_DEFAULT_SUBST_WCHAR + int + default 0 +config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR + int + default 0 +config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS + bool + default n +config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS + bool + default n +config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT + bool + default n +config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE + bool + default n +config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN + bool + default n config BUSYBOX_DEFAULT_PAM bool default n +config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE + bool + default n config BUSYBOX_DEFAULT_LONG_OPTS bool default y @@ -121,30 +163,6 @@ config BUSYBOX_DEFAULT_EXTRA_LDFLAGS config BUSYBOX_DEFAULT_EXTRA_LDLIBS string default "" -config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS - bool - default y -config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS - bool - default n -config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS - bool - default n -config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT - bool - default n -config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK - bool - default n -config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK - bool - default n -config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER - bool - default n -config BUSYBOX_DEFAULT_PREFIX - string - default "./_install" config BUSYBOX_DEFAULT_DEBUG bool default n @@ -169,21 +187,36 @@ config BUSYBOX_DEFAULT_DMALLOC config BUSYBOX_DEFAULT_EFENCE bool default n +config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS + bool + default y +config BUSYBOX_DEFAULT_INSTALL_APPLET_HARDLINKS + bool + default n +config BUSYBOX_DEFAULT_INSTALL_APPLET_SCRIPT_WRAPPERS + bool + default n +config BUSYBOX_DEFAULT_INSTALL_APPLET_DONT + bool + default n +config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SYMLINK + bool + default n +config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_HARDLINK + bool + default n +config BUSYBOX_DEFAULT_INSTALL_SH_APPLET_SCRIPT_WRAPPER + bool + default n +config BUSYBOX_DEFAULT_PREFIX + string + default "./_install" config BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL bool default n config BUSYBOX_DEFAULT_FEATURE_RTMINMAX bool default n -config BUSYBOX_DEFAULT_FEATURE_BUFFERS_USE_MALLOC - bool - default n -config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK - bool - default y -config BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_IN_BSS - bool - default n config BUSYBOX_DEFAULT_PASSWORD_MINLEN int default 6 @@ -199,6 +232,9 @@ config BUSYBOX_DEFAULT_FEATURE_FAST_TOP config BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS bool default n +config BUSYBOX_DEFAULT_FEATURE_USE_TERMIOS + bool + default n config BUSYBOX_DEFAULT_FEATURE_EDITING bool default y @@ -232,48 +268,12 @@ config BUSYBOX_DEFAULT_FEATURE_EDITING_FANCY_PROMPT config BUSYBOX_DEFAULT_FEATURE_EDITING_ASK_TERMINAL bool default n -config BUSYBOX_DEFAULT_LOCALE_SUPPORT - bool - default n -config BUSYBOX_DEFAULT_UNICODE_SUPPORT - bool - default n -config BUSYBOX_DEFAULT_UNICODE_USING_LOCALE - bool - default n -config BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV - bool - default n -config BUSYBOX_DEFAULT_SUBST_WCHAR - int - default 0 -config BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR - int - default 0 -config BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS - bool - default n -config BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS - bool - default n -config BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT - bool - default n -config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE - bool - default n -config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN - bool - default n config BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP bool default y config BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE bool default n -config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE - bool - default y config BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB int default 4 @@ -319,34 +319,22 @@ config BUSYBOX_DEFAULT_UNCOMPRESS config BUSYBOX_DEFAULT_GUNZIP bool default y -config BUSYBOX_DEFAULT_ZCAT - bool - default y config BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS bool default n config BUSYBOX_DEFAULT_BUNZIP2 bool default y -config BUSYBOX_DEFAULT_BZCAT - bool - default y config BUSYBOX_DEFAULT_UNLZMA bool default n -config BUSYBOX_DEFAULT_LZCAT - bool - default n -config BUSYBOX_DEFAULT_LZMA - bool - default n config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST bool default n -config BUSYBOX_DEFAULT_UNXZ +config BUSYBOX_DEFAULT_LZMA bool default n -config BUSYBOX_DEFAULT_XZCAT +config BUSYBOX_DEFAULT_UNXZ bool default n config BUSYBOX_DEFAULT_XZ @@ -355,9 +343,6 @@ config BUSYBOX_DEFAULT_XZ config BUSYBOX_DEFAULT_BZIP2 bool default n -config BUSYBOX_DEFAULT_FEATURE_BZIP2_DECOMPRESS - bool - default y config BUSYBOX_DEFAULT_CPIO bool default n @@ -373,6 +358,9 @@ config BUSYBOX_DEFAULT_DPKG config BUSYBOX_DEFAULT_DPKG_DEB bool default n +config BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY + bool + default n config BUSYBOX_DEFAULT_GZIP bool default y @@ -385,18 +373,9 @@ config BUSYBOX_DEFAULT_GZIP_FAST config BUSYBOX_DEFAULT_FEATURE_GZIP_LEVELS bool default n -config BUSYBOX_DEFAULT_FEATURE_GZIP_DECOMPRESS - bool - default y config BUSYBOX_DEFAULT_LZOP bool default n -config BUSYBOX_DEFAULT_UNLZOP - bool - default n -config BUSYBOX_DEFAULT_LZOPCAT - bool - default n config BUSYBOX_DEFAULT_LZOP_COMPR_HIGH bool default n @@ -445,25 +424,109 @@ config BUSYBOX_DEFAULT_FEATURE_TAR_SELINUX config BUSYBOX_DEFAULT_UNZIP bool default n -config BUSYBOX_DEFAULT_FEATURE_UNZIP_CDF - bool - default n -config BUSYBOX_DEFAULT_FEATURE_UNZIP_BZIP2 - bool - default n -config BUSYBOX_DEFAULT_FEATURE_UNZIP_LZMA - bool - default n -config BUSYBOX_DEFAULT_FEATURE_UNZIP_XZ - bool - default n config BUSYBOX_DEFAULT_BASENAME bool default y config BUSYBOX_DEFAULT_CAT bool default y -config BUSYBOX_DEFAULT_FEATURE_CATV +config BUSYBOX_DEFAULT_DATE + bool + default y +config BUSYBOX_DEFAULT_FEATURE_DATE_ISOFMT + bool + default y +config BUSYBOX_DEFAULT_FEATURE_DATE_NANO + bool + default n +config BUSYBOX_DEFAULT_FEATURE_DATE_COMPAT + bool + default n +config BUSYBOX_DEFAULT_DD + bool + default y +config BUSYBOX_DEFAULT_FEATURE_DD_SIGNAL_HANDLING + bool + default y +config BUSYBOX_DEFAULT_FEATURE_DD_THIRD_STATUS_LINE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS + bool + default y +config BUSYBOX_DEFAULT_FEATURE_DD_STATUS + bool + default n +config BUSYBOX_DEFAULT_HOSTID + bool + default n +config BUSYBOX_DEFAULT_ID + bool + default y +config BUSYBOX_DEFAULT_GROUPS + bool + default n +config BUSYBOX_DEFAULT_SHUF + bool + default n +config BUSYBOX_DEFAULT_STAT + bool + default n +config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT + bool + default n +config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM + bool + default n +config BUSYBOX_DEFAULT_SYNC + bool + default y +config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY + bool + default n +config BUSYBOX_DEFAULT_TEST + bool + default y +config BUSYBOX_DEFAULT_FEATURE_TEST_64 + bool + default y +config BUSYBOX_DEFAULT_TOUCH + bool + default y +config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF + bool + default n +config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3 + bool + default y +config BUSYBOX_DEFAULT_TR + bool + default y +config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES + bool + default n +config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV + bool + default n +config BUSYBOX_DEFAULT_TRUNCATE + bool + default n +config BUSYBOX_DEFAULT_UNLINK + bool + default n +config BUSYBOX_DEFAULT_BASE64 + bool + default n +config BUSYBOX_DEFAULT_WHO + bool + default n +config BUSYBOX_DEFAULT_USERS + bool + default n +config BUSYBOX_DEFAULT_CAL + bool + default n +config BUSYBOX_DEFAULT_CATV bool default n config BUSYBOX_DEFAULT_CHGRP @@ -496,33 +559,6 @@ config BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS config BUSYBOX_DEFAULT_CUT bool default y -config BUSYBOX_DEFAULT_DATE - bool - default y -config BUSYBOX_DEFAULT_FEATURE_DATE_ISOFMT - bool - default y -config BUSYBOX_DEFAULT_FEATURE_DATE_NANO - bool - default n -config BUSYBOX_DEFAULT_FEATURE_DATE_COMPAT - bool - default n -config BUSYBOX_DEFAULT_DD - bool - default y -config BUSYBOX_DEFAULT_FEATURE_DD_SIGNAL_HANDLING - bool - default y -config BUSYBOX_DEFAULT_FEATURE_DD_THIRD_STATUS_LINE - bool - default n -config BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS - bool - default y -config BUSYBOX_DEFAULT_FEATURE_DD_STATUS - bool - default n config BUSYBOX_DEFAULT_DF bool default y @@ -562,21 +598,12 @@ config BUSYBOX_DEFAULT_EXPAND config BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS bool default n -config BUSYBOX_DEFAULT_UNEXPAND - bool - default n -config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS - bool - default n config BUSYBOX_DEFAULT_EXPR bool default y config BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64 bool default y -config BUSYBOX_DEFAULT_FACTOR - bool - default n config BUSYBOX_DEFAULT_FALSE bool default y @@ -592,24 +619,12 @@ config BUSYBOX_DEFAULT_HEAD config BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD bool default y -config BUSYBOX_DEFAULT_HOSTID - bool - default n -config BUSYBOX_DEFAULT_ID - bool - default y -config BUSYBOX_DEFAULT_GROUPS - bool - default n config BUSYBOX_DEFAULT_INSTALL bool default n config BUSYBOX_DEFAULT_FEATURE_INSTALL_LONG_OPTIONS bool default n -config BUSYBOX_DEFAULT_LINK - bool - default n config BUSYBOX_DEFAULT_LN bool default y @@ -628,9 +643,6 @@ config BUSYBOX_DEFAULT_FEATURE_LS_FOLLOWLINKS config BUSYBOX_DEFAULT_FEATURE_LS_RECURSIVE bool default y -config BUSYBOX_DEFAULT_FEATURE_LS_WIDTH - bool - default y config BUSYBOX_DEFAULT_FEATURE_LS_SORTFILES bool default y @@ -649,21 +661,6 @@ config BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT config BUSYBOX_DEFAULT_MD5SUM bool default y -config BUSYBOX_DEFAULT_SHA1SUM - bool - default n -config BUSYBOX_DEFAULT_SHA256SUM - bool - default y -config BUSYBOX_DEFAULT_SHA512SUM - bool - default n -config BUSYBOX_DEFAULT_SHA3SUM - bool - default n -config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK - bool - default y config BUSYBOX_DEFAULT_MKDIR bool default y @@ -685,21 +682,12 @@ config BUSYBOX_DEFAULT_FEATURE_MV_LONG_OPTIONS config BUSYBOX_DEFAULT_NICE bool default y -config BUSYBOX_DEFAULT_NL - bool - default n config BUSYBOX_DEFAULT_NOHUP bool default n -config BUSYBOX_DEFAULT_NPROC - bool - default n config BUSYBOX_DEFAULT_OD bool default n -config BUSYBOX_DEFAULT_PASTE - bool - default n config BUSYBOX_DEFAULT_PRINTENV bool default n @@ -730,10 +718,16 @@ config BUSYBOX_DEFAULT_FEATURE_RMDIR_LONG_OPTIONS config BUSYBOX_DEFAULT_SEQ bool default y -config BUSYBOX_DEFAULT_SHRED +config BUSYBOX_DEFAULT_SHA1SUM bool default n -config BUSYBOX_DEFAULT_SHUF +config BUSYBOX_DEFAULT_SHA256SUM + bool + default y +config BUSYBOX_DEFAULT_SHA512SUM + bool + default n +config BUSYBOX_DEFAULT_SHA3SUM bool default n config BUSYBOX_DEFAULT_SLEEP @@ -757,27 +751,12 @@ config BUSYBOX_DEFAULT_SPLIT config BUSYBOX_DEFAULT_FEATURE_SPLIT_FANCY bool default n -config BUSYBOX_DEFAULT_STAT - bool - default n -config BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT - bool - default n -config BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM - bool - default n config BUSYBOX_DEFAULT_STTY bool default n config BUSYBOX_DEFAULT_SUM bool default n -config BUSYBOX_DEFAULT_SYNC - bool - default y -config BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY - bool - default n config BUSYBOX_DEFAULT_TAC bool default n @@ -793,42 +772,9 @@ config BUSYBOX_DEFAULT_TEE config BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO bool default y -config BUSYBOX_DEFAULT_TEST - bool - default y -config BUSYBOX_DEFAULT_TEST1 - bool - default y -config BUSYBOX_DEFAULT_TEST2 - bool - default y -config BUSYBOX_DEFAULT_FEATURE_TEST_64 - bool - default y -config BUSYBOX_DEFAULT_TOUCH - bool - default y -config BUSYBOX_DEFAULT_FEATURE_TOUCH_NODEREF - bool - default n -config BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3 - bool - default y -config BUSYBOX_DEFAULT_TR - bool - default y -config BUSYBOX_DEFAULT_FEATURE_TR_CLASSES - bool - default n -config BUSYBOX_DEFAULT_FEATURE_TR_EQUIV - bool - default n config BUSYBOX_DEFAULT_TRUE bool default y -config BUSYBOX_DEFAULT_TRUNCATE - bool - default n config BUSYBOX_DEFAULT_TTY bool default n @@ -838,21 +784,21 @@ config BUSYBOX_DEFAULT_UNAME config BUSYBOX_DEFAULT_UNAME_OSNAME string default "GNU/Linux" +config BUSYBOX_DEFAULT_UNEXPAND + bool + default n +config BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS + bool + default n config BUSYBOX_DEFAULT_UNIQ bool default y -config BUSYBOX_DEFAULT_UNLINK - bool - default n config BUSYBOX_DEFAULT_USLEEP bool default n config BUSYBOX_DEFAULT_UUDECODE bool default n -config BUSYBOX_DEFAULT_BASE64 - bool - default n config BUSYBOX_DEFAULT_UUENCODE bool default n @@ -862,15 +808,6 @@ config BUSYBOX_DEFAULT_WC config BUSYBOX_DEFAULT_FEATURE_WC_LARGE bool default n -config BUSYBOX_DEFAULT_WHO - bool - default n -config BUSYBOX_DEFAULT_W - bool - default n -config BUSYBOX_DEFAULT_USERS - bool - default n config BUSYBOX_DEFAULT_WHOAMI bool default n @@ -883,12 +820,21 @@ config BUSYBOX_DEFAULT_FEATURE_VERBOSE config BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS bool default y +config BUSYBOX_DEFAULT_FEATURE_AUTOWIDTH + bool + default y config BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE bool default y +config BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK + bool + default y config BUSYBOX_DEFAULT_CHVT bool default n +config BUSYBOX_DEFAULT_FGCONSOLE + bool + default n config BUSYBOX_DEFAULT_CLEAR bool default y @@ -898,30 +844,12 @@ config BUSYBOX_DEFAULT_DEALLOCVT config BUSYBOX_DEFAULT_DUMPKMAP bool default n -config BUSYBOX_DEFAULT_FGCONSOLE - bool - default n config BUSYBOX_DEFAULT_KBD_MODE bool default n config BUSYBOX_DEFAULT_LOADFONT bool default n -config BUSYBOX_DEFAULT_SETFONT - bool - default n -config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP - bool - default n -config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR - string - default "" -config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2 - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW - bool - default n config BUSYBOX_DEFAULT_LOADKMAP bool default n @@ -943,6 +871,15 @@ config BUSYBOX_DEFAULT_SETCONSOLE config BUSYBOX_DEFAULT_FEATURE_SETCONSOLE_LONG_OPTIONS bool default n +config BUSYBOX_DEFAULT_SETFONT + bool + default n +config BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP + bool + default n +config BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR + string + default "" config BUSYBOX_DEFAULT_SETKEYCODES bool default n @@ -952,6 +889,12 @@ config BUSYBOX_DEFAULT_SETLOGCONS config BUSYBOX_DEFAULT_SHOWKEY bool default n +config BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2 + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW + bool + default n config BUSYBOX_DEFAULT_MKTEMP bool default y @@ -1089,7 +1032,7 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_MAXDEPTH default y config BUSYBOX_DEFAULT_FEATURE_FIND_NEWER bool - default y + default n config BUSYBOX_DEFAULT_FEATURE_FIND_INUM bool default n @@ -1138,10 +1081,10 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_LINKS config BUSYBOX_DEFAULT_GREP bool default y -config BUSYBOX_DEFAULT_EGREP +config BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS bool default y -config BUSYBOX_DEFAULT_FGREP +config BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS bool default y config BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT @@ -1177,12 +1120,6 @@ config BUSYBOX_DEFAULT_FEATURE_BOOTCHARTD_CONFIG_FILE config BUSYBOX_DEFAULT_HALT bool default y -config BUSYBOX_DEFAULT_POWEROFF - bool - default y -config BUSYBOX_DEFAULT_REBOOT - bool - default y config BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT bool default n @@ -1210,7 +1147,7 @@ config BUSYBOX_DEFAULT_FEATURE_INIT_SCTTY config BUSYBOX_DEFAULT_FEATURE_INIT_SYSLOG bool default n -config BUSYBOX_DEFAULT_FEATURE_INIT_QUIET +config BUSYBOX_DEFAULT_FEATURE_EXTRA_QUIET bool default n config BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS @@ -1330,9 +1267,6 @@ config BUSYBOX_DEFAULT_FEATURE_SU_SYSLOG config BUSYBOX_DEFAULT_FEATURE_SU_CHECKS_SHELLS bool default n -config BUSYBOX_DEFAULT_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY - bool - default n config BUSYBOX_DEFAULT_SULOGIN bool default n @@ -1351,42 +1285,45 @@ config BUSYBOX_DEFAULT_LSATTR config BUSYBOX_DEFAULT_TUNE2FS bool default n +config BUSYBOX_DEFAULT_MODINFO + bool + default n config BUSYBOX_DEFAULT_MODPROBE_SMALL bool default n -config BUSYBOX_DEFAULT_DEPMOD +config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED bool default n config BUSYBOX_DEFAULT_INSMOD bool default n +config BUSYBOX_DEFAULT_RMMOD + bool + default n config BUSYBOX_DEFAULT_LSMOD bool default n config BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT bool default n -config BUSYBOX_DEFAULT_MODINFO - bool - default n config BUSYBOX_DEFAULT_MODPROBE bool default n config BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST bool default n -config BUSYBOX_DEFAULT_RMMOD - bool - default n -config BUSYBOX_DEFAULT_FEATURE_CMDLINE_MODULE_OPTIONS - bool - default n -config BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED +config BUSYBOX_DEFAULT_DEPMOD bool default n config BUSYBOX_DEFAULT_FEATURE_2_4_MODULES bool default n +config BUSYBOX_DEFAULT_FEATURE_INSMOD_TRY_MMAP + bool + default n config BUSYBOX_DEFAULT_FEATURE_INSMOD_VERSION_CHECKING bool default n @@ -1405,9 +1342,6 @@ config BUSYBOX_DEFAULT_FEATURE_INSMOD_LOAD_MAP_FULL config BUSYBOX_DEFAULT_FEATURE_CHECK_TAINTED_MODULE bool default n -config BUSYBOX_DEFAULT_FEATURE_INSMOD_TRY_MMAP - bool - default n config BUSYBOX_DEFAULT_FEATURE_MODUTILS_ALIAS bool default n @@ -1420,141 +1354,18 @@ config BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR config BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE string default "" -config BUSYBOX_DEFAULT_ACPID - bool - default n -config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT - bool - default n config BUSYBOX_DEFAULT_BLKDISCARD bool default n -config BUSYBOX_DEFAULT_BLKID - bool - default n -config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE - bool - default n config BUSYBOX_DEFAULT_BLOCKDEV bool default n -config BUSYBOX_DEFAULT_CAL - bool - default n -config BUSYBOX_DEFAULT_DMESG - bool - default y -config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY - bool - default y -config BUSYBOX_DEFAULT_FALLOCATE - bool - default n config BUSYBOX_DEFAULT_FATATTR bool default n -config BUSYBOX_DEFAULT_FBSET - bool - default n -config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY - bool - default n -config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE - bool - default n -config BUSYBOX_DEFAULT_FDFORMAT - bool - default n -config BUSYBOX_DEFAULT_FDISK - bool - default n -config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS - bool - default n -config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE - bool - default n -config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL - bool - default n -config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL - bool - default n -config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL - bool - default n -config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL - bool - default n -config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL - bool - default n -config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED - bool - default n -config BUSYBOX_DEFAULT_FINDFS - bool - default n -config BUSYBOX_DEFAULT_FLOCK - bool - default y -config BUSYBOX_DEFAULT_FDFLUSH - bool - default n -config BUSYBOX_DEFAULT_FREERAMDISK - bool - default n -config BUSYBOX_DEFAULT_FSCK_MINIX - bool - default n -config BUSYBOX_DEFAULT_FSFREEZE - bool - default n config BUSYBOX_DEFAULT_FSTRIM bool default n -config BUSYBOX_DEFAULT_GETOPT - bool - default n -config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG - bool - default n -config BUSYBOX_DEFAULT_HEXDUMP - bool - default y -config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE - bool - default n -config BUSYBOX_DEFAULT_HD - bool - default n -config BUSYBOX_DEFAULT_XXD - bool - default n -config BUSYBOX_DEFAULT_HWCLOCK - bool - default y -config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS - bool - default n -config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS - bool - default n -config BUSYBOX_DEFAULT_IPCRM - bool - default n -config BUSYBOX_DEFAULT_IPCS - bool - default n -config BUSYBOX_DEFAULT_LOSETUP - bool - default n -config BUSYBOX_DEFAULT_LSPCI - bool - default n -config BUSYBOX_DEFAULT_LSUSB - bool - default n config BUSYBOX_DEFAULT_MDEV bool default n @@ -1573,36 +1384,6 @@ config BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC config BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE bool default n -config BUSYBOX_DEFAULT_MKE2FS - bool - default n -config BUSYBOX_DEFAULT_MKFS_EXT2 - bool - default n -config BUSYBOX_DEFAULT_MKFS_MINIX - bool - default n -config BUSYBOX_DEFAULT_FEATURE_MINIX2 - bool - default n -config BUSYBOX_DEFAULT_MKFS_REISER - bool - default n -config BUSYBOX_DEFAULT_MKDOSFS - bool - default n -config BUSYBOX_DEFAULT_MKFS_VFAT - bool - default n -config BUSYBOX_DEFAULT_MKSWAP - bool - default y -config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID - bool - default n -config BUSYBOX_DEFAULT_MORE - bool - default n config BUSYBOX_DEFAULT_MOUNT bool default y @@ -1639,6 +1420,153 @@ config BUSYBOX_DEFAULT_NSENTER config BUSYBOX_DEFAULT_FEATURE_NSENTER_LONG_OPTS bool default n +config BUSYBOX_DEFAULT_REV + bool + default n +config BUSYBOX_DEFAULT_SETARCH + bool + default n +config BUSYBOX_DEFAULT_UEVENT + bool + default n +config BUSYBOX_DEFAULT_UNSHARE + bool + default n +config BUSYBOX_DEFAULT_ACPID + bool + default n +config BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT + bool + default n +config BUSYBOX_DEFAULT_BLKID + bool + default n +config BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE + bool + default n +config BUSYBOX_DEFAULT_DMESG + bool + default y +config BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY + bool + default y +config BUSYBOX_DEFAULT_FBSET + bool + default n +config BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY + bool + default n +config BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE + bool + default n +config BUSYBOX_DEFAULT_FDFLUSH + bool + default n +config BUSYBOX_DEFAULT_FDFORMAT + bool + default n +config BUSYBOX_DEFAULT_FDISK + bool + default n +config BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS + bool + default n +config BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_AIX_LABEL + bool + default n +config BUSYBOX_DEFAULT_FEATURE_SGI_LABEL + bool + default n +config BUSYBOX_DEFAULT_FEATURE_SUN_LABEL + bool + default n +config BUSYBOX_DEFAULT_FEATURE_OSF_LABEL + bool + default n +config BUSYBOX_DEFAULT_FEATURE_GPT_LABEL + bool + default n +config BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED + bool + default n +config BUSYBOX_DEFAULT_FINDFS + bool + default n +config BUSYBOX_DEFAULT_FLOCK + bool + default n +config BUSYBOX_DEFAULT_FREERAMDISK + bool + default n +config BUSYBOX_DEFAULT_FSCK_MINIX + bool + default n +config BUSYBOX_DEFAULT_MKFS_EXT2 + bool + default n +config BUSYBOX_DEFAULT_MKFS_MINIX + bool + default n +config BUSYBOX_DEFAULT_FEATURE_MINIX2 + bool + default n +config BUSYBOX_DEFAULT_MKFS_REISER + bool + default n +config BUSYBOX_DEFAULT_MKFS_VFAT + bool + default n +config BUSYBOX_DEFAULT_GETOPT + bool + default n +config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG + bool + default n +config BUSYBOX_DEFAULT_HEXDUMP + bool + default y +config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE + bool + default n +config BUSYBOX_DEFAULT_HD + bool + default n +config BUSYBOX_DEFAULT_HWCLOCK + bool + default y +config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS + bool + default n +config BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS + bool + default n +config BUSYBOX_DEFAULT_IPCRM + bool + default n +config BUSYBOX_DEFAULT_IPCS + bool + default n +config BUSYBOX_DEFAULT_LOSETUP + bool + default n +config BUSYBOX_DEFAULT_LSPCI + bool + default n +config BUSYBOX_DEFAULT_LSUSB + bool + default n +config BUSYBOX_DEFAULT_MKSWAP + bool + default y +config BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID + bool + default n +config BUSYBOX_DEFAULT_MORE + bool + default n config BUSYBOX_DEFAULT_PIVOT_ROOT bool default y @@ -1651,9 +1579,6 @@ config BUSYBOX_DEFAULT_RDEV config BUSYBOX_DEFAULT_READPROFILE bool default n -config BUSYBOX_DEFAULT_REV - bool - default n config BUSYBOX_DEFAULT_RTCWAKE bool default n @@ -1663,19 +1588,7 @@ config BUSYBOX_DEFAULT_SCRIPT config BUSYBOX_DEFAULT_SCRIPTREPLAY bool default n -config BUSYBOX_DEFAULT_SETARCH - bool - default n -config BUSYBOX_DEFAULT_LINUX32 - bool - default n -config BUSYBOX_DEFAULT_LINUX64 - bool - default n -config BUSYBOX_DEFAULT_SETPRIV - bool - default n -config BUSYBOX_DEFAULT_SWAPON +config BUSYBOX_DEFAULT_SWAPONOFF bool default n config BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD @@ -1684,24 +1597,15 @@ config BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD config BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI bool default n -config BUSYBOX_DEFAULT_SWAPOFF - bool - default n config BUSYBOX_DEFAULT_SWITCH_ROOT bool default y -config BUSYBOX_DEFAULT_UEVENT - bool - default n config BUSYBOX_DEFAULT_UMOUNT bool default y config BUSYBOX_DEFAULT_FEATURE_UMOUNT_ALL bool default y -config BUSYBOX_DEFAULT_UNSHARE - bool - default n config BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP bool default y @@ -1774,15 +1678,114 @@ config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV bool default n -config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS - bool - default n config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF bool default n config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS bool default n +config BUSYBOX_DEFAULT_CONSPY + bool + default n +config BUSYBOX_DEFAULT_CROND + bool + default y +config BUSYBOX_DEFAULT_FEATURE_CROND_D + bool + default n +config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL + bool + default n +config BUSYBOX_DEFAULT_FEATURE_CROND_DIR + string + default "/etc" +config BUSYBOX_DEFAULT_I2CGET + bool + default n +config BUSYBOX_DEFAULT_I2CSET + bool + default n +config BUSYBOX_DEFAULT_I2CDUMP + bool + default n +config BUSYBOX_DEFAULT_I2CDETECT + bool + default n +config BUSYBOX_DEFAULT_LESS + bool + default y +config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES + int + default 9999999 +config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS + bool + default n +config BUSYBOX_DEFAULT_NANDWRITE + bool + default n +config BUSYBOX_DEFAULT_NANDDUMP + bool + default n +config BUSYBOX_DEFAULT_RFKILL + bool + default n +config BUSYBOX_DEFAULT_SETSERIAL + bool + default n +config BUSYBOX_DEFAULT_TASKSET + bool + default n +config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY + bool + default n +config BUSYBOX_DEFAULT_UBIATTACH + bool + default n +config BUSYBOX_DEFAULT_UBIDETACH + bool + default n +config BUSYBOX_DEFAULT_UBIMKVOL + bool + default n +config BUSYBOX_DEFAULT_UBIRMVOL + bool + default n +config BUSYBOX_DEFAULT_UBIRSVOL + bool + default n +config BUSYBOX_DEFAULT_UBIUPDATEVOL + bool + default n +config BUSYBOX_DEFAULT_UBIRENAME + bool + default n +config BUSYBOX_DEFAULT_WALL + bool + default n config BUSYBOX_DEFAULT_ADJTIMEX bool default n @@ -1828,21 +1831,6 @@ config BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT config BUSYBOX_DEFAULT_CHRT bool default n -config BUSYBOX_DEFAULT_CONSPY - bool - default n -config BUSYBOX_DEFAULT_CROND - bool - default y -config BUSYBOX_DEFAULT_FEATURE_CROND_D - bool - default n -config BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL - bool - default n -config BUSYBOX_DEFAULT_FEATURE_CROND_DIR - string - default "/etc" config BUSYBOX_DEFAULT_CRONTAB bool default y @@ -1879,7 +1867,7 @@ config BUSYBOX_DEFAULT_FEATURE_EJECT_SCSI config BUSYBOX_DEFAULT_FBSPLASH bool default n -config BUSYBOX_DEFAULT_FLASH_ERASEALL +config BUSYBOX_DEFAULT_FLASHCP bool default n config BUSYBOX_DEFAULT_FLASH_LOCK @@ -1888,7 +1876,19 @@ config BUSYBOX_DEFAULT_FLASH_LOCK config BUSYBOX_DEFAULT_FLASH_UNLOCK bool default n -config BUSYBOX_DEFAULT_FLASHCP +config BUSYBOX_DEFAULT_FLASH_ERASEALL + bool + default n +config BUSYBOX_DEFAULT_IONICE + bool + default n +config BUSYBOX_DEFAULT_INOTIFYD + bool + default n +config BUSYBOX_DEFAULT_LAST + bool + default n +config BUSYBOX_DEFAULT_FEATURE_LAST_FANCY bool default n config BUSYBOX_DEFAULT_HDPARM @@ -1912,69 +1912,9 @@ config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF config BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA bool default n -config BUSYBOX_DEFAULT_I2CGET - bool - default n -config BUSYBOX_DEFAULT_I2CSET - bool - default n -config BUSYBOX_DEFAULT_I2CDUMP - bool - default n -config BUSYBOX_DEFAULT_I2CDETECT - bool - default n -config BUSYBOX_DEFAULT_INOTIFYD - bool - default n -config BUSYBOX_DEFAULT_IONICE - bool - default n -config BUSYBOX_DEFAULT_LAST - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LAST_FANCY - bool - default n -config BUSYBOX_DEFAULT_LESS - bool - default y -config BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES - int - default 9999999 -config BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LESS_MARKS - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LESS_WINCH - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD - bool - default n -config BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS - bool - default n config BUSYBOX_DEFAULT_LOCK bool default y -config BUSYBOX_DEFAULT_LSSCSI - bool - default n config BUSYBOX_DEFAULT_MAKEDEVS bool default n @@ -1996,45 +1936,24 @@ config BUSYBOX_DEFAULT_MOUNTPOINT config BUSYBOX_DEFAULT_MT bool default n -config BUSYBOX_DEFAULT_NANDWRITE - bool - default n -config BUSYBOX_DEFAULT_NANDDUMP - bool - default n -config BUSYBOX_DEFAULT_PARTPROBE - bool - default n config BUSYBOX_DEFAULT_RAIDAUTORUN bool default n config BUSYBOX_DEFAULT_READAHEAD bool default n -config BUSYBOX_DEFAULT_RFKILL - bool - default n config BUSYBOX_DEFAULT_RUNLEVEL bool default n config BUSYBOX_DEFAULT_RX bool default n -config BUSYBOX_DEFAULT_SETSERIAL - bool - default n config BUSYBOX_DEFAULT_SETSID bool default n config BUSYBOX_DEFAULT_STRINGS bool default y -config BUSYBOX_DEFAULT_TASKSET - bool - default n -config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY - bool - default n config BUSYBOX_DEFAULT_TIME bool default y @@ -2044,34 +1963,64 @@ config BUSYBOX_DEFAULT_TIMEOUT config BUSYBOX_DEFAULT_TTYSIZE bool default n -config BUSYBOX_DEFAULT_UBIATTACH - bool - default n -config BUSYBOX_DEFAULT_UBIDETACH - bool - default n -config BUSYBOX_DEFAULT_UBIMKVOL - bool - default n -config BUSYBOX_DEFAULT_UBIRMVOL - bool - default n -config BUSYBOX_DEFAULT_UBIRSVOL - bool - default n -config BUSYBOX_DEFAULT_UBIUPDATEVOL - bool - default n -config BUSYBOX_DEFAULT_UBIRENAME - bool - default n config BUSYBOX_DEFAULT_VOLNAME bool default n -config BUSYBOX_DEFAULT_WALL +config BUSYBOX_DEFAULT_WATCHDOG bool default n -config BUSYBOX_DEFAULT_WATCHDOG +config BUSYBOX_DEFAULT_NAMEIF + bool + default n +config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED + bool + default n +config BUSYBOX_DEFAULT_NBDCLIENT + bool + default n +config BUSYBOX_DEFAULT_NC + bool + default y +config BUSYBOX_DEFAULT_NC_SERVER + bool + default n +config BUSYBOX_DEFAULT_NC_EXTRA + bool + default n +config BUSYBOX_DEFAULT_NC_110_COMPAT + bool + default n +config BUSYBOX_DEFAULT_PING + bool + default y +config BUSYBOX_DEFAULT_PING6 + bool + default y +config BUSYBOX_DEFAULT_FEATURE_FANCY_PING + bool + default y +config BUSYBOX_DEFAULT_WGET + bool + default n +config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR + bool + default n +config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION + bool + default n +config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS + bool + default n +config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT + bool + default n +config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL + bool + default n +config BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER + bool + default n +config BUSYBOX_DEFAULT_WHOIS bool default n config BUSYBOX_DEFAULT_FEATURE_IPV6 @@ -2107,16 +2056,19 @@ config BUSYBOX_DEFAULT_DNSD config BUSYBOX_DEFAULT_ETHER_WAKE bool default n +config BUSYBOX_DEFAULT_FAKEIDENTD + bool + default n config BUSYBOX_DEFAULT_FTPD bool default n -config BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE +config BUSYBOX_DEFAULT_FEATURE_FTP_WRITE bool default n config BUSYBOX_DEFAULT_FEATURE_FTPD_ACCEPT_BROKEN_LIST bool default n -config BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION +config BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION bool default n config BUSYBOX_DEFAULT_FTPGET @@ -2131,9 +2083,6 @@ config BUSYBOX_DEFAULT_FEATURE_FTPGETPUT_LONG_OPTIONS config BUSYBOX_DEFAULT_HOSTNAME bool default n -config BUSYBOX_DEFAULT_DNSDOMAINNAME - bool - default n config BUSYBOX_DEFAULT_HTTPD bool default n @@ -2194,10 +2143,7 @@ config BUSYBOX_DEFAULT_IFENSLAVE config BUSYBOX_DEFAULT_IFPLUGD bool default n -config BUSYBOX_DEFAULT_IFUP - bool - default n -config BUSYBOX_DEFAULT_IFDOWN +config BUSYBOX_DEFAULT_IFUPDOWN bool default n config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH @@ -2206,6 +2152,12 @@ config BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP bool default n +config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN + bool + default n +config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN + bool + default n config BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4 bool default n @@ -2242,24 +2194,6 @@ config BUSYBOX_DEFAULT_FEATURE_INETD_RPC config BUSYBOX_DEFAULT_IP bool default y -config BUSYBOX_DEFAULT_IPADDR - bool - default n -config BUSYBOX_DEFAULT_IPLINK - bool - default n -config BUSYBOX_DEFAULT_IPROUTE - bool - default n -config BUSYBOX_DEFAULT_IPTUNNEL - bool - default n -config BUSYBOX_DEFAULT_IPRULE - bool - default n -config BUSYBOX_DEFAULT_IPNEIGH - bool - default n config BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS bool default y @@ -2280,10 +2214,31 @@ config BUSYBOX_DEFAULT_FEATURE_IP_RULE default y config BUSYBOX_DEFAULT_FEATURE_IP_NEIGH bool - default y + default n +config BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS + bool + default n config BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS bool default n +config BUSYBOX_DEFAULT_IPADDR + bool + default n +config BUSYBOX_DEFAULT_IPLINK + bool + default n +config BUSYBOX_DEFAULT_IPROUTE + bool + default n +config BUSYBOX_DEFAULT_IPTUNNEL + bool + default n +config BUSYBOX_DEFAULT_IPRULE + bool + default n +config BUSYBOX_DEFAULT_IPNEIGH + bool + default n config BUSYBOX_DEFAULT_IPCALC bool default n @@ -2293,30 +2248,6 @@ config BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY config BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS bool default n -config BUSYBOX_DEFAULT_FAKEIDENTD - bool - default n -config BUSYBOX_DEFAULT_NAMEIF - bool - default n -config BUSYBOX_DEFAULT_FEATURE_NAMEIF_EXTENDED - bool - default n -config BUSYBOX_DEFAULT_NBDCLIENT - bool - default n -config BUSYBOX_DEFAULT_NC - bool - default y -config BUSYBOX_DEFAULT_NC_SERVER - bool - default n -config BUSYBOX_DEFAULT_NC_EXTRA - bool - default n -config BUSYBOX_DEFAULT_NC_110_COMPAT - bool - default n config BUSYBOX_DEFAULT_NETMSG bool default y @@ -2332,12 +2263,9 @@ config BUSYBOX_DEFAULT_FEATURE_NETSTAT_PRG config BUSYBOX_DEFAULT_NSLOOKUP bool default n -config BUSYBOX_DEFAULT_NSLOOKUP_OPENWRT +config BUSYBOX_DEFAULT_NSLOOKUP_LEDE bool default y -config BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS - bool - default n config BUSYBOX_DEFAULT_NTPD bool default y @@ -2347,15 +2275,6 @@ config BUSYBOX_DEFAULT_FEATURE_NTPD_SERVER config BUSYBOX_DEFAULT_FEATURE_NTPD_CONF bool default n -config BUSYBOX_DEFAULT_PING - bool - default y -config BUSYBOX_DEFAULT_PING6 - bool - default y -config BUSYBOX_DEFAULT_FEATURE_FANCY_PING - bool - default y config BUSYBOX_DEFAULT_PSCAN bool default n @@ -2365,15 +2284,9 @@ config BUSYBOX_DEFAULT_ROUTE config BUSYBOX_DEFAULT_SLATTACH bool default n -config BUSYBOX_DEFAULT_SSL_CLIENT - bool - default n config BUSYBOX_DEFAULT_TCPSVD bool default n -config BUSYBOX_DEFAULT_UDPSVD - bool - default n config BUSYBOX_DEFAULT_TELNET bool default n @@ -2383,9 +2296,6 @@ config BUSYBOX_DEFAULT_FEATURE_TELNET_TTYPE config BUSYBOX_DEFAULT_FEATURE_TELNET_AUTOLOGIN bool default n -config BUSYBOX_DEFAULT_FEATURE_TELNET_WIDTH - bool - default n config BUSYBOX_DEFAULT_TELNETD bool default n @@ -2416,9 +2326,6 @@ config BUSYBOX_DEFAULT_FEATURE_TFTP_PROGRESS_BAR config BUSYBOX_DEFAULT_TFTP_DEBUG bool default n -config BUSYBOX_DEFAULT_TLS - bool - default n config BUSYBOX_DEFAULT_TRACEROUTE bool default y @@ -2428,6 +2335,9 @@ config BUSYBOX_DEFAULT_TRACEROUTE6 config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE bool default y +config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE + bool + default n config BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP bool default n @@ -2437,51 +2347,18 @@ config BUSYBOX_DEFAULT_TUNCTL config BUSYBOX_DEFAULT_FEATURE_TUNCTL_UG bool default n -config BUSYBOX_DEFAULT_VCONFIG - bool - default n -config BUSYBOX_DEFAULT_WGET - bool - default n -config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR - bool - default n -config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION - bool - default n -config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS - bool - default n -config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT - bool - default n -config BUSYBOX_DEFAULT_FEATURE_WGET_HTTPS - bool - default n -config BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL - bool - default n -config BUSYBOX_DEFAULT_WHOIS - bool - default n -config BUSYBOX_DEFAULT_ZCIP - bool - default n config BUSYBOX_DEFAULT_UDHCPC6 bool default n -config BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC3646 - bool - default n -config BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC4704 - bool - default n -config BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC4833 - bool - default n config BUSYBOX_DEFAULT_UDHCPD bool default n +config BUSYBOX_DEFAULT_DHCPRELAY + bool + default n +config BUSYBOX_DEFAULT_DUMPLEASES + bool + default n config BUSYBOX_DEFAULT_FEATURE_UDHCPD_WRITE_LEASES_EARLY bool default n @@ -2491,12 +2368,6 @@ config BUSYBOX_DEFAULT_FEATURE_UDHCPD_BASE_IP_ON_MAC config BUSYBOX_DEFAULT_DHCPD_LEASES_FILE string default "" -config BUSYBOX_DEFAULT_DUMPLEASES - bool - default n -config BUSYBOX_DEFAULT_DHCPRELAY - bool - default n config BUSYBOX_DEFAULT_UDHCPC bool default y @@ -2527,6 +2398,15 @@ config BUSYBOX_DEFAULT_UDHCPC_SLACK_FOR_BUGGY_SERVERS config BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS string default "" +config BUSYBOX_DEFAULT_UDPSVD + bool + default n +config BUSYBOX_DEFAULT_VCONFIG + bool + default n +config BUSYBOX_DEFAULT_ZCIP + bool + default n config BUSYBOX_DEFAULT_LPD bool default n @@ -2539,6 +2419,9 @@ config BUSYBOX_DEFAULT_LPQ config BUSYBOX_DEFAULT_MAKEMIME bool default n +config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET + string + default "" config BUSYBOX_DEFAULT_POPMAILDIR bool default n @@ -2554,27 +2437,9 @@ config BUSYBOX_DEFAULT_FEATURE_REFORMIME_COMPAT config BUSYBOX_DEFAULT_SENDMAIL bool default n -config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET - string - default "" -config BUSYBOX_DEFAULT_FREE - bool - default y -config BUSYBOX_DEFAULT_FUSER - bool - default n config BUSYBOX_DEFAULT_IOSTAT bool default n -config BUSYBOX_DEFAULT_KILL - bool - default y -config BUSYBOX_DEFAULT_KILLALL - bool - default y -config BUSYBOX_DEFAULT_KILLALL5 - bool - default n config BUSYBOX_DEFAULT_LSOF bool default n @@ -2584,69 +2449,24 @@ config BUSYBOX_DEFAULT_MPSTAT config BUSYBOX_DEFAULT_NMETER bool default n -config BUSYBOX_DEFAULT_PGREP - bool - default y -config BUSYBOX_DEFAULT_PKILL - bool - default n -config BUSYBOX_DEFAULT_PIDOF - bool - default y -config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE - bool - default n -config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT - bool - default n config BUSYBOX_DEFAULT_PMAP bool default n config BUSYBOX_DEFAULT_POWERTOP bool default n -config BUSYBOX_DEFAULT_FEATURE_POWERTOP_INTERACTIVE - bool - default n -config BUSYBOX_DEFAULT_PS - bool - default y -config BUSYBOX_DEFAULT_FEATURE_PS_WIDE - bool - default y -config BUSYBOX_DEFAULT_FEATURE_PS_LONG - bool - default n -config BUSYBOX_DEFAULT_FEATURE_PS_TIME - bool - default n -config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS - bool - default n -config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS - bool - default n config BUSYBOX_DEFAULT_PSTREE bool default n config BUSYBOX_DEFAULT_PWDX bool default n -config BUSYBOX_DEFAULT_RENICE - bool - default n config BUSYBOX_DEFAULT_SMEMCAP bool default n -config BUSYBOX_DEFAULT_BB_SYSCTL - bool - default y config BUSYBOX_DEFAULT_TOP bool default y -config BUSYBOX_DEFAULT_FEATURE_TOP_INTERACTIVE - bool - default n config BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE bool default y @@ -2671,12 +2491,66 @@ config BUSYBOX_DEFAULT_UPTIME config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT bool default n -config BUSYBOX_DEFAULT_WATCH +config BUSYBOX_DEFAULT_FREE + bool + default y +config BUSYBOX_DEFAULT_FUSER bool default n +config BUSYBOX_DEFAULT_KILL + bool + default y +config BUSYBOX_DEFAULT_KILLALL + bool + default y +config BUSYBOX_DEFAULT_KILLALL5 + bool + default n +config BUSYBOX_DEFAULT_PGREP + bool + default y +config BUSYBOX_DEFAULT_PIDOF + bool + default y +config BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT + bool + default n +config BUSYBOX_DEFAULT_PKILL + bool + default n +config BUSYBOX_DEFAULT_PS + bool + default y +config BUSYBOX_DEFAULT_FEATURE_PS_WIDE + bool + default y +config BUSYBOX_DEFAULT_FEATURE_PS_LONG + bool + default n +config BUSYBOX_DEFAULT_FEATURE_PS_TIME + bool + default n +config BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS + bool + default n +config BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS + bool + default n +config BUSYBOX_DEFAULT_RENICE + bool + default n +config BUSYBOX_DEFAULT_BB_SYSCTL + bool + default y config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS bool default n +config BUSYBOX_DEFAULT_WATCH + bool + default n config BUSYBOX_DEFAULT_CHPST bool default n @@ -2707,9 +2581,6 @@ config BUSYBOX_DEFAULT_SV config BUSYBOX_DEFAULT_SV_DEFAULT_SERVICE_DIR string default "" -config BUSYBOX_DEFAULT_SVC - bool - default n config BUSYBOX_DEFAULT_SVLOGD bool default n @@ -2731,6 +2602,9 @@ config BUSYBOX_DEFAULT_LOAD_POLICY config BUSYBOX_DEFAULT_MATCHPATHCON bool default n +config BUSYBOX_DEFAULT_RESTORECON + bool + default n config BUSYBOX_DEFAULT_RUNCON bool default n @@ -2740,9 +2614,6 @@ config BUSYBOX_DEFAULT_FEATURE_RUNCON_LONG_OPTIONS config BUSYBOX_DEFAULT_SELINUXENABLED bool default n -config BUSYBOX_DEFAULT_SESTATUS - bool - default n config BUSYBOX_DEFAULT_SETENFORCE bool default n @@ -2752,76 +2623,55 @@ config BUSYBOX_DEFAULT_SETFILES config BUSYBOX_DEFAULT_FEATURE_SETFILES_CHECK_OPTION bool default n -config BUSYBOX_DEFAULT_RESTORECON - bool - default n config BUSYBOX_DEFAULT_SETSEBOOL bool default n -config BUSYBOX_DEFAULT_SH_IS_ASH - bool - default y -config BUSYBOX_DEFAULT_SH_IS_HUSH +config BUSYBOX_DEFAULT_SESTATUS bool default n -config BUSYBOX_DEFAULT_SH_IS_NONE - bool - default n -config BUSYBOX_DEFAULT_BASH_IS_ASH - bool - default n -config BUSYBOX_DEFAULT_BASH_IS_HUSH - bool - default n -config BUSYBOX_DEFAULT_BASH_IS_NONE - bool - default y config BUSYBOX_DEFAULT_ASH bool default y -config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE - bool - default n -config BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB - bool - default y config BUSYBOX_DEFAULT_ASH_BASH_COMPAT bool default y +config BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT + bool + default n config BUSYBOX_DEFAULT_ASH_JOB_CONTROL bool default y config BUSYBOX_DEFAULT_ASH_ALIAS bool default y -config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT - bool - default n -config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT +config BUSYBOX_DEFAULT_ASH_GETOPTS bool default y -config BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT - bool - default n -config BUSYBOX_DEFAULT_ASH_MAIL - bool - default n -config BUSYBOX_DEFAULT_ASH_ECHO +config BUSYBOX_DEFAULT_ASH_BUILTIN_ECHO bool default y -config BUSYBOX_DEFAULT_ASH_PRINTF +config BUSYBOX_DEFAULT_ASH_BUILTIN_PRINTF bool default y -config BUSYBOX_DEFAULT_ASH_TEST +config BUSYBOX_DEFAULT_ASH_BUILTIN_TEST bool default y config BUSYBOX_DEFAULT_ASH_HELP bool default n -config BUSYBOX_DEFAULT_ASH_GETOPTS +config BUSYBOX_DEFAULT_ASH_CMDCMD bool default y -config BUSYBOX_DEFAULT_ASH_CMDCMD +config BUSYBOX_DEFAULT_ASH_MAIL + bool + default n +config BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE + bool + default n +config BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT + bool + default n +config BUSYBOX_DEFAULT_ASH_EXPAND_PRMT bool default y config BUSYBOX_DEFAULT_CTTYHACK @@ -2869,61 +2719,37 @@ config BUSYBOX_DEFAULT_HUSH_LOCAL config BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT bool default n -config BUSYBOX_DEFAULT_HUSH_MODE_X - bool - default n -config BUSYBOX_DEFAULT_HUSH_ECHO - bool - default n -config BUSYBOX_DEFAULT_HUSH_PRINTF - bool - default n -config BUSYBOX_DEFAULT_HUSH_TEST - bool - default n -config BUSYBOX_DEFAULT_HUSH_EXPORT - bool - default n config BUSYBOX_DEFAULT_HUSH_EXPORT_N bool default n -config BUSYBOX_DEFAULT_HUSH_KILL - bool - default n -config BUSYBOX_DEFAULT_HUSH_WAIT - bool - default n -config BUSYBOX_DEFAULT_HUSH_TRAP - bool - default n -config BUSYBOX_DEFAULT_HUSH_TYPE - bool - default n -config BUSYBOX_DEFAULT_HUSH_READ - bool - default n -config BUSYBOX_DEFAULT_HUSH_SET - bool - default n -config BUSYBOX_DEFAULT_HUSH_UNSET - bool - default n -config BUSYBOX_DEFAULT_HUSH_ULIMIT - bool - default n -config BUSYBOX_DEFAULT_HUSH_UMASK - bool - default n -config BUSYBOX_DEFAULT_HUSH_MEMLEAK +config BUSYBOX_DEFAULT_HUSH_MODE_X bool default n config BUSYBOX_DEFAULT_MSH bool default n -config BUSYBOX_DEFAULT_FEATURE_SH_MATH +config BUSYBOX_DEFAULT_FEATURE_SH_IS_ASH bool default y -config BUSYBOX_DEFAULT_FEATURE_SH_MATH_64 +config BUSYBOX_DEFAULT_FEATURE_SH_IS_HUSH + bool + default n +config BUSYBOX_DEFAULT_FEATURE_SH_IS_NONE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_BASH_IS_ASH + bool + default n +config BUSYBOX_DEFAULT_FEATURE_BASH_IS_HUSH + bool + default n +config BUSYBOX_DEFAULT_FEATURE_BASH_IS_NONE + bool + default y +config BUSYBOX_DEFAULT_SH_MATH_SUPPORT + bool + default y +config BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64 bool default y config BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 8866756ae..0d3708636 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -8,23 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox -PKG_VERSION:=1.27.2 -PKG_RELEASE:=3 +PKG_VERSION:=1.25.1 +PKG_RELEASE:=4 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.busybox.net/downloads \ http://sources.buildroot.net -PKG_HASH:=9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df +PKG_HASH:=27667e0f2328fdbd79cfd622e4453e5c57e58f781c5da97c9be337d93aa2a02e PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam PKG_BUILD_PARALLEL:=1 PKG_CHECK_FORMAT_SECURITY:=0 -PKG_INSTALL:=1 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE archival/libarchive/bz/LICENSE -PKG_CPE_ID:=cpe:/a:busybox:busybox include $(INCLUDE_DIR)/package.mk @@ -32,8 +30,11 @@ ifeq ($(DUMP),) STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | mkhash md5) endif -BUSYBOX_SYM=$(if $(CONFIG_BUSYBOX_CUSTOM),CONFIG,DEFAULT) -BUSYBOX_IF_ENABLED=$(if $(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_$(1)),$(2)) +ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) + BB_MAKE_VERBOSE := V=1 +else + BB_MAKE_VERBOSE := +endif define Package/busybox SECTION:=base @@ -43,20 +44,6 @@ define Package/busybox URL:=http://busybox.net/ DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter MENU:=1 - PROVIDES:=ip - ALTERNATIVES:=\ - $(call BUSYBOX_IF_ENABLED,KILL, 100:/bin/kill:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,PS, 100:/bin/ps:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,WATCH, 100:/bin/watch:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,IP, 100:/sbin/ip:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,FREE, 100:/usr/bin/free:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,PGREP, 100:/usr/bin/pgrep:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,PKILL, 100:/usr/bin/pkill:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,PMAP, 100:/usr/bin/pmap:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,PWDX, 100:/usr/bin/pwdx:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,TOP, 100:/usr/bin/top:/bin/busybox) \ - $(call BUSYBOX_IF_ENABLED,UPTIME, 100:/usr/bin/uptime:/bin/busybox) \ - endef define Package/busybox/description @@ -68,35 +55,64 @@ define Package/busybox/config source "$(SOURCE)/Config.in" endef +BUSYBOX_SYM=$(if $(CONFIG_BUSYBOX_CUSTOM),CONFIG,DEFAULT) + # don't create a version string containing the actual timestamp export KCONFIG_NOTIMESTAMP=1 +define Build/Configure + rm -f $(PKG_BUILD_DIR)/.configured* + grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" > $(PKG_BUILD_DIR)/.config + yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + KBUILD_HAVE_NLS=no \ + ARCH="$(ARCH)" \ + $(BB_MAKE_VERBOSE) \ + oldconfig +endef LDLIBS:=m crypt -LDLIBS += $(call BUSYBOX_IF_ENABLED,PAM,pam pam_misc pthread) ifdef CONFIG_BUSYBOX_USE_LIBRPC + TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include + export LDFLAGS=$(TARGET_LDFLAGS) LDLIBS += rpc endif -ifeq ($(CONFIG_USE_GLIBC),y) - LDLIBS += $(call BUSYBOX_IF_ENABLED,NSLOOKUP_OPENWRT,resolv) + +ifdef CONFIG_BUSYBOX_CONFIG_PAM + TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include + export LDFLAGS=$(TARGET_LDFLAGS) + LDLIBS += pam pam_misc pthread endif -MAKE_VARS := -MAKE_FLAGS += \ - EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ - LDLIBS="$(LDLIBS)" \ - SKIP_STRIP=y -ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) - MAKE_FLAGS += V=1 +ifdef CONFIG_BUSYBOX_DEFAULT_NSLOOKUP_LEDE + ifeq ($(CONFIG_USE_GLIBC),y) + LDLIBS += resolv + endif endif -MAKE_INSTALL_FLAGS += CONFIG_PREFIX="$(PKG_INSTALL_DIR)" - - -define Build/Configure - grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" > $(PKG_BUILD_DIR)/.config - yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) oldconfig +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + KBUILD_HAVE_NLS=no \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + ARCH="$(ARCH)" \ + SKIP_STRIP=y \ + LDLIBS="$(LDLIBS)" \ + $(BB_MAKE_VERBOSE) \ + all + rm -rf $(PKG_INSTALL_DIR) + $(FIND) $(PKG_BUILD_DIR) -lname "*busybox" -exec rm \{\} \; + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + ARCH="$(ARCH)" \ + CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \ + LDLIBS="$(LDLIBS)" \ + $(BB_MAKE_VERBOSE) \ + install endef define Package/busybox/install diff --git a/package/utils/busybox/config/Config.in b/package/utils/busybox/config/Config.in index c66aa08e7..3bf67c5cf 100644 --- a/package/utils/busybox/config/Config.in +++ b/package/utils/busybox/config/Config.in @@ -10,18 +10,15 @@ config BUSYBOX_CONFIG_HAVE_DOT_CONFIG menu "Busybox Settings" +menu "General Configuration" + config BUSYBOX_CONFIG_DESKTOP bool "Enable options for full-blown desktop systems" default BUSYBOX_DEFAULT_DESKTOP help Enable options and features which are not essential. - Select this if you plan to use busybox on full-blown desktop machine - with common Linux distro, which needs higher level of command-line - compatibility. - - If you are preparing your build to be used on an embedded box - where you have tighter control over the entire set of userspace - tools, you can unselect this option for smaller code size. + Select this only if you plan to use busybox on full-blown + desktop machine with common Linux distro, not on an embedded box. config BUSYBOX_CONFIG_EXTRA_COMPAT bool "Provide compatible behavior for rare corner cases (bigger code)" @@ -32,19 +29,6 @@ config BUSYBOX_CONFIG_EXTRA_COMPAT some GNU extensions in libc. You probably only need this option if you plan to run busybox on desktop. -config BUSYBOX_CONFIG_FEDORA_COMPAT - bool "Building for Fedora distribution" - default BUSYBOX_DEFAULT_FEDORA_COMPAT - help - This option makes some tools behave like they do on Fedora. - - At the time of this writing (2017-08) this only affects uname: - normally, uname -p (processor) and uname -i (platform) - are shown as "unknown", but with this option uname -p - shows the same string as uname -m (machine type), - and so does uname -i unless machine type is i486/i586/i686 - - then uname -i shows "i386". - config BUSYBOX_CONFIG_INCLUDE_SUSv2 bool "Enable obsolete features removed before SUSv3" default BUSYBOX_DEFAULT_INCLUDE_SUSv2 @@ -62,6 +46,41 @@ config BUSYBOX_CONFIG_USE_PORTABLE_CODE compiler other than gcc. If you do use gcc, this option may needlessly increase code size. +config BUSYBOX_CONFIG_PLATFORM_LINUX + bool "Enable Linux-specific applets and features" + default BUSYBOX_DEFAULT_PLATFORM_LINUX + help + For the most part, busybox requires only POSIX compatibility + from the target system, but some applets and features use + Linux-specific interfaces. + + Answering 'N' here will disable such applets and hide the + corresponding configuration options. + +choice + prompt "Buffer allocation policy" + default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK + help + There are 3 ways BusyBox can handle buffer allocations: + - Use malloc. This costs code size for the call to xmalloc. + - Put them on stack. For some very small machines with limited stack + space, this can be deadly. For most folks, this works just fine. + - Put them in BSS. This works beautifully for computers with a real + MMU (and OS support), but wastes runtime RAM for uCLinux. This + behavior was the only one available for BusyBox versions 0.48 and + earlier. + +config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC + bool "Allocate with Malloc" + +config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK + bool "Allocate on the Stack" + +config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS + bool "Allocate in the .bss section" + +endchoice + config BUSYBOX_CONFIG_SHOW_USAGE bool "Show applet usage messages" default BUSYBOX_DEFAULT_SHOW_USAGE @@ -124,15 +143,153 @@ config BUSYBOX_CONFIG_INSTALL_NO_USR will install applets only to /bin and /sbin, never to /usr/bin or /usr/sbin. +config BUSYBOX_CONFIG_LOCALE_SUPPORT + bool "Enable locale support (system needs locale for this to work)" + default BUSYBOX_DEFAULT_LOCALE_SUPPORT + help + Enable this if your system has locale support and you would like + busybox to support locale settings. + +config BUSYBOX_CONFIG_UNICODE_SUPPORT + bool "Support Unicode" + default BUSYBOX_DEFAULT_UNICODE_SUPPORT + help + This makes various applets aware that one byte is not + one character on screen. + + Busybox aims to eventually work correctly with Unicode displays. + Any older encodings are not guaranteed to work. + Probably by the time when busybox will be fully Unicode-clean, + other encodings will be mainly of historic interest. + +config BUSYBOX_CONFIG_UNICODE_USING_LOCALE + bool "Use libc routines for Unicode (else uses internal ones)" + default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE + depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT + help + With this option on, Unicode support is implemented using libc + routines. Otherwise, internal implementation is used. + Internal implementation is smaller. + +config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV + bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables" + default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV + depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE + help + With this option on, Unicode support is activated + only if locale-related variables have the value of the form + "xxxx.utf8" + + Otherwise, Unicode support will be always enabled and active. + +config BUSYBOX_CONFIG_SUBST_WCHAR + int "Character code to substitute unprintable characters with" + depends on BUSYBOX_CONFIG_UNICODE_SUPPORT + default BUSYBOX_DEFAULT_SUBST_WCHAR + help + Typical values are 63 for '?' (works with any output device), + 30 for ASCII substitute control code, + 65533 (0xfffd) for Unicode replacement character. + +config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR + int "Range of supported Unicode characters" + depends on BUSYBOX_CONFIG_UNICODE_SUPPORT + default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR + help + Any character with Unicode value bigger than this is assumed + to be non-printable on output device. Many applets replace + such chars with substitution character. + + The idea is that many valid printable Unicode chars are + nevertheless are not displayed correctly. Think about + combining charachers, double-wide hieroglyphs, obscure + characters in dozens of ancient scripts... + Many terminals, terminal emulators, xterms etc will fail + to handle them correctly. Choose the smallest value + which suits your needs. + + Typical values are: + 126 - ASCII only + 767 (0x2ff) - there are no combining chars in [0..767] range + (the range includes Latin 1, Latin Ext. A and B), + code is ~700 bytes smaller for this case. + 4351 (0x10ff) - there are no double-wide chars in [0..4351] range, + code is ~300 bytes smaller for this case. + 12799 (0x31ff) - nearly all non-ideographic characters are + available in [0..12799] range, including + East Asian scripts like katakana, hiragana, hangul, + bopomofo... + 0 - off, any valid printable Unicode character will be printed. + +config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS + bool "Allow zero-width Unicode characters on output" + default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS + depends on BUSYBOX_CONFIG_UNICODE_SUPPORT + help + With this option off, any Unicode char with width of 0 + is substituted on output. + +config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS + bool "Allow wide Unicode characters on output" + default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS + depends on BUSYBOX_CONFIG_UNICODE_SUPPORT + help + With this option off, any Unicode char with width > 1 + is substituted on output. + +config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT + bool "Bidirectional character-aware line input" + default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT + depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE + help + With this option on, right-to-left Unicode characters + are treated differently on input (e.g. cursor movement). + +config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE + bool "In bidi input, support non-ASCII neutral chars too" + default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE + depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT + help + In most cases it's enough to treat only ASCII non-letters + (i.e. punctuation, numbers and space) as characters + with neutral directionality. + With this option on, more extensive (and bigger) table + of neutral chars will be used. + +config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN + bool "Make it possible to enter sequences of chars which are not Unicode" + default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN + depends on BUSYBOX_CONFIG_UNICODE_SUPPORT + help + With this option on, on line-editing input (such as used by shells) + invalid UTF-8 bytes are not substituted with the selected + substitution character. + For example, this means that entering 'l', 's', ' ', 0xff, [Enter] + at shell prompt will list file named 0xff (single char name + with char value 255), not file named '?'. + config BUSYBOX_CONFIG_PAM - bool "Support PAM (Pluggable Authentication Modules)" + bool "Support for PAM (Pluggable Authentication Modules)" default BUSYBOX_DEFAULT_PAM help Use PAM in some busybox applets (currently login and httpd) instead of direct access to password database. +config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE + bool "Use sendfile system call" + default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + When enabled, busybox will use the kernel sendfile() function + instead of read/write loops to copy data between file descriptors + (for example, cp command does this a lot). + If sendfile() doesn't work, copying code falls back to read/write + loop. sendfile() was originally implemented for faster I/O + from files to sockets, but since Linux 2.6.33 it was extended + to work for many more file types. + config BUSYBOX_CONFIG_LONG_OPTS - bool "Support --long-options" + bool "Support for --long-options" default BUSYBOX_DEFAULT_LONG_OPTS help Enable this if you want busybox applets to use the gnu --long-option @@ -199,7 +356,7 @@ config BUSYBOX_CONFIG_PID_FILE_PATH specify a pidfile path. config BUSYBOX_CONFIG_FEATURE_SUID - bool "Support SUID/SGID handling" + bool "Support for SUID/SGID handling" default BUSYBOX_DEFAULT_FEATURE_SUID help With this option you can install the busybox binary belonging @@ -339,18 +496,9 @@ config BUSYBOX_CONFIG_FEATURE_HAVE_RPC # This is automatically selected if any of enabled applets need it. # You do not need to select it manually. -config BUSYBOX_CONFIG_PLATFORM_LINUX - bool #No description makes it a hidden option - default BUSYBOX_DEFAULT_PLATFORM_LINUX - #help - # For the most part, busybox requires only POSIX compatibility - # from the target system, but some applets and features use - # Linux-specific interfaces. - # - # This is automatically selected if any applet or feature requires - # Linux-specific interfaces. You do not need to select it manually. +endmenu -comment 'Build Options' +menu 'Build Options' config BUSYBOX_CONFIG_STATIC bool "Build BusyBox as a static binary (no shared libs)" @@ -525,7 +673,103 @@ config BUSYBOX_CONFIG_EXTRA_LDLIBS help Additional LDLIBS to pass to the linker with -l. -comment 'Installation Options ("make install" behavior)' +endmenu + +menu 'Debugging Options' + +config BUSYBOX_CONFIG_DEBUG + bool "Build BusyBox with extra Debugging symbols" + default BUSYBOX_DEFAULT_DEBUG + help + Say Y here if you wish to examine BusyBox internals while applets are + running. This increases the size of the binary considerably, and + should only be used when doing development. If you are doing + development and want to debug BusyBox, answer Y. + + Most people should answer N. + +config BUSYBOX_CONFIG_DEBUG_PESSIMIZE + bool "Disable compiler optimizations" + default BUSYBOX_DEFAULT_DEBUG_PESSIMIZE + depends on BUSYBOX_CONFIG_DEBUG + help + The compiler's optimization of source code can eliminate and reorder + code, resulting in an executable that's hard to understand when + stepping through it with a debugger. This switches it off, resulting + in a much bigger executable that more closely matches the source + code. + +config BUSYBOX_CONFIG_DEBUG_SANITIZE + bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)" + default BUSYBOX_DEFAULT_DEBUG_SANITIZE + help + Say Y here if you want to enable runtime sanitizers. These help + catch bad memory accesses (e.g. buffer overflows), but will make + the executable larger and slow down runtime a bit. + + If you aren't developing/testing busybox, say N here. + +config BUSYBOX_CONFIG_UNIT_TEST + bool "Build unit tests" + default BUSYBOX_DEFAULT_UNIT_TEST + help + Say Y here if you want to build unit tests (both the framework and + test cases) as a Busybox applet. This results in bigger code, so you + probably don't want this option in production builds. + +config BUSYBOX_CONFIG_WERROR + bool "Abort compilation on any warning" + default BUSYBOX_DEFAULT_WERROR + help + Selecting this will add -Werror to gcc command line. + + Most people should answer N. + +choice + prompt "Additional debugging library" + default BUSYBOX_CONFIG_NO_DEBUG_LIB + help + Using an additional debugging library will make BusyBox become + considerable larger and will cause it to run more slowly. You + should always leave this option disabled for production use. + + dmalloc support: + ---------------- + This enables compiling with dmalloc ( http://dmalloc.com/ ) + which is an excellent public domain mem leak and malloc problem + detector. To enable dmalloc, before running busybox you will + want to properly set your environment, for example: + export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile + The 'debug=' value is generated using the following command + dmalloc -p log-stats -p log-non-free -p log-bad-space \ + -p log-elapsed-time -p check-fence -p check-heap \ + -p check-lists -p check-blank -p check-funcs -p realloc-copy \ + -p allow-free-null + + Electric-fence support: + ----------------------- + This enables compiling with Electric-fence support. Electric + fence is another very useful malloc debugging library which uses + your computer's virtual memory hardware to detect illegal memory + accesses. This support will make BusyBox be considerable larger + and run slower, so you should leave this option disabled unless + you are hunting a hard to find memory problem. + + +config BUSYBOX_CONFIG_NO_DEBUG_LIB + bool "None" + +config BUSYBOX_CONFIG_DMALLOC + bool "Dmalloc" + +config BUSYBOX_CONFIG_EFENCE + bool "Electric-fence" + +endchoice + +endmenu + +menu 'Installation Options ("make install" behavior)' choice prompt "What kind of applet links to install" @@ -591,104 +835,12 @@ config BUSYBOX_CONFIG_PREFIX help Define your directory to install BusyBox files/subdirs in. -comment 'Debugging Options' - -config BUSYBOX_CONFIG_DEBUG - bool "Build BusyBox with extra Debugging symbols" - default BUSYBOX_DEFAULT_DEBUG - help - Say Y here if you wish to examine BusyBox internals while applets are - running. This increases the size of the binary considerably, and - should only be used when doing development. If you are doing - development and want to debug BusyBox, answer Y. - - Most people should answer N. - -config BUSYBOX_CONFIG_DEBUG_PESSIMIZE - bool "Disable compiler optimizations" - default BUSYBOX_DEFAULT_DEBUG_PESSIMIZE - depends on BUSYBOX_CONFIG_DEBUG - help - The compiler's optimization of source code can eliminate and reorder - code, resulting in an executable that's hard to understand when - stepping through it with a debugger. This switches it off, resulting - in a much bigger executable that more closely matches the source - code. - -config BUSYBOX_CONFIG_DEBUG_SANITIZE - bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)" - default BUSYBOX_DEFAULT_DEBUG_SANITIZE - help - Say Y here if you want to enable runtime sanitizers. These help - catch bad memory accesses (e.g. buffer overflows), but will make - the executable larger and slow down runtime a bit. - - This adds -fsanitize=foo options to gcc command line. - - If you aren't developing/testing busybox, say N here. - -config BUSYBOX_CONFIG_UNIT_TEST - bool "Build unit tests" - default BUSYBOX_DEFAULT_UNIT_TEST - help - Say Y here if you want to build unit tests (both the framework and - test cases) as a Busybox applet. This results in bigger code, so you - probably don't want this option in production builds. - -config BUSYBOX_CONFIG_WERROR - bool "Abort compilation on any warning" - default BUSYBOX_DEFAULT_WERROR - help - This adds -Werror to gcc command line. - - Most people should answer N. - -choice - prompt "Additional debugging library" - default BUSYBOX_CONFIG_NO_DEBUG_LIB - help - Using an additional debugging library will make BusyBox become - considerable larger and will cause it to run more slowly. You - should always leave this option disabled for production use. - - dmalloc support: - ---------------- - This enables compiling with dmalloc ( http://dmalloc.com/ ) - which is an excellent public domain mem leak and malloc problem - detector. To enable dmalloc, before running busybox you will - want to properly set your environment, for example: - export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile - The 'debug=' value is generated using the following command - dmalloc -p log-stats -p log-non-free -p log-bad-space \ - -p log-elapsed-time -p check-fence -p check-heap \ - -p check-lists -p check-blank -p check-funcs -p realloc-copy \ - -p allow-free-null - - Electric-fence support: - ----------------------- - This enables compiling with Electric-fence support. Electric - fence is another very useful malloc debugging library which uses - your computer's virtual memory hardware to detect illegal memory - accesses. This support will make BusyBox be considerable larger - and run slower, so you should leave this option disabled unless - you are hunting a hard to find memory problem. - - -config BUSYBOX_CONFIG_NO_DEBUG_LIB - bool "None" - -config BUSYBOX_CONFIG_DMALLOC - bool "Dmalloc" - -config BUSYBOX_CONFIG_EFENCE - bool "Electric-fence" - -endchoice - endmenu source libbb/Config.in +endmenu + comment "Applets" source archival/Config.in diff --git a/package/utils/busybox/config/archival/Config.in b/package/utils/busybox/config/archival/Config.in index ccfb828a8..ff4c2cf6b 100644 --- a/package/utils/busybox/config/archival/Config.in +++ b/package/utils/busybox/config/archival/Config.in @@ -9,22 +9,32 @@ menu "Archival Utilities" config BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ bool "Make tar, rpm, modprobe etc understand .xz data" default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_XZ + help + Make tar, rpm, modprobe etc understand .xz data. config BUSYBOX_CONFIG_FEATURE_SEAMLESS_LZMA bool "Make tar, rpm, modprobe etc understand .lzma data" default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_LZMA + help + Make tar, rpm, modprobe etc understand .lzma data. config BUSYBOX_CONFIG_FEATURE_SEAMLESS_BZ2 bool "Make tar, rpm, modprobe etc understand .bz2 data" default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_BZ2 + help + Make tar, rpm, modprobe etc understand .bz2 data. config BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ bool "Make tar, rpm, modprobe etc understand .gz data" default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_GZ + help + Make tar, rpm, modprobe etc understand .gz data. config BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z - bool "Make tar, rpm, modprobe etc understand .Z data" + bool "tar, rpm, modprobe etc understand .Z data" default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_Z # it is ancient + help + Make tar, rpm, modprobe etc understand .Z data. config BUSYBOX_CONFIG_AR bool "ar" @@ -40,7 +50,7 @@ config BUSYBOX_CONFIG_AR probably say N here: most compilers come with their own ar utility. config BUSYBOX_CONFIG_FEATURE_AR_LONG_FILENAMES - bool "Support long filenames (not needed for debs)" + bool "Support for long filenames (not needed for debs)" default BUSYBOX_DEFAULT_FEATURE_AR_LONG_FILENAMES depends on BUSYBOX_CONFIG_AR help @@ -64,27 +74,20 @@ config BUSYBOX_CONFIG_UNCOMPRESS config BUSYBOX_CONFIG_GUNZIP bool "gunzip" default BUSYBOX_DEFAULT_GUNZIP - select BUSYBOX_CONFIG_FEATURE_GZIP_DECOMPRESS help gunzip is used to decompress archives created by gzip. You can use the `-t' option to test the integrity of an archive, without decompressing it. -config BUSYBOX_CONFIG_ZCAT - bool "zcat" - default BUSYBOX_DEFAULT_ZCAT - select BUSYBOX_CONFIG_FEATURE_GZIP_DECOMPRESS - help - Alias to "gunzip -c". - config BUSYBOX_CONFIG_FEATURE_GUNZIP_LONG_OPTIONS bool "Enable long options" default BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS - depends on (BUSYBOX_CONFIG_GUNZIP || BUSYBOX_CONFIG_ZCAT) && BUSYBOX_CONFIG_LONG_OPTS + depends on BUSYBOX_CONFIG_GUNZIP && BUSYBOX_CONFIG_LONG_OPTS + help + Enable use of long options. config BUSYBOX_CONFIG_BUNZIP2 bool "bunzip2" default BUSYBOX_DEFAULT_BUNZIP2 - select BUSYBOX_CONFIG_FEATURE_BZIP2_DECOMPRESS help bunzip2 is a compression utility using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. Compression @@ -94,13 +97,6 @@ config BUSYBOX_CONFIG_BUNZIP2 Unless you have a specific application which requires bunzip2, you should probably say N here. - -config BUSYBOX_CONFIG_BZCAT - bool "bzcat" - default BUSYBOX_DEFAULT_BZCAT - select BUSYBOX_CONFIG_FEATURE_BZIP2_DECOMPRESS - help - Alias to "bunzip2 -c". config BUSYBOX_CONFIG_UNLZMA bool "unlzma" default BUSYBOX_DEFAULT_UNLZMA @@ -113,47 +109,31 @@ config BUSYBOX_CONFIG_UNLZMA The BusyBox unlzma applet is limited to decompression only. On an x86 system, this applet adds about 4K. -config BUSYBOX_CONFIG_LZCAT - bool "lzcat" - default BUSYBOX_DEFAULT_LZCAT - help - unlzma is a compression utility using the Lempel-Ziv-Markov chain - compression algorithm, and range coding. Compression - is generally considerably better than that achieved by the bzip2 - compressors. - - The BusyBox unlzma applet is limited to decompression only. - On an x86 system, this applet adds about 4K. - -config BUSYBOX_CONFIG_LZMA - bool "lzma -d" - default BUSYBOX_DEFAULT_LZMA - help - Enable this option if you want commands like "lzma -d" to work. - IOW: you'll get lzma applet, but it will always require -d option. - config BUSYBOX_CONFIG_FEATURE_LZMA_FAST - bool "Optimize for speed" + bool "Optimize unlzma for speed" default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST - depends on BUSYBOX_CONFIG_UNLZMA || BUSYBOX_CONFIG_LZCAT || BUSYBOX_CONFIG_LZMA + depends on BUSYBOX_CONFIG_UNLZMA help This option reduces decompression time by about 25% at the cost of a 1K bigger binary. + +config BUSYBOX_CONFIG_LZMA + bool "Provide lzma alias which supports only unpacking" + default BUSYBOX_DEFAULT_LZMA + depends on BUSYBOX_CONFIG_UNLZMA + help + Enable this option if you want commands like "lzma -d" to work. + IOW: you'll get lzma applet, but it will always require -d option. config BUSYBOX_CONFIG_UNXZ bool "unxz" default BUSYBOX_DEFAULT_UNXZ help unxz is a unlzma successor. -config BUSYBOX_CONFIG_XZCAT - bool "xzcat" - default BUSYBOX_DEFAULT_XZCAT - help - Alias to "unxz -c". - config BUSYBOX_CONFIG_XZ - bool "xz -d" + bool "Provide xz alias which supports only unpacking" default BUSYBOX_DEFAULT_XZ + depends on BUSYBOX_CONFIG_UNXZ help Enable this option if you want commands like "xz -d" to work. IOW: you'll get xz applet, but it will always require -d option. @@ -169,15 +149,6 @@ config BUSYBOX_CONFIG_BZIP2 Unless you have a specific application which requires bzip2, you should probably say N here. - -config BUSYBOX_CONFIG_FEATURE_BZIP2_DECOMPRESS - bool "Enable decompression" - default BUSYBOX_DEFAULT_FEATURE_BZIP2_DECOMPRESS - depends on BUSYBOX_CONFIG_BZIP2 || BUSYBOX_CONFIG_BUNZIP2 || BUSYBOX_CONFIG_BZCAT - help - Enable -d (--decompress) and -t (--test) options for bzip2. - This will be automatically selected if bunzip2 or bzcat is - enabled. config BUSYBOX_CONFIG_CPIO bool "cpio" default BUSYBOX_DEFAULT_CPIO @@ -187,13 +158,13 @@ config BUSYBOX_CONFIG_CPIO cpio has 110 bytes of overheads for every stored file. This implementation of cpio can extract cpio archives created in the - "newc" or "crc" format. + "newc" or "crc" format, it cannot create or modify them. Unless you have a specific application which requires cpio, you should probably say N here. config BUSYBOX_CONFIG_FEATURE_CPIO_O - bool "Support archive creation" + bool "Support for archive creation" default BUSYBOX_DEFAULT_FEATURE_CPIO_O depends on BUSYBOX_CONFIG_CPIO help @@ -201,7 +172,7 @@ config BUSYBOX_CONFIG_FEATURE_CPIO_O format only. config BUSYBOX_CONFIG_FEATURE_CPIO_P - bool "Support passthrough mode" + bool "Support for passthrough mode" default BUSYBOX_DEFAULT_FEATURE_CPIO_P depends on BUSYBOX_CONFIG_FEATURE_CPIO_O help @@ -227,6 +198,16 @@ config BUSYBOX_CONFIG_DPKG_DEB Unless you have a specific application which requires dpkg-deb, say N here. + +config BUSYBOX_CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY + bool "Extract only (-x)" + default BUSYBOX_DEFAULT_FEATURE_DPKG_DEB_EXTRACT_ONLY + depends on BUSYBOX_CONFIG_DPKG_DEB + help + This reduces dpkg-deb to the equivalent of + "ar -p data.tar.gz | tar -zx". However it saves space as none + of the extra dpkg-deb, ar or tar options are needed, they are linked + to internally. config BUSYBOX_CONFIG_GZIP bool "gzip" default BUSYBOX_DEFAULT_GZIP @@ -238,9 +219,11 @@ config BUSYBOX_CONFIG_FEATURE_GZIP_LONG_OPTIONS bool "Enable long options" default BUSYBOX_DEFAULT_FEATURE_GZIP_LONG_OPTIONS depends on BUSYBOX_CONFIG_GZIP && BUSYBOX_CONFIG_LONG_OPTS + help + Enable use of long options, increases size by about 106 Bytes config BUSYBOX_CONFIG_GZIP_FAST - int "Trade memory for speed (0:small,slow - 2:fast,big)" + int "Trade memory for gzip speed (0:small,slow - 2:fast,big)" default BUSYBOX_DEFAULT_GZIP_FAST range 0 2 depends on BUSYBOX_CONFIG_GZIP @@ -260,37 +243,16 @@ config BUSYBOX_CONFIG_FEATURE_GZIP_LEVELS is 6. If levels 1-3 are specified, 4 is used. If this option is not selected, -N options are ignored and -9 is used. - -config BUSYBOX_CONFIG_FEATURE_GZIP_DECOMPRESS - bool "Enable decompression" - default BUSYBOX_DEFAULT_FEATURE_GZIP_DECOMPRESS - depends on BUSYBOX_CONFIG_GZIP || BUSYBOX_CONFIG_GUNZIP || BUSYBOX_CONFIG_ZCAT - help - Enable -d (--decompress) and -t (--test) options for gzip. - This will be automatically selected if gunzip or zcat is - enabled. config BUSYBOX_CONFIG_LZOP bool "lzop" default BUSYBOX_DEFAULT_LZOP help Lzop compression/decompresion. -config BUSYBOX_CONFIG_UNLZOP - bool "unlzop" - default BUSYBOX_DEFAULT_UNLZOP # INCOMPAT: upstream lzop does not provide such tool - help - Lzop decompresion. - -config BUSYBOX_CONFIG_LZOPCAT - bool "lzopcat" - default BUSYBOX_DEFAULT_LZOPCAT # INCOMPAT: upstream lzop does not provide such tool - help - Alias to "unlzop -c". - config BUSYBOX_CONFIG_LZOP_COMPR_HIGH bool "lzop compression levels 7,8,9 (not very useful)" default BUSYBOX_DEFAULT_LZOP_COMPR_HIGH - depends on BUSYBOX_CONFIG_LZOP || BUSYBOX_CONFIG_UNLZOP || BUSYBOX_CONFIG_LZOPCAT + depends on BUSYBOX_CONFIG_LZOP help High levels (7,8,9) of lzop compression. These levels are actually slower than gzip at equivalent compression ratios @@ -313,15 +275,13 @@ config BUSYBOX_CONFIG_TAR create compressed archives. It's probably the most widely used UNIX archive program. -config BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_TAR_LONG_OPTIONS - depends on BUSYBOX_CONFIG_TAR && BUSYBOX_CONFIG_LONG_OPTS - config BUSYBOX_CONFIG_FEATURE_TAR_CREATE - bool "Enable -c (archive creation)" + bool "Enable archive creation" default BUSYBOX_DEFAULT_FEATURE_TAR_CREATE depends on BUSYBOX_CONFIG_TAR + help + If you enable this option you'll be able to create + tar archives using the `-c' option. config BUSYBOX_CONFIG_FEATURE_TAR_AUTODETECT bool "Autodetect compressed tarballs" @@ -340,7 +300,7 @@ config BUSYBOX_CONFIG_FEATURE_TAR_FROM a list of files to include or exclude from an archive. config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY - bool "Support old tar header format" + bool "Support for old tar header format" default BUSYBOX_DEFAULT_FEATURE_TAR_OLDGNU_COMPATIBILITY depends on BUSYBOX_CONFIG_TAR || BUSYBOX_CONFIG_DPKG help @@ -359,12 +319,22 @@ config BUSYBOX_CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY tarballs still exist. config BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS - bool "Support GNU tar extensions (long filenames)" + bool "Support for GNU tar extensions (long filenames)" default BUSYBOX_DEFAULT_FEATURE_TAR_GNU_EXTENSIONS depends on BUSYBOX_CONFIG_TAR || BUSYBOX_CONFIG_DPKG + help + With this option busybox supports GNU long filenames and + linknames. + +config BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_TAR_LONG_OPTIONS + depends on BUSYBOX_CONFIG_TAR && BUSYBOX_CONFIG_LONG_OPTS + help + Enable use of long options, increases size by about 400 Bytes config BUSYBOX_CONFIG_FEATURE_TAR_TO_COMMAND - bool "Support writing to an external program (--to-command)" + bool "Support for writing to an external program" default BUSYBOX_DEFAULT_FEATURE_TAR_TO_COMMAND depends on BUSYBOX_CONFIG_TAR && BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS help @@ -377,17 +347,20 @@ config BUSYBOX_CONFIG_FEATURE_TAR_UNAME_GNAME default BUSYBOX_DEFAULT_FEATURE_TAR_UNAME_GNAME depends on BUSYBOX_CONFIG_TAR help - Enable use of user and group names in tar. This affects contents + Enables use of user and group names in tar. This affects contents listings (-t) and preserving permissions when unpacking (-p). +200 bytes. config BUSYBOX_CONFIG_FEATURE_TAR_NOPRESERVE_TIME - bool "Enable -m (do not preserve time) GNU option" + bool "Enable -m (do not preserve time) option" default BUSYBOX_DEFAULT_FEATURE_TAR_NOPRESERVE_TIME depends on BUSYBOX_CONFIG_TAR + help + With this option busybox supports GNU tar -m + (do not preserve time) option. config BUSYBOX_CONFIG_FEATURE_TAR_SELINUX - bool "Support extracting SELinux labels" + bool "Support for extracting SELinux labels" default BUSYBOX_DEFAULT_FEATURE_TAR_SELINUX depends on BUSYBOX_CONFIG_TAR && BUSYBOX_CONFIG_SELINUX help @@ -400,31 +373,7 @@ config BUSYBOX_CONFIG_UNZIP unzip will list or extract files from a ZIP archive, commonly found on DOS/WIN systems. The default behavior (with no options) is to extract the archive into the - current directory. - -config BUSYBOX_CONFIG_FEATURE_UNZIP_CDF - bool "Read and use Central Directory data" - default BUSYBOX_DEFAULT_FEATURE_UNZIP_CDF - depends on BUSYBOX_CONFIG_UNZIP - help - If you know that you only need to deal with simple - ZIP files without deleted/updated files, SFX archives etc, - you can reduce code size by unselecting this option. - To support less trivial ZIPs, say Y. - -config BUSYBOX_CONFIG_FEATURE_UNZIP_BZIP2 - bool "Support compression method 12 (bzip2)" - default BUSYBOX_DEFAULT_FEATURE_UNZIP_BZIP2 - depends on BUSYBOX_CONFIG_FEATURE_UNZIP_CDF && BUSYBOX_CONFIG_DESKTOP - -config BUSYBOX_CONFIG_FEATURE_UNZIP_LZMA - bool "Support compression method 14 (lzma)" - default BUSYBOX_DEFAULT_FEATURE_UNZIP_LZMA - depends on BUSYBOX_CONFIG_FEATURE_UNZIP_CDF && BUSYBOX_CONFIG_DESKTOP - -config BUSYBOX_CONFIG_FEATURE_UNZIP_XZ - bool "Support compression method 95 (xz)" - default BUSYBOX_DEFAULT_FEATURE_UNZIP_XZ - depends on BUSYBOX_CONFIG_FEATURE_UNZIP_CDF && BUSYBOX_CONFIG_DESKTOP + current directory. Use the `-d' option to extract to a + directory of your choice. endmenu diff --git a/package/utils/busybox/config/console-tools/Config.in b/package/utils/busybox/config/console-tools/Config.in index dcc19a567..53937d2b5 100644 --- a/package/utils/busybox/config/console-tools/Config.in +++ b/package/utils/busybox/config/console-tools/Config.in @@ -6,6 +6,7 @@ menu "Console Utilities" + config BUSYBOX_CONFIG_CHVT bool "chvt" default BUSYBOX_DEFAULT_CHVT @@ -13,17 +14,27 @@ config BUSYBOX_CONFIG_CHVT help This program is used to change to another terminal. Example: chvt 4 (change to terminal /dev/tty4) + +config BUSYBOX_CONFIG_FGCONSOLE + bool "fgconsole" + default BUSYBOX_DEFAULT_FGCONSOLE + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + This program prints active (foreground) console number. + config BUSYBOX_CONFIG_CLEAR bool "clear" default BUSYBOX_DEFAULT_CLEAR help This program clears the terminal screen. + config BUSYBOX_CONFIG_DEALLOCVT bool "deallocvt" default BUSYBOX_DEFAULT_DEALLOCVT select BUSYBOX_CONFIG_PLATFORM_LINUX help This program deallocates unused virtual consoles. + config BUSYBOX_CONFIG_DUMPKMAP bool "dumpkmap" default BUSYBOX_DEFAULT_DUMPKMAP @@ -31,18 +42,14 @@ config BUSYBOX_CONFIG_DUMPKMAP help This program dumps the kernel's keyboard translation table to stdout, in binary format. You can then use loadkmap to load it. -config BUSYBOX_CONFIG_FGCONSOLE - bool "fgconsole" - default BUSYBOX_DEFAULT_FGCONSOLE - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - This program prints active (foreground) console number. + config BUSYBOX_CONFIG_KBD_MODE bool "kbd_mode" default BUSYBOX_DEFAULT_KBD_MODE select BUSYBOX_CONFIG_PLATFORM_LINUX help This program reports and sets keyboard mode. + config BUSYBOX_CONFIG_LOADFONT bool "loadfont" default BUSYBOX_DEFAULT_LOADFONT @@ -50,6 +57,61 @@ config BUSYBOX_CONFIG_LOADFONT help This program loads a console font from standard input. +config BUSYBOX_CONFIG_LOADKMAP + bool "loadkmap" + default BUSYBOX_DEFAULT_LOADKMAP + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + This program loads a keyboard translation table from + standard input. + +config BUSYBOX_CONFIG_OPENVT + bool "openvt" + default BUSYBOX_DEFAULT_OPENVT + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + This program is used to start a command on an unused + virtual terminal. + +config BUSYBOX_CONFIG_RESET + bool "reset" + default BUSYBOX_DEFAULT_RESET + help + This program is used to reset the terminal screen, if it + gets messed up. + +config BUSYBOX_CONFIG_RESIZE + bool "resize" + default BUSYBOX_DEFAULT_RESIZE + help + This program is used to (re)set the width and height of your current + terminal. + +config BUSYBOX_CONFIG_FEATURE_RESIZE_PRINT + bool "Print environment variables" + default BUSYBOX_DEFAULT_FEATURE_RESIZE_PRINT + depends on BUSYBOX_CONFIG_RESIZE + help + Prints the newly set size (number of columns and rows) of + the terminal. + E.g.: + COLUMNS=80;LINES=44;export COLUMNS LINES; + +config BUSYBOX_CONFIG_SETCONSOLE + bool "setconsole" + default BUSYBOX_DEFAULT_SETCONSOLE + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + This program redirects the system console to another device, + like the current tty while logged in via telnet. + +config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_SETCONSOLE_LONG_OPTIONS + depends on BUSYBOX_CONFIG_SETCONSOLE && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the setconsole applet. + config BUSYBOX_CONFIG_SETFONT bool "setfont" default BUSYBOX_DEFAULT_SETFONT @@ -72,66 +134,6 @@ config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR Directory to use if setfont's params are simple filenames (not /path/to/file or ./file). Default is "" (no default directory). -comment "Common options for loadfont and setfont" - depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT - -config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2 - bool "Support PSF2 console fonts" - default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2 - depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT - -config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW - bool "Support old (raw) console fonts" - default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW - depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT -config BUSYBOX_CONFIG_LOADKMAP - bool "loadkmap" - default BUSYBOX_DEFAULT_LOADKMAP - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - This program loads a keyboard translation table from - standard input. -config BUSYBOX_CONFIG_OPENVT - bool "openvt" - default BUSYBOX_DEFAULT_OPENVT - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - This program is used to start a command on an unused - virtual terminal. -config BUSYBOX_CONFIG_RESET - bool "reset" - default BUSYBOX_DEFAULT_RESET - help - This program is used to reset the terminal screen, if it - gets messed up. -config BUSYBOX_CONFIG_RESIZE - bool "resize" - default BUSYBOX_DEFAULT_RESIZE - help - This program is used to (re)set the width and height of your current - terminal. - -config BUSYBOX_CONFIG_FEATURE_RESIZE_PRINT - bool "Print environment variables" - default BUSYBOX_DEFAULT_FEATURE_RESIZE_PRINT - depends on BUSYBOX_CONFIG_RESIZE - help - Prints the newly set size (number of columns and rows) of - the terminal. - E.g.: - COLUMNS=80;LINES=44;export COLUMNS LINES; -config BUSYBOX_CONFIG_SETCONSOLE - bool "setconsole" - default BUSYBOX_DEFAULT_SETCONSOLE - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - This program redirects the system console to another device, - like the current tty while logged in via telnet. - -config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_SETCONSOLE_LONG_OPTIONS - depends on BUSYBOX_CONFIG_SETCONSOLE && BUSYBOX_CONFIG_LONG_OPTS config BUSYBOX_CONFIG_SETKEYCODES bool "setkeycodes" default BUSYBOX_DEFAULT_SETKEYCODES @@ -139,12 +141,14 @@ config BUSYBOX_CONFIG_SETKEYCODES help This program loads entries into the kernel's scancode-to-keycode map, allowing unusual keyboards to generate usable keycodes. + config BUSYBOX_CONFIG_SETLOGCONS bool "setlogcons" default BUSYBOX_DEFAULT_SETLOGCONS select BUSYBOX_CONFIG_PLATFORM_LINUX help This program redirects the output console of kernel messages. + config BUSYBOX_CONFIG_SHOWKEY bool "showkey" default BUSYBOX_DEFAULT_SHOWKEY @@ -152,4 +156,21 @@ config BUSYBOX_CONFIG_SHOWKEY help Shows keys pressed. +comment "Common options for loadfont and setfont" + depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT + +config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2 + bool "Support for PSF2 console fonts" + default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2 + depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT + help + Support PSF2 console fonts. + +config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW + bool "Support for old (raw) console fonts" + default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW + depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT + help + Support old (raw) console fonts. + endmenu diff --git a/package/utils/busybox/config/coreutils/Config.in b/package/utils/busybox/config/coreutils/Config.in index c4ef1f4fb..ec5611bdf 100644 --- a/package/utils/busybox/config/coreutils/Config.in +++ b/package/utils/busybox/config/coreutils/Config.in @@ -19,70 +19,6 @@ config BUSYBOX_CONFIG_CAT help cat is used to concatenate files and print them to the standard output. Enable this option if you wish to enable the 'cat' utility. - -config BUSYBOX_CONFIG_FEATURE_CATV - bool "cat -v[etA]" - default BUSYBOX_DEFAULT_FEATURE_CATV - depends on BUSYBOX_CONFIG_CAT - help - Display nonprinting characters as escape sequences -config BUSYBOX_CONFIG_CHGRP - bool "chgrp" - default BUSYBOX_DEFAULT_CHGRP - help - chgrp is used to change the group ownership of files. -config BUSYBOX_CONFIG_CHMOD - bool "chmod" - default BUSYBOX_DEFAULT_CHMOD - help - chmod is used to change the access permission of files. -config BUSYBOX_CONFIG_CHOWN - bool "chown" - default BUSYBOX_DEFAULT_CHOWN - help - chown is used to change the user and/or group ownership - of files. - -config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS - depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS -config BUSYBOX_CONFIG_CHROOT - bool "chroot" - default BUSYBOX_DEFAULT_CHROOT - help - chroot is used to change the root directory and run a command. - The default command is `/bin/sh'. -config BUSYBOX_CONFIG_CKSUM - bool "cksum" - default BUSYBOX_DEFAULT_CKSUM - help - cksum is used to calculate the CRC32 checksum of a file. -config BUSYBOX_CONFIG_COMM - bool "comm" - default BUSYBOX_DEFAULT_COMM - help - comm is used to compare two files line by line and return - a three-column output. -config BUSYBOX_CONFIG_CP - bool "cp" - default BUSYBOX_DEFAULT_CP - help - cp is used to copy files and directories. - -config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS - depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS - help - Enable long options. - Also add support for --parents option. -config BUSYBOX_CONFIG_CUT - bool "cut" - default BUSYBOX_DEFAULT_CUT - help - cut is used to print selected parts of lines from - each file to stdout. config BUSYBOX_CONFIG_DATE bool "date" default BUSYBOX_DEFAULT_DATE @@ -157,7 +93,7 @@ config BUSYBOX_CONFIG_FEATURE_DD_IBS_OBS default BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS depends on BUSYBOX_CONFIG_DD help - Enable support for writing a certain number of bytes in and out, + Enables support for writing a certain number of bytes in and out, at a time, and performing conversions on the data stream. config BUSYBOX_CONFIG_FEATURE_DD_STATUS @@ -165,144 +101,7 @@ config BUSYBOX_CONFIG_FEATURE_DD_STATUS default BUSYBOX_DEFAULT_FEATURE_DD_STATUS depends on BUSYBOX_CONFIG_DD help - Enable support for status=noxfer/none option. -config BUSYBOX_CONFIG_DF - bool "df" - default BUSYBOX_DEFAULT_DF - help - df reports the amount of disk space used and available - on filesystems. - -config BUSYBOX_CONFIG_FEATURE_DF_FANCY - bool "Enable -a, -i, -B" - default BUSYBOX_DEFAULT_FEATURE_DF_FANCY - depends on BUSYBOX_CONFIG_DF - help - -a Show all filesystems - -i Inodes - -B Blocksize -config BUSYBOX_CONFIG_DIRNAME - bool "dirname" - default BUSYBOX_DEFAULT_DIRNAME - help - dirname is used to strip a non-directory suffix from - a file name. -config BUSYBOX_CONFIG_DOS2UNIX - bool "dos2unix" - default BUSYBOX_DEFAULT_DOS2UNIX - help - dos2unix is used to convert a text file from DOS format to - UNIX format, and vice versa. - -config BUSYBOX_CONFIG_UNIX2DOS - bool "unix2dos" - default BUSYBOX_DEFAULT_UNIX2DOS - help - unix2dos is used to convert a text file from UNIX format to - DOS format, and vice versa. -config BUSYBOX_CONFIG_DU - bool "du (default blocksize of 512 bytes)" - default BUSYBOX_DEFAULT_DU - help - du is used to report the amount of disk space used - for specified files. - -config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K - bool "Use a default blocksize of 1024 bytes (1K)" - default BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K - depends on BUSYBOX_CONFIG_DU - help - Use a blocksize of (1K) instead of the default 512b. -config BUSYBOX_CONFIG_ECHO - bool "echo (basic SuSv3 version taking no options)" - default BUSYBOX_DEFAULT_ECHO - help - echo is used to print a specified string to stdout. - -# this entry also appears in shell/Config.in, next to the echo builtin -config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO - bool "Enable -n and -e options" - default BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO - depends on BUSYBOX_CONFIG_ECHO || BUSYBOX_CONFIG_ASH_ECHO || BUSYBOX_CONFIG_HUSH_ECHO -config BUSYBOX_CONFIG_ENV - bool "env" - default BUSYBOX_DEFAULT_ENV - help - env is used to set an environment variable and run - a command; without options it displays the current - environment. - -config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS - depends on BUSYBOX_CONFIG_ENV && BUSYBOX_CONFIG_LONG_OPTS -config BUSYBOX_CONFIG_EXPAND - bool "expand" - default BUSYBOX_DEFAULT_EXPAND - help - By default, convert all tabs to spaces. - -config BUSYBOX_CONFIG_FEATURE_EXPAND_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS - depends on BUSYBOX_CONFIG_EXPAND && BUSYBOX_CONFIG_LONG_OPTS - -config BUSYBOX_CONFIG_UNEXPAND - bool "unexpand" - default BUSYBOX_DEFAULT_UNEXPAND - help - By default, convert only leading sequences of blanks to tabs. - -config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS - depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS -config BUSYBOX_CONFIG_EXPR - bool "expr" - default BUSYBOX_DEFAULT_EXPR - help - expr is used to calculate numbers and print the result - to standard output. - -config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64 - bool "Extend Posix numbers support to 64 bit" - default BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64 - depends on BUSYBOX_CONFIG_EXPR - help - Enable 64-bit math support in the expr applet. This will make - the applet slightly larger, but will allow computation with very - large numbers. -config BUSYBOX_CONFIG_FACTOR - bool "factor" - default BUSYBOX_DEFAULT_FACTOR - help - factor factorizes integers -config BUSYBOX_CONFIG_FALSE - bool "false" - default BUSYBOX_DEFAULT_FALSE - help - false returns an exit code of FALSE (1). -config BUSYBOX_CONFIG_FOLD - bool "fold" - default BUSYBOX_DEFAULT_FOLD - help - Wrap text to fit a specific width. -config BUSYBOX_CONFIG_FSYNC - bool "fsync" - default BUSYBOX_DEFAULT_FSYNC - help - fsync is used to flush file-related cached blocks to disk. -config BUSYBOX_CONFIG_HEAD - bool "head" - default BUSYBOX_DEFAULT_HEAD - help - head is used to print the first specified number of lines - from files. - -config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD - bool "Enable -c, -q, and -v" - default BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD - depends on BUSYBOX_CONFIG_HEAD + Enables support for status=noxfer/none option. config BUSYBOX_CONFIG_HOSTID bool "hostid" default BUSYBOX_DEFAULT_HOSTID @@ -314,336 +113,16 @@ config BUSYBOX_CONFIG_ID default BUSYBOX_DEFAULT_ID help id displays the current user and group ID names. - config BUSYBOX_CONFIG_GROUPS bool "groups" default BUSYBOX_DEFAULT_GROUPS help Print the group names associated with current user id. -config BUSYBOX_CONFIG_INSTALL - bool "install" - default BUSYBOX_DEFAULT_INSTALL - help - Copy files and set attributes. - -config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_INSTALL_LONG_OPTIONS - depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_LONG_OPTS -config BUSYBOX_CONFIG_LINK - bool "link" - default BUSYBOX_DEFAULT_LINK - help - link creates hard links between files. -config BUSYBOX_CONFIG_LN - bool "ln" - default BUSYBOX_DEFAULT_LN - help - ln is used to create hard or soft links between files. -config BUSYBOX_CONFIG_LOGNAME - bool "logname" - default BUSYBOX_DEFAULT_LOGNAME - help - logname is used to print the current user's login name. -config BUSYBOX_CONFIG_LS - bool "ls" - default BUSYBOX_DEFAULT_LS - help - ls is used to list the contents of directories. - -config BUSYBOX_CONFIG_FEATURE_LS_FILETYPES - bool "Enable filetyping options (-p and -F)" - default BUSYBOX_DEFAULT_FEATURE_LS_FILETYPES - depends on BUSYBOX_CONFIG_LS - -config BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS - bool "Enable symlinks dereferencing (-L)" - default BUSYBOX_DEFAULT_FEATURE_LS_FOLLOWLINKS - depends on BUSYBOX_CONFIG_LS - -config BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE - bool "Enable recursion (-R)" - default BUSYBOX_DEFAULT_FEATURE_LS_RECURSIVE - depends on BUSYBOX_CONFIG_LS - -config BUSYBOX_CONFIG_FEATURE_LS_WIDTH - bool "Enable -w WIDTH and window size autodetection" - default BUSYBOX_DEFAULT_FEATURE_LS_WIDTH - depends on BUSYBOX_CONFIG_LS - -config BUSYBOX_CONFIG_FEATURE_LS_SORTFILES - bool "Sort the file names" - default BUSYBOX_DEFAULT_FEATURE_LS_SORTFILES - depends on BUSYBOX_CONFIG_LS - help - Allow ls to sort file names alphabetically. - -config BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS - bool "Show file timestamps" - default BUSYBOX_DEFAULT_FEATURE_LS_TIMESTAMPS - depends on BUSYBOX_CONFIG_LS - help - Allow ls to display timestamps for files. - -config BUSYBOX_CONFIG_FEATURE_LS_USERNAME - bool "Show username/groupnames" - default BUSYBOX_DEFAULT_FEATURE_LS_USERNAME - depends on BUSYBOX_CONFIG_LS - help - Allow ls to display username/groupname for files. - -config BUSYBOX_CONFIG_FEATURE_LS_COLOR - bool "Allow use of color to identify file types" - default BUSYBOX_DEFAULT_FEATURE_LS_COLOR - depends on BUSYBOX_CONFIG_LS && BUSYBOX_CONFIG_LONG_OPTS - help - This enables the --color option to ls. - -config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT - bool "Produce colored ls output by default" - default BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT - depends on BUSYBOX_CONFIG_FEATURE_LS_COLOR - help - Saying yes here will turn coloring on by default, - even if no "--color" option is given to the ls command. - This is not recommended, since the colors are not - configurable, and the output may not be legible on - many output screens. -config BUSYBOX_CONFIG_MD5SUM - bool "md5sum" - default BUSYBOX_DEFAULT_MD5SUM - help - md5sum is used to print or check MD5 checksums. - -config BUSYBOX_CONFIG_SHA1SUM - bool "sha1sum" - default BUSYBOX_DEFAULT_SHA1SUM - help - Compute and check SHA1 message digest - -config BUSYBOX_CONFIG_SHA256SUM - bool "sha256sum" - default BUSYBOX_DEFAULT_SHA256SUM - help - Compute and check SHA256 message digest - -config BUSYBOX_CONFIG_SHA512SUM - bool "sha512sum" - default BUSYBOX_DEFAULT_SHA512SUM - help - Compute and check SHA512 message digest - -config BUSYBOX_CONFIG_SHA3SUM - bool "sha3sum" - default BUSYBOX_DEFAULT_SHA3SUM - help - Compute and check SHA3 message digest - -comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum" - depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM - -config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK - bool "Enable -c, -s and -w options" - default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK - depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM - help - Enabling the -c options allows files to be checked - against pre-calculated hash values. - -s and -w are useful options when verifying checksums. -config BUSYBOX_CONFIG_MKDIR - bool "mkdir" - default BUSYBOX_DEFAULT_MKDIR - help - mkdir is used to create directories with the specified names. - -config BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_MKDIR_LONG_OPTIONS - depends on BUSYBOX_CONFIG_MKDIR && BUSYBOX_CONFIG_LONG_OPTS -config BUSYBOX_CONFIG_MKFIFO - bool "mkfifo" - default BUSYBOX_DEFAULT_MKFIFO - help - mkfifo is used to create FIFOs (named pipes). - The 'mknod' program can also create FIFOs. -config BUSYBOX_CONFIG_MKNOD - bool "mknod" - default BUSYBOX_DEFAULT_MKNOD - help - mknod is used to create FIFOs or block/character special - files with the specified names. -config BUSYBOX_CONFIG_MKTEMP - bool "mktemp" - default BUSYBOX_DEFAULT_MKTEMP - help - mktemp is used to create unique temporary files -config BUSYBOX_CONFIG_MV - bool "mv" - default BUSYBOX_DEFAULT_MV - help - mv is used to move or rename files or directories. - -config BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_MV_LONG_OPTIONS - depends on BUSYBOX_CONFIG_MV && BUSYBOX_CONFIG_LONG_OPTS -config BUSYBOX_CONFIG_NICE - bool "nice" - default BUSYBOX_DEFAULT_NICE - help - nice runs a program with modified scheduling priority. -config BUSYBOX_CONFIG_NL - bool "nl" - default BUSYBOX_DEFAULT_NL - help - nl is used to number lines of files. -config BUSYBOX_CONFIG_NOHUP - bool "nohup" - default BUSYBOX_DEFAULT_NOHUP - help - run a command immune to hangups, with output to a non-tty. -config BUSYBOX_CONFIG_NPROC - bool "nproc" - default BUSYBOX_DEFAULT_NPROC - help - Print number of CPUs -config BUSYBOX_CONFIG_OD - bool "od" - default BUSYBOX_DEFAULT_OD - help - od is used to dump binary files in octal and other formats. -config BUSYBOX_CONFIG_PASTE - bool "paste" - default BUSYBOX_DEFAULT_PASTE - help - paste is used to paste lines of different files together - and write the result to stdout -config BUSYBOX_CONFIG_PRINTENV - bool "printenv" - default BUSYBOX_DEFAULT_PRINTENV - help - printenv is used to print all or part of environment. -config BUSYBOX_CONFIG_PRINTF - bool "printf" - default BUSYBOX_DEFAULT_PRINTF - help - printf is used to format and print specified strings. - It's similar to `echo' except it has more options. -config BUSYBOX_CONFIG_PWD - bool "pwd" - default BUSYBOX_DEFAULT_PWD - help - pwd is used to print the current directory. -config BUSYBOX_CONFIG_READLINK - bool "readlink" - default BUSYBOX_DEFAULT_READLINK - help - This program reads a symbolic link and returns the name - of the file it points to - -config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW - bool "Enable canonicalization by following all symlinks (-f)" - default BUSYBOX_DEFAULT_FEATURE_READLINK_FOLLOW - depends on BUSYBOX_CONFIG_READLINK - help - Enable the readlink option (-f). -config BUSYBOX_CONFIG_REALPATH - bool "realpath" - default BUSYBOX_DEFAULT_REALPATH - help - Return the canonicalized absolute pathname. - This isn't provided by GNU shellutils, but where else does it belong. -config BUSYBOX_CONFIG_RM - bool "rm" - default BUSYBOX_DEFAULT_RM - help - rm is used to remove files or directories. -config BUSYBOX_CONFIG_RMDIR - bool "rmdir" - default BUSYBOX_DEFAULT_RMDIR - help - rmdir is used to remove empty directories. - -config BUSYBOX_CONFIG_FEATURE_RMDIR_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_RMDIR_LONG_OPTIONS - depends on BUSYBOX_CONFIG_RMDIR && BUSYBOX_CONFIG_LONG_OPTS - help - Support long options for the rmdir applet, including - --ignore-fail-on-non-empty for compatibility with GNU rmdir. -config BUSYBOX_CONFIG_SEQ - bool "seq" - default BUSYBOX_DEFAULT_SEQ - help - print a sequence of numbers -config BUSYBOX_CONFIG_SHRED - bool "shred" - default BUSYBOX_DEFAULT_SHRED - help - Overwrite a file to hide its contents, and optionally delete it config BUSYBOX_CONFIG_SHUF bool "shuf" default BUSYBOX_DEFAULT_SHUF help Generate random permutations -config BUSYBOX_CONFIG_SLEEP - bool "sleep" - default BUSYBOX_DEFAULT_SLEEP - help - sleep is used to pause for a specified number of seconds. - It comes in 3 versions: - - small: takes one integer parameter - - fancy: takes multiple integer arguments with suffixes: - sleep 1d 2h 3m 15s - - fancy with fractional numbers: - sleep 2.3s 4.5h sleeps for 16202.3 seconds - Last one is "the most compatible" with coreutils sleep, - but it adds around 1k of code. - -config BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP - bool "Enable multiple arguments and s/m/h/d suffixes" - default BUSYBOX_DEFAULT_FEATURE_FANCY_SLEEP - depends on BUSYBOX_CONFIG_SLEEP - help - Allow sleep to pause for specified minutes, hours, and days. - -config BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP - bool "Enable fractional arguments" - default BUSYBOX_DEFAULT_FEATURE_FLOAT_SLEEP - depends on BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP - help - Allow for fractional numeric parameters. -config BUSYBOX_CONFIG_SORT - bool "sort" - default BUSYBOX_DEFAULT_SORT - help - sort is used to sort lines of text in specified files. - -config BUSYBOX_CONFIG_FEATURE_SORT_BIG - bool "Full SuSv3 compliant sort (support -ktcsbdfiozgM)" - default BUSYBOX_DEFAULT_FEATURE_SORT_BIG - depends on BUSYBOX_CONFIG_SORT - help - Without this, sort only supports -r, -u, and an integer version - of -n. Selecting this adds sort keys, floating point support, and - more. This adds a little over 3k to a nonstatic build on x86. - - The SuSv3 sort standard is available at: - http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html -config BUSYBOX_CONFIG_SPLIT - bool "split" - default BUSYBOX_DEFAULT_SPLIT - help - Split a file into pieces. - -config BUSYBOX_CONFIG_FEATURE_SPLIT_FANCY - bool "Fancy extensions" - default BUSYBOX_DEFAULT_FEATURE_SPLIT_FANCY - depends on BUSYBOX_CONFIG_SPLIT - help - Add support for features not required by SUSv3. - Supports additional suffixes 'b' for 512 bytes, - 'g' for 1GiB for the -b option. config BUSYBOX_CONFIG_STAT bool "stat" default BUSYBOX_DEFAULT_STAT @@ -667,64 +146,18 @@ config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM help Without this, stat will not support the '-f' option to display information about filesystem status. -config BUSYBOX_CONFIG_STTY - bool "stty" - default BUSYBOX_DEFAULT_STTY - help - stty is used to change and print terminal line settings. -config BUSYBOX_CONFIG_SUM - bool "sum" - default BUSYBOX_DEFAULT_SUM - help - checksum and count the blocks in a file config BUSYBOX_CONFIG_SYNC bool "sync" default BUSYBOX_DEFAULT_SYNC help sync is used to flush filesystem buffers. config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY - bool "Enable -d and -f flags (requires syncfs(2) in libc)" + bool "Enable -d and -f flags (requres syncfs(2) in libc)" default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY depends on BUSYBOX_CONFIG_SYNC help sync -d FILE... executes fdatasync() on each FILE. sync -f FILE... executes syncfs() on each FILE. -config BUSYBOX_CONFIG_TAC - bool "tac" - default BUSYBOX_DEFAULT_TAC - help - tac is used to concatenate and print files in reverse. -config BUSYBOX_CONFIG_TAIL - bool "tail" - default BUSYBOX_DEFAULT_TAIL - help - tail is used to print the last specified number of lines - from files. - -config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL - bool "Enable -q, -s, -v, and -F options" - default BUSYBOX_DEFAULT_FEATURE_FANCY_TAIL - depends on BUSYBOX_CONFIG_TAIL - help - These options are provided by GNU tail, but - are not specific in the SUSv3 standard: - -q Never output headers giving file names - -s SEC Wait SEC seconds between reads with -f - -v Always output headers giving file names - -F Same as -f, but keep retrying -config BUSYBOX_CONFIG_TEE - bool "tee" - default BUSYBOX_DEFAULT_TEE - help - tee is used to read from standard input and write - to standard output and files. - -config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO - bool "Enable block I/O (larger/faster) instead of byte I/O" - default BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO - depends on BUSYBOX_CONFIG_TEE - help - Enable this option for a faster tee, at expense of size. config BUSYBOX_CONFIG_TEST bool "test" default BUSYBOX_DEFAULT_TEST @@ -733,30 +166,12 @@ config BUSYBOX_CONFIG_TEST returning an appropriate exit code. The bash shell has test built in, ash can build it in optionally. -config BUSYBOX_CONFIG_TEST1 - bool "test as [" - default BUSYBOX_DEFAULT_TEST1 - help - Provide test command in the "[ EXPR ]" form - -config BUSYBOX_CONFIG_TEST2 - bool "test as [[" - default BUSYBOX_DEFAULT_TEST2 - help - Provide test command in the "[[ EXPR ]]" form - config BUSYBOX_CONFIG_FEATURE_TEST_64 bool "Extend test to 64 bit" default BUSYBOX_DEFAULT_FEATURE_TEST_64 - depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_TEST1 || BUSYBOX_CONFIG_TEST2 || BUSYBOX_CONFIG_ASH_TEST || BUSYBOX_CONFIG_HUSH_TEST + depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_ASH_BUILTIN_TEST || BUSYBOX_CONFIG_HUSH help Enable 64-bit support in test. -config BUSYBOX_CONFIG_TIMEOUT - bool "timeout" - default BUSYBOX_DEFAULT_TIMEOUT - help - Runs a program and watches it. If it does not terminate in - specified number of seconds, it is sent a signal. config BUSYBOX_CONFIG_TOUCH bool "touch" default BUSYBOX_DEFAULT_TOUCH @@ -803,23 +218,636 @@ config BUSYBOX_CONFIG_FEATURE_TR_EQUIV replace all instances of 'a' with 'xyz'. This option is mainly useful for cases when no other way of expressing a character is possible. -config BUSYBOX_CONFIG_TRUE - bool "true" - default BUSYBOX_DEFAULT_TRUE - help - true returns an exit code of TRUE (0). config BUSYBOX_CONFIG_TRUNCATE bool "truncate" default BUSYBOX_DEFAULT_TRUNCATE help truncate truncates files to a given size. If a file does not exist, it is created unless told otherwise. +config BUSYBOX_CONFIG_UNLINK + bool "unlink" + default BUSYBOX_DEFAULT_UNLINK + help + unlink deletes a file by calling unlink() +config BUSYBOX_CONFIG_BASE64 + bool "base64" + default BUSYBOX_DEFAULT_BASE64 + help + Base64 encode and decode +config BUSYBOX_CONFIG_WHO + bool "who" + default BUSYBOX_DEFAULT_WHO + depends on BUSYBOX_CONFIG_FEATURE_UTMP + help + who is used to show who is logged on. +config BUSYBOX_CONFIG_USERS + bool "users" + default BUSYBOX_DEFAULT_USERS + depends on BUSYBOX_CONFIG_FEATURE_UTMP + help + Print users currently logged on. + +config BUSYBOX_CONFIG_CAL + bool "cal" + default BUSYBOX_DEFAULT_CAL + help + cal is used to display a monthly calendar. + +config BUSYBOX_CONFIG_CATV + bool "catv" + default BUSYBOX_DEFAULT_CATV + help + Display nonprinting characters as escape sequences (like some + implementations' cat -v option). + +config BUSYBOX_CONFIG_CHGRP + bool "chgrp" + default BUSYBOX_DEFAULT_CHGRP + help + chgrp is used to change the group ownership of files. + +config BUSYBOX_CONFIG_CHMOD + bool "chmod" + default BUSYBOX_DEFAULT_CHMOD + help + chmod is used to change the access permission of files. + +config BUSYBOX_CONFIG_CHOWN + bool "chown" + default BUSYBOX_DEFAULT_CHOWN + help + chown is used to change the user and/or group ownership + of files. + +config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS + depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS + help + Enable use of long options + +config BUSYBOX_CONFIG_CHROOT + bool "chroot" + default BUSYBOX_DEFAULT_CHROOT + help + chroot is used to change the root directory and run a command. + The default command is `/bin/sh'. + +config BUSYBOX_CONFIG_CKSUM + bool "cksum" + default BUSYBOX_DEFAULT_CKSUM + help + cksum is used to calculate the CRC32 checksum of a file. + +config BUSYBOX_CONFIG_COMM + bool "comm" + default BUSYBOX_DEFAULT_COMM + help + comm is used to compare two files line by line and return + a three-column output. + +config BUSYBOX_CONFIG_CP + bool "cp" + default BUSYBOX_DEFAULT_CP + help + cp is used to copy files and directories. + +config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS + bool "Enable long options for cp" + default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS + depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS + help + Enable long options for cp. + Also add support for --parents option. + +config BUSYBOX_CONFIG_CUT + bool "cut" + default BUSYBOX_DEFAULT_CUT + help + cut is used to print selected parts of lines from + each file to stdout. + +config BUSYBOX_CONFIG_DF + bool "df" + default BUSYBOX_DEFAULT_DF + help + df reports the amount of disk space used and available + on filesystems. + +config BUSYBOX_CONFIG_FEATURE_DF_FANCY + bool "Enable -a, -i, -B" + default BUSYBOX_DEFAULT_FEATURE_DF_FANCY + depends on BUSYBOX_CONFIG_DF + help + This option enables -a, -i and -B. + + -a Show all filesystems + -i Inodes + -B Blocksize + +config BUSYBOX_CONFIG_DIRNAME + bool "dirname" + default BUSYBOX_DEFAULT_DIRNAME + help + dirname is used to strip a non-directory suffix from + a file name. + +config BUSYBOX_CONFIG_DOS2UNIX + bool "dos2unix/unix2dos" + default BUSYBOX_DEFAULT_DOS2UNIX + help + dos2unix is used to convert a text file from DOS format to + UNIX format, and vice versa. + +config BUSYBOX_CONFIG_UNIX2DOS + bool + default BUSYBOX_DEFAULT_UNIX2DOS + depends on BUSYBOX_CONFIG_DOS2UNIX + help + unix2dos is used to convert a text file from UNIX format to + DOS format, and vice versa. + +config BUSYBOX_CONFIG_DU + bool "du (default blocksize of 512 bytes)" + default BUSYBOX_DEFAULT_DU + help + du is used to report the amount of disk space used + for specified files. + +config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K + bool "Use a default blocksize of 1024 bytes (1K)" + default BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K + depends on BUSYBOX_CONFIG_DU + help + Use a blocksize of (1K) instead of the default 512b. + +config BUSYBOX_CONFIG_ECHO + bool "echo (basic SuSv3 version taking no options)" + default BUSYBOX_DEFAULT_ECHO + help + echo is used to print a specified string to stdout. + +# this entry also appears in shell/Config.in, next to the echo builtin +config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO + bool "Enable echo options (-n and -e)" + default BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO + depends on BUSYBOX_CONFIG_ECHO || BUSYBOX_CONFIG_ASH_BUILTIN_ECHO || BUSYBOX_CONFIG_HUSH + help + This adds options (-n and -e) to echo. + +config BUSYBOX_CONFIG_ENV + bool "env" + default BUSYBOX_DEFAULT_ENV + help + env is used to set an environment variable and run + a command; without options it displays the current + environment. + +config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_ENV_LONG_OPTIONS + depends on BUSYBOX_CONFIG_ENV && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the env applet. + +config BUSYBOX_CONFIG_EXPAND + bool "expand" + default BUSYBOX_DEFAULT_EXPAND + help + By default, convert all tabs to spaces. + +config BUSYBOX_CONFIG_FEATURE_EXPAND_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_EXPAND_LONG_OPTIONS + depends on BUSYBOX_CONFIG_EXPAND && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the expand applet. + +config BUSYBOX_CONFIG_EXPR + bool "expr" + default BUSYBOX_DEFAULT_EXPR + help + expr is used to calculate numbers and print the result + to standard output. + +config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64 + bool "Extend Posix numbers support to 64 bit" + default BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64 + depends on BUSYBOX_CONFIG_EXPR + help + Enable 64-bit math support in the expr applet. This will make + the applet slightly larger, but will allow computation with very + large numbers. + +config BUSYBOX_CONFIG_FALSE + bool "false" + default BUSYBOX_DEFAULT_FALSE + help + false returns an exit code of FALSE (1). + +config BUSYBOX_CONFIG_FOLD + bool "fold" + default BUSYBOX_DEFAULT_FOLD + help + Wrap text to fit a specific width. + +config BUSYBOX_CONFIG_FSYNC + bool "fsync" + default BUSYBOX_DEFAULT_FSYNC + help + fsync is used to flush file-related cached blocks to disk. + +config BUSYBOX_CONFIG_HEAD + bool "head" + default BUSYBOX_DEFAULT_HEAD + help + head is used to print the first specified number of lines + from files. + +config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD + bool "Enable head options (-c, -q, and -v)" + default BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD + depends on BUSYBOX_CONFIG_HEAD + help + This enables the head options (-c, -q, and -v). + +config BUSYBOX_CONFIG_INSTALL + bool "install" + default BUSYBOX_DEFAULT_INSTALL + help + Copy files and set attributes. + +config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_INSTALL_LONG_OPTIONS + depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the install applet. + +####config LENGTH +#### bool "length" +#### default y +#### help +#### length is used to print out the length of a specified string. + +config BUSYBOX_CONFIG_LN + bool "ln" + default BUSYBOX_DEFAULT_LN + help + ln is used to create hard or soft links between files. + +config BUSYBOX_CONFIG_LOGNAME + bool "logname" + default BUSYBOX_DEFAULT_LOGNAME + help + logname is used to print the current user's login name. + +config BUSYBOX_CONFIG_LS + bool "ls" + default BUSYBOX_DEFAULT_LS + help + ls is used to list the contents of directories. + +config BUSYBOX_CONFIG_FEATURE_LS_FILETYPES + bool "Enable filetyping options (-p and -F)" + default BUSYBOX_DEFAULT_FEATURE_LS_FILETYPES + depends on BUSYBOX_CONFIG_LS + help + Enable the ls options (-p and -F). + +config BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS + bool "Enable symlinks dereferencing (-L)" + default BUSYBOX_DEFAULT_FEATURE_LS_FOLLOWLINKS + depends on BUSYBOX_CONFIG_LS + help + Enable the ls option (-L). + +config BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE + bool "Enable recursion (-R)" + default BUSYBOX_DEFAULT_FEATURE_LS_RECURSIVE + depends on BUSYBOX_CONFIG_LS + help + Enable the ls option (-R). + +config BUSYBOX_CONFIG_FEATURE_LS_SORTFILES + bool "Sort the file names" + default BUSYBOX_DEFAULT_FEATURE_LS_SORTFILES + depends on BUSYBOX_CONFIG_LS + help + Allow ls to sort file names alphabetically. + +config BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS + bool "Show file timestamps" + default BUSYBOX_DEFAULT_FEATURE_LS_TIMESTAMPS + depends on BUSYBOX_CONFIG_LS + help + Allow ls to display timestamps for files. + +config BUSYBOX_CONFIG_FEATURE_LS_USERNAME + bool "Show username/groupnames" + default BUSYBOX_DEFAULT_FEATURE_LS_USERNAME + depends on BUSYBOX_CONFIG_LS + help + Allow ls to display username/groupname for files. + +config BUSYBOX_CONFIG_FEATURE_LS_COLOR + bool "Allow use of color to identify file types" + default BUSYBOX_DEFAULT_FEATURE_LS_COLOR + depends on BUSYBOX_CONFIG_LS && BUSYBOX_CONFIG_LONG_OPTS + help + This enables the --color option to ls. + +config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT + bool "Produce colored ls output by default" + default BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT + depends on BUSYBOX_CONFIG_FEATURE_LS_COLOR + help + Saying yes here will turn coloring on by default, + even if no "--color" option is given to the ls command. + This is not recommended, since the colors are not + configurable, and the output may not be legible on + many output screens. + +config BUSYBOX_CONFIG_MD5SUM + bool "md5sum" + default BUSYBOX_DEFAULT_MD5SUM + help + md5sum is used to print or check MD5 checksums. + +config BUSYBOX_CONFIG_MKDIR + bool "mkdir" + default BUSYBOX_DEFAULT_MKDIR + help + mkdir is used to create directories with the specified names. + +config BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_MKDIR_LONG_OPTIONS + depends on BUSYBOX_CONFIG_MKDIR && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the mkdir applet. + +config BUSYBOX_CONFIG_MKFIFO + bool "mkfifo" + default BUSYBOX_DEFAULT_MKFIFO + help + mkfifo is used to create FIFOs (named pipes). + The `mknod' program can also create FIFOs. + +config BUSYBOX_CONFIG_MKNOD + bool "mknod" + default BUSYBOX_DEFAULT_MKNOD + help + mknod is used to create FIFOs or block/character special + files with the specified names. + +config BUSYBOX_CONFIG_MV + bool "mv" + default BUSYBOX_DEFAULT_MV + help + mv is used to move or rename files or directories. + +config BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_MV_LONG_OPTIONS + depends on BUSYBOX_CONFIG_MV && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the mv applet. + +config BUSYBOX_CONFIG_NICE + bool "nice" + default BUSYBOX_DEFAULT_NICE + help + nice runs a program with modified scheduling priority. + +config BUSYBOX_CONFIG_NOHUP + bool "nohup" + default BUSYBOX_DEFAULT_NOHUP + help + run a command immune to hangups, with output to a non-tty. + +config BUSYBOX_CONFIG_OD + bool "od" + default BUSYBOX_DEFAULT_OD + help + od is used to dump binary files in octal and other formats. + +config BUSYBOX_CONFIG_PRINTENV + bool "printenv" + default BUSYBOX_DEFAULT_PRINTENV + help + printenv is used to print all or part of environment. + +config BUSYBOX_CONFIG_PRINTF + bool "printf" + default BUSYBOX_DEFAULT_PRINTF + help + printf is used to format and print specified strings. + It's similar to `echo' except it has more options. + +config BUSYBOX_CONFIG_PWD + bool "pwd" + default BUSYBOX_DEFAULT_PWD + help + pwd is used to print the current directory. + +config BUSYBOX_CONFIG_READLINK + bool "readlink" + default BUSYBOX_DEFAULT_READLINK + help + This program reads a symbolic link and returns the name + of the file it points to + +config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW + bool "Enable canonicalization by following all symlinks (-f)" + default BUSYBOX_DEFAULT_FEATURE_READLINK_FOLLOW + depends on BUSYBOX_CONFIG_READLINK + help + Enable the readlink option (-f). + +config BUSYBOX_CONFIG_REALPATH + bool "realpath" + default BUSYBOX_DEFAULT_REALPATH + help + Return the canonicalized absolute pathname. + This isn't provided by GNU shellutils, but where else does it belong. + +config BUSYBOX_CONFIG_RM + bool "rm" + default BUSYBOX_DEFAULT_RM + help + rm is used to remove files or directories. + +config BUSYBOX_CONFIG_RMDIR + bool "rmdir" + default BUSYBOX_DEFAULT_RMDIR + help + rmdir is used to remove empty directories. + +config BUSYBOX_CONFIG_FEATURE_RMDIR_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_RMDIR_LONG_OPTIONS + depends on BUSYBOX_CONFIG_RMDIR && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the rmdir applet, including + --ignore-fail-on-non-empty for compatibility with GNU rmdir. + +config BUSYBOX_CONFIG_SEQ + bool "seq" + default BUSYBOX_DEFAULT_SEQ + help + print a sequence of numbers + +config BUSYBOX_CONFIG_SHA1SUM + bool "sha1sum" + default BUSYBOX_DEFAULT_SHA1SUM + help + Compute and check SHA1 message digest + +config BUSYBOX_CONFIG_SHA256SUM + bool "sha256sum" + default BUSYBOX_DEFAULT_SHA256SUM + help + Compute and check SHA256 message digest + +config BUSYBOX_CONFIG_SHA512SUM + bool "sha512sum" + default BUSYBOX_DEFAULT_SHA512SUM + help + Compute and check SHA512 message digest + +config BUSYBOX_CONFIG_SHA3SUM + bool "sha3sum" + default BUSYBOX_DEFAULT_SHA3SUM + help + Compute and check SHA3 (512-bit) message digest + +config BUSYBOX_CONFIG_SLEEP + bool "sleep" + default BUSYBOX_DEFAULT_SLEEP + help + sleep is used to pause for a specified number of seconds. + It comes in 3 versions: + - small: takes one integer parameter + - fancy: takes multiple integer arguments with suffixes: + sleep 1d 2h 3m 15s + - fancy with fractional numbers: + sleep 2.3s 4.5h sleeps for 16202.3 seconds + Last one is "the most compatible" with coreutils sleep, + but it adds around 1k of code. + +config BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP + bool "Enable multiple arguments and s/m/h/d suffixes" + default BUSYBOX_DEFAULT_FEATURE_FANCY_SLEEP + depends on BUSYBOX_CONFIG_SLEEP + help + Allow sleep to pause for specified minutes, hours, and days. + +config BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP + bool "Enable fractional arguments" + default BUSYBOX_DEFAULT_FEATURE_FLOAT_SLEEP + depends on BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP + help + Allow for fractional numeric parameters. + +config BUSYBOX_CONFIG_SORT + bool "sort" + default BUSYBOX_DEFAULT_SORT + help + sort is used to sort lines of text in specified files. + +config BUSYBOX_CONFIG_FEATURE_SORT_BIG + bool "Full SuSv3 compliant sort (support -ktcsbdfiozgM)" + default BUSYBOX_DEFAULT_FEATURE_SORT_BIG + depends on BUSYBOX_CONFIG_SORT + help + Without this, sort only supports -r, -u, and an integer version + of -n. Selecting this adds sort keys, floating point support, and + more. This adds a little over 3k to a nonstatic build on x86. + + The SuSv3 sort standard is available at: + http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html + +config BUSYBOX_CONFIG_SPLIT + bool "split" + default BUSYBOX_DEFAULT_SPLIT + help + split a file into pieces. + +config BUSYBOX_CONFIG_FEATURE_SPLIT_FANCY + bool "Fancy extensions" + default BUSYBOX_DEFAULT_FEATURE_SPLIT_FANCY + depends on BUSYBOX_CONFIG_SPLIT + help + Add support for features not required by SUSv3. + Supports additional suffixes 'b' for 512 bytes, + 'g' for 1GiB for the -b option. + +config BUSYBOX_CONFIG_STTY + bool "stty" + default BUSYBOX_DEFAULT_STTY + help + stty is used to change and print terminal line settings. + +config BUSYBOX_CONFIG_SUM + bool "sum" + default BUSYBOX_DEFAULT_SUM + help + checksum and count the blocks in a file + +config BUSYBOX_CONFIG_TAC + bool "tac" + default BUSYBOX_DEFAULT_TAC + help + tac is used to concatenate and print files in reverse. + +config BUSYBOX_CONFIG_TAIL + bool "tail" + default BUSYBOX_DEFAULT_TAIL + help + tail is used to print the last specified number of lines + from files. + +config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL + bool "Enable extra tail options (-q, -s, -v, and -F)" + default BUSYBOX_DEFAULT_FEATURE_FANCY_TAIL + depends on BUSYBOX_CONFIG_TAIL + help + The options (-q, -s, -v and -F) are provided by GNU tail, but + are not specific in the SUSv3 standard. + + -q Never output headers giving file names + -s SEC Wait SEC seconds between reads with -f + -v Always output headers giving file names + -F Same as -f, but keep retrying + +config BUSYBOX_CONFIG_TEE + bool "tee" + default BUSYBOX_DEFAULT_TEE + help + tee is used to read from standard input and write + to standard output and files. + +config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO + bool "Enable block I/O (larger/faster) instead of byte I/O" + default BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO + depends on BUSYBOX_CONFIG_TEE + help + Enable this option for a faster tee, at expense of size. + +config BUSYBOX_CONFIG_TRUE + bool "true" + default BUSYBOX_DEFAULT_TRUE + help + true returns an exit code of TRUE (0). + config BUSYBOX_CONFIG_TTY bool "tty" default BUSYBOX_DEFAULT_TTY help tty is used to print the name of the current terminal to standard output. + config BUSYBOX_CONFIG_UNAME bool "uname" default BUSYBOX_DEFAULT_UNAME @@ -833,36 +861,44 @@ config BUSYBOX_CONFIG_UNAME_OSNAME help Sets the operating system name reported by uname -o. The default BUSYBOX_DEFAULT_UNAME_OSNAME "GNU/Linux". + +config BUSYBOX_CONFIG_UNEXPAND + bool "unexpand" + default BUSYBOX_DEFAULT_UNEXPAND + help + By default, convert only leading sequences of blanks to tabs. + +config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_UNEXPAND_LONG_OPTIONS + depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the unexpand applet. + config BUSYBOX_CONFIG_UNIQ bool "uniq" default BUSYBOX_DEFAULT_UNIQ help uniq is used to remove duplicate lines from a sorted file. -config BUSYBOX_CONFIG_UNLINK - bool "unlink" - default BUSYBOX_DEFAULT_UNLINK - help - unlink deletes a file by calling unlink() + config BUSYBOX_CONFIG_USLEEP bool "usleep" default BUSYBOX_DEFAULT_USLEEP help usleep is used to pause for a specified number of microseconds. + config BUSYBOX_CONFIG_UUDECODE bool "uudecode" default BUSYBOX_DEFAULT_UUDECODE help uudecode is used to decode a uuencoded file. -config BUSYBOX_CONFIG_BASE64 - bool "base64" - default BUSYBOX_DEFAULT_BASE64 - help - Base64 encode and decode + config BUSYBOX_CONFIG_UUENCODE bool "uuencode" default BUSYBOX_DEFAULT_UUENCODE help uuencode is used to uuencode a file. + config BUSYBOX_CONFIG_WC bool "wc" default BUSYBOX_DEFAULT_WC @@ -871,37 +907,19 @@ config BUSYBOX_CONFIG_WC in specified files. config BUSYBOX_CONFIG_FEATURE_WC_LARGE - bool "Support very large counts" + bool "Support very large files in wc" default BUSYBOX_DEFAULT_FEATURE_WC_LARGE depends on BUSYBOX_CONFIG_WC help - Use "unsigned long long" for counter variables. -config BUSYBOX_CONFIG_WHO - bool "who" - default BUSYBOX_DEFAULT_WHO - depends on BUSYBOX_CONFIG_FEATURE_UTMP - help - who is used to show who is logged on. + Use "unsigned long long" in wc for counter variables. -config BUSYBOX_CONFIG_W - bool "w" - default BUSYBOX_DEFAULT_W - depends on BUSYBOX_CONFIG_FEATURE_UTMP - help - w is used to show who is logged on. - -config BUSYBOX_CONFIG_USERS - bool "users" - default BUSYBOX_DEFAULT_USERS - depends on BUSYBOX_CONFIG_FEATURE_UTMP - help - Print users currently logged on. config BUSYBOX_CONFIG_WHOAMI bool "whoami" default BUSYBOX_DEFAULT_WHOAMI help whoami is used to print the username of the current user id (same as id -un). + config BUSYBOX_CONFIG_YES bool "yes" default BUSYBOX_DEFAULT_YES @@ -929,14 +947,41 @@ config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS help Allow cp and mv to preserve hard links. +comment "Common options for ls, more and telnet" + depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET + +config BUSYBOX_CONFIG_FEATURE_AUTOWIDTH + bool "Calculate terminal & column widths" + default BUSYBOX_DEFAULT_FEATURE_AUTOWIDTH + depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET + help + This option allows utilities such as 'ls', 'more' and 'telnet' + to determine the width of the screen, which can allow them to + display additional text or avoid wrapping text onto the next line. + If you leave this disabled, your utilities will be especially + primitive and will be unable to determine the current screen width. + comment "Common options for df, du, ls" depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE - bool "Support human readable output (example 13k, 23M, 235G)" + bool "Support for human readable output (example 13k, 23M, 235G)" default BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS help Allow df, du, and ls to have human readable output. +comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum" + depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM + +config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK + bool "Enable -c, -s and -w options" + default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK + depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM + help + Enabling the -c options allows files to be checked + against pre-calculated hash values. + + -s and -w are useful options when verifying checksums. + endmenu diff --git a/package/utils/busybox/config/debianutils/Config.in b/package/utils/busybox/config/debianutils/Config.in index 6b9de0de5..d39c60f43 100644 --- a/package/utils/busybox/config/debianutils/Config.in +++ b/package/utils/busybox/config/debianutils/Config.in @@ -6,6 +6,11 @@ menu "Debian Utilities" +config BUSYBOX_CONFIG_MKTEMP + bool "mktemp" + default BUSYBOX_DEFAULT_MKTEMP + help + mktemp is used to create unique temporary files config BUSYBOX_CONFIG_PIPE_PROGRESS bool "pipe_progress" default BUSYBOX_DEFAULT_PIPE_PROGRESS @@ -30,6 +35,8 @@ config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS bool "Enable long options" default BUSYBOX_DEFAULT_FEATURE_RUN_PARTS_LONG_OPTIONS depends on BUSYBOX_CONFIG_RUN_PARTS && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the run-parts applet. config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_FANCY bool "Support additional arguments" @@ -47,19 +54,22 @@ config BUSYBOX_CONFIG_START_STOP_DAEMON termination of system-level processes, usually the ones started during the startup of the system. -config BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS - depends on BUSYBOX_CONFIG_START_STOP_DAEMON && BUSYBOX_CONFIG_LONG_OPTS - config BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_FANCY bool "Support additional arguments" default BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_FANCY depends on BUSYBOX_CONFIG_START_STOP_DAEMON help + Support additional arguments. -o|--oknodo ignored since we exit with 0 anyway -v|--verbose -N|--nicelevel N + +config BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS + depends on BUSYBOX_CONFIG_START_STOP_DAEMON && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the start-stop-daemon applet. config BUSYBOX_CONFIG_WHICH bool "which" default BUSYBOX_DEFAULT_WHICH diff --git a/package/utils/busybox/config/editors/Config.in b/package/utils/busybox/config/editors/Config.in index da4eaedd7..6ae361f7f 100644 --- a/package/utils/busybox/config/editors/Config.in +++ b/package/utils/busybox/config/editors/Config.in @@ -49,6 +49,8 @@ config BUSYBOX_CONFIG_FEATURE_DIFF_LONG_OPTIONS bool "Enable long options" default BUSYBOX_DEFAULT_FEATURE_DIFF_LONG_OPTIONS depends on BUSYBOX_CONFIG_DIFF && BUSYBOX_CONFIG_LONG_OPTS + help + Enable use of long options. config BUSYBOX_CONFIG_FEATURE_DIFF_DIR bool "Enable directory support" @@ -85,7 +87,7 @@ config BUSYBOX_CONFIG_VI you may wish to use something else. config BUSYBOX_CONFIG_FEATURE_VI_MAX_LEN - int "Maximum screen width" + int "Maximum screen width in vi" range 256 16384 default BUSYBOX_DEFAULT_FEATURE_VI_MAX_LEN depends on BUSYBOX_CONFIG_VI @@ -94,7 +96,7 @@ config BUSYBOX_CONFIG_FEATURE_VI_MAX_LEN Make it smaller than 4k only if you are very limited on memory. config BUSYBOX_CONFIG_FEATURE_VI_8BIT - bool "Allow to display 8-bit chars (otherwise shows dots)" + bool "Allow vi to display 8-bit chars (otherwise shows dots)" default BUSYBOX_DEFAULT_FEATURE_VI_8BIT depends on BUSYBOX_CONFIG_VI help @@ -108,7 +110,7 @@ config BUSYBOX_CONFIG_FEATURE_VI_COLON default BUSYBOX_DEFAULT_FEATURE_VI_COLON depends on BUSYBOX_CONFIG_VI help - Enable a limited set of colon commands. This does not + Enable a limited set of colon commands for vi. This does not provide an "ex" mode. config BUSYBOX_CONFIG_FEATURE_VI_YANKMARK @@ -116,14 +118,16 @@ config BUSYBOX_CONFIG_FEATURE_VI_YANKMARK default BUSYBOX_DEFAULT_FEATURE_VI_YANKMARK depends on BUSYBOX_CONFIG_VI help - This will enable you to use yank and put, as well as mark. + This will enable you to use yank and put, as well as mark in + busybox vi. config BUSYBOX_CONFIG_FEATURE_VI_SEARCH bool "Enable search and replace cmds" default BUSYBOX_DEFAULT_FEATURE_VI_SEARCH depends on BUSYBOX_CONFIG_VI help - Select this if you wish to be able to do search and replace. + Select this if you wish to be able to do search and replace in + busybox vi. config BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH bool "Enable regex in search and replace" @@ -137,15 +141,16 @@ config BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS default BUSYBOX_DEFAULT_FEATURE_VI_USE_SIGNALS depends on BUSYBOX_CONFIG_VI help - Selecting this option will make vi signal aware. This will support - SIGWINCH to deal with Window Changes, catch ^Z and ^C and alarms. + Selecting this option will make busybox vi signal aware. This will + make busybox vi support SIGWINCH to deal with Window Changes, catch + Ctrl-Z and Ctrl-C and alarms. config BUSYBOX_CONFIG_FEATURE_VI_DOT_CMD bool "Remember previous cmd and \".\" cmd" default BUSYBOX_DEFAULT_FEATURE_VI_DOT_CMD depends on BUSYBOX_CONFIG_VI help - Make vi remember the last command and be able to repeat it. + Make busybox vi remember the last command and be able to repeat it. config BUSYBOX_CONFIG_FEATURE_VI_READONLY bool "Enable -R option and \"view\" mode" @@ -156,23 +161,25 @@ config BUSYBOX_CONFIG_FEATURE_VI_READONLY open a file in read-only mode. config BUSYBOX_CONFIG_FEATURE_VI_SETOPTS - bool "Enable settable options, ai ic showmatch" + bool "Enable set-able options, ai ic showmatch" default BUSYBOX_DEFAULT_FEATURE_VI_SETOPTS depends on BUSYBOX_CONFIG_VI help Enable the editor to set some (ai, ic, showmatch) options. config BUSYBOX_CONFIG_FEATURE_VI_SET - bool "Support :set" + bool "Support for :set" default BUSYBOX_DEFAULT_FEATURE_VI_SET depends on BUSYBOX_CONFIG_VI + help + Support for ":set". config BUSYBOX_CONFIG_FEATURE_VI_WIN_RESIZE bool "Handle window resize" default BUSYBOX_DEFAULT_FEATURE_VI_WIN_RESIZE depends on BUSYBOX_CONFIG_VI help - Behave nicely with terminals that get resized. + Make busybox vi behave nicely with terminals that get resized. config BUSYBOX_CONFIG_FEATURE_VI_ASK_TERMINAL bool "Use 'tell me cursor position' ESC sequence to measure window" @@ -183,16 +190,15 @@ config BUSYBOX_CONFIG_FEATURE_VI_ASK_TERMINAL this option makes vi perform a last-ditch effort to find it: position cursor to 999,999 and ask terminal to report real cursor position using "ESC [ 6 n" escape sequence, then read stdin. - This is not clean but helps a lot on serial lines and such. + This is not clean but helps a lot on serial lines and such. config BUSYBOX_CONFIG_FEATURE_VI_UNDO - bool "Support undo command \"u\"" + bool "Support undo command 'u'" default BUSYBOX_DEFAULT_FEATURE_VI_UNDO depends on BUSYBOX_CONFIG_VI help Support the 'u' command to undo insertion, deletion, and replacement of text. - config BUSYBOX_CONFIG_FEATURE_VI_UNDO_QUEUE bool "Enable undo operation queuing" default BUSYBOX_DEFAULT_FEATURE_VI_UNDO_QUEUE @@ -203,7 +209,6 @@ config BUSYBOX_CONFIG_FEATURE_VI_UNDO_QUEUE reached, the contents of the queue are committed to the undo stack. This increases the size of the undo code and allows some undo operations (especially un-typing/backspacing) to be far more useful. - config BUSYBOX_CONFIG_FEATURE_VI_UNDO_QUEUE_MAX int "Maximum undo character queue size" default BUSYBOX_DEFAULT_FEATURE_VI_UNDO_QUEUE_MAX @@ -223,7 +228,7 @@ config BUSYBOX_CONFIG_FEATURE_ALLOW_EXEC default BUSYBOX_DEFAULT_FEATURE_ALLOW_EXEC depends on BUSYBOX_CONFIG_VI || BUSYBOX_CONFIG_AWK help - Enables vi and awk features which allow user to execute + Enables vi and awk features which allows user to execute shell commands (using system() C call). endmenu diff --git a/package/utils/busybox/config/findutils/Config.in b/package/utils/busybox/config/findutils/Config.in index 3393adbe3..85ee1db2c 100644 --- a/package/utils/busybox/config/findutils/Config.in +++ b/package/utils/busybox/config/findutils/Config.in @@ -42,6 +42,8 @@ config BUSYBOX_CONFIG_FEATURE_FIND_PERM bool "Enable -perm: permissions matching" default BUSYBOX_DEFAULT_FEATURE_FIND_PERM depends on BUSYBOX_CONFIG_FIND + help + Enable searching based on file permissions. config BUSYBOX_CONFIG_FEATURE_FIND_TYPE bool "Enable -type: file type matching (file/dir/link/...)" @@ -55,11 +57,15 @@ config BUSYBOX_CONFIG_FEATURE_FIND_XDEV bool "Enable -xdev: 'stay in filesystem'" default BUSYBOX_DEFAULT_FEATURE_FIND_XDEV depends on BUSYBOX_CONFIG_FIND + help + This option allows find to restrict searches to a single filesystem. config BUSYBOX_CONFIG_FEATURE_FIND_MAXDEPTH bool "Enable -mindepth N and -maxdepth N" default BUSYBOX_DEFAULT_FEATURE_FIND_MAXDEPTH depends on BUSYBOX_CONFIG_FIND + help + This option enables -mindepth N and -maxdepth N option. config BUSYBOX_CONFIG_FEATURE_FIND_NEWER bool "Enable -newer: compare file modification times" @@ -73,6 +79,8 @@ config BUSYBOX_CONFIG_FEATURE_FIND_INUM bool "Enable -inum: inode number matching" default BUSYBOX_DEFAULT_FEATURE_FIND_INUM depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -inum' option for searching by inode number. config BUSYBOX_CONFIG_FEATURE_FIND_EXEC bool "Enable -exec: execute commands" @@ -96,11 +104,15 @@ config BUSYBOX_CONFIG_FEATURE_FIND_USER bool "Enable -user: username/uid matching" default BUSYBOX_DEFAULT_FEATURE_FIND_USER depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -user' option for searching by username or uid. config BUSYBOX_CONFIG_FEATURE_FIND_GROUP bool "Enable -group: group/gid matching" default BUSYBOX_DEFAULT_FEATURE_FIND_GROUP depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -group' option for searching by group name or gid. config BUSYBOX_CONFIG_FEATURE_FIND_NOT bool "Enable the 'not' (!) operator" @@ -129,13 +141,15 @@ config BUSYBOX_CONFIG_FEATURE_FIND_SIZE bool "Enable -size: file size matching" default BUSYBOX_DEFAULT_FEATURE_FIND_SIZE depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -size' option for searching by file size. config BUSYBOX_CONFIG_FEATURE_FIND_PRUNE bool "Enable -prune: exclude subdirectories" default BUSYBOX_DEFAULT_FEATURE_FIND_PRUNE depends on BUSYBOX_CONFIG_FIND help - If the file is a directory, don't descend into it. Useful for + If the file is a directory, dont descend into it. Useful for exclusion .svn and CVS directories. config BUSYBOX_CONFIG_FEATURE_FIND_DELETE @@ -180,22 +194,28 @@ config BUSYBOX_CONFIG_GREP help grep is used to search files for a specified pattern. -config BUSYBOX_CONFIG_EGREP - bool "egrep" - default BUSYBOX_DEFAULT_EGREP +config BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS + bool "Enable extended regular expressions (egrep & grep -E)" + default BUSYBOX_DEFAULT_FEATURE_GREP_EGREP_ALIAS + depends on BUSYBOX_CONFIG_GREP help - Alias to "grep -E" + Enabled support for extended regular expressions. Extended + regular expressions allow for alternation (foo|bar), grouping, + and various repetition operators. -config BUSYBOX_CONFIG_FGREP - bool "fgrep" - default BUSYBOX_DEFAULT_FGREP +config BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS + bool "Alias fgrep to grep -F" + default BUSYBOX_DEFAULT_FEATURE_GREP_FGREP_ALIAS + depends on BUSYBOX_CONFIG_GREP help - Alias to "grep -F" + fgrep sees the search pattern as a normal string rather than + regular expressions. + grep -F always works, this just creates the fgrep alias. config BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT bool "Enable before and after context flags (-A, -B and -C)" default BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT - depends on BUSYBOX_CONFIG_GREP || BUSYBOX_CONFIG_EGREP || BUSYBOX_CONFIG_FGREP + depends on BUSYBOX_CONFIG_GREP help Print the specified number of leading (-B) and/or trailing (-A) context surrounding our matching lines. diff --git a/package/utils/busybox/config/init/Config.in b/package/utils/busybox/config/init/Config.in index 072df3389..021656d3f 100644 --- a/package/utils/busybox/config/init/Config.in +++ b/package/utils/busybox/config/init/Config.in @@ -45,27 +45,15 @@ config BUSYBOX_CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE Enable reading and parsing of $PWD/bootchartd.conf and /etc/bootchartd.conf files. config BUSYBOX_CONFIG_HALT - bool "halt" + bool "poweroff, halt, and reboot" default BUSYBOX_DEFAULT_HALT help - Stop all processes and halt the system. - -config BUSYBOX_CONFIG_POWEROFF - bool "poweroff" - default BUSYBOX_DEFAULT_POWEROFF - help - Stop all processes and power off the system. - -config BUSYBOX_CONFIG_REBOOT - bool "reboot" - default BUSYBOX_DEFAULT_REBOOT - help - Stop all processes and reboot the system. + Stop all processes and either halt, reboot, or power off the system. config BUSYBOX_CONFIG_FEATURE_CALL_TELINIT bool "Call telinit on shutdown and reboot" default BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT - depends on (BUSYBOX_CONFIG_HALT || BUSYBOX_CONFIG_POWEROFF || BUSYBOX_CONFIG_REBOOT) && !BUSYBOX_CONFIG_INIT + depends on BUSYBOX_CONFIG_HALT && !BUSYBOX_CONFIG_INIT help Call an external program (normally telinit) to facilitate a switch to a proper runlevel. @@ -89,7 +77,7 @@ config BUSYBOX_CONFIG_INIT init is the first program run when the system boots. config BUSYBOX_CONFIG_LINUXRC - bool "linuxrc: support running init from initrd (not initramfs)" + bool "Support running init from within an initrd (not initramfs)" default BUSYBOX_DEFAULT_LINUXRC select BUSYBOX_CONFIG_FEATURE_SYSLOG help @@ -145,19 +133,17 @@ config BUSYBOX_CONFIG_FEATURE_INIT_SYSLOG bool "Enable init to write to syslog" default BUSYBOX_DEFAULT_FEATURE_INIT_SYSLOG depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC - help - If selected, some init messages are sent to syslog. - Otherwise, they are sent to VT #5 if linux virtual tty is detected - (if not, no separate logging is done). -config BUSYBOX_CONFIG_FEATURE_INIT_QUIET - bool "Be quiet on boot (no 'init started:' message)" - default BUSYBOX_DEFAULT_FEATURE_INIT_QUIET +config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET + bool "Be _extra_ quiet on boot" + default BUSYBOX_DEFAULT_FEATURE_EXTRA_QUIET depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC + help + Prevent init from logging some messages to the console during boot. config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS bool "Support dumping core for child processes (debugging only)" - default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS # not Y because this is a debug option + default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC help If this option is enabled and the file /.init_enable_core @@ -178,18 +164,36 @@ config BUSYBOX_CONFIG_INIT_TERMINAL_TYPE sets TERM to "vt102" if one is found. config BUSYBOX_CONFIG_FEATURE_INIT_MODIFY_CMDLINE - bool "Clear init's command line" + bool "Modify the command-line to \"init\"" default BUSYBOX_DEFAULT_FEATURE_INIT_MODIFY_CMDLINE depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC help When launched as PID 1 and after parsing its arguments, init wipes all the arguments but argv[0] and rewrites argv[0] to - contain only "init", so that its command line appears solely as + contain only "init", so that its command-line appears solely as "init" in tools such as ps. If this option is set to Y, init will keep its original behavior, otherwise, all the arguments including argv[0] will be preserved, be they parsed or ignored by init. The original command-line used to launch init can then be retrieved in /proc/1/cmdline on Linux, for example. +config BUSYBOX_CONFIG_MESG + bool "mesg" + default BUSYBOX_DEFAULT_MESG + help + Mesg controls access to your terminal by others. It is typically + used to allow or disallow other users to write to your terminal + +config BUSYBOX_CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP + bool "Enable writing to tty only by group, not by everybody" + default BUSYBOX_DEFAULT_FEATURE_MESG_ENABLE_ONLY_GROUP + depends on BUSYBOX_CONFIG_MESG + help + Usually, ttys are owned by group "tty", and "write" tool is + setgid to this group. This way, "mesg y" only needs to enable + "write by owning group" bit in tty mode. + + If you set this option to N, "mesg y" will enable writing + by anybody at all. This is not recommended. endmenu diff --git a/package/utils/busybox/config/libbb/Config.in b/package/utils/busybox/config/libbb/Config.in index 1687ed5c7..0695f9ba3 100644 --- a/package/utils/busybox/config/libbb/Config.in +++ b/package/utils/busybox/config/libbb/Config.in @@ -45,30 +45,6 @@ config BUSYBOX_CONFIG_FEATURE_RTMINMAX Support RTMIN[+n] and RTMAX[-n] signal names in kill, killall etc. This costs ~250 bytes. -choice - prompt "Buffer allocation policy" - default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK - help - There are 3 ways BusyBox can handle buffer allocations: - - Use malloc. This costs code size for the call to xmalloc. - - Put them on stack. For some very small machines with limited stack - space, this can be deadly. For most folks, this works just fine. - - Put them in BSS. This works beautifully for computers with a real - MMU (and OS support), but wastes runtime RAM for uCLinux. This - behavior was the only one available for BusyBox versions 0.48 and - earlier. - -config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC - bool "Allocate with Malloc" - -config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK - bool "Allocate on the Stack" - -config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS - bool "Allocate in the .bss section" - -endchoice - config BUSYBOX_CONFIG_PASSWORD_MINLEN int "Minimum password length" default BUSYBOX_DEFAULT_PASSWORD_MINLEN @@ -108,13 +84,24 @@ config BUSYBOX_CONFIG_FEATURE_FAST_TOP but code size is slightly bigger. config BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS - bool "Support /etc/networks" + bool "Support for /etc/networks" default BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS help Enable support for network names in /etc/networks. This is a rarely used feature which allows you to use names instead of IP/mask pairs in route command. +config BUSYBOX_CONFIG_FEATURE_USE_TERMIOS + bool "Use termios to manipulate the screen" + default BUSYBOX_DEFAULT_FEATURE_USE_TERMIOS + depends on BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_POWERTOP + help + This option allows utilities such as 'more' and 'top' to determine + the size of the screen. If you leave this disabled, your utilities + that display things on the screen will be especially primitive and + will be unable to determine the current screen size, and will be + unable to move the cursor. + config BUSYBOX_CONFIG_FEATURE_EDITING bool "Command line editing" default BUSYBOX_DEFAULT_FEATURE_EDITING @@ -174,11 +161,15 @@ config BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION bool "Tab completion" default BUSYBOX_DEFAULT_FEATURE_TAB_COMPLETION depends on BUSYBOX_CONFIG_FEATURE_EDITING + help + Enable tab completion. config BUSYBOX_CONFIG_FEATURE_USERNAME_COMPLETION bool "Username completion" default BUSYBOX_DEFAULT_FEATURE_USERNAME_COMPLETION depends on BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION + help + Enable username completion. config BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_PROMPT bool "Fancy shell prompts" @@ -200,131 +191,6 @@ config BUSYBOX_CONFIG_FEATURE_EDITING_ASK_TERMINAL correctly, or want to save on code size (about 400 bytes), then do not turn this option on. -config BUSYBOX_CONFIG_LOCALE_SUPPORT - bool "Enable locale support (system needs locale for this to work)" - default BUSYBOX_DEFAULT_LOCALE_SUPPORT - help - Enable this if your system has locale support and you would like - busybox to support locale settings. - -config BUSYBOX_CONFIG_UNICODE_SUPPORT - bool "Support Unicode" - default BUSYBOX_DEFAULT_UNICODE_SUPPORT - help - This makes various applets aware that one byte is not - one character on screen. - - Busybox aims to eventually work correctly with Unicode displays. - Any older encodings are not guaranteed to work. - Probably by the time when busybox will be fully Unicode-clean, - other encodings will be mainly of historic interest. - -config BUSYBOX_CONFIG_UNICODE_USING_LOCALE - bool "Use libc routines for Unicode (else uses internal ones)" - default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE - depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT - help - With this option on, Unicode support is implemented using libc - routines. Otherwise, internal implementation is used. - Internal implementation is smaller. - -config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV - bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables" - default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV - depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE - help - With this option on, Unicode support is activated - only if locale-related variables have the value of the form - "xxxx.utf8" - - Otherwise, Unicode support will be always enabled and active. - -config BUSYBOX_CONFIG_SUBST_WCHAR - int "Character code to substitute unprintable characters with" - depends on BUSYBOX_CONFIG_UNICODE_SUPPORT - default BUSYBOX_DEFAULT_SUBST_WCHAR - help - Typical values are 63 for '?' (works with any output device), - 30 for ASCII substitute control code, - 65533 (0xfffd) for Unicode replacement character. - -config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR - int "Range of supported Unicode characters" - depends on BUSYBOX_CONFIG_UNICODE_SUPPORT - default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR - help - Any character with Unicode value bigger than this is assumed - to be non-printable on output device. Many applets replace - such characters with substitution character. - - The idea is that many valid printable Unicode chars - nevertheless are not displayed correctly. Think about - combining charachers, double-wide hieroglyphs, obscure - characters in dozens of ancient scripts... - Many terminals, terminal emulators, xterms etc will fail - to handle them correctly. Choose the smallest value - which suits your needs. - - Typical values are: - 126 - ASCII only - 767 (0x2ff) - there are no combining chars in [0..767] range - (the range includes Latin 1, Latin Ext. A and B), - code is ~700 bytes smaller for this case. - 4351 (0x10ff) - there are no double-wide chars in [0..4351] range, - code is ~300 bytes smaller for this case. - 12799 (0x31ff) - nearly all non-ideographic characters are - available in [0..12799] range, including - East Asian scripts like katakana, hiragana, hangul, - bopomofo... - 0 - off, any valid printable Unicode character will be printed. - -config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS - bool "Allow zero-width Unicode characters on output" - default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS - depends on BUSYBOX_CONFIG_UNICODE_SUPPORT - help - With this option off, any Unicode char with width of 0 - is substituted on output. - -config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS - bool "Allow wide Unicode characters on output" - default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS - depends on BUSYBOX_CONFIG_UNICODE_SUPPORT - help - With this option off, any Unicode char with width > 1 - is substituted on output. - -config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT - bool "Bidirectional character-aware line input" - default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT - depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE - help - With this option on, right-to-left Unicode characters - are treated differently on input (e.g. cursor movement). - -config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE - bool "In bidi input, support non-ASCII neutral chars too" - default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE - depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT - help - In most cases it's enough to treat only ASCII non-letters - (i.e. punctuation, numbers and space) as characters - with neutral directionality. - With this option on, more extensive (and bigger) table - of neutral chars will be used. - -config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN - bool "Make it possible to enter sequences of chars which are not Unicode" - default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN - depends on BUSYBOX_CONFIG_UNICODE_SUPPORT - help - With this option on, on line-editing input (such as used by shells) - invalid UTF-8 bytes are not substituted with the selected - substitution character. - For example, this means that entering 'l', 's', ' ', 0xff, [Enter] - at shell prompt will list file named 0xff (single char name - with char value 255), not file named '?'. - config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP bool "Non-POSIX, but safer, copying to special nodes" default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP @@ -349,19 +215,6 @@ config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE cp: cannot stat '/vmlinuz/file': Not a directory This will cost you ~60 bytes. -config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE - bool "Use sendfile system call" - default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - When enabled, busybox will use the kernel sendfile() function - instead of read/write loops to copy data between file descriptors - (for example, cp command does this a lot). - If sendfile() doesn't work, copying code falls back to read/write - loop. sendfile() was originally implemented for faster I/O - from files to sockets, but since Linux 2.6.33 it was extended - to work for many more file types. - config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB int "Copy buffer size, in kilobytes" range 1 1024 diff --git a/package/utils/busybox/config/loginutils/Config.in b/package/utils/busybox/config/loginutils/Config.in index fa0059587..956115c7f 100644 --- a/package/utils/busybox/config/loginutils/Config.in +++ b/package/utils/busybox/config/loginutils/Config.in @@ -7,7 +7,7 @@ menu "Login/Password Management Utilities" config BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS - bool "Support shadow passwords" + bool "Support for shadow passwords" default BUSYBOX_DEFAULT_FEATURE_SHADOWPASSWDS help Build support for shadow password in /etc/shadow. This file is only @@ -113,13 +113,15 @@ config BUSYBOX_CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS bool "Enable long options" default BUSYBOX_DEFAULT_FEATURE_ADDGROUP_LONG_OPTIONS depends on BUSYBOX_CONFIG_ADDGROUP && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the addgroup applet. config BUSYBOX_CONFIG_FEATURE_ADDUSER_TO_GROUP - bool "Support adding users to groups" + bool "Support for adding users to groups" default BUSYBOX_DEFAULT_FEATURE_ADDUSER_TO_GROUP depends on BUSYBOX_CONFIG_ADDGROUP help - If called with two non-option arguments, + If called with two non-option arguments, addgroup will add an existing user to an existing group. config BUSYBOX_CONFIG_ADDUSER @@ -132,6 +134,8 @@ config BUSYBOX_CONFIG_FEATURE_ADDUSER_LONG_OPTIONS bool "Enable long options" default BUSYBOX_DEFAULT_FEATURE_ADDUSER_LONG_OPTIONS depends on BUSYBOX_CONFIG_ADDUSER && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the adduser applet. config BUSYBOX_CONFIG_FEATURE_CHECK_NAMES bool "Enable sanity check on user/group names in adduser and addgroup" @@ -175,9 +179,9 @@ config BUSYBOX_CONFIG_CHPASSWD and uses this information to update a group of existing users. config BUSYBOX_CONFIG_FEATURE_DEFAULT_PASSWD_ALGO - string "Default encryption method (passwd -a, cryptpw -m, chpasswd -c ALG)" + string "Default password encryption method (passwd -a, cryptpw -m parameter)" default BUSYBOX_DEFAULT_FEATURE_DEFAULT_PASSWD_ALGO - depends on BUSYBOX_CONFIG_PASSWD || BUSYBOX_CONFIG_CRYPTPW || BUSYBOX_CONFIG_CHPASSWD + depends on BUSYBOX_CONFIG_PASSWD || BUSYBOX_CONFIG_CRYPTPW help Possible choices are "d[es]", "m[d5]", "s[ha256]" or "sha512". config BUSYBOX_CONFIG_CRYPTPW @@ -207,7 +211,7 @@ config BUSYBOX_CONFIG_DELGROUP Utility for deleting a group account. config BUSYBOX_CONFIG_FEATURE_DEL_USER_FROM_GROUP - bool "Support removing users from groups" + bool "Support for removing users from groups" default BUSYBOX_DEFAULT_FEATURE_DEL_USER_FROM_GROUP depends on BUSYBOX_CONFIG_DELGROUP help @@ -253,7 +257,7 @@ config BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD will not be cleaned up. config BUSYBOX_CONFIG_LOGIN_SCRIPTS - bool "Support login scripts" + bool "Support for login scripts" depends on BUSYBOX_CONFIG_LOGIN default BUSYBOX_DEFAULT_LOGIN_SCRIPTS help @@ -261,7 +265,7 @@ config BUSYBOX_CONFIG_LOGIN_SCRIPTS just prior to switching from root to logged-in user. config BUSYBOX_CONFIG_FEATURE_NOLOGIN - bool "Support /etc/nologin" + bool "Support for /etc/nologin" default BUSYBOX_DEFAULT_FEATURE_NOLOGIN depends on BUSYBOX_CONFIG_LOGIN help @@ -269,7 +273,7 @@ config BUSYBOX_CONFIG_FEATURE_NOLOGIN If it exists, non-root logins are prohibited. config BUSYBOX_CONFIG_FEATURE_SECURETTY - bool "Support /etc/securetty" + bool "Support for /etc/securetty" default BUSYBOX_DEFAULT_FEATURE_SECURETTY depends on BUSYBOX_CONFIG_LOGIN help @@ -302,23 +306,19 @@ config BUSYBOX_CONFIG_SU help su is used to become another user during a login session. Invoked without a username, su defaults to becoming the super user. - Note that busybox binary must be setuid root for this applet to + + Note that Busybox binary must be setuid root for this applet to work properly. config BUSYBOX_CONFIG_FEATURE_SU_SYSLOG - bool "Log to syslog all attempts to use su" + bool "Enable su to write to syslog" default BUSYBOX_DEFAULT_FEATURE_SU_SYSLOG depends on BUSYBOX_CONFIG_SU config BUSYBOX_CONFIG_FEATURE_SU_CHECKS_SHELLS - bool "If user's shell is not in /etc/shells, disallow -s PROG" + bool "Enable su to check user's shell to be listed in /etc/shells" + depends on BUSYBOX_CONFIG_SU default BUSYBOX_DEFAULT_FEATURE_SU_CHECKS_SHELLS - depends on BUSYBOX_CONFIG_SU - -config BUSYBOX_CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY - bool "Allow blank passwords only on TTYs in /etc/securetty" - default BUSYBOX_DEFAULT_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY - depends on BUSYBOX_CONFIG_SU config BUSYBOX_CONFIG_SULOGIN bool "sulogin" default BUSYBOX_DEFAULT_SULOGIN diff --git a/package/utils/busybox/config/mailutils/Config.in b/package/utils/busybox/config/mailutils/Config.in index 7e7740786..64b9a2baa 100644 --- a/package/utils/busybox/config/mailutils/Config.in +++ b/package/utils/busybox/config/mailutils/Config.in @@ -1,11 +1,20 @@ # DO NOT EDIT. This file is generated from Config.src menu "Mail Utilities" + config BUSYBOX_CONFIG_MAKEMIME bool "makemime" default BUSYBOX_DEFAULT_MAKEMIME help Create MIME-formatted messages. + +config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET + string "Default charset" + default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET + depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL + help + Default charset of the message. + config BUSYBOX_CONFIG_POPMAILDIR bool "popmaildir" default BUSYBOX_DEFAULT_POPMAILDIR @@ -22,6 +31,7 @@ config BUSYBOX_CONFIG_FEATURE_POPMAILDIR_DELIVERY of the message before actual delivery (-F "prog [args...]"). Allow to use a custom program for message actual delivery (-M "prog [args...]"). + config BUSYBOX_CONFIG_REFORMIME bool "reformime" default BUSYBOX_DEFAULT_REFORMIME @@ -35,17 +45,11 @@ config BUSYBOX_CONFIG_FEATURE_REFORMIME_COMPAT help Accept (for compatibility only) and ignore options other than -x and -X. + config BUSYBOX_CONFIG_SENDMAIL bool "sendmail" default BUSYBOX_DEFAULT_SENDMAIL help Barebones sendmail. -config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET - string "Default charset" - default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET - depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL - help - Default charset of the message. - endmenu diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in index 61c5458b6..3465df40a 100644 --- a/package/utils/busybox/config/miscutils/Config.in +++ b/package/utils/busybox/config/miscutils/Config.in @@ -6,121 +6,6 @@ menu "Miscellaneous Utilities" -config BUSYBOX_CONFIG_ADJTIMEX - bool "adjtimex" - default BUSYBOX_DEFAULT_ADJTIMEX - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Adjtimex reads and optionally sets adjustment parameters for - the Linux clock adjustment algorithm. -config BUSYBOX_CONFIG_BBCONFIG - bool "bbconfig" - default BUSYBOX_DEFAULT_BBCONFIG - help - The bbconfig applet will print the config file with which - busybox was built. - -config BUSYBOX_CONFIG_FEATURE_COMPRESS_BBCONFIG - bool "Compress bbconfig data" - default BUSYBOX_DEFAULT_FEATURE_COMPRESS_BBCONFIG - depends on BUSYBOX_CONFIG_BBCONFIG - help - Store bbconfig data in compressed form, uncompress them on-the-fly - before output. - - If you have a really tiny busybox with few applets enabled (and - bunzip2 isn't one of them), the overhead of the decompressor might - be noticeable. Also, if you run executables directly from ROM - and have very little memory, this might not be a win. Otherwise, - you probably want this. -config BUSYBOX_CONFIG_BEEP - bool "beep" - default BUSYBOX_DEFAULT_BEEP - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - The beep applets beeps in a given freq/Hz. - -config BUSYBOX_CONFIG_FEATURE_BEEP_FREQ - int "default frequency" - range 20 50000 # allowing 0 here breaks the build - default BUSYBOX_DEFAULT_FEATURE_BEEP_FREQ - depends on BUSYBOX_CONFIG_BEEP - help - Frequency for default beep. - -config BUSYBOX_CONFIG_FEATURE_BEEP_LENGTH_MS - int "default length" - range 0 2147483647 - default BUSYBOX_DEFAULT_FEATURE_BEEP_LENGTH_MS - depends on BUSYBOX_CONFIG_BEEP - help - Length in ms for default beep. -config BUSYBOX_CONFIG_CHAT - bool "chat" - default BUSYBOX_DEFAULT_CHAT - help - Simple chat utility. - -config BUSYBOX_CONFIG_FEATURE_CHAT_NOFAIL - bool "Enable NOFAIL expect strings" - depends on BUSYBOX_CONFIG_CHAT - default BUSYBOX_DEFAULT_FEATURE_CHAT_NOFAIL - help - When enabled expect strings which are started with a dash trigger - no-fail mode. That is when expectation is not met within timeout - the script is not terminated but sends next SEND string and waits - for next EXPECT string. This allows to compose far more flexible - scripts. - -config BUSYBOX_CONFIG_FEATURE_CHAT_TTY_HIFI - bool "Force STDIN to be a TTY" - depends on BUSYBOX_CONFIG_CHAT - default BUSYBOX_DEFAULT_FEATURE_CHAT_TTY_HIFI - help - Original chat always treats STDIN as a TTY device and sets for it - so-called raw mode. This option turns on such behaviour. - -config BUSYBOX_CONFIG_FEATURE_CHAT_IMPLICIT_CR - bool "Enable implicit Carriage Return" - depends on BUSYBOX_CONFIG_CHAT - default BUSYBOX_DEFAULT_FEATURE_CHAT_IMPLICIT_CR - help - When enabled make chat to terminate all SEND strings with a "\r" - unless "\c" is met anywhere in the string. - -config BUSYBOX_CONFIG_FEATURE_CHAT_SWALLOW_OPTS - bool "Swallow options" - depends on BUSYBOX_CONFIG_CHAT - default BUSYBOX_DEFAULT_FEATURE_CHAT_SWALLOW_OPTS - help - Busybox chat require no options. To make it not fail when used - in place of original chat (which has a bunch of options) turn - this on. - -config BUSYBOX_CONFIG_FEATURE_CHAT_SEND_ESCAPES - bool "Support weird SEND escapes" - depends on BUSYBOX_CONFIG_CHAT - default BUSYBOX_DEFAULT_FEATURE_CHAT_SEND_ESCAPES - help - Original chat uses some escape sequences in SEND arguments which - are not sent to device but rather performs special actions. - E.g. "\K" means to send a break sequence to device. - "\d" delays execution for a second, "\p" -- for a 1/100 of second. - Before turning this option on think twice: do you really need them? - -config BUSYBOX_CONFIG_FEATURE_CHAT_VAR_ABORT_LEN - bool "Support variable-length ABORT conditions" - depends on BUSYBOX_CONFIG_CHAT - default BUSYBOX_DEFAULT_FEATURE_CHAT_VAR_ABORT_LEN - help - Original chat uses fixed 50-bytes length ABORT conditions. Say N here. - -config BUSYBOX_CONFIG_FEATURE_CHAT_CLR_ABORT - bool "Support revoking of ABORT conditions" - depends on BUSYBOX_CONFIG_CHAT - default BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT - help - Support CLR_ABORT directive. config BUSYBOX_CONFIG_CONSPY bool "conspy" default BUSYBOX_DEFAULT_CONSPY @@ -163,194 +48,6 @@ config BUSYBOX_CONFIG_FEATURE_CROND_DIR depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB help Location of crond spool. -config BUSYBOX_CONFIG_CRONTAB - bool "crontab" - default BUSYBOX_DEFAULT_CRONTAB - help - Crontab manipulates the crontab for a particular user. Only - the superuser may specify a different user and/or crontab directory. - Note that Busybox binary must be setuid root for this applet to - work properly. -config BUSYBOX_CONFIG_DC - bool "dc" - default BUSYBOX_DEFAULT_DC - help - Dc is a reverse-polish desk calculator which supports unlimited - precision arithmetic. - -config BUSYBOX_CONFIG_FEATURE_DC_LIBM - bool "Enable power and exp functions (requires libm)" - default BUSYBOX_DEFAULT_FEATURE_DC_LIBM - depends on BUSYBOX_CONFIG_DC - help - Enable power and exp functions. - NOTE: This will require libm to be present for linking. -config BUSYBOX_CONFIG_DEVFSD - bool "devfsd (obsolete)" - default BUSYBOX_DEFAULT_DEVFSD - select BUSYBOX_CONFIG_PLATFORM_LINUX - select BUSYBOX_CONFIG_FEATURE_SYSLOG - help - This is deprecated and should NOT be used anymore. - Use linux >= 2.6 (optionally with hotplug) and mdev instead! - See docs/mdev.txt for detailed instructions on how to use mdev - instead. - - Provides compatibility with old device names on a devfs systems. - You should set it to true if you have devfs enabled. - The following keywords in devsfd.conf are supported: - "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE", - "PERMISSIONS", "EXECUTE", "COPY", "IGNORE", - "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT". - - But only if they are written UPPERCASE!!!!!!!! - -config BUSYBOX_CONFIG_DEVFSD_MODLOAD - bool "Adds support for MODLOAD keyword in devsfd.conf" - default BUSYBOX_DEFAULT_DEVFSD_MODLOAD - depends on BUSYBOX_CONFIG_DEVFSD - help - This actually doesn't work with busybox modutils but needs - the external modutils. - -config BUSYBOX_CONFIG_DEVFSD_FG_NP - bool "Enable the -fg and -np options" - default BUSYBOX_DEFAULT_DEVFSD_FG_NP - depends on BUSYBOX_CONFIG_DEVFSD - help - -fg Run the daemon in the foreground. - -np Exit after parsing the configuration file. - Do not poll for events. - -config BUSYBOX_CONFIG_DEVFSD_VERBOSE - bool "Increases logging (and size)" - default BUSYBOX_DEFAULT_DEVFSD_VERBOSE - depends on BUSYBOX_CONFIG_DEVFSD - help - Increases logging to stderr or syslog. - -config BUSYBOX_CONFIG_FEATURE_DEVFS - bool "Use devfs names for all devices (obsolete)" - default BUSYBOX_DEFAULT_FEATURE_DEVFS - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - This is obsolete and should NOT be used anymore. - Use linux >= 2.6 (optionally with hotplug) and mdev instead! - - For legacy systems -- if there is no way around devfsd -- this - tells busybox to look for names like /dev/loop/0 instead of - /dev/loop0. If your /dev directory has normal names instead of - devfs names, you don't want this. -config BUSYBOX_CONFIG_DEVMEM - bool "devmem" - default BUSYBOX_DEFAULT_DEVMEM - help - devmem is a small program that reads and writes from physical - memory using /dev/mem. -config BUSYBOX_CONFIG_FBSPLASH - bool "fbsplash" - default BUSYBOX_DEFAULT_FBSPLASH - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Shows splash image and progress bar on framebuffer device. - Can be used during boot phase of an embedded device. ~2kb. - Usage: - - use kernel option 'vga=xxx' or otherwise enable fb device. - - put somewhere fbsplash.cfg file and an image in .ppm format. - - $ setsid fbsplash [params] & - -c: hide cursor - -d /dev/fbN: framebuffer device (if not /dev/fb0) - -s path_to_image_file (can be "-" for stdin) - -i path_to_cfg_file (can be "-" for stdin) - -f path_to_fifo (can be "-" for stdin) - - if you want to run it only in presence of kernel parameter: - grep -q "fbsplash=on" = 2.6.13 config BUSYBOX_CONFIG_LESS bool "less" default BUSYBOX_DEFAULT_LESS @@ -451,6 +142,7 @@ config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL this option makes less perform a last-ditch effort to find it: position cursor to 999,999 and ask terminal to report real cursor position using "ESC [ 6 n" escape sequence, then read stdin. + This is not clean but helps a lot on serial lines and such. config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD @@ -462,71 +154,11 @@ config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD less itself ('-' keyboard command). config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS - bool "Enable -N (dynamic switching of line numbers)" + bool "Enable dynamic switching of line numbers" default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD -config BUSYBOX_CONFIG_LOCK - bool "lock" - default BUSYBOX_DEFAULT_LOCK help - Small utility for using locks in scripts -config BUSYBOX_CONFIG_LSSCSI - bool "lsscsi" - default BUSYBOX_DEFAULT_LSSCSI - #select PLATFORM_LINUX - help - lsscsi is a utility for displaying information about SCSI buses in the - system and devices connected to them. - - This version uses sysfs (/sys/bus/scsi/devices) only. -config BUSYBOX_CONFIG_MAKEDEVS - bool "makedevs" - default BUSYBOX_DEFAULT_MAKEDEVS - help - 'makedevs' is a utility used to create a batch of devices with - one command. - - There are two choices for command line behaviour, the interface - as used by LEAF/Linux Router Project, or a device table file. - - 'leaf' is traditionally what busybox follows, it allows multiple - devices of a particluar type to be created per command. - e.g. /dev/hda[0-9] - Device properties are passed as command line arguments. - - 'table' reads device properties from a file or stdin, allowing - a batch of unrelated devices to be made with one command. - User/group names are allowed as an alternative to uid/gid. - -choice - prompt "Choose makedevs behaviour" - depends on BUSYBOX_CONFIG_MAKEDEVS - default BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE - -config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_LEAF - bool "leaf" - -config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE - bool "table" - -endchoice -config BUSYBOX_CONFIG_MAN - bool "man" - default BUSYBOX_DEFAULT_MAN - help - Format and display manual pages. -config BUSYBOX_CONFIG_MICROCOM - bool "microcom" - default BUSYBOX_DEFAULT_MICROCOM - help - The poor man's minicom utility for chatting with serial port devices. -config BUSYBOX_CONFIG_MT - bool "mt" - default BUSYBOX_DEFAULT_MT - help - mt is used to control tape devices. You can use the mt utility - to advance or rewind a tape past a specified number of archive - files on the tape. + Enables "-N" command. config BUSYBOX_CONFIG_NANDWRITE bool "nandwrite" default BUSYBOX_DEFAULT_NANDWRITE @@ -540,36 +172,6 @@ config BUSYBOX_CONFIG_NANDDUMP select BUSYBOX_CONFIG_PLATFORM_LINUX help Dump the content of raw NAND chip -config BUSYBOX_CONFIG_PARTPROBE - bool "partprobe" - default BUSYBOX_DEFAULT_PARTPROBE - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Ask kernel to rescan partition table. -config BUSYBOX_CONFIG_RAIDAUTORUN - bool "raidautorun" - default BUSYBOX_DEFAULT_RAIDAUTORUN - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - raidautorun tells the kernel md driver to - search and start RAID arrays. -config BUSYBOX_CONFIG_READAHEAD - bool "readahead" - default BUSYBOX_DEFAULT_READAHEAD - depends on BUSYBOX_CONFIG_LFS - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Preload the files listed on the command line into RAM cache so that - subsequent reads on these files will not block on disk I/O. - - This applet just calls the readahead(2) system call on each file. - It is mainly useful in system startup scripts to preload files - or executables before they are used. When used at the right time - (in particular when a CPU bound process is running) it can - significantly speed up system startup. - - As readahead(2) blocks until each file has been read, it is best to - run this applet as a background job. config BUSYBOX_CONFIG_RFKILL bool "rfkill" default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04 @@ -582,48 +184,27 @@ config BUSYBOX_CONFIG_RFKILL rfkill list 1 : list device corresponding to the given index rfkill block|unblock wlan : block/unblock all wlan(wifi) devices -config BUSYBOX_CONFIG_RUNLEVEL - bool "runlevel" - default BUSYBOX_DEFAULT_RUNLEVEL - depends on BUSYBOX_CONFIG_FEATURE_UTMP - help - find the current and previous system runlevel. - - This applet uses utmp but does not rely on busybox supporing - utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. -config BUSYBOX_CONFIG_RX - bool "rx" - default BUSYBOX_DEFAULT_RX - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Receive files using the Xmodem protocol. config BUSYBOX_CONFIG_SETSERIAL bool "setserial" default BUSYBOX_DEFAULT_SETSERIAL select BUSYBOX_CONFIG_PLATFORM_LINUX help Retrieve or set Linux serial port. -config BUSYBOX_CONFIG_STRINGS - bool "strings" - default BUSYBOX_DEFAULT_STRINGS +config BUSYBOX_CONFIG_TASKSET + bool "taskset" + default BUSYBOX_DEFAULT_TASKSET # doesn't build on some non-x86 targets (m68k) help - strings prints the printable character sequences for each file - specified. -config BUSYBOX_CONFIG_TIME - bool "time" - default BUSYBOX_DEFAULT_TIME + Retrieve or set a processes's CPU affinity. + This requires sched_{g,s}etaffinity support in your libc. + +config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY + bool "Fancy output" + default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY + depends on BUSYBOX_CONFIG_TASKSET help - The time command runs the specified program with the given arguments. - When the command finishes, time writes a message to standard output - giving timing statistics about this program run. -config BUSYBOX_CONFIG_TTYSIZE - bool "ttysize" - default BUSYBOX_DEFAULT_TTYSIZE - help - A replacement for "stty size". Unlike stty, can report only width, - only height, or both, in any order. It also does not complain on - error, but returns default 80x24. - Usage in shell scripts: width=`ttysize w`. + Add code for fancy output. This merely silences a compiler-warning + and adds about 135 Bytes. May be needed for machines with alot + of CPUs. config BUSYBOX_CONFIG_UBIATTACH bool "ubiattach" default BUSYBOX_DEFAULT_UBIATTACH @@ -671,11 +252,531 @@ config BUSYBOX_CONFIG_UBIRENAME select BUSYBOX_CONFIG_PLATFORM_LINUX help Utility to rename UBI volumes +config BUSYBOX_CONFIG_WALL + bool "wall" + default BUSYBOX_DEFAULT_WALL + depends on BUSYBOX_CONFIG_FEATURE_UTMP + help + Write a message to all users that are logged in. + +config BUSYBOX_CONFIG_ADJTIMEX + bool "adjtimex" + default BUSYBOX_DEFAULT_ADJTIMEX + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Adjtimex reads and optionally sets adjustment parameters for + the Linux clock adjustment algorithm. + +config BUSYBOX_CONFIG_BBCONFIG + bool "bbconfig" + default BUSYBOX_DEFAULT_BBCONFIG + help + The bbconfig applet will print the config file with which + busybox was built. + +config BUSYBOX_CONFIG_FEATURE_COMPRESS_BBCONFIG + bool "Compress bbconfig data" + default BUSYBOX_DEFAULT_FEATURE_COMPRESS_BBCONFIG + depends on BUSYBOX_CONFIG_BBCONFIG + help + Store bbconfig data in compressed form, uncompress them on-the-fly + before output. + + If you have a really tiny busybox with few applets enabled (and + bunzip2 isn't one of them), the overhead of the decompressor might + be noticeable. Also, if you run executables directly from ROM + and have very little memory, this might not be a win. Otherwise, + you probably want this. + +config BUSYBOX_CONFIG_BEEP + bool "beep" + default BUSYBOX_DEFAULT_BEEP + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + The beep applets beeps in a given freq/Hz. + +config BUSYBOX_CONFIG_FEATURE_BEEP_FREQ + int "default frequency" + range 0 2147483647 + default BUSYBOX_DEFAULT_FEATURE_BEEP_FREQ + depends on BUSYBOX_CONFIG_BEEP + help + Frequency for default beep. + +config BUSYBOX_CONFIG_FEATURE_BEEP_LENGTH_MS + int "default length" + range 0 2147483647 + default BUSYBOX_DEFAULT_FEATURE_BEEP_LENGTH_MS + depends on BUSYBOX_CONFIG_BEEP + help + Length in ms for default beep. + +config BUSYBOX_CONFIG_CHAT + bool "chat" + default BUSYBOX_DEFAULT_CHAT + help + Simple chat utility. + +config BUSYBOX_CONFIG_FEATURE_CHAT_NOFAIL + bool "Enable NOFAIL expect strings" + depends on BUSYBOX_CONFIG_CHAT + default BUSYBOX_DEFAULT_FEATURE_CHAT_NOFAIL + help + When enabled expect strings which are started with a dash trigger + no-fail mode. That is when expectation is not met within timeout + the script is not terminated but sends next SEND string and waits + for next EXPECT string. This allows to compose far more flexible + scripts. + +config BUSYBOX_CONFIG_FEATURE_CHAT_TTY_HIFI + bool "Force STDIN to be a TTY" + depends on BUSYBOX_CONFIG_CHAT + default BUSYBOX_DEFAULT_FEATURE_CHAT_TTY_HIFI + help + Original chat always treats STDIN as a TTY device and sets for it + so-called raw mode. This option turns on such behaviour. + +config BUSYBOX_CONFIG_FEATURE_CHAT_IMPLICIT_CR + bool "Enable implicit Carriage Return" + depends on BUSYBOX_CONFIG_CHAT + default BUSYBOX_DEFAULT_FEATURE_CHAT_IMPLICIT_CR + help + When enabled make chat to terminate all SEND strings with a "\r" + unless "\c" is met anywhere in the string. + +config BUSYBOX_CONFIG_FEATURE_CHAT_SWALLOW_OPTS + bool "Swallow options" + depends on BUSYBOX_CONFIG_CHAT + default BUSYBOX_DEFAULT_FEATURE_CHAT_SWALLOW_OPTS + help + Busybox chat require no options. To make it not fail when used + in place of original chat (which has a bunch of options) turn + this on. + +config BUSYBOX_CONFIG_FEATURE_CHAT_SEND_ESCAPES + bool "Support weird SEND escapes" + depends on BUSYBOX_CONFIG_CHAT + default BUSYBOX_DEFAULT_FEATURE_CHAT_SEND_ESCAPES + help + Original chat uses some escape sequences in SEND arguments which + are not sent to device but rather performs special actions. + E.g. "\K" means to send a break sequence to device. + "\d" delays execution for a second, "\p" -- for a 1/100 of second. + Before turning this option on think twice: do you really need them? + +config BUSYBOX_CONFIG_FEATURE_CHAT_VAR_ABORT_LEN + bool "Support variable-length ABORT conditions" + depends on BUSYBOX_CONFIG_CHAT + default BUSYBOX_DEFAULT_FEATURE_CHAT_VAR_ABORT_LEN + help + Original chat uses fixed 50-bytes length ABORT conditions. Say N here. + +config BUSYBOX_CONFIG_FEATURE_CHAT_CLR_ABORT + bool "Support revoking of ABORT conditions" + depends on BUSYBOX_CONFIG_CHAT + default BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT + help + Support CLR_ABORT directive. + +config BUSYBOX_CONFIG_CHRT + bool "chrt" + default BUSYBOX_DEFAULT_CHRT + help + manipulate real-time attributes of a process. + This requires sched_{g,s}etparam support in your libc. + +config BUSYBOX_CONFIG_CRONTAB + bool "crontab" + default BUSYBOX_DEFAULT_CRONTAB + help + Crontab manipulates the crontab for a particular user. Only + the superuser may specify a different user and/or crontab directory. + Note that Busybox binary must be setuid root for this applet to + work properly. + +config BUSYBOX_CONFIG_DC + bool "dc" + default BUSYBOX_DEFAULT_DC + help + Dc is a reverse-polish desk calculator which supports unlimited + precision arithmetic. + +config BUSYBOX_CONFIG_FEATURE_DC_LIBM + bool "Enable power and exp functions (requires libm)" + default BUSYBOX_DEFAULT_FEATURE_DC_LIBM + depends on BUSYBOX_CONFIG_DC + help + Enable power and exp functions. + NOTE: This will require libm to be present for linking. + +config BUSYBOX_CONFIG_DEVFSD + bool "devfsd (obsolete)" + default BUSYBOX_DEFAULT_DEVFSD + select BUSYBOX_CONFIG_PLATFORM_LINUX + select BUSYBOX_CONFIG_FEATURE_SYSLOG + help + This is deprecated and should NOT be used anymore. + Use linux >= 2.6 (optionally with hotplug) and mdev instead! + See docs/mdev.txt for detailed instructions on how to use mdev + instead. + + Provides compatibility with old device names on a devfs systems. + You should set it to true if you have devfs enabled. + The following keywords in devsfd.conf are supported: + "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE", + "PERMISSIONS", "EXECUTE", "COPY", "IGNORE", + "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT". + + But only if they are written UPPERCASE!!!!!!!! + +config BUSYBOX_CONFIG_DEVFSD_MODLOAD + bool "Adds support for MODLOAD keyword in devsfd.conf" + default BUSYBOX_DEFAULT_DEVFSD_MODLOAD + depends on BUSYBOX_CONFIG_DEVFSD + help + This actually doesn't work with busybox modutils but needs + the external modutils. + +config BUSYBOX_CONFIG_DEVFSD_FG_NP + bool "Enables the -fg and -np options" + default BUSYBOX_DEFAULT_DEVFSD_FG_NP + depends on BUSYBOX_CONFIG_DEVFSD + help + -fg Run the daemon in the foreground. + -np Exit after parsing the configuration file. + Do not poll for events. + +config BUSYBOX_CONFIG_DEVFSD_VERBOSE + bool "Increases logging (and size)" + default BUSYBOX_DEFAULT_DEVFSD_VERBOSE + depends on BUSYBOX_CONFIG_DEVFSD + help + Increases logging to stderr or syslog. + +config BUSYBOX_CONFIG_FEATURE_DEVFS + bool "Use devfs names for all devices (obsolete)" + default BUSYBOX_DEFAULT_FEATURE_DEVFS + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + This is obsolete and should NOT be used anymore. + Use linux >= 2.6 (optionally with hotplug) and mdev instead! + + For legacy systems -- if there is no way around devfsd -- this + tells busybox to look for names like /dev/loop/0 instead of + /dev/loop0. If your /dev directory has normal names instead of + devfs names, you don't want this. + +config BUSYBOX_CONFIG_DEVMEM + bool "devmem" + default BUSYBOX_DEFAULT_DEVMEM + help + devmem is a small program that reads and writes from physical + memory using /dev/mem. + +config BUSYBOX_CONFIG_EJECT + bool "eject" + default BUSYBOX_DEFAULT_EJECT + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Used to eject cdroms. (defaults to /dev/cdrom) + +config BUSYBOX_CONFIG_FEATURE_EJECT_SCSI + bool "SCSI support" + default BUSYBOX_DEFAULT_FEATURE_EJECT_SCSI + depends on BUSYBOX_CONFIG_EJECT + help + Add the -s option to eject, this allows to eject SCSI-Devices and + usb-storage devices. + +config BUSYBOX_CONFIG_FBSPLASH + bool "fbsplash" + default BUSYBOX_DEFAULT_FBSPLASH + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Shows splash image and progress bar on framebuffer device. + Can be used during boot phase of an embedded device. ~2kb. + Usage: + - use kernel option 'vga=xxx' or otherwise enable fb device. + - put somewhere fbsplash.cfg file and an image in .ppm format. + - $ setsid fbsplash [params] & + -c: hide cursor + -d /dev/fbN: framebuffer device (if not /dev/fb0) + -s path_to_image_file (can be "-" for stdin) + -i path_to_cfg_file (can be "-" for stdin) + -f path_to_fifo (can be "-" for stdin) + - if you want to run it only in presence of kernel parameter: + grep -q "fbsplash=on" = 2.6.13 + +config BUSYBOX_CONFIG_INOTIFYD + bool "inotifyd" + default BUSYBOX_DEFAULT_INOTIFYD # doesn't build on Knoppix 5 + help + Simple inotify daemon. Reports filesystem changes. Requires + kernel >= 2.6.13 + +config BUSYBOX_CONFIG_LAST + bool "last" + default BUSYBOX_DEFAULT_LAST + depends on BUSYBOX_CONFIG_FEATURE_WTMP + help + 'last' displays a list of the last users that logged into the system. + +config BUSYBOX_CONFIG_FEATURE_LAST_FANCY + bool "Turn on output of extra information" + default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY + depends on BUSYBOX_CONFIG_LAST + help + 'last' displays detailed information about the last users that + logged into the system (mimics sysvinit last). +900 bytes. + +config BUSYBOX_CONFIG_HDPARM + bool "hdparm" + default BUSYBOX_DEFAULT_HDPARM + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Get/Set hard drive parameters. Primarily intended for ATA + drives. Adds about 13k (or around 30k if you enable the + FEATURE_HDPARM_GET_IDENTITY option).... + +config BUSYBOX_CONFIG_FEATURE_HDPARM_GET_IDENTITY + bool "Support obtaining detailed information directly from drives" + default BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY + depends on BUSYBOX_CONFIG_HDPARM + help + Enables the -I and -i options to obtain detailed information + directly from drives about their capabilities and supported ATA + feature set. If no device name is specified, hdparm will read + identify data from stdin. Enabling this option will add about 16k... + +config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF + bool "Register an IDE interface (DANGEROUS)" + default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF + depends on BUSYBOX_CONFIG_HDPARM + help + Enables the 'hdparm -R' option to register an IDE interface. + This is dangerous stuff, so you should probably say N. + +config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF + bool "Un-register an IDE interface (DANGEROUS)" + default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF + depends on BUSYBOX_CONFIG_HDPARM + help + Enables the 'hdparm -U' option to un-register an IDE interface. + This is dangerous stuff, so you should probably say N. + +config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET + bool "Perform device reset (DANGEROUS)" + default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET + depends on BUSYBOX_CONFIG_HDPARM + help + Enables the 'hdparm -w' option to perform a device reset. + This is dangerous stuff, so you should probably say N. + +config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF + bool "Tristate device for hotswap (DANGEROUS)" + default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF + depends on BUSYBOX_CONFIG_HDPARM + help + Enables the 'hdparm -x' option to tristate device for hotswap, + and the '-b' option to get/set bus state. This is dangerous + stuff, so you should probably say N. + +config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA + bool "Get/set using_dma flag" + default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA + depends on BUSYBOX_CONFIG_HDPARM + help + Enables the 'hdparm -d' option to get/set using_dma flag. + +config BUSYBOX_CONFIG_LOCK + bool "lock" + default BUSYBOX_DEFAULT_LOCK + help + Small utility for using locks in scripts + +config BUSYBOX_CONFIG_MAKEDEVS + bool "makedevs" + default BUSYBOX_DEFAULT_MAKEDEVS + help + 'makedevs' is a utility used to create a batch of devices with + one command. + + There are two choices for command line behaviour, the interface + as used by LEAF/Linux Router Project, or a device table file. + + 'leaf' is traditionally what busybox follows, it allows multiple + devices of a particluar type to be created per command. + e.g. /dev/hda[0-9] + Device properties are passed as command line arguments. + + 'table' reads device properties from a file or stdin, allowing + a batch of unrelated devices to be made with one command. + User/group names are allowed as an alternative to uid/gid. + +choice + prompt "Choose makedevs behaviour" + depends on BUSYBOX_CONFIG_MAKEDEVS + default BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE + +config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_LEAF + bool "leaf" + +config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE + bool "table" + +endchoice + +config BUSYBOX_CONFIG_MAN + bool "man" + default BUSYBOX_DEFAULT_MAN + help + Format and display manual pages. + +config BUSYBOX_CONFIG_MICROCOM + bool "microcom" + default BUSYBOX_DEFAULT_MICROCOM + help + The poor man's minicom utility for chatting with serial port devices. + +config BUSYBOX_CONFIG_MOUNTPOINT + bool "mountpoint" + default BUSYBOX_DEFAULT_MOUNTPOINT + help + mountpoint checks if the directory is a mountpoint. + +config BUSYBOX_CONFIG_MT + bool "mt" + default BUSYBOX_DEFAULT_MT + help + mt is used to control tape devices. You can use the mt utility + to advance or rewind a tape past a specified number of archive + files on the tape. + +config BUSYBOX_CONFIG_RAIDAUTORUN + bool "raidautorun" + default BUSYBOX_DEFAULT_RAIDAUTORUN + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + raidautorun tells the kernel md driver to + search and start RAID arrays. + +config BUSYBOX_CONFIG_READAHEAD + bool "readahead" + default BUSYBOX_DEFAULT_READAHEAD + depends on BUSYBOX_CONFIG_LFS + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Preload the files listed on the command line into RAM cache so that + subsequent reads on these files will not block on disk I/O. + + This applet just calls the readahead(2) system call on each file. + It is mainly useful in system startup scripts to preload files + or executables before they are used. When used at the right time + (in particular when a CPU bound process is running) it can + significantly speed up system startup. + + As readahead(2) blocks until each file has been read, it is best to + run this applet as a background job. + +config BUSYBOX_CONFIG_RUNLEVEL + bool "runlevel" + default BUSYBOX_DEFAULT_RUNLEVEL + depends on BUSYBOX_CONFIG_FEATURE_UTMP + help + find the current and previous system runlevel. + + This applet uses utmp but does not rely on busybox supporing + utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. + +config BUSYBOX_CONFIG_RX + bool "rx" + default BUSYBOX_DEFAULT_RX + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Receive files using the Xmodem protocol. + +config BUSYBOX_CONFIG_SETSID + bool "setsid" + default BUSYBOX_DEFAULT_SETSID + help + setsid runs a program in a new session + +config BUSYBOX_CONFIG_STRINGS + bool "strings" + default BUSYBOX_DEFAULT_STRINGS + help + strings prints the printable character sequences for each file + specified. + +config BUSYBOX_CONFIG_TIME + bool "time" + default BUSYBOX_DEFAULT_TIME + help + The time command runs the specified program with the given arguments. + When the command finishes, time writes a message to standard output + giving timing statistics about this program run. + +config BUSYBOX_CONFIG_TIMEOUT + bool "timeout" + default BUSYBOX_DEFAULT_TIMEOUT + help + Runs a program and watches it. If it does not terminate in + specified number of seconds, it is sent a signal. + +config BUSYBOX_CONFIG_TTYSIZE + bool "ttysize" + default BUSYBOX_DEFAULT_TTYSIZE + help + A replacement for "stty size". Unlike stty, can report only width, + only height, or both, in any order. It also does not complain on + error, but returns default 80x24. + Usage in shell scripts: width=`ttysize w`. + config BUSYBOX_CONFIG_VOLNAME bool "volname" default BUSYBOX_DEFAULT_VOLNAME help Prints a CD-ROM volume name. + config BUSYBOX_CONFIG_WATCHDOG bool "watchdog" default BUSYBOX_DEFAULT_WATCHDOG diff --git a/package/utils/busybox/config/modutils/Config.in b/package/utils/busybox/config/modutils/Config.in index 9791af65a..8e0e2af9e 100644 --- a/package/utils/busybox/config/modutils/Config.in +++ b/package/utils/busybox/config/modutils/Config.in @@ -6,14 +6,19 @@ menu "Linux Module Utilities" +config BUSYBOX_CONFIG_MODINFO + bool "modinfo" + default BUSYBOX_DEFAULT_MODINFO + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Show information about a Linux Kernel module + config BUSYBOX_CONFIG_MODPROBE_SMALL bool "Simplified modutils" default BUSYBOX_DEFAULT_MODPROBE_SMALL + select BUSYBOX_CONFIG_PLATFORM_LINUX help - Build smaller (~1.5 kbytes), simplified module tools. - - This option by itself does not enable any applets - - you need to select applets individually below. + Simplified modutils. With this option modprobe does not require modules.dep file and does not use /etc/modules.conf file. @@ -34,23 +39,46 @@ config BUSYBOX_CONFIG_MODPROBE_SMALL Additional module parameters can be stored in /etc/modules/$module_name files. -config BUSYBOX_CONFIG_DEPMOD - bool "depmod" - default BUSYBOX_DEFAULT_DEPMOD + Apart from modprobe, other utilities are also provided: + - insmod is an alias to modprobe + - rmmod is an alias to modprobe -r + - depmod generates modules.dep.bb + +config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE + bool "Accept module options on modprobe command line" + default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE + depends on BUSYBOX_CONFIG_MODPROBE_SMALL select BUSYBOX_CONFIG_PLATFORM_LINUX help - depmod generates modules.dep (and potentially modules.alias - and modules.symbols) that contain dependency information - for modprobe. + Allow insmod and modprobe take module options from command line. + +config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED + bool "Skip loading of already loaded modules" + default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED + depends on BUSYBOX_CONFIG_MODPROBE_SMALL + help + Check if the module is already loaded. + config BUSYBOX_CONFIG_INSMOD bool "insmod" default BUSYBOX_DEFAULT_INSMOD + depends on !BUSYBOX_CONFIG_MODPROBE_SMALL select BUSYBOX_CONFIG_PLATFORM_LINUX help insmod is used to load specified modules in the running kernel. + +config BUSYBOX_CONFIG_RMMOD + bool "rmmod" + default BUSYBOX_DEFAULT_RMMOD + depends on !BUSYBOX_CONFIG_MODPROBE_SMALL + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + rmmod is used to unload specified modules from the kernel. + config BUSYBOX_CONFIG_LSMOD bool "lsmod" default BUSYBOX_DEFAULT_LSMOD + depends on !BUSYBOX_CONFIG_MODPROBE_SMALL select BUSYBOX_CONFIG_PLATFORM_LINUX help lsmod is used to display a list of loaded modules. @@ -58,20 +86,17 @@ config BUSYBOX_CONFIG_LSMOD config BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT bool "Pretty output" default BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT - depends on BUSYBOX_CONFIG_LSMOD && !BUSYBOX_CONFIG_MODPROBE_SMALL + depends on BUSYBOX_CONFIG_LSMOD + select BUSYBOX_CONFIG_PLATFORM_LINUX help This option makes output format of lsmod adjusted to the format of module-init-tools for Linux kernel 2.6. Increases size somewhat. -config BUSYBOX_CONFIG_MODINFO - bool "modinfo" - default BUSYBOX_DEFAULT_MODINFO - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Show information about a Linux Kernel module + config BUSYBOX_CONFIG_MODPROBE bool "modprobe" default BUSYBOX_DEFAULT_MODPROBE + depends on !BUSYBOX_CONFIG_MODPROBE_SMALL select BUSYBOX_CONFIG_PLATFORM_LINUX help Handle the loading of modules, and their dependencies on a high @@ -80,109 +105,42 @@ config BUSYBOX_CONFIG_MODPROBE config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST bool "Blacklist support" default BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST - depends on BUSYBOX_CONFIG_MODPROBE && !BUSYBOX_CONFIG_MODPROBE_SMALL + depends on BUSYBOX_CONFIG_MODPROBE + select BUSYBOX_CONFIG_PLATFORM_LINUX help Say 'y' here to enable support for the 'blacklist' command in modprobe.conf. This prevents the alias resolver to resolve blacklisted modules. This is useful if you want to prevent your hardware autodetection scripts to load modules like evdev, frame buffer drivers etc. -config BUSYBOX_CONFIG_RMMOD - bool "rmmod" - default BUSYBOX_DEFAULT_RMMOD + +config BUSYBOX_CONFIG_DEPMOD + bool "depmod" + default BUSYBOX_DEFAULT_DEPMOD + depends on !BUSYBOX_CONFIG_MODPROBE_SMALL select BUSYBOX_CONFIG_PLATFORM_LINUX help - rmmod is used to unload specified modules from the kernel. + depmod generates modules.dep (and potentially modules.alias + and modules.symbols) that contain dependency information + for modprobe. comment "Options common to multiple modutils" -config BUSYBOX_CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS - bool "Accept module options on modprobe command line" - default BUSYBOX_DEFAULT_FEATURE_CMDLINE_MODULE_OPTIONS - depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE - help - Allow insmod and modprobe take module options from the applets' - command line. - -config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED - bool "Skip loading of already loaded modules" - default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED - depends on BUSYBOX_CONFIG_MODPROBE_SMALL && (BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE) - help - Check if the module is already loaded. - config BUSYBOX_CONFIG_FEATURE_2_4_MODULES bool "Support version 2.2/2.4 Linux kernels" default BUSYBOX_DEFAULT_FEATURE_2_4_MODULES - depends on (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_LSMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_RMMOD) && !BUSYBOX_CONFIG_MODPROBE_SMALL + depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD || BUSYBOX_CONFIG_LSMOD + select BUSYBOX_CONFIG_PLATFORM_LINUX help Support module loading for 2.2.x and 2.4.x Linux kernels. This increases size considerably. Say N unless you plan to run ancient kernels. -config BUSYBOX_CONFIG_FEATURE_INSMOD_VERSION_CHECKING - bool "Enable module version checking" - default BUSYBOX_DEFAULT_FEATURE_INSMOD_VERSION_CHECKING - depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE) - help - Support checking of versions for modules. This is used to - ensure that the kernel and module are made for each other. - -config BUSYBOX_CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS - bool "Add module symbols to kernel symbol table" - default BUSYBOX_DEFAULT_FEATURE_INSMOD_KSYMOOPS_SYMBOLS - depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE) - help - By adding module symbols to the kernel symbol table, Oops messages - occurring within kernel modules can be properly debugged. By enabling - this feature, module symbols will always be added to the kernel symbol - table for proper debugging support. If you are not interested in - Oops messages from kernel modules, say N. - -config BUSYBOX_CONFIG_FEATURE_INSMOD_LOADINKMEM - bool "In kernel memory optimization (uClinux only)" - default BUSYBOX_DEFAULT_FEATURE_INSMOD_LOADINKMEM - depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE) - help - This is a special uClinux only memory optimization that lets insmod - load the specified kernel module directly into kernel space, reducing - memory usage by preventing the need for two copies of the module - being loaded into memory. - -config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP - bool "Enable insmod load map (-m) option" - default BUSYBOX_DEFAULT_FEATURE_INSMOD_LOAD_MAP - depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && BUSYBOX_CONFIG_INSMOD - help - Enabling this, one would be able to get a load map - output on stdout. This makes kernel module debugging - easier. - If you don't plan to debug kernel modules, you - don't need this option. - -config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL - bool "Symbols in load map" - default BUSYBOX_DEFAULT_FEATURE_INSMOD_LOAD_MAP_FULL - depends on BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP - help - Without this option, -m will only output section - load map. With this option, -m will also output - symbols load map. - -config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE - bool "Support tainted module checking with new kernels" - default BUSYBOX_DEFAULT_FEATURE_CHECK_TAINTED_MODULE - depends on (BUSYBOX_CONFIG_LSMOD || BUSYBOX_CONFIG_FEATURE_2_4_MODULES) && !BUSYBOX_CONFIG_MODPROBE_SMALL - help - Support checking for tainted modules. These are usually binary - only modules that will make the linux-kernel list ignore your - support request. - This option is required to support GPLONLY modules. - config BUSYBOX_CONFIG_FEATURE_INSMOD_TRY_MMAP bool "Try to load module from a mmap'ed area" default BUSYBOX_DEFAULT_FEATURE_INSMOD_TRY_MMAP - depends on (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE) && !BUSYBOX_CONFIG_MODPROBE_SMALL + depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE_SMALL + select BUSYBOX_CONFIG_PLATFORM_LINUX help This option causes module loading code to try to mmap module first. If it does not work (for example, @@ -195,10 +153,76 @@ config BUSYBOX_CONFIG_FEATURE_INSMOD_TRY_MMAP Choosing N saves about 250 bytes of code (on 32-bit x86). +config BUSYBOX_CONFIG_FEATURE_INSMOD_VERSION_CHECKING + bool "Enable module version checking" + default BUSYBOX_DEFAULT_FEATURE_INSMOD_VERSION_CHECKING + depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE) + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Support checking of versions for modules. This is used to + ensure that the kernel and module are made for each other. + +config BUSYBOX_CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS + bool "Add module symbols to kernel symbol table" + default BUSYBOX_DEFAULT_FEATURE_INSMOD_KSYMOOPS_SYMBOLS + depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE) + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + By adding module symbols to the kernel symbol table, Oops messages + occuring within kernel modules can be properly debugged. By enabling + this feature, module symbols will always be added to the kernel symbol + table for proper debugging support. If you are not interested in + Oops messages from kernel modules, say N. + +config BUSYBOX_CONFIG_FEATURE_INSMOD_LOADINKMEM + bool "In kernel memory optimization (uClinux only)" + default BUSYBOX_DEFAULT_FEATURE_INSMOD_LOADINKMEM + depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE) + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + This is a special uClinux only memory optimization that lets insmod + load the specified kernel module directly into kernel space, reducing + memory usage by preventing the need for two copies of the module + being loaded into memory. + +config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP + bool "Enable insmod load map (-m) option" + default BUSYBOX_DEFAULT_FEATURE_INSMOD_LOAD_MAP + depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && BUSYBOX_CONFIG_INSMOD + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Enabling this, one would be able to get a load map + output on stdout. This makes kernel module debugging + easier. + If you don't plan to debug kernel modules, you + don't need this option. + +config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL + bool "Symbols in load map" + default BUSYBOX_DEFAULT_FEATURE_INSMOD_LOAD_MAP_FULL + depends on BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP && !BUSYBOX_CONFIG_MODPROBE_SMALL + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Without this option, -m will only output section + load map. With this option, -m will also output + symbols load map. + +config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE + bool "Support tainted module checking with new kernels" + default BUSYBOX_DEFAULT_FEATURE_CHECK_TAINTED_MODULE + depends on (BUSYBOX_CONFIG_LSMOD || BUSYBOX_CONFIG_FEATURE_2_4_MODULES) && !BUSYBOX_CONFIG_MODPROBE_SMALL + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Support checking for tainted modules. These are usually binary + only modules that will make the linux-kernel list ignore your + support request. + This option is required to support GPLONLY modules. + config BUSYBOX_CONFIG_FEATURE_MODUTILS_ALIAS - bool "Support module.aliases file" + bool "Support for module.aliases file" default BUSYBOX_DEFAULT_FEATURE_MODUTILS_ALIAS - depends on (BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE) && !BUSYBOX_CONFIG_MODPROBE_SMALL + depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE + select BUSYBOX_CONFIG_PLATFORM_LINUX help Generate and parse modules.alias containing aliases for bus identifiers: @@ -212,9 +236,10 @@ config BUSYBOX_CONFIG_FEATURE_MODUTILS_ALIAS Say Y if unsure. config BUSYBOX_CONFIG_FEATURE_MODUTILS_SYMBOLS - bool "Support module.symbols file" + bool "Support for module.symbols file" default BUSYBOX_DEFAULT_FEATURE_MODUTILS_SYMBOLS - depends on (BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE) && !BUSYBOX_CONFIG_MODPROBE_SMALL + depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE + select BUSYBOX_CONFIG_PLATFORM_LINUX help Generate and parse modules.symbols containing aliases for symbol_request() kernel calls, such as: @@ -225,7 +250,7 @@ config BUSYBOX_CONFIG_FEATURE_MODUTILS_SYMBOLS config BUSYBOX_CONFIG_DEFAULT_MODULES_DIR string "Default directory containing modules" default BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR - depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_MODINFO + depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_MODPROBE_SMALL || BUSYBOX_CONFIG_MODINFO help Directory that contains kernel modules. Defaults to "/lib/modules" @@ -233,13 +258,9 @@ config BUSYBOX_CONFIG_DEFAULT_MODULES_DIR config BUSYBOX_CONFIG_DEFAULT_DEPMOD_FILE string "Default name of modules.dep" default BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE - depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_MODINFO + depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_MODPROBE_SMALL || BUSYBOX_CONFIG_MODINFO help Filename that contains kernel modules dependencies. - Defaults to "modules.dep". - If you configured the "simplified modutils" (MODPROBE_SMALL), a - ".bb" suffix will be added after this name. Do not specify ".bb" - here unless you intend your depmod or modprobe to work on - "modules.dep.bb.bb" or such. + Defaults to "modules.dep" endmenu diff --git a/package/utils/busybox/config/networking/Config.in b/package/utils/busybox/config/networking/Config.in index 2d2a1c4a9..e58746bdd 100644 --- a/package/utils/busybox/config/networking/Config.in +++ b/package/utils/busybox/config/networking/Config.in @@ -6,602 +6,6 @@ menu "Networking Utilities" -config BUSYBOX_CONFIG_FEATURE_IPV6 - bool "Enable IPv6 support" - default BUSYBOX_DEFAULT_FEATURE_IPV6 - help - Enable IPv6 support in busybox. - This adds IPv6 support in the networking applets. - -config BUSYBOX_CONFIG_FEATURE_UNIX_LOCAL - bool "Enable Unix domain socket support (usually not needed)" - default BUSYBOX_DEFAULT_FEATURE_UNIX_LOCAL - help - Enable Unix domain socket support in all busybox networking - applets. Address of the form local:/path/to/unix/socket - will be recognized. - - This extension is almost never used in real world usage. - You most likely want to say N. - -config BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS - bool "Prefer IPv4 addresses from DNS queries" - default BUSYBOX_DEFAULT_FEATURE_PREFER_IPV4_ADDRESS - depends on BUSYBOX_CONFIG_FEATURE_IPV6 - help - Use IPv4 address of network host if it has one. - - If this option is off, the first returned address will be used. - This may cause problems when your DNS server is IPv6-capable and - is returning IPv6 host addresses too. If IPv6 address - precedes IPv4 one in DNS reply, busybox network applets - (e.g. wget) will use IPv6 address. On an IPv6-incapable host - or network applets will fail to connect to the host - using IPv6 address. - -config BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS - bool "Verbose resolution errors" - default BUSYBOX_DEFAULT_VERBOSE_RESOLUTION_ERRORS - help - Enable if you are not satisfied with simplistic - "can't resolve 'hostname.com'" and want to know more. - This may increase size of your executable a bit. - -config BUSYBOX_CONFIG_ARP - bool "arp" - default BUSYBOX_DEFAULT_ARP - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Manipulate the system ARP cache. -config BUSYBOX_CONFIG_ARPING - bool "arping" - default BUSYBOX_DEFAULT_ARPING - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Ping hosts by ARP packets. - -config BUSYBOX_CONFIG_BRCTL - bool "brctl" - default BUSYBOX_DEFAULT_BRCTL - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Manage ethernet bridges. - Supports addbr/delbr and addif/delif. - -config BUSYBOX_CONFIG_FEATURE_BRCTL_FANCY - bool "Fancy options" - default BUSYBOX_DEFAULT_FEATURE_BRCTL_FANCY - depends on BUSYBOX_CONFIG_BRCTL - help - Add support for extended option like: - setageing, setfd, sethello, setmaxage, - setpathcost, setportprio, setbridgeprio, - stp - This adds about 600 bytes. - -config BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW - bool "Support show" - default BUSYBOX_DEFAULT_FEATURE_BRCTL_SHOW - depends on BUSYBOX_CONFIG_BRCTL && BUSYBOX_CONFIG_FEATURE_BRCTL_FANCY - help - Add support for option which prints the current config: - show -config BUSYBOX_CONFIG_DNSD - bool "dnsd" - default BUSYBOX_DEFAULT_DNSD - help - Small and static DNS server daemon. -config BUSYBOX_CONFIG_ETHER_WAKE - bool "ether-wake" - default BUSYBOX_DEFAULT_ETHER_WAKE - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Send a magic packet to wake up sleeping machines. -config BUSYBOX_CONFIG_FTPD - bool "ftpd" - default BUSYBOX_DEFAULT_FTPD - help - Simple FTP daemon. You have to run it via inetd. - -config BUSYBOX_CONFIG_FEATURE_FTPD_WRITE - bool "Enable upload commands" - default BUSYBOX_DEFAULT_FEATURE_FTPD_WRITE - depends on BUSYBOX_CONFIG_FTPD - help - Enable all kinds of FTP upload commands (-w option) - -config BUSYBOX_CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST - bool "Enable workaround for RFC-violating clients" - default BUSYBOX_DEFAULT_FEATURE_FTPD_ACCEPT_BROKEN_LIST - depends on BUSYBOX_CONFIG_FTPD - help - Some ftp clients (among them KDE's Konqueror) issue illegal - "LIST -l" requests. This option works around such problems. - It might prevent you from listing files starting with "-" and - it increases the code size by ~40 bytes. - Most other ftp servers seem to behave similar to this. - -config BUSYBOX_CONFIG_FEATURE_FTPD_AUTHENTICATION - bool "Enable authentication" - default BUSYBOX_DEFAULT_FEATURE_FTPD_AUTHENTICATION - depends on BUSYBOX_CONFIG_FTPD - help - Enable basic system login as seen in telnet etc. -config BUSYBOX_CONFIG_FTPGET - bool "ftpget" - default BUSYBOX_DEFAULT_FTPGET - help - Retrieve a remote file via FTP. - -config BUSYBOX_CONFIG_FTPPUT - bool "ftpput" - default BUSYBOX_DEFAULT_FTPPUT - help - Store a remote file via FTP. - -config BUSYBOX_CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS - bool "Enable long options in ftpget/ftpput" - default BUSYBOX_DEFAULT_FEATURE_FTPGETPUT_LONG_OPTIONS - depends on BUSYBOX_CONFIG_LONG_OPTS && (BUSYBOX_CONFIG_FTPGET || BUSYBOX_CONFIG_FTPPUT) -config BUSYBOX_CONFIG_HOSTNAME - bool "hostname" - default BUSYBOX_DEFAULT_HOSTNAME - help - Show or set the system's host name. - -config BUSYBOX_CONFIG_DNSDOMAINNAME - bool "dnsdomainname" - default BUSYBOX_DEFAULT_DNSDOMAINNAME - help - Alias to "hostname -d". -config BUSYBOX_CONFIG_HTTPD - bool "httpd" - default BUSYBOX_DEFAULT_HTTPD - help - HTTP server. - -config BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES - bool "Support 'Ranges:' header" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_RANGES - depends on BUSYBOX_CONFIG_HTTPD - help - Makes httpd emit "Accept-Ranges: bytes" header and understand - "Range: bytes=NNN-[MMM]" header. Allows for resuming interrupted - downloads, seeking in multimedia players etc. - -config BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID - bool "Enable -u option" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_SETUID - depends on BUSYBOX_CONFIG_HTTPD - help - This option allows the server to run as a specific user - rather than defaulting to the user that starts the server. - Use of this option requires special privileges to change to a - different user. - -config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH - bool "Enable Basic http Authentication" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_BASIC_AUTH - depends on BUSYBOX_CONFIG_HTTPD - help - Utilizes password settings from /etc/httpd.conf for basic - authentication on a per url basis. - Example for httpd.conf file: - /adm:toor:PaSsWd - -config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5 - bool "Support MD5 crypted passwords for http Authentication" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_AUTH_MD5 - depends on BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH - help - Enables encrypted passwords, and wildcard user/passwords - in httpd.conf file. - User '*' means 'any system user name is ok', - password of '*' means 'use system password for this user' - Examples: - /adm:toor:$1$P/eKnWXS$aI1aPGxT.dJD5SzqAKWrF0 - /adm:root:* - /wiki:*:* - -config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI - bool "Support Common Gateway Interface (CGI)" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_CGI - depends on BUSYBOX_CONFIG_HTTPD - help - This option allows scripts and executables to be invoked - when specific URLs are requested. - -config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR - bool "Support running scripts through an interpreter" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR - depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI - help - This option enables support for running scripts through an - interpreter. Turn this on if you want PHP scripts to work - properly. You need to supply an additional line in your - httpd.conf file: - *.php:/path/to/your/php - -config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV - bool "Set REMOTE_PORT environment variable for CGI" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV - depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI - help - Use of this option can assist scripts in generating - references that contain a unique port number. - -config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR - bool "Enable -e option (useful for CGIs written as shell scripts)" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_ENCODE_URL_STR - depends on BUSYBOX_CONFIG_HTTPD - help - This option allows html encoding of arbitrary strings for display - by the browser. Output goes to stdout. - For example, httpd -e "" produces - "<Hello World>". - -config BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES - bool "Support custom error pages" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_ERROR_PAGES - depends on BUSYBOX_CONFIG_HTTPD - help - This option allows you to define custom error pages in - the configuration file instead of the default HTTP status - error pages. For instance, if you add the line: - E404:/path/e404.html - in the config file, the server will respond the specified - '/path/e404.html' file instead of the terse '404 NOT FOUND' - message. - -config BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY - bool "Support reverse proxy" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_PROXY - depends on BUSYBOX_CONFIG_HTTPD - help - This option allows you to define URLs that will be forwarded - to another HTTP server. To setup add the following line to the - configuration file - P:/url/:http://hostname[:port]/new/path/ - Then a request to /url/myfile will be forwarded to - http://hostname[:port]/new/path/myfile. - -config BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP - bool "Support GZIP content encoding" - default BUSYBOX_DEFAULT_FEATURE_HTTPD_GZIP - depends on BUSYBOX_CONFIG_HTTPD - help - Makes httpd send files using GZIP content encoding if the - client supports it and a pre-compressed .gz exists. -config BUSYBOX_CONFIG_IFCONFIG - bool "ifconfig" - default BUSYBOX_DEFAULT_IFCONFIG - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Ifconfig is used to configure the kernel-resident network interfaces. - -config BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS - bool "Enable status reporting output (+7k)" - default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_STATUS - depends on BUSYBOX_CONFIG_IFCONFIG - help - If ifconfig is called with no arguments it will display the status - of the currently active interfaces. - -config BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP - bool "Enable slip-specific options \"keepalive\" and \"outfill\"" - default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_SLIP - depends on BUSYBOX_CONFIG_IFCONFIG - help - Allow "keepalive" and "outfill" support for SLIP. If you're not - planning on using serial lines, leave this unchecked. - -config BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ - bool "Enable options \"mem_start\", \"io_addr\", and \"irq\"" - default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ - depends on BUSYBOX_CONFIG_IFCONFIG - help - Allow the start address for shared memory, start address for I/O, - and/or the interrupt line used by the specified device. - -config BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW - bool "Enable option \"hw\" (ether only)" - default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_HW - depends on BUSYBOX_CONFIG_IFCONFIG - help - Set the hardware address of this interface, if the device driver - supports this operation. Currently, we only support the 'ether' - class. - -config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS - bool "Set the broadcast automatically" - default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_BROADCAST_PLUS - depends on BUSYBOX_CONFIG_IFCONFIG - help - Setting this will make ifconfig attempt to find the broadcast - automatically if the value '+' is used. -config BUSYBOX_CONFIG_IFENSLAVE - bool "ifenslave" - default BUSYBOX_DEFAULT_IFENSLAVE - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Userspace application to bind several interfaces - to a logical interface (use with kernel bonding driver). -config BUSYBOX_CONFIG_IFPLUGD - bool "ifplugd" - default BUSYBOX_DEFAULT_IFPLUGD - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Network interface plug detection daemon. -config BUSYBOX_CONFIG_IFUP - bool "ifup" - default BUSYBOX_DEFAULT_IFUP - help - Activate the specified interfaces. This applet makes use - of either "ifconfig" and "route" or the "ip" command to actually - configure network interfaces. Therefore, you will probably also want - to enable either IFCONFIG and ROUTE, or enable - FEATURE_IFUPDOWN_IP and the various IP options. Of - course you could use non-busybox versions of these programs, so - against my better judgement (since this will surely result in plenty - of support questions on the mailing list), I do not force you to - enable these additional options. It is up to you to supply either - "ifconfig", "route" and "run-parts" or the "ip" command, either - via busybox or via standalone utilities. - -config BUSYBOX_CONFIG_IFDOWN - bool "ifdown" - default BUSYBOX_DEFAULT_IFDOWN - help - Deactivate the specified interfaces. - -config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH - string "Absolute path to ifstate file" - default BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH - depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN - help - ifupdown keeps state information in a file called ifstate. - Typically it is located in /var/run/ifstate, however - some distributions tend to put it in other places - (debian, for example, uses /etc/network/run/ifstate). - This config option defines location of ifstate. - -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP - bool "Use ip tool (else ifconfig/route is used)" - default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP - depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN - help - Use the iproute "ip" command to implement "ifup" and "ifdown", rather - than the default of using the older "ifconfig" and "route" utilities. - - If Y: you must install either the full-blown iproute2 package - or enable "ip" applet in Busybox, or the "ifup" and "ifdown" applets - will not work. - - If N: you must install either the full-blown ifconfig and route - utilities, or enable these applets in Busybox. - -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4 - bool "Support IPv4" - default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4 - depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN - help - If you want ifup/ifdown to talk IPv4, leave this on. - -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6 - bool "Support IPv6" - default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV6 - depends on (BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN) && BUSYBOX_CONFIG_FEATURE_IPV6 - help - If you need support for IPv6, turn this option on. - - -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING - bool "Enable mapping support" - default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_MAPPING - depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN - help - This enables support for the "mapping" stanza, unless you have - a weird network setup you don't need it. - -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP - bool "Support external DHCP clients" - default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_EXTERNAL_DHCP - depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN - help - This enables support for the external dhcp clients. Clients are - tried in the following order: dhcpcd, dhclient, pump and udhcpc. - Otherwise, if udhcpc applet is enabled, it is used. - Otherwise, ifup/ifdown will have no support for DHCP. -config BUSYBOX_CONFIG_INETD - bool "inetd" - default BUSYBOX_DEFAULT_INETD - select BUSYBOX_CONFIG_FEATURE_SYSLOG - help - Internet superserver daemon - -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO - bool "Support echo service" - default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_ECHO - depends on BUSYBOX_CONFIG_INETD - help - Echo received data internal inetd service - -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD - bool "Support discard service" - default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD - depends on BUSYBOX_CONFIG_INETD - help - Internet /dev/null internal inetd service - -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME - bool "Support time service" - default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_TIME - depends on BUSYBOX_CONFIG_INETD - help - Return 32 bit time since 1900 internal inetd service - -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME - bool "Support daytime service" - default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME - depends on BUSYBOX_CONFIG_INETD - help - Return human-readable time internal inetd service - -config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN - bool "Support chargen service" - default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN - depends on BUSYBOX_CONFIG_INETD - help - Familiar character generator internal inetd service - -config BUSYBOX_CONFIG_FEATURE_INETD_RPC - bool "Support RPC services" - default BUSYBOX_DEFAULT_FEATURE_INETD_RPC # very rarely used, and needs Sun RPC support in libc - depends on BUSYBOX_CONFIG_INETD - select BUSYBOX_CONFIG_FEATURE_HAVE_RPC - help - Support Sun-RPC based services -config BUSYBOX_CONFIG_IP - bool "ip" - default BUSYBOX_DEFAULT_IP - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - The "ip" applet is a TCP/IP interface configuration and routing - utility. You generally don't need "ip" to use busybox with - TCP/IP. - -config BUSYBOX_CONFIG_IPADDR - bool "ipaddr" - default BUSYBOX_DEFAULT_IPADDR - select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Support short form of ip addr: ipaddr - -config BUSYBOX_CONFIG_IPLINK - bool "iplink" - default BUSYBOX_DEFAULT_IPLINK - select BUSYBOX_CONFIG_FEATURE_IP_LINK - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Support short form of ip link: iplink - -config BUSYBOX_CONFIG_IPROUTE - bool "iproute" - default BUSYBOX_DEFAULT_IPROUTE - select BUSYBOX_CONFIG_FEATURE_IP_ROUTE - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Support short form of ip route: iproute - -config BUSYBOX_CONFIG_IPTUNNEL - bool "iptunnel" - default BUSYBOX_DEFAULT_IPTUNNEL - select BUSYBOX_CONFIG_FEATURE_IP_TUNNEL - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Support short form of ip tunnel: iptunnel - -config BUSYBOX_CONFIG_IPRULE - bool "iprule" - default BUSYBOX_DEFAULT_IPRULE - select BUSYBOX_CONFIG_FEATURE_IP_RULE - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Support short form of ip rule: iprule - -config BUSYBOX_CONFIG_IPNEIGH - bool "ipneigh" - default BUSYBOX_DEFAULT_IPNEIGH - select BUSYBOX_CONFIG_FEATURE_IP_NEIGH - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Support short form of ip neigh: ipneigh - -config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS - bool "ip address" - default BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS - depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR - help - Address manipulation support for the "ip" applet. - -config BUSYBOX_CONFIG_FEATURE_IP_LINK - bool "ip link" - default BUSYBOX_DEFAULT_FEATURE_IP_LINK - depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPLINK - help - Configure network devices with "ip". - -config BUSYBOX_CONFIG_FEATURE_IP_ROUTE - bool "ip route" - default BUSYBOX_DEFAULT_FEATURE_IP_ROUTE - depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPROUTE - help - Add support for routing table management to "ip". - -config BUSYBOX_CONFIG_FEATURE_IP_ROUTE_DIR - string "ip route configuration directory" - default BUSYBOX_DEFAULT_FEATURE_IP_ROUTE_DIR - depends on BUSYBOX_CONFIG_FEATURE_IP_ROUTE - help - Location of the "ip" applet routing configuration. - -config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL - bool "ip tunnel" - default BUSYBOX_DEFAULT_FEATURE_IP_TUNNEL - depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPTUNNEL - help - Add support for tunneling commands to "ip". - -config BUSYBOX_CONFIG_FEATURE_IP_RULE - bool "ip rule" - default BUSYBOX_DEFAULT_FEATURE_IP_RULE - depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPRULE - help - Add support for rule commands to "ip". - -config BUSYBOX_CONFIG_FEATURE_IP_NEIGH - bool "ip neighbor" - default BUSYBOX_DEFAULT_FEATURE_IP_NEIGH - depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPNEIGH - help - Add support for neighbor commands to "ip". - -config BUSYBOX_CONFIG_FEATURE_IP_RARE_PROTOCOLS - bool "Support displaying rarely used link types" - default BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS - depends on BUSYBOX_CONFIG_IP || BUSYBOX_CONFIG_IPADDR || BUSYBOX_CONFIG_IPLINK || BUSYBOX_CONFIG_IPROUTE || BUSYBOX_CONFIG_IPTUNNEL || BUSYBOX_CONFIG_IPRULE || BUSYBOX_CONFIG_IPNEIGH - help - If you are not going to use links of type "frad", "econet", - "bif" etc, you probably don't need to enable this. - Ethernet, wireless, infrared, ppp/slip, ip tunnelling - link types are supported without this option selected. -config BUSYBOX_CONFIG_IPCALC - bool "ipcalc" - default BUSYBOX_DEFAULT_IPCALC - help - ipcalc takes an IP address and netmask and calculates the - resulting broadcast, network, and host range. - -config BUSYBOX_CONFIG_FEATURE_IPCALC_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS - depends on BUSYBOX_CONFIG_IPCALC && BUSYBOX_CONFIG_LONG_OPTS - -config BUSYBOX_CONFIG_FEATURE_IPCALC_FANCY - bool "Fancy IPCALC, more options, adds 1 kbyte" - default BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY - depends on BUSYBOX_CONFIG_IPCALC - help - Adds the options hostname, prefix and silent to the output of - "ipcalc". -config BUSYBOX_CONFIG_FAKEIDENTD - bool "fakeidentd" - default BUSYBOX_DEFAULT_FAKEIDENTD - select BUSYBOX_CONFIG_FEATURE_SYSLOG - help - fakeidentd listens on the ident port and returns a predefined - fake value on any query. config BUSYBOX_CONFIG_NAMEIF bool "nameif" default BUSYBOX_DEFAULT_NAMEIF @@ -668,11 +72,755 @@ config BUSYBOX_CONFIG_NC_110_COMPAT The code is about 2.5k bigger. It enables -s ADDR, -n, -u, -v, -o FILE, -z options, but loses busybox-specific extensions: -f FILE. +config BUSYBOX_CONFIG_PING + bool "ping" + default BUSYBOX_DEFAULT_PING + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to + elicit an ICMP ECHO_RESPONSE from a host or gateway. + +config BUSYBOX_CONFIG_PING6 + bool "ping6" + default BUSYBOX_DEFAULT_PING6 + depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_PING + help + This will give you a ping that can talk IPv6. + +config BUSYBOX_CONFIG_FEATURE_FANCY_PING + bool "Enable fancy ping output" + default BUSYBOX_DEFAULT_FEATURE_FANCY_PING + depends on BUSYBOX_CONFIG_PING + help + Make the output from the ping applet include statistics, and at the + same time provide full support for ICMP packets. +config BUSYBOX_CONFIG_WGET + bool "wget" + default BUSYBOX_DEFAULT_WGET + help + wget is a utility for non-interactive download of files from HTTP + and FTP servers. + +config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR + bool "Enable a nifty process meter (+2k)" + default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR + depends on BUSYBOX_CONFIG_WGET + help + Enable the transfer progress bar for wget transfers. + +config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION + bool "Enable HTTP authentication" + default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION + depends on BUSYBOX_CONFIG_WGET + help + Support authenticated HTTP transfers. + +config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS + depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the wget applet. + +config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT + bool "Enable timeout option -T SEC" + default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT + depends on BUSYBOX_CONFIG_WGET + help + Supports network read and connect timeouts for wget, + so that wget will give up and timeout, through the -T + command line option. + + Currently only connect and network data read timeout are + supported (i.e., timeout is not applied to the DNS query). When + FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option + will work in addition to -T. + +config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL + bool "Try to connect to HTTPS using openssl" + default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL + depends on BUSYBOX_CONFIG_WGET + help + Choose how wget establishes SSL connection for https:// URLs. + + Busybox itself contains no SSL code. wget will spawn + a helper program to talk over HTTPS. + + OpenSSL has a simple SSL client for debug purposes. + If you select "openssl" helper, wget will effectively call + "openssl s_client -quiet -connect IP:443 2>/dev/null" + and pipe its data through it. + Note inconvenient API: host resolution is done twice, + and there is no guarantee openssl's idea of IPv6 address + format is the same as ours. + Another problem is that s_client prints debug information + to stderr, and it needs to be suppressed. This means + all error messages get suppressed too. + openssl is also a big binary, often dynamically linked + against ~15 libraries. + +config BUSYBOX_CONFIG_FEATURE_WGET_SSL_HELPER + bool "Try to connect to HTTPS using ssl_helper" + default BUSYBOX_DEFAULT_FEATURE_WGET_SSL_HELPER + depends on BUSYBOX_CONFIG_WGET + help + Choose how wget establishes SSL connection for https:// URLs. + + Busybox itself contains no SSL code. wget will spawn + a helper program to talk over HTTPS. + + ssl_helper is a tool which can be built statically + from busybox sources against a small embedded SSL library. + Please see networking/ssl_helper/README. + It does not require double host resolution and emits + error messages to stderr. + + Precompiled static binary may be available at + http://busybox.net/downloads/binaries/ +config BUSYBOX_CONFIG_WHOIS + bool "whois" + default BUSYBOX_DEFAULT_WHOIS + help + whois is a client for the whois directory service + +config BUSYBOX_CONFIG_FEATURE_IPV6 + bool "Enable IPv6 support" + default BUSYBOX_DEFAULT_FEATURE_IPV6 + help + Enable IPv6 support in busybox. + This adds IPv6 support in the networking applets. + +config BUSYBOX_CONFIG_FEATURE_UNIX_LOCAL + bool "Enable Unix domain socket support (usually not needed)" + default BUSYBOX_DEFAULT_FEATURE_UNIX_LOCAL + help + Enable Unix domain socket support in all busybox networking + applets. Address of the form local:/path/to/unix/socket + will be recognized. + + This extension is almost never used in real world usage. + You most likely want to say N. + +config BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS + bool "Prefer IPv4 addresses from DNS queries" + default BUSYBOX_DEFAULT_FEATURE_PREFER_IPV4_ADDRESS + depends on BUSYBOX_CONFIG_FEATURE_IPV6 + help + Use IPv4 address of network host if it has one. + + If this option is off, the first returned address will be used. + This may cause problems when your DNS server is IPv6-capable and + is returning IPv6 host addresses too. If IPv6 address + precedes IPv4 one in DNS reply, busybox network applets + (e.g. wget) will use IPv6 address. On an IPv6-incapable host + or network applets will fail to connect to the host + using IPv6 address. + +config BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS + bool "Verbose resolution errors" + default BUSYBOX_DEFAULT_VERBOSE_RESOLUTION_ERRORS + help + Enable if you are not satisfied with simplistic + "can't resolve 'hostname.com'" and want to know more. + This may increase size of your executable a bit. + +config BUSYBOX_CONFIG_ARP + bool "arp" + default BUSYBOX_DEFAULT_ARP + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Manipulate the system ARP cache. + +config BUSYBOX_CONFIG_ARPING + bool "arping" + default BUSYBOX_DEFAULT_ARPING + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Ping hosts by ARP packets. + +config BUSYBOX_CONFIG_BRCTL + bool "brctl" + default BUSYBOX_DEFAULT_BRCTL + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Manage ethernet bridges. + Supports addbr/delbr and addif/delif. + +config BUSYBOX_CONFIG_FEATURE_BRCTL_FANCY + bool "Fancy options" + default BUSYBOX_DEFAULT_FEATURE_BRCTL_FANCY + depends on BUSYBOX_CONFIG_BRCTL + help + Add support for extended option like: + setageing, setfd, sethello, setmaxage, + setpathcost, setportprio, setbridgeprio, + stp + This adds about 600 bytes. + +config BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW + bool "Support show" + default BUSYBOX_DEFAULT_FEATURE_BRCTL_SHOW + depends on BUSYBOX_CONFIG_BRCTL && BUSYBOX_CONFIG_FEATURE_BRCTL_FANCY + help + Add support for option which prints the current config: + show + +config BUSYBOX_CONFIG_DNSD + bool "dnsd" + default BUSYBOX_DEFAULT_DNSD + help + Small and static DNS server daemon. + +config BUSYBOX_CONFIG_ETHER_WAKE + bool "ether-wake" + default BUSYBOX_DEFAULT_ETHER_WAKE + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Send a magic packet to wake up sleeping machines. + +config BUSYBOX_CONFIG_FAKEIDENTD + bool "fakeidentd" + default BUSYBOX_DEFAULT_FAKEIDENTD + select BUSYBOX_CONFIG_FEATURE_SYSLOG + help + fakeidentd listens on the ident port and returns a predefined + fake value on any query. + +config BUSYBOX_CONFIG_FTPD + bool "ftpd" + default BUSYBOX_DEFAULT_FTPD + help + simple FTP daemon. You have to run it via inetd. + +config BUSYBOX_CONFIG_FEATURE_FTP_WRITE + bool "Enable upload commands" + default BUSYBOX_DEFAULT_FEATURE_FTP_WRITE + depends on BUSYBOX_CONFIG_FTPD + help + Enable all kinds of FTP upload commands (-w option) + +config BUSYBOX_CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST + bool "Enable workaround for RFC-violating clients" + default BUSYBOX_DEFAULT_FEATURE_FTPD_ACCEPT_BROKEN_LIST + depends on BUSYBOX_CONFIG_FTPD + help + Some ftp clients (among them KDE's Konqueror) issue illegal + "LIST -l" requests. This option works around such problems. + It might prevent you from listing files starting with "-" and + it increases the code size by ~40 bytes. + Most other ftp servers seem to behave similar to this. + +config BUSYBOX_CONFIG_FEATURE_FTP_AUTHENTICATION + bool "Enable authentication" + default BUSYBOX_DEFAULT_FEATURE_FTP_AUTHENTICATION + depends on BUSYBOX_CONFIG_FTPD + help + Enable basic system login as seen in telnet etc. + +config BUSYBOX_CONFIG_FTPGET + bool "ftpget" + default BUSYBOX_DEFAULT_FTPGET + help + Retrieve a remote file via FTP. + +config BUSYBOX_CONFIG_FTPPUT + bool "ftpput" + default BUSYBOX_DEFAULT_FTPPUT + help + Store a remote file via FTP. + +config BUSYBOX_CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS + bool "Enable long options in ftpget/ftpput" + default BUSYBOX_DEFAULT_FEATURE_FTPGETPUT_LONG_OPTIONS + depends on BUSYBOX_CONFIG_LONG_OPTS && (BUSYBOX_CONFIG_FTPGET || BUSYBOX_CONFIG_FTPPUT) + help + Support long options for the ftpget/ftpput applet. + +config BUSYBOX_CONFIG_HOSTNAME + bool "hostname" + default BUSYBOX_DEFAULT_HOSTNAME + help + Show or set the system's host name. + +config BUSYBOX_CONFIG_HTTPD + bool "httpd" + default BUSYBOX_DEFAULT_HTTPD + help + Serve web pages via an HTTP server. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES + bool "Support 'Ranges:' header" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_RANGES + depends on BUSYBOX_CONFIG_HTTPD + help + Makes httpd emit "Accept-Ranges: bytes" header and understand + "Range: bytes=NNN-[MMM]" header. Allows for resuming interrupted + downloads, seeking in multimedia players etc. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID + bool "Enable -u option" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_SETUID + depends on BUSYBOX_CONFIG_HTTPD + help + This option allows the server to run as a specific user + rather than defaulting to the user that starts the server. + Use of this option requires special privileges to change to a + different user. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH + bool "Enable Basic http Authentication" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_BASIC_AUTH + depends on BUSYBOX_CONFIG_HTTPD + help + Utilizes password settings from /etc/httpd.conf for basic + authentication on a per url basis. + Example for httpd.conf file: + /adm:toor:PaSsWd + +config BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5 + bool "Support MD5 crypted passwords for http Authentication" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_AUTH_MD5 + depends on BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH + help + Enables encrypted passwords, and wildcard user/passwords + in httpd.conf file. + User '*' means 'any system user name is ok', + password of '*' means 'use system password for this user' + Examples: + /adm:toor:$1$P/eKnWXS$aI1aPGxT.dJD5SzqAKWrF0 + /adm:root:* + /wiki:*:* + +config BUSYBOX_CONFIG_FEATURE_HTTPD_CGI + bool "Support Common Gateway Interface (CGI)" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_CGI + depends on BUSYBOX_CONFIG_HTTPD + help + This option allows scripts and executables to be invoked + when specific URLs are requested. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR + bool "Support for running scripts through an interpreter" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR + depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI + help + This option enables support for running scripts through an + interpreter. Turn this on if you want PHP scripts to work + properly. You need to supply an additional line in your + httpd.conf file: + *.php:/path/to/your/php + +config BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV + bool "Set REMOTE_PORT environment variable for CGI" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV + depends on BUSYBOX_CONFIG_FEATURE_HTTPD_CGI + help + Use of this option can assist scripts in generating + references that contain a unique port number. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR + bool "Enable -e option (useful for CGIs written as shell scripts)" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_ENCODE_URL_STR + depends on BUSYBOX_CONFIG_HTTPD + help + This option allows html encoding of arbitrary strings for display + by the browser. Output goes to stdout. + For example, httpd -e "" produces + "<Hello World>". + +config BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES + bool "Support for custom error pages" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_ERROR_PAGES + depends on BUSYBOX_CONFIG_HTTPD + help + This option allows you to define custom error pages in + the configuration file instead of the default HTTP status + error pages. For instance, if you add the line: + E404:/path/e404.html + in the config file, the server will respond the specified + '/path/e404.html' file instead of the terse '404 NOT FOUND' + message. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY + bool "Support for reverse proxy" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_PROXY + depends on BUSYBOX_CONFIG_HTTPD + help + This option allows you to define URLs that will be forwarded + to another HTTP server. To setup add the following line to the + configuration file + P:/url/:http://hostname[:port]/new/path/ + Then a request to /url/myfile will be forwarded to + http://hostname[:port]/new/path/myfile. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP + bool "Support for GZIP content encoding" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_GZIP + depends on BUSYBOX_CONFIG_HTTPD + help + Makes httpd send files using GZIP content encoding if the + client supports it and a pre-compressed .gz exists. + +config BUSYBOX_CONFIG_IFCONFIG + bool "ifconfig" + default BUSYBOX_DEFAULT_IFCONFIG + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Ifconfig is used to configure the kernel-resident network interfaces. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS + bool "Enable status reporting output (+7k)" + default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_STATUS + depends on BUSYBOX_CONFIG_IFCONFIG + help + If ifconfig is called with no arguments it will display the status + of the currently active interfaces. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP + bool "Enable slip-specific options \"keepalive\" and \"outfill\"" + default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_SLIP + depends on BUSYBOX_CONFIG_IFCONFIG + help + Allow "keepalive" and "outfill" support for SLIP. If you're not + planning on using serial lines, leave this unchecked. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ + bool "Enable options \"mem_start\", \"io_addr\", and \"irq\"" + default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ + depends on BUSYBOX_CONFIG_IFCONFIG + help + Allow the start address for shared memory, start address for I/O, + and/or the interrupt line used by the specified device. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW + bool "Enable option \"hw\" (ether only)" + default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_HW + depends on BUSYBOX_CONFIG_IFCONFIG + help + Set the hardware address of this interface, if the device driver + supports this operation. Currently, we only support the 'ether' + class. + +config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS + bool "Set the broadcast automatically" + default BUSYBOX_DEFAULT_FEATURE_IFCONFIG_BROADCAST_PLUS + depends on BUSYBOX_CONFIG_IFCONFIG + help + Setting this will make ifconfig attempt to find the broadcast + automatically if the value '+' is used. + +config BUSYBOX_CONFIG_IFENSLAVE + bool "ifenslave" + default BUSYBOX_DEFAULT_IFENSLAVE + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Userspace application to bind several interfaces + to a logical interface (use with kernel bonding driver). + +config BUSYBOX_CONFIG_IFPLUGD + bool "ifplugd" + default BUSYBOX_DEFAULT_IFPLUGD + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Network interface plug detection daemon. + +config BUSYBOX_CONFIG_IFUPDOWN + bool "ifupdown" + default BUSYBOX_DEFAULT_IFUPDOWN + help + Activate or deactivate the specified interfaces. This applet makes + use of either "ifconfig" and "route" or the "ip" command to actually + configure network interfaces. Therefore, you will probably also want + to enable either IFCONFIG and ROUTE, or enable + FEATURE_IFUPDOWN_IP and the various IP options. Of + course you could use non-busybox versions of these programs, so + against my better judgement (since this will surely result in plenty + of support questions on the mailing list), I do not force you to + enable these additional options. It is up to you to supply either + "ifconfig", "route" and "run-parts" or the "ip" command, either + via busybox or via standalone utilities. + +config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH + string "Absolute path to ifstate file" + default BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH + depends on BUSYBOX_CONFIG_IFUPDOWN + help + ifupdown keeps state information in a file called ifstate. + Typically it is located in /var/run/ifstate, however + some distributions tend to put it in other places + (debian, for example, uses /etc/network/run/ifstate). + This config option defines location of ifstate. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP + bool "Use ip applet" + default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP + depends on BUSYBOX_CONFIG_IFUPDOWN + help + Use the iproute "ip" command to implement "ifup" and "ifdown", rather + than the default of using the older 'ifconfig' and 'route' utilities. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN + bool "Use busybox ip applet" + default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IP_BUILTIN + depends on BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP + select BUSYBOX_CONFIG_PLATFORM_LINUX + select BUSYBOX_CONFIG_IP + select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + select BUSYBOX_CONFIG_FEATURE_IP_LINK + select BUSYBOX_CONFIG_FEATURE_IP_ROUTE + help + Use the busybox iproute "ip" applet to implement "ifupdown". + + If left disabled, you must install the full-blown iproute2 + utility or the "ifup" and "ifdown" applets will not work. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN + bool "Use busybox ifconfig and route applets" + default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN + depends on BUSYBOX_CONFIG_IFUPDOWN && !BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP + select BUSYBOX_CONFIG_IFCONFIG + select BUSYBOX_CONFIG_ROUTE + help + Use the busybox iproute "ifconfig" and "route" applets to + implement the "ifup" and "ifdown" utilities. + + If left disabled, you must install the full-blown ifconfig + and route utilities, or the "ifup" and "ifdown" applets will not + work. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4 + bool "Support for IPv4" + default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV4 + depends on BUSYBOX_CONFIG_IFUPDOWN + help + If you want ifup/ifdown to talk IPv4, leave this on. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6 + bool "Support for IPv6" + default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_IPV6 + depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_FEATURE_IPV6 + help + If you need support for IPv6, turn this option on. + +### UNUSED +###config FEATURE_IFUPDOWN_IPX +### bool "Support for IPX" +### default y +### depends on IFUPDOWN +### help +### If this option is selected you can use busybox to work with IPX +### networks. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING + bool "Enable mapping support" + default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_MAPPING + depends on BUSYBOX_CONFIG_IFUPDOWN + help + This enables support for the "mapping" stanza, unless you have + a weird network setup you don't need it. + +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP + bool "Support for external dhcp clients" + default BUSYBOX_DEFAULT_FEATURE_IFUPDOWN_EXTERNAL_DHCP + depends on BUSYBOX_CONFIG_IFUPDOWN + help + This enables support for the external dhcp clients. Clients are + tried in the following order: dhcpcd, dhclient, pump and udhcpc. + Otherwise, if udhcpc applet is enabled, it is used. + Otherwise, ifup/ifdown will have no support for DHCP. + +config BUSYBOX_CONFIG_INETD + bool "inetd" + default BUSYBOX_DEFAULT_INETD + select BUSYBOX_CONFIG_FEATURE_SYSLOG + help + Internet superserver daemon + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO + bool "Support echo service" + default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_ECHO + depends on BUSYBOX_CONFIG_INETD + help + Echo received data internal inetd service + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD + bool "Support discard service" + default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD + depends on BUSYBOX_CONFIG_INETD + help + Internet /dev/null internal inetd service + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME + bool "Support time service" + default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_TIME + depends on BUSYBOX_CONFIG_INETD + help + Return 32 bit time since 1900 internal inetd service + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME + bool "Support daytime service" + default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME + depends on BUSYBOX_CONFIG_INETD + help + Return human-readable time internal inetd service + +config BUSYBOX_CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN + bool "Support chargen service" + default BUSYBOX_DEFAULT_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN + depends on BUSYBOX_CONFIG_INETD + help + Familiar character generator internal inetd service + +config BUSYBOX_CONFIG_FEATURE_INETD_RPC + bool "Support RPC services" + default BUSYBOX_DEFAULT_FEATURE_INETD_RPC # very rarely used, and needs Sun RPC support in libc + depends on BUSYBOX_CONFIG_INETD + select BUSYBOX_CONFIG_FEATURE_HAVE_RPC + help + Support Sun-RPC based services + +config BUSYBOX_CONFIG_IP + bool "ip" + default BUSYBOX_DEFAULT_IP + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + The "ip" applet is a TCP/IP interface configuration and routing + utility. You generally don't need "ip" to use busybox with + TCP/IP. + +config BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + bool "ip address" + default BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS + depends on BUSYBOX_CONFIG_IP + help + Address manipulation support for the "ip" applet. + +config BUSYBOX_CONFIG_FEATURE_IP_LINK + bool "ip link" + default BUSYBOX_DEFAULT_FEATURE_IP_LINK + depends on BUSYBOX_CONFIG_IP + help + Configure network devices with "ip". + +config BUSYBOX_CONFIG_FEATURE_IP_ROUTE + bool "ip route" + default BUSYBOX_DEFAULT_FEATURE_IP_ROUTE + depends on BUSYBOX_CONFIG_IP + help + Add support for routing table management to "ip". + +config BUSYBOX_CONFIG_FEATURE_IP_ROUTE_DIR + string "ip route configuration directory" + default BUSYBOX_DEFAULT_FEATURE_IP_ROUTE_DIR + depends on BUSYBOX_CONFIG_FEATURE_IP_ROUTE + help + Location of the "ip" applet routing configuration. + +config BUSYBOX_CONFIG_FEATURE_IP_TUNNEL + bool "ip tunnel" + default BUSYBOX_DEFAULT_FEATURE_IP_TUNNEL + depends on BUSYBOX_CONFIG_IP + help + Add support for tunneling commands to "ip". + +config BUSYBOX_CONFIG_FEATURE_IP_RULE + bool "ip rule" + default BUSYBOX_DEFAULT_FEATURE_IP_RULE + depends on BUSYBOX_CONFIG_IP + help + Add support for rule commands to "ip". + +config BUSYBOX_CONFIG_FEATURE_IP_NEIGH + bool "ip neighbor" + default BUSYBOX_DEFAULT_FEATURE_IP_NEIGH + depends on BUSYBOX_CONFIG_IP + help + Add support for neighbor commands to "ip". + +config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS + bool "Support short forms of ip commands" + default BUSYBOX_DEFAULT_FEATURE_IP_SHORT_FORMS + depends on BUSYBOX_CONFIG_IP + help + Also support short-form of ip commands: + ip addr -> ipaddr + ip link -> iplink + ip route -> iproute + ip tunnel -> iptunnel + ip rule -> iprule + ip neigh -> ipneigh + + Say N unless you desparately need the short form of the ip + object commands. + +config BUSYBOX_CONFIG_FEATURE_IP_RARE_PROTOCOLS + bool "Support displaying rarely used link types" + default BUSYBOX_DEFAULT_FEATURE_IP_RARE_PROTOCOLS + depends on BUSYBOX_CONFIG_IP + help + If you are not going to use links of type "frad", "econet", + "bif" etc, you probably don't need to enable this. + Ethernet, wireless, infrared, ppp/slip, ip tunnelling + link types are supported without this option selected. + +config BUSYBOX_CONFIG_IPADDR + bool + default BUSYBOX_DEFAULT_IPADDR + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ADDRESS + +config BUSYBOX_CONFIG_IPLINK + bool + default BUSYBOX_DEFAULT_IPLINK + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_LINK + +config BUSYBOX_CONFIG_IPROUTE + bool + default BUSYBOX_DEFAULT_IPROUTE + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_ROUTE + +config BUSYBOX_CONFIG_IPTUNNEL + bool + default BUSYBOX_DEFAULT_IPTUNNEL + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_TUNNEL + +config BUSYBOX_CONFIG_IPRULE + bool + default BUSYBOX_DEFAULT_IPRULE + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_RULE + +config BUSYBOX_CONFIG_IPNEIGH + bool + default BUSYBOX_DEFAULT_IPNEIGH + depends on BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS && BUSYBOX_CONFIG_FEATURE_IP_NEIGH + +config BUSYBOX_CONFIG_IPCALC + bool "ipcalc" + default BUSYBOX_DEFAULT_IPCALC + help + ipcalc takes an IP address and netmask and calculates the + resulting broadcast, network, and host range. + +config BUSYBOX_CONFIG_FEATURE_IPCALC_FANCY + bool "Fancy IPCALC, more options, adds 1 kbyte" + default BUSYBOX_DEFAULT_FEATURE_IPCALC_FANCY + depends on BUSYBOX_CONFIG_IPCALC + help + Adds the options hostname, prefix and silent to the output of + "ipcalc". + +config BUSYBOX_CONFIG_FEATURE_IPCALC_LONG_OPTIONS + bool "Enable long options" + default BUSYBOX_DEFAULT_FEATURE_IPCALC_LONG_OPTIONS + depends on BUSYBOX_CONFIG_IPCALC && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the ipcalc applet. + config BUSYBOX_CONFIG_NETMSG bool "netmsg" default BUSYBOX_DEFAULT_NETMSG help simple program for sending udp broadcast messages + config BUSYBOX_CONFIG_NETSTAT bool "netstat" default BUSYBOX_DEFAULT_NETSTAT @@ -681,7 +829,7 @@ config BUSYBOX_CONFIG_NETSTAT netstat prints information about the Linux networking subsystem. config BUSYBOX_CONFIG_FEATURE_NETSTAT_WIDE - bool "Enable wide output" + bool "Enable wide netstat output" default BUSYBOX_DEFAULT_FEATURE_NETSTAT_WIDE depends on BUSYBOX_CONFIG_NETSTAT help @@ -695,24 +843,27 @@ config BUSYBOX_CONFIG_FEATURE_NETSTAT_PRG help Add support for -p flag to print out PID and program name. +700 bytes of code. + config BUSYBOX_CONFIG_NSLOOKUP bool "nslookup" default BUSYBOX_DEFAULT_NSLOOKUP help nslookup is a tool to query Internet name servers. -config BUSYBOX_CONFIG_NSLOOKUP_OPENWRT + +config BUSYBOX_CONFIG_NSLOOKUP_LEDE bool "nslookup_lede" depends on !BUSYBOX_CONFIG_NSLOOKUP - default BUSYBOX_DEFAULT_NSLOOKUP_OPENWRT + default BUSYBOX_DEFAULT_NSLOOKUP_LEDE help - nslookup is a tool to query Internet name servers (OpenWrt flavor). + nslookup is a tool to query Internet name servers (LEDE flavor). -config BUSYBOX_CONFIG_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS +config BUSYBOX_CONFIG_FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS - depends on BUSYBOX_CONFIG_NSLOOKUP_OPENWRT && BUSYBOX_CONFIG_LONG_OPTS + default BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS + depends on BUSYBOX_CONFIG_NSLOOKUP_LEDE && BUSYBOX_CONFIG_LONG_OPTS help Support long options for the nslookup applet. + config BUSYBOX_CONFIG_NTPD bool "ntpd" default BUSYBOX_DEFAULT_NTPD @@ -735,39 +886,20 @@ config BUSYBOX_CONFIG_FEATURE_NTPD_CONF help Make ntpd look in /etc/ntp.conf for peers. Only "server address" is supported. -config BUSYBOX_CONFIG_PING - bool "ping" - default BUSYBOX_DEFAULT_PING - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to - elicit an ICMP ECHO_RESPONSE from a host or gateway. -config BUSYBOX_CONFIG_PING6 - bool "ping6" - default BUSYBOX_DEFAULT_PING6 - depends on BUSYBOX_CONFIG_FEATURE_IPV6 - help - This will give you a ping that can talk IPv6. - -config BUSYBOX_CONFIG_FEATURE_FANCY_PING - bool "Enable fancy ping output" - default BUSYBOX_DEFAULT_FEATURE_FANCY_PING - depends on BUSYBOX_CONFIG_PING || BUSYBOX_CONFIG_PING6 - help - Make the output from the ping applet include statistics, and at the - same time provide full support for ICMP packets. config BUSYBOX_CONFIG_PSCAN bool "pscan" default BUSYBOX_DEFAULT_PSCAN help Simple network port scanner. + config BUSYBOX_CONFIG_ROUTE bool "route" default BUSYBOX_DEFAULT_ROUTE select BUSYBOX_CONFIG_PLATFORM_LINUX help Route displays or manipulates the kernel's IP routing tables. + config BUSYBOX_CONFIG_SLATTACH bool "slattach" default BUSYBOX_DEFAULT_SLATTACH @@ -775,12 +907,17 @@ config BUSYBOX_CONFIG_SLATTACH help slattach is a small utility to attach network interfaces to serial lines. -config BUSYBOX_CONFIG_SSL_CLIENT - bool "ssl_client" - default BUSYBOX_DEFAULT_SSL_CLIENT - select BUSYBOX_CONFIG_TLS - help - This tool pipes data to/from a socket, TLS-encrypting it. + +#config TC +# bool "tc" +# default y +# help +# show / manipulate traffic control settings +# +#config FEATURE_TC_INGRESS +# def_bool n +# depends on TC + config BUSYBOX_CONFIG_TCPSVD bool "tcpsvd" default BUSYBOX_DEFAULT_TCPSVD @@ -788,12 +925,6 @@ config BUSYBOX_CONFIG_TCPSVD tcpsvd listens on a TCP port and runs a program for each new connection. -config BUSYBOX_CONFIG_UDPSVD - bool "udpsvd" - default BUSYBOX_DEFAULT_UDPSVD - help - udpsvd listens on an UDP port and runs a program for each new - connection. config BUSYBOX_CONFIG_TELNET bool "telnet" default BUSYBOX_DEFAULT_TELNET @@ -820,10 +951,6 @@ config BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN log into a machine without telling the username (autologin). This option enables `-a' and `-l USER' arguments. -config BUSYBOX_CONFIG_FEATURE_TELNET_WIDTH - bool "Enable window size autodetection" - default BUSYBOX_DEFAULT_FEATURE_TELNET_WIDTH - depends on BUSYBOX_CONFIG_TELNET config BUSYBOX_CONFIG_TELNETD bool "telnetd" default BUSYBOX_DEFAULT_TELNETD @@ -865,6 +992,7 @@ config BUSYBOX_CONFIG_TELNETD with all that done, telnetd _should_ work.... + config BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE bool "Support standalone telnetd (not inetd only)" default BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE @@ -892,6 +1020,7 @@ config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD_WAIT This option is rarely used. "tcp nowait" is much more usual way of running tcp services, including telnetd. You most probably want to say N here. + config BUSYBOX_CONFIG_TFTP bool "tftp" default BUSYBOX_DEFAULT_TFTP @@ -943,9 +1072,11 @@ config BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE "blksize" and "tsize" options. config BUSYBOX_CONFIG_FEATURE_TFTP_PROGRESS_BAR - bool "Enable progress bar" + bool "Enable tftp progress meter" default BUSYBOX_DEFAULT_FEATURE_TFTP_PROGRESS_BAR depends on BUSYBOX_CONFIG_TFTP && BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE + help + Show progress bar. config BUSYBOX_CONFIG_TFTP_DEBUG bool "Enable debug" @@ -954,9 +1085,7 @@ config BUSYBOX_CONFIG_TFTP_DEBUG help Make tftp[d] print debugging messages on stderr. This is useful if you are diagnosing a bug in tftp[d]. -config BUSYBOX_CONFIG_TLS - bool #No description makes it a hidden option - default BUSYBOX_DEFAULT_TLS + config BUSYBOX_CONFIG_TRACEROUTE bool "traceroute" default BUSYBOX_DEFAULT_TRACEROUTE @@ -967,22 +1096,33 @@ config BUSYBOX_CONFIG_TRACEROUTE config BUSYBOX_CONFIG_TRACEROUTE6 bool "traceroute6" default BUSYBOX_DEFAULT_TRACEROUTE6 - depends on BUSYBOX_CONFIG_FEATURE_IPV6 + depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_TRACEROUTE help Utility to trace the route of IPv6 packets. config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE bool "Enable verbose output" default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE - depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6 + depends on BUSYBOX_CONFIG_TRACEROUTE help Add some verbosity to traceroute. This includes among other things hostnames and ICMP response types. +config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE + bool "Enable loose source route" + default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_SOURCE_ROUTE + depends on BUSYBOX_CONFIG_TRACEROUTE + help + Add option to specify a loose source route gateway + (8 maximum). + config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP - bool "Enable -I option (use ICMP instead of UDP)" + bool "Use ICMP instead of UDP" default BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP - depends on BUSYBOX_CONFIG_TRACEROUTE || BUSYBOX_CONFIG_TRACEROUTE6 + depends on BUSYBOX_CONFIG_TRACEROUTE + help + Add option -I to use ICMP ECHO instead of UDP datagrams. + config BUSYBOX_CONFIG_TUNCTL bool "tunctl" default BUSYBOX_DEFAULT_TUNCTL @@ -997,123 +1137,32 @@ config BUSYBOX_CONFIG_FEATURE_TUNCTL_UG help Allow to specify owner and group of newly created interface. 340 bytes of pure bloat. Say no here. + +source udhcp/Config.in + +config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS + string "ifup udhcpc command line options" + default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS + depends on BUSYBOX_CONFIG_IFUPDOWN && BUSYBOX_CONFIG_UDHCPC + help + Command line options to pass to udhcpc from ifup. + Intended to alter options not available in /etc/network/interfaces. + (IE: --syslog --background etc...) + +config BUSYBOX_CONFIG_UDPSVD + bool "udpsvd" + default BUSYBOX_DEFAULT_UDPSVD + help + udpsvd listens on an UDP port and runs a program for each new + connection. + config BUSYBOX_CONFIG_VCONFIG bool "vconfig" default BUSYBOX_DEFAULT_VCONFIG select BUSYBOX_CONFIG_PLATFORM_LINUX help Creates, removes, and configures VLAN interfaces -config BUSYBOX_CONFIG_WGET - bool "wget" - default BUSYBOX_DEFAULT_WGET - help - wget is a utility for non-interactive download of files from HTTP - and FTP servers. -config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS - bool "Enable long options" - default BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS - depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_LONG_OPTS - -config BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR - bool "Enable progress bar (+2k)" - default BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR - depends on BUSYBOX_CONFIG_WGET - -config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION - bool "Enable HTTP authentication" - default BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION - depends on BUSYBOX_CONFIG_WGET - help - Support authenticated HTTP transfers. - -config BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT - bool "Enable timeout option -T SEC" - default BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT - depends on BUSYBOX_CONFIG_WGET - help - Supports network read and connect timeouts for wget, - so that wget will give up and timeout, through the -T - command line option. - - Currently only connect and network data read timeout are - supported (i.e., timeout is not applied to the DNS query). When - FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option - will work in addition to -T. - -config BUSYBOX_CONFIG_FEATURE_WGET_HTTPS - bool "Support HTTPS using internal TLS code" - default BUSYBOX_DEFAULT_FEATURE_WGET_HTTPS - depends on BUSYBOX_CONFIG_WGET - select BUSYBOX_CONFIG_TLS - help - wget will use internal TLS code to connect to https:// URLs. - Note: - On NOMMU machines, ssl_helper applet should be available - in the $PATH for this to work. Make sure to select that applet. - - Note: currently, TLS code only makes TLS I/O work, it - does *not* check that the peer is who it claims to be, etc. - IOW: it uses peer-supplied public keys to establish encryption - and signing keys, then encrypts and signs outgoing data and - decrypts incoming data. - It does not check signature hashes on the incoming data: - this means that attackers manipulating TCP packets can - send altered data and we unknowingly receive garbage. - (This check might be relatively easy to add). - It does not check public key's certificate: - this means that the peer may be an attacker impersonating - the server we think we are talking to. - - If you think this is unacceptable, consider this. As more and more - servers switch to HTTPS-only operation, without such "crippled" - TLS code it is *impossible* to simply download a kernel source - from kernel.org. Which can in real world translate into - "my small automatic tooling to build cross-compilers from sources - no longer works, I need to additionally keep a local copy - of ~4 megabyte source tarball of a SSL library and ~2 megabyte - source of wget, need to compile and built both before I can - download anything. All this despite the fact that the build - is done in a QEMU sandbox on a machine with absolutely nothing - worth stealing, so I don't care if someone would go to a lot - of trouble to intercept my HTTPS download to send me an altered - kernel tarball". - - If you still think this is unacceptable, send patches. - - If you still think this is unacceptable, do not want to send - patches, but do want to waste bandwidth expaining how wrong - it is, you will be ignored. - -config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL - bool "Try to connect to HTTPS using openssl" - default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL - depends on BUSYBOX_CONFIG_WGET - help - Try to use openssl to handle HTTPS. - - OpenSSL has a simple SSL client for debug purposes. - If you select this option, wget will effectively run: - "openssl s_client -quiet -connect hostname:443 - -servername hostname 2>/dev/null" and pipe its data - through it. -servername is not used if hostname is numeric. - Note inconvenient API: host resolution is done twice, - and there is no guarantee openssl's idea of IPv6 address - format is the same as ours. - Another problem is that s_client prints debug information - to stderr, and it needs to be suppressed. This means - all error messages get suppressed too. - openssl is also a big binary, often dynamically linked - against ~15 libraries. - - If openssl can't be executed, internal TLS code will be used - (if you enabled it); if openssl can be executed but fails later, - wget can't detect this, and download will fail. -config BUSYBOX_CONFIG_WHOIS - bool "whois" - default BUSYBOX_DEFAULT_WHOIS - help - whois is a client for the whois directory service config BUSYBOX_CONFIG_ZCIP bool "zcip" default BUSYBOX_DEFAULT_ZCIP @@ -1127,15 +1176,4 @@ config BUSYBOX_CONFIG_ZCIP See http://www.zeroconf.org for further details, and "zcip.script" in the busybox examples. -source udhcp/Config.in - -config BUSYBOX_CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS - string "ifup udhcpc command line options" - default BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS - depends on BUSYBOX_CONFIG_IFUP || BUSYBOX_CONFIG_IFDOWN - help - Command line options to pass to udhcpc from ifup. - Intended to alter options not available in /etc/network/interfaces. - (IE: --syslog --background etc...) - endmenu diff --git a/package/utils/busybox/config/networking/udhcp/Config.in b/package/utils/busybox/config/networking/udhcp/Config.in index e7a98750d..4f4840022 100644 --- a/package/utils/busybox/config/networking/udhcp/Config.in +++ b/package/utils/busybox/config/networking/udhcp/Config.in @@ -5,44 +5,38 @@ # config BUSYBOX_CONFIG_UDHCPC6 - bool "udhcpc6 (DHCPv6 client, EXPERIMENTAL)" + bool "udhcp client for DHCPv6 (udhcpc6)" default BUSYBOX_DEFAULT_UDHCPC6 # not yet ready depends on BUSYBOX_CONFIG_FEATURE_IPV6 help udhcpc6 is a DHCPv6 client -config BUSYBOX_CONFIG_FEATURE_UDHCPC6_RFC3646 - bool "Support RFC 3646 (DNS server and search list)" - default BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC3646 - depends on BUSYBOX_CONFIG_UDHCPC6 - help - List of DNS servers and domain search list can be requested with - "-O dns" and "-O search". If server gives these values, - they will be set in environment variables "dns" and "search". - -config BUSYBOX_CONFIG_FEATURE_UDHCPC6_RFC4704 - bool "Support RFC 4704 (Client FQDN)" - default BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC4704 - depends on BUSYBOX_CONFIG_UDHCPC6 - help - You can request FQDN to be given by server using "-O fqdn". - -config BUSYBOX_CONFIG_FEATURE_UDHCPC6_RFC4833 - bool "Support RFC 4833 (Timezones)" - default BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC4833 - depends on BUSYBOX_CONFIG_UDHCPC6 - help - You can request POSIX timezone with "-O tz" and timezone name - with "-O timezone". - config BUSYBOX_CONFIG_UDHCPD - bool "udhcpd (DHCP server)" + bool "udhcp server (udhcpd)" default BUSYBOX_DEFAULT_UDHCPD select BUSYBOX_CONFIG_PLATFORM_LINUX help udhcpd is a DHCP server geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. +config BUSYBOX_CONFIG_DHCPRELAY + bool "dhcprelay" + default BUSYBOX_DEFAULT_DHCPRELAY + depends on BUSYBOX_CONFIG_UDHCPD + help + dhcprelay listens for dhcp requests on one or more interfaces + and forwards these requests to a different interface or dhcp + server. + +config BUSYBOX_CONFIG_DUMPLEASES + bool "Lease display utility (dumpleases)" + default BUSYBOX_DEFAULT_DUMPLEASES + depends on BUSYBOX_CONFIG_UDHCPD + help + dumpleases displays the leases written out by the udhcpd server. + Lease times are stored in the file by time remaining in lease, or + by the absolute time that it expires in seconds from epoch. + config BUSYBOX_CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY bool "Rewrite the lease file at every new acknowledge" default BUSYBOX_DEFAULT_FEATURE_UDHCPD_WRITE_LEASES_EARLY @@ -75,24 +69,8 @@ config BUSYBOX_CONFIG_DHCPD_LEASES_FILE udhcpd stores addresses in a lease file. This is the absolute path of the file. Normally it is safe to leave it untouched. -config BUSYBOX_CONFIG_DUMPLEASES - bool "dumpleases" - default BUSYBOX_DEFAULT_DUMPLEASES - help - dumpleases displays the leases written out by the udhcpd. - Lease times are stored in the file by time remaining in lease, or - by the absolute time that it expires in seconds from epoch. - -config BUSYBOX_CONFIG_DHCPRELAY - bool "dhcprelay" - default BUSYBOX_DEFAULT_DHCPRELAY - help - dhcprelay listens for dhcp requests on one or more interfaces - and forwards these requests to a different interface or dhcp - server. - config BUSYBOX_CONFIG_UDHCPC - bool "udhcpc (DHCP client)" + bool "udhcp client (udhcpc)" default BUSYBOX_DEFAULT_UDHCPC select BUSYBOX_CONFIG_PLATFORM_LINUX help @@ -123,15 +101,6 @@ config BUSYBOX_CONFIG_FEATURE_UDHCPC_SANITIZEOPT they will be replaced with string "bad" when exporting to the environment. -config BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT - string "Absolute path to config script" - default BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT - depends on BUSYBOX_CONFIG_UDHCPC - help - This script is called after udhcpc receives an answer. See - examples/udhcp for a working example. Normally it is safe - to leave this untouched. - config BUSYBOX_CONFIG_FEATURE_UDHCP_PORT bool "Enable '-P port' option for udhcpd and udhcpc" default BUSYBOX_DEFAULT_FEATURE_UDHCP_PORT @@ -153,7 +122,7 @@ config BUSYBOX_CONFIG_UDHCP_DEBUG are very verbose and useful for debugging only. config BUSYBOX_CONFIG_FEATURE_UDHCP_RFC3397 - bool "Support RFC3397 domain search (experimental)" + bool "Support for RFC3397 domain search (experimental)" default BUSYBOX_DEFAULT_FEATURE_UDHCP_RFC3397 depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC help @@ -162,13 +131,22 @@ config BUSYBOX_CONFIG_FEATURE_UDHCP_RFC3397 and SIP servers option 120, specified in RFC 3361. config BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q - bool "Support 802.1Q VLAN parameters" + bool "Support for 802.1Q VLAN parameters" default BUSYBOX_DEFAULT_FEATURE_UDHCP_8021Q depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC help If selected, both client and server will support passing of VLAN ID and priority via options 132 and 133 as per 802.1Q. +config BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT + string "Absolute path to config script" + default BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT + depends on BUSYBOX_CONFIG_UDHCPC + help + This script is called after udhcpc receives an answer. See + examples/udhcp for a working example. Normally it is safe + to leave this untouched. + config BUSYBOX_CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS int "DHCP options slack buffer size" default BUSYBOX_DEFAULT_UDHCPC_SLACK_FOR_BUGGY_SERVERS diff --git a/package/utils/busybox/config/procps/Config.in b/package/utils/busybox/config/procps/Config.in index acd4ed882..6eafbda0f 100644 --- a/package/utils/busybox/config/procps/Config.in +++ b/package/utils/busybox/config/procps/Config.in @@ -6,50 +6,11 @@ menu "Process Utilities" -config BUSYBOX_CONFIG_FREE - bool "free" - default BUSYBOX_DEFAULT_FREE - select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo() - help - free displays the total amount of free and used physical and swap - memory in the system, as well as the buffers used by the kernel. - The shared memory column should be ignored; it is obsolete. -config BUSYBOX_CONFIG_FUSER - bool "fuser" - default BUSYBOX_DEFAULT_FUSER - help - fuser lists all PIDs (Process IDs) that currently have a given - file open. fuser can also list all PIDs that have a given network - (TCP or UDP) port open. config BUSYBOX_CONFIG_IOSTAT bool "iostat" default BUSYBOX_DEFAULT_IOSTAT help Report CPU and I/O statistics -config BUSYBOX_CONFIG_KILL - bool "kill" - default BUSYBOX_DEFAULT_KILL - help - The command kill sends the specified signal to the specified - process or process group. If no signal is specified, the TERM - signal is sent. - -config BUSYBOX_CONFIG_KILLALL - bool "killall" - default BUSYBOX_DEFAULT_KILLALL - help - killall sends a signal to all processes running any of the - specified commands. If no signal name is specified, SIGTERM is - sent. - -config BUSYBOX_CONFIG_KILLALL5 - bool "killall5" - default BUSYBOX_DEFAULT_KILLALL5 - help - The SystemV killall command. killall5 sends a signal - to all processes except kernel threads and the processes - in its own session, so it won't kill the shell that is running - the script it was called from. config BUSYBOX_CONFIG_LSOF bool "lsof" default BUSYBOX_DEFAULT_LSOF @@ -66,39 +27,6 @@ config BUSYBOX_CONFIG_NMETER default BUSYBOX_DEFAULT_NMETER help Prints selected system stats continuously, one line per update. -config BUSYBOX_CONFIG_PGREP - bool "pgrep" - default BUSYBOX_DEFAULT_PGREP - help - Look for processes by name. - -config BUSYBOX_CONFIG_PKILL - bool "pkill" - default BUSYBOX_DEFAULT_PKILL - help - Send signals to processes by name. -config BUSYBOX_CONFIG_PIDOF - bool "pidof" - default BUSYBOX_DEFAULT_PIDOF - help - Pidof finds the process id's (pids) of the named programs. It prints - those id's on the standard output. - -config BUSYBOX_CONFIG_FEATURE_PIDOF_SINGLE - bool "Enable single shot (-s)" - default BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE - depends on BUSYBOX_CONFIG_PIDOF - help - Support '-s' for returning only the first pid found. - -config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT - bool "Enable omitting pids (-o PID)" - default BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT - depends on BUSYBOX_CONFIG_PIDOF - help - Support '-o PID' for omitting the given pid(s) in output. - The special pid %PPID can be used to name the parent process - of the pidof, in other words the calling shell or shell script. config BUSYBOX_CONFIG_PMAP bool "pmap" default BUSYBOX_DEFAULT_PMAP @@ -109,55 +37,6 @@ config BUSYBOX_CONFIG_POWERTOP default BUSYBOX_DEFAULT_POWERTOP help Analyze power consumption on Intel-based laptops - -config BUSYBOX_CONFIG_FEATURE_POWERTOP_INTERACTIVE - bool "Accept keyboard commands" - default BUSYBOX_DEFAULT_FEATURE_POWERTOP_INTERACTIVE - depends on BUSYBOX_CONFIG_POWERTOP - help - Without this, powertop will only refresh display every 10 seconds. - No keyboard commands will work, only ^C to terminate. -config BUSYBOX_CONFIG_PS - bool "ps" - default BUSYBOX_DEFAULT_PS - help - ps gives a snapshot of the current processes. - -config BUSYBOX_CONFIG_FEATURE_PS_WIDE - bool "Enable wide output option (-w)" - default BUSYBOX_DEFAULT_FEATURE_PS_WIDE - depends on BUSYBOX_CONFIG_PS && !BUSYBOX_CONFIG_DESKTOP - help - Support argument 'w' for wide output. - If given once, 132 chars are printed, and if given more - than once, the length is unlimited. - -config BUSYBOX_CONFIG_FEATURE_PS_LONG - bool "Enable long output option (-l)" - default BUSYBOX_DEFAULT_FEATURE_PS_LONG - depends on BUSYBOX_CONFIG_PS && !BUSYBOX_CONFIG_DESKTOP - help - Support argument 'l' for long output. - Adds fields PPID, RSS, START, TIME & TTY - -config BUSYBOX_CONFIG_FEATURE_PS_TIME - bool "Support -o time and -o etime output specifiers" - default BUSYBOX_DEFAULT_FEATURE_PS_TIME - depends on BUSYBOX_CONFIG_PS && BUSYBOX_CONFIG_DESKTOP - select BUSYBOX_CONFIG_PLATFORM_LINUX - -config BUSYBOX_CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS - bool "Support Linux prior to 2.4.0 and non-ELF systems" - default BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS - depends on BUSYBOX_CONFIG_FEATURE_PS_TIME - help - Include support for measuring HZ on old kernels and non-ELF systems - (if you are on Linux 2.4.0+ and use ELF, you don't need this) - -config BUSYBOX_CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS - bool "Support -o rgroup, -o ruser, -o nice specifiers" - default BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS - depends on BUSYBOX_CONFIG_PS && BUSYBOX_CONFIG_DESKTOP config BUSYBOX_CONFIG_PSTREE bool "pstree" default BUSYBOX_DEFAULT_PSTREE @@ -174,11 +53,6 @@ config BUSYBOX_CONFIG_SMEMCAP help smemcap is a tool for capturing process data for smem, a memory usage statistic tool. -config BUSYBOX_CONFIG_BB_SYSCTL - bool "sysctl" - default BUSYBOX_DEFAULT_BB_SYSCTL - help - Configure kernel parameters at runtime. config BUSYBOX_CONFIG_TOP bool "top" default BUSYBOX_DEFAULT_TOP @@ -186,14 +60,6 @@ config BUSYBOX_CONFIG_TOP The top program provides a dynamic real-time view of a running system. -config BUSYBOX_CONFIG_FEATURE_TOP_INTERACTIVE - bool "Accept keyboard commands" - default BUSYBOX_DEFAULT_FEATURE_TOP_INTERACTIVE - depends on BUSYBOX_CONFIG_TOP - help - Without this, top will only refresh display every 5 seconds. - No keyboard commands will work, only ^C to terminate. - config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE bool "Show CPU per-process usage percentage" default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE @@ -250,11 +116,153 @@ config BUSYBOX_CONFIG_UPTIME on, and the system load averages for the past 1, 5, and 15 minutes. config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT - bool "Show the number of users" + bool "Support for showing the number of users" default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP help - Display the number of users currently logged on. + Makes uptime display the number of users currently logged on. + +config BUSYBOX_CONFIG_FREE + bool "free" + default BUSYBOX_DEFAULT_FREE + select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo() + help + free displays the total amount of free and used physical and swap + memory in the system, as well as the buffers used by the kernel. + The shared memory column should be ignored; it is obsolete. + +config BUSYBOX_CONFIG_FUSER + bool "fuser" + default BUSYBOX_DEFAULT_FUSER + help + fuser lists all PIDs (Process IDs) that currently have a given + file open. fuser can also list all PIDs that have a given network + (TCP or UDP) port open. + +config BUSYBOX_CONFIG_KILL + bool "kill" + default BUSYBOX_DEFAULT_KILL + help + The command kill sends the specified signal to the specified + process or process group. If no signal is specified, the TERM + signal is sent. + +config BUSYBOX_CONFIG_KILLALL + bool "killall" + default BUSYBOX_DEFAULT_KILLALL + depends on BUSYBOX_CONFIG_KILL + help + killall sends a signal to all processes running any of the + specified commands. If no signal name is specified, SIGTERM is + sent. + +config BUSYBOX_CONFIG_KILLALL5 + bool "killall5" + default BUSYBOX_DEFAULT_KILLALL5 + depends on BUSYBOX_CONFIG_KILL + +config BUSYBOX_CONFIG_PGREP + bool "pgrep" + default BUSYBOX_DEFAULT_PGREP + help + Look for processes by name. + +config BUSYBOX_CONFIG_PIDOF + bool "pidof" + default BUSYBOX_DEFAULT_PIDOF + help + Pidof finds the process id's (pids) of the named programs. It prints + those id's on the standard output. + +config BUSYBOX_CONFIG_FEATURE_PIDOF_SINGLE + bool "Enable argument for single shot (-s)" + default BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE + depends on BUSYBOX_CONFIG_PIDOF + help + Support argument '-s' for returning only the first pid found. + +config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT + bool "Enable argument for omitting pids (-o)" + default BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT + depends on BUSYBOX_CONFIG_PIDOF + help + Support argument '-o' for omitting the given pids in output. + The special pid %PPID can be used to name the parent process + of the pidof, in other words the calling shell or shell script. + +config BUSYBOX_CONFIG_PKILL + bool "pkill" + default BUSYBOX_DEFAULT_PKILL + help + Send signals to processes by name. + +config BUSYBOX_CONFIG_PS + bool "ps" + default BUSYBOX_DEFAULT_PS + help + ps gives a snapshot of the current processes. + +config BUSYBOX_CONFIG_FEATURE_PS_WIDE + bool "Enable wide output option (-w)" + default BUSYBOX_DEFAULT_FEATURE_PS_WIDE + depends on BUSYBOX_CONFIG_PS && !BUSYBOX_CONFIG_DESKTOP + help + Support argument 'w' for wide output. + If given once, 132 chars are printed, and if given more + than once, the length is unlimited. + +config BUSYBOX_CONFIG_FEATURE_PS_LONG + bool "Enable long output option (-l)" + default BUSYBOX_DEFAULT_FEATURE_PS_LONG + depends on BUSYBOX_CONFIG_PS && !BUSYBOX_CONFIG_DESKTOP + help + Support argument 'l' for long output. + Adds fields PPID, RSS, START, TIME & TTY + +config BUSYBOX_CONFIG_FEATURE_PS_TIME + bool "Enable time and elapsed time output" + default BUSYBOX_DEFAULT_FEATURE_PS_TIME + depends on BUSYBOX_CONFIG_PS && BUSYBOX_CONFIG_DESKTOP + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Support -o time and -o etime output specifiers. + +config BUSYBOX_CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS + bool "Enable additional ps columns" + default BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS + depends on BUSYBOX_CONFIG_PS && BUSYBOX_CONFIG_DESKTOP + help + Support -o rgroup, -o ruser, -o nice output specifiers. + +config BUSYBOX_CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS + bool "Support Linux prior to 2.4.0 and non-ELF systems" + default BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS + depends on BUSYBOX_CONFIG_FEATURE_PS_TIME + help + Include support for measuring HZ on old kernels and non-ELF systems + (if you are on Linux 2.4.0+ and use ELF, you don't need this) + +config BUSYBOX_CONFIG_RENICE + bool "renice" + default BUSYBOX_DEFAULT_RENICE + help + Renice alters the scheduling priority of one or more running + processes. + +config BUSYBOX_CONFIG_BB_SYSCTL + bool "sysctl" + default BUSYBOX_DEFAULT_BB_SYSCTL + help + Configure kernel parameters at runtime. + +config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS + bool "Support for showing threads in ps/pstree/top" + default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS + depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE + help + Enables the ps -T option, showing of threads in pstree, + and 'h' command in top. + config BUSYBOX_CONFIG_WATCH bool "watch" default BUSYBOX_DEFAULT_WATCH @@ -262,12 +270,4 @@ config BUSYBOX_CONFIG_WATCH watch is used to execute a program periodically, showing output to the screen. -config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS - bool "Support thread display in ps/pstree/top" - default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS - depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE - help - Enables the ps -T option, showing of threads in pstree, - and 'h' command in top. - endmenu diff --git a/package/utils/busybox/config/runit/Config.in b/package/utils/busybox/config/runit/Config.in index 8750b597e..a322a2cd8 100644 --- a/package/utils/busybox/config/runit/Config.in +++ b/package/utils/busybox/config/runit/Config.in @@ -73,13 +73,6 @@ config BUSYBOX_CONFIG_SV_DEFAULT_SERVICE_DIR help Default directory for services. Defaults to "/var/service" - -config BUSYBOX_CONFIG_SVC - bool "svc" - default BUSYBOX_DEFAULT_SVC - help - svc controls the state of services monitored by the runsv supervisor. - It is comaptible with daemontools command with the same name. config BUSYBOX_CONFIG_SVLOGD bool "svlogd" default BUSYBOX_DEFAULT_SVLOGD diff --git a/package/utils/busybox/config/selinux/Config.in b/package/utils/busybox/config/selinux/Config.in index 71eb0dcd7..1d23f7de4 100644 --- a/package/utils/busybox/config/selinux/Config.in +++ b/package/utils/busybox/config/selinux/Config.in @@ -7,6 +7,7 @@ menu "SELinux Utilities" depends on BUSYBOX_CONFIG_SELINUX + config BUSYBOX_CONFIG_CHCON bool "chcon" default BUSYBOX_DEFAULT_CHCON @@ -18,24 +19,30 @@ config BUSYBOX_CONFIG_FEATURE_CHCON_LONG_OPTIONS bool "Enable long options" default BUSYBOX_DEFAULT_FEATURE_CHCON_LONG_OPTIONS depends on BUSYBOX_CONFIG_CHCON && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the chcon applet. + config BUSYBOX_CONFIG_GETENFORCE bool "getenforce" default BUSYBOX_DEFAULT_GETENFORCE depends on BUSYBOX_CONFIG_SELINUX help Enable support to get the current mode of SELinux. + config BUSYBOX_CONFIG_GETSEBOOL bool "getsebool" default BUSYBOX_DEFAULT_GETSEBOOL depends on BUSYBOX_CONFIG_SELINUX help Enable support to get SELinux boolean values. + config BUSYBOX_CONFIG_LOAD_POLICY bool "load_policy" default BUSYBOX_DEFAULT_LOAD_POLICY depends on BUSYBOX_CONFIG_SELINUX help Enable support to load SELinux policy. + config BUSYBOX_CONFIG_MATCHPATHCON bool "matchpathcon" default BUSYBOX_DEFAULT_MATCHPATHCON @@ -43,6 +50,15 @@ config BUSYBOX_CONFIG_MATCHPATHCON help Enable support to get default security context of the specified path from the file contexts configuration. + +config BUSYBOX_CONFIG_RESTORECON + bool "restorecon" + default BUSYBOX_DEFAULT_RESTORECON + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to relabel files. The feature is almost + the same as setfiles, but usage is a little different. + config BUSYBOX_CONFIG_RUNCON bool "runcon" default BUSYBOX_DEFAULT_RUNCON @@ -54,6 +70,9 @@ config BUSYBOX_CONFIG_FEATURE_RUNCON_LONG_OPTIONS bool "Enable long options" default BUSYBOX_DEFAULT_FEATURE_RUNCON_LONG_OPTIONS depends on BUSYBOX_CONFIG_RUNCON && BUSYBOX_CONFIG_LONG_OPTS + help + Support long options for the runcon applet. + config BUSYBOX_CONFIG_SELINUXENABLED bool "selinuxenabled" default BUSYBOX_DEFAULT_SELINUXENABLED @@ -61,18 +80,14 @@ config BUSYBOX_CONFIG_SELINUXENABLED help Enable support for this command to be used within shell scripts to determine if selinux is enabled. -config BUSYBOX_CONFIG_SESTATUS - bool "sestatus" - default BUSYBOX_DEFAULT_SESTATUS - depends on BUSYBOX_CONFIG_SELINUX - help - Displays the status of SELinux. + config BUSYBOX_CONFIG_SETENFORCE bool "setenforce" default BUSYBOX_DEFAULT_SETENFORCE depends on BUSYBOX_CONFIG_SELINUX help Enable support to modify the mode SELinux is running in. + config BUSYBOX_CONFIG_SETFILES bool "setfiles" default BUSYBOX_DEFAULT_SETFILES @@ -91,13 +106,6 @@ config BUSYBOX_CONFIG_FEATURE_SETFILES_CHECK_OPTION Support "-c" option (check the validity of the contexts against the specified binary policy) for setfiles. Requires libsepol. -config BUSYBOX_CONFIG_RESTORECON - bool "restorecon" - default BUSYBOX_DEFAULT_RESTORECON - depends on BUSYBOX_CONFIG_SELINUX - help - Enable support to relabel files. The feature is almost - the same as setfiles, but usage is a little different. config BUSYBOX_CONFIG_SETSEBOOL bool "setsebool" default BUSYBOX_DEFAULT_SETSEBOOL @@ -106,4 +114,11 @@ config BUSYBOX_CONFIG_SETSEBOOL Enable support for change boolean. semanage and -P option is not supported yet. +config BUSYBOX_CONFIG_SESTATUS + bool "sestatus" + default BUSYBOX_DEFAULT_SESTATUS + depends on BUSYBOX_CONFIG_SELINUX + help + Displays the status of SELinux. + endmenu diff --git a/package/utils/busybox/config/shell/Config.in b/package/utils/busybox/config/shell/Config.in index e455d3832..69ecf145e 100644 --- a/package/utils/busybox/config/shell/Config.in +++ b/package/utils/busybox/config/shell/Config.in @@ -6,78 +6,6 @@ menu "Shells" - -choice - prompt "Choose which shell is aliased to 'sh' name" - default BUSYBOX_CONFIG_SH_IS_ASH - help - Choose which shell you want to be executed by 'sh' alias. - The ash shell is the most bash compatible and full featured one. - -# note: cannot use "select ASH" here, it breaks "make allnoconfig" -config BUSYBOX_CONFIG_SH_IS_ASH - depends on !BUSYBOX_CONFIG_NOMMU - bool "ash" - help - Choose ash to be the shell executed by 'sh' name. - The ash code will be built into busybox. If you don't select - "ash" choice (CONFIG_ASH), this shell may only be invoked by - the name 'sh' (and not 'ash'). - -config BUSYBOX_CONFIG_SH_IS_HUSH - bool "hush" - help - Choose hush to be the shell executed by 'sh' name. - The hush code will be built into busybox. If you don't select - "hush" choice (CONFIG_HUSH), this shell may only be invoked by - the name 'sh' (and not 'hush'). - -config BUSYBOX_CONFIG_SH_IS_NONE - bool "none" - -endchoice - -choice - prompt "Choose which shell is aliased to 'bash' name" - default BUSYBOX_CONFIG_BASH_IS_NONE - help - Choose which shell you want to be executed by 'bash' alias. - The ash shell is the most bash compatible and full featured one, - although compatibility is far from being complete. - - Note that selecting this option does not switch on any bash - compatibility code. It merely makes it possible to install - /bin/bash (sym)link and run scripts which start with - #!/bin/bash line. - - Many systems use it in scripts which use bash-specific features, - even simple ones like $RANDOM. Without this option, busybox - can't be used for running them because it won't recongnize - "bash" as a supported applet name. - -config BUSYBOX_CONFIG_BASH_IS_ASH - depends on !BUSYBOX_CONFIG_NOMMU - bool "ash" - help - Choose ash to be the shell executed by 'bash' name. - The ash code will be built into busybox. If you don't select - "ash" choice (CONFIG_ASH), this shell may only be invoked by - the name 'bash' (and not 'ash'). - -config BUSYBOX_CONFIG_BASH_IS_HUSH - bool "hush" - help - Choose hush to be the shell executed by 'bash' name. - The hush code will be built into busybox. If you don't select - "hush" choice (CONFIG_HUSH), this shell may only be invoked by - the name 'bash' (and not 'hush'). - -config BUSYBOX_CONFIG_BASH_IS_NONE - bool "none" - -endchoice - - config BUSYBOX_CONFIG_ASH bool "ash" default BUSYBOX_DEFAULT_ASH @@ -89,46 +17,96 @@ config BUSYBOX_CONFIG_ASH shell (by Herbert Xu), which was created by porting the 'ash' shell (written by Kenneth Almquist) from NetBSD. -# ash options -# note: Don't remove !NOMMU part in the next line; it would break -# menuconfig's indenting. -if !NOMMU && (BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH) - -config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE - bool "Optimize for size instead of speed" - default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - -config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB - bool "Use internal glob() implementation" - default BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB # Y is bigger, but because of uclibc glob() bug, let Y be default for now - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - help - Do not use glob() function from libc, use internal implementation. - Use this if you are getting "glob.h: No such file or directory" - or similar build errors. - Note that as of now (2017-01), uclibc and musl glob() both have bugs - which would break ash if you select N here. - config BUSYBOX_CONFIG_ASH_BASH_COMPAT bool "bash-compatible extensions" default BUSYBOX_DEFAULT_ASH_BASH_COMPAT - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_ASH + help + Enable bash-compatible extensions. + +config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT + bool "Idle timeout variable" + default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT + depends on BUSYBOX_CONFIG_ASH + help + Enables bash-like auto-logout after $TMOUT seconds of idle time. config BUSYBOX_CONFIG_ASH_JOB_CONTROL bool "Job control" default BUSYBOX_DEFAULT_ASH_JOB_CONTROL - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_ASH + help + Enable job control in the ash shell. config BUSYBOX_CONFIG_ASH_ALIAS bool "Alias support" default BUSYBOX_DEFAULT_ASH_ALIAS - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_ASH + help + Enable alias support in the ash shell. + +config BUSYBOX_CONFIG_ASH_GETOPTS + bool "Builtin getopt to parse positional parameters" + default BUSYBOX_DEFAULT_ASH_GETOPTS + depends on BUSYBOX_CONFIG_ASH + help + Enable support for getopts builtin in ash. + +config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO + bool "Builtin version of 'echo'" + default BUSYBOX_DEFAULT_ASH_BUILTIN_ECHO + depends on BUSYBOX_CONFIG_ASH + help + Enable support for echo builtin in ash. + +config BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF + bool "Builtin version of 'printf'" + default BUSYBOX_DEFAULT_ASH_BUILTIN_PRINTF + depends on BUSYBOX_CONFIG_ASH + help + Enable support for printf builtin in ash. + +config BUSYBOX_CONFIG_ASH_BUILTIN_TEST + bool "Builtin version of 'test'" + default BUSYBOX_DEFAULT_ASH_BUILTIN_TEST + depends on BUSYBOX_CONFIG_ASH + help + Enable support for test builtin in ash. + +config BUSYBOX_CONFIG_ASH_HELP + bool "help builtin" + default BUSYBOX_DEFAULT_ASH_HELP + depends on BUSYBOX_CONFIG_ASH + help + Enable help builtin in ash. + +config BUSYBOX_CONFIG_ASH_CMDCMD + bool "'command' command to override shell builtins" + default BUSYBOX_DEFAULT_ASH_CMDCMD + depends on BUSYBOX_CONFIG_ASH + help + Enable support for the ash 'command' builtin, which allows + you to run the specified command with the specified arguments, + even when there is an ash builtin command with the same name. + +config BUSYBOX_CONFIG_ASH_MAIL + bool "Check for new mail on interactive shells" + default BUSYBOX_DEFAULT_ASH_MAIL + depends on BUSYBOX_CONFIG_ASH + help + Enable "check for new mail" function in the ash shell. + +config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE + bool "Optimize for size instead of speed" + default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE + depends on BUSYBOX_CONFIG_ASH + help + Compile ash for reduced size at the price of speed. config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT bool "Pseudorandom generator and $RANDOM variable" default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_ASH help Enable pseudorandom generator and dynamic variable "$RANDOM". Each read of "$RANDOM" will generate a new pseudorandom value. @@ -139,64 +117,12 @@ config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT config BUSYBOX_CONFIG_ASH_EXPAND_PRMT bool "Expand prompt string" default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_ASH help - $PS# may contain volatile content, such as backquote commands. + "PS#" may contain volatile content, such as backquote commands. This option recreates the prompt string from the environment variable each time it is displayed. -config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT - bool "Idle timeout variable $TMOUT" - default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - help - Enable bash-like auto-logout after $TMOUT seconds of idle time. - -config BUSYBOX_CONFIG_ASH_MAIL - bool "Check for new mail in interactive shell" - default BUSYBOX_DEFAULT_ASH_MAIL - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - help - Enable "check for new mail" function: - if set, $MAIL file and $MAILPATH list of files - are checked for mtime changes, and "you have mail" - message is printed if change is detected. - -config BUSYBOX_CONFIG_ASH_ECHO - bool "echo builtin" - default BUSYBOX_DEFAULT_ASH_ECHO - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - -config BUSYBOX_CONFIG_ASH_PRINTF - bool "printf builtin" - default BUSYBOX_DEFAULT_ASH_PRINTF - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - -config BUSYBOX_CONFIG_ASH_TEST - bool "test builtin" - default BUSYBOX_DEFAULT_ASH_TEST - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - -config BUSYBOX_CONFIG_ASH_HELP - bool "help builtin" - default BUSYBOX_DEFAULT_ASH_HELP - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - -config BUSYBOX_CONFIG_ASH_GETOPTS - bool "getopts builtin" - default BUSYBOX_DEFAULT_ASH_GETOPTS - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - -config BUSYBOX_CONFIG_ASH_CMDCMD - bool "command builtin" - default BUSYBOX_DEFAULT_ASH_CMDCMD - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH - help - Enable support for the 'command' builtin, which allows - you to run the specified command or builtin, - even when there is a function with the same name. - -endif # ash options config BUSYBOX_CONFIG_CTTYHACK bool "cttyhack" default BUSYBOX_DEFAULT_CTTYHACK @@ -257,7 +183,9 @@ config BUSYBOX_CONFIG_HUSH config BUSYBOX_CONFIG_HUSH_BASH_COMPAT bool "bash-compatible extensions" default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH + help + Enable bash-compatible extensions. config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION bool "Brace expansion" @@ -266,10 +194,17 @@ config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION help Enable {abc,def} extension. +config BUSYBOX_CONFIG_HUSH_HELP + bool "help builtin" + default BUSYBOX_DEFAULT_HUSH_HELP + depends on BUSYBOX_CONFIG_HUSH + help + Enable help builtin in hush. Code size + ~1 kbyte. + config BUSYBOX_CONFIG_HUSH_INTERACTIVE bool "Interactive mode" default BUSYBOX_DEFAULT_HUSH_INTERACTIVE - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH help Enable interactive mode (prompt and command editing). Without this, hush simply reads and executes commands @@ -280,6 +215,8 @@ config BUSYBOX_CONFIG_HUSH_SAVEHISTORY bool "Save command history to .hush_history" default BUSYBOX_DEFAULT_HUSH_SAVEHISTORY depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE && BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY + help + Enable history saving in hush. config BUSYBOX_CONFIG_HUSH_JOB bool "Job control" @@ -293,38 +230,42 @@ config BUSYBOX_CONFIG_HUSH_JOB but no separate process group is formed. config BUSYBOX_CONFIG_HUSH_TICK - bool "Support process substitution" + bool "Process substitution" default BUSYBOX_DEFAULT_HUSH_TICK - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH help - Enable `command` and $(command). + Enable process substitution `command` and $(command) in hush. config BUSYBOX_CONFIG_HUSH_IF bool "Support if/then/elif/else/fi" default BUSYBOX_DEFAULT_HUSH_IF - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH + help + Enable if/then/elif/else/fi in hush. config BUSYBOX_CONFIG_HUSH_LOOPS bool "Support for, while and until loops" default BUSYBOX_DEFAULT_HUSH_LOOPS - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH + help + Enable for, while and until loops in hush. config BUSYBOX_CONFIG_HUSH_CASE bool "Support case ... esac statement" default BUSYBOX_DEFAULT_HUSH_CASE - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH help - Enable case ... esac statement. +400 bytes. + Enable case ... esac statement in hush. +400 bytes. config BUSYBOX_CONFIG_HUSH_FUNCTIONS bool "Support funcname() { commands; } syntax" default BUSYBOX_DEFAULT_HUSH_FUNCTIONS - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH help - Enable support for shell functions. +800 bytes. + Enable support for shell functions in hush. +800 bytes. config BUSYBOX_CONFIG_HUSH_LOCAL - bool "local builtin" + bool "Support local builtin" default BUSYBOX_DEFAULT_HUSH_LOCAL depends on BUSYBOX_CONFIG_HUSH_FUNCTIONS help @@ -333,100 +274,25 @@ config BUSYBOX_CONFIG_HUSH_LOCAL config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT bool "Pseudorandom generator and $RANDOM variable" default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH help Enable pseudorandom generator and dynamic variable "$RANDOM". Each read of "$RANDOM" will generate a new pseudorandom value. -config BUSYBOX_CONFIG_HUSH_MODE_X - bool "Support 'hush -x' option and 'set -x' command" - default BUSYBOX_DEFAULT_HUSH_MODE_X - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - help - This instructs hush to print commands before execution. - Adds ~300 bytes. - -config BUSYBOX_CONFIG_HUSH_ECHO - bool "echo builtin" - default BUSYBOX_DEFAULT_HUSH_ECHO - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_PRINTF - bool "printf builtin" - default BUSYBOX_DEFAULT_HUSH_PRINTF - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_TEST - bool "test builtin" - default BUSYBOX_DEFAULT_HUSH_TEST - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_HELP - bool "help builtin" - default BUSYBOX_DEFAULT_HUSH_HELP - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_EXPORT - bool "export builtin" - default BUSYBOX_DEFAULT_HUSH_EXPORT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - config BUSYBOX_CONFIG_HUSH_EXPORT_N bool "Support 'export -n' option" default BUSYBOX_DEFAULT_HUSH_EXPORT_N - depends on BUSYBOX_CONFIG_HUSH_EXPORT + depends on BUSYBOX_CONFIG_HUSH help export -n unexports variables. It is a bash extension. -config BUSYBOX_CONFIG_HUSH_KILL - bool "kill builtin (supports kill %jobspec)" - default BUSYBOX_DEFAULT_HUSH_KILL - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_WAIT - bool "wait builtin" - default BUSYBOX_DEFAULT_HUSH_WAIT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_TRAP - bool "trap builtin" - default BUSYBOX_DEFAULT_HUSH_TRAP - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_TYPE - bool "type builtin" - default BUSYBOX_DEFAULT_HUSH_TYPE - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_READ - bool "read builtin" - default BUSYBOX_DEFAULT_HUSH_READ - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_SET - bool "set builtin" - default BUSYBOX_DEFAULT_HUSH_SET - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_UNSET - bool "unset builtin" - default BUSYBOX_DEFAULT_HUSH_UNSET - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_ULIMIT - bool "ulimit builtin" - default BUSYBOX_DEFAULT_HUSH_ULIMIT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_UMASK - bool "umask builtin" - default BUSYBOX_DEFAULT_HUSH_UMASK - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH - -config BUSYBOX_CONFIG_HUSH_MEMLEAK - bool "memleak builtin (debugging)" - default BUSYBOX_DEFAULT_HUSH_MEMLEAK - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH +config BUSYBOX_CONFIG_HUSH_MODE_X + bool "Support 'hush -x' option and 'set -x' command" + default BUSYBOX_DEFAULT_HUSH_MODE_X + depends on BUSYBOX_CONFIG_HUSH + help + This instructs hush to print commands before execution. + Adds ~300 bytes. config BUSYBOX_CONFIG_MSH bool "msh (deprecated: aliased to hush)" @@ -436,20 +302,72 @@ config BUSYBOX_CONFIG_MSH msh is deprecated and will be removed, please migrate to hush. -comment "Options common to all shells" -if ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH -config BUSYBOX_CONFIG_FEATURE_SH_MATH +choice + prompt "Choose which shell is aliased to 'sh' name" + default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH + help + Choose which shell you want to be executed by 'sh' alias. + The ash shell is the most bash compatible and full featured one. + +# note: cannot use "select ASH" here, it breaks "make allnoconfig" +config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH + depends on BUSYBOX_CONFIG_ASH + bool "ash" + depends on !BUSYBOX_CONFIG_NOMMU + +config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH + bool "hush" + +config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE + bool "none" + +endchoice + +choice + prompt "Choose which shell is aliased to 'bash' name" + default BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE + help + Choose which shell you want to be executed by 'bash' alias. + The ash shell is the most bash compatible and full featured one. + + Note that selecting this option does not switch on any bash + compatibility code. It merely makes it possible to install + /bin/bash (sym)link and run scripts which start with + #!/bin/bash line. + + Many systems use it in scripts which use bash-specific features, + even simple ones like $RANDOM. Without this option, busybox + can't be used for running them because it won't recongnize + "bash" as a supported applet name. + +config BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH + depends on BUSYBOX_CONFIG_ASH + bool "ash" + depends on !BUSYBOX_CONFIG_NOMMU + +config BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH + bool "hush" + +config BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE + bool "none" + +endchoice + + +config BUSYBOX_CONFIG_SH_MATH_SUPPORT bool "POSIX math support" - default BUSYBOX_DEFAULT_FEATURE_SH_MATH - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + default BUSYBOX_DEFAULT_SH_MATH_SUPPORT + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH help Enable math support in the shell via $((...)) syntax. -config BUSYBOX_CONFIG_FEATURE_SH_MATH_64 +config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64 bool "Extend POSIX math support to 64 bit" - default BUSYBOX_DEFAULT_FEATURE_SH_MATH_64 - depends on BUSYBOX_CONFIG_FEATURE_SH_MATH + default BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64 + depends on BUSYBOX_CONFIG_SH_MATH_SUPPORT help Enable 64-bit math support in the shell. This will make the shell slightly larger, but will allow computation with very large numbers. @@ -458,14 +376,14 @@ config BUSYBOX_CONFIG_FEATURE_SH_MATH_64 config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET bool "Hide message on interactive shell startup" default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH help Remove the busybox introduction when starting a shell. config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE bool "Standalone shell" default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS help This option causes busybox shells to use busybox applets in preference to executables in the PATH whenever possible. For @@ -477,16 +395,28 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE for use as a rescue shell, in the event that you screw up your system. This is implemented by re-execing /proc/self/exe (typically) - with right parameters. + with right parameters. Some selected applets ("NOFORK" applets) + can even be executed without creating new process. + Instead, busybox will call _main() internally. - However, there are drawbacks: it is problematic in chroot jails - without mounted /proc, and ps/top may show command name as 'exe' - for applets started this way. + However, this causes problems in chroot jails without mounted /proc + and with ps/top (command name can be shown as 'exe' for applets + started this way). +# untrue? +# Note that this will *also* cause applets to take precedence +# over shell builtins of the same name. So turning this on will +# eliminate any performance gained by turning on the builtin "echo" +# and "test" commands in ash. +# untrue? +# Note that when using this option, the shell will attempt to directly +# run '/bin/busybox'. If you do not have the busybox binary sitting in +# that exact location with that exact name, this option will not work at +# all. config BUSYBOX_CONFIG_FEATURE_SH_NOFORK bool "Run 'nofork' applets directly" default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS help This option causes busybox shells to not execute typical fork/exec/wait sequence, but call _main directly, @@ -504,12 +434,11 @@ config BUSYBOX_CONFIG_FEATURE_SH_NOFORK config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE bool "Use $HISTFILESIZE" default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH help This option makes busybox shells to use $HISTFILESIZE variable to set shell history size. Note that its max value is capped by "History size" setting in library tuning section. -endif # Options common to all shells endmenu diff --git a/package/utils/busybox/config/sysklogd/Config.in b/package/utils/busybox/config/sysklogd/Config.in index 2045a7ae3..5fcee2c7f 100644 --- a/package/utils/busybox/config/sysklogd/Config.in +++ b/package/utils/busybox/config/sysklogd/Config.in @@ -47,6 +47,7 @@ config BUSYBOX_CONFIG_LOGGER config BUSYBOX_CONFIG_LOGREAD bool "logread" default BUSYBOX_DEFAULT_LOGREAD + depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG help If you enabled Circular Buffer support, you almost certainly want to enable this feature as well. This @@ -58,7 +59,7 @@ config BUSYBOX_CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING default BUSYBOX_DEFAULT_FEATURE_LOGREAD_REDUCED_LOCKING depends on BUSYBOX_CONFIG_LOGREAD help - 'logread' output to slow serial terminals can have + 'logread' ouput to slow serial terminals can have side effects on syslog because of the semaphore. This option make logread to double buffer copy from circular buffer, minimizing semaphore diff --git a/package/utils/busybox/config/util-linux/Config.in b/package/utils/busybox/config/util-linux/Config.in index 74a49d00c..08bddf819 100644 --- a/package/utils/busybox/config/util-linux/Config.in +++ b/package/utils/busybox/config/util-linux/Config.in @@ -6,424 +6,28 @@ menu "Linux System Utilities" -config BUSYBOX_CONFIG_ACPID - bool "acpid" - default BUSYBOX_DEFAULT_ACPID - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - acpid listens to ACPI events coming either in textual form from - /proc/acpi/event (though it is marked deprecated it is still widely - used and _is_ a standard) or in binary form from specified evdevs - (just use /dev/input/event*). - - It parses the event to retrieve ACTION and a possible PARAMETER. - It then spawns /etc/acpi/[/] either via run-parts - (if the resulting path is a directory) or directly as an executable. - - N.B. acpid relies on run-parts so have the latter installed. - -config BUSYBOX_CONFIG_FEATURE_ACPID_COMPAT - bool "Accept and ignore redundant options" - default BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT - depends on BUSYBOX_CONFIG_ACPID - help - Accept and ignore compatibility options -g -m -s -S -v. config BUSYBOX_CONFIG_BLKDISCARD bool "blkdiscard" default BUSYBOX_DEFAULT_BLKDISCARD help blkdiscard discards sectors on a given device. -config BUSYBOX_CONFIG_BLKID - bool "blkid" - default BUSYBOX_DEFAULT_BLKID - select BUSYBOX_CONFIG_PLATFORM_LINUX - select BUSYBOX_CONFIG_VOLUMEID - help - Lists labels and UUIDs of all filesystems. - WARNING: - With all submodules selected, it will add ~8k to busybox. - -config BUSYBOX_CONFIG_FEATURE_BLKID_TYPE - bool "Print filesystem type" - default BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE - depends on BUSYBOX_CONFIG_BLKID - help - Show TYPE="filesystem type" config BUSYBOX_CONFIG_BLOCKDEV bool "blockdev" default BUSYBOX_DEFAULT_BLOCKDEV help Performs some ioctls with block devices. -config BUSYBOX_CONFIG_CAL - bool "cal" - default BUSYBOX_DEFAULT_CAL - help - cal is used to display a monthly calendar. -config BUSYBOX_CONFIG_CHRT - bool "chrt" - default BUSYBOX_DEFAULT_CHRT - help - manipulate real-time attributes of a process. - This requires sched_{g,s}etparam support in your libc. -config BUSYBOX_CONFIG_DMESG - bool "dmesg" - default BUSYBOX_DEFAULT_DMESG - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - dmesg is used to examine or control the kernel ring buffer. When the - Linux kernel prints messages to the system log, they are stored in - the kernel ring buffer. You can use dmesg to print the kernel's ring - buffer, clear the kernel ring buffer, change the size of the kernel - ring buffer, and change the priority level at which kernel messages - are also logged to the system console. Enable this option if you - wish to enable the 'dmesg' utility. - -config BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY - bool "Pretty output" - default BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY - depends on BUSYBOX_CONFIG_DMESG - help - If you wish to scrub the syslog level from the output, say 'Y' here. - The syslog level is a string prefixed to every line with the form - "<#>". - - With this option you will see: - # dmesg - Linux version 2.6.17.4 ..... - BIOS-provided physical RAM map: - BIOS-e820: 0000000000000000 - 000000000009f000 (usable) - - Without this option you will see: - # dmesg - <5>Linux version 2.6.17.4 ..... - <6>BIOS-provided physical RAM map: - <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable) -config BUSYBOX_CONFIG_EJECT - bool "eject" - default BUSYBOX_DEFAULT_EJECT - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Used to eject cdroms. (defaults to /dev/cdrom) - -config BUSYBOX_CONFIG_FEATURE_EJECT_SCSI - bool "SCSI support" - default BUSYBOX_DEFAULT_FEATURE_EJECT_SCSI - depends on BUSYBOX_CONFIG_EJECT - help - Add the -s option to eject, this allows to eject SCSI-Devices and - usb-storage devices. -config BUSYBOX_CONFIG_FALLOCATE - bool "fallocate" - default BUSYBOX_DEFAULT_FALLOCATE - help - Preallocate space for files. config BUSYBOX_CONFIG_FATATTR bool "fatattr" default BUSYBOX_DEFAULT_FATATTR select BUSYBOX_CONFIG_PLATFORM_LINUX help fatattr lists or changes the file attributes on a fat file system. -config BUSYBOX_CONFIG_FBSET - bool "fbset" - default BUSYBOX_DEFAULT_FBSET - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - fbset is used to show or change the settings of a Linux frame buffer - device. The frame buffer device provides a simple and unique - interface to access a graphics display. Enable this option - if you wish to enable the 'fbset' utility. - -config BUSYBOX_CONFIG_FEATURE_FBSET_FANCY - bool "Enable extra options" - default BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY - depends on BUSYBOX_CONFIG_FBSET - help - This option enables extended fbset options, allowing one to set the - framebuffer size, color depth, etc. interface to access a graphics - display. Enable this option if you wish to enable extended fbset - options. - -config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE - bool "Enable readmode support" - default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE - depends on BUSYBOX_CONFIG_FBSET - help - This option allows fbset to read the video mode database stored by - default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE /etc/fb.modes, which can be used to set frame buffer - device to pre-defined video modes. -config BUSYBOX_CONFIG_FDFORMAT - bool "fdformat" - default BUSYBOX_DEFAULT_FDFORMAT - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - fdformat is used to low-level format a floppy disk. -config BUSYBOX_CONFIG_FDISK - bool "fdisk" - default BUSYBOX_DEFAULT_FDISK - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - The fdisk utility is used to divide hard disks into one or more - logical disks, which are generally called partitions. This utility - can be used to list and edit the set of partitions or BSD style - 'disk slices' that are defined on a hard drive. - -config BUSYBOX_CONFIG_FDISK_SUPPORT_LARGE_DISKS - bool "Support over 4GB disks" - default BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS - depends on BUSYBOX_CONFIG_FDISK - depends on !BUSYBOX_CONFIG_LFS # with LFS no special code is needed - -config BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE - bool "Write support" - default BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE - depends on BUSYBOX_CONFIG_FDISK - help - Enabling this option allows you to create or change a partition table - and write those changes out to disk. If you leave this option - disabled, you will only be able to view the partition table. - -config BUSYBOX_CONFIG_FEATURE_AIX_LABEL - bool "Support AIX disklabels" - default BUSYBOX_DEFAULT_FEATURE_AIX_LABEL - depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE - help - Enabling this option allows you to create or change AIX disklabels. - Most people can safely leave this option disabled. - -config BUSYBOX_CONFIG_FEATURE_SGI_LABEL - bool "Support SGI disklabels" - default BUSYBOX_DEFAULT_FEATURE_SGI_LABEL - depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE - help - Enabling this option allows you to create or change SGI disklabels. - Most people can safely leave this option disabled. - -config BUSYBOX_CONFIG_FEATURE_SUN_LABEL - bool "Support SUN disklabels" - default BUSYBOX_DEFAULT_FEATURE_SUN_LABEL - depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE - help - Enabling this option allows you to create or change SUN disklabels. - Most people can safely leave this option disabled. - -config BUSYBOX_CONFIG_FEATURE_OSF_LABEL - bool "Support BSD disklabels" - default BUSYBOX_DEFAULT_FEATURE_OSF_LABEL - depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE - help - Enabling this option allows you to create or change BSD disklabels - and define and edit BSD disk slices. - -config BUSYBOX_CONFIG_FEATURE_GPT_LABEL - bool "Support GPT disklabels" - default BUSYBOX_DEFAULT_FEATURE_GPT_LABEL - depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE - help - Enabling this option allows you to view GUID Partition Table - disklabels. - -config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED - bool "Support expert mode" - default BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED - depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE - help - Enabling this option allows you to do terribly unsafe things like - define arbitrary drive geometry, move the beginning of data in a - partition, and similarly evil things. Unless you have a very good - reason you would be wise to leave this disabled. -config BUSYBOX_CONFIG_FINDFS - bool "findfs" - default BUSYBOX_DEFAULT_FINDFS - select BUSYBOX_CONFIG_PLATFORM_LINUX - select BUSYBOX_CONFIG_VOLUMEID - help - Prints the name of a filesystem with given label or UUID. - WARNING: - With all submodules selected, it will add ~8k to busybox. -config BUSYBOX_CONFIG_FLOCK - bool "flock" - default BUSYBOX_DEFAULT_FLOCK - help - Manage locks from shell scripts -config BUSYBOX_CONFIG_FDFLUSH - bool "fdflush" - default BUSYBOX_DEFAULT_FDFLUSH - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - fdflush is only needed when changing media on slightly-broken - removable media drives. It is used to make Linux believe that a - hardware disk-change switch has been actuated, which causes Linux to - forget anything it has cached from the previous media. If you have - such a slightly-broken drive, you will need to run fdflush every time - you change a disk. Most people have working hardware and can safely - leave this disabled. - -config BUSYBOX_CONFIG_FREERAMDISK - bool "freeramdisk" - default BUSYBOX_DEFAULT_FREERAMDISK - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Linux allows you to create ramdisks. This utility allows you to - delete them and completely free all memory that was used for the - ramdisk. For example, if you boot Linux into a ramdisk and later - pivot_root, you may want to free the memory that is allocated to the - ramdisk. If you have no use for freeing memory from a ramdisk, leave - this disabled. -config BUSYBOX_CONFIG_FSCK_MINIX - bool "fsck_minix" - default BUSYBOX_DEFAULT_FSCK_MINIX - help - The minix filesystem is a nice, small, compact, read-write filesystem - with little overhead. It is not a journaling filesystem however and - can experience corruption if it is not properly unmounted or if the - power goes off in the middle of a write. This utility allows you to - check for and attempt to repair any corruption that occurs to a minix - filesystem. -config BUSYBOX_CONFIG_FSFREEZE - bool "fsfreeze" - default BUSYBOX_DEFAULT_FSFREEZE - select BUSYBOX_CONFIG_PLATFORM_LINUX - select BUSYBOX_CONFIG_LONG_OPTS - help - Halt new accesses and flush writes on a mounted filesystem. config BUSYBOX_CONFIG_FSTRIM bool "fstrim" default BUSYBOX_DEFAULT_FSTRIM select BUSYBOX_CONFIG_PLATFORM_LINUX help Discard unused blocks on a mounted filesystem. -config BUSYBOX_CONFIG_GETOPT - bool "getopt" - default BUSYBOX_DEFAULT_GETOPT - help - The getopt utility is used to break up (parse) options in command - lines to make it easy to write complex shell scripts that also check - for legal (and illegal) options. If you want to write horribly - complex shell scripts, or use some horribly complex shell script - written by others, this utility may be for you. Most people will - wisely leave this disabled. - -config BUSYBOX_CONFIG_FEATURE_GETOPT_LONG - bool "Support option -l" - default BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG if BUSYBOX_CONFIG_LONG_OPTS - depends on BUSYBOX_CONFIG_GETOPT - help - Enable support for long options (option -l). -config BUSYBOX_CONFIG_HEXDUMP - bool "hexdump" - default BUSYBOX_DEFAULT_HEXDUMP - help - The hexdump utility is used to display binary data in a readable - way that is comparable to the output from most hex editors. - -config BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE - bool "Support -R, reverse of 'hexdump -Cv'" - default BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE - depends on BUSYBOX_CONFIG_HEXDUMP - help - The hexdump utility is used to display binary data in an ascii - readable way. This option creates binary data from an ascii input. - NB: this option is non-standard. It's unwise to use it in scripts - aimed to be portable. - -config BUSYBOX_CONFIG_HD - bool "hd" - default BUSYBOX_DEFAULT_HD - help - hd is an alias to hexdump -C. -config BUSYBOX_CONFIG_XXD - bool "xxd" - default BUSYBOX_DEFAULT_XXD - help - The xxd utility is used to display binary data in a readable - way that is comparable to the output from most hex editors. -config BUSYBOX_CONFIG_HWCLOCK - bool "hwclock" - default BUSYBOX_DEFAULT_HWCLOCK - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - The hwclock utility is used to read and set the hardware clock - on a system. This is primarily used to set the current time on - shutdown in the hardware clock, so the hardware will keep the - correct time when Linux is _not_ running. - -config BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS - bool "Support long options (--hctosys,...)" - default BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS - depends on BUSYBOX_CONFIG_HWCLOCK && BUSYBOX_CONFIG_LONG_OPTS - -config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS - bool "Use FHS /var/lib/hwclock/adjtime" - default BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS # util-linux-ng in Fedora 13 still uses /etc/adjtime - depends on BUSYBOX_CONFIG_HWCLOCK - help - Starting with FHS 2.3, the adjtime state file is supposed to exist - at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish - to use the FHS behavior, answer Y here, otherwise answer N for the - classic /etc/adjtime path. - - pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO -config BUSYBOX_CONFIG_IONICE - bool "ionice" - default BUSYBOX_DEFAULT_IONICE - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Set/set program io scheduling class and priority - Requires kernel >= 2.6.13 -config BUSYBOX_CONFIG_IPCRM - bool "ipcrm" - default BUSYBOX_DEFAULT_IPCRM - help - The ipcrm utility allows the removal of System V interprocess - communication (IPC) objects and the associated data structures - from the system. -config BUSYBOX_CONFIG_IPCS - bool "ipcs" - default BUSYBOX_DEFAULT_IPCS - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - The ipcs utility is used to provide information on the currently - allocated System V interprocess (IPC) objects in the system. -config BUSYBOX_CONFIG_LAST - bool "last" - default BUSYBOX_DEFAULT_LAST - depends on BUSYBOX_CONFIG_FEATURE_WTMP - help - 'last' displays a list of the last users that logged into the system. - -config BUSYBOX_CONFIG_FEATURE_LAST_FANCY - bool "Output extra information" - default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY - depends on BUSYBOX_CONFIG_LAST - help - 'last' displays detailed information about the last users that - logged into the system (mimics sysvinit last). +900 bytes. -config BUSYBOX_CONFIG_LOSETUP - bool "losetup" - default BUSYBOX_DEFAULT_LOSETUP - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - losetup is used to associate or detach a loop device with a regular - file or block device, and to query the status of a loop device. This - version does not currently support enabling data encryption. -config BUSYBOX_CONFIG_LSPCI - bool "lspci" - default BUSYBOX_DEFAULT_LSPCI - #select PLATFORM_LINUX - help - lspci is a utility for displaying information about PCI buses in the - system and devices connected to them. - - This version uses sysfs (/sys/bus/pci/devices) only. -config BUSYBOX_CONFIG_LSUSB - bool "lsusb" - default BUSYBOX_DEFAULT_LSUSB - #select PLATFORM_LINUX - help - lsusb is a utility for displaying information about USB buses in the - system and devices connected to them. - - This version uses sysfs (/sys/bus/usb/devices) only. config BUSYBOX_CONFIG_MDEV bool "mdev" default BUSYBOX_DEFAULT_MDEV @@ -481,102 +85,6 @@ config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE These devices will request userspace look up the files in /lib/firmware/ and if it exists, send it to the kernel for loading into the hardware. -config BUSYBOX_CONFIG_MESG - bool "mesg" - default BUSYBOX_DEFAULT_MESG - help - Mesg controls access to your terminal by others. It is typically - used to allow or disallow other users to write to your terminal - -config BUSYBOX_CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP - bool "Enable writing to tty only by group, not by everybody" - default BUSYBOX_DEFAULT_FEATURE_MESG_ENABLE_ONLY_GROUP - depends on BUSYBOX_CONFIG_MESG - help - Usually, ttys are owned by group "tty", and "write" tool is - setgid to this group. This way, "mesg y" only needs to enable - "write by owning group" bit in tty mode. - - If you set this option to N, "mesg y" will enable writing - by anybody at all. This is not recommended. -config BUSYBOX_CONFIG_MKE2FS - bool "mke2fs" - default BUSYBOX_DEFAULT_MKE2FS - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Utility to create EXT2 filesystems. - -config BUSYBOX_CONFIG_MKFS_EXT2 - bool "mkfs.ext2" - default BUSYBOX_DEFAULT_MKFS_EXT2 - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Alias to "mke2fs". -config BUSYBOX_CONFIG_MKFS_MINIX - bool "mkfs_minix" - default BUSYBOX_DEFAULT_MKFS_MINIX - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - The minix filesystem is a nice, small, compact, read-write filesystem - with little overhead. If you wish to be able to create minix - filesystems this utility will do the job for you. - -config BUSYBOX_CONFIG_FEATURE_MINIX2 - bool "Support Minix fs v2 (fsck_minix/mkfs_minix)" - default BUSYBOX_DEFAULT_FEATURE_MINIX2 - depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX - help - If you wish to be able to create version 2 minix filesystems, enable - this. If you enabled 'mkfs_minix' then you almost certainly want to - be using the version 2 filesystem support. -config BUSYBOX_CONFIG_MKFS_REISER - bool "mkfs_reiser" - default BUSYBOX_DEFAULT_MKFS_REISER - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Utility to create ReiserFS filesystems. - Note: this applet needs a lot of testing and polishing. -config BUSYBOX_CONFIG_MKDOSFS - bool "mkdosfs" - default BUSYBOX_DEFAULT_MKDOSFS - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Utility to create FAT32 filesystems. - -config BUSYBOX_CONFIG_MKFS_VFAT - bool "mkfs.vfat" - default BUSYBOX_DEFAULT_MKFS_VFAT - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Alias to "mkdosfs". -config BUSYBOX_CONFIG_MKSWAP - bool "mkswap" - default BUSYBOX_DEFAULT_MKSWAP - help - The mkswap utility is used to configure a file or disk partition as - Linux swap space. This allows Linux to use the entire file or - partition as if it were additional RAM, which can greatly increase - the capability of low-memory machines. This additional memory is - much slower than real RAM, but can be very helpful at preventing your - applications being killed by the Linux out of memory (OOM) killer. - Once you have created swap space using 'mkswap' you need to enable - the swap space using the 'swapon' utility. - -config BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID - bool "UUID support" - default BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID - depends on BUSYBOX_CONFIG_MKSWAP - help - Generate swap spaces with universally unique identifiers. -config BUSYBOX_CONFIG_MORE - bool "more" - default BUSYBOX_DEFAULT_MORE - help - more is a simple utility which allows you to read text one screen - sized page at a time. If you want to read text that is larger than - the screen, and you are using anything faster than a 300 baud modem, - you will probably find this utility very helpful. If you don't have - any need to reading text files, you can leave this disabled. config BUSYBOX_CONFIG_MOUNT bool "mount" default BUSYBOX_DEFAULT_MOUNT @@ -650,7 +158,7 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS depends on BUSYBOX_CONFIG_MOUNT - bool "Support lots of -o flags" + bool "Support lots of -o flags in mount" default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS help Without this, mount only supports ro/rw/remount. With this, it @@ -671,11 +179,6 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB help Support mount -T (specifying an alternate fstab) -config BUSYBOX_CONFIG_MOUNTPOINT - bool "mountpoint" - default BUSYBOX_DEFAULT_MOUNTPOINT - help - mountpoint checks if the directory is a mountpoint. config BUSYBOX_CONFIG_NSENTER bool "nsenter" default BUSYBOX_DEFAULT_NSENTER @@ -690,6 +193,462 @@ config BUSYBOX_CONFIG_FEATURE_NSENTER_LONG_OPTS help Support long options for the nsenter applet. This makes the busybox implementation more compatible with upstream. +config BUSYBOX_CONFIG_REV + bool "rev" + default BUSYBOX_DEFAULT_REV + help + Reverse lines of a file or files. +config BUSYBOX_CONFIG_SETARCH + bool "setarch" + default BUSYBOX_DEFAULT_SETARCH + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + The linux32 utility is used to create a 32bit environment for the + specified program (usually a shell). It only makes sense to have + this util on a system that supports both 64bit and 32bit userland + (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...). +config BUSYBOX_CONFIG_UEVENT + bool "uevent" + default BUSYBOX_DEFAULT_UEVENT + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + uevent is a netlink listener for kernel uevent notifications + sent via netlink. It is usually used for dynamic device creation. +config BUSYBOX_CONFIG_UNSHARE + bool "unshare" + default BUSYBOX_DEFAULT_UNSHARE + depends on BUSYBOX_CONFIG_LONG_OPTS && !BUSYBOX_CONFIG_NOMMU + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Run program with some namespaces unshared from parent. + +config BUSYBOX_CONFIG_ACPID + bool "acpid" + default BUSYBOX_DEFAULT_ACPID + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + acpid listens to ACPI events coming either in textual form from + /proc/acpi/event (though it is marked deprecated it is still widely + used and _is_ a standard) or in binary form from specified evdevs + (just use /dev/input/event*). + + It parses the event to retrieve ACTION and a possible PARAMETER. + It then spawns /etc/acpi/[/] either via run-parts + (if the resulting path is a directory) or directly as an executable. + + N.B. acpid relies on run-parts so have the latter installed. + +config BUSYBOX_CONFIG_FEATURE_ACPID_COMPAT + bool "Accept and ignore redundant options" + default BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT + depends on BUSYBOX_CONFIG_ACPID + help + Accept and ignore compatibility options -g -m -s -S -v. + +config BUSYBOX_CONFIG_BLKID + bool "blkid" + default BUSYBOX_DEFAULT_BLKID + select BUSYBOX_CONFIG_PLATFORM_LINUX + select BUSYBOX_CONFIG_VOLUMEID + help + Lists labels and UUIDs of all filesystems. + WARNING: + With all submodules selected, it will add ~8k to busybox. + +config BUSYBOX_CONFIG_FEATURE_BLKID_TYPE + bool "Print filesystem type" + default BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE + depends on BUSYBOX_CONFIG_BLKID + help + Show TYPE="filesystem type" + +config BUSYBOX_CONFIG_DMESG + bool "dmesg" + default BUSYBOX_DEFAULT_DMESG + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + dmesg is used to examine or control the kernel ring buffer. When the + Linux kernel prints messages to the system log, they are stored in + the kernel ring buffer. You can use dmesg to print the kernel's ring + buffer, clear the kernel ring buffer, change the size of the kernel + ring buffer, and change the priority level at which kernel messages + are also logged to the system console. Enable this option if you + wish to enable the 'dmesg' utility. + +config BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY + bool "Pretty dmesg output" + default BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY + depends on BUSYBOX_CONFIG_DMESG + help + If you wish to scrub the syslog level from the output, say 'Y' here. + The syslog level is a string prefixed to every line with the form + "<#>". + + With this option you will see: + # dmesg + Linux version 2.6.17.4 ..... + BIOS-provided physical RAM map: + BIOS-e820: 0000000000000000 - 000000000009f000 (usable) + + Without this option you will see: + # dmesg + <5>Linux version 2.6.17.4 ..... + <6>BIOS-provided physical RAM map: + <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable) + +config BUSYBOX_CONFIG_FBSET + bool "fbset" + default BUSYBOX_DEFAULT_FBSET + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + fbset is used to show or change the settings of a Linux frame buffer + device. The frame buffer device provides a simple and unique + interface to access a graphics display. Enable this option + if you wish to enable the 'fbset' utility. + +config BUSYBOX_CONFIG_FEATURE_FBSET_FANCY + bool "Turn on extra fbset options" + default BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY + depends on BUSYBOX_CONFIG_FBSET + help + This option enables extended fbset options, allowing one to set the + framebuffer size, color depth, etc. interface to access a graphics + display. Enable this option if you wish to enable extended fbset + options. + +config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE + bool "Turn on fbset readmode support" + default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE + depends on BUSYBOX_CONFIG_FBSET + help + This option allows fbset to read the video mode database stored by + default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE /etc/fb.modes, which can be used to set frame buffer + device to pre-defined video modes. + +config BUSYBOX_CONFIG_FDFLUSH + bool "fdflush" + default BUSYBOX_DEFAULT_FDFLUSH + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + fdflush is only needed when changing media on slightly-broken + removable media drives. It is used to make Linux believe that a + hardware disk-change switch has been actuated, which causes Linux to + forget anything it has cached from the previous media. If you have + such a slightly-broken drive, you will need to run fdflush every time + you change a disk. Most people have working hardware and can safely + leave this disabled. + +config BUSYBOX_CONFIG_FDFORMAT + bool "fdformat" + default BUSYBOX_DEFAULT_FDFORMAT + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + fdformat is used to low-level format a floppy disk. + +config BUSYBOX_CONFIG_FDISK + bool "fdisk" + default BUSYBOX_DEFAULT_FDISK + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + The fdisk utility is used to divide hard disks into one or more + logical disks, which are generally called partitions. This utility + can be used to list and edit the set of partitions or BSD style + 'disk slices' that are defined on a hard drive. + +config BUSYBOX_CONFIG_FDISK_SUPPORT_LARGE_DISKS + bool "Support over 4GB disks" + default BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS + depends on BUSYBOX_CONFIG_FDISK + depends on !BUSYBOX_CONFIG_LFS # with LFS no special code is needed + help + Enable this option to support large disks > 4GB. + +config BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE + bool "Write support" + default BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE + depends on BUSYBOX_CONFIG_FDISK + help + Enabling this option allows you to create or change a partition table + and write those changes out to disk. If you leave this option + disabled, you will only be able to view the partition table. + +config BUSYBOX_CONFIG_FEATURE_AIX_LABEL + bool "Support AIX disklabels" + default BUSYBOX_DEFAULT_FEATURE_AIX_LABEL + depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to create or change AIX disklabels. + Most people can safely leave this option disabled. + +config BUSYBOX_CONFIG_FEATURE_SGI_LABEL + bool "Support SGI disklabels" + default BUSYBOX_DEFAULT_FEATURE_SGI_LABEL + depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to create or change SGI disklabels. + Most people can safely leave this option disabled. + +config BUSYBOX_CONFIG_FEATURE_SUN_LABEL + bool "Support SUN disklabels" + default BUSYBOX_DEFAULT_FEATURE_SUN_LABEL + depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to create or change SUN disklabels. + Most people can safely leave this option disabled. + +config BUSYBOX_CONFIG_FEATURE_OSF_LABEL + bool "Support BSD disklabels" + default BUSYBOX_DEFAULT_FEATURE_OSF_LABEL + depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to create or change BSD disklabels + and define and edit BSD disk slices. + +config BUSYBOX_CONFIG_FEATURE_GPT_LABEL + bool "Support GPT disklabels" + default BUSYBOX_DEFAULT_FEATURE_GPT_LABEL + depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to view GUID Partition Table + disklabels. + +config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED + bool "Support expert mode" + default BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED + depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE + help + Enabling this option allows you to do terribly unsafe things like + define arbitrary drive geometry, move the beginning of data in a + partition, and similarly evil things. Unless you have a very good + reason you would be wise to leave this disabled. + +config BUSYBOX_CONFIG_FINDFS + bool "findfs" + default BUSYBOX_DEFAULT_FINDFS + select BUSYBOX_CONFIG_PLATFORM_LINUX + select BUSYBOX_CONFIG_VOLUMEID + help + Prints the name of a filesystem with given label or UUID. + WARNING: + With all submodules selected, it will add ~8k to busybox. + +config BUSYBOX_CONFIG_FLOCK + bool "flock" + default BUSYBOX_DEFAULT_FLOCK + help + Manage locks from shell scripts + +config BUSYBOX_CONFIG_FREERAMDISK + bool "freeramdisk" + default BUSYBOX_DEFAULT_FREERAMDISK + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Linux allows you to create ramdisks. This utility allows you to + delete them and completely free all memory that was used for the + ramdisk. For example, if you boot Linux into a ramdisk and later + pivot_root, you may want to free the memory that is allocated to the + ramdisk. If you have no use for freeing memory from a ramdisk, leave + this disabled. + +config BUSYBOX_CONFIG_FSCK_MINIX + bool "fsck_minix" + default BUSYBOX_DEFAULT_FSCK_MINIX + help + The minix filesystem is a nice, small, compact, read-write filesystem + with little overhead. It is not a journaling filesystem however and + can experience corruption if it is not properly unmounted or if the + power goes off in the middle of a write. This utility allows you to + check for and attempt to repair any corruption that occurs to a minix + filesystem. + +config BUSYBOX_CONFIG_MKFS_EXT2 + bool "mkfs_ext2" + default BUSYBOX_DEFAULT_MKFS_EXT2 + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Utility to create EXT2 filesystems. + +config BUSYBOX_CONFIG_MKFS_MINIX + bool "mkfs_minix" + default BUSYBOX_DEFAULT_MKFS_MINIX + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + The minix filesystem is a nice, small, compact, read-write filesystem + with little overhead. If you wish to be able to create minix + filesystems this utility will do the job for you. + +config BUSYBOX_CONFIG_FEATURE_MINIX2 + bool "Support Minix fs v2 (fsck_minix/mkfs_minix)" + default BUSYBOX_DEFAULT_FEATURE_MINIX2 + depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX + help + If you wish to be able to create version 2 minix filesystems, enable + this. If you enabled 'mkfs_minix' then you almost certainly want to + be using the version 2 filesystem support. + +config BUSYBOX_CONFIG_MKFS_REISER + bool "mkfs_reiser" + default BUSYBOX_DEFAULT_MKFS_REISER + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Utility to create ReiserFS filesystems. + Note: this applet needs a lot of testing and polishing. + +config BUSYBOX_CONFIG_MKFS_VFAT + bool "mkfs_vfat" + default BUSYBOX_DEFAULT_MKFS_VFAT + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + Utility to create FAT32 filesystems. + +config BUSYBOX_CONFIG_GETOPT + bool "getopt" + default BUSYBOX_DEFAULT_GETOPT + help + The getopt utility is used to break up (parse) options in command + lines to make it easy to write complex shell scripts that also check + for legal (and illegal) options. If you want to write horribly + complex shell scripts, or use some horribly complex shell script + written by others, this utility may be for you. Most people will + wisely leave this disabled. + +config BUSYBOX_CONFIG_FEATURE_GETOPT_LONG + bool "Support option -l" + default BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG if BUSYBOX_CONFIG_LONG_OPTS + depends on BUSYBOX_CONFIG_GETOPT + help + Enable support for long options (option -l). + +config BUSYBOX_CONFIG_HEXDUMP + bool "hexdump" + default BUSYBOX_DEFAULT_HEXDUMP + help + The hexdump utility is used to display binary data in a readable + way that is comparable to the output from most hex editors. + +config BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE + bool "Support -R, reverse of 'hexdump -Cv'" + default BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE + depends on BUSYBOX_CONFIG_HEXDUMP + help + The hexdump utility is used to display binary data in an ascii + readable way. This option creates binary data from an ascii input. + NB: this option is non-standard. It's unwise to use it in scripts + aimed to be portable. + +config BUSYBOX_CONFIG_HD + bool "hd" + default BUSYBOX_DEFAULT_HD + depends on BUSYBOX_CONFIG_HEXDUMP + help + hd is an alias to hexdump -C. + +config BUSYBOX_CONFIG_HWCLOCK + bool "hwclock" + default BUSYBOX_DEFAULT_HWCLOCK + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + The hwclock utility is used to read and set the hardware clock + on a system. This is primarily used to set the current time on + shutdown in the hardware clock, so the hardware will keep the + correct time when Linux is _not_ running. + +config BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS + bool "Support long options (--hctosys,...)" + default BUSYBOX_DEFAULT_FEATURE_HWCLOCK_LONG_OPTIONS + depends on BUSYBOX_CONFIG_HWCLOCK && BUSYBOX_CONFIG_LONG_OPTS + help + By default, the hwclock utility only uses short options. If you + are overly fond of its long options, such as --hctosys, --utc, etc) + then enable this option. + +config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS + bool "Use FHS /var/lib/hwclock/adjtime" + default BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS # util-linux-ng in Fedora 13 still uses /etc/adjtime + depends on BUSYBOX_CONFIG_HWCLOCK + help + Starting with FHS 2.3, the adjtime state file is supposed to exist + at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish + to use the FHS behavior, answer Y here, otherwise answer N for the + classic /etc/adjtime path. + + pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO + +config BUSYBOX_CONFIG_IPCRM + bool "ipcrm" + default BUSYBOX_DEFAULT_IPCRM + help + The ipcrm utility allows the removal of System V interprocess + communication (IPC) objects and the associated data structures + from the system. + +config BUSYBOX_CONFIG_IPCS + bool "ipcs" + default BUSYBOX_DEFAULT_IPCS + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + The ipcs utility is used to provide information on the currently + allocated System V interprocess (IPC) objects in the system. + +config BUSYBOX_CONFIG_LOSETUP + bool "losetup" + default BUSYBOX_DEFAULT_LOSETUP + select BUSYBOX_CONFIG_PLATFORM_LINUX + help + losetup is used to associate or detach a loop device with a regular + file or block device, and to query the status of a loop device. This + version does not currently support enabling data encryption. + +config BUSYBOX_CONFIG_LSPCI + bool "lspci" + default BUSYBOX_DEFAULT_LSPCI + #select PLATFORM_LINUX + help + lspci is a utility for displaying information about PCI buses in the + system and devices connected to them. + + This version uses sysfs (/sys/bus/pci/devices) only. + +config BUSYBOX_CONFIG_LSUSB + bool "lsusb" + default BUSYBOX_DEFAULT_LSUSB + #select PLATFORM_LINUX + help + lsusb is a utility for displaying information about USB buses in the + system and devices connected to them. + + This version uses sysfs (/sys/bus/usb/devices) only. + +config BUSYBOX_CONFIG_MKSWAP + bool "mkswap" + default BUSYBOX_DEFAULT_MKSWAP + help + The mkswap utility is used to configure a file or disk partition as + Linux swap space. This allows Linux to use the entire file or + partition as if it were additional RAM, which can greatly increase + the capability of low-memory machines. This additional memory is + much slower than real RAM, but can be very helpful at preventing your + applications being killed by the Linux out of memory (OOM) killer. + Once you have created swap space using 'mkswap' you need to enable + the swap space using the 'swapon' utility. + +config BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID + bool "UUID support" + default BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID + depends on BUSYBOX_CONFIG_MKSWAP + help + Generate swap spaces with universally unique identifiers. + +config BUSYBOX_CONFIG_MORE + bool "more" + default BUSYBOX_DEFAULT_MORE + help + more is a simple utility which allows you to read text one screen + sized page at a time. If you want to read text that is larger than + the screen, and you are using anything faster than a 300 baud modem, + you will probably find this utility very helpful. If you don't have + any need to reading text files, you can leave this disabled. + config BUSYBOX_CONFIG_PIVOT_ROOT bool "pivot_root" default BUSYBOX_DEFAULT_PIVOT_ROOT @@ -702,6 +661,7 @@ config BUSYBOX_CONFIG_PIVOT_ROOT Note: This is for initrd in linux 2.4. Under initramfs (introduced in linux 2.6) use switch_root instead. + config BUSYBOX_CONFIG_RDATE bool "rdate" default BUSYBOX_DEFAULT_RDATE @@ -710,87 +670,46 @@ config BUSYBOX_CONFIG_RDATE system clock with the date and time of a remote networked system using the RFC868 protocol, which is built into the inetd daemon on most systems. + config BUSYBOX_CONFIG_RDEV bool "rdev" default BUSYBOX_DEFAULT_RDEV help Print the device node associated with the filesystem mounted at '/'. + config BUSYBOX_CONFIG_READPROFILE bool "readprofile" default BUSYBOX_DEFAULT_READPROFILE #select PLATFORM_LINUX help This allows you to parse /proc/profile for basic profiling. -config BUSYBOX_CONFIG_RENICE - bool "renice" - default BUSYBOX_DEFAULT_RENICE - help - Renice alters the scheduling priority of one or more running - processes. -config BUSYBOX_CONFIG_REV - bool "rev" - default BUSYBOX_DEFAULT_REV - help - Reverse lines of a file or files. + config BUSYBOX_CONFIG_RTCWAKE bool "rtcwake" default BUSYBOX_DEFAULT_RTCWAKE select BUSYBOX_CONFIG_PLATFORM_LINUX help Enter a system sleep state until specified wakeup time. + config BUSYBOX_CONFIG_SCRIPT bool "script" default BUSYBOX_DEFAULT_SCRIPT help The script makes typescript of terminal session. + config BUSYBOX_CONFIG_SCRIPTREPLAY bool "scriptreplay" default BUSYBOX_DEFAULT_SCRIPTREPLAY help This program replays a typescript, using timing information given by script -t. -config BUSYBOX_CONFIG_SETARCH - bool "setarch" - default BUSYBOX_DEFAULT_SETARCH - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - The linux32 utility is used to create a 32bit environment for the - specified program (usually a shell). It only makes sense to have - this util on a system that supports both 64bit and 32bit userland - (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...). -config BUSYBOX_CONFIG_LINUX32 - bool "linux32" - default BUSYBOX_DEFAULT_LINUX32 +config BUSYBOX_CONFIG_SWAPONOFF + bool "swaponoff" + default BUSYBOX_DEFAULT_SWAPONOFF select BUSYBOX_CONFIG_PLATFORM_LINUX help - Alias to "setarch linux32". - -config BUSYBOX_CONFIG_LINUX64 - bool "linux64" - default BUSYBOX_DEFAULT_LINUX64 - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - Alias to "setarch linux64". -config BUSYBOX_CONFIG_SETPRIV - bool "setpriv" - default BUSYBOX_DEFAULT_SETPRIV - select BUSYBOX_CONFIG_PLATFORM_LINUX - select BUSYBOX_CONFIG_LONG_OPTS - help - Run a program with different Linux privilege settings. - Requires kernel >= 3.5 -config BUSYBOX_CONFIG_SETSID - bool "setsid" - default BUSYBOX_DEFAULT_SETSID - help - setsid runs a program in a new session -config BUSYBOX_CONFIG_SWAPON - bool "swapon" - default BUSYBOX_DEFAULT_SWAPON - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - This option enables the 'swapon' utility. + This option enables both the 'swapon' and the 'swapoff' utilities. Once you have created some swap space using 'mkswap', you also need to enable your swap space with the 'swapon' utility. The 'swapoff' utility is used, typically at system shutdown, to disable any swap @@ -800,7 +719,7 @@ config BUSYBOX_CONFIG_SWAPON config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD bool "Support discard option -d" default BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD - depends on BUSYBOX_CONFIG_SWAPON + depends on BUSYBOX_CONFIG_SWAPONOFF help Enable support for discarding swap area blocks at swapon and/or as the kernel frees them. This option enables both the -d option on @@ -809,16 +728,10 @@ config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD config BUSYBOX_CONFIG_FEATURE_SWAPON_PRI bool "Support priority option -p" default BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI - depends on BUSYBOX_CONFIG_SWAPON + depends on BUSYBOX_CONFIG_SWAPONOFF help Enable support for setting swap device priority in swapon. -config BUSYBOX_CONFIG_SWAPOFF - bool "swapoff" - default BUSYBOX_DEFAULT_SWAPOFF - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - This option enables the 'swapoff' utility. config BUSYBOX_CONFIG_SWITCH_ROOT bool "switch_root" default BUSYBOX_DEFAULT_SWITCH_ROOT @@ -838,28 +751,7 @@ config BUSYBOX_CONFIG_SWITCH_ROOT * Because the Linux kernel uses rootfs internally as the starting and ending point for searching through the kernel's doubly linked list of active mount points. That's why. -config BUSYBOX_CONFIG_TASKSET - bool "taskset" - default BUSYBOX_DEFAULT_TASKSET - help - Retrieve or set a processes's CPU affinity. - This requires sched_{g,s}etaffinity support in your libc. -config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY - bool "Fancy output" - default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY - depends on BUSYBOX_CONFIG_TASKSET - help - Needed for machines with more than 32-64 CPUs: - affinity parameter 0xHHHHHHHHHHHHHHHHHHHH can be arbitrarily long - in this case. Otherwise, it is limited to sizeof(long). -config BUSYBOX_CONFIG_UEVENT - bool "uevent" - default BUSYBOX_DEFAULT_UEVENT - select BUSYBOX_CONFIG_PLATFORM_LINUX - help - uevent is a netlink listener for kernel uevent notifications - sent via netlink. It is usually used for dynamic device creation. config BUSYBOX_CONFIG_UMOUNT bool "umount" default BUSYBOX_DEFAULT_UMOUNT @@ -876,20 +768,6 @@ config BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL depends on BUSYBOX_CONFIG_UMOUNT help Support -a option to unmount all currently mounted filesystems. -config BUSYBOX_CONFIG_UNSHARE - bool "unshare" - default BUSYBOX_DEFAULT_UNSHARE - depends on !BUSYBOX_CONFIG_NOMMU - select BUSYBOX_CONFIG_PLATFORM_LINUX - select BUSYBOX_CONFIG_LONG_OPTS - help - Run program with some namespaces unshared from parent. -config BUSYBOX_CONFIG_WALL - bool "wall" - default BUSYBOX_DEFAULT_WALL - depends on BUSYBOX_CONFIG_FEATURE_UTMP - help - Write a message to all users that are logged in. comment "Common options for mount/umount" depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT @@ -924,7 +802,7 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP_CREATE if it does not find a free one. config BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT - bool "Support old /etc/mtab file" + bool "Support for the old /etc/mtab file" default BUSYBOX_DEFAULT_FEATURE_MTAB_SUPPORT depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT select BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE diff --git a/package/utils/busybox/config/util-linux/volume_id/Config.in b/package/utils/busybox/config/util-linux/volume_id/Config.in index afbfa4ae5..6153314d6 100644 --- a/package/utils/busybox/config/util-linux/volume_id/Config.in +++ b/package/utils/busybox/config/util-linux/volume_id/Config.in @@ -11,18 +11,31 @@ config BUSYBOX_CONFIG_VOLUMEID menu "Filesystem/Volume identification" depends on BUSYBOX_CONFIG_VOLUMEID + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_BCACHE bool "bcache filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BCACHE depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_BTRFS bool "btrfs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BTRFS depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_CRAMFS bool "cramfs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_CRAMFS depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXFAT bool "exFAT filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXFAT @@ -31,10 +44,16 @@ config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXFAT exFAT (extended FAT) is a proprietary file system designed especially for flash drives. It has many features from NTFS, but with less overhead. exFAT is used on most SDXC cards for consumer electronics. + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXT bool "Ext filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXT depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_F2FS bool "f2fs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_F2FS @@ -44,34 +63,64 @@ config BUSYBOX_CONFIG_FEATURE_VOLUMEID_F2FS which is adapted to newer forms of storage. F2FS also remedies some known issues of the older log structured file systems, such as high cleaning overhead. + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_FAT bool "fat filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_FAT depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_HFS bool "hfs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_HFS depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_ISO9660 bool "iso9660 filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ISO9660 depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_JFS bool "jfs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_JFS depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXRAID bool "linuxraid" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXRAID depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXSWAP bool "linux swap filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXSWAP depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LUKS bool "luks filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LUKS depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_NILFS bool "nilfs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NILFS @@ -87,22 +136,40 @@ config BUSYBOX_CONFIG_FEATURE_VOLUMEID_NILFS SOX compliance logging, and so forth. It can serve as an alternative filesystem for Linux desktop environment, or as a basis of advanced storage appliances. + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_NTFS bool "ntfs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NTFS depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_OCFS2 bool "ocfs2 filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_OCFS2 depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_REISERFS bool "Reiser filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_REISERFS depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_ROMFS bool "romfs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ROMFS depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SQUASHFS bool "SquashFS filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS @@ -112,76 +179,134 @@ config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SQUASHFS intended for general read-only filesystem use and in constrained block device/memory systems (e.g. embedded systems) where low overhead is needed. + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV bool "sysv filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV depends on BUSYBOX_CONFIG_VOLUMEID -config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UBIFS - bool "UBIFS filesystem" - default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS - depends on BUSYBOX_CONFIG_VOLUMEID help - UBIFS (Unsorted Block Image File System) is a file - system for use with raw flash memory media. + TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF bool "udf filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + + ### config FEATURE_VOLUMEID_HIGHPOINTRAID ### bool "highpoint raid" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_HPFS ### bool "hpfs filesystem" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_ISWRAID ### bool "intel raid" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_LSIRAID ### bool "lsi raid" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_LVM ### bool "lvm" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_MAC ### bool "mac filesystem" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_MINIX ### bool "minix filesystem" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_MSDOS ### bool "msdos filesystem" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_NVIDIARAID ### bool "nvidia raid" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_PROMISERAID ### bool "promise raid" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_SILICONRAID ### bool "silicon raid" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_UFS ### bool "ufs filesystem" ### default y ### depends on VOLUMEID +### help +### TODO + + ### config FEATURE_VOLUMEID_VIARAID ### bool "via raid" ### default y ### depends on VOLUMEID +### help +### TODO + + config BUSYBOX_CONFIG_FEATURE_VOLUMEID_XFS bool "xfs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS depends on BUSYBOX_CONFIG_VOLUMEID + help + TODO + endmenu diff --git a/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch b/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch new file mode 100644 index 000000000..f33c3b22e --- /dev/null +++ b/package/utils/busybox/patches/002-libbb-send_to_from-do-not-require-that-to-should-hav.patch @@ -0,0 +1,37 @@ +From 7cef4817d6d6d61a1166ed7dfc13537b95c65970 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Thu, 15 Sep 2016 13:20:51 +0200 +Subject: [PATCH] libbb:/send_to_from: do not require that "to" should have the + same AF. Closes 9146 + +Signed-off-by: Denys Vlasenko +--- + libbb/udp_io.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/libbb/udp_io.c ++++ b/libbb/udp_io.c +@@ -70,7 +70,13 @@ send_to_from(int fd, void *buf, size_t l + msg.msg_flags = flags; + + cmsgptr = CMSG_FIRSTHDR(&msg); +- if (to->sa_family == AF_INET && from->sa_family == AF_INET) { ++ /* ++ * Users report that to->sa_family can be AF_INET6 too, ++ * if "to" was acquired by recv_from_to(). IOW: recv_from_to() ++ * was seen showing IPv6 "from" even when the destination ++ * of received packet (our local address) was IPv4. ++ */ ++ if (/* to->sa_family == AF_INET && */ from->sa_family == AF_INET) { + struct in_pktinfo *pktptr; + cmsgptr->cmsg_level = IPPROTO_IP; + cmsgptr->cmsg_type = IP_PKTINFO; +@@ -86,7 +92,7 @@ send_to_from(int fd, void *buf, size_t l + pktptr->ipi_spec_dst = ((struct sockaddr_in*)from)->sin_addr; + } + # if ENABLE_FEATURE_IPV6 && defined(IPV6_PKTINFO) +- else if (to->sa_family == AF_INET6 && from->sa_family == AF_INET6) { ++ else if (/* to->sa_family == AF_INET6 && */ from->sa_family == AF_INET6) { + struct in6_pktinfo *pktptr; + cmsgptr->cmsg_level = IPPROTO_IPV6; + cmsgptr->cmsg_type = IPV6_PKTINFO; diff --git a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch b/package/utils/busybox/patches/102-trylink_mktemp_fix.patch new file mode 100644 index 000000000..ed1dcbb66 --- /dev/null +++ b/package/utils/busybox/patches/102-trylink_mktemp_fix.patch @@ -0,0 +1,20 @@ +--- a/scripts/trylink ++++ b/scripts/trylink +@@ -46,7 +46,7 @@ try() { + } + + check_cc() { +- local tempname="$(mktemp)" ++ local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)" + local r + echo "int main(int argc,char**argv){return argv?argc:0;}" >"$tempname".c + # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :( +@@ -61,7 +61,7 @@ check_cc() { + } + + check_libc_is_glibc() { +- local tempname="$(mktemp)" ++ local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)" + local r + echo "\ + #include diff --git a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch new file mode 100644 index 000000000..4825bc8a6 --- /dev/null +++ b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch @@ -0,0 +1,12 @@ +--- a/util-linux/mount.c ++++ b/util-linux/mount.c +@@ -237,9 +237,6 @@ + #if ENABLE_FEATURE_MOUNT_NFS + /* This is just a warning of a common mistake. Possibly this should be a + * uclibc faq entry rather than in busybox... */ +-# if defined(__UCLIBC__) && ! defined(__UCLIBC_HAS_RPC__) +-# error "You need to build uClibc with UCLIBC_HAS_RPC for NFS support" +-# endif + # include + # include + # include diff --git a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch index 5f64c19d0..0fdaed502 100644 --- a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch +++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -706,6 +706,7 @@ static int bcast_or_ucast(struct dhcp_pa +@@ -697,6 +697,7 @@ static int bcast_or_ucast(struct dhcp_pa static NOINLINE int send_discover(uint32_t xid, uint32_t requested) { struct dhcp_packet packet; @@ -8,7 +8,7 @@ /* Fill in: op, htype, hlen, cookie, chaddr fields, * random xid field (we override it below), -@@ -723,6 +724,7 @@ static NOINLINE int send_discover(uint32 +@@ -714,6 +715,7 @@ static NOINLINE int send_discover(uint32 */ add_client_options(&packet); diff --git a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch index 727f69409..4a9ae9813 100644 --- a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch +++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1442,6 +1442,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c +@@ -1422,6 +1422,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c /* silence "uninitialized!" warning */ unsigned timestamp_before_wait = timestamp_before_wait; diff --git a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch index 7b77d2970..1e44552c1 100644 --- a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch +++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1112,7 +1112,6 @@ static void perform_renew(void) +@@ -1103,7 +1103,6 @@ static void perform_renew(void) state = RENEW_REQUESTED; break; case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ diff --git a/package/utils/busybox/patches/210-add_netmsg_util.patch b/package/utils/busybox/patches/210-add_netmsg_util.patch index d7b2ae7c4..2382698d0 100644 --- a/package/utils/busybox/patches/210-add_netmsg_util.patch +++ b/package/utils/busybox/patches/210-add_netmsg_util.patch @@ -1,25 +1,46 @@ +--- a/include/applets.src.h ++++ b/include/applets.src.h +@@ -229,6 +229,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO + IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP)) + IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP)) + IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP)) ++IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE)) + IF_NETSTAT(APPLET(netstat, BB_DIR_BIN, BB_SUID_DROP)) + IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP)) + IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP)) +--- a/networking/Config.src ++++ b/networking/Config.src +@@ -639,6 +639,12 @@ config FEATURE_IPCALC_LONG_OPTIONS + help + Support long options for the ipcalc applet. + ++config NETMSG ++ bool "netmsg" ++ default n ++ help ++ simple program for sending udp broadcast messages ++ + config NETSTAT + bool "netstat" + default y +--- a/networking/Kbuild.src ++++ b/networking/Kbuild.src +@@ -27,6 +27,7 @@ lib-$(CONFIG_IP) += ip.o + lib-$(CONFIG_IPCALC) += ipcalc.o + lib-$(CONFIG_NAMEIF) += nameif.o + lib-$(CONFIG_NC) += nc.o ++lib-$(CONFIG_NETMSG) += netmsg.o + lib-$(CONFIG_NETSTAT) += netstat.o + lib-$(CONFIG_NSLOOKUP) += nslookup.o + lib-$(CONFIG_NTPD) += ntpd.o --- /dev/null +++ b/networking/netmsg.c -@@ -0,0 +1,76 @@ +@@ -0,0 +1,65 @@ +/* + * Copyright (C) 2006 Felix Fietkau + * + * This is free software, licensed under the GNU General Public License v2. + */ -+ -+//config:config NETMSG -+//config: bool "netmsg" -+//config: default n -+//config: help -+//config: simple program for sending udp broadcast messages -+ -+//applet:IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE)) -+ -+//kbuild:lib-$(CONFIG_NETMSG) += netmsg.o -+ -+//usage:#define netmsg_trivial_usage NOUSAGE_STR -+//usage:#define netmsg_full_usage "" -+ +#include +#include +#include @@ -29,6 +50,9 @@ +#include +#include "busybox.h" + ++//usage:#define netmsg_trivial_usage NOUSAGE_STR ++//usage:#define netmsg_full_usage "" ++ +#ifndef CONFIG_NETMSG +int main(int argc, char **argv) +#else diff --git a/package/utils/busybox/patches/220-add_lock_util.patch b/package/utils/busybox/patches/220-add_lock_util.patch index 4e46b74f0..c60f5db39 100644 --- a/package/utils/busybox/patches/220-add_lock_util.patch +++ b/package/utils/busybox/patches/220-add_lock_util.patch @@ -1,25 +1,46 @@ +--- a/include/applets.src.h ++++ b/include/applets.src.h +@@ -196,6 +196,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, + IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP)) + IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP)) + IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP)) ++IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP)) + IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) + IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP)) + IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) +--- a/miscutils/Config.src ++++ b/miscutils/Config.src +@@ -375,6 +375,12 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA + help + Enables the 'hdparm -d' option to get/set using_dma flag. + ++config LOCK ++ bool "lock" ++ default n ++ help ++ Small utility for using locks in scripts ++ + config MAKEDEVS + bool "makedevs" + default y +--- a/miscutils/Kbuild.src ++++ b/miscutils/Kbuild.src +@@ -33,6 +33,7 @@ lib-$(CONFIG_LAST) += last.o + endif + + lib-$(CONFIG_LESS) += less.o ++lib-$(CONFIG_LOCK) += lock.o + lib-$(CONFIG_MAKEDEVS) += makedevs.o + lib-$(CONFIG_MAN) += man.o + lib-$(CONFIG_MICROCOM) += microcom.o --- /dev/null +++ b/miscutils/lock.c -@@ -0,0 +1,155 @@ +@@ -0,0 +1,144 @@ +/* + * Copyright (C) 2006 Felix Fietkau + * + * This is free software, licensed under the GNU General Public License v2. + */ -+ -+//config:config LOCK -+//config: bool "lock" -+//config: default n -+//config: help -+//config: Small utility for using locks in scripts -+ -+//applet:IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP)) -+ -+//kbuild:lib-$(CONFIG_LOCK) += lock.o -+ -+//usage:#define lock_trivial_usage NOUSAGE_STR -+//usage:#define lock_full_usage "" -+ +#include +#include +#include @@ -29,6 +50,9 @@ +#include +#include "busybox.h" + ++//usage:#define lock_trivial_usage NOUSAGE_STR ++//usage:#define lock_full_usage "" ++ +static int unlock = 0; +static int shared = 0; +static int waitonly = 0; diff --git a/package/utils/busybox/patches/230-add_nslookup_lede.patch b/package/utils/busybox/patches/230-add_nslookup_lede.patch index 14c0e87b3..976960cf1 100644 --- a/package/utils/busybox/patches/230-add_nslookup_lede.patch +++ b/package/utils/busybox/patches/230-add_nslookup_lede.patch @@ -17,6 +17,8 @@ Signed-off-by: Jo-Philipp Wich 2 files changed, 921 insertions(+) create mode 100644 networking/nslookup_lede.c +diff --git a/Makefile.flags b/Makefile.flags +index 65021de25..096ab7756 100644 --- a/Makefile.flags +++ b/Makefile.flags @@ -134,6 +134,12 @@ else @@ -32,6 +34,9 @@ Signed-off-by: Jo-Philipp Wich # libpam may use libpthread, libdl and/or libaudit. # On some platforms that requires an explicit -lpthread, -ldl, -laudit. # However, on *other platforms* it fails when some of those flags +diff --git a/networking/nslookup_lede.c b/networking/nslookup_lede.c +new file mode 100644 +index 000000000..c6c90ddf3 --- /dev/null +++ b/networking/nslookup_lede.c @@ -0,0 +1,915 @@ @@ -53,23 +58,23 @@ Signed-off-by: Jo-Philipp Wich + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + -+//config:config NSLOOKUP_OPENWRT -+//config: bool "nslookup_openwrt" ++//config:config NSLOOKUP_LEDE ++//config: bool "nslookup_lede" +//config: depends on !NSLOOKUP +//config: default y +//config: help +//config: nslookup is a tool to query Internet name servers (LEDE flavor). +//config: -+//config:config FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS ++//config:config FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS +//config: bool "Enable long options" +//config: default y -+//config: depends on NSLOOKUP_OPENWRT && LONG_OPTS ++//config: depends on NSLOOKUP_LEDE && LONG_OPTS +//config: help +//config: Support long options for the nslookup applet. + -+//applet:IF_NSLOOKUP_OPENWRT(APPLET(nslookup, BB_DIR_USR_BIN, BB_SUID_DROP)) ++//applet:IF_NSLOOKUP_LEDE(APPLET(nslookup, BB_DIR_USR_BIN, BB_SUID_DROP)) + -+//kbuild:lib-$(CONFIG_NSLOOKUP_OPENWRT) += nslookup_lede.o ++//kbuild:lib-$(CONFIG_NSLOOKUP_LEDE) += nslookup_lede.o + +//usage:#define nslookup_lede_trivial_usage +//usage: "[HOST] [SERVER]" @@ -753,7 +758,7 @@ Signed-off-by: Jo-Philipp Wich +} + + -+#if ENABLE_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS ++#if ENABLE_FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS +static const char nslookup_longopts[] ALIGN1 = + "type\0" Required_argument "q" + "querytype\0" Required_argument "q" @@ -778,7 +783,7 @@ Signed-off-by: Jo-Philipp Wich + unsigned int types = 0; + HEADER *header; + -+#if ENABLE_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS ++#if ENABLE_FEATURE_NSLOOKUP_LEDE_LONG_OPTIONS + applet_long_options = nslookup_longopts; +#endif + @@ -950,3 +955,6 @@ Signed-off-by: Jo-Philipp Wich + + return rc; +} +-- +2.11.0 + diff --git a/package/utils/busybox/patches/240-telnetd_intr.patch b/package/utils/busybox/patches/240-telnetd_intr.patch index fec2a3a5d..d52ea3fcc 100644 --- a/package/utils/busybox/patches/240-telnetd_intr.patch +++ b/package/utils/busybox/patches/240-telnetd_intr.patch @@ -1,6 +1,6 @@ --- a/networking/telnetd.c +++ b/networking/telnetd.c -@@ -497,6 +497,7 @@ make_new_session( +@@ -333,6 +333,7 @@ make_new_session( /* Restore default signal handling ASAP */ bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL); diff --git a/package/utils/busybox/patches/250-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch index 476440f62..b2681a17f 100644 --- a/package/utils/busybox/patches/250-date-k-flag.patch +++ b/package/utils/busybox/patches/250-date-k-flag.patch @@ -1,6 +1,6 @@ --- a/coreutils/date.c +++ b/coreutils/date.c -@@ -122,6 +122,7 @@ +@@ -123,6 +123,7 @@ //usage: IF_FEATURE_DATE_ISOFMT( //usage: "\n -D FMT Use FMT for -d TIME conversion" //usage: ) @@ -8,7 +8,7 @@ //usage: "\n" //usage: "\nRecognized TIME formats:" //usage: "\n hh:mm[:ss]" -@@ -138,9 +139,8 @@ +@@ -139,9 +140,8 @@ #include "libbb.h" #include "common_bufsiz.h" @@ -20,7 +20,7 @@ enum { OPT_RFC2822 = (1 << 0), /* R */ -@@ -148,8 +148,9 @@ enum { +@@ -149,8 +149,9 @@ enum { OPT_UTC = (1 << 2), /* u */ OPT_DATE = (1 << 3), /* d */ OPT_REFERENCE = (1 << 4), /* r */ @@ -32,7 +32,7 @@ }; static void maybe_set_utc(int opt) -@@ -167,12 +168,15 @@ static const char date_longopts[] ALIGN1 +@@ -168,12 +169,15 @@ static const char date_longopts[] ALIGN1 /* "universal\0" No_argument "u" */ "date\0" Required_argument "d" "reference\0" Required_argument "r" @@ -48,7 +48,7 @@ struct timespec ts; struct tm tm_time; char buf_fmt_dt2str[64]; -@@ -187,7 +191,7 @@ int date_main(int argc UNUSED_PARAM, cha +@@ -188,7 +192,7 @@ int date_main(int argc UNUSED_PARAM, cha opt_complementary = "d--s:s--d" IF_FEATURE_DATE_ISOFMT(":R--I:I--R"); IF_LONG_OPTS(applet_long_options = date_longopts;) @@ -57,7 +57,7 @@ IF_FEATURE_DATE_ISOFMT("I::D:"), &date_str, &date_str, &filename IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt)); -@@ -244,6 +248,31 @@ int date_main(int argc UNUSED_PARAM, cha +@@ -245,6 +249,31 @@ int date_main(int argc UNUSED_PARAM, cha if (*argv) bb_show_usage(); diff --git a/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch b/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch index ca76c44cc..360324bf7 100644 --- a/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch +++ b/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch @@ -1,6 +1,6 @@ --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c -@@ -598,7 +598,7 @@ static int do_add_or_delete(char **argv, +@@ -470,7 +470,7 @@ static int do_add_or_delete(char **argv, } xrtnl_open(&rth); ll_init_map(&rth); diff --git a/package/utils/busybox/patches/302-ip-rule-add-suppress-prefixlength.patch b/package/utils/busybox/patches/302-ip-rule-add-suppress-prefixlength.patch new file mode 100644 index 000000000..7b4797505 --- /dev/null +++ b/package/utils/busybox/patches/302-ip-rule-add-suppress-prefixlength.patch @@ -0,0 +1,145 @@ +From dbac30c3784c267bbe44a2a3ebed4e827c8fe82a Mon Sep 17 00:00:00 2001 +From: Stefan Tomanek +Date: Tue, 13 Jun 2017 19:06:09 +0200 +Subject: [PATCH] ip rule: add suppress_{prefixlength,ifgroup} options + +(cherry-picked from 192dce4b84fb32346ebc5194de7daa5da3b8d1b4) + +function old new delta +iprule_modify 816 887 +71 +print_rule 610 680 +70 +------------------------------------------------------------------------------ +(add/remove: 0/0 grow/shrink: 2/0 up/down: 141/0) Total: 141 bytes + +Signed-off-by: Stefan Tomanek +Signed-off-by: Denys Vlasenko +--- + networking/libiproute/iprule.c | 73 ++++++++++++++++++++++++++---------------- + 1 file changed, 46 insertions(+), 27 deletions(-) + +--- a/networking/libiproute/iprule.c ++++ b/networking/libiproute/iprule.c +@@ -17,25 +17,32 @@ + #include + #include + ++/* from : */ ++#define FRA_SUPPRESS_IFGROUP 13 ++#define FRA_SUPPRESS_PREFIXLEN 14 ++ + #include "ip_common.h" /* #include "libbb.h" is inside */ + #include "rt_names.h" + #include "utils.h" + +-/* +-static void usage(void) __attribute__((noreturn)); +- +-static void usage(void) +-{ +- fprintf(stderr, "Usage: ip rule [ list | add | del ] SELECTOR ACTION\n"); +- fprintf(stderr, "SELECTOR := [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark FWMARK ]\n"); +- fprintf(stderr, " [ dev STRING ] [ pref NUMBER ]\n"); +- fprintf(stderr, "ACTION := [ table TABLE_ID ] [ nat ADDRESS ]\n"); +- fprintf(stderr, " [ prohibit | reject | unreachable ]\n"); +- fprintf(stderr, " [ realms [SRCREALM/]DSTREALM ]\n"); +- fprintf(stderr, "TABLE_ID := [ local | main | default | NUMBER ]\n"); +- exit(-1); +-} +-*/ ++/* If you add stuff here, update iprule_full_usage */ ++static const char keywords[] ALIGN1 = ++ "from\0""to\0""preference\0""order\0""priority\0" ++ "tos\0""fwmark\0""realms\0""table\0""lookup\0" ++ "suppress_prefixlength\0""suppress_ifgroup\0" ++ "dev\0""iif\0""nat\0""map-to\0""type\0""help\0" ++ ; ++#define keyword_preference (keywords + sizeof("from") + sizeof("to")) ++#define keyword_fwmark (keyword_preference + sizeof("preference") + sizeof("order") + sizeof("priority") + sizeof("tos")) ++#define keyword_realms (keyword_fwmark + sizeof("fwmark")) ++#define keyword_suppress_prefixlength (keyword_realms + sizeof("realms") + sizeof("table") + sizeof("lookup")) ++#define keyword_suppress_ifgroup (keyword_suppress_prefixlength + sizeof("suppress_prefixlength")) ++enum { ++ ARG_from = 1, ARG_to, ARG_preference, ARG_order, ARG_priority, ++ ARG_tos, ARG_fwmark, ARG_realms, ARG_table, ARG_lookup, ++ ARG_suppress_prefixlength, ARG_suppress_ifgroup, ++ ARG_dev, ARG_iif, ARG_nat, ARG_map_to, ARG_type, ARG_help, ++}; + + static int FAST_FUNC print_rule(const struct sockaddr_nl *who UNUSED_PARAM, + struct nlmsghdr *n, void *arg UNUSED_PARAM) +@@ -119,6 +126,17 @@ static int FAST_FUNC print_rule(const st + else if (r->rtm_table) + printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table)); + ++ if (tb[FRA_SUPPRESS_PREFIXLEN]) { ++ int pl = *(uint32_t*)RTA_DATA(tb[FRA_SUPPRESS_PREFIXLEN]); ++ if (pl != -1) ++ printf("%s %d ", keyword_suppress_prefixlength, pl); ++ } ++ if (tb[FRA_SUPPRESS_IFGROUP]) { ++ int grp = *(uint32_t*)RTA_DATA(tb[FRA_SUPPRESS_IFGROUP]); ++ if (grp != -1) ++ printf("%s %d ", keyword_suppress_ifgroup, grp); ++ } ++ + if (tb[RTA_FLOW]) { + uint32_t to = *(uint32_t*)RTA_DATA(tb[RTA_FLOW]); + uint32_t from = to>>16; +@@ -174,15 +192,6 @@ static int iprule_list(char **argv) + /* Return value becomes exitcode. It's okay to not return at all */ + static int iprule_modify(int cmd, char **argv) + { +- static const char keywords[] ALIGN1 = +- "from\0""to\0""preference\0""order\0""priority\0" +- "tos\0""fwmark\0""realms\0""table\0""lookup\0""dev\0" +- "iif\0""nat\0""map-to\0""type\0""help\0"; +- enum { +- ARG_from = 1, ARG_to, ARG_preference, ARG_order, ARG_priority, +- ARG_tos, ARG_fwmark, ARG_realms, ARG_table, ARG_lookup, ARG_dev, +- ARG_iif, ARG_nat, ARG_map_to, ARG_type, ARG_help +- }; + bool table_ok = 0; + struct rtnl_handle rth; + struct { +@@ -232,7 +241,7 @@ static int iprule_modify(int cmd, char * + ) { + uint32_t pref; + NEXT_ARG(); +- pref = get_u32(*argv, "preference"); ++ pref = get_u32(*argv, keyword_preference); + addattr32(&req.n, sizeof(req), RTA_PRIORITY, pref); + } else if (key == ARG_tos) { + uint32_t tos; +@@ -243,13 +252,13 @@ static int iprule_modify(int cmd, char * + } else if (key == ARG_fwmark) { + uint32_t fwmark; + NEXT_ARG(); +- fwmark = get_u32(*argv, "fwmark"); ++ fwmark = get_u32(*argv, keyword_fwmark); + addattr32(&req.n, sizeof(req), RTA_PROTOINFO, fwmark); + } else if (key == ARG_realms) { + uint32_t realm; + NEXT_ARG(); + if (get_rt_realms(&realm, *argv)) +- invarg_1_to_2(*argv, "realms"); ++ invarg_1_to_2(*argv, keyword_realms); + addattr32(&req.n, sizeof(req), RTA_FLOW, realm); + } else if (key == ARG_table || + key == ARG_lookup +@@ -265,6 +274,16 @@ static int iprule_modify(int cmd, char * + addattr32(&req.n, sizeof(req), RTA_TABLE, tid); + } + table_ok = 1; ++ } else if (key == ARG_suppress_prefixlength) { ++ int prefix_length; ++ NEXT_ARG(); ++ prefix_length = get_u32(*argv, keyword_suppress_prefixlength); ++ addattr32(&req.n, sizeof(req), FRA_SUPPRESS_PREFIXLEN, prefix_length); ++ } else if (key == ARG_suppress_ifgroup) { ++ int grp; ++ NEXT_ARG(); ++ grp = get_u32(*argv, keyword_suppress_ifgroup); ++ addattr32(&req.n, sizeof(req), FRA_SUPPRESS_IFGROUP, grp); + } else if (key == ARG_dev || + key == ARG_iif + ) { diff --git a/package/utils/busybox/patches/302-netlink-alignment.patch b/package/utils/busybox/patches/302-netlink-alignment.patch new file mode 100644 index 000000000..4cd25b187 --- /dev/null +++ b/package/utils/busybox/patches/302-netlink-alignment.patch @@ -0,0 +1,100 @@ +From a843f09a4d4428cf11ca02307e60058251b05743 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Fri, 16 Sep 2016 21:52:03 +0200 +Subject: [PATCH] libnetlink: fix alignment of netlink messages + +An padding to align a message should not only be added between +different attributes of a netlink message, but also at the end of the +message to pad it to the correct size. + +Without this patch the following command does not work and returns an +error code: +ip link add type nlmon + +Without this ip from busybox sends this: +sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=45, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1474057401, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon"}, iov_len=45}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 45 +return value: 2 + +The normal ip utile from iproute2 sends this: +sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716938, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48 +return value: 0 + +With this patch ip from busybox sends this: +sendmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=48, type=0x10 /* NLMSG_??? */, flags=NLM_F_REQUEST|NLM_F_ACK|0x600, seq=1473716908, pid=0}, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\22\0\t\0\1nlmon\0\0\0"}, iov_len=48}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 48 +return value: 0 + +Signed-off-by: Hauke Mehrtens +--- + networking/libiproute/libnetlink.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/networking/libiproute/libnetlink.c ++++ b/networking/libiproute/libnetlink.c +@@ -338,14 +338,14 @@ int FAST_FUNC addattr32(struct nlmsghdr + int len = RTA_LENGTH(4); + struct rtattr *rta; + +- if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) { ++ if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) { + return -1; + } + rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); + rta->rta_type = type; + rta->rta_len = len; + move_to_unaligned32(RTA_DATA(rta), data); +- n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len; ++ n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len); + return 0; + } + +@@ -354,14 +354,14 @@ int FAST_FUNC addattr_l(struct nlmsghdr + int len = RTA_LENGTH(alen); + struct rtattr *rta; + +- if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) { ++ if ((int)(NLMSG_ALIGN(n->nlmsg_len + len)) > maxlen) { + return -1; + } + rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); + rta->rta_type = type; + rta->rta_len = len; + memcpy(RTA_DATA(rta), data, alen); +- n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len; ++ n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len + len); + return 0; + } + +@@ -370,14 +370,14 @@ int FAST_FUNC rta_addattr32(struct rtatt + int len = RTA_LENGTH(4); + struct rtattr *subrta; + +- if (RTA_ALIGN(rta->rta_len) + len > maxlen) { ++ if (RTA_ALIGN(rta->rta_len + len) > maxlen) { + return -1; + } + subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len)); + subrta->rta_type = type; + subrta->rta_len = len; + move_to_unaligned32(RTA_DATA(subrta), data); +- rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len; ++ rta->rta_len = NLMSG_ALIGN(rta->rta_len + len); + return 0; + } + +@@ -386,14 +386,14 @@ int FAST_FUNC rta_addattr_l(struct rtatt + struct rtattr *subrta; + int len = RTA_LENGTH(alen); + +- if (RTA_ALIGN(rta->rta_len) + len > maxlen) { ++ if (RTA_ALIGN(rta->rta_len + len) > maxlen) { + return -1; + } + subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len)); + subrta->rta_type = type; + subrta->rta_len = len; + memcpy(RTA_DATA(subrta), data, alen); +- rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len; ++ rta->rta_len = NLMSG_ALIGN(rta->rta_len + len); + return 0; + } + diff --git a/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch b/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch new file mode 100644 index 000000000..d7a38f632 --- /dev/null +++ b/package/utils/busybox/patches/303-ip-route-fix-high-table-ids.patch @@ -0,0 +1,486 @@ +From 485fcc89b99eae9cc7501eaff344b104e52ab7bf Mon Sep 17 00:00:00 2001 +From: Jo-Philipp Wich +Date: Mon, 26 Sep 2016 17:48:22 +0200 +Subject: [PATCH] iproute: properly support high routing table IDs + +The Linux kernel uses two distinct fields to denote the routing table ID in +use by network routes; the 8 bit `rtm_table` member of `struct rtmsg` and the +32 bit `RTA_TABLE` netlink attribute. + +If a routing table ID is larger than 255, the `RT_TABLE` attribute must be used +and the `rtm_table` field has to be set to the special `RT_TABLE_UNSPEC` value. + +This commit ... + - switches the *_n2a() and *_a2n() functions of rt_names.c to use dynamically + sized, name-sorted arrays instead of fixed arrays limited to 1024 slots in + order to support IDs up to 65535 + - adds proper handling of high table IDs to iprule.c and iproute.c when + adding, removing and dumping ip rules and network routes + +After this change, the Busybox ip applet fully supports IP rules with high ID +numbers, using the same logic as the full iproute2. + +Signed-off-by: Jo-Philipp Wich +--- + networking/libiproute/iproute.c | 75 ++++++++------ + networking/libiproute/iprule.c | 4 +- + networking/libiproute/rt_names.c | 204 +++++++++++++++++++++++---------------- + 3 files changed, 169 insertions(+), 114 deletions(-) + +--- a/networking/libiproute/iproute.c ++++ b/networking/libiproute/iproute.c +@@ -66,6 +66,7 @@ static int FAST_FUNC print_route(const s + inet_prefix dst; + inet_prefix src; + int host_len = -1; ++ uint32_t rtable; + + if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) { + fprintf(stderr, "Not a route: %08x %08x %08x\n", +@@ -83,34 +84,6 @@ static int FAST_FUNC print_route(const s + else if (r->rtm_family == AF_INET) + host_len = 32; + +- if (r->rtm_family == AF_INET6) { +- if (G_filter.tb) { +- if (G_filter.tb < 0) { +- if (!(r->rtm_flags & RTM_F_CLONED)) { +- return 0; +- } +- } else { +- if (r->rtm_flags & RTM_F_CLONED) { +- return 0; +- } +- if (G_filter.tb == RT_TABLE_LOCAL) { +- if (r->rtm_type != RTN_LOCAL) { +- return 0; +- } +- } else if (G_filter.tb == RT_TABLE_MAIN) { +- if (r->rtm_type == RTN_LOCAL) { +- return 0; +- } +- } else { +- return 0; +- } +- } +- } +- } else { +- if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) { +- return 0; +- } +- } + if (G_filter.rdst.family + && (r->rtm_family != G_filter.rdst.family || G_filter.rdst.bitlen > r->rtm_dst_len) + ) { +@@ -141,6 +114,37 @@ static int FAST_FUNC print_route(const s + memset(&dst, 0, sizeof(dst)); + parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len); + ++ rtable = tb[RTA_TABLE] ? *(uint32_t*)RTA_DATA(tb[RTA_TABLE]) : r->rtm_table; ++ ++ if (G_filter.tb) { ++ if (r->rtm_family == AF_INET6) { ++ if (G_filter.tb < 0) { ++ if (!(r->rtm_flags & RTM_F_CLONED)) { ++ return 0; ++ } ++ } else { ++ if (r->rtm_flags & RTM_F_CLONED) { ++ return 0; ++ } ++ if (G_filter.tb == RT_TABLE_LOCAL) { ++ if (r->rtm_type != RTN_LOCAL) { ++ return 0; ++ } ++ } else if (G_filter.tb == RT_TABLE_MAIN) { ++ if (r->rtm_type == RTN_LOCAL) { ++ return 0; ++ } ++ } else if (G_filter.tb != rtable) { ++ return 0; ++ } ++ } ++ } else { ++ if (G_filter.tb != rtable) { ++ return 0; ++ } ++ } ++ } ++ + if (tb[RTA_SRC]) { + src.bitlen = r->rtm_src_len; + src.bytelen = (r->rtm_family == AF_INET6 ? 16 : 4); +@@ -349,7 +353,9 @@ IF_FEATURE_IP_RULE(ARG_table,) + smalluint ok = 0; + smalluint scope_ok = 0; + int arg; +- ++#if ENABLE_FEATURE_IP_RULE ++ uint32_t rtable = 0; ++#endif + memset(&req, 0, sizeof(req)); + + req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg)); +@@ -419,7 +425,7 @@ IF_FEATURE_IP_RULE(ARG_table,) + NEXT_ARG(); + if (rtnl_rttable_a2n(&tid, *argv)) + invarg_1_to_2(*argv, "table"); +- req.r.rtm_table = tid; ++ rtable = tid; + #endif + } else if (arg == ARG_dev || arg == ARG_oif) { + NEXT_ARG(); +@@ -475,6 +481,15 @@ IF_FEATURE_IP_RULE(ARG_table,) + } + } + ++#if ENABLE_FEATURE_IP_RULE ++ if (rtable >= 256) { ++ addattr32(&req.n, sizeof(req), RTA_TABLE, rtable); ++ req.r.rtm_table = RT_TABLE_UNSPEC; ++ } else if (rtable > 0) { ++ req.r.rtm_table = rtable; ++ } ++#endif ++ + if (mxrta->rta_len > RTA_LENGTH(0)) { + if (mxlock) { + rta_addattr32(mxrta, sizeof(mxbuf), RTAX_LOCK, mxlock); +--- a/networking/libiproute/iprule.c ++++ b/networking/libiproute/iprule.c +@@ -114,7 +114,9 @@ static int FAST_FUNC print_rule(const st + printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF])); + } + +- if (r->rtm_table) ++ if (tb[RTA_TABLE]) ++ printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE]))); ++ else if (r->rtm_table) + printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table)); + + if (tb[RTA_FLOW]) { +--- a/networking/libiproute/rt_names.c ++++ b/networking/libiproute/rt_names.c +@@ -11,21 +11,26 @@ + #include "rt_names.h" + + #define CONFDIR CONFIG_FEATURE_IP_ROUTE_DIR ++#define RT_TABLE_MAX 65535 ++ ++struct rtnl_tab_entry { ++ unsigned int id; ++ const char *name; ++}; + + typedef struct rtnl_tab_t { +- const char *cached_str; +- unsigned cached_result; +- /* upstream version switched to a hash table and removed +- * id < 256 limit. For now bbox bumps this array size from 256 +- * to 1024. If you plan to change this to a hash table, +- * consider merging several hash tables we have (for example, +- * awk has resizable one! +- */ +-#define RT_TABLE_MAX 1023 +- const char *tab[RT_TABLE_MAX+1]; ++ struct rtnl_tab_entry *tab; ++ size_t length; + } rtnl_tab_t; + +-static void rtnl_tab_initialize(const char *file, const char **tab) ++static int tabcmp(const void *p1, const void *p2) ++{ ++ const struct rtnl_tab_entry *e1 = p1; ++ const struct rtnl_tab_entry *e2 = p2; ++ return strcmp(e1->name, e2->name); ++} ++ ++static void rtnl_tab_initialize(const char *file, rtnl_tab_t *tab) + { + char *token[2]; + char fullname[sizeof(CONFDIR"/rt_dsfield") + 8]; +@@ -40,34 +45,42 @@ static void rtnl_tab_initialize(const ch + file, parser->lineno); + break; + } +- tab[id] = xstrdup(token[1]); ++ ++ tab->tab = xrealloc(tab->tab, (tab->length + 1) * sizeof(*tab->tab)); ++ tab->tab[tab->length].id = id; ++ tab->tab[tab->length].name = xstrdup(token[1]); ++ tab->length++; + } + config_close(parser); ++ qsort(tab->tab, tab->length, sizeof(*tab->tab), tabcmp); + } + + static int rtnl_a2n(rtnl_tab_t *tab, uint32_t *id, const char *arg, int base) + { +- unsigned i; +- +- if (tab->cached_str && strcmp(tab->cached_str, arg) == 0) { +- *id = tab->cached_result; +- return 0; +- } ++ int delta; ++ ssize_t l = 0; ++ ssize_t r = tab->length - 1; ++ ssize_t m; ++ uint32_t i; ++ ++ while (l <= r) { ++ m = l + (r - l) / 2; ++ delta = strcmp(tab->tab[m].name, arg); + +- for (i = 0; i <= RT_TABLE_MAX; i++) { +- if (tab->tab[i] +- && strcmp(tab->tab[i], arg) == 0 +- ) { +- tab->cached_str = tab->tab[i]; +- tab->cached_result = i; +- *id = i; ++ if (delta == 0) { ++ *id = tab->tab[m].id; + return 0; ++ } else if (delta < 0) { ++ l = m + 1; ++ } else { ++ r = m - 1; + } + } + + i = bb_strtou(arg, NULL, base); + if (i > RT_TABLE_MAX) + return -1; ++ + *id = i; + return 0; + } +@@ -77,40 +90,39 @@ static rtnl_tab_t *rtnl_rtprot_tab; + + static void rtnl_rtprot_initialize(void) + { +- static const char *const init_tab[] = { +- "none", +- "redirect", +- "kernel", +- "boot", +- "static", +- NULL, +- NULL, +- NULL, +- "gated", +- "ra", +- "mrt", +- "zebra", +- "bird", ++ static const struct rtnl_tab_entry init_tab[] = { ++ { 0, "none" }, ++ { 1, "redirect" }, ++ { 2, "kernel" }, ++ { 3, "boot" }, ++ { 4, "static" }, ++ { 8, "gated" }, ++ { 9, "ra" }, ++ { 10, "mrt" }, ++ { 11, "zebra" }, ++ { 12, "bird" } + }; + + if (rtnl_rtprot_tab) + return; + rtnl_rtprot_tab = xzalloc(sizeof(*rtnl_rtprot_tab)); ++ rtnl_rtprot_tab->tab = xzalloc(sizeof(init_tab)); ++ rtnl_rtprot_tab->length = sizeof(init_tab) / sizeof(init_tab[0]); + memcpy(rtnl_rtprot_tab->tab, init_tab, sizeof(init_tab)); +- rtnl_tab_initialize("protos", rtnl_rtprot_tab->tab); ++ rtnl_tab_initialize("protos", rtnl_rtprot_tab); + } + + #if 0 /* UNUSED */ + const char* FAST_FUNC rtnl_rtprot_n2a(int id) + { +- if (id < 0 || id > RT_TABLE_MAX) { +- return itoa(id); +- } ++ size_t i; + + rtnl_rtprot_initialize(); + +- if (rtnl_rtprot_tab->tab[id]) +- return rtnl_rtprot_tab->tab[id]; ++ for (i = 0; i < rtnl_rtprot_tab->length; i++) ++ if (rtnl_rtprot_tab->tab[i].id == id) ++ return rtnl_rtprot_tab->tab[i].name; ++ + return itoa(id); + } + #endif +@@ -126,27 +138,33 @@ static rtnl_tab_t *rtnl_rtscope_tab; + + static void rtnl_rtscope_initialize(void) + { ++ static const struct rtnl_tab_entry init_tab[] = { ++ { 0, "global" }, ++ { 200, "site" }, ++ { 253, "link" }, ++ { 254, "host" }, ++ { 255, "nowhere" } ++ }; ++ + if (rtnl_rtscope_tab) + return; + rtnl_rtscope_tab = xzalloc(sizeof(*rtnl_rtscope_tab)); +- rtnl_rtscope_tab->tab[0] = "global"; +- rtnl_rtscope_tab->tab[255] = "nowhere"; +- rtnl_rtscope_tab->tab[254] = "host"; +- rtnl_rtscope_tab->tab[253] = "link"; +- rtnl_rtscope_tab->tab[200] = "site"; +- rtnl_tab_initialize("scopes", rtnl_rtscope_tab->tab); ++ rtnl_rtscope_tab->tab = xzalloc(sizeof(init_tab)); ++ rtnl_rtscope_tab->length = sizeof(init_tab) / sizeof(init_tab[0]); ++ memcpy(rtnl_rtscope_tab->tab, init_tab, sizeof(init_tab)); ++ rtnl_tab_initialize("scopes", rtnl_rtscope_tab); + } + + const char* FAST_FUNC rtnl_rtscope_n2a(int id) + { +- if (id < 0 || id > RT_TABLE_MAX) { +- return itoa(id); +- } ++ size_t i; + + rtnl_rtscope_initialize(); + +- if (rtnl_rtscope_tab->tab[id]) +- return rtnl_rtscope_tab->tab[id]; ++ for (i = 0; i < rtnl_rtscope_tab->length; i++) ++ if (rtnl_rtscope_tab->tab[i].id == id) ++ return rtnl_rtscope_tab->tab[i].name; ++ + return itoa(id); + } + +@@ -161,10 +179,17 @@ static rtnl_tab_t *rtnl_rtrealm_tab; + + static void rtnl_rtrealm_initialize(void) + { +- if (rtnl_rtrealm_tab) return; ++ static const struct rtnl_tab_entry init_tab[] = { ++ { 0, "unknown" } ++ }; ++ ++ if (rtnl_rtrealm_tab) ++ return; + rtnl_rtrealm_tab = xzalloc(sizeof(*rtnl_rtrealm_tab)); +- rtnl_rtrealm_tab->tab[0] = "unknown"; +- rtnl_tab_initialize("realms", rtnl_rtrealm_tab->tab); ++ rtnl_rtrealm_tab->tab = xzalloc(sizeof(init_tab)); ++ rtnl_rtrealm_tab->length = sizeof(init_tab) / sizeof(init_tab[0]); ++ memcpy(rtnl_rtrealm_tab->tab, init_tab, sizeof(init_tab)); ++ rtnl_tab_initialize("realms", rtnl_rtrealm_tab); + } + + int FAST_FUNC rtnl_rtrealm_a2n(uint32_t *id, char *arg) +@@ -176,14 +201,14 @@ int FAST_FUNC rtnl_rtrealm_a2n(uint32_t + #if ENABLE_FEATURE_IP_RULE + const char* FAST_FUNC rtnl_rtrealm_n2a(int id) + { +- if (id < 0 || id > RT_TABLE_MAX) { +- return itoa(id); +- } ++ size_t i; + + rtnl_rtrealm_initialize(); + +- if (rtnl_rtrealm_tab->tab[id]) +- return rtnl_rtrealm_tab->tab[id]; ++ for (i = 0; i < rtnl_rtrealm_tab->length; i++) ++ if (rtnl_rtrealm_tab->tab[i].id == id) ++ return rtnl_rtrealm_tab->tab[i].name; ++ + return itoa(id); + } + #endif +@@ -193,22 +218,29 @@ static rtnl_tab_t *rtnl_rtdsfield_tab; + + static void rtnl_rtdsfield_initialize(void) + { +- if (rtnl_rtdsfield_tab) return; ++ static const struct rtnl_tab_entry init_tab[] = { ++ { 0, "0" } ++ }; ++ ++ if (rtnl_rtdsfield_tab) ++ return; + rtnl_rtdsfield_tab = xzalloc(sizeof(*rtnl_rtdsfield_tab)); +- rtnl_rtdsfield_tab->tab[0] = "0"; +- rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab->tab); ++ rtnl_rtdsfield_tab->tab = xzalloc(sizeof(init_tab)); ++ rtnl_rtdsfield_tab->length = sizeof(init_tab) / sizeof(init_tab[0]); ++ memcpy(rtnl_rtdsfield_tab->tab, init_tab, sizeof(init_tab)); ++ rtnl_tab_initialize("dsfield", rtnl_rtdsfield_tab); + } + + const char* FAST_FUNC rtnl_dsfield_n2a(int id) + { +- if (id < 0 || id > RT_TABLE_MAX) { +- return itoa(id); +- } ++ size_t i; + + rtnl_rtdsfield_initialize(); + +- if (rtnl_rtdsfield_tab->tab[id]) +- return rtnl_rtdsfield_tab->tab[id]; ++ for (i = 0; i < rtnl_rtdsfield_tab->length; i++) ++ if (rtnl_rtdsfield_tab->tab[i].id == id) ++ return rtnl_rtdsfield_tab->tab[i].name; ++ + return itoa(id); + } + +@@ -224,27 +256,33 @@ static rtnl_tab_t *rtnl_rttable_tab; + + static void rtnl_rttable_initialize(void) + { ++ static const struct rtnl_tab_entry tab_init[] = { ++ { 0, "unspec" }, ++ { 253, "default" }, ++ { 254, "main" }, ++ { 255, "local" } ++ }; ++ + if (rtnl_rttable_tab) + return; + + rtnl_rttable_tab = xzalloc(sizeof(*rtnl_rttable_tab)); +- rtnl_rttable_tab->tab[0] = "unspec"; +- rtnl_rttable_tab->tab[255] = "local"; +- rtnl_rttable_tab->tab[254] = "main"; +- rtnl_rttable_tab->tab[253] = "default"; +- rtnl_tab_initialize("tables", rtnl_rttable_tab->tab); ++ rtnl_rttable_tab->tab = xzalloc(sizeof(tab_init)); ++ rtnl_rttable_tab->length = sizeof(tab_init) / sizeof(tab_init[0]); ++ memcpy(rtnl_rttable_tab->tab, tab_init, sizeof(tab_init)); ++ rtnl_tab_initialize("tables", rtnl_rttable_tab); + } + + const char* FAST_FUNC rtnl_rttable_n2a(int id) + { +- if (id < 0 || id > RT_TABLE_MAX) { +- return itoa(id); +- } ++ size_t i; + + rtnl_rttable_initialize(); + +- if (rtnl_rttable_tab->tab[id]) +- return rtnl_rttable_tab->tab[id]; ++ for (i = 0; i < rtnl_rttable_tab->length; i++) ++ if (rtnl_rttable_tab->tab[i].id == id) ++ return rtnl_rttable_tab->tab[i].name; ++ + return itoa(id); + } + diff --git a/package/utils/busybox/patches/401-vi-don-t-touch-file-with-x-when-modified_count-0.patch b/package/utils/busybox/patches/401-vi-don-t-touch-file-with-x-when-modified_count-0.patch new file mode 100644 index 000000000..e83999d30 --- /dev/null +++ b/package/utils/busybox/patches/401-vi-don-t-touch-file-with-x-when-modified_count-0.patch @@ -0,0 +1,100 @@ +From e88608eae24ae5934034e1ecb6c494fefbf1b9ae Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Mon, 13 Mar 2017 20:50:42 +0100 +Subject: [PATCH 1/2] vi: don't touch file with :x when modified_count == 0 + +Along with it, there are other changes + + - Check for uppercase X is removed as the expression will be always false and + :X itself is another totally different command in standard vim + - The status line will show number of written lines instead of lines requested + by the colon command. This is also how the standard vim is doing, though + the difference is that '!' has to be explicitly specified in vim to allow + partial writes + +Signed-off-by: Yousong Zhou +Signed-off-by: Denys Vlasenko +--- + editors/vi.c | 43 ++++++++++++++++++++++++++----------------- + 1 file changed, 26 insertions(+), 17 deletions(-) + +--- a/editors/vi.c ++++ b/editors/vi.c +@@ -1038,7 +1038,9 @@ static void colon(char *buf) + || strncmp(p, "wn", cnt) == 0 + || (p[0] == 'x' && !p[1]) + ) { +- cnt = file_write(current_filename, text, end - 1); ++ if (modified_count != 0 || p[0] != 'x') { ++ cnt = file_write(current_filename, text, end - 1); ++ } + if (cnt < 0) { + if (cnt == -1) + status_line_bold("Write error: %s", strerror(errno)); +@@ -1049,8 +1051,9 @@ static void colon(char *buf) + current_filename, + count_lines(text, end - 1), cnt + ); +- if (p[0] == 'x' || p[1] == 'q' || p[1] == 'n' +- || p[0] == 'X' || p[1] == 'Q' || p[1] == 'N' ++ if (p[0] == 'x' ++ || p[1] == 'q' || p[1] == 'n' ++ || p[1] == 'Q' || p[1] == 'N' + ) { + editing = 0; + } +@@ -1480,16 +1483,19 @@ static void colon(char *buf) + goto ret; + } + #endif +- // how many lines in text[]? +- li = count_lines(q, r); +- size = r - q + 1; + //if (useforce) { + // if "fn" is not write-able, chmod u+w + // sprintf(syscmd, "chmod u+w %s", fn); + // system(syscmd); + // forced = TRUE; + //} +- l = file_write(fn, q, r); ++ if (modified_count != 0 || cmd[0] != 'x') { ++ size = r - q + 1; ++ l = file_write(fn, q, r); ++ } else { ++ size = 0; ++ l = 0; ++ } + //if (useforce && forced) { + // chmod u-w + // sprintf(syscmd, "chmod u-w %s", fn); +@@ -1500,17 +1506,20 @@ static void colon(char *buf) + if (l == -1) + status_line_bold_errno(fn); + } else { ++ // how many lines written ++ li = count_lines(q, q + l - 1); + status_line("'%s' %dL, %dC", fn, li, l); +- if (q == text && r == end - 1 && l == size) { +- modified_count = 0; +- last_modified_count = -1; +- } +- if ((cmd[0] == 'x' || cmd[1] == 'q' || cmd[1] == 'n' +- || cmd[0] == 'X' || cmd[1] == 'Q' || cmd[1] == 'N' +- ) +- && l == size +- ) { +- editing = 0; ++ if (l == size) { ++ if (q == text && q + l == end) { ++ modified_count = 0; ++ last_modified_count = -1; ++ } ++ if (cmd[0] == 'x' ++ || cmd[1] == 'q' || cmd[1] == 'n' ++ || cmd[1] == 'Q' || cmd[1] == 'N' ++ ) { ++ editing = 0; ++ } + } + } + #if ENABLE_FEATURE_VI_YANKMARK diff --git a/package/utils/busybox/patches/402-vi-avoid-touching-a-new-file-with-ZZ-when-no-editing.patch b/package/utils/busybox/patches/402-vi-avoid-touching-a-new-file-with-ZZ-when-no-editing.patch new file mode 100644 index 000000000..b56cf735c --- /dev/null +++ b/package/utils/busybox/patches/402-vi-avoid-touching-a-new-file-with-ZZ-when-no-editing.patch @@ -0,0 +1,53 @@ +From 8f3bf4f0d3605b50a8e4c48c89aeabc455f04884 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou +Date: Fri, 24 Mar 2017 21:13:10 +0100 +Subject: [PATCH 2/2] vi: avoid touching a new file with ZZ when no editing has + been done + +This is the behaviour observed with standard vim and busybox vi of at +least 1.22.1. It was changed with commit "32afd3a vi: some +simplifications" which happened before 1.23.0. + +Mistyping filename on command line happens fairly often and it's better +we restore the old behaviour to avoid a few unnecessary flash writes and +sometimes efforts of debugging bugs caused by those unneeded stray +files. + +Signed-off-by: Yousong Zhou +Signed-off-by: Denys Vlasenko +--- + editors/vi.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/editors/vi.c ++++ b/editors/vi.c +@@ -719,14 +719,6 @@ static int init_text_buffer(char *fn) + { + int rc; + +- flush_undo_data(); +- modified_count = 0; +- last_modified_count = -1; +-#if ENABLE_FEATURE_VI_YANKMARK +- /* init the marks */ +- memset(mark, 0, sizeof(mark)); +-#endif +- + /* allocate/reallocate text buffer */ + free(text); + text_size = 10240; +@@ -741,6 +733,14 @@ static int init_text_buffer(char *fn) + // file doesnt exist. Start empty buf with dummy line + char_insert(text, '\n', NO_UNDO); + } ++ ++ flush_undo_data(); ++ modified_count = 0; ++ last_modified_count = -1; ++#if ENABLE_FEATURE_VI_YANKMARK ++ /* init the marks */ ++ memset(mark, 0, sizeof(mark)); ++#endif + return rc; + } + diff --git a/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch b/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch deleted file mode 100644 index 3741e25c3..000000000 --- a/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/networking/traceroute.c -+++ b/networking/traceroute.c -@@ -237,8 +237,8 @@ - //config: depends on TRACEROUTE || TRACEROUTE6 - - /* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore BB_SUID_MAYBE: */ --//applet:IF_TRACEROUTE(APPLET(traceroute, BB_DIR_USR_BIN, BB_SUID_MAYBE)) --//applet:IF_TRACEROUTE6(APPLET(traceroute6, BB_DIR_USR_BIN, BB_SUID_MAYBE)) -+//applet:IF_TRACEROUTE(APPLET(traceroute, BB_DIR_BIN, BB_SUID_MAYBE)) -+//applet:IF_TRACEROUTE6(APPLET(traceroute6, BB_DIR_BIN, BB_SUID_MAYBE)) - - //kbuild:lib-$(CONFIG_TRACEROUTE) += traceroute.o - //kbuild:lib-$(CONFIG_TRACEROUTE6) += traceroute.o diff --git a/package/utils/busybox/patches/510-move-passwd-applet-to-bin.patch b/package/utils/busybox/patches/510-move-passwd-applet-to-bin.patch deleted file mode 100644 index b19d1c9a3..000000000 --- a/package/utils/busybox/patches/510-move-passwd-applet-to-bin.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/loginutils/passwd.c -+++ b/loginutils/passwd.c -@@ -23,7 +23,7 @@ - //config: With this option passwd will refuse new passwords which are "weak". - - //applet:/* Needs to be run by root or be suid root - needs to change /etc/{passwd,shadow}: */ --//applet:IF_PASSWD(APPLET(passwd, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) -+//applet:IF_PASSWD(APPLET(passwd, BB_DIR_BIN, BB_SUID_REQUIRE)) - - //kbuild:lib-$(CONFIG_PASSWD) += passwd.o - diff --git a/package/utils/busybox/patches/600-cve-2017-16544.patch b/package/utils/busybox/patches/600-cve-2017-16544.patch deleted file mode 100644 index 3b142bdd6..000000000 --- a/package/utils/busybox/patches/600-cve-2017-16544.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c3797d40a1c57352192c6106cc0f435e7d9c11e8 Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Tue, 7 Nov 2017 18:09:29 +0100 -Subject: lineedit: do not tab-complete any strings which have control - characters - -function old new delta -add_match 41 68 +27 - -Signed-off-by: Denys Vlasenko ---- - libbb/lineedit.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/libbb/lineedit.c -+++ b/libbb/lineedit.c -@@ -633,6 +633,18 @@ static void free_tab_completion_data(voi - - static void add_match(char *matched) - { -+ unsigned char *p = (unsigned char*)matched; -+ while (*p) { -+ /* ESC attack fix: drop any string with control chars */ -+ if (*p < ' ' -+ || (!ENABLE_UNICODE_SUPPORT && *p >= 0x7f) -+ || (ENABLE_UNICODE_SUPPORT && *p == 0x7f) -+ ) { -+ free(matched); -+ return; -+ } -+ p++; -+ } - matches = xrealloc_vector(matches, 4, num_matches); - matches[num_matches] = matched; - num_matches++; diff --git a/package/utils/bzip2/Makefile b/package/utils/bzip2/Makefile index 4c8b360de..62c255a90 100644 --- a/package/utils/bzip2/Makefile +++ b/package/utils/bzip2/Makefile @@ -18,7 +18,6 @@ PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=BZIP2 PKG_LICENSE_FILES:=LICENSE -PKG_CPE_ID:=cpe:/a:bzip:bzip2 include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/utils/ct-bugcheck/src/bugcheck.sh b/package/utils/ct-bugcheck/src/bugcheck.sh index 389e10ccf..85f70c5e7 100755 --- a/package/utils/ct-bugcheck/src/bugcheck.sh +++ b/package/utils/ct-bugcheck/src/bugcheck.sh @@ -11,7 +11,7 @@ FOUND_BUG=0 bugcheck_generic() { - echo "OpenWrt crashlog report" > $CRASHDIR/info.txt + echo "LEDE crashlog report" > $CRASHDIR/info.txt date >> $CRASHDIR/info.txt echo >> $CRASHDIR/info.txt echo "uname" >> $CRASHDIR/info.txt diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile index 068ce3ede..8c003639a 100644 --- a/package/utils/e2fsprogs/Makefile +++ b/package/utils/e2fsprogs/Makefile @@ -8,14 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs -PKG_VERSION:=1.43.7 -PKG_HASH:=2a6367289047d68d9ba6a46cf89ab9a1efd0556cde02a51ebaf414ff51edded9 -PKG_RELEASE:=1 +PKG_VERSION:=1.43.3 +PKG_HASH:=ce8ef1bbb0d4730f170167284fda156ac9d6bf18db2750eb94af619a81b19927 +PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/ -PKG_LICENSE:=GPL-2.0 -PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/e2fsprogs PKG_BUILD_DEPENDS:=util-linux PKG_INSTALL:=1 @@ -46,7 +44,7 @@ define Package/libext2fs $(call Package/e2fsprogs/Default) SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libuuid +libblkid + DEPENDS:=+libuuid TITLE:=ext2/3/4 filesystem library endef @@ -110,17 +108,18 @@ endef TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections +CONFIGURE_VARS += \ + ac_cv_lib_pthread_sem_init=no + CONFIGURE_ARGS += \ --disable-testio-debug \ --enable-elf-shlibs \ --disable-libuuid \ - --disable-libblkid \ + --enable-libblkid \ --disable-uuidd \ --disable-tls \ --disable-nls \ - --disable-rpath \ - --disable-threads \ - --disable-fuse2fs + --disable-rpath define Build/Prepare $(call Build/Prepare/Default) @@ -139,6 +138,7 @@ define Build/Compile LDFLAGS=-Wl,--gc-sections \ BUILDCC="$(HOSTCC)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ + LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \ ELF_OTHER_LIBS="$(TARGET_LDFLAGS) -luuid" \ SYSLIBS="$(TARGET_LDFLAGS) -ldl -L$(PKG_BUILD_DIR)/lib/ -l:libcom_err.so.0.0" \ V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1,) \ diff --git a/package/utils/f2fs-tools/Makefile b/package/utils/f2fs-tools/Makefile index 3e8bf63f0..8a27c47ad 100644 --- a/package/utils/f2fs-tools/Makefile +++ b/package/utils/f2fs-tools/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=f2fs-tools -PKG_VERSION:=1.9.0 -PKG_RELEASE:=1 +PKG_VERSION:=1.8.0 +PKG_RELEASE:=3 PKG_LICENSE:=GPLv2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/ -PKG_HASH:=77217562ae7011a6d81b7b3c43c42623db1796a57596408d6c8037def70d6cc7 +PKG_HASH:=d4dbecf55560c548bf0758c9f641d1beec1e960b38cbbc19951195d5144d39ae PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 @@ -57,8 +57,7 @@ define Package/libf2fs endef CONFIGURE_ARGS += \ - --without-selinux \ - --without-blkid + --without-selinux CONFIGURE_VARS += \ ac_cv_file__git=no diff --git a/package/utils/f2fs-tools/patches/100-f2fs-WARNING-at-fs-f2fs-segment.c-718-update_sit_ent.patch b/package/utils/f2fs-tools/patches/100-f2fs-WARNING-at-fs-f2fs-segment.c-718-update_sit_ent.patch new file mode 100644 index 000000000..d4e25397a --- /dev/null +++ b/package/utils/f2fs-tools/patches/100-f2fs-WARNING-at-fs-f2fs-segment.c-718-update_sit_ent.patch @@ -0,0 +1,66 @@ +From 31873d5cdf8a97d5f7921451c54f6d293293c6cc Mon Sep 17 00:00:00 2001 +From: Jaegeuk Kim +Date: Wed, 23 Aug 2017 13:33:00 -0700 +Subject: [PATCH] mkfs.f2fs: fix missing cpu_to_le64 for checkpoint version + +The error on mips was reported by Stijn as follow. + +Commit 8399a29df92d6867d226df362edbf2e0efa527c1 in f2fs-tools +("mkfs.f2fs: give random checkpoint version") causes a bug when mounting +a filesystem created with it on a MIPS64 device running a 4.4(.83) +kernel. The following kernel warning appears several times per second, +for 30 seconds: + +[ 23.837262] ------------[ cut here ]------------ +[ 23.842039] WARNING: CPU: 0 PID: 935 at fs/f2fs/segment.c:718 +update_sit_entry+0x1c0/0x2b0() +[ 23.850507] Modules linked in: pppoe ppp_async l2tp_ppp iptable_nat +[ 24.174064] Call Trace: +[ 24.176527] [] show_stack+0x68/0xb4 +[ 24.181595] [] dump_stack+0x8c/0xc4 +[ 24.186660] [] warn_slowpath_common+0xa0/0xd0 +[ 24.192597] [] update_sit_entry+0x1c0/0x2b0 +[ 24.198353] [] refresh_sit_entry+0x70/0xf8 +[ 24.204022] [] allocate_data_block+0x1f0/0x310 +[ 24.210038] [] do_write_page+0x29c/0x2bc +[ 24.215532] [] write_data_page+0xa0/0xd8 +[ 24.221028] [] do_write_data_page+0xe4/0x384 +[ 24.226870] [] f2fs_write_data_page+0x208/0x464 +[ 24.232972] [] __f2fs_writepage+0x1c/0x74 +[ 24.238553] [] +f2fs_write_cache_pages.constprop.7+0x250/0x394 +[ 24.245869] [] f2fs_write_data_pages+0x130/0x1b0 +[ 24.252066] [] __filemap_fdatawrite_range+0xa0/0xd4 +[ 24.258515] [] sync_dirty_dir_inodes+0x94/0xd8 +[ 24.264530] [] write_checkpoint+0x108/0xb9c +[ 24.270283] [] f2fs_sync_fs+0x68/0xb0 +[ 24.275526] [] f2fs_sync_file+0x2e8/0x518 +[ 24.281107] [] do_fsync+0x38/0x70 +[ 24.285992] [] SyS_fsync+0x14/0x20 +[ 24.290972] [] syscall_common+0x34/0x58 +[ 24.296372] +[ 24.298096] ---[ end trace fd3ac44449b218ab ]--- + +Fix: 8399a29df92d68 ("mkfs.f2fs: give random checkpoint version") +Reported-And-Tested-by: Stijn Tintel +Signed-off-by: Jaegeuk Kim +--- + mkfs/f2fs_format.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c +index 92876b8..b379e80 100644 +--- a/mkfs/f2fs_format.c ++++ b/mkfs/f2fs_format.c +@@ -546,7 +546,7 @@ static int f2fs_write_check_point_pack(void) + } + + /* 1. cp page 1 of checkpoint pack 1 */ +- cp->checkpoint_ver = rand() | 0x1; ++ cp->checkpoint_ver = cpu_to_le64(rand() | 0x1); + set_cp(cur_node_segno[0], c.cur_seg[CURSEG_HOT_NODE]); + set_cp(cur_node_segno[1], c.cur_seg[CURSEG_WARM_NODE]); + set_cp(cur_node_segno[2], c.cur_seg[CURSEG_COLD_NODE]); +-- +2.13.5 + diff --git a/package/utils/fritz-tools/Makefile b/package/utils/fritz-tools/Makefile deleted file mode 100644 index 7c547e6f9..000000000 --- a/package/utils/fritz-tools/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=fritz-tools -PKG_RELEASE:=1 -CMAKE_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/fritz-tools/Default - SECTION:=utils - CATEGORY:=Utilities -endef - -define Package/fritz-tffs - $(call Package/fritz-tools/Default) - TITLE:=Utility to partially read the TFFS filesystems -endef - -define Package/fritz-tffs/description - Utility to partially read the TFFS filesystems. -endef - -define Package/fritz-caldata - $(call Package/fritz-tools/Default) - DEPENDS:=+zlib - TITLE:=Utility to extract WLAN calibration data -endef - -define Package/fritz-caldata/description - Utility to extract the zlib compress calibration data from flash. -endef - -define Package/fritz-tffs/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/fritz_tffs_read $(1)/usr/bin/fritz_tffs -endef - -define Package/fritz-caldata/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/fritz_cal_extract $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,fritz-tffs)) -$(eval $(call BuildPackage,fritz-caldata)) diff --git a/package/utils/fritz-tools/README.md b/package/utils/fritz-tools/README.md deleted file mode 100644 index def237b17..000000000 --- a/package/utils/fritz-tools/README.md +++ /dev/null @@ -1,50 +0,0 @@ -Userspace utilties for accessing TFFS (a name-value storage usually found in AVM Fritz!Box based devices) - -## Building - -``` -mkdir build -cd build -cmake /path/to/fritz_tffs_tools -make -``` - -## Usage - -All command line parameters are documented: -``` -fritz_tffs_read -h -``` - -Show all entries from a TFFS partition dump (in the format: name=value): -``` -fritz_tffs_read -i /path/to/tffs.dump -a -``` - -Read a TFFS partition and show all entries (in the format: name=value): -``` -fritz_tffs_read -i /dev/mtdX -a -``` - -Output only the value of a specific key (this will only show the value): -``` -fritz_tffs_read -i /dev/mtdX -n my_ipaddress -``` - -## LICENSE - -See `LICENSE`: - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/package/utils/fritz-tools/src/CMakeLists.txt b/package/utils/fritz-tools/src/CMakeLists.txt deleted file mode 100644 index 021dc7733..000000000 --- a/package/utils/fritz-tools/src/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 2.6) - -PROJECT(fritz-tools C) -ADD_DEFINITIONS(-Wall -Werror --std=gnu99 -Wmissing-declarations) - -SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") - -FIND_PATH(zlib_include_dir zlib.h) -INCLUDE_DIRECTORIES(${zlib_include_dir}) - -ADD_EXECUTABLE(fritz_tffs_read fritz_tffs_read.c) -ADD_EXECUTABLE(fritz_cal_extract fritz_cal_extract.c) -TARGET_LINK_LIBRARIES(fritz_cal_extract z) - -INSTALL(TARGETS fritz_tffs_read fritz_cal_extract RUNTIME DESTINATION bin) diff --git a/package/utils/fritz-tools/src/fritz_cal_extract.c b/package/utils/fritz-tools/src/fritz_cal_extract.c deleted file mode 100644 index 8156dfd1a..000000000 --- a/package/utils/fritz-tools/src/fritz_cal_extract.c +++ /dev/null @@ -1,259 +0,0 @@ -/* - * A tool for reading the zlib compressed calibration data - * found in AVM Fritz!Box based devices). - * - * Copyright (c) 2017 Christian Lamparter - * - * Based on zpipe, which is an example of proper use of zlib's inflate(). - * that is Not copyrighted -- provided to the public domain - * Version 1.4 11 December 2005 Mark Adler - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "zlib.h" - -#define CHUNK 1024 - -static inline size_t special_min(size_t a, size_t b) -{ - return a == 0 ? b : (a < b ? a : b); -} - -/* Decompress from file source to file dest until stream ends or EOF. - inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be - allocated for processing, Z_DATA_ERROR if the deflate data is - invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and - the version of the library linked do not match, or Z_ERRNO if there - is an error reading or writing the files. */ -static int inf(FILE *source, FILE *dest, size_t limit, size_t skip) -{ - int ret; - size_t have; - z_stream strm; - unsigned char in[CHUNK]; - unsigned char out[CHUNK]; - - /* allocate inflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); - if (ret != Z_OK) - return ret; - - /* decompress until deflate stream ends or end of file */ - do { - strm.avail_in = fread(in, 1, CHUNK, source); - if (ferror(source)) { - (void)inflateEnd(&strm); - return Z_ERRNO; - } - if (strm.avail_in == 0) - break; - strm.next_in = in; - - /* run inflate() on input until output buffer not full */ - do { - strm.avail_out = CHUNK; - strm.next_out = out; - ret = inflate(&strm, Z_NO_FLUSH); - assert(ret != Z_STREAM_ERROR); /* state not clobbered */ - switch (ret) { - case Z_NEED_DICT: - ret = Z_DATA_ERROR; /* and fall through */ - case Z_DATA_ERROR: - case Z_MEM_ERROR: - (void)inflateEnd(&strm); - return ret; - } - have = special_min(limit, CHUNK - strm.avail_out) - skip; - if (fwrite(&out[skip], have, 1, dest) != 1 || ferror(dest)) { - (void)inflateEnd(&strm); - return Z_ERRNO; - } - skip = 0; - limit -= have; - } while (strm.avail_out == 0 && limit > 0); - - /* done when inflate() says it's done */ - } while (ret != Z_STREAM_END && limit > 0); - - /* clean up and return */ - (void)inflateEnd(&strm); - return (limit == 0 ? Z_OK : (ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR)); -} - -/* report a zlib or i/o error */ -static void zerr(int ret) -{ - switch (ret) { - case Z_ERRNO: - if (ferror(stdin)) - fputs("error reading stdin\n", stderr); - if (ferror(stdout)) - fputs("error writing stdout\n", stderr); - break; - case Z_STREAM_ERROR: - fputs("invalid compression level\n", stderr); - break; - case Z_DATA_ERROR: - fputs("invalid or incomplete deflate data\n", stderr); - break; - case Z_MEM_ERROR: - fputs("out of memory\n", stderr); - break; - case Z_VERSION_ERROR: - fputs("zlib version mismatch!\n", stderr); - } -} - -static unsigned int get_num(char *str) -{ - if (!strncmp("0x", str, 2)) - return strtoul(str+2, NULL, 16); - else - return strtoul(str, NULL, 10); -} - -static void usage(void) -{ - fprintf(stderr, "Usage: fritz_cal_extract [-s seek offset] [-i skip] [-o output file] [-l limit] [infile] -e entry_id\n" - "Finds and extracts zlib compressed calibration data in the EVA loader\n"); - exit(EXIT_FAILURE); -} - -struct cal_entry { - uint16_t id; - uint16_t len; -} __attribute__((packed)); - -/* compress or decompress from stdin to stdout */ -int main(int argc, char **argv) -{ - struct cal_entry cal = { .len = 0 }; - FILE *in = stdin; - FILE *out = stdout; - size_t limit = 0, skip = 0; - int initial_offset = 0; - int entry = -1; - int ret; - int opt; - - while ((opt = getopt(argc, argv, "s:e:o:l:i:")) != -1) { - switch (opt) { - case 's': - initial_offset = (int)get_num(optarg); - if (errno) { - perror("Failed to parse seek offset"); - goto out_bad; - } - break; - case 'e': - entry = (int) htobe16(get_num(optarg)); - if (errno) { - perror("Failed to entry id"); - goto out_bad; - } - break; - case 'o': - out = fopen(optarg, "w"); - if (!out) { - perror("Failed to create output file"); - goto out_bad; - } - break; - case 'l': - limit = (size_t)get_num(optarg); - if (errno) { - perror("Failed to parse limit"); - goto out_bad; - } - break; - case 'i': - skip = (size_t)get_num(optarg); - if (errno) { - perror("Failed to parse skip"); - goto out_bad; - } - break; - default: /* '?' */ - usage(); - } - } - - if (entry == -1) - usage(); - - if (argc > 1 && optind <= argc) { - in = fopen(argv[optind], "r"); - if (!in) { - perror("Failed to create output file"); - goto out_bad; - } - } - - if (initial_offset) { - ret = fseek(in, initial_offset, SEEK_CUR); - if (ret) { - perror("Failed to seek to calibration table"); - goto out_bad; - } - } - - do { - ret = fseek(in, be16toh(cal.len), SEEK_CUR); - if (feof(in)) { - fprintf(stderr, "Reached end of file, but didn't find the matching entry\n"); - goto out_bad; - } else if (ferror(in)) { - perror("Failure during seek"); - goto out_bad; - } - - ret = fread(&cal, 1, sizeof cal, in); - if (ret != sizeof cal) - goto out_bad; - } while (entry != cal.id || cal.id == 0xffff); - - if (cal.id == 0xffff) { - fprintf(stderr, "Reached end of filesystem, but didn't find the matching entry\n"); - goto out_bad; - } - - ret = inf(in, out, limit, skip); - if (ret == Z_OK) - goto out; - - zerr(ret); - -out_bad: - ret = EXIT_FAILURE; - -out: - fclose(in); - fclose(out); - return ret; -} diff --git a/package/utils/fritz-tools/src/fritz_tffs_read.c b/package/utils/fritz-tools/src/fritz_tffs_read.c deleted file mode 100644 index d1b3038e6..000000000 --- a/package/utils/fritz-tools/src/fritz_tffs_read.c +++ /dev/null @@ -1,379 +0,0 @@ -/* - * A tool for reading the TFFS partitions (a name-value storage usually - * found in AVM Fritz!Box based devices). - * - * Copyright (c) 2015-2016 Martin Blumenstingl - * - * Based on the TFFS 2.0 kernel driver from AVM: - * Copyright (c) 2004-2007 AVM GmbH - * and the OpenWrt TFFS kernel driver: - * Copyright (c) 2013 John Crispin - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define TFFS_ID_END 0xffff -#define TFFS_ID_TABLE_NAME 0x01ff - -static char *progname; -static char *input_file; -static unsigned long tffs_size; -static char *name_filter = NULL; -static bool show_all = false; -static bool print_all_key_names = false; -static bool swap_bytes = false; - -struct tffs_entry_header { - uint16_t id; - uint16_t len; -}; - -struct tffs_entry { - const struct tffs_entry_header *header; - char *name; - uint8_t *val; -}; - -struct tffs_name_table_entry { - const uint32_t *id; - const char *val; -}; - -struct tffs_key_name_table { - uint32_t size; - struct tffs_name_table_entry *entries; -}; - -static inline uint16_t get_header_len(const struct tffs_entry_header *header) -{ - if (swap_bytes) - return ntohs(header->len); - - return header->len; -} - -static inline uint16_t get_header_id(const struct tffs_entry_header *header) -{ - if (swap_bytes) - return ntohs(header->id); - - return header->id; -} - -static inline uint16_t to_entry_header_id(uint32_t name_id) -{ - if (swap_bytes) - return ntohl(name_id) & 0xffff; - - return name_id & 0xffff; -} - -static inline uint32_t get_walk_size(uint32_t entry_len) -{ - return (entry_len + 3) & ~0x03; -} - -static void print_entry_value(const struct tffs_entry *entry) -{ - int i; - - /* These are NOT NULL terminated. */ - for (i = 0; i < get_header_len(entry->header); i++) - fprintf(stdout, "%c", entry->val[i]); -} - -static void parse_entry(uint8_t *buffer, uint32_t pos, - struct tffs_entry *entry) -{ - entry->header = (struct tffs_entry_header *) &buffer[pos]; - entry->val = &buffer[pos + sizeof(struct tffs_entry_header)]; -} - -static int find_entry(uint8_t *buffer, uint16_t id, struct tffs_entry *entry) -{ - uint32_t pos = 0; - - do { - parse_entry(buffer, pos, entry); - - if (get_header_id(entry->header) == id) - return 1; - - pos += sizeof(struct tffs_entry_header); - pos += get_walk_size(get_header_len(entry->header)); - } while (pos < tffs_size && entry->header->id != TFFS_ID_END); - - return 0; -} - -static void parse_key_names(struct tffs_entry *names_entry, - struct tffs_key_name_table *key_names) -{ - uint32_t pos = 0, i = 0; - struct tffs_name_table_entry *name_item; - - key_names->entries = calloc(sizeof(*name_item), 1); - - do { - name_item = &key_names->entries[i]; - - name_item->id = (uint32_t *) &names_entry->val[pos]; - pos += sizeof(*name_item->id); - name_item->val = (const char *) &names_entry->val[pos]; - - /* - * There is no "length" field because the string values are - * simply NULL-terminated -> strlen() gives us the size. - */ - pos += get_walk_size(strlen(name_item->val) + 1); - - ++i; - key_names->entries = realloc(key_names->entries, - sizeof(*name_item) * (i + 1)); - } while (pos < get_header_len(names_entry->header)); - - key_names->size = i; -} - -static void show_all_key_names(struct tffs_key_name_table *key_names) -{ - int i; - - for (i = 0; i < key_names->size; i++) - printf("%s\n", key_names->entries[i].val); -} - -static int show_all_key_value_pairs(uint8_t *buffer, - struct tffs_key_name_table *key_names) -{ - int i, has_value = 0; - uint16_t id; - struct tffs_entry tmp; - - for (i = 0; i < key_names->size; i++) { - id = to_entry_header_id(*key_names->entries[i].id); - - if (find_entry(buffer, id, &tmp)) { - printf("%s=", key_names->entries[i].val); - print_entry_value(&tmp); - printf("\n"); - has_value++; - } - } - - if (!has_value) { - fprintf(stderr, "ERROR: no values found!\n"); - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} - -static int show_matching_key_value(uint8_t *buffer, - struct tffs_key_name_table *key_names) -{ - int i; - uint16_t id; - struct tffs_entry tmp; - const char *name; - - for (i = 0; i < key_names->size; i++) { - name = key_names->entries[i].val; - - if (strncmp(name, name_filter, strlen(name)) == 0) { - id = to_entry_header_id(*key_names->entries[i].id); - - if (find_entry(buffer, id, &tmp)) { - print_entry_value(&tmp); - printf("\n"); - return EXIT_SUCCESS; - } else { - fprintf(stderr, - "ERROR: no value found for name %s!\n", - name); - return EXIT_FAILURE; - } - } - } - - fprintf(stderr, "ERROR: Unknown key name %s!\n", name_filter); - return EXIT_FAILURE; -} - -static void usage(int status) -{ - FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout; - - fprintf(stream, "Usage: %s [OPTIONS...]\n", progname); - fprintf(stream, - "\n" - "Options:\n" - " -a list all key value pairs found in the TFFS file/device\n" - " -b swap bytes while parsing the TFFS file/device\n" - " -h show this screen\n" - " -i inspect the given TFFS file/device \n" - " -l list all supported keys\n" - " -n display the value of the given key\n" - " -s the (max) size of the TFFS file/device \n" - ); - - exit(status); -} - -static int file_exist(char *filename) -{ - struct stat buffer; - - return stat(filename, &buffer) == 0; -} - -static void parse_options(int argc, char *argv[]) -{ - while (1) - { - int c; - - c = getopt(argc, argv, "abhi:ln:s:"); - if (c == -1) - break; - - switch (c) { - case 'a': - show_all = true; - name_filter = NULL; - print_all_key_names = false; - break; - case 'b': - swap_bytes = 1; - break; - case 'h': - usage(EXIT_SUCCESS); - break; - case 'i': - input_file = optarg; - break; - case 'l': - print_all_key_names = true; - show_all = false; - name_filter = NULL; - break; - case 'n': - name_filter = optarg; - show_all = false; - print_all_key_names = false; - break; - case 's': - tffs_size = strtoul(optarg, NULL, 0); - break; - default: - usage(EXIT_FAILURE); - break; - } - } - - if (!input_file) { - fprintf(stderr, "ERROR: No input file (-i ) given!\n"); - exit(EXIT_FAILURE); - } - - if (!file_exist(input_file)) { - fprintf(stderr, "ERROR: %s does not exist\n", input_file); - exit(EXIT_FAILURE); - } - - if (!show_all && !name_filter && !print_all_key_names) { - fprintf(stderr, - "ERROR: either -l, -a or -n is required!\n"); - exit(EXIT_FAILURE); - } -} - -int main(int argc, char *argv[]) -{ - int ret = EXIT_FAILURE; - uint8_t *buffer; - FILE *fp; - struct tffs_entry name_table; - struct tffs_key_name_table key_names; - - progname = basename(argv[0]); - - parse_options(argc, argv); - - fp = fopen(input_file, "r"); - - if (!fp) { - fprintf(stderr, "ERROR: Failed to open tffs input file %s\n", - input_file); - goto out; - } - - if (tffs_size == 0) { - fseek(fp, 0L, SEEK_END); - tffs_size = ftell(fp); - fseek(fp, 0L, SEEK_SET); - } - - buffer = malloc(tffs_size); - - if (fread(buffer, 1, tffs_size, fp) != tffs_size) { - fprintf(stderr, "ERROR: Failed read tffs file %s\n", - input_file); - goto out_free; - } - - if (!find_entry(buffer, TFFS_ID_TABLE_NAME, &name_table)) { - fprintf(stderr,"ERROR: No name table found in tffs file %s\n", - input_file); - fprintf(stderr," Is byte-swapping (-b) required?\n"); - goto out_free; - } - - parse_key_names(&name_table, &key_names); - if (key_names.size < 1) { - fprintf(stderr, "ERROR: No name table found in tffs file %s\n", - input_file); - goto out_free_names; - } - - if (print_all_key_names) { - show_all_key_names(&key_names); - ret = EXIT_SUCCESS; - } else if (show_all) { - ret = show_all_key_value_pairs(buffer, &key_names); - } else { - ret = show_matching_key_value(buffer, &key_names); - } - -out_free_names: - free(key_names.entries); -out_free: - fclose(fp); - free(buffer); -out: - return ret; -} diff --git a/package/utils/fuse/Makefile b/package/utils/fuse/Makefile index e853a8e04..d0cefff1a 100644 --- a/package/utils/fuse/Makefile +++ b/package/utils/fuse/Makefile @@ -18,7 +18,6 @@ PKG_HASH:=832432d1ad4f833c20e13b57cf40ce5277a9d33e483205fc63c78111b3358874 PKG_LICENSE:=LGPLv2.1 GPLv2 PKG_LICENSE_FILES:=COPYING.LIB COPYING -PKG_CPE_ID:=cpe:/a:fuse_project:fuse PKG_INSTALL:=1 diff --git a/package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch b/package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch index ac0722c70..74b8c6f8f 100644 --- a/package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch +++ b/package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch @@ -62,7 +62,7 @@ return (t == LUA_TNONE) ? "no value" : luaT_typenames[t]; } -@@ -264,6 +265,14 @@ LUA_API int lua_isnumber (lua_State *L, +@@ -264,6 +265,14 @@ LUA_API int lua_isnumber (lua_State *L, } @@ -77,7 +77,7 @@ LUA_API int lua_isstring (lua_State *L, int idx) { int t = lua_type(L, idx); return (t == LUA_TSTRING || t == LUA_TNUMBER); -@@ -309,31 +318,66 @@ LUA_API int lua_lessthan (lua_State *L, +@@ -309,31 +318,66 @@ LUA_API int lua_lessthan (lua_State *L, } @@ -162,7 +162,7 @@ case LUA_TNUMBER: { size_t l; lua_lock(L); /* `luaV_tostring' may create a new string */ -@@ -426,6 +471,8 @@ LUA_API void lua_pushnil (lua_State *L) +@@ -426,6 +471,8 @@ LUA_API void lua_pushnil (lua_State *L) } @@ -196,7 +196,7 @@ LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t len) { -@@ -569,7 +626,7 @@ LUA_API void lua_rawgeti (lua_State *L, +@@ -569,7 +626,7 @@ LUA_API void lua_rawgeti (lua_State *L, lua_lock(L); o = index2adr(L, idx); api_check(L, ttistable(o)); @@ -205,7 +205,7 @@ api_incr_top(L); lua_unlock(L); } -@@ -597,6 +654,9 @@ LUA_API int lua_getmetatable (lua_State +@@ -597,6 +654,9 @@ LUA_API int lua_getmetatable (lua_State case LUA_TUSERDATA: mt = uvalue(obj)->metatable; break; @@ -215,7 +215,7 @@ default: mt = G(L)->mt[ttype(obj)]; break; -@@ -687,7 +747,7 @@ LUA_API void lua_rawseti (lua_State *L, +@@ -687,7 +747,7 @@ LUA_API void lua_rawseti (lua_State *L, api_checknelems(L, 1); o = index2adr(L, idx); api_check(L, ttistable(o)); @@ -224,7 +224,7 @@ luaC_barriert(L, hvalue(o), L->top-1); L->top--; lua_unlock(L); -@@ -721,7 +781,7 @@ LUA_API int lua_setmetatable (lua_State +@@ -721,7 +781,7 @@ LUA_API int lua_setmetatable (lua_State break; } default: { @@ -286,7 +286,7 @@ #define FREELIST_REF 0 /* free list of references */ -@@ -66,7 +66,7 @@ LUALIB_API int luaL_typerror (lua_State +@@ -66,7 +66,7 @@ LUALIB_API int luaL_typerror (lua_State static void tag_error (lua_State *L, int narg, int tag) { @@ -351,7 +351,7 @@ -@@ -54,20 +56,25 @@ static int luaB_tonumber (lua_State *L) +@@ -54,20 +56,25 @@ static int luaB_tonumber (lua_State *L) int base = luaL_optint(L, 2, 10); if (base == 10) { /* standard conversion */ luaL_checkany(L, 1); @@ -503,7 +503,7 @@ case VKNUM: case VTRUE: case VFALSE: -@@ -451,6 +489,10 @@ int luaK_exp2RK (FuncState *fs, expdesc +@@ -451,6 +489,10 @@ int luaK_exp2RK (FuncState *fs, expdesc if (fs->nk <= MAXINDEXRK) { /* constant fit in RK operand? */ e->u.s.info = (e->k == VNIL) ? nilK(fs) : (e->k == VKNUM) ? luaK_numberK(fs, e->u.nval) : @@ -896,7 +896,7 @@ lua_assert(isdigit(ls->current)); do { save_and_next(ls); -@@ -202,8 +215,9 @@ static void read_numeral (LexState *ls, +@@ -202,8 +215,9 @@ static void read_numeral (LexState *ls, save_and_next(ls); save(ls, '\0'); buffreplace(ls, '.', ls->decpoint); /* follow locale for decimal point */ @@ -1009,7 +1009,6 @@ -#define PI (3.14159265358979323846) -#define RADIANS_PER_DEGREE (PI/180.0) - -- +#ifdef LNUM_FLOAT +# define PI (3.14159265358979323846F) +#elif defined(M_PI) @@ -1018,7 +1017,7 @@ +# define PI (3.14159265358979323846264338327950288) +#endif +#define RADIANS_PER_DEGREE (PI/180) -+ + +#undef HUGE +#ifdef LNUM_FLOAT +# define HUGE HUGE_VALF @@ -2104,7 +2103,7 @@ case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); /* boolean true must be 1 !! */ case LUA_TLIGHTUSERDATA: -@@ -86,21 +106,6 @@ int luaO_rawequalObj (const TValue *t1, +@@ -86,21 +106,6 @@ int luaO_rawequalObj (const TValue *t1, } } @@ -2607,7 +2606,7 @@ nums[ceillog2(k)]++; /* count as such */ return 1; } -@@ -308,7 +322,7 @@ static void resize (lua_State *L, Table +@@ -308,7 +322,7 @@ static void resize (lua_State *L, Table /* re-insert elements from vanishing slice */ for (i=nasize; iarray[i])) @@ -2651,7 +2650,7 @@ } while (n); return luaO_nilobject; } -@@ -470,14 +487,12 @@ const TValue *luaH_get (Table *t, const +@@ -470,14 +487,12 @@ const TValue *luaH_get (Table *t, const switch (ttype(key)) { case LUA_TNIL: return luaO_nilobject; case LUA_TSTRING: return luaH_getstr(t, rawtsvalue(key)); @@ -3062,7 +3061,7 @@ /* @@ LUAI_USER_ALIGNMENT_T is a type that requires maximum alignment. ** CHANGE it if your system requires alignments larger than double. (For -@@ -728,28 +652,6 @@ union luai_Cast { double l_d; long l_l; +@@ -728,28 +652,6 @@ union luai_Cast { double l_d; long l_l; #define luai_userstateyield(L,n) ((void)L) @@ -3093,7 +3092,7 @@ /* --- a/src/lundump.c +++ b/src/lundump.c -@@ -73,6 +73,13 @@ static lua_Number LoadNumber(LoadState* +@@ -73,6 +73,13 @@ static lua_Number LoadNumber(LoadState* return x; } @@ -3107,7 +3106,7 @@ static TString* LoadString(LoadState* S) { size_t size; -@@ -119,6 +126,9 @@ static void LoadConstants(LoadState* S, +@@ -119,6 +126,9 @@ static void LoadConstants(LoadState* S, case LUA_TNUMBER: setnvalue(o,LoadNumber(S)); break; @@ -3199,7 +3198,7 @@ setsvalue2s(L, obj, luaS_new(L, s)); return 1; } -@@ -222,59 +234,127 @@ static int l_strcmp (const TString *ls, +@@ -222,59 +234,127 @@ static int l_strcmp (const TString *ls, } @@ -3422,10 +3421,10 @@ + case TM_POW: if (try_powint( ri, ib, ic)) return; break; + case TM_UNM: if (try_unmint( ri, ib)) return; break; + default: lua_assert(0); - } ++ } + } + /* Fallback to floating point, when leaving range. */ - ++ +#ifdef LNUM_COMPLEX + if ((nvalue_img(b)!=0) || (nvalue_img(c)!=0)) { + lua_Complex r; @@ -3445,7 +3444,7 @@ + default: lua_assert(0); r=0; + } + setnvalue_complex( ra, r ); -+ } + } + return; + } +#endif @@ -3466,7 +3465,7 @@ + if (!call_binTM(L, rb, rc, ra, op)) + luaG_aritherror(L, rb, rc); +} -+ + +/* Helper macro to sort arithmetic operations into four categories: + * TK_INT: integer - integer operands + * TK_NUMBER: number - number (non complex, either may be integer) diff --git a/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch b/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch index 3d3d6850e..937fc137e 100644 --- a/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch +++ b/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch @@ -1,6 +1,6 @@ --- a/src/lvm.c +++ b/src/lvm.c -@@ -281,7 +281,8 @@ int luaV_lessthan (lua_State *L, const T +@@ -284,7 +284,8 @@ int luaV_lessthan (lua_State *L, const T else return luai_numlt( nvalue_fast(l), cast_num(ivalue(r)) ); @@ -10,7 +10,7 @@ return res; return luaG_ordererror(L, l, r); -@@ -319,7 +320,8 @@ static int lessequal (lua_State *L, cons +@@ -322,7 +323,8 @@ static int lessequal (lua_State *L, cons else return luai_numle( nvalue_fast(l), cast_num(ivalue(r)) ); diff --git a/package/utils/lua/patches/020-shared_liblua.patch b/package/utils/lua/patches/020-shared_liblua.patch index 64f683ddb..bcd410f69 100644 --- a/package/utils/lua/patches/020-shared_liblua.patch +++ b/package/utils/lua/patches/020-shared_liblua.patch @@ -21,7 +21,7 @@ ranlib: --- a/src/ldo.h +++ b/src/ldo.h -@@ -46,7 +46,7 @@ LUAI_FUNC int luaD_pcall (lua_State *L, +@@ -46,7 +46,7 @@ LUAI_FUNC int luaD_pcall (lua_State *L, LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); diff --git a/package/utils/lua/patches/050-honor-cflags.patch b/package/utils/lua/patches/050-honor-cflags.patch index d221c4ee9..dd6579148 100644 --- a/package/utils/lua/patches/050-honor-cflags.patch +++ b/package/utils/lua/patches/050-honor-cflags.patch @@ -8,4 +8,4 @@ + $(CC) -o $@.$(PKG_VERSION) -Wl,-Bsymbolic-functions $(MYLDFLAGS) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? ln -fs $@.$(PKG_VERSION) $@ - $(LUA_T): $(LUA_O) $(LUA_SO) + diff --git a/package/utils/lua/patches/300-opcode_performance.patch b/package/utils/lua/patches/300-opcode_performance.patch index b971e0975..5fbb87388 100644 --- a/package/utils/lua/patches/300-opcode_performance.patch +++ b/package/utils/lua/patches/300-opcode_performance.patch @@ -10,7 +10,7 @@ /* * If 'obj' is a string, it is tried to be interpreted as a number. -@@ -568,12 +571,63 @@ static inline int arith_mode( const TVal +@@ -566,12 +569,63 @@ static inline int arith_mode( const TVal ARITH_OP1_END #endif @@ -74,7 +74,7 @@ reentry: /* entry point */ lua_assert(isLua(L->ci)); pc = L->savedpc; -@@ -598,33 +652,33 @@ void luaV_execute (lua_State *L, int nex +@@ -596,33 +650,33 @@ void luaV_execute (lua_State *L, int nex lua_assert(base == L->base && L->base == L->ci->base); lua_assert(base <= L->top && L->top <= L->stack + L->stacksize); lua_assert(L->top == L->ci->top || luaG_checkopenop(i)); @@ -115,7 +115,7 @@ TValue g; TValue *rb = KBx(i); sethvalue(L, &g, cl->env); -@@ -632,88 +686,88 @@ void luaV_execute (lua_State *L, int nex +@@ -630,88 +684,88 @@ void luaV_execute (lua_State *L, int nex Protect(luaV_gettable(L, &g, rb, ra)); continue; } @@ -219,7 +219,7 @@ const TValue *rb = RB(i); switch (ttype(rb)) { case LUA_TTABLE: { -@@ -733,18 +787,18 @@ void luaV_execute (lua_State *L, int nex +@@ -731,18 +785,18 @@ void luaV_execute (lua_State *L, int nex } continue; } @@ -241,7 +241,7 @@ TValue *rb = RKB(i); TValue *rc = RKC(i); Protect( -@@ -754,7 +808,7 @@ void luaV_execute (lua_State *L, int nex +@@ -752,7 +806,7 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -250,7 +250,7 @@ Protect( if (luaV_lessthan(L, RKB(i), RKC(i)) == GETARG_A(i)) dojump(L, pc, GETARG_sBx(*pc)); -@@ -762,7 +816,7 @@ void luaV_execute (lua_State *L, int nex +@@ -760,7 +814,7 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -259,7 +259,7 @@ Protect( if (lessequal(L, RKB(i), RKC(i)) == GETARG_A(i)) dojump(L, pc, GETARG_sBx(*pc)); -@@ -770,13 +824,13 @@ void luaV_execute (lua_State *L, int nex +@@ -768,13 +822,13 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -275,7 +275,7 @@ TValue *rb = RB(i); if (l_isfalse(rb) != GETARG_C(i)) { setobjs2s(L, ra, rb); -@@ -785,7 +839,7 @@ void luaV_execute (lua_State *L, int nex +@@ -783,7 +837,7 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -284,7 +284,7 @@ int b = GETARG_B(i); int nresults = GETARG_C(i) - 1; if (b != 0) L->top = ra+b; /* else previous instruction set top */ -@@ -806,7 +860,7 @@ void luaV_execute (lua_State *L, int nex +@@ -804,7 +858,7 @@ void luaV_execute (lua_State *L, int nex } } } @@ -293,7 +293,7 @@ int b = GETARG_B(i); if (b != 0) L->top = ra+b; /* else previous instruction set top */ L->savedpc = pc; -@@ -838,7 +892,7 @@ void luaV_execute (lua_State *L, int nex +@@ -836,7 +890,7 @@ void luaV_execute (lua_State *L, int nex } } } @@ -302,7 +302,7 @@ int b = GETARG_B(i); if (b != 0) L->top = ra+b-1; if (L->openupval) luaF_close(L, base); -@@ -853,7 +907,7 @@ void luaV_execute (lua_State *L, int nex +@@ -851,7 +905,7 @@ void luaV_execute (lua_State *L, int nex goto reentry; } } @@ -311,7 +311,7 @@ /* If start,step and limit are all integers, we don't need to check * against overflow in the looping. */ -@@ -881,7 +935,7 @@ void luaV_execute (lua_State *L, int nex +@@ -879,7 +933,7 @@ void luaV_execute (lua_State *L, int nex } continue; } @@ -320,7 +320,7 @@ const TValue *init = ra; const TValue *plimit = ra+1; const TValue *pstep = ra+2; -@@ -904,7 +958,7 @@ void luaV_execute (lua_State *L, int nex +@@ -902,7 +956,7 @@ void luaV_execute (lua_State *L, int nex dojump(L, pc, GETARG_sBx(i)); continue; } @@ -329,7 +329,7 @@ StkId cb = ra + 3; /* call base */ setobjs2s(L, cb+2, ra+2); setobjs2s(L, cb+1, ra+1); -@@ -920,7 +974,7 @@ void luaV_execute (lua_State *L, int nex +@@ -918,7 +972,7 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -338,7 +338,7 @@ int n = GETARG_B(i); int c = GETARG_C(i); int last; -@@ -942,11 +996,11 @@ void luaV_execute (lua_State *L, int nex +@@ -940,11 +994,11 @@ void luaV_execute (lua_State *L, int nex } continue; } @@ -352,7 +352,7 @@ Proto *p; Closure *ncl; int nup, j; -@@ -966,7 +1020,7 @@ void luaV_execute (lua_State *L, int nex +@@ -964,7 +1018,7 @@ void luaV_execute (lua_State *L, int nex Protect(luaC_checkGC(L)); continue; } diff --git a/package/utils/otrx/src/otrx.c b/package/utils/otrx/src/otrx.c index 223e032f2..101a31004 100644 --- a/package/utils/otrx/src/otrx.c +++ b/package/utils/otrx/src/otrx.c @@ -1,7 +1,7 @@ /* * otrx * - * Copyright (C) 2015-2017 Rafał Miłecki + * Copyright (C) 2015 Rafał Miłecki * * 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 @@ -124,7 +124,9 @@ static const uint32_t crc32_tbl[] = { 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, }; -uint32_t otrx_crc32(uint32_t crc, uint8_t *buf, size_t len) { +uint32_t otrx_crc32(uint8_t *buf, size_t len) { + uint32_t crc = 0xffffffff; + while (len) { crc = crc32_tbl[(crc ^ *buf) & 0xff] ^ (crc >> 8); buf++; @@ -156,6 +158,7 @@ static int otrx_check(int argc, char **argv) { size_t bytes, length; uint8_t buf[1024]; uint32_t crc32; + int i; int err = 0; if (argc < 3) { @@ -200,7 +203,8 @@ static int otrx_check(int argc, char **argv) { fseek(trx, trx_offset + TRX_FLAGS_OFFSET, SEEK_SET); length -= TRX_FLAGS_OFFSET; while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) { - crc32 = otrx_crc32(crc32, buf, bytes); + for (i = 0; i < bytes; i++) + crc32 = crc32_tbl[(crc32 ^ buf[i]) & 0xff] ^ (crc32 >> 8); length -= bytes; } @@ -228,11 +232,14 @@ out: * Create **************************************************/ +static void otrx_create_parse_options(int argc, char **argv) { +} + static ssize_t otrx_create_append_file(FILE *trx, const char *in_path) { FILE *in; size_t bytes; ssize_t length = 0; - uint8_t buf[1024]; + uint8_t buf[128]; in = fopen(in_path, "r"); if (!in) { @@ -264,12 +271,9 @@ static ssize_t otrx_create_append_zeros(FILE *trx, size_t length) { if (fwrite(buf, 1, length, trx) != length) { fprintf(stderr, "Couldn't write %zu B to %s\n", length, trx_path); - free(buf); return -EIO; } - free(buf); - return length; } @@ -284,7 +288,7 @@ static ssize_t otrx_create_align(FILE *trx, size_t curr_offset, size_t alignment static int otrx_create_write_hdr(FILE *trx, struct trx_header *hdr) { size_t bytes, length; - uint8_t buf[1024]; + uint8_t *buf; uint32_t crc32; hdr->magic = cpu_to_le32(TRX_MAGIC); @@ -299,13 +303,20 @@ static int otrx_create_write_hdr(FILE *trx, struct trx_header *hdr) { length = le32_to_cpu(hdr->length); - crc32 = 0xffffffff; - fseek(trx, TRX_FLAGS_OFFSET, SEEK_SET); - length -= TRX_FLAGS_OFFSET; - while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) { - crc32 = otrx_crc32(crc32, buf, bytes); - length -= bytes; + buf = malloc(length); + if (!buf) { + fprintf(stderr, "Couldn't alloc %zu B buffer\n", length); + return -ENOMEM; } + + fseek(trx, 0, SEEK_SET); + bytes = fread(buf, 1, length, trx); + if (bytes != length) { + fprintf(stderr, "Couldn't read %zu B of data from %s\n", length, trx_path); + return -ENOMEM; + } + + crc32 = otrx_crc32(buf + TRX_FLAGS_OFFSET, length - TRX_FLAGS_OFFSET); hdr->crc32 = cpu_to_le32(crc32); fseek(trx, 0, SEEK_SET); @@ -334,6 +345,9 @@ static int otrx_create(int argc, char **argv) { } trx_path = argv[2]; + optind = 3; + otrx_create_parse_options(argc, argv); + trx = fopen(trx_path, "w+"); if (!trx) { fprintf(stderr, "Couldn't open %s\n", trx_path); @@ -343,7 +357,7 @@ static int otrx_create(int argc, char **argv) { fseek(trx, curr_offset, SEEK_SET); optind = 3; - while ((c = getopt(argc, argv, "f:A:a:b:")) != -1) { + while ((c = getopt(argc, argv, "f:b:")) != -1) { switch (c) { case 'f': if (curr_idx >= TRX_MAX_PARTS) { @@ -367,27 +381,6 @@ static int otrx_create(int argc, char **argv) { curr_offset += sbytes; break; - case 'A': - sbytes = otrx_create_append_file(trx, optarg); - if (sbytes < 0) { - fprintf(stderr, "Failed to append file %s\n", optarg); - } else { - curr_offset += sbytes; - } - - sbytes = otrx_create_align(trx, curr_offset, 4); - if (sbytes < 0) - fprintf(stderr, "Failed to append zeros\n"); - else - curr_offset += sbytes; - break; - case 'a': - sbytes = otrx_create_align(trx, curr_offset, strtol(optarg, NULL, 0)); - if (sbytes < 0) - fprintf(stderr, "Failed to append zeros\n"); - else - curr_offset += sbytes; - break; case 'b': sbytes = strtol(optarg, NULL, 0) - curr_offset; if (sbytes < 0) { @@ -405,12 +398,6 @@ static int otrx_create(int argc, char **argv) { break; } - sbytes = otrx_create_align(trx, curr_offset, 0x1000); - if (sbytes < 0) - fprintf(stderr, "Failed to append zeros\n"); - else - curr_offset += sbytes; - hdr.length = curr_offset; otrx_create_write_hdr(trx, &hdr); err_close: @@ -565,8 +552,6 @@ static void usage() { printf("Creating new TRX file:\n"); printf("\totrx create [options] [partitions]\n"); printf("\t-f file\t\t\t\t[partition] start new partition with content copied from file\n"); - printf("\t-A file\t\t\t\t[partition] append current partition with content copied from file\n"); - printf("\t-a alignment\t\t\t[partition] align current partition\n"); printf("\t-b offset\t\t\t[partition] append zeros to partition till reaching absolute offset\n"); printf("\n"); printf("Extracting from TRX file:\n"); diff --git a/package/utils/ugps/Makefile b/package/utils/ugps/Makefile index 1dad863fd..0243b773e 100644 --- a/package/utils/ugps/Makefile +++ b/package/utils/ugps/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=3 PKG_SOURCE_URL=$(LEDE_GIT)/project/ugps.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2017-02-11 -PKG_SOURCE_VERSION:=c30055a685bca1e81ccc8f4bd3bb08d780a7d762 -PKG_MIRROR_HASH:=a618f9a15d3a585453550190eed2bb0a308ddba0ab37f2f6b76dd3c87fd80e8b +PKG_SOURCE_DATE:=2016-10-24 +PKG_SOURCE_VERSION:=32a6b2b702c3b9f8c425f3d9dc9f4273e276029c +PKG_MIRROR_HASH:=41d24ef335e9b2847895b04cee4d1c7efa56fc207798f5858e7a1f229a33c5eb PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0+ diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile index 2560f1c40..1b1ef147b 100644 --- a/package/utils/usbmode/Makefile +++ b/package/utils/usbmode/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/usbmode.git -PKG_SOURCE_DATE:=2017-12-19 -PKG_SOURCE_VERSION:=f40f84c27534159066c94dadc0c08e0b255c3e26 -PKG_MIRROR_HASH:=840c7ee2843102b09d8943a20820025251cc259385e2b0bde6b7c8cce8190f83 +PKG_SOURCE_DATE:=2017-05-24 +PKG_SOURCE_VERSION:=453da8e540b1c53d357b897d6c70372cd4633390 +PKG_MIRROR_HASH:=b4a7132b940192f2e9a74bd890bd7008ede701e1d52284c3ade0cdc7d663929f CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 88cb31477..aea13ac8d 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -8,13 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux -PKG_VERSION:=2.30.2 +PKG_VERSION:=2.29.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.30 -PKG_HASH:=7b5be5489e9b5b7177832836467aba1c87bf0e9bcbcb5a6f35d76cd4782589dc -PKG_CPE_ID:=cpe:/a:kernel:util-linux +PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.29 +PKG_HASH:=accea4d678209f97f634f40a93b7e9fcad5915d1f4749f6c47bee6bf110fe8e3 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:= COPYING \ @@ -31,8 +30,6 @@ PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 -DISABLE_NLS:=--disable-nls - include $(INCLUDE_DIR)/package.mk define Package/util-linux/Default @@ -166,7 +163,6 @@ endef define Package/dmesg $(call Package/util-linux/Default) TITLE:=print or control the kernel ring buffer - DEPENDS:= +libncursesw endef define Package/dmesg/description @@ -176,7 +172,7 @@ endef define Package/fdisk $(call Package/util-linux/Default) TITLE:=manipulate disk partition table - DEPENDS:= +libblkid +libsmartcols +libfdisk +libncursesw + DEPENDS:= +libblkid +libsmartcols +libfdisk SUBMENU=Disc endef @@ -353,7 +349,7 @@ define Package/sfdisk $(call Package/util-linux/Default) TITLE:=partition table manipulator for Linux SUBMENU=Disc - DEPENDS:= +libblkid +libfdisk +libsmartcols +libncursesw + DEPENDS:= +libblkid +libfdisk +libsmartcols endef define Package/sfdisk/description diff --git a/package/utils/util-linux/patches/001-uclibc_add_libm_to_scriptreplay.patch b/package/utils/util-linux/patches/001-uclibc_add_libm_to_scriptreplay.patch new file mode 100644 index 000000000..a291f6ac8 --- /dev/null +++ b/package/utils/util-linux/patches/001-uclibc_add_libm_to_scriptreplay.patch @@ -0,0 +1,24 @@ +From feda4342df1ced25df3d200ed23469e740196c86 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 18 Jan 2017 13:17:21 +0100 +Subject: build-sys: use -lm for scriptreplay if necessary + +Reported-by: Bert van Hall +Addresses: https://github.com/karelzak/util-linux/pull/397 +Signed-off-by: Karel Zak +--- + configure.ac | 7 +++++++ + term-utils/Makemodule.am | 2 +- + 2 files changed, 8 insertions(+), 1 deletion(-) + +--- a/term-utils/Makemodule.am ++++ b/term-utils/Makemodule.am +@@ -21,7 +21,7 @@ if BUILD_SCRIPTREPLAY + usrbin_exec_PROGRAMS += scriptreplay + dist_man_MANS += term-utils/scriptreplay.1 + scriptreplay_SOURCES = term-utils/scriptreplay.c +-scriptreplay_LDADD = $(LDADD) libcommon.la ++scriptreplay_LDADD = $(LDADD) libcommon.la $(MATH_LIBS) + endif # BUILD_SCRIPTREPLAY + + diff --git a/package/utils/util-linux/patches/003-fix_pkgconfig_files.patch b/package/utils/util-linux/patches/003-fix_pkgconfig_files.patch index c79813b1b..16ba14ae3 100644 --- a/package/utils/util-linux/patches/003-fix_pkgconfig_files.patch +++ b/package/utils/util-linux/patches/003-fix_pkgconfig_files.patch @@ -10,7 +10,7 @@ endif # BUILD_LIBUUID --- a/configure.ac +++ b/configure.ac -@@ -2255,18 +2255,23 @@ AC_CONFIG_HEADERS([config.h]) +@@ -2165,18 +2165,23 @@ AC_CONFIG_HEADERS([config.h]) # AC_CONFIG_FILES([ Makefile @@ -66,7 +66,7 @@ endif # BUILD_LIBSMARTCOLS --- a/libfdisk/Makemodule.am +++ b/libfdisk/Makemodule.am -@@ -9,7 +9,6 @@ SUBDIRS += libfdisk/docs +@@ -8,7 +8,6 @@ SUBDIRS += libfdisk/docs endif pkgconfig_DATA += libfdisk/fdisk.pc diff --git a/package/utils/util-linux/patches/100-use_urandom.patch b/package/utils/util-linux/patches/100-use_urandom.patch deleted file mode 100644 index 848f2f40c..000000000 --- a/package/utils/util-linux/patches/100-use_urandom.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/lib/randutils.c -+++ b/lib/randutils.c -@@ -25,6 +25,11 @@ - #define THREAD_LOCAL static - #endif - -+/* force /dev/urandom to avoid hanging on early boot */ -+#undef HAVE_GETRANDOM -+#undef SYS_getrandom -+#undef __NR_getrandom -+ - #ifdef HAVE_GETRANDOM - # include - #elif defined (__linux__) diff --git a/package/utils/xfsprogs/Makefile b/package/utils/xfsprogs/Makefile index 5cf1da240..fb350993f 100644 --- a/package/utils/xfsprogs/Makefile +++ b/package/utils/xfsprogs/Makefile @@ -8,17 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xfsprogs -PKG_CPE_ID:=cpe:/a:sgi:xfsprogs PKG_RELEASE:=1 -PKG_VERSION:=4.11.0 -PKG_SOURCE_URL:=@KERNEL/linux/utils/fs/xfs/xfsprogs -PKG_HASH:=c3a6d87b564d7738243c507df82276bed982265e345363a95f2c764e8a5f5bb2 +PKG_VERSION:=3.1.7 +PKG_SOURCE_URL:=ftp://oss.sgi.com/projects/xfs/previous/ +PKG_HASH:=e150914210ac5fd29c098ef0fd94bdec51d2fb231cf9faa765c16ec6d75c8eaa -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk define Package/xfsprogs/default SECTION:=utils @@ -58,12 +58,15 @@ MAKE_FLAGS += \ DEBUG= Q= \ PCFLAGS="-Wall" \ PKG_PLATFORM=linux \ - ENABLE_GETTEXT=no - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/libxfs crc32table.h CFLAGS="$(HOST_CFLAGS) -I$(PKG_BUILD_DIR)/include" - $(call Build/Compile/Default) -endef + ENABLE_GETTEXT=no \ + prefix=$(PKG_INSTALL_DIR)/usr \ + exec_prefix=$(PKG_INSTALL_DIR)/usr \ + PKG_SBIN_DIR=$(PKG_INSTALL_DIR)/usr/sbin \ + PKG_ROOT_SBIN_DIR=$(PKG_INSTALL_DIR)/sbin \ + PKG_MAN_DIR=$(PKG_INSTALL_DIR)/usr/man \ + PKG_LOCALE_DIR=$(PKG_INSTALL_DIR)/usr/share/locale \ + PKG_ROOT_LIB_DIR=$(PKG_INSTALL_DIR)/lib \ + PKG_DOC_DIR=$(PKG_INSTALL_DIR)/usr/share/doc/xfsprogs define Package/xfs-mkfs/install mkdir -p $(1)/usr/sbin diff --git a/package/utils/xfsprogs/patches/001-automake-compat.patch b/package/utils/xfsprogs/patches/001-automake-compat.patch new file mode 100644 index 000000000..ce9289a4a --- /dev/null +++ b/package/utils/xfsprogs/patches/001-automake-compat.patch @@ -0,0 +1,78 @@ +commit 2222aa77e11b959e0e5a0ded3482e56799593bc2 +Author: Jens Muecke +Date: Thu Jan 26 00:34:15 2012 +0100 + + 001-automake-compat + +--- a/configure.in ++++ b/configure.in +@@ -2,7 +2,8 @@ AC_INIT(include/libxfs.h) + AC_PREREQ(2.50) + AC_CONFIG_AUX_DIR([.]) + AC_CONFIG_MACRO_DIR([m4]) +-AC_CONFIG_HEADER(include/platform_defs.h) ++# Put a dummy here (http://www.mail-archive.com/automake@gnu.org/msg09241.html) ++AC_CONFIG_HEADERS([doesnotexist.h include/platform_defs.h]) + AC_PREFIX_DEFAULT(/usr) + + AC_PROG_LIBTOOL +--- a/include/builddefs.in ++++ b/include/builddefs.in +@@ -20,6 +20,8 @@ + ifndef _BUILDDEFS_INCLUDED_ + _BUILDDEFS_INCLUDED_ = 1 + ++SHELL = @SHELL@ ++ + DEBUG = @debug_build@ + OPTIMIZER = @opt_build@ + MALLOCLIB = @malloc_lib@ +--- a/m4/package_types.m4 ++++ b/m4/package_types.m4 +@@ -9,7 +9,7 @@ AC_DEFUN([AC_TYPE_PSINT], + #include + ], [ + __psint_t psint; +- ], AC_DEFINE(HAVE___PSINT_T) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) ++ ], AC_DEFINE([HAVE___PSINT_T], [1], [Define if __psint_t exists]) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) + ]) + + # +@@ -23,7 +23,7 @@ AC_DEFUN([AC_TYPE_PSUNSIGNED], + #include + ], [ + __psunsigned_t psuint; +- ], AC_DEFINE(HAVE___PSUNSIGNED_T) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) ++ ], AC_DEFINE([HAVE___PSUNSIGNED_T], [1], [Define if __psunsigned_t exists]) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) + ]) + + # +@@ -37,7 +37,7 @@ AC_DEFUN([AC_TYPE_U32], + #include + ], [ + __u32 u32; +- ], AC_DEFINE(HAVE___U32) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) ++ ], AC_DEFINE([HAVE___U32], [1], [Define if __u32 exists]) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no)) + ]) + + # +@@ -50,15 +50,15 @@ AC_DEFUN([AC_SIZEOF_POINTERS_AND_LONG], + AC_CHECK_SIZEOF(long, 4) + AC_CHECK_SIZEOF(char *, 4) + if test $ac_cv_sizeof_long -eq 4 -o $ac_cv_sizeof_long -eq 0; then +- AC_DEFINE(HAVE_32BIT_LONG) ++ AC_DEFINE([HAVE_32BIT_LONG], [1], [Define if long is 32bit]) + fi + if test $ac_cv_sizeof_long -eq 8; then +- AC_DEFINE(HAVE_64BIT_LONG) ++ AC_DEFINE([HAVE_64BIT_LONG], [1], [Define if long is 64bit]) + fi + if test $ac_cv_sizeof_char_p -eq 4 -o $ac_cv_sizeof_char_p -eq 0; then +- AC_DEFINE(HAVE_32BIT_PTR) ++ AC_DEFINE([HAVE_32BIT_PTR], [1], [Define if char* is 32bit]) + fi + if test $ac_cv_sizeof_char_p -eq 8; then +- AC_DEFINE(HAVE_64BIT_PTR) ++ AC_DEFINE([HAVE_64BIT_PTR], [1], [Define if char* is 64bit]) + fi + ]) diff --git a/package/utils/xfsprogs/patches/100-no-selftest.patch b/package/utils/xfsprogs/patches/100-no-selftest.patch deleted file mode 100644 index 227016675..000000000 --- a/package/utils/xfsprogs/patches/100-no-selftest.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/libxfs/Makefile -+++ b/libxfs/Makefile -@@ -118,9 +118,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" diff --git a/package/utils/xfsprogs/patches/100-no_aio.patch b/package/utils/xfsprogs/patches/100-no_aio.patch new file mode 100644 index 000000000..4cc85d7de --- /dev/null +++ b/package/utils/xfsprogs/patches/100-no_aio.patch @@ -0,0 +1,19 @@ +commit e72b7bd12fdef06c3494b919376bfe886aa8bb4d +Author: Jens Muecke +Date: Thu Jan 26 00:35:43 2012 +0100 + + 100-no_aio + +--- a/configure.in ++++ b/configure.in +@@ -92,8 +92,8 @@ AC_PACKAGE_GLOBALS(xfsprogs) + AC_PACKAGE_UTILITIES(xfsprogs) + AC_MULTILIB($enable_lib64) + +-AC_PACKAGE_NEED_AIO_H +-AC_PACKAGE_NEED_LIO_LISTIO ++librt="-lrt" ++AC_SUBST(librt) + + AC_PACKAGE_NEED_UUID_H + AC_PACKAGE_NEED_UUIDCOMPARE diff --git a/package/utils/xfsprogs/patches/110-subdirs.patch b/package/utils/xfsprogs/patches/110-subdirs.patch deleted file mode 100644 index 53a6b09ce..000000000 --- a/package/utils/xfsprogs/patches/110-subdirs.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -46,8 +46,7 @@ HDR_SUBDIRS = include libxfs - - DLIB_SUBDIRS = libxlog libxcmd libhandle - LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS) --TOOL_SUBDIRS = copy db estimate fsck growfs io logprint mkfs quota \ -- mdrestore repair rtcp m4 man doc debian -+TOOL_SUBDIRS = db fsck growfs io mkfs repair - - ifneq ("$(PKG_PLATFORM)","darwin") - TOOL_SUBDIRS += fsr diff --git a/package/utils/xfsprogs/patches/110-uclibc_no_ustat.patch b/package/utils/xfsprogs/patches/110-uclibc_no_ustat.patch new file mode 100644 index 000000000..5d5d08c8d --- /dev/null +++ b/package/utils/xfsprogs/patches/110-uclibc_no_ustat.patch @@ -0,0 +1,32 @@ +commit 7b1d0a98e779170232c0a81b4749ab934ec67a7e +Author: Jens Muecke +Date: Thu Jan 26 00:36:42 2012 +0100 + + 110-uclibc_no_ustat + +--- a/libxfs/linux.c ++++ b/libxfs/linux.c +@@ -21,7 +21,6 @@ + #include + #include + #undef ustat +-#include + #include + #include + #include +@@ -49,6 +48,7 @@ static int max_block_alignment; + int + platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose) + { ++#if 0 + /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */ + struct ustat ust[2]; + struct stat64 st; +@@ -68,6 +68,7 @@ platform_check_ismounted(char *name, cha + progname, name); + return 1; + } ++#endif + return 0; + } + diff --git a/package/utils/xfsprogs/patches/120-disable_assert.patch b/package/utils/xfsprogs/patches/120-disable_assert.patch deleted file mode 100644 index 9a970d27a..000000000 --- a/package/utils/xfsprogs/patches/120-disable_assert.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libxfs/libxfs_priv.h -+++ b/libxfs/libxfs_priv.h -@@ -84,9 +84,6 @@ extern uint32_t crc32c_le(uint32_t crc, - /* for all the support code that uses progname in error messages */ - extern char *progname; - --#undef ASSERT --#define ASSERT(ex) assert(ex) -- - #ifndef EWRONGFS - #define EWRONGFS EINVAL - #endif diff --git a/package/utils/xfsprogs/patches/120-portability.patch b/package/utils/xfsprogs/patches/120-portability.patch new file mode 100644 index 000000000..1d5905a67 --- /dev/null +++ b/package/utils/xfsprogs/patches/120-portability.patch @@ -0,0 +1,45 @@ +commit d2aef8b3967e53fe58178f5af50fef488ee0faed +Author: Jens Muecke +Date: Thu Jan 26 00:37:52 2012 +0100 + + 120-portability + +--- a/copy/xfs_copy.c ++++ b/copy/xfs_copy.c +@@ -463,6 +463,15 @@ read_ag_header(int fd, xfs_agnumber_t ag + } + + ++static void sig_mask(int type) ++{ ++ sigset_t mask; ++ sigemptyset(&mask); ++ sigaddset(&mask, SIGCHLD); ++ sigprocmask(type, &mask, NULL); ++} ++ ++ + void + write_wbuf(void) + { +@@ -478,9 +487,9 @@ write_wbuf(void) + if (target[i].state != INACTIVE) + pthread_mutex_unlock(&targ[i].wait); /* wake up */ + +- sigrelse(SIGCHLD); ++ sig_mask(SIG_UNBLOCK); + pthread_mutex_lock(&mainwait); +- sighold(SIGCHLD); ++ sig_mask(SIG_BLOCK); + } + + +@@ -847,7 +856,7 @@ main(int argc, char **argv) + /* set up sigchild signal handler */ + + signal(SIGCHLD, handler); +- sighold(SIGCHLD); ++ sig_mask(SIG_BLOCK); + + /* make children */ + diff --git a/package/utils/xfsprogs/patches/130-uclibc_no_xattr.patch b/package/utils/xfsprogs/patches/130-uclibc_no_xattr.patch new file mode 100644 index 000000000..c5c4a2a2a --- /dev/null +++ b/package/utils/xfsprogs/patches/130-uclibc_no_xattr.patch @@ -0,0 +1,32 @@ +commit 10d6058b24f18cb31889154f830b191849f45106 +Author: Jens Muecke +Date: Thu Jan 26 00:38:27 2012 +0100 + + 130-uclibc_no_xattr + +--- a/fsr/xfs_fsr.c ++++ b/fsr/xfs_fsr.c +@@ -35,7 +35,6 @@ + #include + #include + #include +-#include + + + #ifndef XFS_XFLAG_NODEFRAG +@@ -990,6 +989,7 @@ fsr_setup_attr_fork( + int tfd, + xfs_bstat_t *bstatp) + { ++#if 0 + struct stat64 tstatbuf; + int i; + int last_forkoff = 0; +@@ -1108,6 +1108,7 @@ fsr_setup_attr_fork( + out: + if (dflag) + fsrprintf(_("set temp attr\n")); ++#endif + return 0; + } + diff --git a/package/utils/xfsprogs/patches/140-no_po.patch b/package/utils/xfsprogs/patches/140-no_po.patch new file mode 100644 index 000000000..640774453 --- /dev/null +++ b/package/utils/xfsprogs/patches/140-no_po.patch @@ -0,0 +1,19 @@ +--- a/Makefile ++++ b/Makefile +@@ -41,7 +41,7 @@ endif + + LIB_SUBDIRS = libxfs libxlog libxcmd libhandle libdisk + TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \ +- mdrestore repair rtcp m4 man doc po debian ++ mdrestore repair rtcp m4 man doc debian + + SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +@@ -135,7 +135,6 @@ ifeq ($(HAVE_BUILDDEFS), no) + $(Q)$(MAKE) $(MAKEOPTS) -C . $@ + else + $(Q)$(MAKE) $(MAKEOPTS) $(SRCDIR) +- $(Q)$(MAKE) $(MAKEOPTS) -C po + $(Q)$(MAKE) $(MAKEOPTS) source-link + $(Q)cd $(SRCDIR) && dpkg-buildpackage + endif diff --git a/package/utils/xfsprogs/patches/150-include_fixes.patch b/package/utils/xfsprogs/patches/150-include_fixes.patch new file mode 100644 index 000000000..793622a16 --- /dev/null +++ b/package/utils/xfsprogs/patches/150-include_fixes.patch @@ -0,0 +1,72 @@ +--- a/libhandle/handle.c ++++ b/libhandle/handle.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + /* just pick a value we know is more than big enough */ + #define MAXHANSIZ 64 +--- a/libhandle/jdm.c ++++ b/libhandle/jdm.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + /* internal fshandle - typecast to a void for external use */ + #define FSHANDLE_SZ 8 +--- a/libdisk/evms.c ++++ b/libdisk/evms.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include "evms.h" + +--- a/libdisk/evms.h ++++ b/libdisk/evms.h +@@ -16,6 +16,8 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + ++#include ++ + #define EVMS_MAJOR 117 + #define EVMS_GET_VOL_STRIPE_INFO \ + _IOR(EVMS_MAJOR, 0xF0, struct evms_vol_stripe_info_s) +--- a/libdisk/fstype.h ++++ b/libdisk/fstype.h +@@ -192,7 +192,7 @@ struct adfs_super_block { + char s_dummy2[62]; + char s_checksum[1]; + }; +-#define adfsblksize(s) ((uint) s.s_blksize[0]) ++#define adfsblksize(s) ((unsigned int) s.s_blksize[0]) + + /* found in first 4 bytes of block 1 */ + struct vxfs_super_block { +--- a/fsr/xfs_fsr.c ++++ b/fsr/xfs_fsr.c +@@ -25,6 +25,7 @@ + #include + #include + ++#include + #include + #include + #include +--- a/libdisk/xvm.c ++++ b/libdisk/xvm.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include "xvm.h" + diff --git a/package/utils/xfsprogs/patches/160-format-security.patch b/package/utils/xfsprogs/patches/160-format-security.patch new file mode 100644 index 000000000..5ae627d4a --- /dev/null +++ b/package/utils/xfsprogs/patches/160-format-security.patch @@ -0,0 +1,29 @@ +From: Ben Myers +Date: Fri, 1 Feb 2013 21:50:22 +0000 (-0600) +Subject: xfsprogs: fix warning in libxcmd/input.c +X-Git-Tag: v3.1.11~25 +X-Git-Url: http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs%2Fcmds%2Fxfsprogs.git;a=commitdiff_plain;h=50a3aa8977821ad072f3aa5b63645827f9b8ca1d + +xfsprogs: fix warning in libxcmd/input.c + +Fix an error when building with -Werror=format-security. + +input.c: In function 'fetchline': +input.c:91:2: error: format not a string literal and no format arguments [-Werror=format-security] + +Signed-off-by: Ben Myers +Reported by: Arkadiusz Miśkiewicz +Reviewed-by: Mark Tinguely +--- + +--- a/libxcmd/input.c ++++ b/libxcmd/input.c +@@ -88,7 +88,7 @@ fetchline(void) + + if (!line) + return NULL; +- printf(get_prompt()); ++ printf("%s", get_prompt()); + fflush(stdout); + if (!fgets(line, MAXREADLINESZ, stdin)) { + free(line);