Posts
4067
Following
272
Followers
422
Software Engineer at Opinsys Oy (starting 03/2025)
Entrepreneur at Siltakatu Solutions Oy

OpenPGP: 3AB05486C7752FE1

Jarkko Sakkinen

Great I have new kernel testing sandbox for more complex kernel features such as Rust, IMA and perhaps video4linux:

https://codeberg.org/jarkko/linux-tpmdd-nixos

Right now it builds as per "packer build tpmdd.pkr.hcl" but I might possibly consider OCI or POD in future. Packer was just the first thing I got working, and thus the random pick :-)

My other sandbox is BuildRoot based:

https://codeberg.org/jarkko/linux-tpmdd-test

So yeah that really has been my barrier for doing anything at all with Rust in Linux kernel so I'm officially now Rust-Linux enabled ;-)

#linux #kernel #buildroot #nixos #rust #rustlang
1
3
0

Jarkko Sakkinen

#SELinux must be awesome today because I've forgotten that it even exists in my system ;-)

@securepaul
0
1
2

Jarkko Sakkinen

Edited 4 hours ago
I have not yet found this working too well but I did star the project, and will follow from the audience, and occasionally browse the issue database:

https://github.com/fossable/goldboot

Especially when you need tailored VM's and kernel's there's room for new shit so I hope the developer has patience with this, and continues push it forward.

I'd like to contribute too but right now I'm starting on a new job week after that plus I really want to finish up with video-loop.ko :-)

#goldboot #vm #image #build
0
0
2

Jarkko Sakkinen

0
1
1

Jarkko Sakkinen

Edited 2 hours ago

Finally sorted out how to have changing Git tip and keeping it “pure” in NixOS build. Here’s flake.nix:

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
  outputs = { self, nixpkgs }: let
    tpmddSrc = if builtins.pathExists ./linux-tpmdd.json then
                 builtins.removeAttrs (builtins.fromJSON (builtins.readFile ./linux-tpmdd.json)) [ "hash" "path" "date" ]
               else {};
  in {
    nixosConfigurations = {
      tpmdd = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          ({ config, lib, pkgs, modulesPath, ... }:
            import ./configuration.nix {
              inherit config lib pkgs modulesPath tpmddSrc;
            }
          )
        ];
      };
    };
  };
}

After this I can refer to the Git tip with tpmddSrc in configuration.nix, or any other module.

The JSON itself is generated in Dockerfile, pod or Dockerfile as:

nix-prefetch-git --url https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git > linux-tpmdd.json

Two days went figuring this out. I switched from Podman to Packer but in the end of the day I could have just well used Podman now that I figured out how to pass the data (I had some terrible moments with builtins.readFile and builtins.getEnv with no luck).

Oh well, I use Packer for now and add a Dockerfile in some point in future.

As said, this effort was done for the sake engineering some kind edit-compile-run cycle for Rust enabled Linux kernel (even tho my configuration.nix at this point has none of that but it is now downhill ;-) knock knock

#nixos #linux #kernel #rust #rustlang

0
1
0

Jarkko Sakkinen

Edited 22 hours ago
Took a while to get there (aka not slept last night) but now I have the rudimentary infrastructure to build NixOS QCOW2 with docker-compose or podman-compose:

https://codeberg.org/jarkko/linux-tpmdd-nixos

I.e running "podman-compose up --build" results in " output/tpmdd-nixos.qcow2"

Next up how do I extract semantic version from Makefile of the kernel tree instead of presetting version to 5.10?

#linux #kernel #nixos
2
1
0

Jarkko Sakkinen

Edited yesterday
Despite Linux Memory Manager book is ~1300 pages, it is like Intel SDM, i.e. for a specific narrow topic the description is fast and easy to grab.

I just did my first test run with it by refreshing my oom_score_adj knowledge as I needed that and 3 minutes of reading was enough :-)

And I had not even peeked to the book before this. I got what I needed from this and I think next N years will be filled with these 3 min checkups.

