Building a Linux Distro with Yocto for the Variscite MX7

This guide is based heavily on the official guide from Variscite, with some additional info i found useful while learning this. 1 Dependencies 1.1 Ubuntu 16.04 LTS & 18.04 LTS This tutorial was made with a machine running Ubuntu 18.04 LTS 64-bit, which worked almost flawless, though Variscite’s original tutorial is based on Ubuntu 16.04 64-bit. 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 1.2 Ubuntu 20.04 LTS 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. This patch from OCtober 2019 in the OpenEmbedded Core Layer fixes this, but it hasn’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’t be updated anymore. Downgrading the glibc is not recommended, so you should compile it in a virtual machine or with docker. ...

19 December 2024 · 9 min

Detect compression type of a file

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. ...

19 December 2024 · 1 min

Give password-less sudo to a user

Edit the sudoers file sudo visudo # or vim /etc/sudoers After the entry #includedir /etc/sudoers.d add this: <username> ALL=(ALL) NOPASSWD: ALL Save and exit, and you’re good to go!

19 December 2024 · 1 min

How to add a Speaker via i2s and enable it in Yocto

Base for this project is the Variscite VAR-SOM-MX7 together with its development board. 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. First steps This guide assumes you already successfully compiled Yocto and have basic knowledge of navigating through an linux environment. 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. ...

19 December 2024 · 5 min

How to run Windows 11 in GNOME Boxes (with UEFI and TPM2 emulation)

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. 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! Install GNOME Boxes and its prerequisites 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! ...

19 December 2024 · 6 min

Install Linux on an old Macbook

The Macbook I used: Macbook 13 Mid 2010 Nvidia driver solution: https://askubuntu.com/questions/264247/proprietary-nvidia-drivers-with-efi-on-mac-to-prevent-overheating/613573#613573 Monitor brightness: https://askubuntu.com/questions/76081/brightness-not-working-after-installing-nvidia-driver Nvidia driver: https://medium.com/@nolanmudge/installing-an-nvidia-graphics-driver-with-a-ubuntu-14-04-and-up-efi-boot-52725dd6927c Wifi: firmware-b43-installer Fan: maxfanctld Power management: powertop, tlp Wifi scanning: just set home network in /etc/wpa_supplicant/wpa_supplicant.conf like this: Network={\nssid=\"ssid\"\npsk=\"pw\"\n} Backlightbrightness: xbacklight, and custom shortcuts like that: custom shortcuts: https://askubuntu.com/questions/69114/how-do-i-logout-using-only-the-keyboard/69161#69161\nxbacklight: https://askubuntu.com/questions/354488/how-to-execute-command-with-keys\n",

19 December 2024 · 1 min

PDF-Tools

PDF arranger Can make booklets. Arrange, delete, add pages to pdfs. pdfbook Use pdfbook2 from texlive-extra-utils to create a booklet. pdfjam If some pdf program complains about different sized pages, use pdfjam to make them all the same size pdfjam --outfile out.pdf --paper a5paper in.pdf Jpdf Tweak Swiss army knife for pdfs. Watermarks, page numbering, bookmarks, attachments, document info, encryption, etc. OCRmyPDF OCR on images and pdfs. ocrmypdf no_ocr.pdf ocr.pdf --sidecar ocr.txt -l deu+eng --force-ocr If –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. ...

19 December 2024 · 2 min

Shrinking .img files on Linux

Context of the problem: 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). The secret is to use standard Linux tools and instruments: GParted, fdisk and truncate. Requirements: A Linux PC The .img you want to shrink (myimage.img in this example) Creating loopback device: 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. ...

19 December 2024 · 4 min