added kernel driver rtl8821au

This commit is contained in:
wt
2025-03-24 23:37:54 +07:00
parent 5d876267e2
commit b05a2ff338
6 changed files with 37 additions and 2 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
. ./scripts/kernel.sh
ko8821au() {
pkgname=8821au
pkgver=20210708
gitsrc=https://github.com/morrownr/8821au-20210708.git
printf "$GREEN** Building and installing $pkgname\n$RESET"
[ ! -d $build/$pkgname ] && mkdir $build/$pkgname
cd $build/$pkgname
git clone $gitsrc
cd ${pkgname}-${pkgver}
make ARCH=$ARCH CROSS_COMPILE=${CROSS_COMPILE}- KSRC=${build}/kernel/linux-${kernel_version} modules ${makeflags}
check $? "Build ${pkgname}"
mkdir -pv $rootfspath/lib/modules/${kernel_version}/kernel/drivers/net/wireless
cp -v 8821au.ko $rootfspath/lib/modules/${kernel_version}/kernel/drivers/net/wireless/
/sbin/depmod -a ${kernel_version} -b $rootfspath
check $? "Install Linux Kernel module ${pkgname}"
[ -d $rootfspath/usr/lib/modules/$kernel_version/source ] && rm -rv $rootfspath/usr/lib/modules/$kernel_version/source
[ -d $rootfspath/usr/lib/modules/$kernel_version/build ] && rm -rv $rootfspath/usr/lib/modules/$kernel_version/build
}
+4
View File
@@ -15,6 +15,7 @@
. ./scripts/hostapd.sh
. ./scripts/openssl.sh
. ./scripts/iptables.sh
. ./scripts/8821au_ko.sh
case $1 in
build)
@@ -52,6 +53,9 @@ case $1 in
iptables)
iptables
;;
ko8821au)
ko8821au
;;
sdroot_usable)
if [ ! -d downloads ]; then
download_sources
+1
View File
@@ -38,4 +38,5 @@ export hostapd_enable="false"
export openssl_enable="false"
export dnsmasq_enable="true"
export iptables_enable="true"
export ko8821au_enable="true"
#--------------------------------------
+1 -1
View File
@@ -5,7 +5,7 @@
. ./scripts/config.sh
. ./scripts/curl.sh
git() {
git_build() {
if [ ! -d $build/curl ]; then
curl
fi
+3 -1
View File
@@ -19,6 +19,7 @@
. ./scripts/hostapd.sh
. ./scripts/dnsmasq.sh
. ./scripts/iptables.sh
. ./scripts/8821au_ko.sh
#----------- Building rootfs ----------------------
rootfs() {
@@ -58,12 +59,13 @@ rootfs() {
[ "$sftp_server_enable" = "true" ] && sftp_server
[ "$curl_enable" = "true" ] && curl
[ "$bash_enable" = "true" ] && bash
[ "$git_enable" = "true" ] && git
[ "$git_enable" = "true" ] && git_build
[ "$gitea_enable" = "true" ] && gitea
[ "$libnl_enable" = "true" ] && libnl
[ "$iw_enable" = "true" ] && iw
[ "$hostapd_enable" = "true" ] && hostapd
[ "$iptables_enable" = "true" ] && iptables
[ "$ko8821au_enable" = "true" ] && ko8821au
chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab
chmod 755 $rootfspath/etc/init.d/* $rootfspath/usr/share/udhcpc/default.script $rootfspath/init