-
Notifications
You must be signed in to change notification settings - Fork 365
Setting up a working developer sdcard
Eric Westphal edited this page Jul 9, 2017
·
4 revisions
Here are some tips for setting up a sdcard with a nicer working environment for developers:
If your main working environment is Linux or OS X, image the sdcard as follows:
- Download the latest -dev.img.zip file from https://github.com/cyoung/stratux/releases
- Unzip the file:
unzip XXX-dev.img.zip
. - Plug your sdcard into your computer.
-
lsblk
to see which device your sdcard mounted as; assume it's /dev/sdX. - Image the card with
sudo dd if=XXX-dev.img of=/dev/sdX bs=4M status=progress
- Mount the root partition of the sdcard with
sudo mount /dev/sdX2 /mnt
(use whatever mount point you like if /mnt is taken). - Add your ssh key:
cat ~/.ssh/id_rsa.pub >> /mnt/etc/ssh/authorized_keys/root
(assuming your public ssh key is ~/.ssh/id_rsa.pub). - If you like to have a wired ethernet connection:
vi /mnt/etc/network/interfaces
and insertallow-hotplug eth0
right underallow-hotplug-wlan0
. - Unmount the sdcard:
sudo umount /mnt
. Remove it from the computer, insert it in the Pi, and boot it up. - Now you should easily be able to ssh into the Pi over your wired lan.
- Sync up the Pi's time:
systemctl start ntp
(enable if always wired). - Expand the filesystem:
raspi-config
and choose the option to expand the filesystem. - Reboot; you can do a
df -h
to check that the filesystem is expanded. - For faster builds:
go get github.com/mattn/go-sqlite3
- Install WiringPi static libs:
-
cd && git clone https://github.com/WiringPi/WiringPi.git && cd WiringPi/wiringPi && make static && make install-static
(see https://github.com/WiringPi/WiringPi/INSTALL)
Now you can easily git pull, modify, build. To build: cd ~/stratux && make && make install
. If you only want to build the main stratux binary, gen_gdl90, just make xgen_gdl90 && make install
.
Happy coding!