Last active
June 3, 2016 11:03
-
-
Save mohankumargupta/b02b007b8c205673569a4ccae51a1f4f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Don't forget to resize disk first. Use raspi-config from command line, expand filesystem and reboot before running this script | |
# INSTRUCTIONS: | |
# wget --no-check-certificate https://gist.github.com/mohankumargupta/b02b007b8c205673569a4ccae51a1f4f/raw/ffbcec3f49904629acff3173d8722b404c05bc2a/ethernetgadgetpizero.sh | |
# chmod 777 ethernetgadgetpizero.sh | |
# ./ethernetgadgetpizero.sh | |
set -x | |
cd ~ | |
wget -O gadgetkernel.tgz http://adafruit-download.s3.amazonaws.com/gadgetmodulekernel_151226a.tgz | |
tar xvzf gadgetkernel.tgz | |
sudo mv /boot/kernel.img /boot/kernelbackup.img | |
sudo mv tmp/boot/kernel.img /boot | |
sudo mv tmp/boot/overlays/* /boot/overlays | |
sudo mv tmp/boot/*dtb /boot | |
sudo cp -R tmp/boot/modules/lib/* / | |
sudo echo g_ether >> /etc/modules | |
rm -rf tmp | |
sudo cat <<EOF >/etc/resolv.conf | |
nameserver 8.8.8.8 | |
nameserver 8.8.4.4 | |
EOF | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment