Group: Hardware/FSDG distributions/Trisquel

From LibrePlanet
Jump to: navigation, search
(Installing: Add infos about what failed)
(Failed installation: Add Pandaboard)
Line 100: Line 100:
  
 
* Devices with an Allwiner SOCs: missing devicetree.
 
* Devices with an Allwiner SOCs: missing devicetree.
* Devices with OMAP SOC: the package instructions / README use dd but u-boot.img is probably expected on a fat partition.
+
* Devices with OMAP3 SOC: the package instructions / README use dd but u-boot.img is probably expected on a fat partition. And u-boot determine that due to some bug. See Parabola patches for more details.
 +
** On a Pandaboard, it booted the kernel, dtb and initramfs fine, but then the kernel hangs (there are too much backtraces to see where the issue comes from).
  
 
== References ==
 
== References ==
 
<references/>
 
<references/>

Revision as of 13:51, 17 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

How to install Trisquel 10 (etiona) on 32bit 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 /boot/vmlinuz
        append loglevel=8 root=/dev/mmcblk0p1 rw
        fdtdir /boot/dtb/
        initrd /boot/initrd.img

Set the first partition to be bootable (needed to be able to boot):

# sfdisk /dev/loop0 -A 1

Then you need to install a kernel:

# for d in proc dev dev/pts sys ; do mount -o bind /$d rootfs/$d ; done
# LANG=C.UTF-8 chroot rootfs qemu-arm-static /bin/bash
# source /etc/environment
# apt remove flash-kernel
# 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 /boot/dtb, so for instance from /lib/firmware/5.4.0-96-generic/device-tree/ to /boot/dtb. I've an incomplete script here:

#!/bin/sh
set -e

version="$1"

ln -sf /lib/firmware/${version}/device-tree/ /boot/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 /boot/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/ /boot/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/ /boot/dtb

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

# LANG=C.UTF-8 chroot rootfs qemu-arm-static /bin/bash
# source /etc/environment
# apt update
# apt install u-boot-sunxi
# cat /usr/share/doc/u-boot-sunxi/README.Debian
# dd conv=fsync,notrunc if=/usr/lib/u-boot/A20-OLinuXino-Lime/u of=/dev/loop0 bs=1024 seek=8

You can then unmount and copy to a microSD:

# umount rootfs/dev/pts rootfs/dev rootfs/proc rootfs/sys rootfs/
# ddrescue /dev/loop0 /dev/sdZ # copy to a microSD

Failed installation

  • Devices with an Allwiner SOCs: missing devicetree.
  • Devices with OMAP3 SOC: the package instructions / README use dd but u-boot.img is probably expected on a fat partition. And u-boot determine that due to some bug. See Parabola patches for more details.
    • On a Pandaboard, it booted the kernel, dtb and initramfs fine, but then the kernel hangs (there are too much backtraces to see where the issue comes from).

References