Aka rpi2 is an inexpensive and popular device platform for the armv7h ARM architecture.Archlinux ARM on Rpi2
Have you had an Archlinux ARM question, typed it into Google and didn't find an answer?
Perhaps you found the answer later. Either way, do let me know at hendry AT iki.fi and I'll add it to the site source.
Not specifically for Arm on Archlinux, though https://wiki.archlinux.org/index.php/Raspberry_Pi is a good start since much of the excellent Archlinux wiki applies to the rpi.
root and password
Note that you really should disable ssh logins with that default:
grep ^PasswordAuthentication /etc/ssh/sshd_config PasswordAuthentication no
pacman -Ss $packagename
Refer to pacman reference for more examples.
Setup your terminal to upload your console to share the output.
curl http://archpi.dabase.com/tmux.conf > ~/.tmux.conf
tmux. If it's not installed, installed it
pacman -S tmux.
Now using tmux's default prefix of
ctrl+b and the letter
p, will upload your console to be shared.
To learn more about what tmux can do, have a look at its default key binds with
See http://pi.dabase.com/ for such a service.
No there isn't, however there is an annoying phpBB forum though.
wifi-menu/netctl is the old way and I would encourage you not to use it, though I am biased.
Sadly you need to
pacman -Syu wpa_supplicant since it's not on the default
install image. I do this by temporarily wiring my rpi via the ethernet port.
systemctl start wpa_supplicant@wlan0 will fail without a config as you can see from
systemctl status wpa_supplicant@wlan0 output.
# cat <<EOF > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf ctrl_interface=/run/wpa_supplicant update_config=1 EOF
systemctl start wpa_supplicant@wlan0 will now work.
wpa_cli to add a network. The user interface is unfortunately pretty awful.
Note you need to quote the essid and psk else it might fail:
add_network set_network 0 ssid "MYSSID" set_network 0 psk "passphrase" enable_network 0 save_config
/etc/wpa_supplicant/wpa_supplicant-wlan0.conf is looking correct.
See https://wiki.archlinux.org/index.php/WPA_supplicant for details. Once
systemctl enable wpa_supplicant@wlan0 to make sure it associates with
wireless on boot.
Finally you need to setup
systemd-networkd for DHCP functionality like so:
$cat /etc/systemd/network/any.network [Match] Name=* [Network] DHCP=both
And of course, enable it.
systemctl enable systemd-networkd
Reboot to see if you device comes up online correctly!
pacman -Sy wiringpi and
watch -n 0.5 gpio readall
Here is the systemd file that controls it:
[root@rpi2 ~]# cat /etc/systemd/system/motionlight.service [Unit] Description=Turns light on thanks to motion After=network.target [Service] # Step 1: We invoke a shell to setup the GPIO and if motion is not detected, turn it off ExecStartPre=/usr/bin/bash -c '/usr/bin/gpio mode 0 out && test $(/usr/bin/gpio read 7) -eq 0 && /usr/bin/gpio write 0 1' # Step 2: If motion is detected, turn on the light ExecStart=/usr/bin/bash -c '/usr/bin/gpio wfi 7 rising && /usr/bin/gpio write 0 0' # Go to Step 1 after 5 minutes RestartSec=300 Restart=always [Install] WantedBy=multi-user.target
Rpi userland is packaged as raspberrypi-firmware-tools.
# pacman -Ql raspberrypi-firmware-tools | grep bin/raspi raspberrypi-firmware-tools /opt/vc/bin/raspistill raspberrypi-firmware-tools /opt/vc/bin/raspivid raspberrypi-firmware-tools /opt/vc/bin/raspiyuv
If you get:
# /opt/vc/bin/raspistill -o image.jpg mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM) mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1) mmal: Failed to create camera component mmal: main: Failed to create camera component mmal: Camera is not enabled in this build. Try running "sudo raspi-config" and ensure that "camera" has been enabled
You need to append to
Sending from the PI:
/opt/vc/bin/raspivid -rot 180 -t 0 -fps 30 -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=$pi_ip_address port=5000
On the machine you want to view the camera from:
gst-launch-1.0 -v tcpclientsrc host=$pi_ip_address port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false
cwebp like so:
pacman -S libwebp # cat capture.sh tmp=$(mktemp /tmp/XXX.jpg) webp=$(basename $tmp .jpg).webp raspistill -vf -o $tmp cwebp $tmp -o /dev/stdout rm -f $tmp
setterm -blank 0 >> /etc/issue