added dnsmasq

This commit is contained in:
wt committed 2025-03-22 02:16:32 +07:00
1 parent fc0d5d76a1
commit f365fbeb8d
3 files changed
+28 -3

No files matched your search

+4 -2
View File
@@ -21,6 +21,7 @@ export makeflags=-j$(nproc) # makeflags
export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf
export ARCH=arm export ARCH=arm
export sdroot=$out/sdroot export sdroot=$out/sdroot
export ZLIB_ENABLE="true" export ZLIB_ENABLE="true"
export DROPBEAR_ENABLE="true" export DROPBEAR_ENABLE="true"
export image_usable_enable="true" export image_usable_enable="true"
@@ -30,9 +31,10 @@ export bash_enable="false"
export git_enable="false" export git_enable="false"
export gitea_enable="false" export gitea_enable="false"
export libnl_enable="false" export libnl_enable="false"
export iw_enable="true" export iw_enable="false"
export wireles_tools_enable="false" export wireles_tools_enable="false"
export wpa_supplicant_enable="false" export wpa_supplicant_enable="false"
export hostapd_enable="true" export hostapd_enable="false"
export openssl_enable="false" export openssl_enable="false"
export dnsmasq_enable="true"
#-------------------------------------- #--------------------------------------
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
dnsmasq() {
pkgname=dnsmasq
pkgver=2.90
printf "$GREEN** Building and installing $pkgname\n$RESET"
[ ! -d $build/$pkgname ] && mkdir $build/$pkgname
cd $build/$pkgname
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz
cd ${pkgname}-${pkgver}
make CC=${CROSS_COMPILE}-gcc ${makeflags}
check $? "Build ${pkgname}"
${CROSS_COMPILE}-strip src/$pkgname
check $? "Stripping ${pkgname} binary"
cp -v src/$pkgname $rootfspath/usr/bin/$pkgname
check $? "Install to rootfs ${pkgname}"
}
+3 -1
View File
@@ -17,6 +17,7 @@
. ./scripts/iw.sh . ./scripts/iw.sh
. ./scripts/openssl.sh . ./scripts/openssl.sh
. ./scripts/hostapd.sh . ./scripts/hostapd.sh
. ./scripts/dnsmasq.sh
#----------- Building rootfs ---------------------- #----------- Building rootfs ----------------------
rootfs() { rootfs() {
@@ -50,6 +51,8 @@ rootfs() {
kernel kernel
kernel_modules kernel_modules
[ "$ZLIB_ENABLE" = "true" ] && zlib [ "$ZLIB_ENABLE" = "true" ] && zlib
[ "$openssl_enable" = "true" ] && openssl
[ "$dnsmasq_enable" = "true" ] && dnsmasq
[ "$DROPBEAR_ENABLE" = "true" ] && dropbear [ "$DROPBEAR_ENABLE" = "true" ] && dropbear
[ "$sftp_server_enable" = "true" ] && sftp_server [ "$sftp_server_enable" = "true" ] && sftp_server
[ "$curl_enable" = "true" ] && curl [ "$curl_enable" = "true" ] && curl
@@ -58,7 +61,6 @@ rootfs() {
[ "$gitea_enable" = "true" ] && gitea [ "$gitea_enable" = "true" ] && gitea
[ "$libnl_enable" = "true" ] && libnl [ "$libnl_enable" = "true" ] && libnl
[ "$iw_enable" = "true" ] && iw [ "$iw_enable" = "true" ] && iw
[ "$openssl_enable" = "true" ] && openssl
[ "$hostapd_enable" = "true" ] && hostapd [ "$hostapd_enable" = "true" ] && hostapd
chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab