Group: Hardware/FSDG distributions/PureOS
(→How to install PureOS on an arm64 SBC) |
(Remove outdated infos.) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | == u-boot == | + | == PureOS versions == |
+ | |||
+ | {| class="wikitable sortable" style="font-size: smaller" | ||
+ | |- bgcolor="#6699ff" | ||
+ | ! Version | ||
+ | ! Can be debootstrapped | ||
+ | ! Based on<ref>Nowadays PureOS follows Debian closely. From #purism the 17 January 2022:<br/> | ||
+ | 20:23 < GNUtoo> Hi, is that documentation still up to date: https://tracker.pureos.net/w/development/pureos_archive_layout/ ?<br/> | ||
+ | 20:26 < GNUtoo> Or is it more like amber is based on Debian 9 (stretch) and byzantium is based on Debian 10 (Buster) ?<br/> | ||
+ | 20:28 <@greenfly> byzantium is based off of Debian 11 (Bullseye)<br/> | ||
+ | 20:29 < GNUtoo> ok thanks. And amber is based on stretch?<br/> | ||
+ | 20:30 < GNUtoo> And if I stay on a given version (like "amber") then it will stays based on the same Debian version in the future?<br/> | ||
+ | 20:30 <@greenfly> I can't recall at the moment whether amber was based on stretch or buster<br/> | ||
+ | 20:31 <@greenfly> but yes, it will behave like Debian in that regard<br/> | ||
+ | 20:31 < GNUtoo> ok, thanks, I'll try to identify the base version of amber<br/> | ||
+ | 20:31 <@greenfly> ie, byzantium will always point to bullseye, when we put out a new PureOS release, it will have a new name and will target a new upstream Debian release<br/> | ||
+ | 20:34 < GNUtoo> Thanks, I'll update the info on the Libreplanet wiki on that. Though I can't fix | ||
+ | https://tracker.pureos.net/w/development/pureos_archive_layout/ (I've no access to it)<br/> | ||
+ | 20:35 < GNUtoo> amber seems to be based on buster as the systemd package version is the same than buster and the stretch one is older<br/></ref> | ||
+ | ! Kernel version | ||
+ | ! Comments | ||
+ | |- | ||
+ | | Green | ||
+ | | Not anymore as October 2019: | ||
+ | E: Couldn't find these debs: ca-certificates pureos-minimal | ||
+ | | ? | ||
+ | | ? | ||
+ | | | ||
+ | * Was on the live USB installer before but not anymore | ||
+ | |- | ||
+ | | Amber | ||
+ | | {{Yes}} | ||
+ | | Debian 10 (buster) | ||
+ | | 4.19 | ||
+ | | | ||
+ | * On the LiveUSB installer as October 2019 | ||
+ | * FSDG compliant | ||
+ | * In upstream debootstrap | ||
+ | |- | ||
+ | | Byzantium | ||
+ | | {{yes}} | ||
+ | | Debian 11 (bullseye) | ||
+ | | 5.2 | ||
+ | | | ||
+ | * FSDG compliant | ||
+ | * In upstream debootstrap | ||
+ | |- | ||
+ | | Landing | ||
+ | | ? | ||
+ | | ? | ||
+ | | | ||
+ | * Syncronized with Debian testing | ||
+ | * Probably not fit for use but only as staging for development<ref>https://tracker.pureos.net/w/development/pureos_archive_layout/</ref> | ||
+ | |} | ||
+ | |||
+ | == Installing == | ||
+ | * PureOS can be installed through the [https://pureos.net/download/ live USB installer] | ||
+ | * Parabola can debootstrap PureOS Amber for all the supported architectures | ||
+ | |||
+ | == PureOS on ARM SBCs == | ||
+ | === u-boot === | ||
U-boot has a standard for booting distributions. The easiest way to configure your distribution to boot with u-boot is to create an extlinux.conf configuration file as explaned below. U-boot will then look for it in /boot/extlinux/extlinux.conf (and probably /extlinux/extlinux.conf too) on each partition that it can access. | U-boot has a standard for booting distributions. The easiest way to configure your distribution to boot with u-boot is to create an extlinux.conf configuration file as explaned below. U-boot will then look for it in /boot/extlinux/extlinux.conf (and probably /extlinux/extlinux.conf too) on each partition that it can access. | ||
− | == How to install PureOS on an arm64 SBC == | + | === How to install PureOS on an arm64 SBC === |
{{stub}} | {{stub}} | ||
# qemu-img create -f raw storage.img 2G | # qemu-img create -f raw storage.img 2G | ||
Line 25: | Line 85: | ||
kernel /vmlinuz | kernel /vmlinuz | ||
append loglevel=8 root=/dev/mmcblk0p1 rw | append loglevel=8 root=/dev/mmcblk0p1 rw | ||
− | fdtdir / | + | fdtdir /dtb/ |
initrd /initrd.img | initrd /initrd.img | ||
− | == TODO == | + | You then need to write a script in /etc/kernel/postinst.d/zz-generate-dtb-link to generate a symlink from /usr/lib/linux-image-<your-kernel-version> to /dtb, so for instance from /usr/lib/linux-image-5.2.0-3-arm64/ to /dtb. I've an incomplete script here: |
+ | #!/bin/sh | ||
+ | set -e | ||
+ | |||
+ | version="$1" | ||
+ | |||
+ | ln -sf /usr/lib/linux-image-${version} /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: | ||
+ | ln -sf /usr/lib/linux-image-<your-kernel-version> /dtb | ||
+ | You will need to replace the <your-kenrel-version> with your kenrel version, for instance: | ||
+ | ln -sf /usr/lib/linux-image-5.2.0-3-arm64/ /dtb. | ||
+ | |||
+ | === TODO === | ||
{{stub}} | {{stub}} | ||
* Add a symlink for /usr/lib/linux-image-5.2.0-3-arm64/ to /ftddir or something like that in Debian and backport it to FSDG distributions that support architecture with devicetree like PureOS | * Add a symlink for /usr/lib/linux-image-5.2.0-3-arm64/ to /ftddir or something like that in Debian and backport it to FSDG distributions that support architecture with devicetree like PureOS | ||
+ | |||
+ | == References == | ||
+ | <references/> |
Latest revision as of 14:44, 17 January 2023
Contents
PureOS versions
Version | Can be debootstrapped | Based on[1] | Kernel version | Comments |
---|---|---|---|---|
Green | Not anymore as October 2019:
E: Couldn't find these debs: ca-certificates pureos-minimal |
? | ? |
|
Amber | Yes | Debian 10 (buster) | 4.19 |
|
Byzantium | Yes | Debian 11 (bullseye) | 5.2 |
|
Landing | ? | ? |
|
Installing
- PureOS can be installed through the live USB installer
- Parabola can debootstrap PureOS Amber for all the supported architectures
PureOS on ARM SBCs
u-boot
U-boot has a standard for booting distributions. The easiest way to configure your distribution to boot with u-boot is to create an extlinux.conf configuration file as explaned below. U-boot will then look for it in /boot/extlinux/extlinux.conf (and probably /extlinux/extlinux.conf too) on each partition that it can access.
How to install PureOS on an arm64 SBC
# 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 arm64 amber rootfs https://repo.puri.sm/pureos # cp /usr/bin/qemu-aarch64-static rootfs/usr/bin # LANG=C.UTF-8 chroot rootfs qemu-aarch64-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 PureOS GNU/Linux-libre, linux-libre kernel kernel /vmlinuz append loglevel=8 root=/dev/mmcblk0p1 rw fdtdir /dtb/ initrd /initrd.img
You then need to write a script in /etc/kernel/postinst.d/zz-generate-dtb-link to generate a symlink from /usr/lib/linux-image-<your-kernel-version> to /dtb, so for instance from /usr/lib/linux-image-5.2.0-3-arm64/ to /dtb. I've an incomplete script here:
#!/bin/sh set -e version="$1" ln -sf /usr/lib/linux-image-${version} /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:
ln -sf /usr/lib/linux-image-<your-kernel-version> /dtb
You will need to replace the <your-kenrel-version> with your kenrel version, for instance:
ln -sf /usr/lib/linux-image-5.2.0-3-arm64/ /dtb.
TODO
- Add a symlink for /usr/lib/linux-image-5.2.0-3-arm64/ to /ftddir or something like that in Debian and backport it to FSDG distributions that support architecture with devicetree like PureOS
References
-
↑ Nowadays PureOS follows Debian closely. From #purism the 17 January 2022:
20:23 < GNUtoo> Hi, is that documentation still up to date: https://tracker.pureos.net/w/development/pureos_archive_layout/ ?
20:26 < GNUtoo> Or is it more like amber is based on Debian 9 (stretch) and byzantium is based on Debian 10 (Buster) ?
20:28 <@greenfly> byzantium is based off of Debian 11 (Bullseye)
20:29 < GNUtoo> ok thanks. And amber is based on stretch?
20:30 < GNUtoo> And if I stay on a given version (like "amber") then it will stays based on the same Debian version in the future?
20:30 <@greenfly> I can't recall at the moment whether amber was based on stretch or buster
20:31 <@greenfly> but yes, it will behave like Debian in that regard
20:31 < GNUtoo> ok, thanks, I'll try to identify the base version of amber
20:31 <@greenfly> ie, byzantium will always point to bullseye, when we put out a new PureOS release, it will have a new name and will target a new upstream Debian release
20:34 < GNUtoo> Thanks, I'll update the info on the Libreplanet wiki on that. Though I can't fix https://tracker.pureos.net/w/development/pureos_archive_layout/ (I've no access to it)
20:35 < GNUtoo> amber seems to be based on buster as the systemd package version is the same than buster and the stretch one is older
- ↑ https://tracker.pureos.net/w/development/pureos_archive_layout/