Last active
September 1, 2021 00:00
-
-
Save charlieporth1/af6a356f28b9fb0ac1224491490c8558 to your computer and use it in GitHub Desktop.
Raspberry Pi Zero SD CARD Ethernet USB gadget Setup bash script
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 | |
# Change this to your needs. I happen to be on a Macbook Pro | |
DRIVE_DIR=/Volumes | |
BOOT_DIR=boot | |
SD_CARD_DIR=$DRIVE_DIR/$BOOT_DIR | |
touch $SD_CARD_DIR/ssh | |
echo "dtoverlay=dwc2" | tee -a $SD_CARD_DIR/config.txt | |
sed "s/rootwait/rootwait modules-load=dwc2,g_ether/g" $SD_CARD_DIR/cmdline.txt > $SD_CARD_DIR/cmdline.txt.tmp | |
mv $SD_CARD_DIR/cmdline.txt.tmp $SD_CARD_DIR/cmdline.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment