From 70cedb2220ce3dc467f97e16f1a60c1776ea94f6 Mon Sep 17 00:00:00 2001 From: Xianjun Jiao Date: Fri, 13 May 2022 22:39:33 +0200 Subject: [PATCH] Improve the doc --- README.md | 16 +++++++++++----- doc/app_notes/drv_fpga_dynamic_loading.md | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 276f17e..c59b78d 100644 --- a/README.md +++ b/README.md @@ -119,14 +119,16 @@ The board actually is an Linux/Ubuntu computer which is running **hostapd** to o wpa_supplicant -i sdr0 -c wpa-connect.conf & dhclient sdr0 ``` -- Use openwifi in ad-hoc mode: Please check **sdr-ad-hoc-up.sh** and **sdr-ad-hoc-join.sh**. -- Use openwifi in monitor mode: Please check **monitor_ch.sh**. +- Use openwifi in ad-hoc mode: Please check **sdr-ad-hoc-up.sh**, **sdr-ad-hoc-join.sh** and [this app note](./doc/app_notes/ad-hoc-two-sdr.md). +- Use openwifi in monitor mode: Please check **monitor_ch.sh** and [this app note](./doc/app_notes/inject_80211.md). - The Linux native Wi-Fi tools/Apps (iwconfig/ifconfig/iwlist/iw/hostapd/wpa_supplicant/etc) can run over openwifi NIC in the same way as commercial Wi-Fi chip. -- **sdrctl** is a dedicated tool to access openwifi driver/FPGA, please check doc directory for more information. +- **sdrctl** is a dedicated tool to access openwifi driver/FPGA, please check [project document](./doc/README.md) for more information. ## Update FPGA -Since the pre-built SD card image might not have the latest bug-fixes/updates, it is recommended to update the fpga bitstream on board. +(Check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md) for more convenient way of updating FPGA and driver files) + +Since the pre-built SD card image might not have the latest bug-fixes/updates, it is recommended to always copy the latest files in the [user_space](./user_space) directory on to the board. Then update the fpga bitstream and driver (see next section) on to the board. - Install Vivado/SDK 2018.3 (Vivado Design Suite - HLx Editions - 2018.3 Full Product Installation. If you don't need to generate new FPGA bitstream, WebPack version without license is enough) - Setup environment variables (use absolute path): @@ -163,7 +165,10 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i ## Update Driver -Since the pre-built SD card image might not have the latest bug-fixes/updates, it is recommended to update the driver on board. +(Check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md) for more convenient way of updating FPGA and driver files) + +Since the pre-built SD card image might not have the latest bug-fixes/updates, it is recommended to always copy the latest files in the [user_space](./user_space) directory on to the board. Then update the fpga bitstream (see previous section) and driver on to the board. + - Prepare Analog Devices Linux kernel source code (only need to run once): ``` cd openwifi/user_space; ./prepare_kernel.sh $XILINX_DIR ARCH_BIT build @@ -196,6 +201,7 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i ``` ## Easy Access and etc +- Check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md) for more convenient way of updating FPGA and driver files. - FPGA and driver on board update scripts - Setup [ftp server](https://ubuntu.com/server/docs/service-ftp) on PC, allow anonymous and change ftp root directory to the openwifi directory. - On board: diff --git a/doc/app_notes/drv_fpga_dynamic_loading.md b/doc/app_notes/drv_fpga_dynamic_loading.md index b0d606a..c22ad0f 100644 --- a/doc/app_notes/drv_fpga_dynamic_loading.md +++ b/doc/app_notes/drv_fpga_dynamic_loading.md @@ -1,10 +1,12 @@ -The **wgd.sh** (running on board) supports reloading driver and/or FPGA image dynamically without rebooting/power-cycle. It can work in different modes in a -flexible way. +The **wgd.sh** (running on board) supports reloading driver and/or FPGA image dynamically without rebooting/power-cycle. It can work in a +flexible way. + +The purpose of this feature is to help you easily reload driver and FPGA built from your branch/version/variant/modification, and switch/run different driver and FPGA of different branch/version/variant/modification without rebooting. To enjoy this feature, always ensure your onboard openwifi/files are the latest files in [user_space](../../user_space)). - [[Reload driver only](#Reload-driver-only)] - [[Reload driver and FPGA](#Reload-driver-and-FPGA)] - [[Reload driver and FPGA in target directory](#Reload-driver-and-FPGA-in-target-directory)] -- [[Reload driver and FPGA from a single package file](#Reload-driver-and-FPGA-from-a-single-package-file)] +- [[Reload driver and FPGA from a single package file](#Reload-driver-and-FPGA-from-a-single-package-file)] -- **RECOMMENDED!** - [[Detailed full usage info](#Detailed-full-usage-info)] ## Reload driver only @@ -17,7 +19,8 @@ present in the directory. If wgd.sh can not find the FPGA image, it will skip re cd openwifi/user_space ./drv_and_fpga_package_gen.sh $OPENWIFI_HW_DIR $XILINX_DIR $BOARD_NAME ``` - Then **system_top.bit.bin** will be generated in openwifi/user_space + Then **system_top.bit.bin** will be generated in openwifi/user_space. + (**Attention:** above command will call **make_all.sh** to build the driver. If you have conditional compiling option, do not forget to put them into **drv_and_fpga_package_gen.sh** for the **make_all.sh** in it. - Put **system_top.bit.bin** on board in the same directory as wgd.sh and other driver files (.ko) - Run **wgd.sh** on board as usual @@ -31,13 +34,13 @@ between them without rebooting/power-cycle. ## Reload driver and FPGA from a single package file The openwifi/user_space/**drv_and_fpga_package_gen.sh** also generates a single package file **drv_and_fpga.tar.gz**, which includes driver files (.ko), -FPGA image and many other rich source files/infos that are related. You can rename it with a more meaningful name (such as add version or variant info), and put -the renamed **drv_and_fpga_MEANINGFUL_POSTFIX.tar.gz** on board in the same directory as **wgd.sh**, and let **wgd.sh** load it: +FPGA image and many other source files with rich infos that are related. + +You can switch to your own branch/version/variant, build the single package file via **drv_and_fpga_package_gen.sh**, rename it with a more meaningful name (such as add version or variant info as postfix), put the renamed **drv_and_fpga_MEANINGFUL_POSTFIX.tar.gz** on board in the same directory as **wgd.sh**, and let **wgd.sh** load it: ``` ./wgd.sh ./drv_and_fpga_MEANINGFUL_POSTFIX.tar.gz ``` -In this way, different version/variants of driver/FPGA can be packaged as different files. Then **wgd.sh** can be used to switch -between them without rebooting/power-cycle. +In this way, different version/variants of driver/FPGA can be switched by **wgd.sh** without rebooting/power-cycle. ## Detailed full usage info Run the "./wgd.sh -h" on board or open wgd.sh to see full usage info: