mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fixx
This commit is contained in:
parent
195d479665
commit
d2f5ffb6ad
633 changed files with 210 additions and 13868 deletions
45
6in4/Makefile
Executable file
45
6in4/Makefile
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2010-2015 OpenWrt.org
|
||||||
|
# Copyright (C) 2018-2019 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||||
|
# - Added gateway setting
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=6in4
|
||||||
|
PKG_VERSION:=270
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/6in4
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
DEPENDS:=@IPV6 +kmod-sit +uclient-fetch
|
||||||
|
TITLE:=IPv6-in-IPv4 configuration support
|
||||||
|
MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||||
|
PKGARCH:=all
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/6in4/description
|
||||||
|
Provides support for 6in4 tunnels in /etc/config/network.
|
||||||
|
Refer to http://wiki.openwrt.org/doc/uci/network for
|
||||||
|
configuration details.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/6in4/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/netifd/proto
|
||||||
|
$(INSTALL_BIN) ./files/6in4.sh $(1)/lib/netifd/proto/6in4.sh
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,6in4))
|
149
6in4/files/6in4.sh
Executable file
149
6in4/files/6in4.sh
Executable file
|
@ -0,0 +1,149 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# 6in4.sh - IPv6-in-IPv4 tunnel backend
|
||||||
|
# Copyright (c) 2010-2015 OpenWrt.org
|
||||||
|
|
||||||
|
[ -n "$INCLUDE_ONLY" ] || {
|
||||||
|
. /lib/functions.sh
|
||||||
|
. /lib/functions/network.sh
|
||||||
|
. ../netifd-proto.sh
|
||||||
|
init_proto "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_6in4_update() {
|
||||||
|
sh -c '
|
||||||
|
timeout=5
|
||||||
|
|
||||||
|
(while [ $((timeout--)) -gt 0 ]; do
|
||||||
|
sleep 1
|
||||||
|
kill -0 $$ || exit 0
|
||||||
|
done; kill -9 $$) 2>/dev/null &
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
|
' "$1" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_6in4_add_prefix() {
|
||||||
|
append "$3" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_6in4_setup() {
|
||||||
|
local cfg="$1"
|
||||||
|
local iface="$2"
|
||||||
|
local link="6in4-$cfg"
|
||||||
|
|
||||||
|
local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink tunnelid username password updatekey gateway
|
||||||
|
json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid username password updatekey gateway
|
||||||
|
json_for_each_item proto_6in4_add_prefix ip6prefix ip6prefixes
|
||||||
|
|
||||||
|
[ -z "$peeraddr" ] && {
|
||||||
|
proto_notify_error "$cfg" "MISSING_ADDRESS"
|
||||||
|
proto_block_restart "$cfg"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -n "$tunlink" ] && ( proto_add_host_dependency "$cfg" "$peeraddr" "$tunlink" )
|
||||||
|
|
||||||
|
[ -z "$ipaddr" ] && {
|
||||||
|
local wanif="$tunlink"
|
||||||
|
if [ -z "$wanif" ] && ! network_find_wan wanif; then
|
||||||
|
proto_notify_error "$cfg" "NO_WAN_LINK"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! network_get_ipaddr ipaddr "$wanif"; then
|
||||||
|
proto_notify_error "$cfg" "NO_WAN_LINK"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_init_update "$link" 1
|
||||||
|
|
||||||
|
[ -n "$ip6addr" ] && {
|
||||||
|
local local6="${ip6addr%%/*}"
|
||||||
|
local mask6="${ip6addr##*/}"
|
||||||
|
[[ "$local6" = "$mask6" ]] && mask6=
|
||||||
|
proto_add_ipv6_address "$local6" "$mask6"
|
||||||
|
proto_add_ipv6_route "::" 0 "" "" "" "$local6/$mask6"
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -n "$gateway" ] && {
|
||||||
|
proto_add_ipv6_route "::" 0 "$gateway"
|
||||||
|
}
|
||||||
|
|
||||||
|
for ip6prefix in $ip6prefixes; do
|
||||||
|
proto_add_ipv6_prefix "$ip6prefix"
|
||||||
|
proto_add_ipv6_route "::" 0 "" "" "" "$ip6prefix"
|
||||||
|
done
|
||||||
|
|
||||||
|
proto_add_tunnel
|
||||||
|
json_add_string mode sit
|
||||||
|
json_add_int mtu "${mtu:-1280}"
|
||||||
|
json_add_int ttl "${ttl:-64}"
|
||||||
|
[ -n "$tos" ] && json_add_string tos "$tos"
|
||||||
|
json_add_string local "$ipaddr"
|
||||||
|
json_add_string remote "$peeraddr"
|
||||||
|
[ -n "$tunlink" ] && json_add_string link "$tunlink"
|
||||||
|
proto_close_tunnel
|
||||||
|
|
||||||
|
proto_send_update "$cfg"
|
||||||
|
|
||||||
|
[ -n "$tunnelid" -a -n "$username" -a \( -n "$password" -o -n "$updatekey" \) ] && {
|
||||||
|
[ -n "$updatekey" ] && password="$updatekey"
|
||||||
|
|
||||||
|
local http="http"
|
||||||
|
local urlget="uclient-fetch"
|
||||||
|
local urlget_opts="-qO-"
|
||||||
|
local ca_path="${SSL_CERT_DIR:-/etc/ssl/certs}"
|
||||||
|
|
||||||
|
[ -f /lib/libustream-ssl.so ] && http=https
|
||||||
|
[ "$http" = "https" -a -z "$(find $ca_path -name "*.0" 2>/dev/null)" ] && {
|
||||||
|
urlget_opts="$urlget_opts --no-check-certificate"
|
||||||
|
}
|
||||||
|
|
||||||
|
local url="$http://ipv4.tunnelbroker.net/nic/update?hostname=$tunnelid"
|
||||||
|
local try=0
|
||||||
|
local max=3
|
||||||
|
|
||||||
|
(
|
||||||
|
set -o pipefail
|
||||||
|
while [ $((++try)) -le $max ]; do
|
||||||
|
if proto_6in4_update $urlget $urlget_opts --user="$username" --password="$password" "$url" 2>&1 | \
|
||||||
|
sed -e 's,^Killed$,timeout,' -e "s,^,update $try/$max: ," | \
|
||||||
|
logger -t "$link";
|
||||||
|
then
|
||||||
|
logger -t "$link" "updated"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
logger -t "$link" "update failed"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_6in4_teardown() {
|
||||||
|
local cfg="$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
proto_6in4_init_config() {
|
||||||
|
no_device=1
|
||||||
|
available=1
|
||||||
|
|
||||||
|
proto_config_add_string "ipaddr"
|
||||||
|
proto_config_add_string "ip6addr"
|
||||||
|
proto_config_add_array "ip6prefix"
|
||||||
|
proto_config_add_string "peeraddr"
|
||||||
|
proto_config_add_string "tunlink"
|
||||||
|
proto_config_add_string "tunnelid"
|
||||||
|
proto_config_add_string "username"
|
||||||
|
proto_config_add_string "password"
|
||||||
|
proto_config_add_string "updatekey"
|
||||||
|
proto_config_add_string "gateway"
|
||||||
|
proto_config_add_int "mtu"
|
||||||
|
proto_config_add_int "ttl"
|
||||||
|
proto_config_add_string "tos"
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -n "$INCLUDE_ONLY" ] || {
|
||||||
|
add_protocol 6in4
|
||||||
|
}
|
0
CLA-entity.md
Normal file → Executable file
0
CLA-entity.md
Normal file → Executable file
0
CLA-individual.md
Normal file → Executable file
0
CLA-individual.md
Normal file → Executable file
0
CODE_OF_CONDUCT.md
Normal file → Executable file
0
CODE_OF_CONDUCT.md
Normal file → Executable file
0
CONTRIBUTING.md
Normal file → Executable file
0
CONTRIBUTING.md
Normal file → Executable file
0
LICENSE
Normal file → Executable file
0
LICENSE
Normal file → Executable file
0
README.md
Normal file → Executable file
0
README.md
Normal file → Executable file
0
aquantia/Makefile
Normal file → Executable file
0
aquantia/Makefile
Normal file → Executable file
|
@ -1,58 +0,0 @@
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=bcm27xx-eeprom
|
|
||||||
PKG_VERSION:=47976e4409c6999a8e211976c75c60a97c90275c
|
|
||||||
PKG_RELEASE:=4
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/rpi-eeprom/tar.gz/$(PKG_VERSION)?
|
|
||||||
PKG_HASH:=skip
|
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-3-Clause Custom
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
|
|
||||||
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
|
||||||
|
|
||||||
define Package/bcm27xx-eeprom
|
|
||||||
SECTION:=utils
|
|
||||||
CATEGORY:=Utilities
|
|
||||||
DEPENDS:=bcm27xx-userland +blkid +pciutils +python3-light +coreutils +coreutils-od
|
|
||||||
TITLE:=BCM27xx EEPROM tools
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/bcm27xx-eeprom/description
|
|
||||||
BCM27xx EEPROM tools.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
true
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/bcm27xx-eeprom/conffiles
|
|
||||||
/etc/bcm27xx-eeprom.conf
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/bcm27xx-eeprom/install
|
|
||||||
$(INSTALL_DIR) $(1)/etc
|
|
||||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/rpi-eeprom-update-default $(1)/etc/bcm27xx-eeprom.conf
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rpi-eeprom-config $(1)/usr/bin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rpi-eeprom-update $(1)/usr/bin
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/firmware/release-notes.md $(1)/lib/firmware/raspberrypi/bootloader
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader/critical
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/firmware/critical/ $(1)/lib/firmware/raspberrypi/bootloader/
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader/stable
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/firmware/stable/ $(1)/lib/firmware/raspberrypi/bootloader/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,bcm27xx-eeprom))
|
|
|
@ -1,45 +0,0 @@
|
||||||
From da37f7b051fe6833e25e78184cc9217dd4379187 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
|
||||||
Date: Mon, 23 Mar 2020 10:10:55 +0100
|
|
||||||
Subject: [PATCH] rpi-eeprom-update: OpenWrt defaults
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|
||||||
---
|
|
||||||
rpi-eeprom-update | 6 +++---
|
|
||||||
rpi-eeprom-update-default | 5 +++--
|
|
||||||
2 files changed, 6 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
--- a/rpi-eeprom-update
|
|
||||||
+++ b/rpi-eeprom-update
|
|
||||||
@@ -24,12 +24,12 @@ else
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Selects the release sub-directory
|
|
||||||
-FIRMWARE_RELEASE_STATUS=${FIRMWARE_RELEASE_STATUS:-default}
|
|
||||||
+FIRMWARE_RELEASE_STATUS=${FIRMWARE_RELEASE_STATUS:-stable}
|
|
||||||
FIRMWARE_IMAGE_DIR=${FIRMWARE_IMAGE_DIR:-${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}}
|
|
||||||
-FIRMWARE_BACKUP_DIR=${FIRMWARE_BACKUP_DIR:-/var/lib/raspberrypi/bootloader/backup}
|
|
||||||
+FIRMWARE_BACKUP_DIR=${FIRMWARE_BACKUP_DIR:-${FIRMWARE_ROOT}/backup}
|
|
||||||
ENABLE_VL805_UPDATES=${ENABLE_VL805_UPDATES:-1}
|
|
||||||
RECOVERY_BIN=${RECOVERY_BIN:-${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}/recovery.bin}
|
|
||||||
BOOTFS=${BOOTFS:-/boot}
|
|
||||||
CM4_ENABLE_RPI_EEPROM_UPDATE=${CM4_ENABLE_RPI_EEPROM_UPDATE:-0}
|
|
||||||
RPI_EEPROM_UPDATE_CONFIG_TOOL="${RPI_EEPROM_UPDATE_CONFIG_TOOL:-raspi-config}"
|
|
||||||
|
|
||||||
--- a/rpi-eeprom-update-default
|
|
||||||
+++ b/rpi-eeprom-update-default
|
|
||||||
@@ -1,8 +1,9 @@
|
|
||||||
|
|
||||||
FIRMWARE_ROOT=/lib/firmware/raspberrypi/bootloader
|
|
||||||
-FIRMWARE_RELEASE_STATUS="critical"
|
|
||||||
+FIRMWARE_RELEASE_STATUS="stable"
|
|
||||||
FIRMWARE_IMAGE_DIR="${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}"
|
|
||||||
-FIRMWARE_BACKUP_DIR="/var/lib/raspberrypi/bootloader/backup"
|
|
||||||
+FIRMWARE_BACKUP_DIR="${FIRMWARE_ROOT}/backup"
|
|
||||||
BOOTFS=/boot
|
|
||||||
USE_FLASHROM=0
|
|
||||||
EEPROM_CONFIG_HOOK=
|
|
||||||
+VCMAILBOX=/usr/bin/vcmailbox
|
|
|
@ -1,26 +0,0 @@
|
||||||
From 6674d49dea0104031b3f54df4c7a356dc4307bb2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
|
||||||
Date: Wed, 25 Mar 2020 20:58:35 +0100
|
|
||||||
Subject: [PATCH] rpi-eeprom-update: change default include path
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|
||||||
---
|
|
||||||
rpi-eeprom-update | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
--- a/rpi-eeprom-update
|
|
||||||
+++ b/rpi-eeprom-update
|
|
||||||
@@ -6,8 +6,8 @@ set -e
|
|
||||||
|
|
||||||
script_dir=$(cd "$(dirname "$0")" && pwd)
|
|
||||||
|
|
||||||
-if [ -f /etc/default/rpi-eeprom-update ]; then
|
|
||||||
- . /etc/default/rpi-eeprom-update
|
|
||||||
+if [ -f /etc/bcm27xx-eeprom.conf ]; then
|
|
||||||
+ . /etc/bcm27xx-eeprom.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOCAL_MODE=0
|
|
|
@ -1,24 +0,0 @@
|
||||||
--- a/rpi-eeprom-update 2020-11-05 21:58:02.247836497 +0100
|
|
||||||
+++ b/rpi-eeprom-update 2020-11-05 21:58:36.911266307 +0100
|
|
||||||
@@ -212,8 +212,8 @@
|
|
||||||
|| die "Failed to copy ${TMP_EEPROM_IMAGE} to ${BOOTFS}"
|
|
||||||
|
|
||||||
# For NFS mounts ensure that the files are readable to the TFTP user
|
|
||||||
- chmod -f go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
|
|
||||||
- || die "Failed to set permissions on eeprom update files"
|
|
||||||
+ #chmod -f go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
|
|
||||||
+ # || die "Failed to set permissions on eeprom update files"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${VL805_UPDATE_IMAGE}" ]; then
|
|
||||||
@@ -224,8 +224,8 @@
|
|
||||||
|| die "Failed to copy ${VL805_UPDATE_IMAGE} to ${BOOTFS}/vl805.bin"
|
|
||||||
|
|
||||||
# For NFS mounts ensure that the files are readable to the TFTP user
|
|
||||||
- chmod -f go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
|
|
||||||
- || die "Failed to set permissions on eeprom update files"
|
|
||||||
+ #chmod -f go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
|
|
||||||
+ # || die "Failed to set permissions on eeprom update files"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp -f "${RECOVERY_BIN}" "${BOOTFS}/recovery.bin" \
|
|
0
contributors/cr3ative.md
Normal file → Executable file
0
contributors/cr3ative.md
Normal file → Executable file
0
contributors/example.md
Normal file → Executable file
0
contributors/example.md
Normal file → Executable file
|
@ -1,58 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2014 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
|
|
||||||
PKG_NAME:=cryptodev-linux
|
|
||||||
PKG_VERSION:=1.12
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
||||||
PKG_HASH:=f51c2254749233b1b1d7ec9445158bd709f124f88e1c650fe2faac83c3a81938
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
|
||||||
PKG_LICENSE_FILES:=COPYING
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
|
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define KernelPackage/cryptodev
|
|
||||||
SUBMENU:=Cryptographic API modules
|
|
||||||
TITLE:=Driver for cryptographic acceleration
|
|
||||||
URL:=http://cryptodev-linux.org/
|
|
||||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
|
||||||
DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
|
|
||||||
FILES:=$(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
|
|
||||||
AUTOLOAD:=$(call AutoLoad,50,cryptodev)
|
|
||||||
MODPARAMS.cryptodev:=cryptodev_verbosity=-1
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KernelPackage/cryptodev/description
|
|
||||||
This is a driver for that allows to use the Linux kernel supported
|
|
||||||
hardware ciphers by user-space applications.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Configure
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
||||||
$(KERNEL_MAKE_FLAGS) \
|
|
||||||
KERNEL_DIR="$(LINUX_DIR)"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call KernelPackage,cryptodev))
|
|
0
dsvpn/Makefile
Normal file → Executable file
0
dsvpn/Makefile
Normal file → Executable file
0
dsvpn/patches/nofirewall.patch
Normal file → Executable file
0
dsvpn/patches/nofirewall.patch
Normal file → Executable file
0
dsvpn/patches/nostrip.patch
Normal file → Executable file
0
dsvpn/patches/nostrip.patch
Normal file → Executable file
0
glorytun-udp/Makefile
Normal file → Executable file
0
glorytun-udp/Makefile
Normal file → Executable file
0
glorytun-udp/patches/aegis-arm.patch
Normal file → Executable file
0
glorytun-udp/patches/aegis-arm.patch
Normal file → Executable file
0
glorytun/Makefile
Normal file → Executable file
0
glorytun/Makefile
Normal file → Executable file
0
glorytun/glorytun.config
Normal file → Executable file
0
glorytun/glorytun.config
Normal file → Executable file
2
golang/golang-golang-x-crypto/Makefile → golang-golang-x-crypto/Makefile
Normal file → Executable file
2
golang/golang-golang-x-crypto/Makefile → golang-golang-x-crypto/Makefile
Normal file → Executable file
|
@ -27,7 +27,7 @@ GO_PKG:=golang.org/x/crypto
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
GO_PKG_SOURCE_ONLY:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include ../golang-package.mk
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||||
|
|
||||||
define Package/golang-golang-x-crypto-dev
|
define Package/golang-golang-x-crypto-dev
|
||||||
$(call GoPackage/GoSubMenu)
|
$(call GoPackage/GoSubMenu)
|
2
golang/golang-golang-x-net/Makefile → golang-golang-x-net/Makefile
Normal file → Executable file
2
golang/golang-golang-x-net/Makefile → golang-golang-x-net/Makefile
Normal file → Executable file
|
@ -29,7 +29,7 @@ GO_PKG:=golang.org/x/net
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
GO_PKG_SOURCE_ONLY:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include ../golang-package.mk
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||||
|
|
||||||
define Package/golang-golang-x-net-dev
|
define Package/golang-golang-x-net-dev
|
||||||
$(call GoPackage/GoSubMenu)
|
$(call GoPackage/GoSubMenu)
|
2
golang/golang-golang-x-sys/Makefile → golang-golang-x-sys/Makefile
Normal file → Executable file
2
golang/golang-golang-x-sys/Makefile → golang-golang-x-sys/Makefile
Normal file → Executable file
|
@ -27,7 +27,7 @@ GO_PKG:=golang.org/x/sys
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
GO_PKG_SOURCE_ONLY:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include ../golang-package.mk
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||||
|
|
||||||
define Package/golang-golang-x-sys-dev
|
define Package/golang-golang-x-sys-dev
|
||||||
$(call GoPackage/GoSubMenu)
|
$(call GoPackage/GoSubMenu)
|
2
golang/golang-golang-x-text/Makefile → golang-golang-x-text/Makefile
Normal file → Executable file
2
golang/golang-golang-x-text/Makefile → golang-golang-x-text/Makefile
Normal file → Executable file
|
@ -29,7 +29,7 @@ GO_PKG:=golang.org/x/text
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
GO_PKG_SOURCE_ONLY:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include ../golang-package.mk
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||||
|
|
||||||
define Package/golang-golang-x-text-dev
|
define Package/golang-golang-x-text-dev
|
||||||
$(call GoPackage/GoSubMenu)
|
$(call GoPackage/GoSubMenu)
|
2
golang-protobuf/Makefile
Normal file → Executable file
2
golang-protobuf/Makefile
Normal file → Executable file
|
@ -25,7 +25,7 @@ GO_PKG:=github.com/golang/protobuf
|
||||||
GO_PKG_SOURCE_ONLY:=1
|
GO_PKG_SOURCE_ONLY:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include ../golang/golang-package.mk
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||||
|
|
||||||
define Package/golang-protobuf-dev
|
define Package/golang-protobuf-dev
|
||||||
$(call GoPackage/GoSubMenu)
|
$(call GoPackage/GoSubMenu)
|
||||||
|
|
|
@ -1,204 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
nl="
|
|
||||||
"
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# shellcheck disable=SC2039
|
|
||||||
local IFS=" "
|
|
||||||
printf '%s\n' "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
log_error() {
|
|
||||||
# shellcheck disable=SC2039
|
|
||||||
local IFS=" "
|
|
||||||
printf 'Error: %s\n' "$*" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
link_contents() {
|
|
||||||
# shellcheck disable=SC2039
|
|
||||||
local src="$1" dest="$2" IFS="$nl" dirs dir base
|
|
||||||
|
|
||||||
if [ -n "$(find "$src" -mindepth 1 -maxdepth 1 -name "*.go" -not -type d)" ]; then
|
|
||||||
log_error "$src is already a Go library"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
dirs="$(find "$src" -mindepth 1 -maxdepth 1 -type d)"
|
|
||||||
for dir in $dirs; do
|
|
||||||
base="${dir##*/}"
|
|
||||||
if [ -d "$dest/$base" ]; then
|
|
||||||
case "$dir" in
|
|
||||||
*$GO_BUILD_DEPENDS_SRC/$GO_PKG)
|
|
||||||
log "$GO_PKG is already installed. Please check for circular dependencies."
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
link_contents "$src/$base" "$dest/$base"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
log "...${src#$GO_BUILD_DEPENDS_SRC}/$base"
|
|
||||||
ln -sf "$src/$base" "$dest/$base"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
configure() {
|
|
||||||
# shellcheck disable=SC2039
|
|
||||||
local files code testdata gomod pattern extra IFS file dest
|
|
||||||
|
|
||||||
cd "$BUILD_DIR" || return 1
|
|
||||||
|
|
||||||
files="$(find ./ -path "*/.*" -prune -o -not -type d -print)"
|
|
||||||
|
|
||||||
if [ "$GO_INSTALL_ALL" != 1 ]; then
|
|
||||||
code="$(printf '%s\n' "$files" | grep '\.\(c\|cc\|cpp\|go\|h\|hh\|hpp\|proto\|s\)$')"
|
|
||||||
testdata="$(printf '%s\n' "$files" | grep '/testdata/')"
|
|
||||||
gomod="$(printf '%s\n' "$files" | grep '/go\.\(mod\|sum\)$')"
|
|
||||||
|
|
||||||
for pattern in $GO_INSTALL_EXTRA; do
|
|
||||||
extra="$(printf '%s\n' "$extra"; printf '%s\n' "$files" | grep -e "$pattern")"
|
|
||||||
done
|
|
||||||
|
|
||||||
files="$(printf '%s\n%s\n%s\n%s\n' "$code" "$testdata" "$gomod" "$extra" | grep -v '^[[:space:]]*$' | sort -u)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
IFS="$nl"
|
|
||||||
|
|
||||||
log "Copying files from $BUILD_DIR into $GO_BUILD_DIR/src/$GO_PKG"
|
|
||||||
mkdir -p "$GO_BUILD_DIR/src"
|
|
||||||
for file in $files; do
|
|
||||||
log "${file#./}"
|
|
||||||
dest="$GO_BUILD_DIR/src/$GO_PKG/${file#./}"
|
|
||||||
mkdir -p "${dest%/*}"
|
|
||||||
cp -fpR "$file" "$dest"
|
|
||||||
done
|
|
||||||
log
|
|
||||||
|
|
||||||
if [ "$GO_SOURCE_ONLY" != 1 ]; then
|
|
||||||
if [ -d "$GO_BUILD_DEPENDS_SRC" ]; then
|
|
||||||
log "Symlinking directories from $GO_BUILD_DEPENDS_SRC into $GO_BUILD_DIR/src"
|
|
||||||
link_contents "$GO_BUILD_DEPENDS_SRC" "$GO_BUILD_DIR/src"
|
|
||||||
else
|
|
||||||
log "$GO_BUILD_DEPENDS_SRC does not exist, skipping symlinks"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
log "Not building binaries, skipping symlinks"
|
|
||||||
fi
|
|
||||||
log
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
|
||||||
# shellcheck disable=SC2039
|
|
||||||
local modargs pattern targets retval
|
|
||||||
|
|
||||||
cd "$GO_BUILD_DIR" || return 1
|
|
||||||
|
|
||||||
if [ -f "$BUILD_DIR/go.mod" ] ; then
|
|
||||||
mkdir -p "$GO_MOD_CACHE_DIR"
|
|
||||||
modargs="$GO_MOD_ARGS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
log "Finding targets"
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
targets="$(go list $modargs $GO_BUILD_PKG)"
|
|
||||||
for pattern in $GO_EXCLUDES; do
|
|
||||||
targets="$(printf '%s\n' "$targets" | grep -v "$pattern")"
|
|
||||||
done
|
|
||||||
log
|
|
||||||
|
|
||||||
if [ "$GO_GO_GENERATE" = 1 ]; then
|
|
||||||
log "Calling go generate"
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
GOOS='' GOARCH='' GO386='' GOARM='' GOMIPS='' GOMIPS64='' \
|
|
||||||
go generate -v $targets
|
|
||||||
log
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$GO_SOURCE_ONLY" = 1 ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
log "Building targets"
|
|
||||||
mkdir -p "$GO_BUILD_DIR/bin" "$GO_BUILD_CACHE_DIR"
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
go install $modargs "$@" $targets
|
|
||||||
retval="$?"
|
|
||||||
log
|
|
||||||
|
|
||||||
if [ "$retval" -eq 0 ] && [ -z "$(find "$GO_BUILD_BIN_DIR" -maxdepth 0 -type d -not -empty 2>/dev/null)" ]; then
|
|
||||||
log_error "No binaries were built"
|
|
||||||
retval=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$retval" -ne 0 ]; then
|
|
||||||
cache_cleanup
|
|
||||||
fi
|
|
||||||
|
|
||||||
return "$retval"
|
|
||||||
}
|
|
||||||
|
|
||||||
install_bin() {
|
|
||||||
# shellcheck disable=SC2039
|
|
||||||
local dest="$1"
|
|
||||||
install -d -m0755 "$dest/$GO_INSTALL_BIN_PATH"
|
|
||||||
install -m0755 "$GO_BUILD_BIN_DIR"/* "$dest/$GO_INSTALL_BIN_PATH/"
|
|
||||||
}
|
|
||||||
|
|
||||||
install_src() {
|
|
||||||
# shellcheck disable=SC2039
|
|
||||||
local dest="$1" dir="${GO_PKG%/*}"
|
|
||||||
install -d -m0755 "$dest/$GO_BUILD_DEPENDS_PATH/src/$dir"
|
|
||||||
cp -fpR "$GO_BUILD_DIR/src/$GO_PKG" "$dest/$GO_BUILD_DEPENDS_PATH/src/$dir/"
|
|
||||||
}
|
|
||||||
|
|
||||||
cache_cleanup() {
|
|
||||||
if ! [ -d "$GO_MOD_CACHE_DIR" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# in case go is called without -modcacherw
|
|
||||||
find "$GO_MOD_CACHE_DIR" -type d -not -perm -u+w -exec chmod u+w '{}' +
|
|
||||||
|
|
||||||
if [ -n "$CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE" ]; then
|
|
||||||
find "$GO_MOD_CACHE_DIR" -type d -not -perm -go+rx -exec chmod go+rx '{}' +
|
|
||||||
find "$GO_MOD_CACHE_DIR" -not -type d -not -perm -go+r -exec chmod go+r '{}' +
|
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$#" -lt 1 ]; then
|
|
||||||
log_error "Missing command"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
command="$1"
|
|
||||||
shift 1
|
|
||||||
|
|
||||||
case "$command" in
|
|
||||||
configure)
|
|
||||||
configure
|
|
||||||
;;
|
|
||||||
build)
|
|
||||||
build "$@"
|
|
||||||
;;
|
|
||||||
install_bin)
|
|
||||||
install_bin "$@"
|
|
||||||
;;
|
|
||||||
install_src)
|
|
||||||
install_src "$@"
|
|
||||||
;;
|
|
||||||
cache_cleanup)
|
|
||||||
cache_cleanup
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
log_error "Invalid command \"$command\""
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -1,188 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2018, 2020 Jeffery To
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
ifeq ($(origin GO_INCLUDE_DIR),undefined)
|
|
||||||
GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(GO_INCLUDE_DIR)/golang-values.mk
|
|
||||||
|
|
||||||
|
|
||||||
# $(1) valid GOOS_GOARCH combinations
|
|
||||||
# $(2) go version id
|
|
||||||
define GoCompiler/Default/CheckHost
|
|
||||||
$(if $(filter $(GO_HOST_OS_ARCH),$(1)),,$(error go-$(2) cannot be installed on $(GO_HOST_OS)/$(GO_HOST_ARCH)))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) source go root
|
|
||||||
# $(2) destination prefix
|
|
||||||
# $(3) go version id
|
|
||||||
# $(4) additional environment variables (optional)
|
|
||||||
define GoCompiler/Default/Make
|
|
||||||
( \
|
|
||||||
cd "$(1)/src" ; \
|
|
||||||
$(if $(2),GOROOT_FINAL="$(2)/lib/go-$(3)") \
|
|
||||||
$(4) \
|
|
||||||
$(BASH) make.bash --no-banner ; \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) destination prefix
|
|
||||||
# $(2) go version id
|
|
||||||
define GoCompiler/Default/Install/make-dirs
|
|
||||||
$(INSTALL_DIR) "$(1)/lib/go-$(2)"
|
|
||||||
$(INSTALL_DIR) "$(1)/share/go-$(2)"
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) source go root
|
|
||||||
# $(2) destination prefix
|
|
||||||
# $(3) go version id
|
|
||||||
# $(4) file/directory name
|
|
||||||
define GoCompiler/Default/Install/install-share-data
|
|
||||||
$(CP) "$(1)/$(4)" "$(2)/share/go-$(3)/"
|
|
||||||
$(LN) "../../share/go-$(3)/$(4)" "$(2)/lib/go-$(3)/"
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) source go root
|
|
||||||
# $(2) destination prefix
|
|
||||||
# $(3) go version id
|
|
||||||
# $(4) GOOS_GOARCH
|
|
||||||
# $(5) install suffix (optional)
|
|
||||||
define GoCompiler/Default/Install/Bin
|
|
||||||
$(call GoCompiler/Default/Install/make-dirs,$(2),$(3))
|
|
||||||
|
|
||||||
$(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),api)
|
|
||||||
|
|
||||||
$(INSTALL_DATA) -p "$(1)/VERSION" "$(2)/lib/go-$(3)/"
|
|
||||||
|
|
||||||
for file in AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README.md SECURITY.md; do \
|
|
||||||
if [ -f "$(1)/$$$$file" ]; then \
|
|
||||||
$(INSTALL_DATA) -p "$(1)/$$$$file" "$(2)/share/go-$(3)/" ; \
|
|
||||||
fi ; \
|
|
||||||
done
|
|
||||||
|
|
||||||
$(INSTALL_DIR) "$(2)/lib/go-$(3)/bin"
|
|
||||||
|
|
||||||
ifeq ($(4),$(GO_HOST_OS_ARCH))
|
|
||||||
$(INSTALL_BIN) -p "$(1)/bin"/* "$(2)/lib/go-$(3)/bin/"
|
|
||||||
else
|
|
||||||
$(INSTALL_BIN) -p "$(1)/bin/$(4)"/* "$(2)/lib/go-$(3)/bin/"
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg"
|
|
||||||
$(CP) "$(1)/pkg/$(4)$(if $(5),_$(5))" "$(2)/lib/go-$(3)/pkg/"
|
|
||||||
|
|
||||||
$(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg/tool/$(4)"
|
|
||||||
$(INSTALL_BIN) -p "$(1)/pkg/tool/$(4)"/* "$(2)/lib/go-$(3)/pkg/tool/$(4)/"
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) destination prefix
|
|
||||||
# $(2) go version id
|
|
||||||
define GoCompiler/Default/Install/BinLinks
|
|
||||||
$(INSTALL_DIR) "$(1)/bin"
|
|
||||||
$(LN) "../lib/go-$(2)/bin/go" "$(1)/bin/go"
|
|
||||||
$(LN) "../lib/go-$(2)/bin/gofmt" "$(1)/bin/gofmt"
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) source go root
|
|
||||||
# $(2) destination prefix
|
|
||||||
# $(3) go version id
|
|
||||||
define GoCompiler/Default/Install/Doc
|
|
||||||
$(call GoCompiler/Default/Install/make-dirs,$(2),$(3))
|
|
||||||
|
|
||||||
$(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),doc)
|
|
||||||
$(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),favicon.ico)
|
|
||||||
$(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),robots.txt)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) source go root
|
|
||||||
# $(2) destination prefix
|
|
||||||
# $(3) go version id
|
|
||||||
define GoCompiler/Default/Install/Src
|
|
||||||
$(call GoCompiler/Default/Install/make-dirs,$(2),$(3))
|
|
||||||
|
|
||||||
$(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),lib)
|
|
||||||
$(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),misc)
|
|
||||||
$(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),src)
|
|
||||||
$(call GoCompiler/Default/Install/install-share-data,$(1),$(2),$(3),test)
|
|
||||||
|
|
||||||
$(FIND) \
|
|
||||||
"$(2)/share/go-$(3)/src/" \
|
|
||||||
\! -type d -a \( -name "*.bat" -o -name "*.rc" \) \
|
|
||||||
-delete
|
|
||||||
|
|
||||||
if [ -d "$(1)/pkg/include" ]; then \
|
|
||||||
$(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg" ; \
|
|
||||||
$(INSTALL_DIR) "$(2)/share/go-$(3)/pkg" ; \
|
|
||||||
$(CP) "$(1)/pkg/include" "$(2)/share/go-$(3)/pkg/" ; \
|
|
||||||
$(LN) "../../../share/go-$(3)/pkg/include" "$(2)/lib/go-$(3)/pkg/" ; \
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) destination prefix
|
|
||||||
# $(2) go version id
|
|
||||||
define GoCompiler/Default/Uninstall
|
|
||||||
rm -rf "$(1)/lib/go-$(2)"
|
|
||||||
rm -rf "$(1)/share/go-$(2)"
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) destination prefix
|
|
||||||
define GoCompiler/Default/Uninstall/BinLinks
|
|
||||||
rm -f "$(1)/bin/go"
|
|
||||||
rm -f "$(1)/bin/gofmt"
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
# $(1) profile name
|
|
||||||
# $(2) source go root
|
|
||||||
# $(3) destination prefix
|
|
||||||
# $(4) go version id
|
|
||||||
# $(5) GOOS_GOARCH
|
|
||||||
# $(6) install suffix (optional)
|
|
||||||
define GoCompiler/AddProfile
|
|
||||||
|
|
||||||
# $$(1) valid GOOS_GOARCH combinations
|
|
||||||
define GoCompiler/$(1)/CheckHost
|
|
||||||
$$(call GoCompiler/Default/CheckHost,$$(1),$(4))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $$(1) additional environment variables (optional)
|
|
||||||
define GoCompiler/$(1)/Make
|
|
||||||
$$(call GoCompiler/Default/Make,$(2),$(3),$(4),$$(1))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $$(1) override install prefix (optional)
|
|
||||||
define GoCompiler/$(1)/Install/Bin
|
|
||||||
$$(call GoCompiler/Default/Install/Bin,$(2),$$(or $$(1),$(3)),$(4),$(5),$(6))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $$(1) override install prefix (optional)
|
|
||||||
define GoCompiler/$(1)/Install/BinLinks
|
|
||||||
$$(call GoCompiler/Default/Install/BinLinks,$$(or $$(1),$(3)),$(4))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $$(1) override install prefix (optional)
|
|
||||||
define GoCompiler/$(1)/Install/Doc
|
|
||||||
$$(call GoCompiler/Default/Install/Doc,$(2),$$(or $$(1),$(3)),$(4))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $$(1) override install prefix (optional)
|
|
||||||
define GoCompiler/$(1)/Install/Src
|
|
||||||
$$(call GoCompiler/Default/Install/Src,$(2),$$(or $$(1),$(3)),$(4))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $$(1) override install prefix (optional)
|
|
||||||
define GoCompiler/$(1)/Uninstall
|
|
||||||
$$(call GoCompiler/Default/Uninstall,$$(or $$(1),$(3)),$(4))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $$(1) override install prefix (optional)
|
|
||||||
define GoCompiler/$(1)/Uninstall/BinLinks
|
|
||||||
$$(call GoCompiler/Default/Uninstall/BinLinks,$$(or $$(1),$(3)))
|
|
||||||
endef
|
|
||||||
|
|
||||||
endef
|
|
|
@ -1,220 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2020 Jeffery To
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
ifeq ($(origin GO_INCLUDE_DIR),undefined)
|
|
||||||
GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(GO_INCLUDE_DIR)/golang-values.mk
|
|
||||||
|
|
||||||
|
|
||||||
# these variables have the same meanings as in golang-package.mk
|
|
||||||
GO_HOST_INSTALL_EXTRA?=$(GO_PKG_INSTALL_EXTRA)
|
|
||||||
GO_HOST_INSTALL_ALL?=$(GO_PKG_INSTALL_ALL)
|
|
||||||
GO_HOST_SOURCE_ONLY?=$(GO_PKG_SOURCE_ONLY)
|
|
||||||
GO_HOST_BUILD_PKG?=$(GO_PKG_BUILD_PKG)
|
|
||||||
GO_HOST_EXCLUDES?=$(GO_PKG_EXCLUDES)
|
|
||||||
GO_HOST_GO_GENERATE?=$(GO_PKG_GO_GENERATE)
|
|
||||||
GO_HOST_GCFLAGS?=$(GO_PKG_GCFLAGS)
|
|
||||||
GO_HOST_LDFLAGS?=$(GO_PKG_LDFLAGS)
|
|
||||||
GO_HOST_LDFLAGS_X?=$(GO_PKG_LDFLAGS_X)
|
|
||||||
GO_HOST_TAGS?=$(GO_PKG_TAGS)
|
|
||||||
GO_HOST_INSTALL_BIN_PATH?=/bin
|
|
||||||
|
|
||||||
|
|
||||||
# need to repeat this here in case golang-package.mk is not included
|
|
||||||
GO_PKG_BUILD_PKG?=$(strip $(GO_PKG))/...
|
|
||||||
|
|
||||||
GO_HOST_WORK_DIR_NAME:=.go_work
|
|
||||||
GO_HOST_BUILD_DIR=$(HOST_BUILD_DIR)/$(GO_HOST_WORK_DIR_NAME)/build
|
|
||||||
GO_HOST_BUILD_BIN_DIR=$(GO_HOST_BUILD_DIR)/bin
|
|
||||||
|
|
||||||
GO_HOST_BUILD_DEPENDS_PATH:=/share/gocode
|
|
||||||
GO_HOST_BUILD_DEPENDS_SRC=$(STAGING_DIR_HOSTPKG)$(GO_HOST_BUILD_DEPENDS_PATH)/src
|
|
||||||
|
|
||||||
GO_HOST_DIR_NAME:=$(lastword $(subst /,$(space),$(CURDIR)))
|
|
||||||
GO_HOST_STAGING_DIR:=$(TMP_DIR)/host-stage-$(GO_HOST_DIR_NAME)
|
|
||||||
GO_HOST_STAGING_FILES_LIST_DIR:=$(HOST_BUILD_PREFIX)/stamp
|
|
||||||
GO_HOST_BIN_STAGING_FILES_LIST:=$(GO_HOST_STAGING_FILES_LIST_DIR)/$(GO_HOST_DIR_NAME)-bin.list
|
|
||||||
GO_HOST_SRC_STAGING_FILES_LIST:=$(GO_HOST_STAGING_FILES_LIST_DIR)/$(GO_HOST_DIR_NAME)-src.list
|
|
||||||
|
|
||||||
ifeq ($(GO_HOST_PIE_SUPPORTED),1)
|
|
||||||
GO_HOST_ENABLE_PIE:=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
GO_HOST_BUILD_CONFIG_VARS= \
|
|
||||||
GO_PKG="$(strip $(GO_PKG))" \
|
|
||||||
GO_INSTALL_EXTRA="$(strip $(GO_HOST_INSTALL_EXTRA))" \
|
|
||||||
GO_INSTALL_ALL="$(strip $(GO_HOST_INSTALL_ALL))" \
|
|
||||||
GO_SOURCE_ONLY="$(strip $(GO_HOST_SOURCE_ONLY))" \
|
|
||||||
GO_BUILD_PKG="$(strip $(GO_HOST_BUILD_PKG))" \
|
|
||||||
GO_EXCLUDES="$(strip $(GO_HOST_EXCLUDES))" \
|
|
||||||
GO_GO_GENERATE="$(strip $(GO_HOST_GO_GENERATE))" \
|
|
||||||
GO_INSTALL_BIN_PATH="$(strip $(GO_HOST_INSTALL_BIN_PATH))" \
|
|
||||||
BUILD_DIR="$(HOST_BUILD_DIR)" \
|
|
||||||
GO_BUILD_DIR="$(GO_HOST_BUILD_DIR)" \
|
|
||||||
GO_BUILD_BIN_DIR="$(GO_HOST_BUILD_BIN_DIR)" \
|
|
||||||
GO_BUILD_DEPENDS_PATH="$(GO_HOST_BUILD_DEPENDS_PATH)" \
|
|
||||||
GO_BUILD_DEPENDS_SRC="$(GO_HOST_BUILD_DEPENDS_SRC)"
|
|
||||||
|
|
||||||
GO_HOST_MORE_CFLAGS?= \
|
|
||||||
-Wformat -Werror=format-security \
|
|
||||||
-fstack-protector-strong \
|
|
||||||
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
|
|
||||||
-Wl,-z,now -Wl,-z,relro \
|
|
||||||
$(if $(GO_HOST_ENABLE_PIE),$(FPIC))
|
|
||||||
|
|
||||||
GO_HOST_MORE_LDFLAGS?= \
|
|
||||||
-znow -zrelro \
|
|
||||||
$(if $(GO_HOST_ENABLE_PIE),$(FPIC) -specs=$(INCLUDE_DIR)/hardened-ld-pie.specs)
|
|
||||||
|
|
||||||
GO_HOST_TARGET_VARS= \
|
|
||||||
CGO_ENABLED=1 \
|
|
||||||
CC=gcc \
|
|
||||||
CXX=g++ \
|
|
||||||
PKG_CONFIG=pkg-config \
|
|
||||||
CGO_CFLAGS="$(HOST_CFLAGS) $(GO_HOST_MORE_CFLAGS)" \
|
|
||||||
CGO_CPPFLAGS="$(HOST_CPPFLAGS) $(GO_HOST_MORE_CPPFLAGS)" \
|
|
||||||
CGO_CXXFLAGS="$(HOST_CFLAGS) $(GO_HOST_MORE_CFLAGS)" \
|
|
||||||
CGO_LDFLAGS="$(HOST_LDFLAGS) $(GO_HOST_MORE_LDFLAGS)" \
|
|
||||||
GO_GCC_HELPER_CC="$(HOSTCC)" \
|
|
||||||
GO_GCC_HELPER_CXX="$(HOSTCXX)" \
|
|
||||||
GO_GCC_HELPER_PATH="$$$$PATH" \
|
|
||||||
PATH="$(STAGING_DIR_HOSTPKG)/lib/go-cross/openwrt:$$$$PATH"
|
|
||||||
|
|
||||||
GO_HOST_BUILD_VARS= \
|
|
||||||
GOPATH="$(GO_HOST_BUILD_DIR)" \
|
|
||||||
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
|
||||||
GOMODCACHE="$(GO_MOD_CACHE_DIR)" \
|
|
||||||
GOENV=off
|
|
||||||
|
|
||||||
GO_HOST_VARS= \
|
|
||||||
$(GO_HOST_TARGET_VARS) \
|
|
||||||
$(GO_HOST_BUILD_VARS)
|
|
||||||
|
|
||||||
GO_HOST_DEFAULT_LDFLAGS= \
|
|
||||||
-linkmode external \
|
|
||||||
-extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(HOST_LDFLAGS) $(GO_HOST_MORE_LDFLAGS))'
|
|
||||||
|
|
||||||
GO_HOST_CUSTOM_LDFLAGS= \
|
|
||||||
$(GO_HOST_LDFLAGS) \
|
|
||||||
$(patsubst %,-X %,$(GO_HOST_LDFLAGS_X))
|
|
||||||
|
|
||||||
GO_HOST_INSTALL_ARGS= \
|
|
||||||
-v \
|
|
||||||
-ldflags "all=$(GO_HOST_DEFAULT_LDFLAGS)" \
|
|
||||||
$(if $(filter $(GO_HOST_ENABLE_PIE),1),-buildmode pie) \
|
|
||||||
$(if $(GO_HOST_GCFLAGS),-gcflags "$(GO_HOST_GCFLAGS)") \
|
|
||||||
$(if $(GO_HOST_CUSTOM_LDFLAGS),-ldflags "$(GO_HOST_CUSTOM_LDFLAGS) $(GO_HOST_DEFAULT_LDFLAGS)") \
|
|
||||||
$(if $(GO_HOST_TAGS),-tags "$(GO_HOST_TAGS)")
|
|
||||||
|
|
||||||
define GoHost/Host/Configure
|
|
||||||
$(GO_GENERAL_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_HOST_BUILD_CONFIG_VARS) \
|
|
||||||
$(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh configure
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) additional arguments for go command line (optional)
|
|
||||||
define GoHost/Host/Compile
|
|
||||||
$(GO_GENERAL_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_HOST_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_HOST_VARS) \
|
|
||||||
$(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh build $(GO_HOST_INSTALL_ARGS) $(1)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoHost/Host/Install/Bin
|
|
||||||
rm -rf "$(GO_HOST_STAGING_DIR)"
|
|
||||||
mkdir -p "$(GO_HOST_STAGING_DIR)" "$(GO_HOST_STAGING_FILES_LIST_DIR)"
|
|
||||||
|
|
||||||
$(GO_GENERAL_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_HOST_BUILD_CONFIG_VARS) \
|
|
||||||
$(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_bin "$(GO_HOST_STAGING_DIR)"
|
|
||||||
|
|
||||||
if [ -f "$(GO_HOST_BIN_STAGING_FILES_LIST)" ]; then \
|
|
||||||
"$(SCRIPT_DIR)/clean-package.sh" \
|
|
||||||
"$(GO_HOST_BIN_STAGING_FILES_LIST)" \
|
|
||||||
"$(1)" ; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$(GO_HOST_STAGING_DIR)" && find ./ > "$(GO_HOST_STAGING_DIR).files"
|
|
||||||
|
|
||||||
$(call locked, \
|
|
||||||
mv "$(GO_HOST_STAGING_DIR).files" "$(GO_HOST_BIN_STAGING_FILES_LIST)" && \
|
|
||||||
$(CP) "$(GO_HOST_STAGING_DIR)"/* "$(1)/", \
|
|
||||||
host-staging-dir \
|
|
||||||
)
|
|
||||||
|
|
||||||
rm -rf "$(GO_HOST_STAGING_DIR)"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoHost/Host/Install/Src
|
|
||||||
rm -rf "$(GO_HOST_STAGING_DIR)"
|
|
||||||
mkdir -p "$(GO_HOST_STAGING_DIR)" "$(GO_HOST_STAGING_FILES_LIST_DIR)"
|
|
||||||
|
|
||||||
$(GO_GENERAL_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_HOST_BUILD_CONFIG_VARS) \
|
|
||||||
$(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_src "$(GO_HOST_STAGING_DIR)"
|
|
||||||
|
|
||||||
if [ -f "$(GO_HOST_SRC_STAGING_FILES_LIST)" ]; then \
|
|
||||||
"$(SCRIPT_DIR)/clean-package.sh" \
|
|
||||||
"$(GO_HOST_SRC_STAGING_FILES_LIST)" \
|
|
||||||
"$(1)" ; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$(GO_HOST_STAGING_DIR)" && find ./ > "$(GO_HOST_STAGING_DIR).files"
|
|
||||||
|
|
||||||
$(call locked, \
|
|
||||||
mv "$(GO_HOST_STAGING_DIR).files" "$(GO_HOST_SRC_STAGING_FILES_LIST)" && \
|
|
||||||
$(CP) "$(GO_HOST_STAGING_DIR)"/* "$(1)/", \
|
|
||||||
host-staging-dir \
|
|
||||||
)
|
|
||||||
|
|
||||||
rm -rf "$(GO_HOST_STAGING_DIR)"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoHost/Host/Install
|
|
||||||
$(if $(filter $(GO_HOST_SOURCE_ONLY),1),, \
|
|
||||||
$(call GoHost/Host/Install/Bin,$(1)) \
|
|
||||||
)
|
|
||||||
$(call GoHost/Host/Install/Src,$(1))
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoHost/Host/Uninstall
|
|
||||||
if [ -f "$(GO_HOST_BIN_STAGING_FILES_LIST)" ]; then \
|
|
||||||
"$(SCRIPT_DIR)/clean-package.sh" \
|
|
||||||
"$(GO_HOST_BIN_STAGING_FILES_LIST)" \
|
|
||||||
"$(HOST_BUILD_PREFIX)" ; \
|
|
||||||
rm -f "$(GO_HOST_BIN_STAGING_FILES_LIST)" ; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$(GO_HOST_SRC_STAGING_FILES_LIST)" ]; then \
|
|
||||||
"$(SCRIPT_DIR)/clean-package.sh" \
|
|
||||||
"$(GO_HOST_SRC_STAGING_FILES_LIST)" \
|
|
||||||
"$(HOST_BUILD_PREFIX)" ; \
|
|
||||||
rm -f "$(GO_HOST_SRC_STAGING_FILES_LIST)" ; \
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
ifneq ($(strip $(GO_PKG)),)
|
|
||||||
Host/Configure=$(call GoHost/Host/Configure)
|
|
||||||
Host/Compile=$(call GoHost/Host/Compile)
|
|
||||||
Hooks/HostCompile/Post+=Go/CacheCleanup
|
|
||||||
Host/Uninstall=$(call GoHost/Host/Uninstall,$(1))
|
|
||||||
endif
|
|
||||||
|
|
||||||
define GoHostBuild
|
|
||||||
Host/Install=$$(call GoHost/Host/Install,$$(1))
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoBinHostBuild
|
|
||||||
Host/Install=$$(call GoHost/Host/Install/Bin,$$(1))
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoSrcHostBuild
|
|
||||||
Host/Install=$$(call GoHost/Host/Install/Src,$$(1))
|
|
||||||
endef
|
|
|
@ -1,327 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2018-2020 Jeffery To
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
ifeq ($(origin GO_INCLUDE_DIR),undefined)
|
|
||||||
GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(GO_INCLUDE_DIR)/golang-values.mk
|
|
||||||
|
|
||||||
|
|
||||||
# Variables (all optional, except GO_PKG) to be set in package
|
|
||||||
# Makefiles:
|
|
||||||
#
|
|
||||||
# GO_PKG (required) - name of Go package
|
|
||||||
#
|
|
||||||
# Go name of the package.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG:=golang.org/x/text
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_INSTALL_EXTRA - list of regular expressions, default empty
|
|
||||||
#
|
|
||||||
# Additional files/directories to install. By default, only these
|
|
||||||
# files are installed:
|
|
||||||
#
|
|
||||||
# * Files with one of these extensions:
|
|
||||||
# .go, .c, .cc, .cpp, .h, .hh, .hpp, .proto, .s
|
|
||||||
#
|
|
||||||
# * Files in any 'testdata' directory
|
|
||||||
#
|
|
||||||
# * go.mod and go.sum, in any directory
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_INSTALL_ALL - boolean (0 or 1), default false
|
|
||||||
#
|
|
||||||
# If true, install all files regardless of extension or directory.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_INSTALL_ALL:=1
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_SOURCE_ONLY - boolean (0 or 1), default false
|
|
||||||
#
|
|
||||||
# If true, 'go install' will not be called. If the package does not
|
|
||||||
# (or should not) build any binaries, then specifying this option will
|
|
||||||
# save build time.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_SOURCE_ONLY:=1
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_BUILD_PKG - list of build targets, default GO_PKG/...
|
|
||||||
#
|
|
||||||
# Build targets for compiling this Go package, i.e. arguments passed
|
|
||||||
# to 'go install'.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_BUILD_PKG:=github.com/debian/ratt/cmd/...
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_EXCLUDES - list of regular expressions, default empty
|
|
||||||
#
|
|
||||||
# Patterns to exclude from the build targets expanded from
|
|
||||||
# GO_PKG_BUILD_PKG.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_EXCLUDES:=examples/
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_GO_GENERATE - boolean (0 or 1), default false
|
|
||||||
#
|
|
||||||
# If true, 'go generate' will be called on all build targets (as
|
|
||||||
# determined by GO_PKG_BUILD_PKG and GO_PKG_EXCLUDES). This is usually
|
|
||||||
# not necessary.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_GO_GENERATE:=1
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_GCFLAGS - list of options, default empty
|
|
||||||
#
|
|
||||||
# Additional go tool compile options to use when building targets.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_GCFLAGS:=-N -l
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_LDFLAGS - list of options, default empty
|
|
||||||
#
|
|
||||||
# Additional go tool link options to use when building targets.
|
|
||||||
#
|
|
||||||
# Note that the OpenWrt build system has an option to strip binaries
|
|
||||||
# (enabled by default), so -s (Omit the symbol table and debug
|
|
||||||
# information) and -w (Omit the DWARF symbol table) flags are not
|
|
||||||
# necessary.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_LDFLAGS:=-r dir1:dir2 -u
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_LDFLAGS_X - list of string variable definitions, default empty
|
|
||||||
#
|
|
||||||
# Each definition will be passed as the parameter to the -X go tool
|
|
||||||
# link option, i.e. -ldflags "-X importpath.name=value".
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION) main.BuildStamp=$(SOURCE_DATE_EPOCH)
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_TAGS - list of build tags, default empty
|
|
||||||
#
|
|
||||||
# Build tags to consider satisfied during the build, passed as the
|
|
||||||
# parameter to the -tags option for 'go install'.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_TAGS:=release,noupgrade
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# GO_PKG_INSTALL_BIN_PATH - target directory path, default /usr/bin
|
|
||||||
#
|
|
||||||
# Directory path under "dest_dir" where binaries will be installed by
|
|
||||||
# '$(call GoPackage/Package/Install/Bin,dest_dir)'.
|
|
||||||
#
|
|
||||||
# e.g. GO_PKG_INSTALL_BIN_PATH:=/sbin
|
|
||||||
|
|
||||||
# Credit for this package build process (GoPackage/Build/Configure and
|
|
||||||
# GoPackage/Build/Compile) belong to Debian's dh-golang completely.
|
|
||||||
# https://salsa.debian.org/go-team/packages/dh-golang
|
|
||||||
|
|
||||||
|
|
||||||
GO_PKG_BUILD_PKG?=$(strip $(GO_PKG))/...
|
|
||||||
GO_PKG_INSTALL_BIN_PATH?=/usr/bin
|
|
||||||
|
|
||||||
GO_PKG_WORK_DIR_NAME:=.go_work
|
|
||||||
GO_PKG_BUILD_DIR=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME)/build
|
|
||||||
GO_PKG_BUILD_BIN_DIR=$(GO_PKG_BUILD_DIR)/bin$(if $(GO_HOST_TARGET_DIFFERENT),/$(GO_OS_ARCH))
|
|
||||||
|
|
||||||
GO_PKG_BUILD_DEPENDS_PATH:=/usr/share/gocode
|
|
||||||
GO_PKG_BUILD_DEPENDS_SRC=$(STAGING_DIR)$(GO_PKG_BUILD_DEPENDS_PATH)/src
|
|
||||||
|
|
||||||
ifdef CONFIG_PKG_ASLR_PIE_ALL
|
|
||||||
ifeq ($(strip $(PKG_ASLR_PIE)),1)
|
|
||||||
ifeq ($(GO_TARGET_PIE_SUPPORTED),1)
|
|
||||||
GO_PKG_ENABLE_PIE:=1
|
|
||||||
else
|
|
||||||
$(warning PIE buildmode is not supported for $(GO_OS)/$(GO_ARCH))
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_PKG_ASLR_PIE_REGULAR
|
|
||||||
ifeq ($(strip $(PKG_ASLR_PIE_REGULAR)),1)
|
|
||||||
ifeq ($(GO_TARGET_PIE_SUPPORTED),1)
|
|
||||||
GO_PKG_ENABLE_PIE:=1
|
|
||||||
else
|
|
||||||
$(warning PIE buildmode is not supported for $(GO_OS)/$(GO_ARCH))
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_GOLANG_SPECTRE
|
|
||||||
ifeq ($(GO_TARGET_SPECTRE_SUPPORTED),1)
|
|
||||||
GO_PKG_ENABLE_SPECTRE:=1
|
|
||||||
else
|
|
||||||
$(warning Spectre mitigations are not supported for $(GO_ARCH))
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# sstrip causes corrupted section header size
|
|
||||||
ifneq ($(CONFIG_USE_SSTRIP),)
|
|
||||||
ifneq ($(CONFIG_DEBUG),)
|
|
||||||
GO_PKG_STRIP_ARGS:=--strip-unneeded --remove-section=.comment --remove-section=.note
|
|
||||||
else
|
|
||||||
GO_PKG_STRIP_ARGS:=--strip-all
|
|
||||||
endif
|
|
||||||
STRIP:=$(TARGET_CROSS)strip $(GO_PKG_STRIP_ARGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
define GoPackage/GoSubMenu
|
|
||||||
SUBMENU:=Go
|
|
||||||
SECTION:=lang
|
|
||||||
CATEGORY:=Languages
|
|
||||||
endef
|
|
||||||
|
|
||||||
GO_PKG_BUILD_CONFIG_VARS= \
|
|
||||||
GO_PKG="$(strip $(GO_PKG))" \
|
|
||||||
GO_INSTALL_EXTRA="$(strip $(GO_PKG_INSTALL_EXTRA))" \
|
|
||||||
GO_INSTALL_ALL="$(strip $(GO_PKG_INSTALL_ALL))" \
|
|
||||||
GO_SOURCE_ONLY="$(strip $(GO_PKG_SOURCE_ONLY))" \
|
|
||||||
GO_BUILD_PKG="$(strip $(GO_PKG_BUILD_PKG))" \
|
|
||||||
GO_EXCLUDES="$(strip $(GO_PKG_EXCLUDES))" \
|
|
||||||
GO_GO_GENERATE="$(strip $(GO_PKG_GO_GENERATE))" \
|
|
||||||
GO_INSTALL_BIN_PATH="$(strip $(GO_PKG_INSTALL_BIN_PATH))" \
|
|
||||||
BUILD_DIR="$(PKG_BUILD_DIR)" \
|
|
||||||
GO_BUILD_DIR="$(GO_PKG_BUILD_DIR)" \
|
|
||||||
GO_BUILD_BIN_DIR="$(GO_PKG_BUILD_BIN_DIR)" \
|
|
||||||
GO_BUILD_DEPENDS_PATH="$(GO_PKG_BUILD_DEPENDS_PATH)" \
|
|
||||||
GO_BUILD_DEPENDS_SRC="$(GO_PKG_BUILD_DEPENDS_SRC)"
|
|
||||||
|
|
||||||
GO_PKG_TARGET_VARS= \
|
|
||||||
GOOS="$(GO_OS)" \
|
|
||||||
GOARCH="$(GO_ARCH)" \
|
|
||||||
GO386="$(GO_386)" \
|
|
||||||
GOARM="$(GO_ARM)" \
|
|
||||||
GOMIPS="$(GO_MIPS)" \
|
|
||||||
GOMIPS64="$(GO_MIPS64)" \
|
|
||||||
CGO_ENABLED=1 \
|
|
||||||
CC="$(TARGET_CC)" \
|
|
||||||
CXX="$(TARGET_CXX)" \
|
|
||||||
CGO_CFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CFLAGS))" \
|
|
||||||
CGO_CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
|
||||||
CGO_CXXFLAGS="$(filter-out $(GO_CFLAGS_TO_REMOVE),$(TARGET_CXXFLAGS))" \
|
|
||||||
CGO_LDFLAGS="$(TARGET_LDFLAGS)"
|
|
||||||
|
|
||||||
GO_PKG_BUILD_VARS= \
|
|
||||||
GOPATH="$(GO_PKG_BUILD_DIR)" \
|
|
||||||
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
|
||||||
GOMODCACHE="$(GO_MOD_CACHE_DIR)" \
|
|
||||||
GOENV=off
|
|
||||||
|
|
||||||
GO_PKG_VARS= \
|
|
||||||
$(GO_PKG_TARGET_VARS) \
|
|
||||||
$(GO_PKG_BUILD_VARS)
|
|
||||||
|
|
||||||
GO_PKG_DEFAULT_GCFLAGS= \
|
|
||||||
$(if $(GO_PKG_ENABLE_SPECTRE),-spectre all)
|
|
||||||
|
|
||||||
GO_PKG_DEFAULT_ASMFLAGS= \
|
|
||||||
$(if $(GO_PKG_ENABLE_SPECTRE),-spectre all)
|
|
||||||
|
|
||||||
GO_PKG_DEFAULT_LDFLAGS= \
|
|
||||||
-buildid '$(SOURCE_DATE_EPOCH)' \
|
|
||||||
-linkmode external \
|
|
||||||
-extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(TARGET_LDFLAGS))'
|
|
||||||
|
|
||||||
GO_PKG_CUSTOM_LDFLAGS= \
|
|
||||||
$(GO_PKG_LDFLAGS) \
|
|
||||||
$(patsubst %,-X %,$(GO_PKG_LDFLAGS_X))
|
|
||||||
|
|
||||||
GO_PKG_INSTALL_ARGS= \
|
|
||||||
-v \
|
|
||||||
-trimpath \
|
|
||||||
-ldflags "all=$(GO_PKG_DEFAULT_LDFLAGS)" \
|
|
||||||
$(if $(GO_PKG_DEFAULT_GCFLAGS),-gcflags "all=$(GO_PKG_DEFAULT_GCFLAGS)") \
|
|
||||||
$(if $(GO_PKG_DEFAULT_ASMFLAGS),-asmflags "all=$(GO_PKG_DEFAULT_ASMFLAGS)") \
|
|
||||||
$(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie) \
|
|
||||||
$(if $(filter $(GO_ARCH),arm),-installsuffix "v$(GO_ARM)") \
|
|
||||||
$(if $(filter $(GO_ARCH),mips mipsle),-installsuffix "$(GO_MIPS)") \
|
|
||||||
$(if $(filter $(GO_ARCH),mips64 mips64le),-installsuffix "$(GO_MIPS64)") \
|
|
||||||
$(if $(GO_PKG_GCFLAGS),-gcflags "$(GO_PKG_GCFLAGS) $(GO_PKG_DEFAULT_GCFLAGS)") \
|
|
||||||
$(if $(GO_PKG_CUSTOM_LDFLAGS),-ldflags "$(GO_PKG_CUSTOM_LDFLAGS) $(GO_PKG_DEFAULT_LDFLAGS)") \
|
|
||||||
$(if $(GO_PKG_TAGS),-tags "$(GO_PKG_TAGS)")
|
|
||||||
|
|
||||||
define GoPackage/Build/Configure
|
|
||||||
$(GO_GENERAL_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_PKG_BUILD_CONFIG_VARS) \
|
|
||||||
$(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh configure
|
|
||||||
endef
|
|
||||||
|
|
||||||
# $(1) additional arguments for go command line (optional)
|
|
||||||
define GoPackage/Build/Compile
|
|
||||||
$(GO_GENERAL_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_PKG_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_PKG_VARS) \
|
|
||||||
$(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh build $(GO_PKG_INSTALL_ARGS) $(1)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoPackage/Build/InstallDev
|
|
||||||
$(call GoPackage/Package/Install/Src,$(1))
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoPackage/Package/Install/Bin
|
|
||||||
$(GO_GENERAL_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_PKG_BUILD_CONFIG_VARS) \
|
|
||||||
$(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_bin "$(1)"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoPackage/Package/Install/Src
|
|
||||||
$(GO_GENERAL_BUILD_CONFIG_VARS) \
|
|
||||||
$(GO_PKG_BUILD_CONFIG_VARS) \
|
|
||||||
$(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh install_src "$(1)"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoPackage/Package/Install
|
|
||||||
$(if $(filter $(GO_PKG_SOURCE_ONLY),1),, \
|
|
||||||
$(call GoPackage/Package/Install/Bin,$(1)) \
|
|
||||||
)
|
|
||||||
$(call GoPackage/Package/Install/Src,$(1))
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
ifneq ($(strip $(GO_PKG)),)
|
|
||||||
ifeq ($(GO_TARGET_SPECTRE_SUPPORTED),1)
|
|
||||||
PKG_CONFIG_DEPENDS+=CONFIG_GOLANG_SPECTRE
|
|
||||||
endif
|
|
||||||
|
|
||||||
Build/Configure=$(call GoPackage/Build/Configure)
|
|
||||||
Build/Compile=$(call GoPackage/Build/Compile)
|
|
||||||
Hooks/Compile/Post+=Go/CacheCleanup
|
|
||||||
Build/InstallDev=$(call GoPackage/Build/InstallDev,$(1))
|
|
||||||
endif
|
|
||||||
|
|
||||||
define GoPackage
|
|
||||||
ifndef Package/$(1)/install
|
|
||||||
Package/$(1)/install=$$(call GoPackage/Package/Install,$$(1))
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoBinPackage
|
|
||||||
ifndef Package/$(1)/install
|
|
||||||
Package/$(1)/install=$$(call GoPackage/Package/Install/Bin,$$(1))
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
define GoSrcPackage
|
|
||||||
ifndef Package/$(1)/install
|
|
||||||
Package/$(1)/install=$$(call GoPackage/Package/Install/Src,$$(1))
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
# Deprecated variables - these will be removed after the next OpenWrt release
|
|
||||||
GO_PKG_PATH=$(GO_PKG_BUILD_DEPENDS_PATH)
|
|
||||||
GO_PKG_WORK_DIR=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME)
|
|
||||||
GO_PKG_CACHE_DIR=$(GO_BUILD_CACHE_DIR)
|
|
||||||
GO_PKG_DEFAULT_VARS=$(GO_PKG_VARS)
|
|
||||||
GoPackage/Environment=$(GO_PKG_VARS)
|
|
||||||
GoPackage/is_dir_not_empty=$$$$($(FIND) "$(1)" -maxdepth 0 -type d \! -empty 2>/dev/null)
|
|
||||||
GoPackage/has_binaries=$(call GoPackage/is_dir_not_empty,$(GO_PKG_BUILD_BIN_DIR))
|
|
||||||
# End of deprecated variables
|
|
|
@ -1,256 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2018, 2020 Jeffery To
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
ifeq ($(origin GO_INCLUDE_DIR),undefined)
|
|
||||||
GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Unset environment variables
|
|
||||||
# There are more magic variables to track down, but ain't nobody got time for that
|
|
||||||
|
|
||||||
# From https://pkg.go.dev/cmd/go#hdr-Environment_variables
|
|
||||||
|
|
||||||
# General-purpose environment variables:
|
|
||||||
unexport \
|
|
||||||
GO111MODULE \
|
|
||||||
GCCGO \
|
|
||||||
GOARCH \
|
|
||||||
GOBIN \
|
|
||||||
GOCACHE \
|
|
||||||
GOMODCACHE \
|
|
||||||
GODEBUG \
|
|
||||||
GOENV \
|
|
||||||
GOFLAGS \
|
|
||||||
GOOS \
|
|
||||||
GOPATH \
|
|
||||||
GOROOT \
|
|
||||||
GOTMPDIR
|
|
||||||
# Unmodified:
|
|
||||||
# GOINSECURE
|
|
||||||
# GOPRIVATE
|
|
||||||
# GOPROXY
|
|
||||||
# GONOPROXY
|
|
||||||
# GOSUMDB
|
|
||||||
# GONOSUMDB
|
|
||||||
# GOVCS
|
|
||||||
|
|
||||||
# Environment variables for use with cgo:
|
|
||||||
unexport \
|
|
||||||
AR \
|
|
||||||
CC \
|
|
||||||
CGO_ENABLED \
|
|
||||||
CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \
|
|
||||||
CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \
|
|
||||||
CGO_CXXFLAGS CGO_CXXFLAGS_ALLOW CGO_CXXFLAGS_DISALLOW \
|
|
||||||
CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \
|
|
||||||
CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \
|
|
||||||
CXX \
|
|
||||||
FC
|
|
||||||
# Unmodified:
|
|
||||||
# PKG_CONFIG
|
|
||||||
|
|
||||||
# Architecture-specific environment variables:
|
|
||||||
unexport \
|
|
||||||
GOARM \
|
|
||||||
GO386 \
|
|
||||||
GOMIPS \
|
|
||||||
GOMIPS64 \
|
|
||||||
GOWASM
|
|
||||||
|
|
||||||
# Special-purpose environment variables:
|
|
||||||
unexport \
|
|
||||||
GCCGOTOOLDIR \
|
|
||||||
GOEXPERIMENT \
|
|
||||||
GOROOT_FINAL \
|
|
||||||
GO_EXTLINK_ENABLED
|
|
||||||
# Unmodified:
|
|
||||||
# GIT_ALLOW_PROTOCOL
|
|
||||||
|
|
||||||
# From https://pkg.go.dev/runtime#hdr-Environment_Variables
|
|
||||||
unexport \
|
|
||||||
GOGC \
|
|
||||||
GOMAXPROCS \
|
|
||||||
GORACE \
|
|
||||||
GOTRACEBACK
|
|
||||||
|
|
||||||
# From https://pkg.go.dev/cmd/cgo#hdr-Using_cgo_with_the_go_command
|
|
||||||
unexport \
|
|
||||||
CC_FOR_TARGET \
|
|
||||||
CXX_FOR_TARGET
|
|
||||||
# Todo:
|
|
||||||
# CC_FOR_${GOOS}_${GOARCH}
|
|
||||||
# CXX_FOR_${GOOS}_${GOARCH}
|
|
||||||
|
|
||||||
# From https://golang.org/doc/install/source#environment
|
|
||||||
unexport \
|
|
||||||
GOHOSTOS \
|
|
||||||
GOHOSTARCH \
|
|
||||||
GOPPC64
|
|
||||||
|
|
||||||
# From https://golang.org/src/make.bash
|
|
||||||
unexport \
|
|
||||||
GO_GCFLAGS \
|
|
||||||
GO_LDFLAGS \
|
|
||||||
GO_LDSO \
|
|
||||||
GO_DISTFLAGS \
|
|
||||||
GOBUILDTIMELOGFILE \
|
|
||||||
GOROOT_BOOTSTRAP
|
|
||||||
|
|
||||||
# From https://golang.org/doc/go1.9#parallel-compile
|
|
||||||
unexport \
|
|
||||||
GO19CONCURRENTCOMPILATION
|
|
||||||
|
|
||||||
# From https://golang.org/src/cmd/dist/build.go
|
|
||||||
unexport \
|
|
||||||
BOOT_GO_GCFLAGS \
|
|
||||||
BOOT_GO_LDFLAGS
|
|
||||||
|
|
||||||
# From https://golang.org/src/cmd/dist/buildtool.go
|
|
||||||
unexport \
|
|
||||||
GOBOOTSTRAP_TOOLEXEC
|
|
||||||
|
|
||||||
|
|
||||||
# GOOS / GOARCH
|
|
||||||
|
|
||||||
go_arch=$(subst \
|
|
||||||
aarch64,arm64,$(subst \
|
|
||||||
i386,386,$(subst \
|
|
||||||
mipsel,mipsle,$(subst \
|
|
||||||
mips64el,mips64le,$(subst \
|
|
||||||
powerpc64,ppc64,$(subst \
|
|
||||||
x86_64,amd64,$(1)))))))
|
|
||||||
|
|
||||||
GO_OS:=linux
|
|
||||||
GO_ARCH:=$(call go_arch,$(ARCH))
|
|
||||||
GO_OS_ARCH:=$(GO_OS)_$(GO_ARCH)
|
|
||||||
|
|
||||||
GO_HOST_OS:=$(call tolower,$(HOST_OS))
|
|
||||||
GO_HOST_ARCH:=$(call go_arch,$(subst \
|
|
||||||
armv6l,arm,$(subst \
|
|
||||||
armv7l,arm,$(subst \
|
|
||||||
i686,i386,$(HOST_ARCH)))))
|
|
||||||
GO_HOST_OS_ARCH:=$(GO_HOST_OS)_$(GO_HOST_ARCH)
|
|
||||||
|
|
||||||
ifeq ($(GO_OS_ARCH),$(GO_HOST_OS_ARCH))
|
|
||||||
GO_HOST_TARGET_SAME:=1
|
|
||||||
else
|
|
||||||
GO_HOST_TARGET_DIFFERENT:=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(GO_ARCH),386)
|
|
||||||
ifeq ($(CONFIG_TARGET_x86_geode)$(CONFIG_TARGET_x86_legacy),y)
|
|
||||||
GO_386:=softfloat
|
|
||||||
else
|
|
||||||
GO_386:=sse2
|
|
||||||
endif
|
|
||||||
|
|
||||||
# -fno-plt: causes "unexpected GOT reloc for non-dynamic symbol" errors
|
|
||||||
GO_CFLAGS_TO_REMOVE:=-fno-plt
|
|
||||||
|
|
||||||
else ifeq ($(GO_ARCH),arm)
|
|
||||||
GO_TARGET_FPU:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE))))
|
|
||||||
|
|
||||||
# FPU names from https://gcc.gnu.org/onlinedocs/gcc-8.4.0/gcc/ARM-Options.html#index-mfpu-1
|
|
||||||
# see also https://github.com/gcc-mirror/gcc/blob/releases/gcc-8.4.0/gcc/config/arm/arm-cpus.in
|
|
||||||
|
|
||||||
ifeq ($(GO_TARGET_FPU),)
|
|
||||||
GO_ARM:=5
|
|
||||||
else ifneq ($(filter $(GO_TARGET_FPU),vfp vfpv2),)
|
|
||||||
GO_ARM:=6
|
|
||||||
else
|
|
||||||
GO_ARM:=7
|
|
||||||
endif
|
|
||||||
|
|
||||||
else ifneq ($(filter $(GO_ARCH),mips mipsle),)
|
|
||||||
ifeq ($(CONFIG_HAS_FPU),y)
|
|
||||||
GO_MIPS:=hardfloat
|
|
||||||
else
|
|
||||||
GO_MIPS:=softfloat
|
|
||||||
endif
|
|
||||||
|
|
||||||
# -mips32r2: conflicts with -march=mips32 set by go
|
|
||||||
GO_CFLAGS_TO_REMOVE:=-mips32r2
|
|
||||||
|
|
||||||
else ifneq ($(filter $(GO_ARCH),mips64 mips64le),)
|
|
||||||
ifeq ($(CONFIG_HAS_FPU),y)
|
|
||||||
GO_MIPS64:=hardfloat
|
|
||||||
else
|
|
||||||
GO_MIPS64:=softfloat
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Target Go
|
|
||||||
|
|
||||||
GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mips64||mips64el||mipsel||powerpc64||x86_64)
|
|
||||||
|
|
||||||
|
|
||||||
# ASLR/PIE
|
|
||||||
|
|
||||||
# From https://golang.org/src/cmd/internal/sys/supported.go
|
|
||||||
GO_PIE_SUPPORTED_OS_ARCH:= \
|
|
||||||
android_386 android_amd64 android_arm android_arm64 \
|
|
||||||
linux_386 linux_amd64 linux_arm linux_arm64 \
|
|
||||||
\
|
|
||||||
windows_386 windows_amd64 windows_arm \
|
|
||||||
\
|
|
||||||
darwin_amd64 darwin_arm64 \
|
|
||||||
ios_amd64 ios_arm64 \
|
|
||||||
\
|
|
||||||
freebsd_amd64 \
|
|
||||||
\
|
|
||||||
aix_ppc64 \
|
|
||||||
\
|
|
||||||
linux_ppc64le linux_riscv64 linux_s390x
|
|
||||||
|
|
||||||
# From https://golang.org/src/cmd/go/internal/work/init.go
|
|
||||||
go_pie_install_suffix=$(if $(filter $(1),aix_ppc64 windows_386 windows_amd64 windows_arm),,shared)
|
|
||||||
|
|
||||||
ifneq ($(filter $(GO_HOST_OS_ARCH),$(GO_PIE_SUPPORTED_OS_ARCH)),)
|
|
||||||
GO_HOST_PIE_SUPPORTED:=1
|
|
||||||
GO_HOST_PIE_INSTALL_SUFFIX:=$(call go_pie_install_suffix,$(GO_HOST_OS_ARCH))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(filter $(GO_OS_ARCH),$(GO_PIE_SUPPORTED_OS_ARCH)),)
|
|
||||||
GO_TARGET_PIE_SUPPORTED:=1
|
|
||||||
GO_TARGET_PIE_INSTALL_SUFFIX:=$(call go_pie_install_suffix,$(GO_OS_ARCH))
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Spectre mitigations
|
|
||||||
|
|
||||||
GO_SPECTRE_SUPPORTED_ARCH:=amd64
|
|
||||||
|
|
||||||
ifneq ($(filter $(GO_HOST_ARCH),$(GO_SPECTRE_SUPPORTED_ARCH)),)
|
|
||||||
GO_HOST_SPECTRE_SUPPORTED:=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(filter $(GO_ARCH),$(GO_SPECTRE_SUPPORTED_ARCH)),)
|
|
||||||
GO_TARGET_SPECTRE_SUPPORTED:=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# General build info
|
|
||||||
|
|
||||||
GO_BUILD_CACHE_DIR:=$(or $(call qstrip,$(CONFIG_GOLANG_BUILD_CACHE_DIR)),$(TMP_DIR)/go-build)
|
|
||||||
GO_MOD_CACHE_DIR:=$(DL_DIR)/go-mod-cache
|
|
||||||
|
|
||||||
GO_MOD_ARGS= \
|
|
||||||
-modcacherw
|
|
||||||
|
|
||||||
GO_GENERAL_BUILD_CONFIG_VARS= \
|
|
||||||
CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE="$(CONFIG_GOLANG_MOD_CACHE_WORLD_READABLE)" \
|
|
||||||
GO_BUILD_CACHE_DIR="$(GO_BUILD_CACHE_DIR)" \
|
|
||||||
GO_MOD_CACHE_DIR="$(GO_MOD_CACHE_DIR)" \
|
|
||||||
GO_MOD_ARGS="$(GO_MOD_ARGS)"
|
|
||||||
|
|
||||||
define Go/CacheCleanup
|
|
||||||
$(GO_GENERAL_BUILD_CONFIG_VARS) \
|
|
||||||
$(SHELL) $(GO_INCLUDE_DIR)/golang-build.sh cache_cleanup
|
|
||||||
endef
|
|
|
@ -1,33 +0,0 @@
|
||||||
menu "Configuration"
|
|
||||||
|
|
||||||
config GOLANG_EXTERNAL_BOOTSTRAP_ROOT
|
|
||||||
string "External bootstrap Go root directory"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Path to a working Go tree (>= Go 1.4), with bin, pkg, and src
|
|
||||||
subdirectories and the Go compiler at bin/go.
|
|
||||||
|
|
||||||
If specified, the existing Go installation will be used to
|
|
||||||
compile host (buildroot) Go.
|
|
||||||
|
|
||||||
Leave blank to compile the default bootstrap Go.
|
|
||||||
|
|
||||||
config GOLANG_BUILD_CACHE_DIR
|
|
||||||
string "Go build cache directory"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Store the Go build cache in this directory.
|
|
||||||
If not set, uses './.go-build'.
|
|
||||||
|
|
||||||
config GOLANG_MOD_CACHE_WORLD_READABLE
|
|
||||||
bool "Ensure Go module cache is world-readable"
|
|
||||||
default n
|
|
||||||
|
|
||||||
config GOLANG_SPECTRE
|
|
||||||
bool "Enable Spectre mitigations"
|
|
||||||
default n
|
|
||||||
depends on x86_64
|
|
||||||
help
|
|
||||||
Currently only available for x86-64 (amd64).
|
|
||||||
|
|
||||||
endmenu
|
|
|
@ -1,368 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2018, 2020 Jeffery To
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
GO_VERSION_MAJOR_MINOR:=1.17
|
|
||||||
GO_VERSION_PATCH:=3
|
|
||||||
|
|
||||||
PKG_NAME:=golang
|
|
||||||
PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
GO_SOURCE_URLS:=https://dl.google.com/go/ \
|
|
||||||
https://mirrors.ustc.edu.cn/golang/ \
|
|
||||||
https://mirrors.nju.edu.cn/golang/
|
|
||||||
|
|
||||||
PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
|
|
||||||
PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
|
|
||||||
PKG_HASH:=705c64251e5b25d5d55ede1039c6aa22bea40a7a931d14c370339853643c3df0
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
|
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
PKG_CPE_ID:=cpe:/a:golang:go
|
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=golang/host
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/go-$(PKG_VERSION)
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
PKG_USE_MIPS16:=0
|
|
||||||
|
|
||||||
PKG_GO_PREFIX:=/usr
|
|
||||||
PKG_GO_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR)
|
|
||||||
PKG_GO_ROOT:=$(PKG_GO_PREFIX)/lib/go-$(PKG_GO_VERSION_ID)
|
|
||||||
|
|
||||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/go-$(PKG_VERSION)
|
|
||||||
HOST_BUILD_PARALLEL:=1
|
|
||||||
|
|
||||||
HOST_GO_PREFIX:=$(STAGING_DIR_HOSTPKG)
|
|
||||||
HOST_GO_VERSION_ID:=cross
|
|
||||||
HOST_GO_ROOT:=$(HOST_GO_PREFIX)/lib/go-$(HOST_GO_VERSION_ID)
|
|
||||||
|
|
||||||
HOST_GO_VALID_OS_ARCH:= \
|
|
||||||
android_386 android_amd64 android_arm android_arm64 \
|
|
||||||
freebsd_386 freebsd_amd64 freebsd_arm freebsd_arm64 \
|
|
||||||
linux_386 linux_amd64 linux_arm linux_arm64 \
|
|
||||||
openbsd_386 openbsd_amd64 openbsd_arm openbsd_arm64 \
|
|
||||||
netbsd_386 netbsd_amd64 netbsd_arm netbsd_arm64 \
|
|
||||||
windows_386 windows_amd64 windows_arm windows_arm64 \
|
|
||||||
\
|
|
||||||
plan9_386 plan9_amd64 plan9_arm \
|
|
||||||
\
|
|
||||||
darwin_amd64 darwin_arm64 \
|
|
||||||
ios_amd64 ios_arm64 \
|
|
||||||
\
|
|
||||||
dragonfly_amd64 \
|
|
||||||
illumos_amd64 \
|
|
||||||
solaris_amd64 \
|
|
||||||
\
|
|
||||||
aix_ppc64 \
|
|
||||||
js_wasm \
|
|
||||||
\
|
|
||||||
linux_ppc64 linux_ppc64le \
|
|
||||||
linux_mips linux_mipsle linux_mips64 linux_mips64le \
|
|
||||||
linux_riscv64 linux_s390x \
|
|
||||||
\
|
|
||||||
openbsd_mips64
|
|
||||||
|
|
||||||
BOOTSTRAP_SOURCE:=go1.4-bootstrap-20171003.tar.gz
|
|
||||||
BOOTSTRAP_SOURCE_URL:=$(GO_SOURCE_URLS)
|
|
||||||
BOOTSTRAP_HASH:=f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52
|
|
||||||
|
|
||||||
BOOTSTRAP_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap
|
|
||||||
|
|
||||||
BOOTSTRAP_GO_VALID_OS_ARCH:= \
|
|
||||||
darwin_386 darwin_amd64 \
|
|
||||||
dragonfly_386 dragonfly_amd64 \
|
|
||||||
freebsd_386 freebsd_amd64 freebsd_arm \
|
|
||||||
linux_386 linux_amd64 linux_arm \
|
|
||||||
netbsd_386 netbsd_amd64 netbsd_arm \
|
|
||||||
openbsd_386 openbsd_amd64 \
|
|
||||||
plan9_386 plan9_amd64 \
|
|
||||||
solaris_amd64 \
|
|
||||||
windows_386 windows_amd64
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/host-build.mk
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include ../golang-compiler.mk
|
|
||||||
include ../golang-package.mk
|
|
||||||
|
|
||||||
PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)"
|
|
||||||
HOST_UNPACK:=$(HOST_TAR) -C "$(HOST_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)"
|
|
||||||
BOOTSTRAP_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_SOURCE)"
|
|
||||||
|
|
||||||
# don't strip ELF executables in test data
|
|
||||||
RSTRIP:=:
|
|
||||||
STRIP:=:
|
|
||||||
|
|
||||||
ifeq ($(GO_TARGET_SPECTRE_SUPPORTED),1)
|
|
||||||
PKG_CONFIG_DEPENDS+=CONFIG_GOLANG_SPECTRE
|
|
||||||
endif
|
|
||||||
|
|
||||||
define Package/golang/Default
|
|
||||||
$(call GoPackage/GoSubMenu)
|
|
||||||
TITLE:=Go programming language
|
|
||||||
URL:=https://golang.org/
|
|
||||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang/Default/description
|
|
||||||
The Go programming language is an open source project to make
|
|
||||||
programmers more productive.
|
|
||||||
|
|
||||||
Go is expressive, concise, clean, and efficient. Its concurrency
|
|
||||||
mechanisms make it easy to write programs that get the most out of
|
|
||||||
multicore and networked machines, while its novel type system enables
|
|
||||||
flexible and modular program construction. Go compiles quickly to
|
|
||||||
machine code yet has the convenience of garbage collection and the power
|
|
||||||
of run-time reflection. It's a fast, statically typed, compiled language
|
|
||||||
that feels like a dynamically typed, interpreted language.
|
|
||||||
endef
|
|
||||||
|
|
||||||
# go tool requires source present:
|
|
||||||
# https://github.com/golang/go/issues/4635
|
|
||||||
define Package/golang
|
|
||||||
$(call Package/golang/Default)
|
|
||||||
TITLE+= (compiler)
|
|
||||||
DEPENDS+= +golang-src
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang/description
|
|
||||||
$(call Package/golang/Default/description)
|
|
||||||
|
|
||||||
This package provides an assembler, compiler, linker, and compiled
|
|
||||||
libraries for the Go programming language.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang/config
|
|
||||||
source "$(SOURCE)/Config.in"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-doc
|
|
||||||
$(call Package/golang/Default)
|
|
||||||
TITLE+= (documentation)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-doc/description
|
|
||||||
$(call Package/golang/Default/description)
|
|
||||||
|
|
||||||
This package provides the documentation for the Go programming language.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-src
|
|
||||||
$(call Package/golang/Default)
|
|
||||||
TITLE+= (source files)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-src/description
|
|
||||||
$(call Package/golang/Default/description)
|
|
||||||
|
|
||||||
This package provides the Go programming language source files needed
|
|
||||||
for cross-compilation.
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
# Bootstrap
|
|
||||||
|
|
||||||
BOOTSTRAP_ROOT_DIR:=$(call qstrip,$(CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT))
|
|
||||||
|
|
||||||
ifeq ($(BOOTSTRAP_ROOT_DIR),)
|
|
||||||
BOOTSTRAP_ROOT_DIR:=$(BOOTSTRAP_BUILD_DIR)
|
|
||||||
|
|
||||||
define Download/golang-bootstrap
|
|
||||||
FILE:=$(BOOTSTRAP_SOURCE)
|
|
||||||
URL:=$(BOOTSTRAP_SOURCE_URL)
|
|
||||||
HASH:=$(BOOTSTRAP_HASH)
|
|
||||||
endef
|
|
||||||
$(eval $(call Download,golang-bootstrap))
|
|
||||||
|
|
||||||
define Bootstrap/Prepare
|
|
||||||
mkdir -p "$(BOOTSTRAP_BUILD_DIR)"
|
|
||||||
$(BOOTSTRAP_UNPACK)
|
|
||||||
endef
|
|
||||||
Hooks/HostPrepare/Post+=Bootstrap/Prepare
|
|
||||||
|
|
||||||
$(eval $(call GoCompiler/AddProfile,Bootstrap,$(BOOTSTRAP_BUILD_DIR),,bootstrap,$(GO_HOST_OS_ARCH)))
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Host
|
|
||||||
|
|
||||||
ifeq ($(GO_HOST_PIE_SUPPORTED),1)
|
|
||||||
HOST_GO_ENABLE_PIE:=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
# when using GO_LDFLAGS to set buildmode=pie, the PIE install suffix
|
|
||||||
# does not apply (we also delete the std lib during Host/Install)
|
|
||||||
|
|
||||||
$(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH),$(HOST_GO_INSTALL_SUFFIX)))
|
|
||||||
|
|
||||||
HOST_GO_VARS= \
|
|
||||||
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
|
||||||
GOENV=off \
|
|
||||||
CC="$(HOSTCC_NOCACHE)" \
|
|
||||||
CXX="$(HOSTCXX_NOCACHE)"
|
|
||||||
|
|
||||||
define Host/Compile
|
|
||||||
$(call GoCompiler/Bootstrap/CheckHost,$(BOOTSTRAP_GO_VALID_OS_ARCH))
|
|
||||||
$(call GoCompiler/Host/CheckHost,$(HOST_GO_VALID_OS_ARCH))
|
|
||||||
|
|
||||||
mkdir -p "$(GO_BUILD_CACHE_DIR)"
|
|
||||||
|
|
||||||
$(call GoCompiler/Bootstrap/Make, \
|
|
||||||
$(HOST_GO_VARS) \
|
|
||||||
)
|
|
||||||
|
|
||||||
$(call GoCompiler/Host/Make, \
|
|
||||||
GOROOT_BOOTSTRAP="$(BOOTSTRAP_ROOT_DIR)" \
|
|
||||||
$(if $(HOST_GO_ENABLE_PIE),GO_LDFLAGS="-buildmode pie") \
|
|
||||||
$(HOST_GO_VARS) \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# if host and target os/arch are the same,
|
|
||||||
# when go compiles a program, it will use the host std lib
|
|
||||||
# so remove it now and force go to rebuild std for target later
|
|
||||||
define Host/Install
|
|
||||||
$(call Host/Uninstall)
|
|
||||||
|
|
||||||
$(call GoCompiler/Host/Install/Bin,)
|
|
||||||
$(call GoCompiler/Host/Install/Src,)
|
|
||||||
|
|
||||||
$(call GoCompiler/Host/Install/BinLinks,)
|
|
||||||
|
|
||||||
rm -rf "$(HOST_GO_ROOT)/pkg/$(GO_HOST_OS_ARCH)$(if $(HOST_GO_INSTALL_SUFFIX),_$(HOST_GO_INSTALL_SUFFIX))"
|
|
||||||
|
|
||||||
$(INSTALL_DIR) "$(HOST_GO_ROOT)/openwrt"
|
|
||||||
$(INSTALL_BIN) ./files/go-gcc-helper "$(HOST_GO_ROOT)/openwrt/"
|
|
||||||
$(LN) go-gcc-helper "$(HOST_GO_ROOT)/openwrt/gcc"
|
|
||||||
$(LN) go-gcc-helper "$(HOST_GO_ROOT)/openwrt/g++"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Host/Uninstall
|
|
||||||
rm -rf "$(HOST_GO_ROOT)/openwrt"
|
|
||||||
|
|
||||||
$(call GoCompiler/Host/Uninstall/BinLinks,)
|
|
||||||
|
|
||||||
$(call GoCompiler/Host/Uninstall,)
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
# Target
|
|
||||||
|
|
||||||
ifeq ($(GO_PKG_ENABLE_PIE),1)
|
|
||||||
PKG_GO_INSTALL_SUFFIX:=$(GO_TARGET_PIE_INSTALL_SUFFIX)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(eval $(call GoCompiler/AddProfile,Package,$(PKG_BUILD_DIR),$(PKG_GO_PREFIX),$(PKG_GO_VERSION_ID),$(GO_OS_ARCH),$(PKG_GO_INSTALL_SUFFIX)))
|
|
||||||
|
|
||||||
PKG_GO_ZBOOTSTRAP_MODS:= \
|
|
||||||
s/defaultGO386 = `[^`]*`/defaultGO386 = `$(or $(GO_386),sse2)`/; \
|
|
||||||
s/defaultGOARM = `[^`]*`/defaultGOARM = `$(or $(GO_ARM),5)`/; \
|
|
||||||
s/defaultGOMIPS = `[^`]*`/defaultGOMIPS = `$(or $(GO_MIPS),hardfloat)`/; \
|
|
||||||
s/defaultGOMIPS64 = `[^`]*`/defaultGOMIPS64 = `$(or $(GO_MIPS64),hardfloat)`/; \
|
|
||||||
s/defaultGOPPC64 = `[^`]*`/defaultGOPPC64 = `power8`/;
|
|
||||||
|
|
||||||
PKG_GO_ZBOOTSTRAP_PATH:=$(PKG_BUILD_DIR)/src/internal/buildcfg/zbootstrap.go
|
|
||||||
|
|
||||||
PKG_GO_VARS= \
|
|
||||||
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
|
||||||
GOENV=off \
|
|
||||||
GO_GCC_HELPER_PATH="$$$$PATH" \
|
|
||||||
CC=gcc \
|
|
||||||
CXX=g++ \
|
|
||||||
PKG_CONFIG=pkg-config \
|
|
||||||
PATH="$(HOST_GO_ROOT)/openwrt:$$$$PATH"
|
|
||||||
|
|
||||||
PKG_GO_GCFLAGS= \
|
|
||||||
$(if $(GO_PKG_ENABLE_SPECTRE),-spectre all)
|
|
||||||
|
|
||||||
PKG_GO_ASMFLAGS= \
|
|
||||||
$(if $(GO_PKG_ENABLE_SPECTRE),-spectre all)
|
|
||||||
|
|
||||||
PKG_GO_LDFLAGS= \
|
|
||||||
-buildid '$(SOURCE_DATE_EPOCH)' \
|
|
||||||
-linkmode external \
|
|
||||||
-extldflags '$(patsubst -z%,-Wl$(comma)-z$(comma)%,$(TARGET_LDFLAGS))' \
|
|
||||||
$(if $(CONFIG_NO_STRIP)$(CONFIG_DEBUG),,-s -w)
|
|
||||||
|
|
||||||
# setting -trimpath is not necessary here because the paths inside the
|
|
||||||
# compiler binary are relative to GOROOT_FINAL (PKG_GO_ROOT), which is
|
|
||||||
# static / not dependent on the build environment
|
|
||||||
PKG_GO_INSTALL_ARGS= \
|
|
||||||
-ldflags "all=$(PKG_GO_LDFLAGS)" \
|
|
||||||
$(if $(PKG_GO_GCFLAGS),-gcflags "all=$(PKG_GO_GCFLAGS)") \
|
|
||||||
$(if $(PKG_GO_ASMFLAGS),-asmflags "all=$(PKG_GO_ASMFLAGS)") \
|
|
||||||
$(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie)
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
mkdir -p "$(GO_BUILD_CACHE_DIR)"
|
|
||||||
|
|
||||||
@echo "Building target Go first stage"
|
|
||||||
|
|
||||||
$(call GoCompiler/Package/Make, \
|
|
||||||
GOROOT_BOOTSTRAP="$(HOST_GO_ROOT)" \
|
|
||||||
GO_GCC_HELPER_CC="$(HOSTCC)" \
|
|
||||||
GO_GCC_HELPER_CXX="$(HOSTCXX)" \
|
|
||||||
$(PKG_GO_VARS) \
|
|
||||||
)
|
|
||||||
|
|
||||||
$(SED) '$(PKG_GO_ZBOOTSTRAP_MODS)' "$(PKG_GO_ZBOOTSTRAP_PATH)"
|
|
||||||
|
|
||||||
( \
|
|
||||||
if echo 'int main() { return 0; }' | $(TARGET_CC) -o $(PKG_BUILD_DIR)/test-ldso -x c - > /dev/null 2>&1; then \
|
|
||||||
LDSO=$$$$( \
|
|
||||||
readelf -l $(PKG_BUILD_DIR)/test-ldso | \
|
|
||||||
sed -n -e 's/^.*interpreter: \(.*\)[]]/\1/p' \
|
|
||||||
) ; \
|
|
||||||
fi ; \
|
|
||||||
$(SED) "s,defaultGO_LDSO = \`[^\`]*\`,defaultGO_LDSO = \`$$$$LDSO\`," "$(PKG_GO_ZBOOTSTRAP_PATH)" ; \
|
|
||||||
)
|
|
||||||
|
|
||||||
@echo "Building target Go second stage"
|
|
||||||
|
|
||||||
( \
|
|
||||||
cd "$(PKG_BUILD_DIR)/bin" ; \
|
|
||||||
export $(GO_PKG_TARGET_VARS) ; \
|
|
||||||
$(CP) go go-host ; \
|
|
||||||
GOROOT_FINAL="$(PKG_GO_ROOT)" \
|
|
||||||
GO_GCC_HELPER_CC="$(TARGET_CC)" \
|
|
||||||
GO_GCC_HELPER_CXX="$(TARGET_CXX)" \
|
|
||||||
$(PKG_GO_VARS) \
|
|
||||||
./go-host install -a $(PKG_GO_INSTALL_ARGS) std cmd ; \
|
|
||||||
retval="$$$$?" ; \
|
|
||||||
rm -f go-host ; \
|
|
||||||
exit "$$$$retval" ; \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang/install
|
|
||||||
$(call GoCompiler/Package/Install/Bin,$(1)$(PKG_GO_PREFIX))
|
|
||||||
$(call GoCompiler/Package/Install/BinLinks,$(1)$(PKG_GO_PREFIX))
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-doc/install
|
|
||||||
$(call GoCompiler/Package/Install/Doc,$(1)$(PKG_GO_PREFIX))
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/golang-src/install
|
|
||||||
$(call GoCompiler/Package/Install/Src,$(1)$(PKG_GO_PREFIX))
|
|
||||||
endef
|
|
||||||
|
|
||||||
# src/debug contains ELF executables as test data
|
|
||||||
# and they reference these libraries
|
|
||||||
# we need to call this in Package/$(1)/extra_provides
|
|
||||||
# to pass CheckDependencies in include/package-ipkg.mk
|
|
||||||
define Package/golang-src/extra_provides
|
|
||||||
echo 'libc.so.6'
|
|
||||||
endef
|
|
||||||
|
|
||||||
|
|
||||||
$(eval $(call HostBuild))
|
|
||||||
$(eval $(call BuildPackage,golang))
|
|
||||||
$(eval $(call BuildPackage,golang-doc))
|
|
||||||
$(eval $(call BuildPackage,golang-src))
|
|
|
@ -1,41 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
me=go-gcc-helper
|
|
||||||
name="${0##*/}"
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# shellcheck disable=SC2039
|
|
||||||
local IFS=" "
|
|
||||||
printf '%s\n' "$me: $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$name" in
|
|
||||||
gcc)
|
|
||||||
if [ -z "$GO_GCC_HELPER_CC" ]; then
|
|
||||||
log "missing GO_GCC_HELPER_CC"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cmd="$GO_GCC_HELPER_CC"
|
|
||||||
;;
|
|
||||||
g++)
|
|
||||||
if [ -z "$GO_GCC_HELPER_CXX" ]; then
|
|
||||||
log "missing GO_GCC_HELPER_CXX"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cmd="$GO_GCC_HELPER_CXX"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
log "unknown command \"$name\""
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -n "$GO_GCC_HELPER_PATH" ]; then
|
|
||||||
export PATH="$GO_GCC_HELPER_PATH"
|
|
||||||
else
|
|
||||||
log "missing GO_GCC_HELPER_PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
log "running $cmd $*"
|
|
||||||
|
|
||||||
$cmd "$@"
|
|
0
https-dns-proxy/Makefile
Normal file → Executable file
0
https-dns-proxy/Makefile
Normal file → Executable file
0
https-dns-proxy/files/README.md
Normal file → Executable file
0
https-dns-proxy/files/README.md
Normal file → Executable file
0
https-dns-proxy/files/https-dns-proxy.config
Normal file → Executable file
0
https-dns-proxy/files/https-dns-proxy.config
Normal file → Executable file
0
https-dns-proxy/test.sh
Normal file → Executable file
0
https-dns-proxy/test.sh
Normal file → Executable file
0
ipcalc/Makefile
Normal file → Executable file
0
ipcalc/Makefile
Normal file → Executable file
|
@ -1,83 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2007-2010 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=iperf
|
|
||||||
PKG_VERSION:=3.11
|
|
||||||
PKG_RELEASE:=10
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_VERSION).tar.gz
|
|
||||||
PKG_SOURCE_URL:=https://github.com/esnet/iperf/archive/refs/tags/
|
|
||||||
PKG_HASH:=96e909c0d3ab6034c52328c2954fb3934aaff349395c4bc2611dcd50e6b89875
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
|
||||||
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
|
|
||||||
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
|
|
||||||
Iperf is a modern alternative for measuring TCP and UDP bandwidth
|
|
||||||
performance, allowing the tuning of various parameters and
|
|
||||||
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))
|
|
|
@ -1,25 +0,0 @@
|
||||||
--- a/src/flowlabel.h 2021-06-24 13:26:33.142463630 +0200
|
|
||||||
+++ b/src/flowlabel.h 2021-06-24 13:27:45.669235179 +0200
|
|
||||||
@@ -37,21 +37,21 @@
|
|
||||||
conflicts with "netinet/in.h" .
|
|
||||||
*/
|
|
||||||
|
|
||||||
-#ifndef __ANDROID__
|
|
||||||
+#ifndef _LINUX_IN6_H
|
|
||||||
struct in6_flowlabel_req
|
|
||||||
{
|
|
||||||
struct in6_addr flr_dst;
|
|
||||||
__u32 flr_label;
|
|
||||||
__u8 flr_action;
|
|
||||||
__u8 flr_share;
|
|
||||||
__u16 flr_flags;
|
|
||||||
__u16 flr_expires;
|
|
||||||
__u16 flr_linger;
|
|
||||||
__u32 __flr_pad;
|
|
||||||
/* Options in format of IPV6_PKTOPTIONS */
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define IPV6_FL_A_GET 0
|
|
||||||
#define IPV6_FL_A_PUT 1
|
|
||||||
#define IPV6_FL_A_RENEW 2
|
|
|
@ -1,246 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2006-2015 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=iproute2
|
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/network/iproute2/iproute2.git
|
|
||||||
PKG_SOURCE_VERSION:=29da83f89f6e1fe528c59131a01f5d43bcd0a000
|
|
||||||
PKG_VERSION:=5.16.0-$(PKG_SOURCE_VERSION)
|
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
PKG_BUILD_DEPENDS:=iptables
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
|
||||||
PKG_CPE_ID:=cpe:/a:iproute2_project:iproute2
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(INCLUDE_DIR)/nls.mk
|
|
||||||
|
|
||||||
define Package/iproute2/Default
|
|
||||||
SECTION:=net
|
|
||||||
CATEGORY:=Network
|
|
||||||
URL:=http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
|
|
||||||
SUBMENU:=Routing and Redirection
|
|
||||||
MAINTAINER:=Russell Senior <russell@personaltelco.net>
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ip-tiny
|
|
||||||
$(call Package/iproute2/Default)
|
|
||||||
TITLE:=Routing control utility (minimal)
|
|
||||||
VARIANT:=iptiny
|
|
||||||
DEFAULT_VARIANT:=1
|
|
||||||
PROVIDES:=ip
|
|
||||||
ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny
|
|
||||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ip-full
|
|
||||||
$(call Package/iproute2/Default)
|
|
||||||
TITLE:=Routing control utility (full)
|
|
||||||
VARIANT:=ipfull
|
|
||||||
PROVIDES:=ip
|
|
||||||
ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full
|
|
||||||
DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/tc-tiny
|
|
||||||
$(call Package/iproute2/Default)
|
|
||||||
TITLE:=Traffic control utility (minimal)
|
|
||||||
VARIANT:=tctiny
|
|
||||||
DEFAULT_VARIANT:=1
|
|
||||||
PROVIDES:=tc
|
|
||||||
ALTERNATIVES:=200:/sbin/tc:/usr/libexec/tc-tiny
|
|
||||||
DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/tc-full
|
|
||||||
$(call Package/iproute2/Default)
|
|
||||||
TITLE:=Traffic control utility (full)
|
|
||||||
VARIANT:=tcfull
|
|
||||||
PROVIDES:=tc
|
|
||||||
ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-full
|
|
||||||
DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/tc-mod-iptables
|
|
||||||
$(call Package/iproute2/Default)
|
|
||||||
TITLE:=Traffic control module - iptables action
|
|
||||||
DEPENDS:=+libxtables
|
|
||||||
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 +kmod-netlink-diag
|
|
||||||
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),iptiny)
|
|
||||||
IP_CONFIG_TINY:=y
|
|
||||||
LIBBPF_FORCE:=off
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(BUILD_VARIANT),ipfull)
|
|
||||||
HAVE_ELF:=y
|
|
||||||
LIBBPF_FORCE:=on
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(BUILD_VARIANT),tctiny)
|
|
||||||
LIBBPF_FORCE:=off
|
|
||||||
SHARED_LIBS:=y
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(BUILD_VARIANT),tcfull)
|
|
||||||
HAVE_ELF:=y
|
|
||||||
LIBBPF_FORCE:=on
|
|
||||||
SHARED_LIBS:=y
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_PACKAGE_devlink
|
|
||||||
HAVE_MNL:=y
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_PACKAGE_rdma
|
|
||||||
HAVE_MNL:=y
|
|
||||||
endif
|
|
||||||
|
|
||||||
define Build/Configure
|
|
||||||
echo "static const char SNAPSHOT[] = \"$(PKG_VERSION)-$(PKG_RELEASE)-openwrt\";" \
|
|
||||||
> $(PKG_BUILD_DIR)/include/SNAPSHOT.h
|
|
||||||
endef
|
|
||||||
|
|
||||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
|
|
||||||
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
|
|
||||||
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
|
|
||||||
|
|
||||||
MAKE_FLAGS += \
|
|
||||||
KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \
|
|
||||||
SHARED_LIBS=$(SHARED_LIBS) \
|
|
||||||
IP_CONFIG_TINY=$(IP_CONFIG_TINY) \
|
|
||||||
BUILD_VARIANT=$(BUILD_VARIANT) \
|
|
||||||
LIBBPF_FORCE=$(LIBBPF_FORCE) \
|
|
||||||
HAVE_ELF=$(HAVE_ELF) \
|
|
||||||
HAVE_MNL=$(HAVE_MNL) \
|
|
||||||
HAVE_CAP=$(HAVE_CAP) \
|
|
||||||
IPT_LIB_DIR=/usr/lib/iptables \
|
|
||||||
XT_LIB_DIR=/usr/lib/iptables \
|
|
||||||
FPIC="$(FPIC)" \
|
|
||||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
+$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $(1)/usr/include/iproute2
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/include/bpf_elf.h $(1)/usr/include/iproute2
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/include/{libgenl,libnetlink}.h $(1)/usr/include/
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ip-tiny/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/libexec
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/libexec/ip-tiny
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ip-full/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/libexec
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/libexec/ip-full
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/tc-tiny/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/libexec
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-tiny
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/tc-full/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/libexec
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/tc-mod-iptables/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/tc
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/tc/m_xt.so $(1)/usr/lib/tc
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/genl/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ip-bridge/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ss/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/nstat/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
|
||||||
$(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))
|
|
||||||
# build tc-mod-iptables before its dependents, to avoid
|
|
||||||
# spurious rebuilds when building multiple variants.
|
|
||||||
$(eval $(call BuildPackage,tc-mod-iptables))
|
|
||||||
#$(eval $(call BuildPackage,tc-tiny))
|
|
||||||
$(eval $(call BuildPackage,tc-full))
|
|
||||||
$(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))
|
|
|
@ -1,12 +0,0 @@
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -34,7 +34,8 @@ int main(int argc, char **argv) {
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- if $CC -I$INCLUDE -o $TMPDIR/atmtest $TMPDIR/atmtest.c -latm >/dev/null 2>&1; then
|
|
||||||
+# OpenWrt: disable ATM support even if present on host system
|
|
||||||
+ if [ 1 -eq 0 ]; then
|
|
||||||
echo "TC_CONFIG_ATM:=y" >>$CONFIG
|
|
||||||
echo yes
|
|
||||||
else
|
|
|
@ -1,59 +0,0 @@
|
||||||
--- a/netem/maketable.c
|
|
||||||
+++ b/netem/maketable.c
|
|
||||||
@@ -10,7 +10,9 @@
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <math.h>
|
|
||||||
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
|
||||||
#include <malloc.h>
|
|
||||||
+#endif
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
--- a/netem/normal.c
|
|
||||||
+++ b/netem/normal.c
|
|
||||||
@@ -8,8 +8,12 @@
|
|
||||||
#include <string.h>
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
+#else
|
|
||||||
+#define NETEM_DIST_SCALE 8192
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#define TABLESIZE 16384
|
|
||||||
#define TABLEFACTOR NETEM_DIST_SCALE
|
|
||||||
--- a/netem/pareto.c
|
|
||||||
+++ b/netem/pareto.c
|
|
||||||
@@ -7,8 +7,12 @@
|
|
||||||
#include <math.h>
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
+#else
|
|
||||||
+#define NETEM_DIST_SCALE 8192
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static const double a=3.0;
|
|
||||||
#define TABLESIZE 16384
|
|
||||||
--- a/netem/paretonormal.c
|
|
||||||
+++ b/netem/paretonormal.c
|
|
||||||
@@ -14,10 +14,13 @@
|
|
||||||
#include <string.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <limits.h>
|
|
||||||
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
|
||||||
#include <malloc.h>
|
|
||||||
-
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
+#else
|
|
||||||
+#define NETEM_DIST_SCALE 8192
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#define TABLESIZE 16384
|
|
||||||
#define TABLEFACTOR NETEM_DIST_SCALE
|
|
|
@ -1,12 +0,0 @@
|
||||||
--- a/tc/Makefile
|
|
||||||
+++ b/tc/Makefile
|
|
||||||
@@ -128,6 +128,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
|
|
||||||
ifneq ($(IPT_LIB_DIR),)
|
|
||||||
CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
|
|
||||||
endif
|
|
||||||
+ifneq ($(XT_LIB_DIR),)
|
|
||||||
+ CFLAGS += -DXT_LIB_DIR=\"$(XT_LIB_DIR)\"
|
|
||||||
+endif
|
|
||||||
|
|
||||||
LEX := flex
|
|
||||||
CFLAGS += -DYY_NO_INPUT
|
|
|
@ -1,20 +0,0 @@
|
||||||
--- a/misc/Makefile
|
|
||||||
+++ b/misc/Makefile
|
|
||||||
@@ -2,13 +2,13 @@
|
|
||||||
SSOBJ=ss.o ssfilter_check.o ssfilter.tab.o
|
|
||||||
LNSTATOBJ=lnstat.o lnstat_util.o
|
|
||||||
|
|
||||||
-TARGETS=ss nstat ifstat rtacct lnstat
|
|
||||||
+TARGETS=ss nstat
|
|
||||||
|
|
||||||
include ../config.mk
|
|
||||||
|
|
||||||
-ifeq ($(HAVE_BERKELEY_DB),y)
|
|
||||||
- TARGETS += arpd
|
|
||||||
-endif
|
|
||||||
+#ifeq ($(HAVE_BERKELEY_DB),y)
|
|
||||||
+# TARGETS += arpd
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
all: $(TARGETS)
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -55,7 +55,7 @@ WFLAGS += -Wmissing-declarations -Wold-s
|
|
||||||
CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS)
|
|
||||||
YACCFLAGS = -d -t -v
|
|
||||||
|
|
||||||
-SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa
|
|
||||||
+SUBDIRS=lib ip tc bridge misc genl devlink rdma
|
|
||||||
|
|
||||||
LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
|
|
||||||
LDLIBS += $(LIBNETLINK)
|
|
|
@ -1,9 +0,0 @@
|
||||||
--- a/tc/q_fifo.c
|
|
||||||
+++ b/tc/q_fifo.c
|
|
||||||
@@ -95,5 +95,6 @@ struct qdisc_util pfifo_head_drop_qdisc_
|
|
||||||
|
|
||||||
struct qdisc_util pfifo_fast_qdisc_util = {
|
|
||||||
.id = "pfifo_fast",
|
|
||||||
+ .parse_qopt = fifo_parse_opt,
|
|
||||||
.print_qopt = prio_print_opt,
|
|
||||||
};
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -387,7 +387,7 @@ check_selinux()
|
|
||||||
|
|
||||||
check_mnl()
|
|
||||||
{
|
|
||||||
- if ${PKG_CONFIG} libmnl --exists; then
|
|
||||||
+ if [ "${HAVE_MNL}" = "y" ] && ${PKG_CONFIG} libmnl --exists; then
|
|
||||||
echo "HAVE_MNL:=y" >>$CONFIG
|
|
||||||
echo "yes"
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -255,7 +255,7 @@ EOF
|
|
||||||
|
|
||||||
check_elf()
|
|
||||||
{
|
|
||||||
- if ${PKG_CONFIG} libelf --exists; then
|
|
||||||
+ if [ "${HAVE_ELF}" = "y" ] && ${PKG_CONFIG} libelf --exists; then
|
|
||||||
echo "HAVE_ELF:=y" >>$CONFIG
|
|
||||||
echo "yes"
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -445,7 +445,7 @@ EOF
|
|
||||||
|
|
||||||
check_cap()
|
|
||||||
{
|
|
||||||
- if ${PKG_CONFIG} libcap --exists; then
|
|
||||||
+ if [ "${HAVE_CAP}" = "y" ] && ${PKG_CONFIG} libcap --exists; then
|
|
||||||
echo "HAVE_CAP:=y" >>$CONFIG
|
|
||||||
echo "yes"
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/lib/Makefile
|
|
||||||
+++ b/lib/Makefile
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
|
||||||
include ../config.mk
|
|
||||||
|
|
||||||
-CFLAGS += -fPIC
|
|
||||||
+CFLAGS += $(FPIC)
|
|
||||||
|
|
||||||
UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
|
|
||||||
inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \
|
|
|
@ -1,45 +0,0 @@
|
||||||
--- a/tc/Makefile
|
|
||||||
+++ b/tc/Makefile
|
|
||||||
@@ -114,7 +114,7 @@ LDLIBS += -L. -lm
|
|
||||||
|
|
||||||
ifeq ($(SHARED_LIBS),y)
|
|
||||||
LDLIBS += -ldl
|
|
||||||
-LDFLAGS += -Wl,-export-dynamic
|
|
||||||
+LDFLAGS += -Wl,--dynamic-list=dynsyms.list
|
|
||||||
endif
|
|
||||||
|
|
||||||
TCLIB := tc_core.o
|
|
||||||
@@ -144,7 +144,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
|
|
||||||
all: tc $(TCSO)
|
|
||||||
|
|
||||||
tc: $(TCOBJ) $(LIBNETLINK) libtc.a
|
|
||||||
- $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
||||||
+ $(QUIET_LINK)$(CC) $(filter-out dynsyms.list, $^) $(LDFLAGS) $(LDLIBS) -o $@
|
|
||||||
|
|
||||||
libtc.a: $(TCLIB)
|
|
||||||
$(QUIET_AR)$(AR) rcs $@ $^
|
|
||||||
@@ -166,6 +166,7 @@ install: all
|
|
||||||
clean:
|
|
||||||
rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \
|
|
||||||
rm -f emp_ematch.tab.*
|
|
||||||
+ rm -f dynsyms.list
|
|
||||||
|
|
||||||
q_atm.so: q_atm.c
|
|
||||||
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
|
|
||||||
@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c)
|
|
||||||
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
|
||||||
done > $@
|
|
||||||
|
|
||||||
+else
|
|
||||||
+
|
|
||||||
+tc: dynsyms.list
|
|
||||||
+m_xt.so: dynsyms.list
|
|
||||||
+dynsyms.list: $(wildcard *.c)
|
|
||||||
+ files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \
|
|
||||||
+ echo "{" > $@ ; \
|
|
||||||
+ for s in `grep -B 3 '\<dlsym' $$files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
|
|
||||||
+ sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:\1;:;p}' $$files ; \
|
|
||||||
+ done >> $@ ; \
|
|
||||||
+ echo "show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> $@
|
|
||||||
+
|
|
||||||
endif
|
|
|
@ -1,41 +0,0 @@
|
||||||
From 4e7dbf76227e8c7be7897dc81def3011f637864d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
Date: Thu, 30 May 2013 11:54:04 +0200
|
|
||||||
Subject: [PATCH] add support for dropping with FAILED_POLICY
|
|
||||||
|
|
||||||
---
|
|
||||||
include/linux/fib_rules.h | 4 ++++
|
|
||||||
include/linux/rtnetlink.h | 1 +
|
|
||||||
ip/rtm_map.c | 4 ++++
|
|
||||||
3 files changed, 9 insertions(+)
|
|
||||||
|
|
||||||
--- a/ip/rtm_map.c
|
|
||||||
+++ b/ip/rtm_map.c
|
|
||||||
@@ -54,6 +54,8 @@ char *rtnl_rtntype_n2a(int id, char *buf
|
|
||||||
return "nat";
|
|
||||||
case RTN_XRESOLVE:
|
|
||||||
return "xresolve";
|
|
||||||
+ case RTN_FAILED_POLICY:
|
|
||||||
+ return "failed_policy";
|
|
||||||
default:
|
|
||||||
snprintf(buf, len, "%d", id);
|
|
||||||
return buf;
|
|
||||||
@@ -89,6 +91,8 @@ int rtnl_rtntype_a2n(int *id, char *arg)
|
|
||||||
res = RTN_UNICAST;
|
|
||||||
else if (strcmp(arg, "throw") == 0)
|
|
||||||
res = RTN_THROW;
|
|
||||||
+ else if (strcmp(arg, "failed_policy") == 0)
|
|
||||||
+ res = RTN_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
|
|
||||||
@@ -256,6 +256,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
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -279,7 +279,7 @@ int main(int argc, char **argv) {
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS >/dev/null 2>&1
|
|
||||||
+ $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS >/dev/null 2>&1
|
|
||||||
local ret=$?
|
|
||||||
|
|
||||||
rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
|
|
||||||
@@ -297,7 +297,7 @@ int main(int argc, char **argv) {
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- $CC -o $TMPDIR/libbpf_sec_test $TMPDIR/libbpf_sec_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS >/dev/null 2>&1
|
|
||||||
+ $CC -o $TMPDIR/libbpf_sec_test $TMPDIR/libbpf_sec_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS >/dev/null 2>&1
|
|
||||||
local ret=$?
|
|
||||||
|
|
||||||
rm -f $TMPDIR/libbpf_sec_test.c $TMPDIR/libbpf_sec_test
|
|
|
@ -1,19 +0,0 @@
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -431,14 +431,8 @@ EOF
|
|
||||||
if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
|
|
||||||
echo "no"
|
|
||||||
else
|
|
||||||
- if ${PKG_CONFIG} libbsd --exists; then
|
|
||||||
- echo 'CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG
|
|
||||||
- echo 'LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG
|
|
||||||
- echo "no"
|
|
||||||
- else
|
|
||||||
- echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG
|
|
||||||
- echo "yes"
|
|
||||||
- fi
|
|
||||||
+ echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG
|
|
||||||
+ echo "yes"
|
|
||||||
fi
|
|
||||||
rm -f $TMPDIR/strtest.c $TMPDIR/strtest
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -374,7 +374,7 @@ check_libbpf()
|
|
||||||
check_selinux()
|
|
||||||
# SELinux is a compile time option in the ss utility
|
|
||||||
{
|
|
||||||
- if ${PKG_CONFIG} libselinux --exists; then
|
|
||||||
+ if [ "${HAVE_SELINUX}" = "y" ] && ${PKG_CONFIG} libselinux --exists; then
|
|
||||||
echo "HAVE_SELINUX:=y" >>$CONFIG
|
|
||||||
echo "yes"
|
|
||||||
|
|
0
lcd4linux/Config.in
Normal file → Executable file
0
lcd4linux/Config.in
Normal file → Executable file
0
lcd4linux/Makefile
Normal file → Executable file
0
lcd4linux/Makefile
Normal file → Executable file
0
lcd4linux/files/lcd4linux.init
Normal file → Executable file
0
lcd4linux/files/lcd4linux.init
Normal file → Executable file
0
lcd4linux/patches/120-remove-as-needed-linker-option.patch
Normal file → Executable file
0
lcd4linux/patches/120-remove-as-needed-linker-option.patch
Normal file → Executable file
0
lcd4linux/patches/140-no_repnop_T6963.patch
Normal file → Executable file
0
lcd4linux/patches/140-no_repnop_T6963.patch
Normal file → Executable file
0
lcd4linux/patches/150-addlibmpdclient.patch
Normal file → Executable file
0
lcd4linux/patches/150-addlibmpdclient.patch
Normal file → Executable file
0
lcd4linux/patches/160-uinput_defs.patch
Normal file → Executable file
0
lcd4linux/patches/160-uinput_defs.patch
Normal file → Executable file
0
lcd4linux/patches/170-add-generic-spidev-driver.patch
Normal file → Executable file
0
lcd4linux/patches/170-add-generic-spidev-driver.patch
Normal file → Executable file
0
lcd4linux/patches/173-glcd2usb-bigendian-fix.patch
Normal file → Executable file
0
lcd4linux/patches/173-glcd2usb-bigendian-fix.patch
Normal file → Executable file
0
libell/Makefile
Normal file → Executable file
0
libell/Makefile
Normal file → Executable file
|
@ -1,95 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2016 Velocloud Inc.
|
|
||||||
# Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=libmbim
|
|
||||||
PKG_VERSION:=1.26.2
|
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
||||||
PKG_SOURCE_URL:=https://www.freedesktop.org/software/libmbim
|
|
||||||
PKG_HASH:=10c77bf5b5eb8c92ba80e9b519923ad9b898362bc8e1928e2bc9a17eeba649af
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com>
|
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(INCLUDE_DIR)/nls.mk
|
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
|
||||||
--disable-static \
|
|
||||||
--disable-gtk-doc \
|
|
||||||
--disable-gtk-doc-html \
|
|
||||||
--disable-gtk-doc-pdf \
|
|
||||||
--disable-silent-rules \
|
|
||||||
--enable-more-warnings=yes
|
|
||||||
|
|
||||||
define Package/libmbim
|
|
||||||
SECTION:=libs
|
|
||||||
CATEGORY:=Libraries
|
|
||||||
DEPENDS:=+glib2
|
|
||||||
TITLE:=Helper library and utils to talk to MBIM enabled modems
|
|
||||||
URL:=https://www.freedesktop.org/wiki/Software/libmbim
|
|
||||||
LICENSE:=LGPL-2.0-or-later
|
|
||||||
LICENSE_FILES:=COPYING.LIB
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libmbim/description
|
|
||||||
Helper library to talk to MBIM enabled modems.
|
|
||||||
Add mbim-utils for extra utilities.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mbim-utils
|
|
||||||
SECTION:=utils
|
|
||||||
CATEGORY:=Utilities
|
|
||||||
DEPENDS:=+libmbim
|
|
||||||
TITLE:=Utilities to talk to MBIM enabled modems
|
|
||||||
URL:=https://www.freedesktop.org/wiki/Software/libmbim
|
|
||||||
LICENSE:=GPL-2.0-or-later
|
|
||||||
LICENSE_FILES:=COPYING
|
|
||||||
endef
|
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
|
||||||
--without-udev \
|
|
||||||
--without-udev-base-dir
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $(1)/usr/include
|
|
||||||
$(CP) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/include/libmbim-glib \
|
|
||||||
$(1)/usr/include/
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/libmbim*.so* \
|
|
||||||
$(1)/usr/lib/
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
||||||
$(CP) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbim-glib.pc \
|
|
||||||
$(1)/usr/lib/pkgconfig
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libmbim/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/libmbim*.so.* \
|
|
||||||
$(1)/usr/lib/
|
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mbim-proxy $(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mbim-utils/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbimcli $(1)/usr/bin/
|
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbim-network $(1)/usr/bin/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,libmbim))
|
|
||||||
$(eval $(call BuildPackage,mbim-utils))
|
|
|
@ -1,16 +0,0 @@
|
||||||
menu "Configuration"
|
|
||||||
depends on PACKAGE_libqmi
|
|
||||||
|
|
||||||
config LIBQMI_WITH_MBIM_QMUX
|
|
||||||
bool "Include MBIM QMUX service support"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Compile libqmi with QMI-over-MBIM support
|
|
||||||
|
|
||||||
config LIBQMI_WITH_QRTR_GLIB
|
|
||||||
bool "Include QRTR support"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Compile libqmi with QRTR support
|
|
||||||
|
|
||||||
endmenu
|
|
119
libqmi/Makefile
119
libqmi/Makefile
|
@ -1,119 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2016 Velocloud Inc.
|
|
||||||
# Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=libqmi
|
|
||||||
PKG_VERSION:=1.30.4
|
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
||||||
PKG_SOURCE_URL:=https://www.freedesktop.org/software/libqmi
|
|
||||||
PKG_HASH:=00d7da30a4f8d1185f37cba289cfaf1dfcd04a58f2f76d6acfdf5b85312d6ed6
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com>
|
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(INCLUDE_DIR)/nls.mk
|
|
||||||
|
|
||||||
define Package/libqmi/config
|
|
||||||
source "$(SOURCE)/Config.in"
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libqmi
|
|
||||||
SECTION:=libs
|
|
||||||
CATEGORY:=Libraries
|
|
||||||
DEPENDS:= \
|
|
||||||
+glib2 \
|
|
||||||
+LIBQMI_WITH_MBIM_QMUX:libmbim \
|
|
||||||
+LIBQMI_WITH_QRTR_GLIB:libqrtr-glib
|
|
||||||
TITLE:=Helper library to talk to QMI enabled modems
|
|
||||||
URL:=https://www.freedesktop.org/wiki/Software/libqmi
|
|
||||||
LICENSE:=LGPL-2.0-or-later
|
|
||||||
LICENSE_FILES:=COPYING.LIB
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libqmi/description
|
|
||||||
Helper library talk to QMI enabled modems.
|
|
||||||
Add qmi-utils for extra utilities.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/qmi-utils
|
|
||||||
SECTION:=utils
|
|
||||||
CATEGORY:=Utilities
|
|
||||||
DEPENDS:=+libqmi
|
|
||||||
TITLE:=Utilities to talk to QMI enabled modems
|
|
||||||
URL:=https://www.freedesktop.org/wiki/Software/libqmi
|
|
||||||
LICENSE:=GPL-2.0-or-later
|
|
||||||
LICENSE_FILES:=COPYING
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libqmi-utils/description
|
|
||||||
Utils to talk to QMI enabled modems
|
|
||||||
endef
|
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
|
||||||
--disable-static \
|
|
||||||
--disable-gtk-doc \
|
|
||||||
--disable-gtk-doc-html \
|
|
||||||
--disable-gtk-doc-pdf \
|
|
||||||
--disable-silent-rules \
|
|
||||||
--enable-firmware-update \
|
|
||||||
--enable-more-warnings=yes \
|
|
||||||
--without-udev \
|
|
||||||
--without-udev-base-dir
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_LIBQMI_WITH_MBIM_QMUX),y)
|
|
||||||
CONFIGURE_ARGS += --enable-mbim-qmux
|
|
||||||
else
|
|
||||||
CONFIGURE_ARGS += --disable-mbim-qmux
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_LIBQMI_WITH_QRTR_GLIB),y)
|
|
||||||
CONFIGURE_ARGS += --enable-qrtr
|
|
||||||
else
|
|
||||||
CONFIGURE_ARGS += --disable-qrtr
|
|
||||||
endif
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $(1)/usr/include
|
|
||||||
$(CP) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/include/libqmi-glib \
|
|
||||||
$(1)/usr/include/
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/libqmi*.so* \
|
|
||||||
$(1)/usr/lib/
|
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
||||||
$(CP) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/qmi-glib.pc \
|
|
||||||
$(1)/usr/lib/pkgconfig
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libqmi/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) \
|
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/libqmi*.so.* \
|
|
||||||
$(1)/usr/lib/
|
|
||||||
|
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/qmi-proxy $(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/qmi-utils/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmicli $(1)/usr/bin/
|
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-network $(1)/usr/bin/
|
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-firmware-update $(1)/usr/bin/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,libqmi))
|
|
||||||
$(eval $(call BuildPackage,qmi-utils))
|
|
0
luci-app-dsvpn/Makefile
Normal file → Executable file
0
luci-app-dsvpn/Makefile
Normal file → Executable file
0
luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js
Normal file → Executable file
0
luci-app-dsvpn/htdocs/luci-static/resources/view/services/dsvpn.js
Normal file → Executable file
0
luci-app-dsvpn/po/fr/dsvpn.po
Normal file → Executable file
0
luci-app-dsvpn/po/fr/dsvpn.po
Normal file → Executable file
0
luci-app-dsvpn/po/fr/dsvpn.po~
Normal file → Executable file
0
luci-app-dsvpn/po/fr/dsvpn.po~
Normal file → Executable file
0
luci-app-dsvpn/po/ru/dsvpn.po
Normal file → Executable file
0
luci-app-dsvpn/po/ru/dsvpn.po
Normal file → Executable file
0
luci-app-dsvpn/po/templates/dsvpn.pot
Normal file → Executable file
0
luci-app-dsvpn/po/templates/dsvpn.pot
Normal file → Executable file
0
luci-app-dsvpn/po/zh_Hans/dsvpn.po
Normal file → Executable file
0
luci-app-dsvpn/po/zh_Hans/dsvpn.po
Normal file → Executable file
0
luci-app-dsvpn/po/zh_Hans/dsvpn.po~
Normal file → Executable file
0
luci-app-dsvpn/po/zh_Hans/dsvpn.po~
Normal file → Executable file
0
luci-app-dsvpn/root/usr/share/luci/menu.d/luci-app-dsvpn.json
Normal file → Executable file
0
luci-app-dsvpn/root/usr/share/luci/menu.d/luci-app-dsvpn.json
Normal file → Executable file
0
luci-app-dsvpn/root/usr/share/rpcd/acl.d/luci-app-dsvpn.json
Normal file → Executable file
0
luci-app-dsvpn/root/usr/share/rpcd/acl.d/luci-app-dsvpn.json
Normal file → Executable file
0
luci-app-firewall/Makefile
Normal file → Executable file
0
luci-app-firewall/Makefile
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/tools/firewall.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/custom.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js
Normal file → Executable file
0
luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js
Normal file → Executable file
0
luci-app-firewall/po/bg/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/bg/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/ca/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/ca/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/cs/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/cs/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/de/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/de/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/el/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/el/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/en/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/en/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/es/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/es/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/fr/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/fr/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/he/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/he/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/hi/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/hi/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/hu/firewall.po
Normal file → Executable file
0
luci-app-firewall/po/hu/firewall.po
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue