<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Linux on SamsiFPV</title>
    <link>https://samsifpv.ch/tags/linux/</link>
    <description>Recent content in Linux on SamsiFPV</description>
    <image>
      <title>SamsiFPV</title>
      <url>https://samsifpv.ch/images/papermod-cover.png</url>
      <link>https://samsifpv.ch/images/papermod-cover.png</link>
    </image>
    <generator>Hugo</generator>
    <language>en-gb</language>
    <copyright>Marlon Tanner</copyright>
    <lastBuildDate>Thu, 19 Dec 2024 21:13:45 +0200</lastBuildDate>
    <atom:link href="https://samsifpv.ch/tags/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Building a Linux Distro with Yocto for the Variscite MX7</title>
      <link>https://samsifpv.ch/wiki/building-yocto/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/building-yocto/</guid>
      <description>&lt;p&gt;This guide is based heavily on the &lt;a href=&#34;http://variwiki.com/index.php?title=Yocto_Build_Release&amp;amp;release=RELEASE_THUD_V1.0_VAR-SOM-MX7&#34;&gt;official guide&lt;/a&gt; from &lt;a href=&#34;https://www.variscite.com&#34;&gt;Variscite&lt;/a&gt;, with some additional info i found useful while learning this.&lt;/p&gt;
&lt;h2 id=&#34;1-dependencies&#34;&gt;1 Dependencies&lt;/h2&gt;
&lt;h3 id=&#34;11-ubuntu-1604-lts--1804-lts&#34;&gt;1.1 Ubuntu 16.04 LTS &amp;amp; 18.04 LTS&lt;/h3&gt;
&lt;p&gt;This tutorial was made with a machine running Ubuntu 18.04 LTS 64-bit, which worked almost flawless, though Variscite&amp;rsquo;s original tutorial is based on Ubuntu 16.04 64-bit.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping libsdl1.2-dev xterm

sudo apt-get install autoconf libtool libglib2.0-dev libarchive-dev python-git \
sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 \
help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev \
mercurial automake groff curl lzop asciidoc u-boot-tools dos2unix mtd-utils pv \
libncurses5 libncurses5-dev libncursesw5-dev libelf-dev zlib1g-dev
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;12-ubuntu-2004-lts&#34;&gt;1.2 Ubuntu 20.04 LTS&lt;/h3&gt;
&lt;p&gt;Compiling Yocto thud does not work on Ubuntu 20.04 LTS 64-bit. The GNU C library, or short glibc, is version 2.30 in Ubuntu 20.04, which is incompatible to glibc 2.29, which the bitbake command expects. &lt;a href=&#34;https://patchwork.openembedded.org/patch/165581/&#34;&gt;This patch&lt;/a&gt; from OCtober 2019 in the OpenEmbedded Core Layer fixes this, but it hasn&amp;rsquo;t been implemented into the Variscite BSP for Yocto thud. The last update for the thud-fslc-4.14.78-mx7-v1.0 tag was in May 2019, so it probably won&amp;rsquo;t be updated anymore. Downgrading the glibc is not recommended, so you should compile it in a virtual machine or with docker.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Detect compression type of a file</title>
      <link>https://samsifpv.ch/wiki/detect_compression_type/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/detect_compression_type/</guid>
      <description>&lt;p&gt;Use the file command first to get info about the possible compression.
A tar archive has the filenames included in it at the top.
You can determine that it is likely to be one of those formats by looking at the first few bytes. You should then test to see if it really is one of those, using an integrity check from the associated utility for that format, or by actually proceeding to decompress.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Give password-less sudo to a user</title>
      <link>https://samsifpv.ch/wiki/passwordless-sudo/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/passwordless-sudo/</guid>
      <description>&lt;p&gt;Edit the sudoers file&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo visudo
# or
vim /etc/sudoers
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the entry &lt;code&gt;#includedir /etc/sudoers.d&lt;/code&gt; add this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;username&amp;gt;	ALL=(ALL) NOPASSWD: ALL
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Save and exit, and you&amp;rsquo;re good to go!&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to add a Speaker via i2s and enable it in Yocto</title>
      <link>https://samsifpv.ch/wiki/how-to-add-a-driver-to-yocto/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/how-to-add-a-driver-to-yocto/</guid>
      <description>&lt;p&gt;Base for this project is the Variscite VAR-SOM-MX7 together with its development board.&lt;/p&gt;
&lt;p&gt;Goal of this project is to get a speaker running over i2s on an embedded Linux system, and get a deeper understanding of the linux environment in general.&lt;/p&gt;
&lt;h2 id=&#34;first-steps&#34;&gt;First steps&lt;/h2&gt;
&lt;p&gt;This guide assumes you already successfully compiled Yocto and have basic knowledge of navigating through an linux environment.&lt;/p&gt;
&lt;p&gt;There are 2 things needed for this whole thing to work. First, Linux needs the driver for the Speaker/Microphone installed and loaded, so it can communicate with it. Second it needs to know where the Hardware is mapped to.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to run Windows 11 in GNOME Boxes (with UEFI and TPM2 emulation)</title>
      <link>https://samsifpv.ch/wiki/w11-vm-on-linux/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/w11-vm-on-linux/</guid>
      <description>&lt;p&gt;Windows 11 significantly raised its hardware requirements compared to Windows 10. Among the changes, it requires more RAM and storage space. It also requires a Trusted Platform Module (TPM) version 2.0 and a UEFI boot environment.&lt;/p&gt;
&lt;p&gt;GNOME Boxes doesn’t yet support TPM and UEFI environments. However, the underlying virtualization technology supports it. You just need to tweak a few configuration options along the way. Read the instructions carefully!&lt;/p&gt;
&lt;h2 id=&#34;install-gnome-boxes-and-its-prerequisites&#34;&gt;Install GNOME Boxes and its prerequisites&lt;/h2&gt;
&lt;p&gt;Start by installing GNOME Boxes from your Linux distribution’s package repository.
You cannot use the Flatpak/Flathub version as it doesn’t currently support emulating a TPM.
The package is called gnome-boxes everywhere. You need version 40 or newer!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Linux on an old Macbook</title>
      <link>https://samsifpv.ch/wiki/install-linux-on-macbook/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/install-linux-on-macbook/</guid>
      <description>&lt;p&gt;The Macbook I used: &lt;a href=&#34;https://everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-2-duo-2.4-aluminum-13-mid-2010-unibody-specs.html&#34;&gt;Macbook 13 Mid 2010&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nvidia driver solution:&lt;br&gt;
&lt;a href=&#34;https://askubuntu.com/questions/264247/proprietary-nvidia-drivers-with-efi-on-mac-to-prevent-overheating/613573#613573&#34;&gt;https://askubuntu.com/questions/264247/proprietary-nvidia-drivers-with-efi-on-mac-to-prevent-overheating/613573#613573&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Monitor brightness:&lt;br&gt;
&lt;a href=&#34;https://askubuntu.com/questions/76081/brightness-not-working-after-installing-nvidia-driver&#34;&gt;https://askubuntu.com/questions/76081/brightness-not-working-after-installing-nvidia-driver&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nvidia driver:&lt;br&gt;
&lt;a href=&#34;https://medium.com/@nolanmudge/installing-an-nvidia-graphics-driver-with-a-ubuntu-14-04-and-up-efi-boot-52725dd6927c&#34;&gt;https://medium.com/@nolanmudge/installing-an-nvidia-graphics-driver-with-a-ubuntu-14-04-and-up-efi-boot-52725dd6927c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wifi: &lt;code&gt;firmware-b43-installer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Fan: &lt;code&gt;maxfanctld&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Power management: &lt;code&gt;powertop, tlp&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Wifi scanning: just set home network in &lt;code&gt;/etc/wpa_supplicant/wpa_supplicant.conf&lt;/code&gt; like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Network={\nssid=\&amp;#34;ssid\&amp;#34;\npsk=\&amp;#34;pw\&amp;#34;\n}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Backlightbrightness: &lt;code&gt;xbacklight&lt;/code&gt;, and custom shortcuts like that:&lt;/p&gt;
&lt;p&gt;custom shortcuts:&lt;br&gt;
&lt;a href=&#34;https://askubuntu.com/questions/69114/how-do-i-logout-using-only-the-keyboard/69161#69161&#34;&gt;https://askubuntu.com/questions/69114/how-do-i-logout-using-only-the-keyboard/69161#69161&lt;/a&gt;\nxbacklight: &lt;a href=&#34;https://askubuntu.com/questions/354488/how-to-execute-command-with-keys&#34;&gt;https://askubuntu.com/questions/354488/how-to-execute-command-with-keys&lt;/a&gt;\n&amp;quot;,&lt;/p&gt;</description>
    </item>
    <item>
      <title>PDF-Tools</title>
      <link>https://samsifpv.ch/wiki/pdf-tools/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/pdf-tools/</guid>
      <description>&lt;h2 id=&#34;pdf-arranger&#34;&gt;PDF arranger&lt;/h2&gt;
