Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

51
package/dnsmasq/Config.in Normal file
View File

@@ -0,0 +1,51 @@
config BR2_PACKAGE_DNSMASQ
bool "dnsmasq"
depends on BR2_USE_MMU # fork()
help
A lightweight DNS and DHCP server. It is intended to provide
coupled DNS and DHCP service to a LAN.
http://www.thekelleys.org.uk/dnsmasq/doc.html
if BR2_PACKAGE_DNSMASQ
config BR2_PACKAGE_DNSMASQ_TFTP
bool "tftp support"
default y
help
Enable TFTP support in dnsmasq.
config BR2_PACKAGE_DNSMASQ_DHCP
bool "dhcp support"
default y
help
Enable DHCP server support in dnsmasq.
config BR2_PACKAGE_DNSMASQ_DNSSEC
bool "DNSSEC support"
select BR2_PACKAGE_GMP
select BR2_PACKAGE_NETTLE
help
Enable DNSSEC validation and caching support.
config BR2_PACKAGE_DNSMASQ_IDN
bool "IDN support"
select BR2_PACKAGE_LIBIDN2 if !BR2_PACKAGE_LIBIDN
help
Enable IDN support in dnsmasq.
This option is a big space taker since it pulls in many
libraries.
config BR2_PACKAGE_DNSMASQ_LUA
bool "Lua scripting support"
depends on BR2_PACKAGE_LUA
help
Enable Lua scripting for dnsmasq
config BR2_PACKAGE_DNSMASQ_CONNTRACK
bool "conntrack marking support"
select BR2_PACKAGE_LIBNETFILTER_CONNTRACK
help
Enable DNS query connection marking in netfilter.
endif

View File

@@ -0,0 +1,55 @@
#!/bin/sh
DAEMON="dnsmasq"
PIDFILE="/var/run/$DAEMON.pid"
[ -f /etc/dnsmasq.conf ] || exit 0
start() {
printf "Starting dnsmasq: "
start-stop-daemon --start --pidfile "$PIDFILE" \
--exec "/usr/sbin/$DAEMON" \
-- --pid-file="$PIDFILE"
status=$?
[ "$status" -eq 0 ] && echo "OK" || echo "FAIL"
return "$status"
}
stop() {
printf "Stopping dnsmasq: "
start-stop-daemon --stop --pidfile "$PIDFILE" \
--exec "/usr/sbin/$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
return "$status"
fi
while start-stop-daemon --stop --test --quiet --pidfile "$PIDFILE" \
--exec "/usr/sbin/$DAEMON"; do
sleep 0.1
done
rm -f "$PIDFILE"
return "$status"
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
"$1"
;;
reload)
# Restart, since there is no true "reload" feature.
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

View File

@@ -0,0 +1,6 @@
# Locally calculated after checking pgp signature
# https://thekelleys.org.uk/dnsmasq/dnsmasq-2.93.tar.xz.asc
sha256 0c00d4e5c97c8306e5fb932b348b34269c9c29a0e7df0e8e82958b407092bc19 dnsmasq-2.93.tar.xz
# Locally calculated
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING-v3

View File

@@ -0,0 +1,95 @@
################################################################################
#
# dnsmasq
#
################################################################################
DNSMASQ_VERSION = 2.93
DNSMASQ_SOURCE = dnsmasq-$(DNSMASQ_VERSION).tar.xz
DNSMASQ_SITE = https://thekelleys.org.uk/dnsmasq
DNSMASQ_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)"
DNSMASQ_MAKE_OPTS = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)"
DNSMASQ_MAKE_OPTS += DESTDIR=$(TARGET_DIR) LDFLAGS="$(TARGET_LDFLAGS)" \
LIBS+=$(TARGET_NLS_LIBS)
DNSMASQ_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
DNSMASQ_LICENSE = GPL-2.0 or GPL-3.0
DNSMASQ_LICENSE_FILES = COPYING COPYING-v3
DNSMASQ_CPE_ID_VENDOR = thekelleys
DNSMASQ_SELINUX_MODULES = dnsmasq
DNSMASQ_I18N = $(if $(BR2_SYSTEM_ENABLE_NLS),-i18n)
ifneq ($(BR2_PACKAGE_DNSMASQ_DHCP),y)
DNSMASQ_COPTS += -DNO_DHCP
endif
ifeq ($(BR2_PACKAGE_DNSMASQ_DNSSEC),y)
DNSMASQ_DEPENDENCIES += gmp nettle
DNSMASQ_COPTS += -DHAVE_DNSSEC
endif
ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y)
DNSMASQ_COPTS += -DNO_TFTP
endif
ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
ifeq ($(BR2_PACKAGE_LIBIDN2),y)
DNSMASQ_DEPENDENCIES += libidn2
DNSMASQ_COPTS += -DHAVE_LIBIDN2
else
DNSMASQ_DEPENDENCIES += libidn
DNSMASQ_COPTS += -DHAVE_IDN
endif
endif
ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y)
DNSMASQ_DEPENDENCIES += libnetfilter_conntrack
DNSMASQ_COPTS += -DHAVE_CONNTRACK
endif
ifeq ($(BR2_PACKAGE_DNSMASQ_LUA),y)
DNSMASQ_DEPENDENCIES += lua
DNSMASQ_COPTS += -DHAVE_LUASCRIPT
# liblua uses dlopen when dynamically linked
ifneq ($(BR2_STATIC_LIBS),y)
DNSMASQ_MAKE_OPTS += LIBS+="-ldl"
endif
define DNSMASQ_TWEAK_LIBLUA
$(SED) 's/lua5.2/lua/g' $(DNSMASQ_DIR)/Makefile
endef
endif
ifeq ($(BR2_PACKAGE_DBUS),y)
DNSMASQ_DEPENDENCIES += dbus
DNSMASQ_COPTS += -DHAVE_DBUS
define DNSMASQ_INSTALL_DBUS
$(INSTALL) -m 0644 -D $(@D)/dbus/dnsmasq.conf \
$(TARGET_DIR)/usr/share/dbus-1/system.d/dnsmasq.conf
endef
endif
ifeq ($(BR2_PACKAGE_UBUS),y)
DNSMASQ_DEPENDENCIES += ubus
DNSMASQ_COPTS += -DHAVE_UBUS
endif
define DNSMASQ_BUILD_CMDS
$(DNSMASQ_TWEAK_LIBLUA)
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPTS) all$(DNSMASQ_I18N)
endef
define DNSMASQ_INSTALL_TARGET_CMDS
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPTS) install$(DNSMASQ_I18N)
mkdir -p $(TARGET_DIR)/var/lib/misc/
$(DNSMASQ_INSTALL_DBUS)
endef
define DNSMASQ_INSTALL_INIT_SYSV
$(INSTALL) -m 755 -D package/dnsmasq/S80dnsmasq \
$(TARGET_DIR)/etc/init.d/S80dnsmasq
endef
$(eval $(generic-package))