Group: Hardware/FSDG distributions/Trisquel

From LibrePlanet
Jump to: navigation, search
(Installing: Add preliminary HOWTO to do a complete install)
Line 20: Line 20:
  
 
== Installing ==
 
== Installing ==
 +
{{stub}}
 +
 +
Note that these instructions have not been fully tested yet and currently the kernel installation fails.
  
 
=== How to install Trisquel 10 (etiona) on ARM SBCs ===
 
=== How to install Trisquel 10 (etiona) on ARM SBCs ===

Revision as of 23:40, 16 March 2023

Trisquel versions

Version Can be debootstrapped Based on Kernel version Comments
Trisquel 10 (nabia) Yes Ubuntu 20.04 LTS (Focal Fossa)
  • 5.4
  • 5.13 (though linux-image-generic-hwe-20.04)

Installing

Note that these instructions have not been fully tested yet and currently the kernel installation fails.

How to install Trisquel 10 (etiona) on ARM SBCs

If you're doing that on Parabola, you need to enable etiona support:

# cd /usr/share/debootstrap/scripts/
# ln -s trisquel etiona

Then you can install Trisquel as usual:

# qemu-img create -f raw storage.img 2G
# fdisk storage.img # create 1 partition
# udisksctl loop-setup -f storage.img
# mkdir rootfs
# mkfs.ext4 -O ^metadata_csum -O ^64bit /dev/loop0p1
# mount /dev/loop0p1 rootfs
# mkdir -p rootfs/usr/bin
# debootstrap --foreign --arch armhf etiona rootfs
# cp /usr/bin/qemu-arm-static rootfs/usr/bin
# LANG=C.UTF-8 chroot rootfs qemu-arm-static /bin/bash
# export TERM=xterm-color
# /debootstrap/debootstrap --second-stage

You then need to create the extlinux.conf file in /boot/extlinux/extlinux.conf with the following content:

menu title Welcome to U-Boot with Extlinux support!

timeout 10

label Trisquel GNU/Linux-libre, linux-libre kernel
        kernel /vmlinuz
        append loglevel=8 root=/dev/mmcblk0p1 rw
        fdtdir /dtb/
        initrd /initrd.img

Then you need to install a kernel:

# LANG=C.UTF-8 chroot rootfs qemu-arm-static /bin/bash
# source /etc/environment
# apt install linux-image-generic

You then need to write a script in /etc/kernel/postinst.d/zz-generate-dtb-link to generate a symlink from /lib/firmware/<<your-kernel-version>>/device-tree/ to /dtb, so for instance from /lib/firmware/5.4.0-96-generic/device-tree/ to /dtb. I've an incomplete script here:

#!/bin/sh
set -e

version="$1"

ln -sf /lib/firmware/${version}/device-tree/ /dtb

The caveat of this script is that it has not been tested with multiple kernel versions installed, so during apt upgrade, it may or may not make the /dtb link point to the wrong kernel. So that needs to be tested.

With only one kernel installed it should not be a problem.

In addition to that you will also need to make the symlink yourself the first time, before booting the image, like that:

# LANG=C.UTF-8 chroot rootfs qemu-arm-static /bin/bash
# source /etc/environment
# ln -sf /lib/firmware/<your-kernel-version>/device-tree/ /dtb

You will need to replace the <your-kenrel-version> with your kenrel version, for instance:

# LANG=C.UTF-8 chroot rootfs qemu-arm-static /bin/bash
# source /etc/environment
# ln -sf /lib/firmware/5.4.0-96-generic/device-tree/ /dtb

You will then need to install a bootloader, here's an example for the beagleboard:

# LANG=C.UTF-8 chroot rootfs qemu-arm-static /bin/bash
# source /etc/environment
# apt update
# apt install u-boot-omap
# cat /usr/share/doc/u-boot-omap/README.Debian
# dd conv=fsync,notrunc seek=256 if=/usr/lib/u-boot/omap3_beagle/MLO of=/dev/loop0
# dd conv=fsync,notrunc seek=768 if=/usr/lib/u-boot/omap3_beagle/u-boot.img of=/dev/loop0

References