&lt;p&gt;Can make booklets. Arrange, delete, add pages to pdfs.&lt;/p&gt;
&lt;h2 id=&#34;pdfbook&#34;&gt;pdfbook&lt;/h2&gt;
&lt;p&gt;Use pdfbook2 from texlive-extra-utils to create a booklet.&lt;/p&gt;
&lt;h2 id=&#34;pdfjam&#34;&gt;pdfjam&lt;/h2&gt;
&lt;p&gt;If some pdf program complains about different sized pages, use pdfjam to make them all the same size&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pdfjam --outfile out.pdf --paper a5paper in.pdf
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;jpdf-tweak&#34;&gt;Jpdf Tweak&lt;/h2&gt;
&lt;p&gt;Swiss army knife for pdfs. Watermarks, page numbering, bookmarks, attachments,
document info, encryption, etc.&lt;/p&gt;
&lt;h2 id=&#34;ocrmypdf&#34;&gt;OCRmyPDF&lt;/h2&gt;
&lt;p&gt;OCR on images and pdfs.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ocrmypdf no_ocr.pdf ocr.pdf --sidecar ocr.txt -l deu+eng --force-ocr
&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;
&lt;p&gt;If &amp;ndash;force-ocr is issued, then all pages will be rasterized to images,
discarding any hidden OCR text, rasterizing any printable text, and
flattening form fields or interactive objects into their visual
representation. This is useful for redoing OCR, for fixing OCR text with a
damaged character map (text is selectable but not searchable), and destroying
redacted information.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Shrinking .img files on Linux</title>
      <link>https://samsifpv.ch/wiki/shrink-image/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/shrink-image/</guid>
      <description>&lt;p&gt;Context of the problem:&lt;/p&gt;
&lt;p&gt;Having a myimage.img bigger then the hardware support (if it is smaller there should be no problem; however, using the same strategy, you can better fit the image in the hardware support).&lt;/p&gt;
&lt;p&gt;The secret is to use standard Linux tools and instruments: GParted, fdisk and truncate.&lt;/p&gt;
&lt;h2 id=&#34;requirements&#34;&gt;Requirements:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A Linux PC&lt;/li&gt;
&lt;li&gt;The .img you want to shrink (myimage.img in this example)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;creating-loopback-device&#34;&gt;Creating loopback device:&lt;/h2&gt;
&lt;p&gt;GParted is an application typically used to manage partition tables and filesystems. In order to shrink the image, GParted is going to be used along the first part of the answer.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Systemd targets</title>
      <link>https://samsifpv.ch/wiki/systemd-targets/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/systemd-targets/</guid>
      <description>&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Target&lt;/th&gt;
          &lt;th&gt;Description&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;halt&lt;/td&gt;
          &lt;td&gt;Shut down all services and halt the system&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;poweroff&lt;/td&gt;
          &lt;td&gt;Shut down all services and power off the system&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;shutdown&lt;/td&gt;
          &lt;td&gt;Shut down the system normally&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;rescue&lt;/td&gt;
          &lt;td&gt;Single-user (root) mode for maintenance and recovery functions. It mounts all file-system but does not start any networking related service or function.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;multi-user&lt;/td&gt;
          &lt;td&gt;Multi-user command line mode for regular tasks. It starts all essential and custom services and provides the CLI prompt for login and work.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;graphical&lt;/td&gt;
          &lt;td&gt;Same as the multi-user.target but also includes GUI. A user can use the graphical desktop environment to login and work or can use regular command line interface.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;reboot&lt;/td&gt;
          &lt;td&gt;Reboot the system normally.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;default&lt;/td&gt;
          &lt;td&gt;Default target to boot the system. Usually set either to multi-user.target or graphical.target.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;emergency&lt;/td&gt;
          &lt;td&gt;Start an emergency shell and mount only root file-system. Other file-system and networking remain disabled.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;hibernate&lt;/td&gt;
          &lt;td&gt;Save the running state of the system to the hard disk and power off the system. When the system is power on again, the systemd restores the saved state.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;suspend&lt;/td&gt;
          &lt;td&gt;Same as the hibernate except the system state is saved in the memory and power to the memory is not turned off.&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;</description>
    </item>
    <item>
      <title>Useful Linux commands and applications</title>
      <link>https://samsifpv.ch/wiki/linux-commands/</link>
      <pubDate>Thu, 19 Dec 2024 21:13:45 +0200</pubDate>
      <guid>https://samsifpv.ch/wiki/linux-commands/</guid>
      <description>&lt;h2 id=&#34;commands-may-not-be-preinstalled-on-your-distro&#34;&gt;Commands (May not be preinstalled on your distro)&lt;/h2&gt;
&lt;p&gt;gdu - disk usage in go with multiprocessor (alternative: ncdu)&lt;br&gt;
fd - better find&lt;br&gt;
wavemon - analyse wifi&lt;br&gt;
pv and progress - watch progress of a command&lt;br&gt;
hardinfo - hardwareinfo&lt;br&gt;
sshfs - mount remote servers&lt;/p&gt;
&lt;h2 id=&#34;crop-multiple-fotos&#34;&gt;Crop multiple fotos&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;for i in *.png; do convert -crop aaaxbbb+ccc+ddd &amp;#34;$i&amp;#34; out/&amp;#34;$i&amp;#34;; done
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;aaa is the x offset from the left&lt;/li&gt;
&lt;li&gt;bbb is the y offset from the right&lt;/li&gt;
&lt;li&gt;ccc is the horizontal size of the output image&lt;/li&gt;
&lt;li&gt;ddd is the vertical size of the output image&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All in pixels, you can get them by selecting just one image in gimp and looking at the bottom bar for the values ;)&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
