<h3>Reasoning.</h3>
<p>I have a file server with Slackware running on a Pi4. I wanted to make the<br />movies and TV Shows easily accessible on the TV without using a DVD or Blu ray<br />player.</p>
<p>It would give my wife and I a chance to sit and watch a show without much<br />fuss. The latest show we are on is Sue Thomas F.B. Eye.<br />The main character, Sue has been deaf from about the age of 4 years.<br />She is adept at reading lips and learned to speak despite being deaf.</p>
<p><a title="Sue Thomas F.B. Eye" href="https://en.wikipedia.org/wiki/Sue_Thomas:_F.B.Eye">https://en.wikipedia.org/wiki/Sue_Thomas:_F.B.Eye</a></p>
<h3>Hardware.</h3>
<p>The Pi4 is enclosed in a stripped out power supply that died on me. The fan<br />still worked, so I wired it to the Pi on the 5v line. It runs at half the<br />speed it was designed for, but that makes it run almost silent. With the<br />heatsinks added, stays about 35C when idle and 50C when encoding video.</p>
<h3>Pi Networking.</h3>
<p>I have 2 Pi's connected via ethernet. One is on 192.168.2.5 with a gateway of<br />192.168.2.6, with the other on 192.168.2.6 with a gateway of 192.168.2.5.<br />Essentially just a crossover network. The reason for this is running Kodi on Pi4<br />has choppy video, but is better at running video encoding. So I linked it to a<br />Pi3 to run Kodi via a samba share from the Pi4.</p>
<p>Used OSMC for the kodi interface.<br />It was the distribution that was stable on my Pi and booted right to the Kodi<br />interface.</p>
<p><a title="OSMC - Open Source Media Center" href="https://osmc.tv/download/">https://osmc.tv/download/</a></p>
<p><code>lsblk</code> - List block devices<br /><code>dd status=progress if=osmc.img of=/devsdX</code></p>
<h3>Installing Slackware.</h3>
<p>Get sources<br /><a title="Get Slackware ARM" href="https://sarpi.fatdog.eu/index.php?p=getslack">https://sarpi.fatdog.eu/index.php?p=getslack</a></p>
<pre><code>root@mynixbox:/tmp# mkdir /slackarm
root@mynixbox:/tmp# mount /dev/sdc1 /slackarm
root@mynixbox:/tmp# cd /slackarm
root@mynixbox:/slackarm#</code></pre>
<p>To download Slackware ARM 14.2, type the following at the command prompt:</p>
<p><code>root@mynixbox:/slackarm# rsync -Prv --delete<br />ftp.slackware.uk::slackwarearm/slackwarearm-14.2 .</code></p>
<p>[FatDog says ...] DON'T forget the period "." at the end of the rsync command<br />or it won't work!</p>
<p>I made a directory called extras, under the /slackarm directory</p>
<p><a title="Sarpi sources for Slackware current" href="https://sarpi.fatdog.eu/index.php?p=rpi4getcurrent">https://sarpi.fatdog.eu/index.php?p=rpi4getcurrent</a></p>
<p><code>upgradepkg --install-new</code> (for each of these packages, after finishing the main Slackware installation.)</p>
<h5>System Packages</h5>
<p><code>kernel_sarpi4-5.4.40-armv7l-1_slackcurrent_13May20_sp1.txz <br />
kernel-modules-sarpi4-5.4.40-armv7l-1_slackcurrent_13May20_sp1.txz <br />
sarpi4-boot-firmware-armv7l-1_slackcurrent_13May20_sp1.txz
sarpi4-hacks-4.0-armv7l-1_slackcurrent_13May20_sp1.txz</code></p>
<h3>Partitioning example</h3>
<p>After mounting the sd card listed by the lsblk command, run <br />cfdisk /dev/mmcblk0 to partition the card.</p>
<pre><code>mmcblk0 179:0 0 59.5G 0 disk <br />|-mmcblk0p2 179:2 0 4G 0 part [SWAP]<br />|-mmcblk0p3 179:3 0 55.3G 0 part /<br />`-mmcblk0p1 179:1 0 150M 0 part <br />root@slack-server:mark # df -h / <br />Filesystem Size Used Avail Use% Mounted on /dev/root 55G 25G 28G 48% /

mkfs.vfat /dev/mmcblk0p1<br />mkswap /dev/mmcblk0p2</code></pre>
<h3>Samba snippet</h3>
<pre><code>[MediaServer.Movies]<br />path = /mnt/media2/Movies/<br />writable = no<br />browsable = yes<br />read only = no<br />guest ok = no<br />public = no</code></pre>
<h3>fstab snippet (Kodi)</h3>
<pre><code>//192.168.2.5/MediaServer.Movies /mnt/Movies cifs noauto,users,username=mark,password=*********** 0 0</code></pre>
<h3>Script to connect to the wifi network</h3>
<pre><code>mark@osmc:~$ cat /usr/bin/net.sh<br><br />#!/bin/bash<br />connmanctl enable wifi<br />connmanctl connect wifi_HASH_managed_psk</code></pre>
<h3>Systemd service file</h3>
<pre><code>mark@osmc:~$ cat /lib/systemd/system/net.service<br /><br>[Unit]<br />Description=Wifi network auto connect on boot<br />After=http-time.service
<br>[Service]<br />Type=simple<br />Restart=always<br />ExecStart=/bin/bash /usr/bin/net.sh <br />
[Install]<br />WantedBy=multi-user.target</code></pre>

<h3>Edit:</h3>
<p>Since I sent the show notes, I had problems using the GUI way to set up<br /> a static IP address on the OSMC section. Here is a more concise way to go about
it.</p>
<p><a href="https://discourse.osmc.tv/t/solved-setting-ip-static/1439/14">https://discourse.osmc.tv/t/solved-setting-ip-static/1439/14</a></p>
<p>It seems OSMC uses connman, so in order to create an ethernet static IP:</p>
<ol>
<li>
<p>Create a config file with your editor:</p>
<pre><code>sudo vim /var/lib/connman/osmc.config
</code></pre>
</li>
<li>
<p>Add the following contents:</p>
<pre><code>[global]
Name = OSMC
Description = OSMC static network configuration
[service_osmc]
Type = ethernet
IPv4 = 192.168.0.21/255.255.255.0/192.168.0.1
Nameservers = 8.8.8.8,8.8.4.4
</code></pre>
<p>Make sure to change the <code>IPv4</code> line to match your own network/netmask/gateway and <code>Nameservers</code> to use the ones you want.</p>
</li>
<li>
<p>Reboot your RPi or restart the connman service:</p>
<pre><code>sudo systemctl restart connman
</code></pre>
</li>
</ol>
<p>If you opt to restart connman, you&rsquo;ll loose the connection.</p>
