Skip to contentSkip to conversation

configs/warp7: Add Wifi support

PATCH New Fabio Estevam 3 participants 5 messages Sep 19, 2016 – Sep 20, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs/warp7: Add Wifi support

From: Fabio Estevam <[email protected]>

Warp7 has a BRCM43430 Wifi chipset. Add support for it.

---
 board/warp7/linux.fragment                         |  2 ++
 board/warp7/readme.txt                             | 11 ++++++
 .../lib/firmware/brcm/brcmfmac43430-sdio.txt       | 42 ++++++++++++++++++++++
 configs/warp7_defconfig                            | 13 +++++++
 4 files changed, 68 insertions(+)
 create mode 100644 board/warp7/linux.fragment
 create mode 100644 board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt
board/warp7/linux.fragment new file +2 -0
new file mode 100644
index 0000000..00f74cb
@@ -0,0 +1,2 @@
+CONFIG_CFG80211_WEXT=y
+CONFIG_BRCMFMAC=m
board/warp7/readme.txt +11 -0
index 3c765f5..00325e7 100644
@@ -90,4 +90,15 @@ To boot your newly created system:
   emulator at 115200 bps, 8n1;
 - power on the board.
 
+Using Wifi
+==========
+
+# modprobe brcmfmac
+# iwconfig wlan0 essid ACCESSPOINTNAME
+# wpa_passphrase ACCESSPOINTNAME > /etc/wpa.conf
+(enter the wifi password and press enter)
+# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf &
+# udhcpc -i wlan0
+# ping buildroot.org
+
 Enjoy!
board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt new file +42 -0

42 lines not on this page · raw message

configs/warp7_defconfig +13 -0
index 95508d6..967df8e 100644
@@ -8,12 +8,16 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y
 # system
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
 
+# rootfs overlay
+BR2_ROOTFS_OVERLAY="board/warp7/rootfs_overlay"
+
 # Kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/Freescale/linux-fslc.git"
 BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="efaf36531fe7b1fc15a48033e5972825c91f9fc6"
 BR2_LINUX_KERNEL_DEFCONFIG="imx_v7"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/warp7/linux.fragment"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7s-warp"
 
@@ -24,6 +28,15 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09"
 BR2_TARGET_UBOOT_FORMAT_IMX=y
 
+# wifi firmware for brcm43430
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y
+
+# wireless packages
+BR2_PACKAGE_WIRELESS_TOOLS=y
+BR2_PACKAGE_WPA_SUPPLICANT=y
+BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
+
 # Filesystem
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/warp7/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 configs/warp7: Add Wifi support

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabio" == Fabio Estevam <[email protected]> writes:

From: Fabio Estevam <[email protected]> Warp7 has a BRCM43430 Wifi chipset. Add support for it.

Committed, thanks.

Quoted 1 line

+++ b/board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt

We recently had a discussion about this .txt file in the context of rpi3. How specific to warp7 is this file? Is there some documentation somewhere explaining what all these settings do?

board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt line 9

Quoted 10 lines
board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt new file +9 -0
@@ -0,0 +1,42 @@
+# 2.4 GHz, 20 MHz BW mode
+manfid=0x2d0
+prodid=0x0726
+vendid=0x14e4
+devid=0x43e2
+boardtype=0x0726
+boardrev=0x1202
+boardnum=22
+macaddr=00:90:4c:c5:12:38

Does this mean that all warp7 boards will use the same macaddr? This hardcoded address seems to be the same as what is used by the rpi people:

https://github.com/RPi-Distro/firmware-nonfree/blob/master/brcm80211/brcm/brcmfmac43430-sdio.txt

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 configs/warp7: Add Wifi support

Quoted 2 lines · Peter Korsgaard

We recently had a discussion about this .txt file in the context of rpi3. How specific to warp7 is this file? Is there some documentation

I just used the txt file provided in the NXP BSP.

Quoted 1 line

somewhere explaining what all these settings do?

Unfortunately I don't see any explanation about it.

Quoted 4 lines
Quoted 4 lines
board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt new file +3 -0
@@ -0,0 +1,42 @@
+# 2.4 GHz, 20 MHz BW mode
+manfid=0x2d0
+prodid=0x0726
Quoted 8 lines

board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt line 9

Quoted 6 lines
board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt new file +6 -0
+vendid=0x14e4
+devid=0x43e2
+boardtype=0x0726
+boardrev=0x1202
+boardnum=22
+macaddr=00:90:4c:c5:12:38

Does this mean that all warp7 boards will use the same macaddr? This

No, the real MAC address I see is different from the one in the .txt file:

wlan0 Link encap:Ethernet HWaddr 00:AE:FA:8D:95:E5
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

#3 lore raw

PATCH 1/1 configs/warp7: Add Wifi support

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabio" == Fabio Estevam <[email protected]> writes:

Quoted 2 lines · Peter Korsgaard

We recently had a discussion about this .txt file in the context of rpi3. How specific to warp7 is this file? Is there some documentation

I just used the txt file provided in the NXP BSP.

OK.

Quoted 3 lines
Quoted 1 line

somewhere explaining what all these settings do?

Unfortunately I don't see any explanation about it.

:/

Quoted 13 lines
Quoted 4 lines
Quoted 4 lines
board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt new file +3 -0
@@ -0,0 +1,42 @@
+# 2.4 GHz, 20 MHz BW mode
+manfid=0x2d0
+prodid=0x0726
Quoted 8 lines

board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt line 9

Quoted 6 lines
board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt new file +6 -0
+vendid=0x14e4
+devid=0x43e2
+boardtype=0x0726
+boardrev=0x1202
+boardnum=22
+macaddr=00:90:4c:c5:12:38

Does this mean that all warp7 boards will use the same macaddr? This

Quoted 1 line

No, the real MAC address I see is different from the one in the .txt file:

Ahh, good. I wonder why it is then listed (twice even) in the .txt file.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard 
#4 lore raw

PATCH 1/1 configs/warp7: Add Wifi support

In reply to Peter Korsgaard
Quoted 5 lines · Peter Korsgaard
Quoted 1 line

+++

b/board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt We recently had a discussion about this .txt file in the context of rpi3. How specific to warp7 is this file? Is there some documentation somewhere explaining what all these settings do?

Noticed the file used by some of the Allwinner boards contains:

https://build.opensuse.org/package/view_file/hardware/bcm43xx-firmware/brcmfmac43362-sdio-cubietruck.txt

==
# Board Revision is P307, same nvram file can be used for P304, P305, P306 and P307 as the tssi pa params used are same
#Please force the automatic RX PER data to the respective board directory if not using P307 board, for e.g. for P305 boards force the data into the following directory /projects/BCM43362/a1_labdata/boardtests/results/sdg_rev0305 ==

So apparently some values involve low-level hardware tuning, and it's possible you need a different file if the PCB layout of the board you are using is changed at some point.

This makes it kinda difficult to have a common rootfs for more than one board.
Would be nice if they moved those values to device tree.

Yours sincerely,

Floris Bos