Couple of quick notes as a reminder. I’ll come back with some further notes of using a cross-compiler tool chain with Eclipse C/C++ when I have time:
Compile to object code:
as example.s -o example.o
Link to an executable:
ld -o example example.o
Articles, notes and random thoughts on Software Development and Technology
Couple of quick notes as a reminder. I’ll come back with some further notes of using a cross-compiler tool chain with Eclipse C/C++ when I have time:
Compile to object code:
as example.s -o example.o
Link to an executable:
ld -o example example.o
Just as the dd command can be used to create a disk image of an SD card on the Mac (see here), you can use dd to write a downloaded (or backup) disk image to an SD card too:
sudo dd of=/dev/rdiskx if=/path/to/image bs=1m
where x is the disk number as shown by diskutils list.
Given that SD cards have a limited lifetime for writes, using an SD card for a harddrive for Pi may not be the smartest idea in terms of reliability or longevity, so asking how you back up your SD card is a good question. There’s some good answers here.
Specifically on the Mac, find out the disk number of the attached sd card with :
diskutil list
then use the dd command:
dd if=/dev/rdiskx of=/path/to/image bs=1m
where x is the disk number listed from diskutil.
There’s probably many ways you could configure a similar setup to this, but here’s what worked for me.
This is for static IP on wired, and a different static IP on wireless, where the wireless is using WPA2. I also have two different routers one for wired and for one wireless. Replace static_ip_here with your required ip addresses, and x and y with the IP addresses for your routers.
Edit /etc/network/interfaces:
auto lo iface lo inet loopback iface eth0 inet static address 192.168.1.static_ip_here netmask 255.255.255.0 gateway 192.168.1.x allow-hotplug wlan0 iface wlan0 inet static address 192.168.0.static_ip_here netmask 255.255.255.0 gateway 192.168.0.y wpa-ssid "your_ssid" wpa-psk "your passphrase" wpa-pairwise CCMP wpa-group CCMP