diff --git a/README.md b/README.md index 27c46529d..4612090eb 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,83 @@ -# Setting up your build machine +# OpenWiFi AP NOS -Requires a recent linux installation. Older systems without python 3.7 will have trouble. See this link for details: https://openwrt.org/docs/guide-developer/quickstart-build-images +OpenWrt-based access point network operating system (AP NOS) for TIP OpenWiFi. +Read more at [openwifi.tip.build](https://openwifi.tip.build/). -Install build packages: sudo apt install build-essential libncurses5-dev gawk git libssl-dev gettext zlib1g-dev swig unzip time rsync python3 python3-setuptools python3-yaml. +## Building -# Doing a native build on Linux -First we need to clone and setup our tree. This will result in an openwrt/. +### Setting up your build machine + +Building requires a recent Linux installation. Older systems without Python 3.7 +will have trouble. See this guide for details: +https://openwrt.org/docs/guide-developer/toolchain/beginners-build-guide + +Install build packages on Debian/Ubuntu (or see above guide for other systems): ``` -./setup.py --setup +sudo apt install build-essential libncurses5-dev gawk git libssl-dev gettext zlib1g-dev swig unzip time rsync python3 python3-setuptools python3-yaml ``` -Next we need to select the profile and base package selection. This setup will install the feeds, packages and generate the .config file. + +### Doing a native build on Linux + +Use `./build.sh `, or follow the manual steps below: + +1. Clone and set up the tree. This will create an `openwrt/` directory. +```shell +./setup.py --setup # for subsequent builds, use --rebase instead ``` + +2. Select the profile and base package selection. This setup will install the + feeds and packages and generate the `.config` file. +```shell cd openwrt ./scripts/gen_config.py linksys_ea8300 ``` -Finally we can build the tree. -``` -make -j X V=s + +3. Build the tree (replace `-j 8` with the number of cores to use). +```shell +make -j 8 V=s ``` + +### Build output + +The build results are located in the `openwrt/bin/` directory: + +| Type | Path | +| ---------------- | ---------------------------------------------------- | +| Firmware images | `openwrt/bin/targets///` | +| Kernel modules | `openwrt/bin/targets///packages/` | +| Package binaries | `openwrt/bin/packages///` | + +## Developer Notes + +### Branching model + +- `main` - Stable dev branch +- `next` - Integration branch +- `staging-*` - Feature/bug branches +- `release/v#.#.#` - Release branches (*major.minor.patch*) + +### Repository structure + +Build files: +- `Makefile` - Calls Docker environment per target +- `dock-run.sh` - Dockerized build environment +- `docker/Dockerfile` - Dockerfile for build image +- `build.sh` - Build script +- `setup.py` - Clone and set up the tree +- `config.yml` - Specifies OpenWrt version and patches to apply + +Directories: +- `feeds/` - OpenWiFi feeds +- `patches/` - OpenWiFi patches applied during builds +- `profiles/` - Per-target kernel configs, packages, and feeds + - [wifi-ax](profiles/wifi-ax.yml): Wi-Fi AX packages + - [ucentral-ap](profiles/ucentral-ap.yml): uCentral packages + - [x64_vm](profiles/x64_vm.yml): x86-64 VM image + +### uCentral packages + +AP-NOS packages implementing the uCentral protocol include the following +repositories (refer to the [ucentral](feeds/ucentral/) feed for a full list): +- ucentral-client: https://github.com/Telecominfraproject/wlan-ucentral-client +- ucentral-schema: https://github.com/Telecominfraproject/wlan-ucentral-schema +- ucentral-wifi: https://github.com/blogic/ucentral-wifi diff --git a/feeds/ipq807x/ipq807x/base-files/etc/board.d/02_network b/feeds/ipq807x/ipq807x/base-files/etc/board.d/02_network index b1eef6cfd..af11ddf8d 100755 --- a/feeds/ipq807x/ipq807x/base-files/etc/board.d/02_network +++ b/feeds/ipq807x/ipq807x/base-files/etc/board.d/02_network @@ -85,13 +85,24 @@ qcom_setup_macs() case $board in cig,wf194c|\ - cig,wf194c4|\ - cig,wf196) + cig,wf194c4) mac=$(grep BaseMacAddress= /dev/mtd14 | cut -dx -f2) wan_mac=$(macaddr_canonicalize $mac) lan_mac=$(macaddr_add "$wan_mac" 1) ucidef_set_network_device_mac eth0 $lan_mac ucidef_set_network_device_mac eth1 $wan_mac + ip link set eth0 address $lan_mac + ip link set eth1 address $wan_mac + ucidef_set_label_macaddr $wan_mac + ;; + cig,wf196) + mac=$(grep BaseMacAddress= /dev/mtd14 | cut -dx -f2) + wan_mac=$(macaddr_canonicalize $mac) + lan_mac=$(macaddr_add "$wan_mac" 1) + ucidef_set_network_device_mac eth1 $lan_mac + ucidef_set_network_device_mac eth0 $wan_mac + ip link set eth0 address $wan_mac + ip link set eth1 address $lan_mac ucidef_set_label_macaddr $wan_mac ;; cybertan,eww622-a1) diff --git a/feeds/wifi-ax/mac80211/patches/pending/211-replace_txq0.patch b/feeds/wifi-ax/mac80211/patches/pending/211-replace_txq0.patch new file mode 100644 index 000000000..b36d417c8 --- /dev/null +++ b/feeds/wifi-ax/mac80211/patches/pending/211-replace_txq0.patch @@ -0,0 +1,12 @@ +Index: backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/mac.c +=================================================================== +--- backports-20210222_001-4.4.60-b157d2276.orig/drivers/net/wireless/ath/ath11k/mac.c ++++ backports-20210222_001-4.4.60-b157d2276/drivers/net/wireless/ath/ath11k/mac.c +@@ -9356,6 +9356,7 @@ static int __ath11k_mac_register(struct + wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); + wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_STA_TX_PWR); + wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_BSS_COLOR); ++ wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0); + + if (test_bit(WMI_TLV_SERVICE_SCAN_PHYMODE_SUPPORT, + ar->ab->wmi_ab.svc_map))