Will be a HUGE time saver for me...

#linux #kernel #mm
0
1
2

Jarkko Sakkinen

1
7
14

Jarkko Sakkinen

I'm a Chris Lewicki fanboy. For me asteroid mining or pursuing that still makes a lot of sense: https://www.chrislewicki.com/

Much better plan than conquer Mars.
0
0
0

Jarkko Sakkinen

0
10
12

The EU stands in partnership with Moldova and the Moldovan people.

And we want to bring the country closer to our Union as fast as possible.

We welcome the political agreement between the European Parliament and the Council of the European Union on the Reform and Growth Facility for Moldova.

The agreed €1.9 billion Facility – the largest EU financial support package since Moldova's independence – is a key step in our partnership.

For a shared Europe of freedom, prosperity and stability.

1
2
0

Jarkko Sakkinen

Infamous UK yellow tabloids are like the voice of democracy as of today in 2025! Who would have guessed 👽
1
4
4

Jarkko Sakkinen

So...

Is Fedora going to move on to Hyprland any day?

#fedora #wayland #hyprland
2
0
0

Jarkko Sakkinen

Edited 22 hours ago

This is how you build a test kernel with NixOS shenanigans:

podman pull nixos/nix   
podman run -it --rm -v "$(pwd):/kekkonen:Z" nixos/nix bash
cd kekkonen
nix-build '<nixpkgs/nixos>' -A config.system.build.qcow2 -I nixos-config=./configuration.nix

I’m planning to use this for Rust Linux instead of tweaking my BuildRoot environment at least at first.

Here’s an example on how to enable a custom kernel, albeit not yet with anything Rust. I just tested it with my in progress driver:

   boot.kernelPackages = let
    linux_tpmdd_pkg = { fetchgit, buildLinux, ... } @ args:

    buildLinux (args // rec {
      extraConfig = ''
        64BIT y
        ACPI y
        CRYPTO y
        IKHEADERS y
        LOCKDEP y
        MEMORY_FAILURE y
        MODULES n
        PROVE_LOCKING y
        RETPOLINE y
        TCG_TPM y
        TCG_TIS y
        TCG_CRB y
      '';
      ignoreConfigErrors = true;
      kernelPatches = [];
      src = pkgs.fetchgit {
        url = "https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git";
        rev = "master";
        sha256 = lib.fakeSha256;
      };
      version = "5.10";
    } // (args.argsOverride or {}));
    linux_tpmdd = pkgs.callPackage linux_tpmdd_pkg{};
  in
    pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_tpmdd); 

EDIT: That did not play out so well but I then I looked at my old gists and recalled how this should be actually done: https://gist.github.com/jarkkojs/86bda141204e792122ef0c94b8b083b1. Has been three years since I bootstrapped a kernel tree in NixOS.

#linux #kernel #nix #nixos

1
2
6

Jarkko Sakkinen

Edited 2 days ago
Great I posted some messages to rust-for-linux, asked the questions I had how test, got some great answers and nobody nuked me!

I even said that by the process I would personally NAK this based on being unable to test the patches and and discussion did not heat up :-)

All I can say that I had a positive experience.

#linux #kernel #dma #rust #rustlang
1
6
5

Jarkko Sakkinen

I put this to my order because I love Condrad Barskis painting style :-) The very same reason why I bought Land of Lisp. I'm a fan of good visual arts, and my cousin Riiko is also a painting artist living in Spain: https://riikosakkinen.com/

https://nostarch.com/bitcoinforthebefuddled
1
1
1

Jarkko Sakkinen

This is sometimes useful feature that is not very common but evolution has it :-)

I even have one inbox that requires it (infradead.org).

#evolution #email #ssh
0
0
0

Jarkko Sakkinen

As always Raymond Chen delivers. This time on why Windows 95 setup needed three stages of operating systems 👇

devblogs.microsoft.com/oldnewthing/...

#microsoft #windows #oldnewthing #blog
0
0
1
Show older