Skip to content

Commit

Permalink
major upgrade to scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
morrownr committed Dec 21, 2022
1 parent 9a04d2b commit 46e2665
Show file tree
Hide file tree
Showing 15 changed files with 917 additions and 784 deletions.
14 changes: 11 additions & 3 deletions 88x2bu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
#
# Purpose: Allow easy access to specific driver options.
#
# Note: pull-request: wireless-next-2022-12-12
# wireless-next patches for v6.2
# wifi: rtw88: Add rtw8822bu chipset support
# The following line blacklists the above in-kernel driver.
blacklist rtw88_8822bu
#
# Edit the following line to change, add or delete options:
options 88x2bu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgnt=1 rtw_switch_usb_mode=0
options 88x2bu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_switch_usb_mode=0
#
# After editing is complete, save this file (if using nano: Ctrl + x, y, Enter)
# and reboot to activate the changes.
Expand Down Expand Up @@ -73,16 +79,18 @@ options 88x2bu rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgn
#
# -----
#
# Country Code options ( rtw_country_code )
# ISO 3166-1 alpha-2 Country Code options ( rtw_country_code )
#
# Note: Allows the Country Code to be set in cases where it is unable to
# be obtained from the operating system.
# be obtained otherwise.
#
# Example for the US: rtw_country_code=US
# Example for Panama: rtw_country_code=PA
# Example for Norway: rtw_country_code=NO
# Example for Kuwait: rtw_country_code=KW
# Example for Taiwan: rtw_country_code=TW
#
# ISO 3166-1 alpha-2 codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
#
# -----
#
Expand Down
27 changes: 0 additions & 27 deletions ARM64_RPI.sh

This file was deleted.

29 changes: 0 additions & 29 deletions ARM_RPI.sh

This file was deleted.

1 change: 0 additions & 1 deletion Kconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
config RTL8822BU
tristate "Realtek 8822B USB WiFi"
depends on USB
select WIRELESS_EXT
help
Help message of RTL8822BU

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2021 Realtek Corporation.
* Copyright(c) 2007 - 2022 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
Expand Down
98 changes: 51 additions & 47 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ EXTRA_CFLAGS += -Wno-misleading-indentation
EXTRA_CFLAGS += -Wno-implicit-fallthrough
#EXTRA_CFLAGS += -Wno-return-type

# Activates Concurrent Mode if uncommented
#EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE

# LED Control
EXTRA_CFLAGS += -DCONFIG_LED_CONTROL
EXTRA_CFLAGS += -DCONFIG_SW_LED -DCONFIG_RTW_SW_LED
EXTRA_CFLAGS += -DCONFIG_LED_ENABLE

# gcc-12
EXTRA_CFLAGS += -Wno-address
EXTRA_CFLAGS += -Wframe-larger-than=1648
Expand Down Expand Up @@ -150,9 +158,8 @@ CONFIG_LAYER2_ROAMING = y
#bit0: ROAM_ON_EXPIRED, #bit1: ROAM_ON_RESUME, #bit2: ROAM_ACTIVE
CONFIG_ROAMING_FLAG = 0x3
###################### Platform Related #######################
CONFIG_PLATFORM_I386_PC = y
CONFIG_PLATFORM_ARM_RPI = n
CONFIG_PLATFORM_ARM64_RPI = n
CONFIG_PLATFORM_AUTODETECT = y
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
CONFIG_PLATFORM_JB_X86 = n
Expand Down Expand Up @@ -312,8 +319,8 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8188E

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8188EPwrSeq.o\
hal/$(RTL871X)/$(RTL871X)_xmit.o\
hal/$(RTL871X)/Hal8188EPwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_xmit.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -368,8 +375,8 @@ MODULE_NAME = 8192ee
endif
EXTRA_CFLAGS += -DCONFIG_RTL8192E
_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8192EPwrSeq.o\
hal/$(RTL871X)/$(RTL871X)_xmit.o\
hal/$(RTL871X)/Hal8192EPwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_xmit.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -428,8 +435,8 @@ endif

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8812PwrSeq.o \
hal/$(RTL871X)/Hal8821APwrSeq.o\
hal/$(RTL871X)/$(RTL871X)_xmit.o\
hal/$(RTL871X)/Hal8821APwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_xmit.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -535,7 +542,7 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8723B

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8723BPwrSeq.o\
hal/$(RTL871X)/Hal8723BPwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -597,7 +604,7 @@ EXTRA_CFLAGS += -DCONFIG_RTL8814A

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8814PwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_xmit.o\
hal/$(RTL871X)/$(RTL871X)_xmit.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -657,7 +664,7 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8703B

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8703BPwrSeq.o\
hal/$(RTL871X)/Hal8703BPwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -713,7 +720,7 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8723D

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8723DPwrSeq.o\
hal/$(RTL871X)/Hal8723DPwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -781,7 +788,7 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8188F

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8188FPwrSeq.o\
hal/$(RTL871X)/Hal8188FPwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -828,7 +835,7 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8188GTV

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8188GTVPwrSeq.o\
hal/$(RTL871X)/Hal8188GTVPwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -906,7 +913,7 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8710B

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8710BPwrSeq.o\
hal/$(RTL871X)/Hal8710BPwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -953,7 +960,7 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8192F

_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \
hal/$(RTL871X)/Hal8192FPwrSeq.o\
hal/$(RTL871X)/Hal8192FPwrSeq.o \
hal/$(RTL871X)/$(RTL871X)_sreset.o

_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \
Expand Down Expand Up @@ -1346,57 +1353,54 @@ EXTRA_CFLAGS += -DCONFIG_RTW_MBO -DCONFIG_RTW_80211K -DCONFIG_RTW_WNM -DCONFIG_R
EXTRA_CFLAGS += -DCONFIG_RTW_80211R
endif

ifeq ($(CONFIG_PLATFORM_I386_PC), y)
ifeq ($(CONFIG_CONCURRENT_MODE), y)
EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
endif
# *** AUTODETECT ***
ifeq ($(CONFIG_PLATFORM_AUTODETECT), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging

SUBARCH := $(shell uname -m)

ifeq ($(SUBARCH), aarch64)
SUBARCH := arm64
endif

### START RASPBERRY PI OS SUPPORT
ifeq ($(SUBARCH), armv7l)
SUBARCH := arm
endif

ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
ifeq ($(CONFIG_CONCURRENT_MODE), y)
EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
ifeq ($(SUBARCH), armv6l)
SUBARCH := arm
endif
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
#EXTRA_CFLAGS += -DPLATFORM_LINUX
ARCH ?= arm

ARCH ?= $(SUBARCH)

CROSS_COMPILE ?=
KVER ?= $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif
STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging

ifeq ($(CONFIG_PLATFORM_ARM64_RPI), y)
ifeq ($(CONFIG_CONCURRENT_MODE), y)
EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE
# Platform Specific Flags may be Needed in some Situations
#EXTRA_CFLAGS += -DCONFIG_PLATFORM_ANDROID
# End of Platform Specific Flags
endif
# *** End AUTODETECT ***

ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
#EXTRA_CFLAGS += -DPLATFORM_LINUX
EXTRA_CFLAGS += -fno-stack-protector
ARCH ?= arm64

SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER ?= $(shell uname -r)
KVER := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging
endif

### END RASPBERRY PI OS SUPPORT

ifeq ($(CONFIG_PLATFORM_NV_TK1), y)
EXTRA_CFLAGS += -DCONFIG_PLATFORM_NV_TK1
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
Expand Down
Loading

0 comments on commit 46e2665

Please sign in to comment.