From 7763a39e8e8160a06ace607b298f25a2488236f0 Mon Sep 17 00:00:00 2001 From: Xianjun Jiao Date: Mon, 27 Apr 2020 15:06:42 +0200 Subject: [PATCH 01/13] fix the branch name, since we use master in public repositry --- user_space/get_fpga.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_space/get_fpga.sh b/user_space/get_fpga.sh index 9f049d0..9a698ed 100755 --- a/user_space/get_fpga.sh +++ b/user_space/get_fpga.sh @@ -22,7 +22,7 @@ cd $OPENWIFI_DIR/ git submodule init openwifi-hw git submodule update openwifi-hw cd openwifi-hw -git checkout zcu102_fmcs2 +git checkout master git pull cd $home_dir From 311b18bf7c5a29112a0ac68c32358ca8512d4269 Mon Sep 17 00:00:00 2001 From: Xianjun Jiao Date: Mon, 27 Apr 2020 15:25:23 +0200 Subject: [PATCH 02/13] track correct git repository --- .gitmodules | 3 +++ adi-linux | 2 +- adi-linux-64 | 1 + openwifi-hw | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) create mode 160000 adi-linux-64 diff --git a/.gitmodules b/.gitmodules index 14c18c9..be5c2ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "openwifi-hw"] path = openwifi-hw url = https://github.com/open-sdr/openwifi-hw.git +[submodule "adi-linux-64"] + path = adi-linux-64 + url = https://github.com/analogdevicesinc/linux.git diff --git a/adi-linux b/adi-linux index 4220d5d..4fea7c5 160000 --- a/adi-linux +++ b/adi-linux @@ -1 +1 @@ -Subproject commit 4220d5d24c6c7589fc702db4f941f0632b5ad767 +Subproject commit 4fea7c58ad92283acb90f182821b51d72b6afefa diff --git a/adi-linux-64 b/adi-linux-64 new file mode 160000 index 0000000..4fea7c5 --- /dev/null +++ b/adi-linux-64 @@ -0,0 +1 @@ +Subproject commit 4fea7c58ad92283acb90f182821b51d72b6afefa diff --git a/openwifi-hw b/openwifi-hw index ea25f77..2044aea 160000 --- a/openwifi-hw +++ b/openwifi-hw @@ -1 +1 @@ -Subproject commit ea25f771d0c7bda5e48e5ba7fae79a96cd295bf4 +Subproject commit 2044aeafbb41fc1e5b13b668ca092ecd1056113b From 967a9c873faaa91c4e14bdf84bfca604644a10d5 Mon Sep 17 00:00:00 2001 From: Xianjun Jiao Date: Mon, 27 Apr 2020 15:48:20 +0200 Subject: [PATCH 03/13] track correct openofdm_rx --- openwifi-hw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwifi-hw b/openwifi-hw index 2044aea..badd325 160000 --- a/openwifi-hw +++ b/openwifi-hw @@ -1 +1 @@ -Subproject commit 2044aeafbb41fc1e5b13b668ca092ecd1056113b +Subproject commit badd325f725b874db4c5c344c76ef59e70734c98 From 9d56afc0c82cae31eaf3e37236e5308ed7b531f3 Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Mon, 27 Apr 2020 21:31:17 +0200 Subject: [PATCH 04/13] Update README.md --- README.md | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 927b62b..b37f4f5 100644 --- a/README.md +++ b/README.md @@ -57,15 +57,22 @@ zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future [[Cite openwifi project](#Cite-openwifi-project)] ## Quick start -- Burn [openwifi image](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2.img.xz) into a SD card ("Open With Disk Image Writer". Or "dd" command after unzip). The SD card has two partitions: BOOT and rootfs. You need to config the **correct files in the BOOT partition** according to the **board you have** by operation on your computer: +- Burn openwifi [64bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-64bit.img.xz) (for Zynq MPSoC FPGA, like zcu102 board) or [32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) (for other boards, Zynq7000 FPGA) into a SD card ("Open With Disk Image Writer". Or "dd" command after unzip). The SD card has two partitions: BOOT and rootfs. You need to config the **correct files in the BOOT partition** according to the **board you have** by operation on your computer: - Copy files in **openwifi/board_name** to the base directory of BOOT partiton. - Copy **openwifi/zynqmp-common/Image** (zcu102 board) or **openwifi/zynq-common/uImage** (other boards) to the base directory of BOOT partiton -- Connect two antennas to RXA/TXA ports. Config the board to SD card boot mode (check the board manual). Insert the SD card to the board. -- Power on. login to the board from your PC (PC Ethernet should have IP 192.168.10.1) with one time password **analog**. +- Connect two antennas to RXA/TXA ports. Config the board to SD card boot mode (check the board manual). Insert the SD card to the board. Power on. +- Login to the board from your PC (PC Ethernet should have IP 192.168.10.1) with password **openwifi**. ``` ssh root@192.168.10.122 ``` -- Setup routing/NAT **on the PC** for the board -- this is **important** for post installation/config. +- On board, run openwifi AP and the on board webserver + ``` + ~/openwifi/fosdem.sh + ``` +- After you see the "openwifi" SSID on your device (Phone/Laptop/etc), connect it. Browser to 192.168.13.1 on your deivce, you should see the webpage hosted by the webserver on board. + - Note 1: If your device doesn't support 5GHz (ch44), please change the **hostapd-openwifi.conf** on board and re-run fosdem.sh. + - Note 2: After ~2 hours, the Viterbi decoder will halt (Xilinx Evaluation License). Just power cycle the board if it happens. (If output of "./sdrctl dev sdr0 get reg rx 20" is always the same, it means the decoder halts) +- To give the Wi-Fii client internet access, configure routing/NAT **on the PC**: ``` sudo sysctl -w net.ipv4.ip_forward=1 sudo iptables -t nat -A POSTROUTING -o ethY -j MASQUERADE @@ -74,17 +81,6 @@ zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future **ethX** is the PC NIC name connecting the board. **ethY** is the PC NIC name connecting internet. If you want, uncommenting "net.ipv4.ip_forward=1" in /etc/sysctl.conf to make IP forwarding persistent on PC. -- Run **one time** script on board to complete post installation/config (After this, password becomes **openwifi**) - ``` - cd ~/openwifi && ./post_config.sh - ``` -- Run openwifi AP together with the on board webserver - ``` - ~/openwifi/fosdem.sh - ``` -- After you see the "openwifi" SSID on your device (Phone/Laptop/etc), connect it. Browser to 192.168.13.1 on your deivce, you should see the webpage hosted by the webserver on board. - - Note 1: If your device doesn't support 5GHz (ch44), please change the **hostapd-openwifi.conf** on board and re-run fosdem.sh. - - Note 2: After ~2 hours, the Viterbi decoder will halt (Xilinx Evaluation License). Just power cycle the board if it happens. (If output of "./sdrctl dev sdr0 get reg rx 20" is always the same, it means the decoder halts) ## Basic operations The board actually is an Linux/Ubuntu computer which is running **hostapd** to offer Wi-Fi AP functionality over the Wi-Fi Network Interface (NIC). The NIC is implemented by openwifi-hw FPGA design. We use the term **"On board"** to indicate that the commands should be executed after ssh login to the board. **"On PC"** means the commands should run on PC. @@ -190,7 +186,25 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i ``` $OPENWIFI_DIR/user_space/update_sdcard.sh $OPENWIFI_DIR $XILINX_DIR $BOARD_NAME $SDCARD_DIR ``` -- Now you can start from [Quick start](#Quick-start) +- Config your board to SD card boot mode (check the board manual). Insert the SD card to the board. Power on. +- Login to the board from your PC (PC Ethernet should have IP 192.168.10.1) with one time password **analog**. + ``` + ssh root@192.168.10.122 + ``` +- Setup routing/NAT **on the PC** for your board -- this internet connection is **important** for post installation/config. + ``` + sudo sysctl -w net.ipv4.ip_forward=1 + sudo iptables -t nat -A POSTROUTING -o ethY -j MASQUERADE + sudo ip route add 192.168.13.0/24 via 192.168.10.122 dev ethX + ``` + **ethX** is the PC NIC name connecting the board. **ethY** is the PC NIC name connecting internet. + + If you want, uncommenting "net.ipv4.ip_forward=1" in /etc/sysctl.conf to make IP forwarding persistent on PC. +- Run **one time** script on board to complete post installation/config (After this, password becomes **openwifi**) + ``` + cd ~/openwifi && ./post_config.sh + ``` +- Now you can start from [Quick start](#Quick-start) (Skip the image download and burn step) ## Special note for 11b From 6e8c8cf83e74a1b777c38ec3a86c64e76b88f4a6 Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Tue, 28 Apr 2020 09:53:18 +0200 Subject: [PATCH 05/13] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b37f4f5..3177db6 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,15 @@ Openwifi code has dual licenses. AGPLv3 is the opensource license. For non-opens **Supported SDR platforms:** (Check [Porting guide](#Porting-guide) for your new board if it isn't in the list) -board_name|board combination|status --------|-------|---- -zc706_fmcs2|Xilinx ZC706 dev board + FMCOMMS2/3/4|Done -zed_fmcs2|Xilinx zed board + FMCOMMS2/3/4|Done -adrv9364z7020|ADRV9364Z7020 SOM|Done -adrv9361z7035|ADRV9361Z7035 SOM|Done -zc702_fmcs2|Xilinx ZC702 dev board + FMCOMMS2/3/4|Done -zcu102_fmcs2|Xilinx ZCU102 dev board + FMCOMMS2/3/4|Done -zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future +board_name|board combination|status|SD card +-------|-------|----|---- +zc706_fmcs2|Xilinx ZC706 dev board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) +zed_fmcs2|Xilinx zed board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) +adrv9364z7020|ADRV9364Z7020 SOM|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) +adrv9361z7035|ADRV9361Z7035 SOM|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) +zc702_fmcs2|Xilinx ZC702 dev board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) +zcu102_fmcs2|Xilinx ZCU102 dev board + FMCOMMS2/3/4|Done|[64bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-64bit.img.xz) +zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future|None - board_name is used to identify FPGA design in openwifi-hw/boards/ - Don't have any boards? Or you like JTAG boot instead of SD card? Check our test bed [w-iLab.t](https://doc.ilabt.imec.be/ilabt/wilab/tutorials/openwifi.html) tutorial. @@ -57,7 +57,7 @@ zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future [[Cite openwifi project](#Cite-openwifi-project)] ## Quick start -- Burn openwifi [64bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-64bit.img.xz) (for Zynq MPSoC FPGA, like zcu102 board) or [32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) (for other boards, Zynq7000 FPGA) into a SD card ("Open With Disk Image Writer". Or "dd" command after unzip). The SD card has two partitions: BOOT and rootfs. You need to config the **correct files in the BOOT partition** according to the **board you have** by operation on your computer: +- Burn openwifi board specific img file (from the table) into a SD card ("Open With Disk Image Writer". Or "dd" command after unzip). The SD card has two partitions: BOOT and rootfs. You need to config the **correct files in the BOOT partition** according to the **board you have** by operation on your computer: - Copy files in **openwifi/board_name** to the base directory of BOOT partiton. - Copy **openwifi/zynqmp-common/Image** (zcu102 board) or **openwifi/zynq-common/uImage** (other boards) to the base directory of BOOT partiton - Connect two antennas to RXA/TXA ports. Config the board to SD card boot mode (check the board manual). Insert the SD card to the board. Power on. From e9c8400156f83488ff26cbca3968c087da44d954 Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Tue, 28 Apr 2020 09:54:10 +0200 Subject: [PATCH 06/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3177db6..0dbce1d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Openwifi code has dual licenses. AGPLv3 is the opensource license. For non-opens **Supported SDR platforms:** (Check [Porting guide](#Porting-guide) for your new board if it isn't in the list) -board_name|board combination|status|SD card +board_name|board combination|status|SD card img -------|-------|----|---- zc706_fmcs2|Xilinx ZC706 dev board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) zed_fmcs2|Xilinx zed board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) From 06c39ddb3f1f494f436c86d0667a6573787c05fb Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Wed, 29 Apr 2020 09:27:04 +0200 Subject: [PATCH 07/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0dbce1d..0880a32 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i - Input password "openwifi" ## Build openwifi Linux img from scratch -- Download [2019_R1-2020_02_04.img.xz](swdownloads.analog.com/cse/2019_R1-2020_02_04.img.xz) from [Analog Devices Wiki](https://wiki.analog.com/resources/tools-software/linux-software/zynq_images). Burn it to a SD card. +- Download [2019_R1-2020_02_04.img.xz](http://swdownloads.analog.com/cse/2019_R1-2020_02_04.img.xz) from [Analog Devices Wiki](https://wiki.analog.com/resources/tools-software/linux-software/zynq_images). Burn it to a SD card. - Insert the SD card to your Linux PC. Find out the mount point (that has two sub directories BOOT and rootfs), and setup environment variables (use absolute path): ``` export SDCARD_DIR=sdcard_mount_point From 89ac92c23b11763dedd189d1d31f37d18ce37ed5 Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Wed, 29 Apr 2020 10:05:41 +0200 Subject: [PATCH 08/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0880a32..3ca31b7 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ The board actually is an Linux/Ubuntu computer which is running **hostapd** to o Since the pre-built SD card image might not have the latest bug-fixes/updates, it is recommended to udpate the fpga bitstream on board. -- Install Vivado/SDK 2017.4.1 (If you don't need to generate new FPGA bitstream, WebPack version without license is enough) +- Install Vivado/SDK 2018.3 (If you don't need to generate new FPGA bitstream, WebPack version without license is enough) - Setup environment variables (use absolute path): ``` export XILINX_DIR=your_Xilinx_directory From c6ad17ac4b11d94556c1b2a581d362c71ae81d9c Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Sun, 3 May 2020 15:14:17 +0200 Subject: [PATCH 09/13] Update README.md --- driver/xilinx_dma/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driver/xilinx_dma/README.md b/driver/xilinx_dma/README.md index caa15d2..f1c25af 100644 --- a/driver/xilinx_dma/README.md +++ b/driver/xilinx_dma/README.md @@ -1,3 +1,6 @@ + +===============Following are obsolete content================= + Currently used driver xilinx_dma-orig.c is based on 552d3f11e374ca0d435aa93a571507819eabdda2 of https://github.com/Xilinx/linux-xlnx ) instruction to generate our customized xilinx dma driver: From 635261bc36d48c33c521e36e81f9c04276a7da83 Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Tue, 12 May 2020 10:54:25 +0200 Subject: [PATCH 10/13] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3ca31b7..6b6f088 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future|None The board actually is an Linux/Ubuntu computer which is running **hostapd** to offer Wi-Fi AP functionality over the Wi-Fi Network Interface (NIC). The NIC is implemented by openwifi-hw FPGA design. We use the term **"On board"** to indicate that the commands should be executed after ssh login to the board. **"On PC"** means the commands should run on PC. - Bring up the openwifi NIC sdr0: ``` + service network-manager stop cd ~/openwifi && ./wgd.sh ``` - Use openwifi as client to connect other AP (Change wpa-connect.conf on board firstly): From 34a68b64e5d47fe909ca14e8a36719310c951a03 Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Wed, 13 May 2020 15:27:26 +0200 Subject: [PATCH 11/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b6f088..a71a76c 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i ## Update sdrctl - Copy the sdrctl source files to the board via ssh channel ``` - scp `find $OPENWIFI_DIR/user_space/sdrctl_src/ -name \*.*` root@192.168.10.122:openwifi/sdrctl_src/ + scp `find $OPENWIFI_DIR/user_space/sdrctl_src/ -name \*` root@192.168.10.122:openwifi/sdrctl_src/ ``` - Compile the sdrctl **on board**: ``` From 459c61501fff1531cd678b41b5d24ab3d7566a3a Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Thu, 21 May 2020 14:16:10 +0200 Subject: [PATCH 12/13] Update README.md --- doc/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/README.md b/doc/README.md index 33f651b..8428e37 100644 --- a/doc/README.md +++ b/doc/README.md @@ -25,7 +25,7 @@ openwifi driver (sdr.c) implements following APIs of ieee80211_ops: - **bss_info_changed**. It is called when upper layer believe some BSS parameters need to be changed (BSSID, TX power, beacon interval, etc) - **conf_tx**. It is called when upper layer needs to config/change some tx parameters (AIFS, CW_MIN, CW_MAX, TXOP, etc) - **prepare_multicast**. It is called when upper layer needs to prepare multicast, currently only a empty function hook is present. -- **configure_filter**. It is called when upper layer wants to config/change the [frame filtering](#tx-packet-flow-and-config) rule in FPGA. +- **configure_filter**. It is called when upper layer wants to config/change the [frame filtering](#rx-packet-flow-and-filtering-config) rule in FPGA. - **rfkill_poll**. It is called when upper layer wants to know the RF status (ON/OFF). - **get_tsf**. It is called when upper layer wants to get 64bit FPGA timer value (TSF - Timing synchronization function) - **set_tsf**. It is called when upper layer wants to set 64bit FPGA timer value From 0ffd1327be073c8d3b4cf633afac5ef18b94279c Mon Sep 17 00:00:00 2001 From: Jiao Xianjun Date: Fri, 12 Jun 2020 10:15:36 +0200 Subject: [PATCH 13/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a71a76c..28b0ebd 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ zed_fmcs2|Xilinx zed board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.b adrv9364z7020|ADRV9364Z7020 SOM|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) adrv9361z7035|ADRV9361Z7035 SOM|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) zc702_fmcs2|Xilinx ZC702 dev board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-32bit.img.xz) -zcu102_fmcs2|Xilinx ZCU102 dev board + FMCOMMS2/3/4|Done|[64bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-2-64bit.img.xz) +zcu102_fmcs2|Xilinx ZCU102 dev board + FMCOMMS2/3/4|Done|[64bit img](https://drive.google.com/file/d/1x6gvd5t2QOxRUXteSHiewaUZJghCd9bR/view?usp=sharing) zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future|None - board_name is used to identify FPGA design in openwifi-hw/boards/