Can someone with serial console access try NixOS kernel on Librem 5?

Perhaps this merge request may be of interest to you:

If it is we can share here how to install it.

2 Likes

Also do you have the mandatory screenshot of it running NixOS :slight_smile:

:scream:
That seems exactly what is needed! Please share :blush:

Will create :yum:

Wellā€¦

On a debian based systemā€¦

You would download the .deb package from here;

  1. https://source.puri.sm/a-wai/uboot-imx/-/jobs/405334/artifacts/raw/debian/output/u-boot-librem5_2022.10-librem5.1_arm64.deb

install it with:

sudo apt install ./u-boot-librem5_2022.10-librem5.1_arm64.deb

then run sudo u-boot-install-librem5 /dev/mmcblk0

1 Like

But maybe @angus.ainslie can assist with how to do this on a non PureOS system ^^.

$ curl -LOC - https://source.puri.sm/a-wai/uboot-imx/-/jobs/405334/artifacts/raw/debian/output/u-boot-librem5_2022.10-librem5.1_arm64.deb
$ ar -x u-boot-librem5_2022.10-librem5.1_arm64.deb
$ tar xf data.tar.xz
$ cat usr/bin/u-boot-install-librem5
$ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=1055 seek=2
$ sudo dd if=usr/lib/u-boot/librem5/u-boot.imx conv=notrunc of=/dev/mmcblk0 bs=1024 seek=33

Iā€™ll need to verify and execute this.

edit: this works, thanks! :partying_face:

3 Likes

Iā€™ve revived my Librem 5 after it has been laying on my desk for months - plugged in once a week to prevent the battery from draining to zero - after a failed u-boot update, and wanted to finally follow up to your request:

[ookhoi@librem5:~]$ nix run -- nixpkgs#screenfetch
          ::::.    ':::::     ::::'           ookhoi@librem5
          ':::::    ':::::.  ::::'            OS: NixOS 24.11.20241001.e277415 (Vicuna)
            :::::     '::::.:::::             Kernel: aarch64 Linux 6.6.52-librem5
      .......:::::..... ::::::::              Uptime: 1h 25m
     ::::::::::::::::::. ::::::    ::::.      Packages: 1306
    ::::::::::::::::::::: :::::.  .::::'      Shell: bash 5.2.32
           .....           ::::' :::::'       Disk: 11G / 30G (38%)
          :::::            '::' :::::'        CPU: Unknown @ 4x 1.5GHz
 ........:::::               ' :::::::::::.   GPU:
:::::::::::::                 :::::::::::::   RAM: 682MiB / 2888MiB
 ::::::::::: ..              :::::
     .::::: .:::            :::::
    .:::::  :::::          '''''    .....
    :::::   ':::::.  ......:::::::::::::'
     :::     ::::::. ':::::::::::::::::'
            .:::::::: '::::::::::
           .::::''::::.     '::::.
          .::::'   ::::.     '::::.
         .::::      ::::      '::::.

Not much installed yet.

5 Likes

Iā€™m curious about your experience so far. Does everything work as much as it does on PureOS? Have you been using it on a daily basis?

1 Like

That would be wild, you gave me a really stupid idea using the dev pinout, a 3D printer and a few other thingsā€¦ Imagine a backplate that gives yiu a serial interface RS-232 (the DB connector that is smaller than the other RS-232 connector (which looked like a centronics parallel port). Techincally doable with the breakout board and pogo pins.

1 Like

ā€¦or you could just use the USB-C port:

ā€¦or you could use the extension connector:

This one is even available to buy from Purism:

[edit] I missed the implied non-seriousness of your post, but Iā€™ll leave these links here in case other people find them useful :slight_smile:

4 Likes

I think I have a box of male 3 pin ATP connectors somewhere in my attic. They were exclusive to Hewlett Packard for RS-232. About the same size as DB9 connectors but with a squeeze plastic locking mechanism.

2 Likes

Iā€™m afraid Iā€™m not using my Librem 5 at all. It is just too slow and too limited to spark joy.

Sound in calls and the camera donā€™t work with NixOS. Although I expect both can work with some effort.

All other software available for aarch64 works (currently running gnome).

I do play with the Librem 5 now and then. Iā€™ve just reinstalled on a single partition to see if is feasible, to eliminate the trouble of planning disk layout during installation. And it is:

[ookhoi@librem5:~]$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 29.12 GiB, 31268536320 bytes, 61071360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FCC00EA4-5943-4056-878B-17D8D388CAFA

Device         Start      End  Sectors  Size Type
/dev/mmcblk0p1  4096 61071326 61067231 29.1G Linux filesystem
[ookhoi@librem5:~]$ df -h / /boot/
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p1   29G   17G   11G  63% /
/dev/mmcblk0p1   29G   17G   11G  63% /boot

What I dislike most about the Librem 5 is that there is no upstream support. Iā€™m stuck with the ancient kernel versions that Purism provides - currently 6.6.74 - with no prospect that the Librem 5 will ever be a truly libre Linux device.

I am thankful for all Purism has done for Linux on mobile.

How is your experience with PureOS on Librem 5?

edit:

[ookhoi@librem5:~]$ nix run -- nixpkgs#screenfetch
          ::::.    ':::::     ::::'           ookhoi@librem5
          ':::::    ':::::.  ::::'            OS: NixOS 25.05.20250311.b62d2a9 (Warbler)
            :::::     '::::.:::::             Kernel: aarch64 Linux 6.6.74-librem5
      .......:::::..... ::::::::              Uptime: 2h 9m
     ::::::::::::::::::. ::::::    ::::.      Packages: 1442
    ::::::::::::::::::::: :::::.  .::::'      Shell: bash 5.2.37
           .....           ::::' :::::'       Disk: 17G / 29G (63%)
          :::::            '::' :::::'        CPU: ARM Cortex-A53 @ 4x 1.5GHz
 ........:::::               ' :::::::::::.   GPU:
:::::::::::::                 :::::::::::::   RAM: 964MiB / 2890MiB
 ::::::::::: ..              :::::
     .::::: .:::            :::::
    .:::::  :::::          '''''    .....
    :::::   ':::::.  ......:::::::::::::'
     :::     ::::::. ':::::::::::::::::'
            .:::::::: '::::::::::
           .::::''::::.     '::::.
          .::::'   ::::.     '::::.
         .::::      ::::      '::::.
3 Likes

Thanks a lot for the response. It seems like a dealbreaker that calls and camera donā€™t work on it.

I havenā€™t used Librem 5 with NixOS, but was considering it. Hence I asked.

Btw, there was a discussion about extending ZRam, which seems to greatly improve responsiveness and performance: Why and how to extend ZRAM on L5. A revolution for Librem 5 stability! - #65 by shak

Maybe you can try that?

1 Like