-
1Step 1
Make sure your an SD Card breakout board which breaks out all 6 SDIO signals.
Then wire the signals to the corresponding pins on your hat's gpio header, keeping the wire length as short as possible.
SDIO Signal GPIO Pin # SD_CLK 15 SD_CMD 16 SD_DATA0 18 SD_DATA1 22 SD_DATA2 37 SD_DATA3 13 3v3 1 or 17 GND 6, 9, 14, 20, 25, 30, 34, or 39 I also placed a 10uF 16V Cap across the GND and 3v3 rails close to the card itself.
The card already includes 75 Ohm resistors on the data lines.
-
2Step 2
First make sure you have at least 1GB of free space on your MicroSD card (you may need to use raspi-config).
Then prepare the Pi for kernel module compilation:
# Update your RaPi sudo apt-get update && sudo apt-get -y upgrade # Install the Prerequisites for Module Compilation & Menuconfig sudo apt-get -y install bc rpi-update git libncurses5-dev
-
3Step 3
Modify the boot config, update firmware and kernel, and reboot:
# Modify /boot/config.txt so the sdio dtoverlay is loaded on boot. sudo sed -i -e "/^dtoverlay.*sdio/d" /boot/config.txt sudo sh -c 'printf "dtoverlay=sdio,poll_once=off" >> /boot/config.txt' # Install the latest firmware and kernel sudo rpi-update # reboot sudo reboot
-
4Step 4
Install rpi-source and run it to download the kernel sources:
cd ~ sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-update rpi-source --skip-gcc
-
5Step 5
Until the mainline kernel driver works properly or Atmel's own driver actually compiles we need to pull the driver from upstream:
# avoid having to dl all of linux-next wget -r -l1 -e robots=off -nH --no-parent --cut-dirs=9 --reject="index.html" http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/plain/drivers/staging/wilc1000
-
6Step 6
Now a quick change to one of the files. The driver will fail to compile:
nano +567 wilc1000/wilc_wfi_cfgoperations.c
You should see something like this:
cfg80211_disconnected(dev, pstrDisconnectNotifInfo->u16reason, pstrDisconnectNotifInfo->ie, pstrDisconnectNotifInfo->ie_len, false, GFP_KERNEL);
Replace it with:cfg80211_disconnected(dev, pstrDisconnectNotifInfo->u16reason, pstrDisconnectNotifInfo->ie, pstrDisconnectNotifInfo->ie_len, GFP_KERNEL)
-
7Step 7
Add the driver source code to the kernel:
mv wilc1000 linux/drivers/staging && cd linux # edit the staging Kconfig sed -i -e "/^endif \# STAGING/d" drivers/staging/Kconfig printf 'source "drivers/staging/wilc1000/Kconfig"\n\nendif # STAGING' >> drivers/staging/Kconfig # edit the staging Makefile printf 'obj-$(CONFIG_WILC1000) += wilc1000/' >> drivers/staging/Makefile
-
8Step 8
Update the kernel configuration:
make menuconfig
Navigate to
Device Drivers ▸ Staging Drivers
Set Atmel WILC1000 SDIO (WiFi only) to M
-
9Step 9
Now for compilation:
# Run make prepare for good measure make prepare # Build the modules make SUBDIRS=drivers/staging/wilc1000 modules # If all goes well, install the modules sudo make SUBDIRS=drivers/staging/wilc1000 modules_install sudo depmod
-
10Step 10
Reboot and power cycle the card by removing it then reinserting it
sudo reboot
If you've made it this far, congrats! You should now be able to see 2 new devices when you run ifconfig: wlan0 and p2p0
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Hi,
I'm trying to follow your instruction, but at the step 4, I have a problem. The instruction "
rpi-source --skip-gcc" doesn't work : Makefile:595: include/config/auto.conf: No such file or directory
If you look at the file, there is no config folder. Where did it go ? Shouldn't it be here since I just unpack the files downloaded just before ?
Are you sure? yes | no